From 5dc73df38ebcfa6f96479901e253d172c3e35849 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:13:47 +0200 Subject: [PATCH] chore: update generated content Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- dist/index.cjs | 52 +++++++++++++++++++++++----------------------- dist/index.cjs.map | 6 +++--- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dist/index.cjs b/dist/index.cjs index 3b2db24..8d78dd8 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -1,8 +1,8 @@ -var pGe=Object.create;var ky=Object.defineProperty;var mGe=Object.getOwnPropertyDescriptor;var fGe=Object.getOwnPropertyNames;var AGe=Object.getPrototypeOf,hGe=Object.prototype.hasOwnProperty;var i=(t,e)=>ky(t,"name",{value:e,configurable:!0});var g=(t,e)=>()=>(t&&(e=t(t=0)),e);var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Dr=(t,e)=>{for(var r in e)ky(t,r,{get:e[r],enumerable:!0})},j9=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fGe(e))!hGe.call(t,s)&&s!==r&&ky(t,s,{get:()=>e[s],enumerable:!(n=mGe(e,s))||n.enumerable});return t};var R=(t,e,r)=>(r=t!=null?pGe(AGe(t)):{},j9(e||!t||!t.__esModule?ky(r,"default",{value:t,enumerable:!0}):r,t)),ee=t=>j9(ky({},"__esModule",{value:!0}),t);var oK=I(Lf=>{"use strict";var fHt=require("net"),wGe=require("tls"),gM=require("http"),rK=require("https"),SGe=require("events"),AHt=require("assert"),xGe=require("util");Lf.httpOverHttp=bGe;Lf.httpsOverHttp=BGe;Lf.httpOverHttps=RGe;Lf.httpsOverHttps=NGe;function bGe(t){var e=new ul(t);return e.request=gM.request,e}i(bGe,"httpOverHttp");function BGe(t){var e=new ul(t);return e.request=gM.request,e.createSocket=nK,e.defaultPort=443,e}i(BGe,"httpsOverHttp");function RGe(t){var e=new ul(t);return e.request=rK.request,e}i(RGe,"httpOverHttps");function NGe(t){var e=new ul(t);return e.request=rK.request,e.createSocket=nK,e.defaultPort=443,e}i(NGe,"httpsOverHttps");function ul(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||gM.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",i(function(n,s,o,a){for(var c=sK(s,o,a),l=0,u=e.requests.length;l=this.maxSockets){o.requests.push(a);return}o.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);function l(){o.emit("free",c,a)}i(l,"onFree");function u(d){o.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}i(u,"onCloseOrRemove")})},"addRequest");ul.prototype.createSocket=i(function(e,r){var n=this,s={};n.sockets.push(s);var o=yM({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),yu("making CONNECT request");var a=n.request(o);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",d),a.end();function c(p){p.upgrade=!0}i(c,"onResponse");function l(p,m,f){process.nextTick(function(){u(p,m,f)})}i(l,"onUpgrade");function u(p,m,f){if(a.removeAllListeners(),m.removeAllListeners(),p.statusCode!==200){yu("tunneling socket could not be established, statusCode=%d",p.statusCode),m.destroy();var A=new Error("tunneling socket could not be established, statusCode="+p.statusCode);A.code="ECONNRESET",e.request.emit("error",A),n.removeSocket(s);return}if(f.length>0){yu("got illegal response body from proxy"),m.destroy();var A=new Error("got illegal response body from proxy");A.code="ECONNRESET",e.request.emit("error",A),n.removeSocket(s);return}return yu("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=m,r(m)}i(u,"onConnect");function d(p){a.removeAllListeners(),yu(`tunneling socket could not be established, cause=%s -`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),n.removeSocket(s)}i(d,"onError")},"createSocket");ul.prototype.removeSocket=i(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(s){n.request.onSocket(s)})}},"removeSocket");function nK(t,e){var r=this;ul.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),o=yM({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),a=wGe.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}i(nK,"createSecureSocket");function sK(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}i(sK,"toOptions");function yM(t){for(var e=1,r=arguments.length;e{iK.exports=oK()});var Lt=I((EHt,aK)=>{aK.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var rt=I((CHt,QK)=>{"use strict";var cK=Symbol.for("undici.error.UND_ERR"),Ot=class extends Error{static{i(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[cK]===!0}[cK]=!0},lK=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),EM=class extends Ot{static{i(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[lK]===!0}[lK]=!0},uK=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),CM=class extends Ot{static{i(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[uK]===!0}[uK]=!0},dK=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),IM=class extends Ot{static{i(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[dK]===!0}[dK]=!0},pK=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),wM=class extends Ot{static{i(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[pK]===!0}[pK]=!0},mK=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),SM=class extends Ot{static{i(this,"ResponseStatusCodeError")}constructor(e,r,n,s){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=s,this.status=r,this.statusCode=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[mK]===!0}[mK]=!0},fK=Symbol.for("undici.error.UND_ERR_INVALID_ARG"),xM=class extends Ot{static{i(this,"InvalidArgumentError")}constructor(e){super(e),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}static[Symbol.hasInstance](e){return e&&e[fK]===!0}[fK]=!0},AK=Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"),bM=class extends Ot{static{i(this,"InvalidReturnValueError")}constructor(e){super(e),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}static[Symbol.hasInstance](e){return e&&e[AK]===!0}[AK]=!0},hK=Symbol.for("undici.error.UND_ERR_ABORT"),Mx=class extends Ot{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError",this.message=e||"The operation was aborted",this.code="UND_ERR_ABORT"}static[Symbol.hasInstance](e){return e&&e[hK]===!0}[hK]=!0},gK=Symbol.for("undici.error.UND_ERR_ABORTED"),BM=class extends Mx{static{i(this,"RequestAbortedError")}constructor(e){super(e),this.name="AbortError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}static[Symbol.hasInstance](e){return e&&e[gK]===!0}[gK]=!0},yK=Symbol.for("undici.error.UND_ERR_INFO"),RM=class extends Ot{static{i(this,"InformationalError")}constructor(e){super(e),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}static[Symbol.hasInstance](e){return e&&e[yK]===!0}[yK]=!0},EK=Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"),NM=class extends Ot{static{i(this,"RequestContentLengthMismatchError")}constructor(e){super(e),this.name="RequestContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[EK]===!0}[EK]=!0},CK=Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"),TM=class extends Ot{static{i(this,"ResponseContentLengthMismatchError")}constructor(e){super(e),this.name="ResponseContentLengthMismatchError",this.message=e||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[CK]===!0}[CK]=!0},IK=Symbol.for("undici.error.UND_ERR_DESTROYED"),vM=class extends Ot{static{i(this,"ClientDestroyedError")}constructor(e){super(e),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}static[Symbol.hasInstance](e){return e&&e[IK]===!0}[IK]=!0},wK=Symbol.for("undici.error.UND_ERR_CLOSED"),PM=class extends Ot{static{i(this,"ClientClosedError")}constructor(e){super(e),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}static[Symbol.hasInstance](e){return e&&e[wK]===!0}[wK]=!0},SK=Symbol.for("undici.error.UND_ERR_SOCKET"),QM=class extends Ot{static{i(this,"SocketError")}constructor(e,r){super(e),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}static[Symbol.hasInstance](e){return e&&e[SK]===!0}[SK]=!0},xK=Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"),_M=class extends Ot{static{i(this,"NotSupportedError")}constructor(e){super(e),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}static[Symbol.hasInstance](e){return e&&e[xK]===!0}[xK]=!0},bK=Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"),DM=class extends Ot{static{i(this,"BalancedPoolMissingUpstreamError")}constructor(e){super(e),this.name="MissingUpstreamError",this.message=e||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}static[Symbol.hasInstance](e){return e&&e[bK]===!0}[bK]=!0},BK=Symbol.for("undici.error.UND_ERR_HTTP_PARSER"),kM=class extends Error{static{i(this,"HTTPParserError")}constructor(e,r,n){super(e),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[BK]===!0}[BK]=!0},RK=Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"),LM=class extends Ot{static{i(this,"ResponseExceededMaxSizeError")}constructor(e){super(e),this.name="ResponseExceededMaxSizeError",this.message=e||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}static[Symbol.hasInstance](e){return e&&e[RK]===!0}[RK]=!0},NK=Symbol.for("undici.error.UND_ERR_REQ_RETRY"),OM=class extends Ot{static{i(this,"RequestRetryError")}constructor(e,r,{headers:n,data:s}){super(e),this.name="RequestRetryError",this.message=e||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=r,this.data=s,this.headers=n}static[Symbol.hasInstance](e){return e&&e[NK]===!0}[NK]=!0},TK=Symbol.for("undici.error.UND_ERR_RESPONSE"),MM=class extends Ot{static{i(this,"ResponseError")}constructor(e,r,{headers:n,data:s}){super(e),this.name="ResponseError",this.message=e||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=r,this.data=s,this.headers=n}static[Symbol.hasInstance](e){return e&&e[TK]===!0}[TK]=!0},vK=Symbol.for("undici.error.UND_ERR_PRX_TLS"),FM=class extends Ot{static{i(this,"SecureProxyConnectionError")}constructor(e,r,n){super(r,{cause:e,...n??{}}),this.name="SecureProxyConnectionError",this.message=r||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=e}static[Symbol.hasInstance](e){return e&&e[vK]===!0}[vK]=!0},PK=Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"),UM=class extends Ot{static{i(this,"MessageSizeExceededError")}constructor(e){super(e),this.name="MessageSizeExceededError",this.message=e||"Max decompressed message size exceeded",this.code="UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"}static[Symbol.hasInstance](e){return e&&e[PK]===!0}get[PK](){return!0}};QK.exports={AbortError:Mx,HTTPParserError:kM,UndiciError:Ot,HeadersTimeoutError:CM,HeadersOverflowError:IM,BodyTimeoutError:wM,RequestContentLengthMismatchError:NM,ConnectTimeoutError:EM,ResponseStatusCodeError:SM,InvalidArgumentError:xM,InvalidReturnValueError:bM,RequestAbortedError:BM,ClientDestroyedError:vM,ClientClosedError:PM,InformationalError:RM,SocketError:QM,NotSupportedError:_M,ResponseContentLengthMismatchError:TM,BalancedPoolMissingUpstreamError:DM,ResponseExceededMaxSizeError:LM,RequestRetryError:OM,ResponseError:MM,SecureProxyConnectionError:FM,MessageSizeExceededError:UM}});var Ux=I((wHt,_K)=>{"use strict";var Fx={},qM=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let t=0;t{"use strict";var{wellknownHeaderNames:DK,headerNameLowerCasedRecord:TGe}=Ux(),GM=class t{static{i(this,"TstNode")}value=null;left=null;middle=null;right=null;code;constructor(e,r,n){if(n===void 0||n>=e.length)throw new TypeError("Unreachable");if((this.code=e.charCodeAt(n))>127)throw new TypeError("key must be ascii string");e.length!==++n?this.middle=new t(e,r,n):this.value=r}add(e,r){let n=e.length;if(n===0)throw new TypeError("Unreachable");let s=0,o=this;for(;;){let a=e.charCodeAt(s);if(a>127)throw new TypeError("key must be ascii string");if(o.code===a)if(n===++s){o.value=r;break}else if(o.middle!==null)o=o.middle;else{o.middle=new t(e,r,s);break}else if(o.code=65&&(o|=32);s!==null;){if(o===s.code){if(r===++n)return s;s=s.middle;break}s=s.code{"use strict";var Ly=require("node:assert"),{kDestroyed:FK,kBodyUsed:Mf,kListeners:HM,kBody:MK}=Lt(),{IncomingMessage:vGe}=require("node:http"),$x=require("node:stream"),PGe=require("node:net"),{Blob:QGe}=require("node:buffer"),_Ge=require("node:util"),{stringify:DGe}=require("node:querystring"),{EventEmitter:kGe}=require("node:events"),{InvalidArgumentError:zr}=rt(),{headerNameLowerCasedRecord:LGe}=Ux(),{tree:UK}=OK(),[OGe,MGe]=process.versions.node.split(".").map(t=>Number(t)),Hx=class{static{i(this,"BodyAsyncIterable")}constructor(e){this[MK]=e,this[Mf]=!1}async*[Symbol.asyncIterator](){Ly(!this[Mf],"disturbed"),this[Mf]=!0,yield*this[MK]}};function FGe(t){return zx(t)?(zK(t)===0&&t.on("data",function(){Ly(!1)}),typeof t.readableDidRead!="boolean"&&(t[Mf]=!1,kGe.prototype.on.call(t,"data",function(){this[Mf]=!0})),t):t&&typeof t.pipeTo=="function"?new Hx(t):t&&typeof t!="string"&&!ArrayBuffer.isView(t)&&$K(t)?new Hx(t):t}i(FGe,"wrapRequestBody");function UGe(){}i(UGe,"nop");function zx(t){return t&&typeof t=="object"&&typeof t.pipe=="function"&&typeof t.on=="function"}i(zx,"isStream");function qK(t){if(t===null)return!1;if(t instanceof QGe)return!0;if(typeof t!="object")return!1;{let e=t[Symbol.toStringTag];return(e==="Blob"||e==="File")&&("stream"in t&&typeof t.stream=="function"||"arrayBuffer"in t&&typeof t.arrayBuffer=="function")}}i(qK,"isBlobLike");function qGe(t,e){if(t.includes("?")||t.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=DGe(e);return r&&(t+="?"+r),t}i(qGe,"buildURL");function GK(t){let e=parseInt(t,10);return e===Number(t)&&e>=0&&e<=65535}i(GK,"isValidPort");function Gx(t){return t!=null&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&(t[4]===":"||t[4]==="s"&&t[5]===":")}i(Gx,"isHttpOrHttpsPrefixed");function HK(t){if(typeof t=="string"){if(t=new URL(t),!Gx(t.origin||t.protocol))throw new zr("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}if(!t||typeof t!="object")throw new zr("Invalid URL: The URL argument must be a non-null object.");if(!(t instanceof URL)){if(t.port!=null&&t.port!==""&&GK(t.port)===!1)throw new zr("Invalid URL: port must be a valid integer or a string representation of an integer.");if(t.path!=null&&typeof t.path!="string")throw new zr("Invalid URL path: the path must be a string or null/undefined.");if(t.pathname!=null&&typeof t.pathname!="string")throw new zr("Invalid URL pathname: the pathname must be a string or null/undefined.");if(t.hostname!=null&&typeof t.hostname!="string")throw new zr("Invalid URL hostname: the hostname must be a string or null/undefined.");if(t.origin!=null&&typeof t.origin!="string")throw new zr("Invalid URL origin: the origin must be a string or null/undefined.");if(!Gx(t.origin||t.protocol))throw new zr("Invalid URL protocol: the URL must start with `http:` or `https:`.");let e=t.port!=null?t.port:t.protocol==="https:"?443:80,r=t.origin!=null?t.origin:`${t.protocol||""}//${t.hostname||""}:${e}`,n=t.path!=null?t.path:`${t.pathname||""}${t.search||""}`;return r[r.length-1]==="/"&&(r=r.slice(0,r.length-1)),n&&n[0]!=="/"&&(n=`/${n}`),new URL(`${r}${n}`)}if(!Gx(t.origin||t.protocol))throw new zr("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}i(HK,"parseURL");function GGe(t){if(t=HK(t),t.pathname!=="/"||t.search||t.hash)throw new zr("invalid url");return t}i(GGe,"parseOrigin");function HGe(t){if(t[0]==="["){let r=t.indexOf("]");return Ly(r!==-1),t.substring(1,r)}let e=t.indexOf(":");return e===-1?t:t.substring(0,e)}i(HGe,"getHostname");function $Ge(t){if(!t)return null;Ly(typeof t=="string");let e=HGe(t);return PGe.isIP(e)?"":e}i($Ge,"getServerName");function zGe(t){return JSON.parse(JSON.stringify(t))}i(zGe,"deepClone");function VGe(t){return t!=null&&typeof t[Symbol.asyncIterator]=="function"}i(VGe,"isAsyncIterable");function $K(t){return t!=null&&(typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function")}i($K,"isIterable");function zK(t){if(t==null)return 0;if(zx(t)){let e=t._readableState;return e&&e.objectMode===!1&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}else{if(qK(t))return t.size!=null?t.size:null;if(YK(t))return t.byteLength}return null}i(zK,"bodyLength");function VK(t){return t&&!!(t.destroyed||t[FK]||$x.isDestroyed?.(t))}i(VK,"isDestroyed");function WGe(t,e){t==null||!zx(t)||VK(t)||(typeof t.destroy=="function"?(Object.getPrototypeOf(t).constructor===vGe&&(t.socket=null),t.destroy(e)):e&&queueMicrotask(()=>{t.emit("error",e)}),t.destroyed!==!0&&(t[FK]=!0))}i(WGe,"destroy");var YGe=/timeout=(\d+)/;function JGe(t){let e=t.toString().match(YGe);return e?parseInt(e[1],10)*1e3:null}i(JGe,"parseKeepAliveTimeout");function WK(t){return typeof t=="string"?LGe[t]??t.toLowerCase():UK.lookup(t)??t.toString("latin1").toLowerCase()}i(WK,"headerNameToString");function jGe(t){return UK.lookup(t)??t.toString("latin1").toLowerCase()}i(jGe,"bufferToLowerCasedHeaderName");function KGe(t,e){e===void 0&&(e={});for(let r=0;ra.toString("utf8")):o.toString("utf8")}}return"content-length"in e&&"content-disposition"in e&&(e["content-disposition"]=Buffer.from(e["content-disposition"]).toString("latin1")),e}i(KGe,"parseHeaders");function XGe(t){let e=t.length,r=new Array(e),n=!1,s=-1,o,a,c=0;for(let l=0;l{r.close(),r.byobRequest?.respond(0)});else{let o=Buffer.isBuffer(s)?s:Buffer.from(s);o.byteLength&&r.enqueue(new Uint8Array(o))}return r.desiredSize>0},async cancel(r){await e.return()},type:"bytes"})}i(sHe,"ReadableStreamFrom");function oHe(t){return t&&typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&t[Symbol.toStringTag]==="FormData"}i(oHe,"isFormDataLike");function iHe(t,e){return"addEventListener"in t?(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)):(t.addListener("abort",e),()=>t.removeListener("abort",e))}i(iHe,"addAbortListener");var aHe=typeof String.prototype.toWellFormed=="function",cHe=typeof String.prototype.isWellFormed=="function";function JK(t){return aHe?`${t}`.toWellFormed():_Ge.toUSVString(t)}i(JK,"toUSVString");function lHe(t){return cHe?`${t}`.isWellFormed():JK(t)===`${t}`}i(lHe,"isUSVString");function jK(t){switch(t){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return t>=33&&t<=126}}i(jK,"isTokenCharCode");function uHe(t){if(t.length===0)return!1;for(let e=0;e{"use strict";var ut=require("node:diagnostics_channel"),VM=require("node:util"),Vx=VM.debuglog("undici"),zM=VM.debuglog("fetch"),fp=VM.debuglog("websocket"),eX=!1,gHe={beforeConnect:ut.channel("undici:client:beforeConnect"),connected:ut.channel("undici:client:connected"),connectError:ut.channel("undici:client:connectError"),sendHeaders:ut.channel("undici:client:sendHeaders"),create:ut.channel("undici:request:create"),bodySent:ut.channel("undici:request:bodySent"),headers:ut.channel("undici:request:headers"),trailers:ut.channel("undici:request:trailers"),error:ut.channel("undici:request:error"),open:ut.channel("undici:websocket:open"),close:ut.channel("undici:websocket:close"),socketError:ut.channel("undici:websocket:socket_error"),ping:ut.channel("undici:websocket:ping"),pong:ut.channel("undici:websocket:pong")};if(Vx.enabled||zM.enabled){let t=zM.enabled?zM:Vx;ut.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connecting to %s using %s%s",`${o}${s?`:${s}`:""}`,n,r)}),ut.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connected to %s using %s%s",`${o}${s?`:${s}`:""}`,n,r)}),ut.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o},error:a}=e;t("connection to %s using %s%s errored - %s",`${o}${s?`:${s}`:""}`,n,r,a.message)}),ut.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:s}}=e;t("sending request to %s %s/%s",r,s,n)}),ut.channel("undici:request:headers").subscribe(e=>{let{request:{method:r,path:n,origin:s},response:{statusCode:o}}=e;t("received response to %s %s/%s - HTTP %d",r,s,n,o)}),ut.channel("undici:request:trailers").subscribe(e=>{let{request:{method:r,path:n,origin:s}}=e;t("trailers received from %s %s/%s",r,s,n)}),ut.channel("undici:request:error").subscribe(e=>{let{request:{method:r,path:n,origin:s},error:o}=e;t("request to %s %s/%s errored - %s",r,s,n,o.message)}),eX=!0}if(fp.enabled){if(!eX){let t=Vx.enabled?Vx:fp;ut.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connecting to %s%s using %s%s",o,s?`:${s}`:"",n,r)}),ut.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connected to %s%s using %s%s",o,s?`:${s}`:"",n,r)}),ut.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o},error:a}=e;t("connection to %s%s using %s%s errored - %s",o,s?`:${s}`:"",n,r,a.message)}),ut.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:s}}=e;t("sending request to %s %s/%s",r,s,n)})}ut.channel("undici:websocket:open").subscribe(t=>{let{address:{address:e,port:r}}=t;fp("connection opened %s%s",e,r?`:${r}`:"")}),ut.channel("undici:websocket:close").subscribe(t=>{let{websocket:e,code:r,reason:n}=t;fp("closed connection to %s - %s %s",e.url,r,n)}),ut.channel("undici:websocket:socket_error").subscribe(t=>{fp("connection errored - %s",t.message)}),ut.channel("undici:websocket:ping").subscribe(t=>{fp("ping received")}),ut.channel("undici:websocket:pong").subscribe(t=>{fp("pong received")})}tX.exports={channels:gHe}});var oX=I((NHt,sX)=>{"use strict";var{InvalidArgumentError:St,NotSupportedError:yHe}=rt(),dl=require("node:assert"),{isValidHTTPToken:nX,isValidHeaderValue:WM,isStream:EHe,destroy:CHe,isBuffer:IHe,isFormDataLike:wHe,isIterable:SHe,isBlobLike:xHe,buildURL:bHe,validateHandler:BHe,getServerName:RHe,normalizedMethodRecords:NHe}=He(),{channels:Sa}=Ff(),{headerNameLowerCasedRecord:rX}=Ux(),THe=/[^\u0021-\u00ff]/,vo=Symbol("handler"),YM=class{static{i(this,"Request")}constructor(e,{path:r,method:n,body:s,headers:o,query:a,idempotent:c,blocking:l,upgrade:u,headersTimeout:d,bodyTimeout:p,reset:m,throwOnError:f,expectContinue:A,servername:h},E){if(typeof r!="string")throw new St("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new St("path must be an absolute URL or start with a slash");if(THe.test(r))throw new St("invalid request path");if(typeof n!="string")throw new St("method must be a string");if(NHe[n]===void 0&&!nX(n))throw new St("invalid request method");if(u&&typeof u!="string")throw new St("upgrade must be a string");if(u&&!WM(u))throw new St("invalid upgrade header");if(d!=null&&(!Number.isFinite(d)||d<0))throw new St("invalid headersTimeout");if(p!=null&&(!Number.isFinite(p)||p<0))throw new St("invalid bodyTimeout");if(m!=null&&typeof m!="boolean")throw new St("invalid reset");if(A!=null&&typeof A!="boolean")throw new St("invalid expectContinue");if(this.headersTimeout=d,this.bodyTimeout=p,this.throwOnError=f===!0,this.method=n,this.abort=null,s==null)this.body=null;else if(EHe(s)){this.body=s;let C=this.body._readableState;(!C||!C.autoDestroy)&&(this.endHandler=i(function(){CHe(this)},"autoDestroy"),this.body.on("end",this.endHandler)),this.errorHandler=w=>{this.abort?this.abort(w):this.error=w},this.body.on("error",this.errorHandler)}else if(IHe(s))this.body=s.byteLength?s:null;else if(ArrayBuffer.isView(s))this.body=s.buffer.byteLength?Buffer.from(s.buffer,s.byteOffset,s.byteLength):null;else if(s instanceof ArrayBuffer)this.body=s.byteLength?Buffer.from(s):null;else if(typeof s=="string")this.body=s.length?Buffer.from(s):null;else if(wHe(s)||SHe(s)||xHe(s))this.body=s;else throw new St("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=u||null,this.path=a?bHe(r,a):r,this.origin=e,this.idempotent=c??(n==="HEAD"||n==="GET"),this.blocking=l??!1,this.reset=m??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=A??!1,Array.isArray(o)){if(o.length%2!==0)throw new St("headers array must be even");for(let C=0;C{"use strict";var vHe=require("node:events"),Yx=class extends vHe{static{i(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...e){let r=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let s of r)if(s!=null){if(typeof s!="function")throw new TypeError(`invalid interceptor, expected function received ${typeof s}`);if(n=s(n),n==null||typeof n!="function"||n.length!==2)throw new TypeError("invalid interceptor")}return new JM(this,n)}},JM=class extends Yx{static{i(this,"ComposedDispatcher")}#e=null;#t=null;constructor(e,r){super(),this.#e=e,this.#t=r}dispatch(...e){this.#t(...e)}close(...e){return this.#e.close(...e)}destroy(...e){return this.#e.destroy(...e)}};iX.exports=Yx});var Hf=I((QHt,aX)=>{"use strict";var PHe=Oy(),{ClientDestroyedError:jM,ClientClosedError:QHe,InvalidArgumentError:Uf}=rt(),{kDestroy:_He,kClose:DHe,kClosed:My,kDestroyed:qf,kDispatch:KM,kInterceptors:Ap}=Lt(),pl=Symbol("onDestroyed"),Gf=Symbol("onClosed"),Jx=Symbol("Intercepted Dispatch"),XM=Symbol("webSocketOptions"),ZM=class extends PHe{static{i(this,"DispatcherBase")}constructor(e){super(),this[qf]=!1,this[pl]=null,this[My]=!1,this[Gf]=[],this[XM]=e?.webSocket??{}}get webSocketOptions(){return{maxFragments:this[XM].maxFragments??131072,maxPayloadSize:this[XM].maxPayloadSize??128*1024*1024}}get destroyed(){return this[qf]}get closed(){return this[My]}get interceptors(){return this[Ap]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[Ap][r]!="function")throw new Uf("interceptor must be an function")}this[Ap]=e}close(e){if(e===void 0)return new Promise((n,s)=>{this.close((o,a)=>o?s(o):n(a))});if(typeof e!="function")throw new Uf("invalid callback");if(this[qf]){queueMicrotask(()=>e(new jM,null));return}if(this[My]){this[Gf]?this[Gf].push(e):queueMicrotask(()=>e(null,null));return}this[My]=!0,this[Gf].push(e);let r=i(()=>{let n=this[Gf];this[Gf]=null;for(let s=0;sthis.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((s,o)=>{this.destroy(e,(a,c)=>a?o(a):s(c))});if(typeof r!="function")throw new Uf("invalid callback");if(this[qf]){this[pl]?this[pl].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new jM),this[qf]=!0,this[pl]=this[pl]||[],this[pl].push(r);let n=i(()=>{let s=this[pl];this[pl]=null;for(let o=0;o{queueMicrotask(n)})}[Jx](e,r){if(!this[Ap]||this[Ap].length===0)return this[Jx]=this[KM],this[KM](e,r);let n=this[KM].bind(this);for(let s=this[Ap].length-1;s>=0;s--)n=this[Ap][s](n);return this[Jx]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new Uf("handler must be an object");try{if(!e||typeof e!="object")throw new Uf("opts must be an object.");if(this[qf]||this[pl])throw new jM;if(this[My])throw new QHe;return this[Jx](e,r)}catch(n){if(typeof r.onError!="function")throw new Uf("invalid onError method");return r.onError(n),!1}}};aX.exports=ZM});var iF=I((DHt,dX)=>{"use strict";var $f=0,eF=1e3,tF=(eF>>1)-1,ml,rF=Symbol("kFastTimer"),fl=[],nF=-2,sF=-1,lX=0,cX=1;function oF(){$f+=tF;let t=0,e=fl.length;for(;t=r._idleStart+r._idleTimeout&&(r._state=sF,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===sF?(r._state=nF,--e!==0&&(fl[t]=fl[e])):++t}fl.length=e,fl.length!==0&&uX()}i(oF,"onTick");function uX(){ml?ml.refresh():(clearTimeout(ml),ml=setTimeout(oF,tF),ml.unref&&ml.unref())}i(uX,"refreshTimeout");var jx=class{static{i(this,"FastTimer")}[rF]=!0;_state=nF;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,r,n){this._onTimeout=e,this._idleTimeout=r,this._timerArg=n,this.refresh()}refresh(){this._state===nF&&fl.push(this),(!ml||fl.length===1)&&uX(),this._state=lX}clear(){this._state=sF,this._idleStart=-1}};dX.exports={setTimeout(t,e,r){return e<=eF?setTimeout(t,e,r):new jx(t,e,r)},clearTimeout(t){t[rF]?t.clear():clearTimeout(t)},setFastTimeout(t,e,r){return new jx(t,e,r)},clearFastTimeout(t){t.clear()},now(){return $f},tick(t=0){$f+=t-eF+1,oF(),oF()},reset(){$f=0,fl.length=0,clearTimeout(ml),ml=null},kFastTimer:rF}});var Fy=I((MHt,hX)=>{"use strict";var kHe=require("node:net"),pX=require("node:assert"),AX=He(),{InvalidArgumentError:LHe,ConnectTimeoutError:OHe}=rt(),Kx=iF();function mX(){}i(mX,"noop");var aF,cF;global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG)?cF=class{static{i(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function MHe({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,session:s,...o}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new LHe("maxCachedSessions must be a positive integer or zero");let a={path:r,...o},c=new cF(e??100);return n=n??1e4,t=t??!1,i(function({hostname:u,host:d,protocol:p,port:m,servername:f,localAddress:A,httpSocket:h},E){let C;if(p==="https:"){aF||(aF=require("node:tls")),f=f||a.servername||AX.getServerName(d)||null;let x=f||u;pX(x);let b=s||c.get(x)||null;m=m||443,C=aF.connect({highWaterMark:16384,...a,servername:f,session:b,localAddress:A,ALPNProtocols:t?["http/1.1","h2"]:["http/1.1"],socket:h,port:m,host:u}),C.on("session",function(N){c.set(x,N)})}else pX(!h,"httpSocket can only be sent on TLS update"),m=m||80,C=kHe.connect({highWaterMark:64*1024,...a,localAddress:A,port:m,host:u});if(a.keepAlive==null||a.keepAlive){let x=a.keepAliveInitialDelay===void 0?6e4:a.keepAliveInitialDelay;C.setKeepAlive(!0,x)}let w=FHe(new WeakRef(C),{timeout:n,hostname:u,port:m});return C.setNoDelay(!0).once(p==="https:"?"secureConnect":"connect",function(){if(queueMicrotask(w),E){let x=E;E=null,x(null,this)}}).on("error",function(x){if(queueMicrotask(w),E){let b=E;E=null,b(x)}}),C},"connect")}i(MHe,"buildConnector");var FHe=process.platform==="win32"?(t,e)=>{if(!e.timeout)return mX;let r=null,n=null,s=Kx.setFastTimeout(()=>{r=setImmediate(()=>{n=setImmediate(()=>fX(t.deref(),e))})},e.timeout);return()=>{Kx.clearFastTimeout(s),clearImmediate(r),clearImmediate(n)}}:(t,e)=>{if(!e.timeout)return mX;let r=null,n=Kx.setFastTimeout(()=>{r=setImmediate(()=>{fX(t.deref(),e)})},e.timeout);return()=>{Kx.clearFastTimeout(n),clearImmediate(r)}};function fX(t,e){if(t==null)return;let r="Connect Timeout Error";Array.isArray(t.autoSelectFamilyAttemptedAddresses)?r+=` (attempted addresses: ${t.autoSelectFamilyAttemptedAddresses.join(", ")},`:r+=` (attempted address: ${e.hostname}:${e.port},`,r+=` timeout: ${e.timeout}ms)`,AX.destroy(t,new OHe(r))}i(fX,"onConnectTimeout");hX.exports=MHe});var gX=I(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0});Xx.enumToMap=void 0;function UHe(t){let e={};return Object.keys(t).forEach(r=>{let n=t[r];typeof n=="number"&&(e[r]=n)}),e}i(UHe,"enumToMap");Xx.enumToMap=UHe});var yX=I(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.SPECIAL_HEADERS=D.HEADER_STATE=D.MINOR=D.MAJOR=D.CONNECTION_TOKEN_CHARS=D.HEADER_CHARS=D.TOKEN=D.STRICT_TOKEN=D.HEX=D.URL_CHAR=D.STRICT_URL_CHAR=D.USERINFO_CHARS=D.MARK=D.ALPHANUM=D.NUM=D.HEX_MAP=D.NUM_MAP=D.ALPHA=D.FINISH=D.H_METHOD_MAP=D.METHOD_MAP=D.METHODS_RTSP=D.METHODS_ICE=D.METHODS_HTTP=D.METHODS=D.LENIENT_FLAGS=D.FLAGS=D.TYPE=D.ERROR=void 0;var qHe=gX(),GHe;(function(t){t[t.OK=0]="OK",t[t.INTERNAL=1]="INTERNAL",t[t.STRICT=2]="STRICT",t[t.LF_EXPECTED=3]="LF_EXPECTED",t[t.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",t[t.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",t[t.INVALID_METHOD=6]="INVALID_METHOD",t[t.INVALID_URL=7]="INVALID_URL",t[t.INVALID_CONSTANT=8]="INVALID_CONSTANT",t[t.INVALID_VERSION=9]="INVALID_VERSION",t[t.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",t[t.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",t[t.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",t[t.INVALID_STATUS=13]="INVALID_STATUS",t[t.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",t[t.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",t[t.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",t[t.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",t[t.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",t[t.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",t[t.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",t[t.PAUSED=21]="PAUSED",t[t.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",t[t.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",t[t.USER=24]="USER"})(GHe=D.ERROR||(D.ERROR={}));var HHe;(function(t){t[t.BOTH=0]="BOTH",t[t.REQUEST=1]="REQUEST",t[t.RESPONSE=2]="RESPONSE"})(HHe=D.TYPE||(D.TYPE={}));var $He;(function(t){t[t.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",t[t.CHUNKED=8]="CHUNKED",t[t.UPGRADE=16]="UPGRADE",t[t.CONTENT_LENGTH=32]="CONTENT_LENGTH",t[t.SKIPBODY=64]="SKIPBODY",t[t.TRAILING=128]="TRAILING",t[t.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})($He=D.FLAGS||(D.FLAGS={}));var zHe;(function(t){t[t.HEADERS=1]="HEADERS",t[t.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",t[t.KEEP_ALIVE=4]="KEEP_ALIVE"})(zHe=D.LENIENT_FLAGS||(D.LENIENT_FLAGS={}));var fe;(function(t){t[t.DELETE=0]="DELETE",t[t.GET=1]="GET",t[t.HEAD=2]="HEAD",t[t.POST=3]="POST",t[t.PUT=4]="PUT",t[t.CONNECT=5]="CONNECT",t[t.OPTIONS=6]="OPTIONS",t[t.TRACE=7]="TRACE",t[t.COPY=8]="COPY",t[t.LOCK=9]="LOCK",t[t.MKCOL=10]="MKCOL",t[t.MOVE=11]="MOVE",t[t.PROPFIND=12]="PROPFIND",t[t.PROPPATCH=13]="PROPPATCH",t[t.SEARCH=14]="SEARCH",t[t.UNLOCK=15]="UNLOCK",t[t.BIND=16]="BIND",t[t.REBIND=17]="REBIND",t[t.UNBIND=18]="UNBIND",t[t.ACL=19]="ACL",t[t.REPORT=20]="REPORT",t[t.MKACTIVITY=21]="MKACTIVITY",t[t.CHECKOUT=22]="CHECKOUT",t[t.MERGE=23]="MERGE",t[t["M-SEARCH"]=24]="M-SEARCH",t[t.NOTIFY=25]="NOTIFY",t[t.SUBSCRIBE=26]="SUBSCRIBE",t[t.UNSUBSCRIBE=27]="UNSUBSCRIBE",t[t.PATCH=28]="PATCH",t[t.PURGE=29]="PURGE",t[t.MKCALENDAR=30]="MKCALENDAR",t[t.LINK=31]="LINK",t[t.UNLINK=32]="UNLINK",t[t.SOURCE=33]="SOURCE",t[t.PRI=34]="PRI",t[t.DESCRIBE=35]="DESCRIBE",t[t.ANNOUNCE=36]="ANNOUNCE",t[t.SETUP=37]="SETUP",t[t.PLAY=38]="PLAY",t[t.PAUSE=39]="PAUSE",t[t.TEARDOWN=40]="TEARDOWN",t[t.GET_PARAMETER=41]="GET_PARAMETER",t[t.SET_PARAMETER=42]="SET_PARAMETER",t[t.REDIRECT=43]="REDIRECT",t[t.RECORD=44]="RECORD",t[t.FLUSH=45]="FLUSH"})(fe=D.METHODS||(D.METHODS={}));D.METHODS_HTTP=[fe.DELETE,fe.GET,fe.HEAD,fe.POST,fe.PUT,fe.CONNECT,fe.OPTIONS,fe.TRACE,fe.COPY,fe.LOCK,fe.MKCOL,fe.MOVE,fe.PROPFIND,fe.PROPPATCH,fe.SEARCH,fe.UNLOCK,fe.BIND,fe.REBIND,fe.UNBIND,fe.ACL,fe.REPORT,fe.MKACTIVITY,fe.CHECKOUT,fe.MERGE,fe["M-SEARCH"],fe.NOTIFY,fe.SUBSCRIBE,fe.UNSUBSCRIBE,fe.PATCH,fe.PURGE,fe.MKCALENDAR,fe.LINK,fe.UNLINK,fe.PRI,fe.SOURCE];D.METHODS_ICE=[fe.SOURCE];D.METHODS_RTSP=[fe.OPTIONS,fe.DESCRIBE,fe.ANNOUNCE,fe.SETUP,fe.PLAY,fe.PAUSE,fe.TEARDOWN,fe.GET_PARAMETER,fe.SET_PARAMETER,fe.REDIRECT,fe.RECORD,fe.FLUSH,fe.GET,fe.POST];D.METHOD_MAP=qHe.enumToMap(fe);D.H_METHOD_MAP={};Object.keys(D.METHOD_MAP).forEach(t=>{/^H/.test(t)&&(D.H_METHOD_MAP[t]=D.METHOD_MAP[t])});var VHe;(function(t){t[t.SAFE=0]="SAFE",t[t.SAFE_WITH_CB=1]="SAFE_WITH_CB",t[t.UNSAFE=2]="UNSAFE"})(VHe=D.FINISH||(D.FINISH={}));D.ALPHA=[];for(let t=65;t<=90;t++)D.ALPHA.push(String.fromCharCode(t)),D.ALPHA.push(String.fromCharCode(t+32));D.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};D.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};D.NUM=["0","1","2","3","4","5","6","7","8","9"];D.ALPHANUM=D.ALPHA.concat(D.NUM);D.MARK=["-","_",".","!","~","*","'","(",")"];D.USERINFO_CHARS=D.ALPHANUM.concat(D.MARK).concat(["%",";",":","&","=","+","$",","]);D.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(D.ALPHANUM);D.URL_CHAR=D.STRICT_URL_CHAR.concat([" ","\f"]);for(let t=128;t<=255;t++)D.URL_CHAR.push(t);D.HEX=D.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);D.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(D.ALPHANUM);D.TOKEN=D.STRICT_TOKEN.concat([" "]);D.HEADER_CHARS=[" "];for(let t=32;t<=255;t++)t!==127&&D.HEADER_CHARS.push(t);D.CONNECTION_TOKEN_CHARS=D.HEADER_CHARS.filter(t=>t!==44);D.MAJOR=D.NUM_MAP;D.MINOR=D.MAJOR;var zf;(function(t){t[t.GENERAL=0]="GENERAL",t[t.CONNECTION=1]="CONNECTION",t[t.CONTENT_LENGTH=2]="CONTENT_LENGTH",t[t.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",t[t.UPGRADE=4]="UPGRADE",t[t.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",t[t.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(zf=D.HEADER_STATE||(D.HEADER_STATE={}));D.SPECIAL_HEADERS={connection:zf.CONNECTION,"content-length":zf.CONTENT_LENGTH,"proxy-connection":zf.CONNECTION,"transfer-encoding":zf.TRANSFER_ENCODING,upgrade:zf.UPGRADE}});var lF=I((HHt,EX)=>{"use strict";var{Buffer:WHe}=require("node:buffer");EX.exports=WHe.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bG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iQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1e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0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2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gQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE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EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==","base64")});var Uy=I((zHt,TX)=>{"use strict";var wX=["GET","HEAD","POST"],JHe=new Set(wX),jHe=[101,204,205,304],SX=[301,302,303,307,308],KHe=new Set(SX),xX=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],XHe=new Set(xX),bX=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],ZHe=new Set(bX),e$e=["follow","manual","error"],BX=["GET","HEAD","OPTIONS","TRACE"],t$e=new Set(BX),r$e=["navigate","same-origin","no-cors","cors"],n$e=["omit","same-origin","include"],s$e=["default","no-store","reload","no-cache","force-cache","only-if-cached"],o$e=["content-encoding","content-language","content-location","content-type","content-length"],i$e=["half"],RX=["CONNECT","TRACE","TRACK"],a$e=new Set(RX),NX=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],c$e=new Set(NX);TX.exports={subresource:NX,forbiddenMethods:RX,requestBodyHeader:o$e,referrerPolicy:bX,requestRedirect:e$e,requestMode:r$e,requestCredentials:n$e,requestCache:s$e,redirectStatus:SX,corsSafeListedMethods:wX,nullBodyStatus:jHe,safeMethods:BX,badPorts:xX,requestDuplex:i$e,subresourceSet:c$e,badPortsSet:XHe,redirectStatusSet:KHe,corsSafeListedMethodsSet:JHe,safeMethodsSet:t$e,forbiddenMethodsSet:a$e,referrerPolicySet:ZHe}});var dF=I((VHt,vX)=>{"use strict";var uF=Symbol.for("undici.globalOrigin.1");function l$e(){return globalThis[uF]}i(l$e,"getGlobalOrigin");function u$e(t){if(t===void 0){Object.defineProperty(globalThis,uF,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${e.protocol}`);Object.defineProperty(globalThis,uF,{value:e,writable:!0,enumerable:!1,configurable:!1})}i(u$e,"setGlobalOrigin");vX.exports={getGlobalOrigin:l$e,setGlobalOrigin:u$e}});var ms=I((YHt,OX)=>{"use strict";var eb=require("node:assert"),d$e=new TextEncoder,qy=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,p$e=/[\u000A\u000D\u0009\u0020]/,m$e=/[\u0009\u000A\u000C\u000D\u0020]/g,f$e=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function A$e(t){eb(t.protocol==="data:");let e=_X(t,!0);e=e.slice(5);let r={position:0},n=Vf(",",e,r),s=n.length;if(n=I$e(n,!0,!0),r.position>=e.length)return"failure";r.position++;let o=e.slice(s+1),a=DX(o);if(/;(\u0020){0,}base64$/i.test(n)){let l=LX(a);if(a=g$e(l),a==="failure")return"failure";n=n.slice(0,-6),n=n.replace(/(\u0020)+$/,""),n=n.slice(0,-1)}n.startsWith(";")&&(n="text/plain"+n);let c=pF(n);return c==="failure"&&(c=pF("text/plain;charset=US-ASCII")),{mimeType:c,body:a}}i(A$e,"dataURLProcessor");function _X(t,e=!1){if(!e)return t.href;let r=t.href,n=t.hash.length,s=n===0?r:r.substring(0,r.length-n);return!n&&r.endsWith("#")?s.slice(0,-1):s}i(_X,"URLSerializer");function tb(t,e,r){let n="";for(;r.position=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}i(PX,"isHexCharByte");function QX(t){return t>=48&&t<=57?t-48:(t&223)-55}i(QX,"hexByteToNumber");function h$e(t){let e=t.length,r=new Uint8Array(e),n=0;for(let s=0;st.length)return"failure";e.position++;let n=Vf(";",t,e);if(n=Zx(n,!1,!0),n.length===0||!qy.test(n))return"failure";let s=r.toLowerCase(),o=n.toLowerCase(),a={type:s,subtype:o,parameters:new Map,essence:`${s}/${o}`};for(;e.positionp$e.test(u),t,e);let c=tb(u=>u!==";"&&u!=="=",t,e);if(c=c.toLowerCase(),e.positiont.length)break;let l=null;if(t[e.position]==='"')l=kX(t,e,!0),Vf(";",t,e);else if(l=Vf(";",t,e),l=Zx(l,!1,!0),l.length===0)continue;c.length!==0&&qy.test(c)&&(l.length===0||f$e.test(l))&&!a.parameters.has(c)&&a.parameters.set(c,l)}return a}i(pF,"parseMIMEType");function g$e(t){t=t.replace(m$e,"");let e=t.length;if(e%4===0&&t.charCodeAt(e-1)===61&&(--e,t.charCodeAt(e-1)===61&&--e),e%4===1||/[^+/0-9A-Za-z]/.test(t.length===e?t:t.substring(0,e)))return"failure";let r=Buffer.from(t,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}i(g$e,"forgivingBase64");function kX(t,e,r){let n=e.position,s="";for(eb(t[e.position]==='"'),e.position++;s+=tb(a=>a!=='"'&&a!=="\\",t,e),!(e.position>=t.length);){let o=t[e.position];if(e.position++,o==="\\"){if(e.position>=t.length){s+="\\";break}s+=t[e.position],e.position++}else{eb(o==='"');break}}return r?s:t.slice(n,e.position)}i(kX,"collectAnHTTPQuotedString");function y$e(t){eb(t!=="failure");let{parameters:e,essence:r}=t,n=r;for(let[s,o]of e.entries())n+=";",n+=s,n+="=",qy.test(o)||(o=o.replace(/(\\|")/g,"\\$1"),o='"'+o,o+='"'),n+=o;return n}i(y$e,"serializeAMimeType");function E$e(t){return t===13||t===10||t===9||t===32}i(E$e,"isHTTPWhiteSpace");function Zx(t,e=!0,r=!0){return mF(t,e,r,E$e)}i(Zx,"removeHTTPWhitespace");function C$e(t){return t===13||t===10||t===9||t===12||t===32}i(C$e,"isASCIIWhitespace");function I$e(t,e=!0,r=!0){return mF(t,e,r,C$e)}i(I$e,"removeASCIIWhitespace");function mF(t,e,r,n){let s=0,o=t.length-1;if(e)for(;s0&&n(t.charCodeAt(o));)o--;return s===0&&o===t.length-1?t:t.slice(s,o+1)}i(mF,"removeChars");function LX(t){let e=t.length;if(65535>e)return String.fromCharCode.apply(null,t);let r="",n=0,s=65535;for(;ne&&(s=e-n),r+=String.fromCharCode.apply(null,t.subarray(n,n+=s));return r}i(LX,"isomorphicDecode");function w$e(t){switch(t.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return t.subtype.endsWith("+json")?"application/json":t.subtype.endsWith("+xml")?"application/xml":""}i(w$e,"minimizeSupportedMimeType");OX.exports={dataURLProcessor:A$e,URLSerializer:_X,collectASequenceOfCodePoints:tb,collectASequenceOfCodePointsFast:Vf,stringPercentDecode:DX,parseMIMEType:pF,collectAnHTTPQuotedString:kX,serializeAMimeType:y$e,removeChars:mF,removeHTTPWhitespace:Zx,minimizeSupportedMimeType:w$e,HTTP_TOKEN_CODEPOINTS:qy,isomorphicDecode:LX}});var sn=I((jHt,MX)=>{"use strict";var{types:xa,inspect:S$e}=require("node:util"),{markAsUncloneable:x$e}=require("node:worker_threads"),{toUSVString:b$e}=He(),Q={};Q.converters={};Q.util={};Q.errors={};Q.errors.exception=function(t){return new TypeError(`${t.header}: ${t.message}`)};Q.errors.conversionFailed=function(t){let e=t.types.length===1?"":" one of",r=`${t.argument} could not be converted to${e}: ${t.types.join(", ")}.`;return Q.errors.exception({header:t.prefix,message:r})};Q.errors.invalidArgument=function(t){return Q.errors.exception({header:t.prefix,message:`"${t.value}" is an invalid ${t.type}.`})};Q.brandCheck=function(t,e,r){if(r?.strict!==!1){if(!(t instanceof e)){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}}else if(t?.[Symbol.toStringTag]!==e.prototype[Symbol.toStringTag]){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}};Q.argumentLengthCheck=function({length:t},e,r){if(t{});Q.util.ConvertToInt=function(t,e,r,n){let s,o;e===64?(s=Math.pow(2,53)-1,r==="unsigned"?o=0:o=Math.pow(-2,53)+1):r==="unsigned"?(o=0,s=Math.pow(2,e)-1):(o=Math.pow(-2,e)-1,s=Math.pow(2,e-1)-1);let a=Number(t);if(a===0&&(a=0),n?.enforceRange===!0){if(Number.isNaN(a)||a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY)throw Q.errors.exception({header:"Integer conversion",message:`Could not convert ${Q.util.Stringify(t)} to an integer.`});if(a=Q.util.IntegerPart(a),as)throw Q.errors.exception({header:"Integer conversion",message:`Value must be between ${o}-${s}, got ${a}.`});return a}return!Number.isNaN(a)&&n?.clamp===!0?(a=Math.min(Math.max(a,o),s),Math.floor(a)%2===0?a=Math.floor(a):a=Math.ceil(a),a):Number.isNaN(a)||a===0&&Object.is(0,a)||a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY?0:(a=Q.util.IntegerPart(a),a=a%Math.pow(2,e),r==="signed"&&a>=Math.pow(2,e)-1?a-Math.pow(2,e):a)};Q.util.IntegerPart=function(t){let e=Math.floor(Math.abs(t));return t<0?-1*e:e};Q.util.Stringify=function(t){switch(Q.util.Type(t)){case"Symbol":return`Symbol(${t.description})`;case"Object":return S$e(t);case"String":return`"${t}"`;default:return`${t}`}};Q.sequenceConverter=function(t){return(e,r,n,s)=>{if(Q.util.Type(e)!=="Object")throw Q.errors.exception({header:r,message:`${n} (${Q.util.Stringify(e)}) is not iterable.`});let o=typeof s=="function"?s():e?.[Symbol.iterator]?.(),a=[],c=0;if(o===void 0||typeof o.next!="function")throw Q.errors.exception({header:r,message:`${n} is not iterable.`});for(;;){let{done:l,value:u}=o.next();if(l)break;a.push(t(u,r,`${n}[${c++}]`))}return a}};Q.recordConverter=function(t,e){return(r,n,s)=>{if(Q.util.Type(r)!=="Object")throw Q.errors.exception({header:n,message:`${s} ("${Q.util.Type(r)}") is not an Object.`});let o={};if(!xa.isProxy(r)){let c=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let l of c){let u=t(l,n,s),d=e(r[l],n,s);o[u]=d}return o}let a=Reflect.ownKeys(r);for(let c of a)if(Reflect.getOwnPropertyDescriptor(r,c)?.enumerable){let u=t(c,n,s),d=e(r[c],n,s);o[u]=d}return o}};Q.interfaceConverter=function(t){return(e,r,n,s)=>{if(s?.strict!==!1&&!(e instanceof t))throw Q.errors.exception({header:r,message:`Expected ${n} ("${Q.util.Stringify(e)}") to be an instance of ${t.name}.`});return e}};Q.dictionaryConverter=function(t){return(e,r,n)=>{let s=Q.util.Type(e),o={};if(s==="Null"||s==="Undefined")return o;if(s!=="Object")throw Q.errors.exception({header:r,message:`Expected ${e} to be one of: Null, Undefined, Object.`});for(let a of t){let{key:c,defaultValue:l,required:u,converter:d}=a;if(u===!0&&!Object.hasOwn(e,c))throw Q.errors.exception({header:r,message:`Missing required key "${c}".`});let p=e[c],m=Object.hasOwn(a,"defaultValue");if(m&&p!==null&&(p??=l()),u||m||p!==void 0){if(p=d(p,r,`${n}.${c}`),a.allowedValues&&!a.allowedValues.includes(p))throw Q.errors.exception({header:r,message:`${p} is not an accepted type. Expected one of ${a.allowedValues.join(", ")}.`});o[c]=p}}return o}};Q.nullableConverter=function(t){return(e,r,n)=>e===null?e:t(e,r,n)};Q.converters.DOMString=function(t,e,r,n){if(t===null&&n?.legacyNullToEmptyString)return"";if(typeof t=="symbol")throw Q.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a DOMString.`});return String(t)};Q.converters.ByteString=function(t,e,r){let n=Q.converters.DOMString(t,e,r);for(let s=0;s255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${s} has a value of ${n.charCodeAt(s)} which is greater than 255.`);return n};Q.converters.USVString=b$e;Q.converters.boolean=function(t){return!!t};Q.converters.any=function(t){return t};Q.converters["long long"]=function(t,e,r){return Q.util.ConvertToInt(t,64,"signed",void 0,e,r)};Q.converters["unsigned long long"]=function(t,e,r){return Q.util.ConvertToInt(t,64,"unsigned",void 0,e,r)};Q.converters["unsigned long"]=function(t,e,r){return Q.util.ConvertToInt(t,32,"unsigned",void 0,e,r)};Q.converters["unsigned short"]=function(t,e,r,n){return Q.util.ConvertToInt(t,16,"unsigned",n,e,r)};Q.converters.ArrayBuffer=function(t,e,r,n){if(Q.util.Type(t)!=="Object"||!xa.isAnyArrayBuffer(t))throw Q.errors.conversionFailed({prefix:e,argument:`${r} ("${Q.util.Stringify(t)}")`,types:["ArrayBuffer"]});if(n?.allowShared===!1&&xa.isSharedArrayBuffer(t))throw Q.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.resizable||t.growable)throw Q.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};Q.converters.TypedArray=function(t,e,r,n,s){if(Q.util.Type(t)!=="Object"||!xa.isTypedArray(t)||t.constructor.name!==e.name)throw Q.errors.conversionFailed({prefix:r,argument:`${n} ("${Q.util.Stringify(t)}")`,types:[e.name]});if(s?.allowShared===!1&&xa.isSharedArrayBuffer(t.buffer))throw Q.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw Q.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};Q.converters.DataView=function(t,e,r,n){if(Q.util.Type(t)!=="Object"||!xa.isDataView(t))throw Q.errors.exception({header:e,message:`${r} is not a DataView.`});if(n?.allowShared===!1&&xa.isSharedArrayBuffer(t.buffer))throw Q.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw Q.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};Q.converters.BufferSource=function(t,e,r,n){if(xa.isAnyArrayBuffer(t))return Q.converters.ArrayBuffer(t,e,r,{...n,allowShared:!1});if(xa.isTypedArray(t))return Q.converters.TypedArray(t,t.constructor,e,r,{...n,allowShared:!1});if(xa.isDataView(t))return Q.converters.DataView(t,e,r,{...n,allowShared:!1});throw Q.errors.conversionFailed({prefix:e,argument:`${r} ("${Q.util.Stringify(t)}")`,types:["BufferSource"]})};Q.converters["sequence"]=Q.sequenceConverter(Q.converters.ByteString);Q.converters["sequence>"]=Q.sequenceConverter(Q.converters["sequence"]);Q.converters["record"]=Q.recordConverter(Q.converters.ByteString,Q.converters.ByteString);MX.exports={webidl:Q}});var zs=I((KHt,XX)=>{"use strict";var{Transform:B$e}=require("node:stream"),FX=require("node:zlib"),{redirectStatusSet:R$e,referrerPolicySet:N$e,badPortsSet:T$e}=Uy(),{getGlobalOrigin:UX}=dF(),{collectASequenceOfCodePoints:hp,collectAnHTTPQuotedString:v$e,removeChars:P$e,parseMIMEType:Q$e}=ms(),{performance:_$e}=require("node:perf_hooks"),{isBlobLike:D$e,ReadableStreamFrom:k$e,isValidHTTPToken:qX,normalizedMethodRecordsBase:L$e}=He(),gp=require("node:assert"),{isUint8Array:O$e}=require("node:util/types"),{webidl:Gy}=sn(),GX=[],nb;try{nb=require("node:crypto");let t=["sha256","sha384","sha512"];GX=nb.getHashes().filter(e=>t.includes(e))}catch{}function HX(t){let e=t.urlList,r=e.length;return r===0?null:e[r-1].toString()}i(HX,"responseURL");function M$e(t,e){if(!R$e.has(t.status))return null;let r=t.headersList.get("location",!0);return r!==null&&zX(r)&&($X(r)||(r=F$e(r)),r=new URL(r,HX(t))),r&&!r.hash&&(r.hash=e),r}i(M$e,"responseLocationURL");function $X(t){for(let e=0;e126||r<32)return!1}return!0}i($X,"isValidEncodedURL");function F$e(t){return Buffer.from(t,"binary").toString("utf8")}i(F$e,"normalizeBinaryStringToUtf8");function $y(t){return t.urlList[t.urlList.length-1]}i($y,"requestCurrentURL");function U$e(t){let e=$y(t);return jX(e)&&T$e.has(e.port)?"blocked":"allowed"}i(U$e,"requestBadPort");function q$e(t){return t instanceof Error||t?.constructor?.name==="Error"||t?.constructor?.name==="DOMException"}i(q$e,"isErrorLike");function G$e(t){for(let e=0;e=32&&r<=126||r>=128&&r<=255))return!1}return!0}i(G$e,"isValidReasonPhrase");var H$e=qX;function zX(t){return(t[0]===" "||t[0]===" "||t[t.length-1]===" "||t[t.length-1]===" "||t.includes(` -`)||t.includes("\r")||t.includes("\0"))===!1}i(zX,"isValidHeaderValue");function $$e(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let o=n.length;o!==0;o--){let a=n[o-1].trim();if(N$e.has(a)){s=a;break}}s!==""&&(t.referrerPolicy=s)}i($$e,"setRequestReferrerPolicyOnRedirect");function z$e(){return"allowed"}i(z$e,"crossOriginResourcePolicyCheck");function V$e(){return"success"}i(V$e,"corsCheck");function W$e(){return"success"}i(W$e,"TAOCheck");function Y$e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}i(Y$e,"appendFetchMetadata");function J$e(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&AF(t.origin)&&!AF($y(t))&&(e=null);break;case"same-origin":sb(t,$y(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}i(J$e,"appendRequestOriginHeader");function Wf(t,e){return t}i(Wf,"coarsenTime");function j$e(t,e,r){return!t?.startTime||t.startTime4096&&(n=s);let o=sb(t,n),a=Hy(n)&&!Hy(t.url);switch(e){case"origin":return s??fF(r,!0);case"unsafe-url":return n;case"same-origin":return o?s:"no-referrer";case"origin-when-cross-origin":return o?n:s;case"strict-origin-when-cross-origin":{let c=$y(t);return sb(n,c)?n:Hy(n)&&!Hy(c)?"no-referrer":s}default:return a?"no-referrer":s}}i(eze,"determineRequestsReferrer");function fF(t,e){return gp(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}i(fF,"stripURLForReferrer");function Hy(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}i(Hy,"isURLPotentiallyTrustworthy");function tze(t,e){if(nb===void 0)return!0;let r=WX(e);if(r==="no metadata"||r.length===0)return!0;let n=nze(r),s=sze(r,n);for(let o of s){let a=o.algo,c=o.hash,l=nb.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),oze(l,c))return!0}return!1}i(tze,"bytesMatch");var rze=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function WX(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=rze.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let o=s.groups.algo.toLowerCase();GX.includes(o)&&e.push(s.groups)}return r===!0?"no metadata":e}i(WX,"parseMetadata");function nze(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r{t=n,e=s}),resolve:t,reject:e}}i(aze,"createDeferredPromise");function cze(t){return t.controller.state==="aborted"}i(cze,"isAborted");function lze(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}i(lze,"isCancelled");function uze(t){return L$e[t.toLowerCase()]??t}i(uze,"normalizeMethod");function dze(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return gp(typeof e=="string"),e}i(dze,"serializeJavascriptValueToJSONString");var pze=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function YX(t,e,r=0,n=1){class s{static{i(this,"FastIterableIterator")}#e;#t;#r;constructor(a,c){this.#e=a,this.#t=c,this.#r=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let a=this.#r,c=this.#e[e],l=c.length;if(a>=l)return{value:void 0,done:!0};let{[r]:u,[n]:d}=c[a];this.#r=a+1;let p;switch(this.#t){case"key":p=u;break;case"value":p=d;break;case"key+value":p=[u,d];break}return{value:p,done:!1}}}return delete s.prototype.constructor,Object.setPrototypeOf(s.prototype,pze),Object.defineProperties(s.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(o,a){return new s(o,a)}}i(YX,"createIterator");function mze(t,e,r,n=0,s=1){let o=YX(t,r,n,s),a={keys:{writable:!0,enumerable:!0,configurable:!0,value:i(function(){return Gy.brandCheck(this,e),o(this,"key")},"keys")},values:{writable:!0,enumerable:!0,configurable:!0,value:i(function(){return Gy.brandCheck(this,e),o(this,"value")},"values")},entries:{writable:!0,enumerable:!0,configurable:!0,value:i(function(){return Gy.brandCheck(this,e),o(this,"key+value")},"entries")},forEach:{writable:!0,enumerable:!0,configurable:!0,value:i(function(l,u=globalThis){if(Gy.brandCheck(this,e),Gy.argumentLengthCheck(arguments,1,`${t}.forEach`),typeof l!="function")throw new TypeError(`Failed to execute 'forEach' on '${t}': parameter 1 is not of type 'Function'.`);for(let{0:d,1:p}of o(this,"key+value"))l.call(u,p,d,this)},"forEach")}};return Object.defineProperties(e.prototype,{...a,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:a.entries.value}})}i(mze,"iteratorMixin");async function fze(t,e,r){let n=e,s=r,o;try{o=t.stream.getReader()}catch(a){s(a);return}try{n(await JX(o))}catch(a){s(a)}}i(fze,"fullyReadBody");function Aze(t){return t instanceof ReadableStream||t[Symbol.toStringTag]==="ReadableStream"&&typeof t.tee=="function"}i(Aze,"isReadableStreamLike");function hze(t){try{t.close(),t.byobRequest?.respond(0)}catch(e){if(!e.message.includes("Controller is already closed")&&!e.message.includes("ReadableStream is already closed"))throw e}}i(hze,"readableStreamClose");var gze=/[^\x00-\xFF]/;function rb(t){return gp(!gze.test(t)),t}i(rb,"isomorphicEncode");async function JX(t){let e=[],r=0;for(;;){let{done:n,value:s}=await t.read();if(n)return Buffer.concat(e,r);if(!O$e(s))throw new TypeError("Received non-Uint8Array chunk");e.push(s),r+=s.length}}i(JX,"readAllBytes");function yze(t){gp("protocol"in t);let e=t.protocol;return e==="about:"||e==="blob:"||e==="data:"}i(yze,"urlIsLocal");function AF(t){return typeof t=="string"&&t[5]===":"&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&t[4]==="s"||t.protocol==="https:"}i(AF,"urlHasHttpsScheme");function jX(t){gp("protocol"in t);let e=t.protocol;return e==="http:"||e==="https:"}i(jX,"urlIsHttpHttpsScheme");function Eze(t,e){let r=t;if(!r.startsWith("bytes"))return"failure";let n={position:5};if(e&&hp(l=>l===" "||l===" ",r,n),r.charCodeAt(n.position)!==61)return"failure";n.position++,e&&hp(l=>l===" "||l===" ",r,n);let s=hp(l=>{let u=l.charCodeAt(0);return u>=48&&u<=57},r,n),o=s.length?Number(s):null;if(e&&hp(l=>l===" "||l===" ",r,n),r.charCodeAt(n.position)!==45)return"failure";n.position++,e&&hp(l=>l===" "||l===" ",r,n);let a=hp(l=>{let u=l.charCodeAt(0);return u>=48&&u<=57},r,n),c=a.length?Number(a):null;return n.positionc?"failure":{rangeStartValue:o,rangeEndValue:c}}i(Eze,"simpleRangeHeaderValue");function Cze(t,e,r){let n="bytes ";return n+=rb(`${t}`),n+="-",n+=rb(`${e}`),n+="/",n+=rb(`${r}`),n}i(Cze,"buildContentRange");var hF=class extends B$e{static{i(this,"InflateStream")}#e;constructor(e){super(),this.#e=e}_transform(e,r,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)===8?FX.createInflate(this.#e):FX.createInflateRaw(this.#e),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",s=>this.destroy(s))}this._inflateStream.write(e,r,n)}_final(e){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),e()}};function Ize(t){return new hF(t)}i(Ize,"createInflate");function wze(t){let e=null,r=null,n=null,s=KX("content-type",t);if(s===null)return"failure";for(let o of s){let a=Q$e(o);a==="failure"||a.essence==="*/*"||(n=a,n.essence!==r?(e=null,n.parameters.has("charset")&&(e=n.parameters.get("charset")),r=n.essence):!n.parameters.has("charset")&&e!==null&&n.parameters.set("charset",e))}return n??"failure"}i(wze,"extractMimeType");function Sze(t){let e=t,r={position:0},n=[],s="";for(;r.positiono!=='"'&&o!==",",e,r),r.positiono===9||o===32),n.push(s),s=""}return n}i(Sze,"gettingDecodingSplitting");function KX(t,e){let r=e.get(t,!0);return r===null?null:Sze(r)}i(KX,"getDecodeSplit");var xze=new TextDecoder;function bze(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),xze.decode(t))}i(bze,"utf8DecodeBytes");var gF=class{static{i(this,"EnvironmentSettingsObjectBase")}get baseUrl(){return UX()}get origin(){return this.baseUrl?.origin}policyContainer=VX()},yF=class{static{i(this,"EnvironmentSettingsObject")}settingsObject=new gF},Bze=new yF;XX.exports={isAborted:cze,isCancelled:lze,isValidEncodedURL:$X,createDeferredPromise:aze,ReadableStreamFrom:k$e,tryUpgradeRequestToAPotentiallyTrustworthyURL:ize,clampAndCoarsenConnectionTimingInfo:j$e,coarsenedSharedCurrentTime:K$e,determineRequestsReferrer:eze,makePolicyContainer:VX,clonePolicyContainer:Z$e,appendFetchMetadata:Y$e,appendRequestOriginHeader:J$e,TAOCheck:W$e,corsCheck:V$e,crossOriginResourcePolicyCheck:z$e,createOpaqueTimingInfo:X$e,setRequestReferrerPolicyOnRedirect:$$e,isValidHTTPToken:qX,requestBadPort:U$e,requestCurrentURL:$y,responseURL:HX,responseLocationURL:M$e,isBlobLike:D$e,isURLPotentiallyTrustworthy:Hy,isValidReasonPhrase:G$e,sameOrigin:sb,normalizeMethod:uze,serializeJavascriptValueToJSONString:dze,iteratorMixin:mze,createIterator:YX,isValidHeaderName:H$e,isValidHeaderValue:zX,isErrorLike:q$e,fullyReadBody:fze,bytesMatch:tze,isReadableStreamLike:Aze,readableStreamClose:hze,isomorphicEncode:rb,urlIsLocal:yze,urlHasHttpsScheme:AF,urlIsHttpHttpsScheme:jX,readAllBytes:JX,simpleRangeHeaderValue:Eze,buildContentRange:Cze,parseMetadata:WX,createInflate:Ize,extractMimeType:wze,getDecodeSplit:KX,utf8DecodeBytes:bze,environmentSettingsObject:Bze}});var Eu=I((ZHt,ZX)=>{"use strict";ZX.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kDispatcher:Symbol("dispatcher")}});var CF=I((e$t,e7)=>{"use strict";var{Blob:Rze,File:Nze}=require("node:buffer"),{kState:Al}=Eu(),{webidl:ba}=sn(),EF=class t{static{i(this,"FileLike")}constructor(e,r,n={}){let s=r,o=n.type,a=n.lastModified??Date.now();this[Al]={blobLike:e,name:s,type:o,lastModified:a}}stream(...e){return ba.brandCheck(this,t),this[Al].blobLike.stream(...e)}arrayBuffer(...e){return ba.brandCheck(this,t),this[Al].blobLike.arrayBuffer(...e)}slice(...e){return ba.brandCheck(this,t),this[Al].blobLike.slice(...e)}text(...e){return ba.brandCheck(this,t),this[Al].blobLike.text(...e)}get size(){return ba.brandCheck(this,t),this[Al].blobLike.size}get type(){return ba.brandCheck(this,t),this[Al].blobLike.type}get name(){return ba.brandCheck(this,t),this[Al].name}get lastModified(){return ba.brandCheck(this,t),this[Al].lastModified}get[Symbol.toStringTag](){return"File"}};ba.converters.Blob=ba.interfaceConverter(Rze);function Tze(t){return t instanceof Nze||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}i(Tze,"isFileLike");e7.exports={FileLike:EF,isFileLike:Tze}});var Vy=I((r$t,o7)=>{"use strict";var{isBlobLike:ob,iteratorMixin:vze}=zs(),{kState:Fn}=Eu(),{kEnumerableProperty:Yf}=He(),{FileLike:t7,isFileLike:Pze}=CF(),{webidl:xt}=sn(),{File:s7}=require("node:buffer"),r7=require("node:util"),n7=globalThis.File??s7,zy=class t{static{i(this,"FormData")}constructor(e){if(xt.util.markAsUncloneable(this),e!==void 0)throw xt.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Fn]=[]}append(e,r,n=void 0){xt.brandCheck(this,t);let s="FormData.append";if(xt.argumentLengthCheck(arguments,2,s),arguments.length===3&&!ob(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=xt.converters.USVString(e,s,"name"),r=ob(r)?xt.converters.Blob(r,s,"value",{strict:!1}):xt.converters.USVString(r,s,"value"),n=arguments.length===3?xt.converters.USVString(n,s,"filename"):void 0;let o=IF(e,r,n);this[Fn].push(o)}delete(e){xt.brandCheck(this,t);let r="FormData.delete";xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name"),this[Fn]=this[Fn].filter(n=>n.name!==e)}get(e){xt.brandCheck(this,t);let r="FormData.get";xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name");let n=this[Fn].findIndex(s=>s.name===e);return n===-1?null:this[Fn][n].value}getAll(e){xt.brandCheck(this,t);let r="FormData.getAll";return xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name"),this[Fn].filter(n=>n.name===e).map(n=>n.value)}has(e){xt.brandCheck(this,t);let r="FormData.has";return xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name"),this[Fn].findIndex(n=>n.name===e)!==-1}set(e,r,n=void 0){xt.brandCheck(this,t);let s="FormData.set";if(xt.argumentLengthCheck(arguments,2,s),arguments.length===3&&!ob(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=xt.converters.USVString(e,s,"name"),r=ob(r)?xt.converters.Blob(r,s,"name",{strict:!1}):xt.converters.USVString(r,s,"name"),n=arguments.length===3?xt.converters.USVString(n,s,"name"):void 0;let o=IF(e,r,n),a=this[Fn].findIndex(c=>c.name===e);a!==-1?this[Fn]=[...this[Fn].slice(0,a),o,...this[Fn].slice(a+1).filter(c=>c.name!==e)]:this[Fn].push(o)}[r7.inspect.custom](e,r){let n=this[Fn].reduce((o,a)=>(o[a.name]?Array.isArray(o[a.name])?o[a.name].push(a.value):o[a.name]=[o[a.name],a.value]:o[a.name]=a.value,o),{__proto__:null});r.depth??=e,r.colors??=!0;let s=r7.formatWithOptions(r,n);return`FormData ${s.slice(s.indexOf("]")+2)}`}};vze("FormData",zy,Fn,"name","value");Object.defineProperties(zy.prototype,{append:Yf,delete:Yf,get:Yf,getAll:Yf,has:Yf,set:Yf,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function IF(t,e,r){if(typeof e!="string"){if(Pze(e)||(e=e instanceof Blob?new n7([e],"blob",{type:e.type}):new t7(e,"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=e instanceof s7?new n7([e],r,n):new t7(e,r,n)}}return{name:t,value:e}}i(IF,"makeEntry");o7.exports={FormData:zy,makeEntry:IF}});var d7=I((s$t,u7)=>{"use strict";var{isUSVString:i7,bufferToLowerCasedHeaderName:Qze}=He(),{utf8DecodeBytes:_ze}=zs(),{HTTP_TOKEN_CODEPOINTS:Dze,isomorphicDecode:a7}=ms(),{isFileLike:kze}=CF(),{makeEntry:Lze}=Vy(),ib=require("node:assert"),{File:Oze}=require("node:buffer"),Mze=globalThis.File??Oze,Fze=Buffer.from('form-data; name="'),c7=Buffer.from("; filename"),Uze=Buffer.from("--"),qze=Buffer.from(`--\r +var pGe=Object.create;var ky=Object.defineProperty;var mGe=Object.getOwnPropertyDescriptor;var fGe=Object.getOwnPropertyNames;var AGe=Object.getPrototypeOf,hGe=Object.prototype.hasOwnProperty;var i=(t,e)=>ky(t,"name",{value:e,configurable:!0});var g=(t,e)=>()=>(t&&(e=t(t=0)),e);var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Dr=(t,e)=>{for(var r in e)ky(t,r,{get:e[r],enumerable:!0})},j9=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fGe(e))!hGe.call(t,s)&&s!==r&&ky(t,s,{get:()=>e[s],enumerable:!(n=mGe(e,s))||n.enumerable});return t};var R=(t,e,r)=>(r=t!=null?pGe(AGe(t)):{},j9(e||!t||!t.__esModule?ky(r,"default",{value:t,enumerable:!0}):r,t)),ee=t=>j9(ky({},"__esModule",{value:!0}),t);var oK=I(Lf=>{"use strict";var mHt=require("net"),wGe=require("tls"),gM=require("http"),rK=require("https"),SGe=require("events"),fHt=require("assert"),xGe=require("util");Lf.httpOverHttp=bGe;Lf.httpsOverHttp=BGe;Lf.httpOverHttps=RGe;Lf.httpsOverHttps=NGe;function bGe(t){var e=new ul(t);return e.request=gM.request,e}i(bGe,"httpOverHttp");function BGe(t){var e=new ul(t);return e.request=gM.request,e.createSocket=nK,e.defaultPort=443,e}i(BGe,"httpsOverHttp");function RGe(t){var e=new ul(t);return e.request=rK.request,e}i(RGe,"httpOverHttps");function NGe(t){var e=new ul(t);return e.request=rK.request,e.createSocket=nK,e.defaultPort=443,e}i(NGe,"httpsOverHttps");function ul(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||gM.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",i(function(n,s,o,a){for(var c=sK(s,o,a),l=0,u=e.requests.length;l=this.maxSockets){o.requests.push(a);return}o.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);function l(){o.emit("free",c,a)}i(l,"onFree");function u(d){o.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}i(u,"onCloseOrRemove")})},"addRequest");ul.prototype.createSocket=i(function(e,r){var n=this,s={};n.sockets.push(s);var o=yM({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),yu("making CONNECT request");var a=n.request(o);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",d),a.end();function c(p){p.upgrade=!0}i(c,"onResponse");function l(p,m,f){process.nextTick(function(){u(p,m,f)})}i(l,"onUpgrade");function u(p,m,f){if(a.removeAllListeners(),m.removeAllListeners(),p.statusCode!==200){yu("tunneling socket could not be established, statusCode=%d",p.statusCode),m.destroy();var A=new Error("tunneling socket could not be established, statusCode="+p.statusCode);A.code="ECONNRESET",e.request.emit("error",A),n.removeSocket(s);return}if(f.length>0){yu("got illegal response body from proxy"),m.destroy();var A=new Error("got illegal response body from proxy");A.code="ECONNRESET",e.request.emit("error",A),n.removeSocket(s);return}return yu("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=m,r(m)}i(u,"onConnect");function d(p){a.removeAllListeners(),yu(`tunneling socket could not be established, cause=%s +`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),n.removeSocket(s)}i(d,"onError")},"createSocket");ul.prototype.removeSocket=i(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(s){n.request.onSocket(s)})}},"removeSocket");function nK(t,e){var r=this;ul.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),o=yM({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),a=wGe.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}i(nK,"createSecureSocket");function sK(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}i(sK,"toOptions");function yM(t){for(var e=1,r=arguments.length;e{iK.exports=oK()});var Lt=I((yHt,aK)=>{aK.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var rt=I((EHt,QK)=>{"use strict";var cK=Symbol.for("undici.error.UND_ERR"),Ot=class extends Error{static{i(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[cK]===!0}[cK]=!0},lK=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),EM=class extends Ot{static{i(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[lK]===!0}[lK]=!0},uK=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),CM=class extends Ot{static{i(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[uK]===!0}[uK]=!0},dK=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),IM=class extends Ot{static{i(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[dK]===!0}[dK]=!0},pK=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),wM=class extends Ot{static{i(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[pK]===!0}[pK]=!0},mK=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),SM=class extends Ot{static{i(this,"ResponseStatusCodeError")}constructor(e,r,n,s){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=s,this.status=r,this.statusCode=r,this.headers=n}static[Symbol.hasInstance](e){return e&&e[mK]===!0}[mK]=!0},fK=Symbol.for("undici.error.UND_ERR_INVALID_ARG"),xM=class extends Ot{static{i(this,"InvalidArgumentError")}constructor(e){super(e),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}static[Symbol.hasInstance](e){return e&&e[fK]===!0}[fK]=!0},AK=Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"),bM=class extends Ot{static{i(this,"InvalidReturnValueError")}constructor(e){super(e),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}static[Symbol.hasInstance](e){return e&&e[AK]===!0}[AK]=!0},hK=Symbol.for("undici.error.UND_ERR_ABORT"),Mx=class extends Ot{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError",this.message=e||"The operation was aborted",this.code="UND_ERR_ABORT"}static[Symbol.hasInstance](e){return e&&e[hK]===!0}[hK]=!0},gK=Symbol.for("undici.error.UND_ERR_ABORTED"),BM=class extends Mx{static{i(this,"RequestAbortedError")}constructor(e){super(e),this.name="AbortError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}static[Symbol.hasInstance](e){return e&&e[gK]===!0}[gK]=!0},yK=Symbol.for("undici.error.UND_ERR_INFO"),RM=class extends Ot{static{i(this,"InformationalError")}constructor(e){super(e),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}static[Symbol.hasInstance](e){return e&&e[yK]===!0}[yK]=!0},EK=Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"),NM=class extends Ot{static{i(this,"RequestContentLengthMismatchError")}constructor(e){super(e),this.name="RequestContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[EK]===!0}[EK]=!0},CK=Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"),TM=class extends Ot{static{i(this,"ResponseContentLengthMismatchError")}constructor(e){super(e),this.name="ResponseContentLengthMismatchError",this.message=e||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&e[CK]===!0}[CK]=!0},IK=Symbol.for("undici.error.UND_ERR_DESTROYED"),vM=class extends Ot{static{i(this,"ClientDestroyedError")}constructor(e){super(e),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}static[Symbol.hasInstance](e){return e&&e[IK]===!0}[IK]=!0},wK=Symbol.for("undici.error.UND_ERR_CLOSED"),PM=class extends Ot{static{i(this,"ClientClosedError")}constructor(e){super(e),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}static[Symbol.hasInstance](e){return e&&e[wK]===!0}[wK]=!0},SK=Symbol.for("undici.error.UND_ERR_SOCKET"),QM=class extends Ot{static{i(this,"SocketError")}constructor(e,r){super(e),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET",this.socket=r}static[Symbol.hasInstance](e){return e&&e[SK]===!0}[SK]=!0},xK=Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"),_M=class extends Ot{static{i(this,"NotSupportedError")}constructor(e){super(e),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}static[Symbol.hasInstance](e){return e&&e[xK]===!0}[xK]=!0},bK=Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"),DM=class extends Ot{static{i(this,"BalancedPoolMissingUpstreamError")}constructor(e){super(e),this.name="MissingUpstreamError",this.message=e||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}static[Symbol.hasInstance](e){return e&&e[bK]===!0}[bK]=!0},BK=Symbol.for("undici.error.UND_ERR_HTTP_PARSER"),kM=class extends Error{static{i(this,"HTTPParserError")}constructor(e,r,n){super(e),this.name="HTTPParserError",this.code=r?`HPE_${r}`:void 0,this.data=n?n.toString():void 0}static[Symbol.hasInstance](e){return e&&e[BK]===!0}[BK]=!0},RK=Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"),LM=class extends Ot{static{i(this,"ResponseExceededMaxSizeError")}constructor(e){super(e),this.name="ResponseExceededMaxSizeError",this.message=e||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}static[Symbol.hasInstance](e){return e&&e[RK]===!0}[RK]=!0},NK=Symbol.for("undici.error.UND_ERR_REQ_RETRY"),OM=class extends Ot{static{i(this,"RequestRetryError")}constructor(e,r,{headers:n,data:s}){super(e),this.name="RequestRetryError",this.message=e||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=r,this.data=s,this.headers=n}static[Symbol.hasInstance](e){return e&&e[NK]===!0}[NK]=!0},TK=Symbol.for("undici.error.UND_ERR_RESPONSE"),MM=class extends Ot{static{i(this,"ResponseError")}constructor(e,r,{headers:n,data:s}){super(e),this.name="ResponseError",this.message=e||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=r,this.data=s,this.headers=n}static[Symbol.hasInstance](e){return e&&e[TK]===!0}[TK]=!0},vK=Symbol.for("undici.error.UND_ERR_PRX_TLS"),FM=class extends Ot{static{i(this,"SecureProxyConnectionError")}constructor(e,r,n){super(r,{cause:e,...n??{}}),this.name="SecureProxyConnectionError",this.message=r||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=e}static[Symbol.hasInstance](e){return e&&e[vK]===!0}[vK]=!0},PK=Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"),UM=class extends Ot{static{i(this,"MessageSizeExceededError")}constructor(e){super(e),this.name="MessageSizeExceededError",this.message=e||"Max decompressed message size exceeded",this.code="UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"}static[Symbol.hasInstance](e){return e&&e[PK]===!0}get[PK](){return!0}};QK.exports={AbortError:Mx,HTTPParserError:kM,UndiciError:Ot,HeadersTimeoutError:CM,HeadersOverflowError:IM,BodyTimeoutError:wM,RequestContentLengthMismatchError:NM,ConnectTimeoutError:EM,ResponseStatusCodeError:SM,InvalidArgumentError:xM,InvalidReturnValueError:bM,RequestAbortedError:BM,ClientDestroyedError:vM,ClientClosedError:PM,InformationalError:RM,SocketError:QM,NotSupportedError:_M,ResponseContentLengthMismatchError:TM,BalancedPoolMissingUpstreamError:DM,ResponseExceededMaxSizeError:LM,RequestRetryError:OM,ResponseError:MM,SecureProxyConnectionError:FM,MessageSizeExceededError:UM}});var Ux=I((IHt,_K)=>{"use strict";var Fx={},qM=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let t=0;t{"use strict";var{wellknownHeaderNames:DK,headerNameLowerCasedRecord:TGe}=Ux(),GM=class t{static{i(this,"TstNode")}value=null;left=null;middle=null;right=null;code;constructor(e,r,n){if(n===void 0||n>=e.length)throw new TypeError("Unreachable");if((this.code=e.charCodeAt(n))>127)throw new TypeError("key must be ascii string");e.length!==++n?this.middle=new t(e,r,n):this.value=r}add(e,r){let n=e.length;if(n===0)throw new TypeError("Unreachable");let s=0,o=this;for(;;){let a=e.charCodeAt(s);if(a>127)throw new TypeError("key must be ascii string");if(o.code===a)if(n===++s){o.value=r;break}else if(o.middle!==null)o=o.middle;else{o.middle=new t(e,r,s);break}else if(o.code=65&&(o|=32);s!==null;){if(o===s.code){if(r===++n)return s;s=s.middle;break}s=s.code{"use strict";var Ly=require("node:assert"),{kDestroyed:FK,kBodyUsed:Mf,kListeners:HM,kBody:MK}=Lt(),{IncomingMessage:vGe}=require("node:http"),$x=require("node:stream"),PGe=require("node:net"),{Blob:QGe}=require("node:buffer"),_Ge=require("node:util"),{stringify:DGe}=require("node:querystring"),{EventEmitter:kGe}=require("node:events"),{InvalidArgumentError:zr}=rt(),{headerNameLowerCasedRecord:LGe}=Ux(),{tree:UK}=OK(),[OGe,MGe]=process.versions.node.split(".").map(t=>Number(t)),Hx=class{static{i(this,"BodyAsyncIterable")}constructor(e){this[MK]=e,this[Mf]=!1}async*[Symbol.asyncIterator](){Ly(!this[Mf],"disturbed"),this[Mf]=!0,yield*this[MK]}};function FGe(t){return zx(t)?(zK(t)===0&&t.on("data",function(){Ly(!1)}),typeof t.readableDidRead!="boolean"&&(t[Mf]=!1,kGe.prototype.on.call(t,"data",function(){this[Mf]=!0})),t):t&&typeof t.pipeTo=="function"?new Hx(t):t&&typeof t!="string"&&!ArrayBuffer.isView(t)&&$K(t)?new Hx(t):t}i(FGe,"wrapRequestBody");function UGe(){}i(UGe,"nop");function zx(t){return t&&typeof t=="object"&&typeof t.pipe=="function"&&typeof t.on=="function"}i(zx,"isStream");function qK(t){if(t===null)return!1;if(t instanceof QGe)return!0;if(typeof t!="object")return!1;{let e=t[Symbol.toStringTag];return(e==="Blob"||e==="File")&&("stream"in t&&typeof t.stream=="function"||"arrayBuffer"in t&&typeof t.arrayBuffer=="function")}}i(qK,"isBlobLike");function qGe(t,e){if(t.includes("?")||t.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let r=DGe(e);return r&&(t+="?"+r),t}i(qGe,"buildURL");function GK(t){let e=parseInt(t,10);return e===Number(t)&&e>=0&&e<=65535}i(GK,"isValidPort");function Gx(t){return t!=null&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&(t[4]===":"||t[4]==="s"&&t[5]===":")}i(Gx,"isHttpOrHttpsPrefixed");function HK(t){if(typeof t=="string"){if(t=new URL(t),!Gx(t.origin||t.protocol))throw new zr("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}if(!t||typeof t!="object")throw new zr("Invalid URL: The URL argument must be a non-null object.");if(!(t instanceof URL)){if(t.port!=null&&t.port!==""&&GK(t.port)===!1)throw new zr("Invalid URL: port must be a valid integer or a string representation of an integer.");if(t.path!=null&&typeof t.path!="string")throw new zr("Invalid URL path: the path must be a string or null/undefined.");if(t.pathname!=null&&typeof t.pathname!="string")throw new zr("Invalid URL pathname: the pathname must be a string or null/undefined.");if(t.hostname!=null&&typeof t.hostname!="string")throw new zr("Invalid URL hostname: the hostname must be a string or null/undefined.");if(t.origin!=null&&typeof t.origin!="string")throw new zr("Invalid URL origin: the origin must be a string or null/undefined.");if(!Gx(t.origin||t.protocol))throw new zr("Invalid URL protocol: the URL must start with `http:` or `https:`.");let e=t.port!=null?t.port:t.protocol==="https:"?443:80,r=t.origin!=null?t.origin:`${t.protocol||""}//${t.hostname||""}:${e}`,n=t.path!=null?t.path:`${t.pathname||""}${t.search||""}`;return r[r.length-1]==="/"&&(r=r.slice(0,r.length-1)),n&&n[0]!=="/"&&(n=`/${n}`),new URL(`${r}${n}`)}if(!Gx(t.origin||t.protocol))throw new zr("Invalid URL protocol: the URL must start with `http:` or `https:`.");return t}i(HK,"parseURL");function GGe(t){if(t=HK(t),t.pathname!=="/"||t.search||t.hash)throw new zr("invalid url");return t}i(GGe,"parseOrigin");function HGe(t){if(t[0]==="["){let r=t.indexOf("]");return Ly(r!==-1),t.substring(1,r)}let e=t.indexOf(":");return e===-1?t:t.substring(0,e)}i(HGe,"getHostname");function $Ge(t){if(!t)return null;Ly(typeof t=="string");let e=HGe(t);return PGe.isIP(e)?"":e}i($Ge,"getServerName");function zGe(t){return JSON.parse(JSON.stringify(t))}i(zGe,"deepClone");function VGe(t){return t!=null&&typeof t[Symbol.asyncIterator]=="function"}i(VGe,"isAsyncIterable");function $K(t){return t!=null&&(typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function")}i($K,"isIterable");function zK(t){if(t==null)return 0;if(zx(t)){let e=t._readableState;return e&&e.objectMode===!1&&e.ended===!0&&Number.isFinite(e.length)?e.length:null}else{if(qK(t))return t.size!=null?t.size:null;if(YK(t))return t.byteLength}return null}i(zK,"bodyLength");function VK(t){return t&&!!(t.destroyed||t[FK]||$x.isDestroyed?.(t))}i(VK,"isDestroyed");function WGe(t,e){t==null||!zx(t)||VK(t)||(typeof t.destroy=="function"?(Object.getPrototypeOf(t).constructor===vGe&&(t.socket=null),t.destroy(e)):e&&queueMicrotask(()=>{t.emit("error",e)}),t.destroyed!==!0&&(t[FK]=!0))}i(WGe,"destroy");var YGe=/timeout=(\d+)/;function JGe(t){let e=t.toString().match(YGe);return e?parseInt(e[1],10)*1e3:null}i(JGe,"parseKeepAliveTimeout");function WK(t){return typeof t=="string"?LGe[t]??t.toLowerCase():UK.lookup(t)??t.toString("latin1").toLowerCase()}i(WK,"headerNameToString");function jGe(t){return UK.lookup(t)??t.toString("latin1").toLowerCase()}i(jGe,"bufferToLowerCasedHeaderName");function KGe(t,e){e===void 0&&(e={});for(let r=0;ra.toString("utf8")):o.toString("utf8")}}return"content-length"in e&&"content-disposition"in e&&(e["content-disposition"]=Buffer.from(e["content-disposition"]).toString("latin1")),e}i(KGe,"parseHeaders");function XGe(t){let e=t.length,r=new Array(e),n=!1,s=-1,o,a,c=0;for(let l=0;l{r.close(),r.byobRequest?.respond(0)});else{let o=Buffer.isBuffer(s)?s:Buffer.from(s);o.byteLength&&r.enqueue(new Uint8Array(o))}return r.desiredSize>0},async cancel(r){await e.return()},type:"bytes"})}i(sHe,"ReadableStreamFrom");function oHe(t){return t&&typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&t[Symbol.toStringTag]==="FormData"}i(oHe,"isFormDataLike");function iHe(t,e){return"addEventListener"in t?(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)):(t.addListener("abort",e),()=>t.removeListener("abort",e))}i(iHe,"addAbortListener");var aHe=typeof String.prototype.toWellFormed=="function",cHe=typeof String.prototype.isWellFormed=="function";function JK(t){return aHe?`${t}`.toWellFormed():_Ge.toUSVString(t)}i(JK,"toUSVString");function lHe(t){return cHe?`${t}`.isWellFormed():JK(t)===`${t}`}i(lHe,"isUSVString");function jK(t){switch(t){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return t>=33&&t<=126}}i(jK,"isTokenCharCode");function uHe(t){if(t.length===0)return!1;for(let e=0;e{"use strict";var ut=require("node:diagnostics_channel"),VM=require("node:util"),Vx=VM.debuglog("undici"),zM=VM.debuglog("fetch"),fp=VM.debuglog("websocket"),eX=!1,gHe={beforeConnect:ut.channel("undici:client:beforeConnect"),connected:ut.channel("undici:client:connected"),connectError:ut.channel("undici:client:connectError"),sendHeaders:ut.channel("undici:client:sendHeaders"),create:ut.channel("undici:request:create"),bodySent:ut.channel("undici:request:bodySent"),headers:ut.channel("undici:request:headers"),trailers:ut.channel("undici:request:trailers"),error:ut.channel("undici:request:error"),open:ut.channel("undici:websocket:open"),close:ut.channel("undici:websocket:close"),socketError:ut.channel("undici:websocket:socket_error"),ping:ut.channel("undici:websocket:ping"),pong:ut.channel("undici:websocket:pong")};if(Vx.enabled||zM.enabled){let t=zM.enabled?zM:Vx;ut.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connecting to %s using %s%s",`${o}${s?`:${s}`:""}`,n,r)}),ut.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connected to %s using %s%s",`${o}${s?`:${s}`:""}`,n,r)}),ut.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o},error:a}=e;t("connection to %s using %s%s errored - %s",`${o}${s?`:${s}`:""}`,n,r,a.message)}),ut.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:s}}=e;t("sending request to %s %s/%s",r,s,n)}),ut.channel("undici:request:headers").subscribe(e=>{let{request:{method:r,path:n,origin:s},response:{statusCode:o}}=e;t("received response to %s %s/%s - HTTP %d",r,s,n,o)}),ut.channel("undici:request:trailers").subscribe(e=>{let{request:{method:r,path:n,origin:s}}=e;t("trailers received from %s %s/%s",r,s,n)}),ut.channel("undici:request:error").subscribe(e=>{let{request:{method:r,path:n,origin:s},error:o}=e;t("request to %s %s/%s errored - %s",r,s,n,o.message)}),eX=!0}if(fp.enabled){if(!eX){let t=Vx.enabled?Vx:fp;ut.channel("undici:client:beforeConnect").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connecting to %s%s using %s%s",o,s?`:${s}`:"",n,r)}),ut.channel("undici:client:connected").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o}}=e;t("connected to %s%s using %s%s",o,s?`:${s}`:"",n,r)}),ut.channel("undici:client:connectError").subscribe(e=>{let{connectParams:{version:r,protocol:n,port:s,host:o},error:a}=e;t("connection to %s%s using %s%s errored - %s",o,s?`:${s}`:"",n,r,a.message)}),ut.channel("undici:client:sendHeaders").subscribe(e=>{let{request:{method:r,path:n,origin:s}}=e;t("sending request to %s %s/%s",r,s,n)})}ut.channel("undici:websocket:open").subscribe(t=>{let{address:{address:e,port:r}}=t;fp("connection opened %s%s",e,r?`:${r}`:"")}),ut.channel("undici:websocket:close").subscribe(t=>{let{websocket:e,code:r,reason:n}=t;fp("closed connection to %s - %s %s",e.url,r,n)}),ut.channel("undici:websocket:socket_error").subscribe(t=>{fp("connection errored - %s",t.message)}),ut.channel("undici:websocket:ping").subscribe(t=>{fp("ping received")}),ut.channel("undici:websocket:pong").subscribe(t=>{fp("pong received")})}tX.exports={channels:gHe}});var oX=I((RHt,sX)=>{"use strict";var{InvalidArgumentError:St,NotSupportedError:yHe}=rt(),dl=require("node:assert"),{isValidHTTPToken:nX,isValidHeaderValue:WM,isStream:EHe,destroy:CHe,isBuffer:IHe,isFormDataLike:wHe,isIterable:SHe,isBlobLike:xHe,buildURL:bHe,validateHandler:BHe,getServerName:RHe,normalizedMethodRecords:NHe}=He(),{channels:Sa}=Ff(),{headerNameLowerCasedRecord:rX}=Ux(),THe=/[^\u0021-\u00ff]/,vo=Symbol("handler"),YM=class{static{i(this,"Request")}constructor(e,{path:r,method:n,body:s,headers:o,query:a,idempotent:c,blocking:l,upgrade:u,headersTimeout:d,bodyTimeout:p,reset:m,throwOnError:f,expectContinue:A,servername:h},E){if(typeof r!="string")throw new St("path must be a string");if(r[0]!=="/"&&!(r.startsWith("http://")||r.startsWith("https://"))&&n!=="CONNECT")throw new St("path must be an absolute URL or start with a slash");if(THe.test(r))throw new St("invalid request path");if(typeof n!="string")throw new St("method must be a string");if(NHe[n]===void 0&&!nX(n))throw new St("invalid request method");if(u&&typeof u!="string")throw new St("upgrade must be a string");if(u&&!WM(u))throw new St("invalid upgrade header");if(d!=null&&(!Number.isFinite(d)||d<0))throw new St("invalid headersTimeout");if(p!=null&&(!Number.isFinite(p)||p<0))throw new St("invalid bodyTimeout");if(m!=null&&typeof m!="boolean")throw new St("invalid reset");if(A!=null&&typeof A!="boolean")throw new St("invalid expectContinue");if(this.headersTimeout=d,this.bodyTimeout=p,this.throwOnError=f===!0,this.method=n,this.abort=null,s==null)this.body=null;else if(EHe(s)){this.body=s;let C=this.body._readableState;(!C||!C.autoDestroy)&&(this.endHandler=i(function(){CHe(this)},"autoDestroy"),this.body.on("end",this.endHandler)),this.errorHandler=w=>{this.abort?this.abort(w):this.error=w},this.body.on("error",this.errorHandler)}else if(IHe(s))this.body=s.byteLength?s:null;else if(ArrayBuffer.isView(s))this.body=s.buffer.byteLength?Buffer.from(s.buffer,s.byteOffset,s.byteLength):null;else if(s instanceof ArrayBuffer)this.body=s.byteLength?Buffer.from(s):null;else if(typeof s=="string")this.body=s.length?Buffer.from(s):null;else if(wHe(s)||SHe(s)||xHe(s))this.body=s;else throw new St("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=u||null,this.path=a?bHe(r,a):r,this.origin=e,this.idempotent=c??(n==="HEAD"||n==="GET"),this.blocking=l??!1,this.reset=m??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=A??!1,Array.isArray(o)){if(o.length%2!==0)throw new St("headers array must be even");for(let C=0;C{"use strict";var vHe=require("node:events"),Yx=class extends vHe{static{i(this,"Dispatcher")}dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}compose(...e){let r=Array.isArray(e[0])?e[0]:e,n=this.dispatch.bind(this);for(let s of r)if(s!=null){if(typeof s!="function")throw new TypeError(`invalid interceptor, expected function received ${typeof s}`);if(n=s(n),n==null||typeof n!="function"||n.length!==2)throw new TypeError("invalid interceptor")}return new JM(this,n)}},JM=class extends Yx{static{i(this,"ComposedDispatcher")}#e=null;#t=null;constructor(e,r){super(),this.#e=e,this.#t=r}dispatch(...e){this.#t(...e)}close(...e){return this.#e.close(...e)}destroy(...e){return this.#e.destroy(...e)}};iX.exports=Yx});var Hf=I((PHt,aX)=>{"use strict";var PHe=Oy(),{ClientDestroyedError:jM,ClientClosedError:QHe,InvalidArgumentError:Uf}=rt(),{kDestroy:_He,kClose:DHe,kClosed:My,kDestroyed:qf,kDispatch:KM,kInterceptors:Ap}=Lt(),pl=Symbol("onDestroyed"),Gf=Symbol("onClosed"),Jx=Symbol("Intercepted Dispatch"),XM=Symbol("webSocketOptions"),ZM=class extends PHe{static{i(this,"DispatcherBase")}constructor(e){super(),this[qf]=!1,this[pl]=null,this[My]=!1,this[Gf]=[],this[XM]=e?.webSocket??{}}get webSocketOptions(){return{maxFragments:this[XM].maxFragments??131072,maxPayloadSize:this[XM].maxPayloadSize??128*1024*1024}}get destroyed(){return this[qf]}get closed(){return this[My]}get interceptors(){return this[Ap]}set interceptors(e){if(e){for(let r=e.length-1;r>=0;r--)if(typeof this[Ap][r]!="function")throw new Uf("interceptor must be an function")}this[Ap]=e}close(e){if(e===void 0)return new Promise((n,s)=>{this.close((o,a)=>o?s(o):n(a))});if(typeof e!="function")throw new Uf("invalid callback");if(this[qf]){queueMicrotask(()=>e(new jM,null));return}if(this[My]){this[Gf]?this[Gf].push(e):queueMicrotask(()=>e(null,null));return}this[My]=!0,this[Gf].push(e);let r=i(()=>{let n=this[Gf];this[Gf]=null;for(let s=0;sthis.destroy()).then(()=>{queueMicrotask(r)})}destroy(e,r){if(typeof e=="function"&&(r=e,e=null),r===void 0)return new Promise((s,o)=>{this.destroy(e,(a,c)=>a?o(a):s(c))});if(typeof r!="function")throw new Uf("invalid callback");if(this[qf]){this[pl]?this[pl].push(r):queueMicrotask(()=>r(null,null));return}e||(e=new jM),this[qf]=!0,this[pl]=this[pl]||[],this[pl].push(r);let n=i(()=>{let s=this[pl];this[pl]=null;for(let o=0;o{queueMicrotask(n)})}[Jx](e,r){if(!this[Ap]||this[Ap].length===0)return this[Jx]=this[KM],this[KM](e,r);let n=this[KM].bind(this);for(let s=this[Ap].length-1;s>=0;s--)n=this[Ap][s](n);return this[Jx]=n,n(e,r)}dispatch(e,r){if(!r||typeof r!="object")throw new Uf("handler must be an object");try{if(!e||typeof e!="object")throw new Uf("opts must be an object.");if(this[qf]||this[pl])throw new jM;if(this[My])throw new QHe;return this[Jx](e,r)}catch(n){if(typeof r.onError!="function")throw new Uf("invalid onError method");return r.onError(n),!1}}};aX.exports=ZM});var iF=I((_Ht,dX)=>{"use strict";var $f=0,eF=1e3,tF=(eF>>1)-1,ml,rF=Symbol("kFastTimer"),fl=[],nF=-2,sF=-1,lX=0,cX=1;function oF(){$f+=tF;let t=0,e=fl.length;for(;t=r._idleStart+r._idleTimeout&&(r._state=sF,r._idleStart=-1,r._onTimeout(r._timerArg)),r._state===sF?(r._state=nF,--e!==0&&(fl[t]=fl[e])):++t}fl.length=e,fl.length!==0&&uX()}i(oF,"onTick");function uX(){ml?ml.refresh():(clearTimeout(ml),ml=setTimeout(oF,tF),ml.unref&&ml.unref())}i(uX,"refreshTimeout");var jx=class{static{i(this,"FastTimer")}[rF]=!0;_state=nF;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,r,n){this._onTimeout=e,this._idleTimeout=r,this._timerArg=n,this.refresh()}refresh(){this._state===nF&&fl.push(this),(!ml||fl.length===1)&&uX(),this._state=lX}clear(){this._state=sF,this._idleStart=-1}};dX.exports={setTimeout(t,e,r){return e<=eF?setTimeout(t,e,r):new jx(t,e,r)},clearTimeout(t){t[rF]?t.clear():clearTimeout(t)},setFastTimeout(t,e,r){return new jx(t,e,r)},clearFastTimeout(t){t.clear()},now(){return $f},tick(t=0){$f+=t-eF+1,oF(),oF()},reset(){$f=0,fl.length=0,clearTimeout(ml),ml=null},kFastTimer:rF}});var Fy=I((OHt,hX)=>{"use strict";var kHe=require("node:net"),pX=require("node:assert"),AX=He(),{InvalidArgumentError:LHe,ConnectTimeoutError:OHe}=rt(),Kx=iF();function mX(){}i(mX,"noop");var aF,cF;global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG)?cF=class{static{i(this,"WeakSessionCache")}constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(r=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:n}=this._sessionCache.keys().next();this._sessionCache.delete(n)}this._sessionCache.set(e,r)}}};function MHe({allowH2:t,maxCachedSessions:e,socketPath:r,timeout:n,session:s,...o}){if(e!=null&&(!Number.isInteger(e)||e<0))throw new LHe("maxCachedSessions must be a positive integer or zero");let a={path:r,...o},c=new cF(e??100);return n=n??1e4,t=t??!1,i(function({hostname:u,host:d,protocol:p,port:m,servername:f,localAddress:A,httpSocket:h},E){let C;if(p==="https:"){aF||(aF=require("node:tls")),f=f||a.servername||AX.getServerName(d)||null;let x=f||u;pX(x);let b=s||c.get(x)||null;m=m||443,C=aF.connect({highWaterMark:16384,...a,servername:f,session:b,localAddress:A,ALPNProtocols:t?["http/1.1","h2"]:["http/1.1"],socket:h,port:m,host:u}),C.on("session",function(N){c.set(x,N)})}else pX(!h,"httpSocket can only be sent on TLS update"),m=m||80,C=kHe.connect({highWaterMark:64*1024,...a,localAddress:A,port:m,host:u});if(a.keepAlive==null||a.keepAlive){let x=a.keepAliveInitialDelay===void 0?6e4:a.keepAliveInitialDelay;C.setKeepAlive(!0,x)}let w=FHe(new WeakRef(C),{timeout:n,hostname:u,port:m});return C.setNoDelay(!0).once(p==="https:"?"secureConnect":"connect",function(){if(queueMicrotask(w),E){let x=E;E=null,x(null,this)}}).on("error",function(x){if(queueMicrotask(w),E){let b=E;E=null,b(x)}}),C},"connect")}i(MHe,"buildConnector");var FHe=process.platform==="win32"?(t,e)=>{if(!e.timeout)return mX;let r=null,n=null,s=Kx.setFastTimeout(()=>{r=setImmediate(()=>{n=setImmediate(()=>fX(t.deref(),e))})},e.timeout);return()=>{Kx.clearFastTimeout(s),clearImmediate(r),clearImmediate(n)}}:(t,e)=>{if(!e.timeout)return mX;let r=null,n=Kx.setFastTimeout(()=>{r=setImmediate(()=>{fX(t.deref(),e)})},e.timeout);return()=>{Kx.clearFastTimeout(n),clearImmediate(r)}};function fX(t,e){if(t==null)return;let r="Connect Timeout Error";Array.isArray(t.autoSelectFamilyAttemptedAddresses)?r+=` (attempted addresses: ${t.autoSelectFamilyAttemptedAddresses.join(", ")},`:r+=` (attempted address: ${e.hostname}:${e.port},`,r+=` timeout: ${e.timeout}ms)`,AX.destroy(t,new OHe(r))}i(fX,"onConnectTimeout");hX.exports=MHe});var gX=I(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0});Xx.enumToMap=void 0;function UHe(t){let e={};return Object.keys(t).forEach(r=>{let n=t[r];typeof n=="number"&&(e[r]=n)}),e}i(UHe,"enumToMap");Xx.enumToMap=UHe});var yX=I(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.SPECIAL_HEADERS=D.HEADER_STATE=D.MINOR=D.MAJOR=D.CONNECTION_TOKEN_CHARS=D.HEADER_CHARS=D.TOKEN=D.STRICT_TOKEN=D.HEX=D.URL_CHAR=D.STRICT_URL_CHAR=D.USERINFO_CHARS=D.MARK=D.ALPHANUM=D.NUM=D.HEX_MAP=D.NUM_MAP=D.ALPHA=D.FINISH=D.H_METHOD_MAP=D.METHOD_MAP=D.METHODS_RTSP=D.METHODS_ICE=D.METHODS_HTTP=D.METHODS=D.LENIENT_FLAGS=D.FLAGS=D.TYPE=D.ERROR=void 0;var qHe=gX(),GHe;(function(t){t[t.OK=0]="OK",t[t.INTERNAL=1]="INTERNAL",t[t.STRICT=2]="STRICT",t[t.LF_EXPECTED=3]="LF_EXPECTED",t[t.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",t[t.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",t[t.INVALID_METHOD=6]="INVALID_METHOD",t[t.INVALID_URL=7]="INVALID_URL",t[t.INVALID_CONSTANT=8]="INVALID_CONSTANT",t[t.INVALID_VERSION=9]="INVALID_VERSION",t[t.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",t[t.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",t[t.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",t[t.INVALID_STATUS=13]="INVALID_STATUS",t[t.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",t[t.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",t[t.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",t[t.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",t[t.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",t[t.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",t[t.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",t[t.PAUSED=21]="PAUSED",t[t.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",t[t.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",t[t.USER=24]="USER"})(GHe=D.ERROR||(D.ERROR={}));var HHe;(function(t){t[t.BOTH=0]="BOTH",t[t.REQUEST=1]="REQUEST",t[t.RESPONSE=2]="RESPONSE"})(HHe=D.TYPE||(D.TYPE={}));var $He;(function(t){t[t.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",t[t.CHUNKED=8]="CHUNKED",t[t.UPGRADE=16]="UPGRADE",t[t.CONTENT_LENGTH=32]="CONTENT_LENGTH",t[t.SKIPBODY=64]="SKIPBODY",t[t.TRAILING=128]="TRAILING",t[t.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})($He=D.FLAGS||(D.FLAGS={}));var zHe;(function(t){t[t.HEADERS=1]="HEADERS",t[t.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",t[t.KEEP_ALIVE=4]="KEEP_ALIVE"})(zHe=D.LENIENT_FLAGS||(D.LENIENT_FLAGS={}));var fe;(function(t){t[t.DELETE=0]="DELETE",t[t.GET=1]="GET",t[t.HEAD=2]="HEAD",t[t.POST=3]="POST",t[t.PUT=4]="PUT",t[t.CONNECT=5]="CONNECT",t[t.OPTIONS=6]="OPTIONS",t[t.TRACE=7]="TRACE",t[t.COPY=8]="COPY",t[t.LOCK=9]="LOCK",t[t.MKCOL=10]="MKCOL",t[t.MOVE=11]="MOVE",t[t.PROPFIND=12]="PROPFIND",t[t.PROPPATCH=13]="PROPPATCH",t[t.SEARCH=14]="SEARCH",t[t.UNLOCK=15]="UNLOCK",t[t.BIND=16]="BIND",t[t.REBIND=17]="REBIND",t[t.UNBIND=18]="UNBIND",t[t.ACL=19]="ACL",t[t.REPORT=20]="REPORT",t[t.MKACTIVITY=21]="MKACTIVITY",t[t.CHECKOUT=22]="CHECKOUT",t[t.MERGE=23]="MERGE",t[t["M-SEARCH"]=24]="M-SEARCH",t[t.NOTIFY=25]="NOTIFY",t[t.SUBSCRIBE=26]="SUBSCRIBE",t[t.UNSUBSCRIBE=27]="UNSUBSCRIBE",t[t.PATCH=28]="PATCH",t[t.PURGE=29]="PURGE",t[t.MKCALENDAR=30]="MKCALENDAR",t[t.LINK=31]="LINK",t[t.UNLINK=32]="UNLINK",t[t.SOURCE=33]="SOURCE",t[t.PRI=34]="PRI",t[t.DESCRIBE=35]="DESCRIBE",t[t.ANNOUNCE=36]="ANNOUNCE",t[t.SETUP=37]="SETUP",t[t.PLAY=38]="PLAY",t[t.PAUSE=39]="PAUSE",t[t.TEARDOWN=40]="TEARDOWN",t[t.GET_PARAMETER=41]="GET_PARAMETER",t[t.SET_PARAMETER=42]="SET_PARAMETER",t[t.REDIRECT=43]="REDIRECT",t[t.RECORD=44]="RECORD",t[t.FLUSH=45]="FLUSH"})(fe=D.METHODS||(D.METHODS={}));D.METHODS_HTTP=[fe.DELETE,fe.GET,fe.HEAD,fe.POST,fe.PUT,fe.CONNECT,fe.OPTIONS,fe.TRACE,fe.COPY,fe.LOCK,fe.MKCOL,fe.MOVE,fe.PROPFIND,fe.PROPPATCH,fe.SEARCH,fe.UNLOCK,fe.BIND,fe.REBIND,fe.UNBIND,fe.ACL,fe.REPORT,fe.MKACTIVITY,fe.CHECKOUT,fe.MERGE,fe["M-SEARCH"],fe.NOTIFY,fe.SUBSCRIBE,fe.UNSUBSCRIBE,fe.PATCH,fe.PURGE,fe.MKCALENDAR,fe.LINK,fe.UNLINK,fe.PRI,fe.SOURCE];D.METHODS_ICE=[fe.SOURCE];D.METHODS_RTSP=[fe.OPTIONS,fe.DESCRIBE,fe.ANNOUNCE,fe.SETUP,fe.PLAY,fe.PAUSE,fe.TEARDOWN,fe.GET_PARAMETER,fe.SET_PARAMETER,fe.REDIRECT,fe.RECORD,fe.FLUSH,fe.GET,fe.POST];D.METHOD_MAP=qHe.enumToMap(fe);D.H_METHOD_MAP={};Object.keys(D.METHOD_MAP).forEach(t=>{/^H/.test(t)&&(D.H_METHOD_MAP[t]=D.METHOD_MAP[t])});var VHe;(function(t){t[t.SAFE=0]="SAFE",t[t.SAFE_WITH_CB=1]="SAFE_WITH_CB",t[t.UNSAFE=2]="UNSAFE"})(VHe=D.FINISH||(D.FINISH={}));D.ALPHA=[];for(let t=65;t<=90;t++)D.ALPHA.push(String.fromCharCode(t)),D.ALPHA.push(String.fromCharCode(t+32));D.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};D.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};D.NUM=["0","1","2","3","4","5","6","7","8","9"];D.ALPHANUM=D.ALPHA.concat(D.NUM);D.MARK=["-","_",".","!","~","*","'","(",")"];D.USERINFO_CHARS=D.ALPHANUM.concat(D.MARK).concat(["%",";",":","&","=","+","$",","]);D.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(D.ALPHANUM);D.URL_CHAR=D.STRICT_URL_CHAR.concat([" ","\f"]);for(let t=128;t<=255;t++)D.URL_CHAR.push(t);D.HEX=D.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);D.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(D.ALPHANUM);D.TOKEN=D.STRICT_TOKEN.concat([" "]);D.HEADER_CHARS=[" "];for(let t=32;t<=255;t++)t!==127&&D.HEADER_CHARS.push(t);D.CONNECTION_TOKEN_CHARS=D.HEADER_CHARS.filter(t=>t!==44);D.MAJOR=D.NUM_MAP;D.MINOR=D.MAJOR;var zf;(function(t){t[t.GENERAL=0]="GENERAL",t[t.CONNECTION=1]="CONNECTION",t[t.CONTENT_LENGTH=2]="CONTENT_LENGTH",t[t.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",t[t.UPGRADE=4]="UPGRADE",t[t.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",t[t.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",t[t.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",t[t.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(zf=D.HEADER_STATE||(D.HEADER_STATE={}));D.SPECIAL_HEADERS={connection:zf.CONNECTION,"content-length":zf.CONTENT_LENGTH,"proxy-connection":zf.CONNECTION,"transfer-encoding":zf.TRANSFER_ENCODING,upgrade:zf.UPGRADE}});var lF=I((GHt,EX)=>{"use strict";var{Buffer:WHe}=require("node:buffer");EX.exports=WHe.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV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GCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBU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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcB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IQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgI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CACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCE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tBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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AJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2Bh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UGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohB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2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQ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yAARwRAQZzQACgCABogAyAAKAIIIgE2AgggASADNgIMDBALIABBFGoiAigCACIBRQRAIAAoAhAiAUUNAyAAQRBqIQILA0AgAiEHIAEiA0EUaiICKAIAIgENACADQRBqIQIgAygCECIBDQALIAdBADYCAAwPC0F/IQQgAEG/f0sNACAAQRNqIgFBcHEhBEGQ0AAoAgAiCEUNAEEAIARrIQUCQAJAAkACf0EAIARBgAJJDQAaQR8gBEH///8HSw0AGiAEQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qCyIGQQJ0QbzSAGooAgAiAkUEQEEAIQFBACEDDAELQQAhASAEQRkgBkEBdmtBACAGQR9HG3QhAEEAIQMDQAJAIAIoAgRBeHEgBGsiByAFTw0AIAIhAyAHIgUNAEEAIQUgAiEBDAMLIAEgAkEUaigCACIHIAcgAiAAQR12QQRxakEQaigCACICRhsgASAHGyEBIABBAXQhACACDQALCyABIANyRQRAQQAhA0ECIAZ0IgBBACAAa3IgCHEiAEUNAyAAaEECdEG80gBqKAIAIQELIAFFDQELA0AgASgCBEF4cSAEayICIAVJIQAgAiAFIAAbIQUgASADIAAbIQMgASgCECIABH8gAAUgAUEUaigCAAsiAQ0ACwsgA0UNACAFQZTQACgCACAEa08NACADKAIYIQcgAyADKAIMIgBHBEBBnNAAKAIAGiAAIAMoAggiATYCCCABIAA2AgwMDgsgA0EUaiICKAIAIgFFBEAgAygCECIBRQ0DIANBEGohAgsDQCACIQYgASIAQRRqIgIoAgAiAQ0AIABBEGohAiAAKAIQIgENAAsgBkEANgIADA0LQZTQACgCACIDIARPBEBBoNAAKAIAIQECQCADIARrIgJBEE8EQCABIARqIgAgAkEBcjYCBCABIANqIAI2AgAgASAEQQNyNgIEDAELIAEgA0EDcjYCBCABIANqIgAgACgCBEEBcjYCBEEAIQBBACECC0GU0AAgAjYCAEGg0AAgADYCACABQQhqIQEMDwtBmNAAKAIAIgMgBEsEQCAEIAlqIgAgAyAEayIBQQFyNgIEQaTQACAANgIAQZjQACABNgIAIAkgBEED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U9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==","base64")});var Uy=I(($Ht,TX)=>{"use strict";var wX=["GET","HEAD","POST"],JHe=new Set(wX),jHe=[101,204,205,304],SX=[301,302,303,307,308],KHe=new Set(SX),xX=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],XHe=new Set(xX),bX=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],ZHe=new Set(bX),e$e=["follow","manual","error"],BX=["GET","HEAD","OPTIONS","TRACE"],t$e=new Set(BX),r$e=["navigate","same-origin","no-cors","cors"],n$e=["omit","same-origin","include"],s$e=["default","no-store","reload","no-cache","force-cache","only-if-cached"],o$e=["content-encoding","content-language","content-location","content-type","content-length"],i$e=["half"],RX=["CONNECT","TRACE","TRACK"],a$e=new Set(RX),NX=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],c$e=new Set(NX);TX.exports={subresource:NX,forbiddenMethods:RX,requestBodyHeader:o$e,referrerPolicy:bX,requestRedirect:e$e,requestMode:r$e,requestCredentials:n$e,requestCache:s$e,redirectStatus:SX,corsSafeListedMethods:wX,nullBodyStatus:jHe,safeMethods:BX,badPorts:xX,requestDuplex:i$e,subresourceSet:c$e,badPortsSet:XHe,redirectStatusSet:KHe,corsSafeListedMethodsSet:JHe,safeMethodsSet:t$e,forbiddenMethodsSet:a$e,referrerPolicySet:ZHe}});var dF=I((zHt,vX)=>{"use strict";var uF=Symbol.for("undici.globalOrigin.1");function l$e(){return globalThis[uF]}i(l$e,"getGlobalOrigin");function u$e(t){if(t===void 0){Object.defineProperty(globalThis,uF,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${e.protocol}`);Object.defineProperty(globalThis,uF,{value:e,writable:!0,enumerable:!1,configurable:!1})}i(u$e,"setGlobalOrigin");vX.exports={getGlobalOrigin:l$e,setGlobalOrigin:u$e}});var ms=I((WHt,OX)=>{"use strict";var eb=require("node:assert"),d$e=new TextEncoder,qy=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,p$e=/[\u000A\u000D\u0009\u0020]/,m$e=/[\u0009\u000A\u000C\u000D\u0020]/g,f$e=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function A$e(t){eb(t.protocol==="data:");let e=_X(t,!0);e=e.slice(5);let r={position:0},n=Vf(",",e,r),s=n.length;if(n=I$e(n,!0,!0),r.position>=e.length)return"failure";r.position++;let o=e.slice(s+1),a=DX(o);if(/;(\u0020){0,}base64$/i.test(n)){let l=LX(a);if(a=g$e(l),a==="failure")return"failure";n=n.slice(0,-6),n=n.replace(/(\u0020)+$/,""),n=n.slice(0,-1)}n.startsWith(";")&&(n="text/plain"+n);let c=pF(n);return c==="failure"&&(c=pF("text/plain;charset=US-ASCII")),{mimeType:c,body:a}}i(A$e,"dataURLProcessor");function _X(t,e=!1){if(!e)return t.href;let r=t.href,n=t.hash.length,s=n===0?r:r.substring(0,r.length-n);return!n&&r.endsWith("#")?s.slice(0,-1):s}i(_X,"URLSerializer");function tb(t,e,r){let n="";for(;r.position=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}i(PX,"isHexCharByte");function QX(t){return t>=48&&t<=57?t-48:(t&223)-55}i(QX,"hexByteToNumber");function h$e(t){let e=t.length,r=new Uint8Array(e),n=0;for(let s=0;st.length)return"failure";e.position++;let n=Vf(";",t,e);if(n=Zx(n,!1,!0),n.length===0||!qy.test(n))return"failure";let s=r.toLowerCase(),o=n.toLowerCase(),a={type:s,subtype:o,parameters:new Map,essence:`${s}/${o}`};for(;e.positionp$e.test(u),t,e);let c=tb(u=>u!==";"&&u!=="=",t,e);if(c=c.toLowerCase(),e.positiont.length)break;let l=null;if(t[e.position]==='"')l=kX(t,e,!0),Vf(";",t,e);else if(l=Vf(";",t,e),l=Zx(l,!1,!0),l.length===0)continue;c.length!==0&&qy.test(c)&&(l.length===0||f$e.test(l))&&!a.parameters.has(c)&&a.parameters.set(c,l)}return a}i(pF,"parseMIMEType");function g$e(t){t=t.replace(m$e,"");let e=t.length;if(e%4===0&&t.charCodeAt(e-1)===61&&(--e,t.charCodeAt(e-1)===61&&--e),e%4===1||/[^+/0-9A-Za-z]/.test(t.length===e?t:t.substring(0,e)))return"failure";let r=Buffer.from(t,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}i(g$e,"forgivingBase64");function kX(t,e,r){let n=e.position,s="";for(eb(t[e.position]==='"'),e.position++;s+=tb(a=>a!=='"'&&a!=="\\",t,e),!(e.position>=t.length);){let o=t[e.position];if(e.position++,o==="\\"){if(e.position>=t.length){s+="\\";break}s+=t[e.position],e.position++}else{eb(o==='"');break}}return r?s:t.slice(n,e.position)}i(kX,"collectAnHTTPQuotedString");function y$e(t){eb(t!=="failure");let{parameters:e,essence:r}=t,n=r;for(let[s,o]of e.entries())n+=";",n+=s,n+="=",qy.test(o)||(o=o.replace(/(\\|")/g,"\\$1"),o='"'+o,o+='"'),n+=o;return n}i(y$e,"serializeAMimeType");function E$e(t){return t===13||t===10||t===9||t===32}i(E$e,"isHTTPWhiteSpace");function Zx(t,e=!0,r=!0){return mF(t,e,r,E$e)}i(Zx,"removeHTTPWhitespace");function C$e(t){return t===13||t===10||t===9||t===12||t===32}i(C$e,"isASCIIWhitespace");function I$e(t,e=!0,r=!0){return mF(t,e,r,C$e)}i(I$e,"removeASCIIWhitespace");function mF(t,e,r,n){let s=0,o=t.length-1;if(e)for(;s0&&n(t.charCodeAt(o));)o--;return s===0&&o===t.length-1?t:t.slice(s,o+1)}i(mF,"removeChars");function LX(t){let e=t.length;if(65535>e)return String.fromCharCode.apply(null,t);let r="",n=0,s=65535;for(;ne&&(s=e-n),r+=String.fromCharCode.apply(null,t.subarray(n,n+=s));return r}i(LX,"isomorphicDecode");function w$e(t){switch(t.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return t.subtype.endsWith("+json")?"application/json":t.subtype.endsWith("+xml")?"application/xml":""}i(w$e,"minimizeSupportedMimeType");OX.exports={dataURLProcessor:A$e,URLSerializer:_X,collectASequenceOfCodePoints:tb,collectASequenceOfCodePointsFast:Vf,stringPercentDecode:DX,parseMIMEType:pF,collectAnHTTPQuotedString:kX,serializeAMimeType:y$e,removeChars:mF,removeHTTPWhitespace:Zx,minimizeSupportedMimeType:w$e,HTTP_TOKEN_CODEPOINTS:qy,isomorphicDecode:LX}});var sn=I((JHt,MX)=>{"use strict";var{types:xa,inspect:S$e}=require("node:util"),{markAsUncloneable:x$e}=require("node:worker_threads"),{toUSVString:b$e}=He(),Q={};Q.converters={};Q.util={};Q.errors={};Q.errors.exception=function(t){return new TypeError(`${t.header}: ${t.message}`)};Q.errors.conversionFailed=function(t){let e=t.types.length===1?"":" one of",r=`${t.argument} could not be converted to${e}: ${t.types.join(", ")}.`;return Q.errors.exception({header:t.prefix,message:r})};Q.errors.invalidArgument=function(t){return Q.errors.exception({header:t.prefix,message:`"${t.value}" is an invalid ${t.type}.`})};Q.brandCheck=function(t,e,r){if(r?.strict!==!1){if(!(t instanceof e)){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}}else if(t?.[Symbol.toStringTag]!==e.prototype[Symbol.toStringTag]){let n=new TypeError("Illegal invocation");throw n.code="ERR_INVALID_THIS",n}};Q.argumentLengthCheck=function({length:t},e,r){if(t{});Q.util.ConvertToInt=function(t,e,r,n){let s,o;e===64?(s=Math.pow(2,53)-1,r==="unsigned"?o=0:o=Math.pow(-2,53)+1):r==="unsigned"?(o=0,s=Math.pow(2,e)-1):(o=Math.pow(-2,e)-1,s=Math.pow(2,e-1)-1);let a=Number(t);if(a===0&&(a=0),n?.enforceRange===!0){if(Number.isNaN(a)||a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY)throw Q.errors.exception({header:"Integer conversion",message:`Could not convert ${Q.util.Stringify(t)} to an integer.`});if(a=Q.util.IntegerPart(a),as)throw Q.errors.exception({header:"Integer conversion",message:`Value must be between ${o}-${s}, got ${a}.`});return a}return!Number.isNaN(a)&&n?.clamp===!0?(a=Math.min(Math.max(a,o),s),Math.floor(a)%2===0?a=Math.floor(a):a=Math.ceil(a),a):Number.isNaN(a)||a===0&&Object.is(0,a)||a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY?0:(a=Q.util.IntegerPart(a),a=a%Math.pow(2,e),r==="signed"&&a>=Math.pow(2,e)-1?a-Math.pow(2,e):a)};Q.util.IntegerPart=function(t){let e=Math.floor(Math.abs(t));return t<0?-1*e:e};Q.util.Stringify=function(t){switch(Q.util.Type(t)){case"Symbol":return`Symbol(${t.description})`;case"Object":return S$e(t);case"String":return`"${t}"`;default:return`${t}`}};Q.sequenceConverter=function(t){return(e,r,n,s)=>{if(Q.util.Type(e)!=="Object")throw Q.errors.exception({header:r,message:`${n} (${Q.util.Stringify(e)}) is not iterable.`});let o=typeof s=="function"?s():e?.[Symbol.iterator]?.(),a=[],c=0;if(o===void 0||typeof o.next!="function")throw Q.errors.exception({header:r,message:`${n} is not iterable.`});for(;;){let{done:l,value:u}=o.next();if(l)break;a.push(t(u,r,`${n}[${c++}]`))}return a}};Q.recordConverter=function(t,e){return(r,n,s)=>{if(Q.util.Type(r)!=="Object")throw Q.errors.exception({header:n,message:`${s} ("${Q.util.Type(r)}") is not an Object.`});let o={};if(!xa.isProxy(r)){let c=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let l of c){let u=t(l,n,s),d=e(r[l],n,s);o[u]=d}return o}let a=Reflect.ownKeys(r);for(let c of a)if(Reflect.getOwnPropertyDescriptor(r,c)?.enumerable){let u=t(c,n,s),d=e(r[c],n,s);o[u]=d}return o}};Q.interfaceConverter=function(t){return(e,r,n,s)=>{if(s?.strict!==!1&&!(e instanceof t))throw Q.errors.exception({header:r,message:`Expected ${n} ("${Q.util.Stringify(e)}") to be an instance of ${t.name}.`});return e}};Q.dictionaryConverter=function(t){return(e,r,n)=>{let s=Q.util.Type(e),o={};if(s==="Null"||s==="Undefined")return o;if(s!=="Object")throw Q.errors.exception({header:r,message:`Expected ${e} to be one of: Null, Undefined, Object.`});for(let a of t){let{key:c,defaultValue:l,required:u,converter:d}=a;if(u===!0&&!Object.hasOwn(e,c))throw Q.errors.exception({header:r,message:`Missing required key "${c}".`});let p=e[c],m=Object.hasOwn(a,"defaultValue");if(m&&p!==null&&(p??=l()),u||m||p!==void 0){if(p=d(p,r,`${n}.${c}`),a.allowedValues&&!a.allowedValues.includes(p))throw Q.errors.exception({header:r,message:`${p} is not an accepted type. Expected one of ${a.allowedValues.join(", ")}.`});o[c]=p}}return o}};Q.nullableConverter=function(t){return(e,r,n)=>e===null?e:t(e,r,n)};Q.converters.DOMString=function(t,e,r,n){if(t===null&&n?.legacyNullToEmptyString)return"";if(typeof t=="symbol")throw Q.errors.exception({header:e,message:`${r} is a symbol, which cannot be converted to a DOMString.`});return String(t)};Q.converters.ByteString=function(t,e,r){let n=Q.converters.DOMString(t,e,r);for(let s=0;s255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${s} has a value of ${n.charCodeAt(s)} which is greater than 255.`);return n};Q.converters.USVString=b$e;Q.converters.boolean=function(t){return!!t};Q.converters.any=function(t){return t};Q.converters["long long"]=function(t,e,r){return Q.util.ConvertToInt(t,64,"signed",void 0,e,r)};Q.converters["unsigned long long"]=function(t,e,r){return Q.util.ConvertToInt(t,64,"unsigned",void 0,e,r)};Q.converters["unsigned long"]=function(t,e,r){return Q.util.ConvertToInt(t,32,"unsigned",void 0,e,r)};Q.converters["unsigned short"]=function(t,e,r,n){return Q.util.ConvertToInt(t,16,"unsigned",n,e,r)};Q.converters.ArrayBuffer=function(t,e,r,n){if(Q.util.Type(t)!=="Object"||!xa.isAnyArrayBuffer(t))throw Q.errors.conversionFailed({prefix:e,argument:`${r} ("${Q.util.Stringify(t)}")`,types:["ArrayBuffer"]});if(n?.allowShared===!1&&xa.isSharedArrayBuffer(t))throw Q.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.resizable||t.growable)throw Q.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};Q.converters.TypedArray=function(t,e,r,n,s){if(Q.util.Type(t)!=="Object"||!xa.isTypedArray(t)||t.constructor.name!==e.name)throw Q.errors.conversionFailed({prefix:r,argument:`${n} ("${Q.util.Stringify(t)}")`,types:[e.name]});if(s?.allowShared===!1&&xa.isSharedArrayBuffer(t.buffer))throw Q.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw Q.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};Q.converters.DataView=function(t,e,r,n){if(Q.util.Type(t)!=="Object"||!xa.isDataView(t))throw Q.errors.exception({header:e,message:`${r} is not a DataView.`});if(n?.allowShared===!1&&xa.isSharedArrayBuffer(t.buffer))throw Q.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(t.buffer.resizable||t.buffer.growable)throw Q.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return t};Q.converters.BufferSource=function(t,e,r,n){if(xa.isAnyArrayBuffer(t))return Q.converters.ArrayBuffer(t,e,r,{...n,allowShared:!1});if(xa.isTypedArray(t))return Q.converters.TypedArray(t,t.constructor,e,r,{...n,allowShared:!1});if(xa.isDataView(t))return Q.converters.DataView(t,e,r,{...n,allowShared:!1});throw Q.errors.conversionFailed({prefix:e,argument:`${r} ("${Q.util.Stringify(t)}")`,types:["BufferSource"]})};Q.converters["sequence"]=Q.sequenceConverter(Q.converters.ByteString);Q.converters["sequence>"]=Q.sequenceConverter(Q.converters["sequence"]);Q.converters["record"]=Q.recordConverter(Q.converters.ByteString,Q.converters.ByteString);MX.exports={webidl:Q}});var zs=I((jHt,XX)=>{"use strict";var{Transform:B$e}=require("node:stream"),FX=require("node:zlib"),{redirectStatusSet:R$e,referrerPolicySet:N$e,badPortsSet:T$e}=Uy(),{getGlobalOrigin:UX}=dF(),{collectASequenceOfCodePoints:hp,collectAnHTTPQuotedString:v$e,removeChars:P$e,parseMIMEType:Q$e}=ms(),{performance:_$e}=require("node:perf_hooks"),{isBlobLike:D$e,ReadableStreamFrom:k$e,isValidHTTPToken:qX,normalizedMethodRecordsBase:L$e}=He(),gp=require("node:assert"),{isUint8Array:O$e}=require("node:util/types"),{webidl:Gy}=sn(),GX=[],nb;try{nb=require("node:crypto");let t=["sha256","sha384","sha512"];GX=nb.getHashes().filter(e=>t.includes(e))}catch{}function HX(t){let e=t.urlList,r=e.length;return r===0?null:e[r-1].toString()}i(HX,"responseURL");function M$e(t,e){if(!R$e.has(t.status))return null;let r=t.headersList.get("location",!0);return r!==null&&zX(r)&&($X(r)||(r=F$e(r)),r=new URL(r,HX(t))),r&&!r.hash&&(r.hash=e),r}i(M$e,"responseLocationURL");function $X(t){for(let e=0;e126||r<32)return!1}return!0}i($X,"isValidEncodedURL");function F$e(t){return Buffer.from(t,"binary").toString("utf8")}i(F$e,"normalizeBinaryStringToUtf8");function $y(t){return t.urlList[t.urlList.length-1]}i($y,"requestCurrentURL");function U$e(t){let e=$y(t);return jX(e)&&T$e.has(e.port)?"blocked":"allowed"}i(U$e,"requestBadPort");function q$e(t){return t instanceof Error||t?.constructor?.name==="Error"||t?.constructor?.name==="DOMException"}i(q$e,"isErrorLike");function G$e(t){for(let e=0;e=32&&r<=126||r>=128&&r<=255))return!1}return!0}i(G$e,"isValidReasonPhrase");var H$e=qX;function zX(t){return(t[0]===" "||t[0]===" "||t[t.length-1]===" "||t[t.length-1]===" "||t.includes(` +`)||t.includes("\r")||t.includes("\0"))===!1}i(zX,"isValidHeaderValue");function $$e(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let o=n.length;o!==0;o--){let a=n[o-1].trim();if(N$e.has(a)){s=a;break}}s!==""&&(t.referrerPolicy=s)}i($$e,"setRequestReferrerPolicyOnRedirect");function z$e(){return"allowed"}i(z$e,"crossOriginResourcePolicyCheck");function V$e(){return"success"}i(V$e,"corsCheck");function W$e(){return"success"}i(W$e,"TAOCheck");function Y$e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}i(Y$e,"appendFetchMetadata");function J$e(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&AF(t.origin)&&!AF($y(t))&&(e=null);break;case"same-origin":sb(t,$y(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}i(J$e,"appendRequestOriginHeader");function Wf(t,e){return t}i(Wf,"coarsenTime");function j$e(t,e,r){return!t?.startTime||t.startTime4096&&(n=s);let o=sb(t,n),a=Hy(n)&&!Hy(t.url);switch(e){case"origin":return s??fF(r,!0);case"unsafe-url":return n;case"same-origin":return o?s:"no-referrer";case"origin-when-cross-origin":return o?n:s;case"strict-origin-when-cross-origin":{let c=$y(t);return sb(n,c)?n:Hy(n)&&!Hy(c)?"no-referrer":s}default:return a?"no-referrer":s}}i(eze,"determineRequestsReferrer");function fF(t,e){return gp(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}i(fF,"stripURLForReferrer");function Hy(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}i(Hy,"isURLPotentiallyTrustworthy");function tze(t,e){if(nb===void 0)return!0;let r=WX(e);if(r==="no metadata"||r.length===0)return!0;let n=nze(r),s=sze(r,n);for(let o of s){let a=o.algo,c=o.hash,l=nb.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),oze(l,c))return!0}return!1}i(tze,"bytesMatch");var rze=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function WX(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=rze.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let o=s.groups.algo.toLowerCase();GX.includes(o)&&e.push(s.groups)}return r===!0?"no metadata":e}i(WX,"parseMetadata");function nze(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r{t=n,e=s}),resolve:t,reject:e}}i(aze,"createDeferredPromise");function cze(t){return t.controller.state==="aborted"}i(cze,"isAborted");function lze(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}i(lze,"isCancelled");function uze(t){return L$e[t.toLowerCase()]??t}i(uze,"normalizeMethod");function dze(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return gp(typeof e=="string"),e}i(dze,"serializeJavascriptValueToJSONString");var pze=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function YX(t,e,r=0,n=1){class s{static{i(this,"FastIterableIterator")}#e;#t;#r;constructor(a,c){this.#e=a,this.#t=c,this.#r=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let a=this.#r,c=this.#e[e],l=c.length;if(a>=l)return{value:void 0,done:!0};let{[r]:u,[n]:d}=c[a];this.#r=a+1;let p;switch(this.#t){case"key":p=u;break;case"value":p=d;break;case"key+value":p=[u,d];break}return{value:p,done:!1}}}return delete s.prototype.constructor,Object.setPrototypeOf(s.prototype,pze),Object.defineProperties(s.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(o,a){return new s(o,a)}}i(YX,"createIterator");function mze(t,e,r,n=0,s=1){let o=YX(t,r,n,s),a={keys:{writable:!0,enumerable:!0,configurable:!0,value:i(function(){return Gy.brandCheck(this,e),o(this,"key")},"keys")},values:{writable:!0,enumerable:!0,configurable:!0,value:i(function(){return Gy.brandCheck(this,e),o(this,"value")},"values")},entries:{writable:!0,enumerable:!0,configurable:!0,value:i(function(){return Gy.brandCheck(this,e),o(this,"key+value")},"entries")},forEach:{writable:!0,enumerable:!0,configurable:!0,value:i(function(l,u=globalThis){if(Gy.brandCheck(this,e),Gy.argumentLengthCheck(arguments,1,`${t}.forEach`),typeof l!="function")throw new TypeError(`Failed to execute 'forEach' on '${t}': parameter 1 is not of type 'Function'.`);for(let{0:d,1:p}of o(this,"key+value"))l.call(u,p,d,this)},"forEach")}};return Object.defineProperties(e.prototype,{...a,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:a.entries.value}})}i(mze,"iteratorMixin");async function fze(t,e,r){let n=e,s=r,o;try{o=t.stream.getReader()}catch(a){s(a);return}try{n(await JX(o))}catch(a){s(a)}}i(fze,"fullyReadBody");function Aze(t){return t instanceof ReadableStream||t[Symbol.toStringTag]==="ReadableStream"&&typeof t.tee=="function"}i(Aze,"isReadableStreamLike");function hze(t){try{t.close(),t.byobRequest?.respond(0)}catch(e){if(!e.message.includes("Controller is already closed")&&!e.message.includes("ReadableStream is already closed"))throw e}}i(hze,"readableStreamClose");var gze=/[^\x00-\xFF]/;function rb(t){return gp(!gze.test(t)),t}i(rb,"isomorphicEncode");async function JX(t){let e=[],r=0;for(;;){let{done:n,value:s}=await t.read();if(n)return Buffer.concat(e,r);if(!O$e(s))throw new TypeError("Received non-Uint8Array chunk");e.push(s),r+=s.length}}i(JX,"readAllBytes");function yze(t){gp("protocol"in t);let e=t.protocol;return e==="about:"||e==="blob:"||e==="data:"}i(yze,"urlIsLocal");function AF(t){return typeof t=="string"&&t[5]===":"&&t[0]==="h"&&t[1]==="t"&&t[2]==="t"&&t[3]==="p"&&t[4]==="s"||t.protocol==="https:"}i(AF,"urlHasHttpsScheme");function jX(t){gp("protocol"in t);let e=t.protocol;return e==="http:"||e==="https:"}i(jX,"urlIsHttpHttpsScheme");function Eze(t,e){let r=t;if(!r.startsWith("bytes"))return"failure";let n={position:5};if(e&&hp(l=>l===" "||l===" ",r,n),r.charCodeAt(n.position)!==61)return"failure";n.position++,e&&hp(l=>l===" "||l===" ",r,n);let s=hp(l=>{let u=l.charCodeAt(0);return u>=48&&u<=57},r,n),o=s.length?Number(s):null;if(e&&hp(l=>l===" "||l===" ",r,n),r.charCodeAt(n.position)!==45)return"failure";n.position++,e&&hp(l=>l===" "||l===" ",r,n);let a=hp(l=>{let u=l.charCodeAt(0);return u>=48&&u<=57},r,n),c=a.length?Number(a):null;return n.positionc?"failure":{rangeStartValue:o,rangeEndValue:c}}i(Eze,"simpleRangeHeaderValue");function Cze(t,e,r){let n="bytes ";return n+=rb(`${t}`),n+="-",n+=rb(`${e}`),n+="/",n+=rb(`${r}`),n}i(Cze,"buildContentRange");var hF=class extends B$e{static{i(this,"InflateStream")}#e;constructor(e){super(),this.#e=e}_transform(e,r,n){if(!this._inflateStream){if(e.length===0){n();return}this._inflateStream=(e[0]&15)===8?FX.createInflate(this.#e):FX.createInflateRaw(this.#e),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",s=>this.destroy(s))}this._inflateStream.write(e,r,n)}_final(e){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),e()}};function Ize(t){return new hF(t)}i(Ize,"createInflate");function wze(t){let e=null,r=null,n=null,s=KX("content-type",t);if(s===null)return"failure";for(let o of s){let a=Q$e(o);a==="failure"||a.essence==="*/*"||(n=a,n.essence!==r?(e=null,n.parameters.has("charset")&&(e=n.parameters.get("charset")),r=n.essence):!n.parameters.has("charset")&&e!==null&&n.parameters.set("charset",e))}return n??"failure"}i(wze,"extractMimeType");function Sze(t){let e=t,r={position:0},n=[],s="";for(;r.positiono!=='"'&&o!==",",e,r),r.positiono===9||o===32),n.push(s),s=""}return n}i(Sze,"gettingDecodingSplitting");function KX(t,e){let r=e.get(t,!0);return r===null?null:Sze(r)}i(KX,"getDecodeSplit");var xze=new TextDecoder;function bze(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),xze.decode(t))}i(bze,"utf8DecodeBytes");var gF=class{static{i(this,"EnvironmentSettingsObjectBase")}get baseUrl(){return UX()}get origin(){return this.baseUrl?.origin}policyContainer=VX()},yF=class{static{i(this,"EnvironmentSettingsObject")}settingsObject=new gF},Bze=new yF;XX.exports={isAborted:cze,isCancelled:lze,isValidEncodedURL:$X,createDeferredPromise:aze,ReadableStreamFrom:k$e,tryUpgradeRequestToAPotentiallyTrustworthyURL:ize,clampAndCoarsenConnectionTimingInfo:j$e,coarsenedSharedCurrentTime:K$e,determineRequestsReferrer:eze,makePolicyContainer:VX,clonePolicyContainer:Z$e,appendFetchMetadata:Y$e,appendRequestOriginHeader:J$e,TAOCheck:W$e,corsCheck:V$e,crossOriginResourcePolicyCheck:z$e,createOpaqueTimingInfo:X$e,setRequestReferrerPolicyOnRedirect:$$e,isValidHTTPToken:qX,requestBadPort:U$e,requestCurrentURL:$y,responseURL:HX,responseLocationURL:M$e,isBlobLike:D$e,isURLPotentiallyTrustworthy:Hy,isValidReasonPhrase:G$e,sameOrigin:sb,normalizeMethod:uze,serializeJavascriptValueToJSONString:dze,iteratorMixin:mze,createIterator:YX,isValidHeaderName:H$e,isValidHeaderValue:zX,isErrorLike:q$e,fullyReadBody:fze,bytesMatch:tze,isReadableStreamLike:Aze,readableStreamClose:hze,isomorphicEncode:rb,urlIsLocal:yze,urlHasHttpsScheme:AF,urlIsHttpHttpsScheme:jX,readAllBytes:JX,simpleRangeHeaderValue:Eze,buildContentRange:Cze,parseMetadata:WX,createInflate:Ize,extractMimeType:wze,getDecodeSplit:KX,utf8DecodeBytes:bze,environmentSettingsObject:Bze}});var Eu=I((XHt,ZX)=>{"use strict";ZX.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kDispatcher:Symbol("dispatcher")}});var CF=I((ZHt,e7)=>{"use strict";var{Blob:Rze,File:Nze}=require("node:buffer"),{kState:Al}=Eu(),{webidl:ba}=sn(),EF=class t{static{i(this,"FileLike")}constructor(e,r,n={}){let s=r,o=n.type,a=n.lastModified??Date.now();this[Al]={blobLike:e,name:s,type:o,lastModified:a}}stream(...e){return ba.brandCheck(this,t),this[Al].blobLike.stream(...e)}arrayBuffer(...e){return ba.brandCheck(this,t),this[Al].blobLike.arrayBuffer(...e)}slice(...e){return ba.brandCheck(this,t),this[Al].blobLike.slice(...e)}text(...e){return ba.brandCheck(this,t),this[Al].blobLike.text(...e)}get size(){return ba.brandCheck(this,t),this[Al].blobLike.size}get type(){return ba.brandCheck(this,t),this[Al].blobLike.type}get name(){return ba.brandCheck(this,t),this[Al].name}get lastModified(){return ba.brandCheck(this,t),this[Al].lastModified}get[Symbol.toStringTag](){return"File"}};ba.converters.Blob=ba.interfaceConverter(Rze);function Tze(t){return t instanceof Nze||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}i(Tze,"isFileLike");e7.exports={FileLike:EF,isFileLike:Tze}});var Vy=I((t$t,o7)=>{"use strict";var{isBlobLike:ob,iteratorMixin:vze}=zs(),{kState:Fn}=Eu(),{kEnumerableProperty:Yf}=He(),{FileLike:t7,isFileLike:Pze}=CF(),{webidl:xt}=sn(),{File:s7}=require("node:buffer"),r7=require("node:util"),n7=globalThis.File??s7,zy=class t{static{i(this,"FormData")}constructor(e){if(xt.util.markAsUncloneable(this),e!==void 0)throw xt.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Fn]=[]}append(e,r,n=void 0){xt.brandCheck(this,t);let s="FormData.append";if(xt.argumentLengthCheck(arguments,2,s),arguments.length===3&&!ob(r))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=xt.converters.USVString(e,s,"name"),r=ob(r)?xt.converters.Blob(r,s,"value",{strict:!1}):xt.converters.USVString(r,s,"value"),n=arguments.length===3?xt.converters.USVString(n,s,"filename"):void 0;let o=IF(e,r,n);this[Fn].push(o)}delete(e){xt.brandCheck(this,t);let r="FormData.delete";xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name"),this[Fn]=this[Fn].filter(n=>n.name!==e)}get(e){xt.brandCheck(this,t);let r="FormData.get";xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name");let n=this[Fn].findIndex(s=>s.name===e);return n===-1?null:this[Fn][n].value}getAll(e){xt.brandCheck(this,t);let r="FormData.getAll";return xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name"),this[Fn].filter(n=>n.name===e).map(n=>n.value)}has(e){xt.brandCheck(this,t);let r="FormData.has";return xt.argumentLengthCheck(arguments,1,r),e=xt.converters.USVString(e,r,"name"),this[Fn].findIndex(n=>n.name===e)!==-1}set(e,r,n=void 0){xt.brandCheck(this,t);let s="FormData.set";if(xt.argumentLengthCheck(arguments,2,s),arguments.length===3&&!ob(r))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=xt.converters.USVString(e,s,"name"),r=ob(r)?xt.converters.Blob(r,s,"name",{strict:!1}):xt.converters.USVString(r,s,"name"),n=arguments.length===3?xt.converters.USVString(n,s,"name"):void 0;let o=IF(e,r,n),a=this[Fn].findIndex(c=>c.name===e);a!==-1?this[Fn]=[...this[Fn].slice(0,a),o,...this[Fn].slice(a+1).filter(c=>c.name!==e)]:this[Fn].push(o)}[r7.inspect.custom](e,r){let n=this[Fn].reduce((o,a)=>(o[a.name]?Array.isArray(o[a.name])?o[a.name].push(a.value):o[a.name]=[o[a.name],a.value]:o[a.name]=a.value,o),{__proto__:null});r.depth??=e,r.colors??=!0;let s=r7.formatWithOptions(r,n);return`FormData ${s.slice(s.indexOf("]")+2)}`}};vze("FormData",zy,Fn,"name","value");Object.defineProperties(zy.prototype,{append:Yf,delete:Yf,get:Yf,getAll:Yf,has:Yf,set:Yf,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function IF(t,e,r){if(typeof e!="string"){if(Pze(e)||(e=e instanceof Blob?new n7([e],"blob",{type:e.type}):new t7(e,"blob",{type:e.type})),r!==void 0){let n={type:e.type,lastModified:e.lastModified};e=e instanceof s7?new n7([e],r,n):new t7(e,r,n)}}return{name:t,value:e}}i(IF,"makeEntry");o7.exports={FormData:zy,makeEntry:IF}});var d7=I((n$t,u7)=>{"use strict";var{isUSVString:i7,bufferToLowerCasedHeaderName:Qze}=He(),{utf8DecodeBytes:_ze}=zs(),{HTTP_TOKEN_CODEPOINTS:Dze,isomorphicDecode:a7}=ms(),{isFileLike:kze}=CF(),{makeEntry:Lze}=Vy(),ib=require("node:assert"),{File:Oze}=require("node:buffer"),Mze=globalThis.File??Oze,Fze=Buffer.from('form-data; name="'),c7=Buffer.from("; filename"),Uze=Buffer.from("--"),qze=Buffer.from(`--\r `);function Gze(t){for(let e=0;e70)return!1;for(let r=0;r=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}i(Hze,"validateBoundary");function $ze(t,e){ib(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),s=[],o={position:0};for(;t[o.position]===13&&t[o.position+1]===10;)o.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(o.position,o.position+n.length).equals(n))o.position+=n.length;else return"failure";if(o.position===t.length-2&&ab(t,Uze,o)||o.position===t.length-4&&ab(t,qze,o))return s;if(t[o.position]!==13||t[o.position+1]!==10)return"failure";o.position+=2;let c=zze(t,o);if(c==="failure")return"failure";let{name:l,filename:u,contentType:d,encoding:p}=c;o.position+=2;let m;{let A=t.indexOf(n.subarray(2),o.position);if(A===-1)return"failure";m=t.subarray(o.position,A-4),o.position+=m.length,p==="base64"&&(m=Buffer.from(m.toString(),"base64"))}if(t[o.position]!==13||t[o.position+1]!==10)return"failure";o.position+=2;let f;u!==null?(d??="text/plain",Gze(d)||(d=""),f=new Mze([m],u,{type:d})):f=_ze(Buffer.from(m)),ib(i7(l)),ib(typeof f=="string"&&i7(f)||kze(f)),s.push(Lze(l,f,u))}}i($ze,"multipartFormDataParser");function zze(t,e){let r=null,n=null,s=null,o=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:o};let a=Jf(c=>c!==10&&c!==13&&c!==58,t,e);if(a=wF(a,!0,!0,c=>c===9||c===32),!Dze.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,Jf(c=>c===32||c===9,t,e),Qze(a)){case"content-disposition":{if(r=n=null,!ab(t,Fze,e)||(e.position+=17,r=l7(t,e),r===null))return"failure";if(ab(t,c7,e)){let c=e.position+c7.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=l7(t,e),n===null))return"failure"}break}case"content-type":{let c=Jf(l=>l!==10&&l!==13,t,e);c=wF(c,!1,!0,l=>l===9||l===32),s=a7(c);break}case"content-transfer-encoding":{let c=Jf(l=>l!==10&&l!==13,t,e);c=wF(c,!1,!0,l=>l===9||l===32),o=a7(c);break}default:Jf(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}i(zze,"parseMultipartFormDataHeaders");function l7(t,e){ib(t[e.position-1]===34);let r=Jf(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,` -`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}i(l7,"parseMultipartFormDataName");function Jf(t,e,r){let n=r.position;for(;n0&&n(t[o]);)o--;return s===0&&o===t.length-1?t:t.subarray(s,o+1)}i(wF,"removeChars");function ab(t,e,r){if(t.length{"use strict";var Wy=He(),{ReadableStreamFrom:Vze,isBlobLike:p7,isReadableStreamLike:Wze,readableStreamClose:Yze,createDeferredPromise:Jze,fullyReadBody:jze,extractMimeType:Kze,utf8DecodeBytes:A7}=zs(),{FormData:m7}=Vy(),{kState:Kf}=Eu(),{webidl:Xze}=sn(),{Blob:Zze}=require("node:buffer"),SF=require("node:assert"),{isErrored:h7,isDisturbed:e3e}=require("node:stream"),{isArrayBuffer:t3e}=require("node:util/types"),{serializeAMimeType:r3e}=ms(),{multipartFormDataParser:n3e}=d7(),xF;try{let t=require("node:crypto");xF=i(e=>t.randomInt(0,e),"random")}catch{xF=i(t=>Math.floor(Math.random(t)),"random")}var cb=new TextEncoder;function s3e(){}i(s3e,"noop");var g7=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,y7;g7&&(y7=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!e3e(e)&&!h7(e)&&e.cancel("Response object has been garbage collected").catch(s3e)}));function E7(t,e=!1){let r=null;t instanceof ReadableStream?r=t:p7(t)?r=t.stream():r=new ReadableStream({async pull(l){let u=typeof s=="string"?cb.encode(s):s;u.byteLength&&l.enqueue(u),queueMicrotask(()=>Yze(l))},start(){},type:"bytes"}),SF(Wze(r));let n=null,s=null,o=null,a=null;if(typeof t=="string")s=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(t3e(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Wy.isFormDataLike(t)){let l=`----formdata-undici-0${`${xF(1e11)}`.padStart(11,"0")}`,u=`--${l}\r +`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}i(l7,"parseMultipartFormDataName");function Jf(t,e,r){let n=r.position;for(;n0&&n(t[o]);)o--;return s===0&&o===t.length-1?t:t.subarray(s,o+1)}i(wF,"removeChars");function ab(t,e,r){if(t.length{"use strict";var Wy=He(),{ReadableStreamFrom:Vze,isBlobLike:p7,isReadableStreamLike:Wze,readableStreamClose:Yze,createDeferredPromise:Jze,fullyReadBody:jze,extractMimeType:Kze,utf8DecodeBytes:A7}=zs(),{FormData:m7}=Vy(),{kState:Kf}=Eu(),{webidl:Xze}=sn(),{Blob:Zze}=require("node:buffer"),SF=require("node:assert"),{isErrored:h7,isDisturbed:e3e}=require("node:stream"),{isArrayBuffer:t3e}=require("node:util/types"),{serializeAMimeType:r3e}=ms(),{multipartFormDataParser:n3e}=d7(),xF;try{let t=require("node:crypto");xF=i(e=>t.randomInt(0,e),"random")}catch{xF=i(t=>Math.floor(Math.random(t)),"random")}var cb=new TextEncoder;function s3e(){}i(s3e,"noop");var g7=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,y7;g7&&(y7=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!e3e(e)&&!h7(e)&&e.cancel("Response object has been garbage collected").catch(s3e)}));function E7(t,e=!1){let r=null;t instanceof ReadableStream?r=t:p7(t)?r=t.stream():r=new ReadableStream({async pull(l){let u=typeof s=="string"?cb.encode(s):s;u.byteLength&&l.enqueue(u),queueMicrotask(()=>Yze(l))},start(){},type:"bytes"}),SF(Wze(r));let n=null,s=null,o=null,a=null;if(typeof t=="string")s=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(t3e(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Wy.isFormDataLike(t)){let l=`----formdata-undici-0${`${xF(1e11)}`.padStart(11,"0")}`,u=`--${l}\r Content-Disposition: form-data`;let d=i(E=>E.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),p=i(E=>E.replace(/\r?\n|\r/g,`\r `),"normalizeLinefeeds"),m=[],f=new Uint8Array([13,10]);o=0;let A=!1;for(let[E,C]of t)if(typeof C=="string"){let w=cb.encode(u+`; name="${d(p(E))}"\r \r @@ -11,7 +11,7 @@ ${p(C)}\r Content-Type: ${C.type||"application/octet-stream"}\r \r `);m.push(w,C,f),typeof C.size=="number"?o+=w.byteLength+C.size+f.byteLength:A=!0}let h=cb.encode(`--${l}--\r -`);m.push(h),o+=h.byteLength,A&&(o=null),s=t,n=i(async function*(){for(let E of m)E.stream?yield*E.stream():yield E},"action"),a=`multipart/form-data; boundary=${l}`}else if(p7(t))s=t,o=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Wy.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Vze(t)}if((typeof s=="string"||Wy.isBuffer(s))&&(o=Buffer.byteLength(s)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:d,done:p}=await l.next();if(p)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!h7(r)){let m=new Uint8Array(d);m.byteLength&&u.enqueue(m)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:s,length:o},a]}i(E7,"extractBody");function o3e(t,e=!1){return t instanceof ReadableStream&&(SF(!Wy.isDisturbed(t),"The body has already been consumed."),SF(!t.locked,"The stream is locked.")),E7(t,e)}i(o3e,"safelyExtractBody");function i3e(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}i(i3e,"cloneBody");function a3e(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}i(a3e,"throwIfAborted");function c3e(t){return{blob(){return jf(this,r=>{let n=f7(this);return n===null?n="":n&&(n=r3e(n)),new Zze([r],{type:n})},t)},arrayBuffer(){return jf(this,r=>new Uint8Array(r).buffer,t)},text(){return jf(this,A7,t)},json(){return jf(this,u3e,t)},formData(){return jf(this,r=>{let n=f7(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=n3e(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let o=new m7;return o[Kf]=s,o}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),o=new m7;for(let[a,c]of s)o.append(a,c);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return jf(this,r=>new Uint8Array(r),t)}}}i(c3e,"bodyMixinMethods");function l3e(t){Object.assign(t.prototype,c3e(t))}i(l3e,"mixinBody");async function jf(t,e,r){if(Xze.brandCheck(t,r),C7(t))throw new TypeError("Body is unusable: Body has already been read");a3e(t[Kf]);let n=Jze(),s=i(a=>n.reject(a),"errorSteps"),o=i(a=>{try{n.resolve(e(a))}catch(c){s(c)}},"successSteps");return t[Kf].body==null?(o(Buffer.allocUnsafe(0)),n.promise):(await jze(t[Kf].body,o,s),n.promise)}i(jf,"consumeBody");function C7(t){let e=t[Kf].body;return e!=null&&(e.stream.locked||Wy.isDisturbed(e.stream))}i(C7,"bodyUnusable");function u3e(t){return JSON.parse(A7(t))}i(u3e,"parseJSONFromBytes");function f7(t){let e=t[Kf].headersList,r=Kze(e);return r==="failure"?null:r}i(f7,"bodyMimeType");I7.exports={extractBody:E7,safelyExtractBody:o3e,cloneBody:i3e,mixinBody:l3e,streamRegistry:y7,hasFinalizationRegistry:g7,bodyUnusable:C7}});var O7=I((c$t,L7)=>{"use strict";var pe=require("node:assert"),Ee=He(),{channels:w7}=Ff(),bF=iF(),{RequestContentLengthMismatchError:yp,ResponseContentLengthMismatchError:S7,RequestAbortedError:P7,HeadersTimeoutError:d3e,HeadersOverflowError:p3e,SocketError:Zf,InformationalError:eA,BodyTimeoutError:m3e,HTTPParserError:f3e,ResponseExceededMaxSizeError:A3e}=rt(),{kUrl:Q7,kReset:fs,kClient:pb,kParser:Nt,kBlocking:jy,kRunning:Br,kPending:_7,kSize:x7,kWriting:Cu,kQueue:Si,kNoRef:Yy,kKeepAliveDefaultTimeout:h3e,kHostHeader:g3e,kPendingIdx:y3e,kRunningIdx:Po,kError:Un,kPipelining:mb,kSocket:Cp,kKeepAliveTimeoutValue:Ab,kMaxHeadersSize:BF,kKeepAliveMaxTimeout:E3e,kKeepAliveTimeoutThreshold:C3e,kHeadersTimeout:I3e,kBodyTimeout:w3e,kStrictContentLength:TF,kMaxRequests:b7,kCounter:S3e,kMaxResponseSize:x3e,kOnError:B7,kResume:hl,kHTTPContext:D7}=Lt(),Vs=yX(),R7=Buffer.alloc(0),lb=Buffer[Symbol.species],ub=Ee.addListener,b3e=Ee.removeAllListeners,Ip=Symbol("kIdleSocketValidation"),Ep=Symbol("kIdleSocketValidationTimeout"),_F=Symbol("kSocketUsed"),RF;async function B3e(){let t=process.env.JEST_WORKER_ID?lF():void 0,e;try{e=await WebAssembly.compile(IX())}catch{e=await WebAssembly.compile(t||lF())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:i((r,n,s)=>0,"wasm_on_url"),wasm_on_status:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onStatus(new lb(Ba.buffer,o,s))||0},"wasm_on_status"),wasm_on_message_begin:i(r=>(pe(tr.ptr===r),tr.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onHeaderField(new lb(Ba.buffer,o,s))||0},"wasm_on_header_field"),wasm_on_header_value:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onHeaderValue(new lb(Ba.buffer,o,s))||0},"wasm_on_header_value"),wasm_on_headers_complete:i((r,n,s,o)=>(pe(tr.ptr===r),tr.onHeadersComplete(n,!!s,!!o)||0),"wasm_on_headers_complete"),wasm_on_body:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onBody(new lb(Ba.buffer,o,s))||0},"wasm_on_body"),wasm_on_message_complete:i(r=>(pe(tr.ptr===r),tr.onMessageComplete()||0),"wasm_on_message_complete")}})}i(B3e,"lazyllhttp");var NF=null,vF=B3e();vF.catch();var tr=null,Ba=null,db=0,Ra=null,R3e=0,Jy=1,tA=2|Jy,fb=4|Jy,PF=8|R3e,QF=class{static{i(this,"Parser")}constructor(e,r,{exports:n}){pe(Number.isFinite(e[BF])&&e[BF]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Vs.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[BF],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[x3e]}setTimeout(e,r){e!==this.timeoutValue||r&Jy^this.timeoutType&Jy?(this.timeout&&(bF.clearTimeout(this.timeout),this.timeout=null),e&&(r&Jy?this.timeout=bF.setFastTimeout(N7,e,new WeakRef(this)):(this.timeout=setTimeout(N7,e,new WeakRef(this)),this.timeout.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=r}resume(){this.socket.destroyed||!this.paused||(pe(this.ptr!=null),pe(tr==null),this.llhttp.llhttp_resume(this.ptr),pe(this.timeoutType===fb),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||R7),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){pe(this.ptr!=null),pe(tr==null),pe(!this.paused);let{socket:r,llhttp:n}=this;e.length>db&&(Ra&&n.free(Ra),db=Math.ceil(e.length/4096)*4096,Ra=n.malloc(db)),new Uint8Array(n.memory.buffer,Ra,db).set(e);try{let s;try{Ba=e,tr=this,s=n.llhttp_execute(this.ptr,Ra,e.length)}catch(a){throw a}finally{tr=null,Ba=null}let o=n.llhttp_get_error_pos(this.ptr)-Ra;if(s!==Vs.ERROR.OK){let a=e.subarray(o);if(s===Vs.ERROR.PAUSED_UPGRADE)this.onUpgrade(a);else if(s===Vs.ERROR.PAUSED)this.paused=!0,r.unshift(a);else throw this.createError(s,a)}}catch(s){Ee.destroy(r,s)}}finish(){pe(tr===null),pe(this.ptr!=null),pe(!this.paused);let{llhttp:e}=this,r;try{tr=this,r=e.llhttp_finish(this.ptr)}finally{tr=null}return r===Vs.ERROR.OK?null:r===Vs.ERROR.PAUSED||r===Vs.ERROR.PAUSED_UPGRADE?(this.paused=!0,null):this.createError(r,R7)}createError(e,r){let{llhttp:n,contentLength:s,bytesRead:o}=this;if(s&&o!==parseInt(s,10))return new S7;let a=n.llhttp_get_error_reason(this.ptr),c="";if(a){let l=new Uint8Array(n.memory.buffer,a).indexOf(0);c="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,a,l).toString()+")"}return new f3e(c,Vs.ERROR[e],r)}destroy(){pe(this.ptr!=null),pe(tr==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&bF.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){this.statusText=e.toString()}onMessageBegin(){let{socket:e,client:r}=this;if(e.destroyed)return-1;if(r[Br]===0)return Ee.destroy(e,new Zf("bad response",Ee.getSocketInfo(e))),-1;let n=r[Si][r[Po]];if(!n)return-1;n.onResponseStarted()}onHeaderField(e){let r=this.headers.length;(r&1)===0?this.headers.push(e):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]),this.trackHeader(e.length)}onHeaderValue(e){let r=this.headers.length;(r&1)===1?(this.headers.push(e),r+=1):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]);let n=this.headers[r-2];if(n.length===10){let s=Ee.bufferToLowerCasedHeaderName(n);s==="keep-alive"?this.keepAlive+=e.toString():s==="connection"&&(this.connection+=e.toString())}else n.length===14&&Ee.bufferToLowerCasedHeaderName(n)==="content-length"&&(this.contentLength+=e.toString());this.trackHeader(e.length)}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&Ee.destroy(this.socket,new p3e)}onUpgrade(e){let{upgrade:r,client:n,socket:s,headers:o,statusCode:a}=this;pe(r),pe(n[Cp]===s),pe(!s.destroyed),pe(!this.paused),pe((o.length&1)===0);let c=n[Si][n[Po]];pe(c),pe(c.upgrade||c.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,s.unshift(e),s[Nt].destroy(),s[Nt]=null,s[pb]=null,s[Un]=null,b3e(s),n[Cp]=null,n[D7]=null,n[Si][n[Po]++]=null,n.emit("disconnect",n[Q7],[n],new eA("upgrade"));try{c.onUpgrade(a,o,s)}catch(l){Ee.destroy(s,l)}n[hl]()}onHeadersComplete(e,r,n){let{client:s,socket:o,headers:a,statusText:c}=this;if(o.destroyed)return-1;if(s[Br]===0)return Ee.destroy(o,new Zf("bad response",Ee.getSocketInfo(o))),-1;let l=s[Si][s[Po]];if(!l)return-1;if(pe(!this.upgrade),pe(this.statusCode<200),e===100)return Ee.destroy(o,new Zf("bad response",Ee.getSocketInfo(o))),-1;if(r&&!l.upgrade)return Ee.destroy(o,new Zf("bad upgrade",Ee.getSocketInfo(o))),-1;if(pe(this.timeoutType===tA),this.statusCode=e,this.shouldKeepAlive=n||l.method==="HEAD"&&!o[fs]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let d=l.bodyTimeout!=null?l.bodyTimeout:s[w3e];this.setTimeout(d,fb)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(l.method==="CONNECT")return pe(s[Br]===1),this.upgrade=!0,2;if(r)return pe(s[Br]===1),this.upgrade=!0,2;if(pe((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&s[mb]){let d=this.keepAlive?Ee.parseKeepAliveTimeout(this.keepAlive):null;if(d!=null){let p=Math.min(d-s[C3e],s[E3e]);p<=0?o[fs]=!0:s[Ab]=p}else s[Ab]=s[h3e]}else o[fs]=!0;let u=l.onHeaders(e,a,this.resume,c)===!1;return l.aborted?-1:l.method==="HEAD"||e<200?1:(o[jy]&&(o[jy]=!1,s[hl]()),u?Vs.ERROR.PAUSED:0)}onBody(e){let{client:r,socket:n,statusCode:s,maxResponseSize:o}=this;if(n.destroyed)return-1;let a=r[Si][r[Po]];if(pe(a),pe(this.timeoutType===fb),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),pe(s>=200),o>-1&&this.bytesRead+e.length>o)return Ee.destroy(n,new A3e),-1;if(this.bytesRead+=e.length,a.onData(e)===!1)return Vs.ERROR.PAUSED}onMessageComplete(){let{client:e,socket:r,statusCode:n,upgrade:s,headers:o,contentLength:a,bytesRead:c,shouldKeepAlive:l}=this;if(r.destroyed&&(!n||l))return-1;if(s)return;pe(n>=100),pe((this.headers.length&1)===0);let u=e[Si][e[Po]];if(pe(u),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,!(n<200)){if(u.method!=="HEAD"&&a&&c!==parseInt(a,10))return Ee.destroy(r,new S7),-1;if(u.onComplete(o),e[Si][e[Po]++]=null,r[_F]=!0,r[Cu])return pe(e[Br]===0),Ee.destroy(r,new eA("reset")),Vs.ERROR.PAUSED;if(l){if(r[fs]&&e[Br]===0)return Ee.destroy(r,new eA("reset")),Vs.ERROR.PAUSED;e[mb]==null||e[mb]===1?setImmediate(()=>e[hl]()):e[hl]()}else return Ee.destroy(r,new eA("reset")),Vs.ERROR.PAUSED}}};function N7(t){let{socket:e,timeoutType:r,client:n,paused:s}=t.deref();r===tA?(!e[Cu]||e.writableNeedDrain||n[Br]>1)&&(pe(!s,"cannot be paused while waiting for headers"),Ee.destroy(e,new d3e)):r===fb?s||Ee.destroy(e,new m3e):r===PF&&(pe(n[Br]===0&&n[Ab]),Ee.destroy(e,new eA("socket idle timeout")))}i(N7,"onParserTimeout");async function N3e(t,e){t[Cp]=e,NF||(NF=await vF,vF=null),e[Yy]=!1,e[Cu]=!1,e[fs]=!1,e[jy]=!1,e[Ip]=0,e[Ep]=null,e[_F]=!1,e[Nt]=new QF(t,e,NF),ub(e,"error",function(n){pe(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let s=this[Nt];if(n.code==="ECONNRESET"&&s.statusCode&&!s.shouldKeepAlive){let o=s.finish();o&&(this[Un]=o,this[pb][B7](o));return}this[Un]=n,this[pb][B7](n)}),ub(e,"readable",function(){let n=this[Nt];n&&n.readMore()}),ub(e,"end",function(){let n=this[Nt];if(n.statusCode&&!n.shouldKeepAlive){let s=n.finish();s&&Ee.destroy(this,s);return}Ee.destroy(this,new Zf("other side closed",Ee.getSocketInfo(this)))}),ub(e,"close",function(){let n=this[pb],s=this[Nt];k7(this),s&&(!this[Un]&&s.statusCode&&!s.shouldKeepAlive&&(this[Un]=s.finish()||this[Un]),this[Nt].destroy(),this[Nt]=null);let o=this[Un]||new Zf("closed",Ee.getSocketInfo(this));if(n[Cp]=null,n[D7]=null,n.destroyed){pe(n[_7]===0);let a=n[Si].splice(n[Po]);for(let c=0;c0&&o.code!=="UND_ERR_INFO"){let a=n[Si][n[Po]];n[Si][n[Po]++]=null,Ee.errorRequest(n,a,o)}n[y3e]=n[Po],pe(n[Br]===0),n.emit("disconnect",n[Q7],[n],o),n[hl]()});let r=!1;return e.on("close",()=>{r=!0}),{version:"h1",defaultPipelining:1,write(...n){return Q3e(t,...n)},resume(){v3e(t)},destroy(n,s){r?queueMicrotask(s):e.destroy(n).on("close",s)},get destroyed(){return e.destroyed},busy(n){return!!(e[Cu]||e[fs]||e[jy]||e[Ip]===1||n&&(t[Br]>0&&!n.idempotent||t[Br]>0&&(n.upgrade||n.method==="CONNECT")||t[Br]>0&&Ee.bodyLength(n.body)!==0&&(Ee.isStream(n.body)||Ee.isAsyncIterable(n.body)||Ee.isFormDataLike(n.body))))}}}i(N3e,"connectH1");function k7(t){t[Ep]&&(clearTimeout(t[Ep]),t[Ep]=null),t[Ip]=0}i(k7,"clearIdleSocketValidation");function T3e(t,e){e[Ip]=1,e[Ep]=setTimeout(()=>{e[Ep]=null,e[Ip]=2,t[Cp]===e&&!e.destroyed&&t[hl]()},0),e[Ep].unref?.()}i(T3e,"scheduleIdleSocketValidation");function v3e(t){let e=t[Cp];if(e&&!e.destroyed){if(t[x7]===0?!e[Yy]&&e.unref&&(e.unref(),e[Yy]=!0):e[Yy]&&e.ref&&(e.ref(),e[Yy]=!1),t[Br]===0&&t[_7]>0&&e[_F]){if(e[Ip]===0)return T3e(t,e),e[Nt].readMore(),e.destroyed,void 0;if(e[Ip]===1)return e[Nt].readMore(),e.destroyed,void 0}if(t[Br]===0&&(e[Nt].readMore(),e.destroyed))return;if(t[x7]===0)e[Nt].timeoutType!==PF&&e[Nt].setTimeout(t[Ab],PF);else if(t[Br]>0&&e[Nt].statusCode<200&&e[Nt].timeoutType!==tA){let r=t[Si][t[Po]],n=r.headersTimeout!=null?r.headersTimeout:t[I3e];e[Nt].setTimeout(n,tA)}}}i(v3e,"resumeH1");function P3e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}i(P3e,"shouldSendContentLength");function Q3e(t,e){let{method:r,path:n,host:s,upgrade:o,blocking:a,reset:c}=e,{body:l,headers:u,contentLength:d}=e,p=r==="PUT"||r==="POST"||r==="PATCH"||r==="QUERY"||r==="PROPFIND"||r==="PROPPATCH";if(Ee.isFormDataLike(l)){RF||(RF=Xf().extractBody);let[E,C]=RF(l);e.contentType==null&&u.push("content-type",C),l=E.stream,d=E.length}else Ee.isBlobLike(l)&&e.contentType==null&&l.type&&u.push("content-type",l.type);l&&typeof l.read=="function"&&l.read(0);let m=Ee.bodyLength(l);if(d=m??d,d===null&&(d=e.contentLength),d===0&&!p&&(d=null),P3e(r)&&d>0&&e.contentLength!==null&&e.contentLength!==d){if(t[TF])return Ee.errorRequest(t,e,new yp),!1;process.emitWarning(new yp)}let f=t[Cp];k7(f);let A=i(E=>{e.aborted||e.completed||(Ee.errorRequest(t,e,E||new P7),Ee.destroy(l),Ee.destroy(f,new eA("aborted")))},"abort");try{e.onConnect(A)}catch(E){Ee.errorRequest(t,e,E)}if(e.aborted)return!1;r==="HEAD"&&(f[fs]=!0),(o||r==="CONNECT")&&(f[fs]=!0),c!=null&&(f[fs]=c),t[b7]&&f[S3e]++>=t[b7]&&(f[fs]=!0),a&&(f[jy]=!0);let h=`${r} ${n} HTTP/1.1\r +`);m.push(h),o+=h.byteLength,A&&(o=null),s=t,n=i(async function*(){for(let E of m)E.stream?yield*E.stream():yield E},"action"),a=`multipart/form-data; boundary=${l}`}else if(p7(t))s=t,o=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Wy.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Vze(t)}if((typeof s=="string"||Wy.isBuffer(s))&&(o=Buffer.byteLength(s)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:d,done:p}=await l.next();if(p)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!h7(r)){let m=new Uint8Array(d);m.byteLength&&u.enqueue(m)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:s,length:o},a]}i(E7,"extractBody");function o3e(t,e=!1){return t instanceof ReadableStream&&(SF(!Wy.isDisturbed(t),"The body has already been consumed."),SF(!t.locked,"The stream is locked.")),E7(t,e)}i(o3e,"safelyExtractBody");function i3e(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}i(i3e,"cloneBody");function a3e(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}i(a3e,"throwIfAborted");function c3e(t){return{blob(){return jf(this,r=>{let n=f7(this);return n===null?n="":n&&(n=r3e(n)),new Zze([r],{type:n})},t)},arrayBuffer(){return jf(this,r=>new Uint8Array(r).buffer,t)},text(){return jf(this,A7,t)},json(){return jf(this,u3e,t)},formData(){return jf(this,r=>{let n=f7(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=n3e(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let o=new m7;return o[Kf]=s,o}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),o=new m7;for(let[a,c]of s)o.append(a,c);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return jf(this,r=>new Uint8Array(r),t)}}}i(c3e,"bodyMixinMethods");function l3e(t){Object.assign(t.prototype,c3e(t))}i(l3e,"mixinBody");async function jf(t,e,r){if(Xze.brandCheck(t,r),C7(t))throw new TypeError("Body is unusable: Body has already been read");a3e(t[Kf]);let n=Jze(),s=i(a=>n.reject(a),"errorSteps"),o=i(a=>{try{n.resolve(e(a))}catch(c){s(c)}},"successSteps");return t[Kf].body==null?(o(Buffer.allocUnsafe(0)),n.promise):(await jze(t[Kf].body,o,s),n.promise)}i(jf,"consumeBody");function C7(t){let e=t[Kf].body;return e!=null&&(e.stream.locked||Wy.isDisturbed(e.stream))}i(C7,"bodyUnusable");function u3e(t){return JSON.parse(A7(t))}i(u3e,"parseJSONFromBytes");function f7(t){let e=t[Kf].headersList,r=Kze(e);return r==="failure"?null:r}i(f7,"bodyMimeType");I7.exports={extractBody:E7,safelyExtractBody:o3e,cloneBody:i3e,mixinBody:l3e,streamRegistry:y7,hasFinalizationRegistry:g7,bodyUnusable:C7}});var O7=I((a$t,L7)=>{"use strict";var pe=require("node:assert"),Ee=He(),{channels:w7}=Ff(),bF=iF(),{RequestContentLengthMismatchError:yp,ResponseContentLengthMismatchError:S7,RequestAbortedError:P7,HeadersTimeoutError:d3e,HeadersOverflowError:p3e,SocketError:Zf,InformationalError:eA,BodyTimeoutError:m3e,HTTPParserError:f3e,ResponseExceededMaxSizeError:A3e}=rt(),{kUrl:Q7,kReset:fs,kClient:pb,kParser:Nt,kBlocking:jy,kRunning:Br,kPending:_7,kSize:x7,kWriting:Cu,kQueue:Si,kNoRef:Yy,kKeepAliveDefaultTimeout:h3e,kHostHeader:g3e,kPendingIdx:y3e,kRunningIdx:Po,kError:Un,kPipelining:mb,kSocket:Cp,kKeepAliveTimeoutValue:Ab,kMaxHeadersSize:BF,kKeepAliveMaxTimeout:E3e,kKeepAliveTimeoutThreshold:C3e,kHeadersTimeout:I3e,kBodyTimeout:w3e,kStrictContentLength:TF,kMaxRequests:b7,kCounter:S3e,kMaxResponseSize:x3e,kOnError:B7,kResume:hl,kHTTPContext:D7}=Lt(),Vs=yX(),R7=Buffer.alloc(0),lb=Buffer[Symbol.species],ub=Ee.addListener,b3e=Ee.removeAllListeners,Ip=Symbol("kIdleSocketValidation"),Ep=Symbol("kIdleSocketValidationTimeout"),_F=Symbol("kSocketUsed"),RF;async function B3e(){let t=process.env.JEST_WORKER_ID?lF():void 0,e;try{e=await WebAssembly.compile(IX())}catch{e=await WebAssembly.compile(t||lF())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:i((r,n,s)=>0,"wasm_on_url"),wasm_on_status:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onStatus(new lb(Ba.buffer,o,s))||0},"wasm_on_status"),wasm_on_message_begin:i(r=>(pe(tr.ptr===r),tr.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onHeaderField(new lb(Ba.buffer,o,s))||0},"wasm_on_header_field"),wasm_on_header_value:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onHeaderValue(new lb(Ba.buffer,o,s))||0},"wasm_on_header_value"),wasm_on_headers_complete:i((r,n,s,o)=>(pe(tr.ptr===r),tr.onHeadersComplete(n,!!s,!!o)||0),"wasm_on_headers_complete"),wasm_on_body:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onBody(new lb(Ba.buffer,o,s))||0},"wasm_on_body"),wasm_on_message_complete:i(r=>(pe(tr.ptr===r),tr.onMessageComplete()||0),"wasm_on_message_complete")}})}i(B3e,"lazyllhttp");var NF=null,vF=B3e();vF.catch();var tr=null,Ba=null,db=0,Ra=null,R3e=0,Jy=1,tA=2|Jy,fb=4|Jy,PF=8|R3e,QF=class{static{i(this,"Parser")}constructor(e,r,{exports:n}){pe(Number.isFinite(e[BF])&&e[BF]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Vs.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[BF],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[x3e]}setTimeout(e,r){e!==this.timeoutValue||r&Jy^this.timeoutType&Jy?(this.timeout&&(bF.clearTimeout(this.timeout),this.timeout=null),e&&(r&Jy?this.timeout=bF.setFastTimeout(N7,e,new WeakRef(this)):(this.timeout=setTimeout(N7,e,new WeakRef(this)),this.timeout.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=r}resume(){this.socket.destroyed||!this.paused||(pe(this.ptr!=null),pe(tr==null),this.llhttp.llhttp_resume(this.ptr),pe(this.timeoutType===fb),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||R7),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(e===null)break;this.execute(e)}}execute(e){pe(this.ptr!=null),pe(tr==null),pe(!this.paused);let{socket:r,llhttp:n}=this;e.length>db&&(Ra&&n.free(Ra),db=Math.ceil(e.length/4096)*4096,Ra=n.malloc(db)),new Uint8Array(n.memory.buffer,Ra,db).set(e);try{let s;try{Ba=e,tr=this,s=n.llhttp_execute(this.ptr,Ra,e.length)}catch(a){throw a}finally{tr=null,Ba=null}let o=n.llhttp_get_error_pos(this.ptr)-Ra;if(s!==Vs.ERROR.OK){let a=e.subarray(o);if(s===Vs.ERROR.PAUSED_UPGRADE)this.onUpgrade(a);else if(s===Vs.ERROR.PAUSED)this.paused=!0,r.unshift(a);else throw this.createError(s,a)}}catch(s){Ee.destroy(r,s)}}finish(){pe(tr===null),pe(this.ptr!=null),pe(!this.paused);let{llhttp:e}=this,r;try{tr=this,r=e.llhttp_finish(this.ptr)}finally{tr=null}return r===Vs.ERROR.OK?null:r===Vs.ERROR.PAUSED||r===Vs.ERROR.PAUSED_UPGRADE?(this.paused=!0,null):this.createError(r,R7)}createError(e,r){let{llhttp:n,contentLength:s,bytesRead:o}=this;if(s&&o!==parseInt(s,10))return new S7;let a=n.llhttp_get_error_reason(this.ptr),c="";if(a){let l=new Uint8Array(n.memory.buffer,a).indexOf(0);c="Response does not match the HTTP/1.1 protocol ("+Buffer.from(n.memory.buffer,a,l).toString()+")"}return new f3e(c,Vs.ERROR[e],r)}destroy(){pe(this.ptr!=null),pe(tr==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&bF.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){this.statusText=e.toString()}onMessageBegin(){let{socket:e,client:r}=this;if(e.destroyed)return-1;if(r[Br]===0)return Ee.destroy(e,new Zf("bad response",Ee.getSocketInfo(e))),-1;let n=r[Si][r[Po]];if(!n)return-1;n.onResponseStarted()}onHeaderField(e){let r=this.headers.length;(r&1)===0?this.headers.push(e):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]),this.trackHeader(e.length)}onHeaderValue(e){let r=this.headers.length;(r&1)===1?(this.headers.push(e),r+=1):this.headers[r-1]=Buffer.concat([this.headers[r-1],e]);let n=this.headers[r-2];if(n.length===10){let s=Ee.bufferToLowerCasedHeaderName(n);s==="keep-alive"?this.keepAlive+=e.toString():s==="connection"&&(this.connection+=e.toString())}else n.length===14&&Ee.bufferToLowerCasedHeaderName(n)==="content-length"&&(this.contentLength+=e.toString());this.trackHeader(e.length)}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&Ee.destroy(this.socket,new p3e)}onUpgrade(e){let{upgrade:r,client:n,socket:s,headers:o,statusCode:a}=this;pe(r),pe(n[Cp]===s),pe(!s.destroyed),pe(!this.paused),pe((o.length&1)===0);let c=n[Si][n[Po]];pe(c),pe(c.upgrade||c.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,s.unshift(e),s[Nt].destroy(),s[Nt]=null,s[pb]=null,s[Un]=null,b3e(s),n[Cp]=null,n[D7]=null,n[Si][n[Po]++]=null,n.emit("disconnect",n[Q7],[n],new eA("upgrade"));try{c.onUpgrade(a,o,s)}catch(l){Ee.destroy(s,l)}n[hl]()}onHeadersComplete(e,r,n){let{client:s,socket:o,headers:a,statusText:c}=this;if(o.destroyed)return-1;if(s[Br]===0)return Ee.destroy(o,new Zf("bad response",Ee.getSocketInfo(o))),-1;let l=s[Si][s[Po]];if(!l)return-1;if(pe(!this.upgrade),pe(this.statusCode<200),e===100)return Ee.destroy(o,new Zf("bad response",Ee.getSocketInfo(o))),-1;if(r&&!l.upgrade)return Ee.destroy(o,new Zf("bad upgrade",Ee.getSocketInfo(o))),-1;if(pe(this.timeoutType===tA),this.statusCode=e,this.shouldKeepAlive=n||l.method==="HEAD"&&!o[fs]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let d=l.bodyTimeout!=null?l.bodyTimeout:s[w3e];this.setTimeout(d,fb)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(l.method==="CONNECT")return pe(s[Br]===1),this.upgrade=!0,2;if(r)return pe(s[Br]===1),this.upgrade=!0,2;if(pe((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&s[mb]){let d=this.keepAlive?Ee.parseKeepAliveTimeout(this.keepAlive):null;if(d!=null){let p=Math.min(d-s[C3e],s[E3e]);p<=0?o[fs]=!0:s[Ab]=p}else s[Ab]=s[h3e]}else o[fs]=!0;let u=l.onHeaders(e,a,this.resume,c)===!1;return l.aborted?-1:l.method==="HEAD"||e<200?1:(o[jy]&&(o[jy]=!1,s[hl]()),u?Vs.ERROR.PAUSED:0)}onBody(e){let{client:r,socket:n,statusCode:s,maxResponseSize:o}=this;if(n.destroyed)return-1;let a=r[Si][r[Po]];if(pe(a),pe(this.timeoutType===fb),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),pe(s>=200),o>-1&&this.bytesRead+e.length>o)return Ee.destroy(n,new A3e),-1;if(this.bytesRead+=e.length,a.onData(e)===!1)return Vs.ERROR.PAUSED}onMessageComplete(){let{client:e,socket:r,statusCode:n,upgrade:s,headers:o,contentLength:a,bytesRead:c,shouldKeepAlive:l}=this;if(r.destroyed&&(!n||l))return-1;if(s)return;pe(n>=100),pe((this.headers.length&1)===0);let u=e[Si][e[Po]];if(pe(u),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,!(n<200)){if(u.method!=="HEAD"&&a&&c!==parseInt(a,10))return Ee.destroy(r,new S7),-1;if(u.onComplete(o),e[Si][e[Po]++]=null,r[_F]=!0,r[Cu])return pe(e[Br]===0),Ee.destroy(r,new eA("reset")),Vs.ERROR.PAUSED;if(l){if(r[fs]&&e[Br]===0)return Ee.destroy(r,new eA("reset")),Vs.ERROR.PAUSED;e[mb]==null||e[mb]===1?setImmediate(()=>e[hl]()):e[hl]()}else return Ee.destroy(r,new eA("reset")),Vs.ERROR.PAUSED}}};function N7(t){let{socket:e,timeoutType:r,client:n,paused:s}=t.deref();r===tA?(!e[Cu]||e.writableNeedDrain||n[Br]>1)&&(pe(!s,"cannot be paused while waiting for headers"),Ee.destroy(e,new d3e)):r===fb?s||Ee.destroy(e,new m3e):r===PF&&(pe(n[Br]===0&&n[Ab]),Ee.destroy(e,new eA("socket idle timeout")))}i(N7,"onParserTimeout");async function N3e(t,e){t[Cp]=e,NF||(NF=await vF,vF=null),e[Yy]=!1,e[Cu]=!1,e[fs]=!1,e[jy]=!1,e[Ip]=0,e[Ep]=null,e[_F]=!1,e[Nt]=new QF(t,e,NF),ub(e,"error",function(n){pe(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let s=this[Nt];if(n.code==="ECONNRESET"&&s.statusCode&&!s.shouldKeepAlive){let o=s.finish();o&&(this[Un]=o,this[pb][B7](o));return}this[Un]=n,this[pb][B7](n)}),ub(e,"readable",function(){let n=this[Nt];n&&n.readMore()}),ub(e,"end",function(){let n=this[Nt];if(n.statusCode&&!n.shouldKeepAlive){let s=n.finish();s&&Ee.destroy(this,s);return}Ee.destroy(this,new Zf("other side closed",Ee.getSocketInfo(this)))}),ub(e,"close",function(){let n=this[pb],s=this[Nt];k7(this),s&&(!this[Un]&&s.statusCode&&!s.shouldKeepAlive&&(this[Un]=s.finish()||this[Un]),this[Nt].destroy(),this[Nt]=null);let o=this[Un]||new Zf("closed",Ee.getSocketInfo(this));if(n[Cp]=null,n[D7]=null,n.destroyed){pe(n[_7]===0);let a=n[Si].splice(n[Po]);for(let c=0;c0&&o.code!=="UND_ERR_INFO"){let a=n[Si][n[Po]];n[Si][n[Po]++]=null,Ee.errorRequest(n,a,o)}n[y3e]=n[Po],pe(n[Br]===0),n.emit("disconnect",n[Q7],[n],o),n[hl]()});let r=!1;return e.on("close",()=>{r=!0}),{version:"h1",defaultPipelining:1,write(...n){return Q3e(t,...n)},resume(){v3e(t)},destroy(n,s){r?queueMicrotask(s):e.destroy(n).on("close",s)},get destroyed(){return e.destroyed},busy(n){return!!(e[Cu]||e[fs]||e[jy]||e[Ip]===1||n&&(t[Br]>0&&!n.idempotent||t[Br]>0&&(n.upgrade||n.method==="CONNECT")||t[Br]>0&&Ee.bodyLength(n.body)!==0&&(Ee.isStream(n.body)||Ee.isAsyncIterable(n.body)||Ee.isFormDataLike(n.body))))}}}i(N3e,"connectH1");function k7(t){t[Ep]&&(clearTimeout(t[Ep]),t[Ep]=null),t[Ip]=0}i(k7,"clearIdleSocketValidation");function T3e(t,e){e[Ip]=1,e[Ep]=setTimeout(()=>{e[Ep]=null,e[Ip]=2,t[Cp]===e&&!e.destroyed&&t[hl]()},0),e[Ep].unref?.()}i(T3e,"scheduleIdleSocketValidation");function v3e(t){let e=t[Cp];if(e&&!e.destroyed){if(t[x7]===0?!e[Yy]&&e.unref&&(e.unref(),e[Yy]=!0):e[Yy]&&e.ref&&(e.ref(),e[Yy]=!1),t[Br]===0&&t[_7]>0&&e[_F]){if(e[Ip]===0)return T3e(t,e),e[Nt].readMore(),e.destroyed,void 0;if(e[Ip]===1)return e[Nt].readMore(),e.destroyed,void 0}if(t[Br]===0&&(e[Nt].readMore(),e.destroyed))return;if(t[x7]===0)e[Nt].timeoutType!==PF&&e[Nt].setTimeout(t[Ab],PF);else if(t[Br]>0&&e[Nt].statusCode<200&&e[Nt].timeoutType!==tA){let r=t[Si][t[Po]],n=r.headersTimeout!=null?r.headersTimeout:t[I3e];e[Nt].setTimeout(n,tA)}}}i(v3e,"resumeH1");function P3e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}i(P3e,"shouldSendContentLength");function Q3e(t,e){let{method:r,path:n,host:s,upgrade:o,blocking:a,reset:c}=e,{body:l,headers:u,contentLength:d}=e,p=r==="PUT"||r==="POST"||r==="PATCH"||r==="QUERY"||r==="PROPFIND"||r==="PROPPATCH";if(Ee.isFormDataLike(l)){RF||(RF=Xf().extractBody);let[E,C]=RF(l);e.contentType==null&&u.push("content-type",C),l=E.stream,d=E.length}else Ee.isBlobLike(l)&&e.contentType==null&&l.type&&u.push("content-type",l.type);l&&typeof l.read=="function"&&l.read(0);let m=Ee.bodyLength(l);if(d=m??d,d===null&&(d=e.contentLength),d===0&&!p&&(d=null),P3e(r)&&d>0&&e.contentLength!==null&&e.contentLength!==d){if(t[TF])return Ee.errorRequest(t,e,new yp),!1;process.emitWarning(new yp)}let f=t[Cp];k7(f);let A=i(E=>{e.aborted||e.completed||(Ee.errorRequest(t,e,E||new P7),Ee.destroy(l),Ee.destroy(f,new eA("aborted")))},"abort");try{e.onConnect(A)}catch(E){Ee.errorRequest(t,e,E)}if(e.aborted)return!1;r==="HEAD"&&(f[fs]=!0),(o||r==="CONNECT")&&(f[fs]=!0),c!=null&&(f[fs]=c),t[b7]&&f[S3e]++>=t[b7]&&(f[fs]=!0),a&&(f[jy]=!0);let h=`${r} ${n} HTTP/1.1\r `;if(typeof s=="string"?h+=`host: ${s}\r `:h+=t[g3e],o?h+=`connection: upgrade\r upgrade: ${o}\r @@ -37,18 +37,18 @@ ${u.toString(16)}\r `,"latin1"):r===null&&e.write(`\r 0\r \r -`,"latin1"),r!==null&&s!==r){if(n[TF])throw new yp;process.emitWarning(new yp)}e[Nt].timeout&&e[Nt].timeoutType===tA&&e[Nt].timeout.refresh&&e[Nt].timeout.refresh(),n[hl]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Cu]=!1,e&&(pe(n[Br]<=1,"pipeline should only contain this request"),s(e))}};L7.exports=N3e});var z7=I((u$t,$7)=>{"use strict";var Qo=require("node:assert"),{pipeline:k3e}=require("node:stream"),We=He(),{RequestContentLengthMismatchError:DF,RequestAbortedError:M7,SocketError:Ky,InformationalError:kF}=rt(),{kUrl:gb,kReset:Eb,kClient:rA,kRunning:Cb,kPending:L3e,kQueue:Iu,kPendingIdx:LF,kRunningIdx:xi,kError:Bi,kSocket:Vr,kStrictContentLength:O3e,kOnError:OF,kMaxConcurrentStreams:H7,kHTTP2Session:bi,kResume:wu,kSize:M3e,kHTTPContext:F3e}=Lt(),gl=Symbol("open streams"),F7,U7=!1,yb;try{yb=require("node:http2")}catch{yb={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:U3e,HTTP2_HEADER_METHOD:q3e,HTTP2_HEADER_PATH:G3e,HTTP2_HEADER_SCHEME:H3e,HTTP2_HEADER_CONTENT_LENGTH:$3e,HTTP2_HEADER_EXPECT:z3e,HTTP2_HEADER_STATUS:V3e}}=yb;function W3e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}i(W3e,"parseH2Headers");async function Y3e(t,e){t[Vr]=e,U7||(U7=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=yb.connect(t[gb],{createConnection:i(()=>e,"createConnection"),peerMaxConcurrentStreams:t[H7]});r[gl]=0,r[rA]=t,r[Vr]=e,We.addListener(r,"error",j3e),We.addListener(r,"frameError",K3e),We.addListener(r,"end",X3e),We.addListener(r,"goaway",Z3e),We.addListener(r,"close",function(){let{[rA]:s}=this,{[Vr]:o}=s,a=this[Vr][Bi]||this[Bi]||new Ky("closed",We.getSocketInfo(o));if(s[bi]=null,s.destroyed){Qo(s[L3e]===0);let c=s[Iu].splice(s[xi]);for(let l=0;l{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return tVe(t,...s)},resume(){J3e(t)},destroy(s,o){n?queueMicrotask(o):e.destroy(s).on("close",o)},get destroyed(){return e.destroyed},busy(){return!1}}}i(Y3e,"connectH2");function J3e(t){let e=t[Vr];e?.destroyed===!1&&(t[M3e]===0&&t[H7]===0?(e.unref(),t[bi].unref()):(e.ref(),t[bi].ref()))}i(J3e,"resumeH2");function j3e(t){Qo(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Vr][Bi]=t,this[rA][OF](t)}i(j3e,"onHttp2SessionError");function K3e(t,e,r){if(r===0){let n=new kF(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Vr][Bi]=n,this[rA][OF](n)}}i(K3e,"onHttp2FrameError");function X3e(){let t=new Ky("other side closed",We.getSocketInfo(this[Vr]));this.destroy(t),We.destroy(this[Vr],t)}i(X3e,"onHttp2SessionEnd");function Z3e(t){let e=this[Bi]||new Ky(`HTTP/2: "GOAWAY" frame received with code ${t}`,We.getSocketInfo(this)),r=this[rA];if(r[Vr]=null,r[F3e]=null,this[bi]!=null&&(this[bi].destroy(e),this[bi]=null),We.destroy(this[Vr],e),r[xi]{e.aborted||e.completed||(b=b||new M7,We.errorRequest(t,e,b),m!=null&&We.destroy(m,b),We.destroy(d,b),t[Iu][t[xi]++]=null,t[wu]())},"abort");try{e.onConnect(h)}catch(b){We.errorRequest(t,e,b)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),m=r.request(p,{endStream:!1,signal:l}),m.id&&!m.pending?(e.onUpgrade(null,null,m),++r[gl],t[Iu][t[xi]++]=null):m.once("ready",()=>{e.onUpgrade(null,null,m),++r[gl],t[Iu][t[xi]++]=null}),m.once("close",()=>{r[gl]-=1,r[gl]===0&&r.unref()}),!0;p[G3e]=s,p[H3e]="https";let E=n==="PUT"||n==="POST"||n==="PATCH";d&&typeof d.read=="function"&&d.read(0);let C=We.bodyLength(d);if(We.isFormDataLike(d)){F7??=Xf().extractBody;let[b,N]=F7(d);p["content-type"]=N,d=b.stream,C=b.length}if(C==null&&(C=e.contentLength),(C===0||!E)&&(C=null),eVe(n)&&C>0&&e.contentLength!=null&&e.contentLength!==C){if(t[O3e])return We.errorRequest(t,e,new DF),!1;process.emitWarning(new DF)}C!=null&&(Qo(d,"no body must not have content length"),p[$3e]=`${C}`),r.ref();let w=n==="GET"||n==="HEAD"||d===null;return c?(p[z3e]="100-continue",m=r.request(p,{endStream:w,signal:l}),m.once("continue",x)):(m=r.request(p,{endStream:w,signal:l}),x()),++r[gl],m.once("response",b=>{let{[V3e]:N,...P}=b;if(e.onResponseStarted(),e.aborted){let _=new M7;We.errorRequest(t,e,_),We.destroy(m,_);return}e.onHeaders(Number(N),W3e(P),m.resume.bind(m),"")===!1&&m.pause(),m.on("data",_=>{e.onData(_)===!1&&m.pause()})}),m.once("end",()=>{(m.state?.state==null||m.state.state<6)&&e.onComplete([]),r[gl]===0&&r.unref(),h(new kF("HTTP/2: stream half-closed (remote)")),t[Iu][t[xi]++]=null,t[LF]=t[xi],t[wu]()}),m.once("close",()=>{r[gl]-=1,r[gl]===0&&r.unref()}),m.once("error",function(b){h(b)}),m.once("frameError",(b,N)=>{h(new kF(`HTTP/2: "frameError" received - type ${b}, code ${N}`))}),!0;function x(){!d||C===0?q7(h,m,null,t,e,t[Vr],C,E):We.isBuffer(d)?q7(h,m,d,t,e,t[Vr],C,E):We.isBlobLike(d)?typeof d.stream=="function"?G7(h,m,d.stream(),t,e,t[Vr],C,E):nVe(h,m,d,t,e,t[Vr],C,E):We.isStream(d)?rVe(h,t[Vr],E,m,d,t,e,C):We.isIterable(d)?G7(h,m,d,t,e,t[Vr],C,E):Qo(!1)}i(x,"writeBodyH2")}i(tVe,"writeH2");function q7(t,e,r,n,s,o,a,c){try{r!=null&&We.isBuffer(r)&&(Qo(a===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),s.onBodySent(r)),c||(o[Eb]=!0),s.onRequestSent(),n[wu]()}catch(l){t(l)}}i(q7,"writeBuffer");function rVe(t,e,r,n,s,o,a,c){Qo(c!==0||o[Cb]===0,"stream body cannot be pipelined");let l=k3e(s,n,d=>{d?(We.destroy(l,d),t(d)):(We.removeAllListeners(l),a.onRequestSent(),r||(e[Eb]=!0),o[wu]())});We.addListener(l,"data",u);function u(d){a.onBodySent(d)}i(u,"onPipeData")}i(rVe,"writeStream");async function nVe(t,e,r,n,s,o,a,c){Qo(a===r.size,"blob body must have content length");try{if(a!=null&&a!==r.size)throw new DF;let l=Buffer.from(await r.arrayBuffer());e.cork(),e.write(l),e.uncork(),e.end(),s.onBodySent(l),s.onRequestSent(),c||(o[Eb]=!0),n[wu]()}catch(l){t(l)}}i(nVe,"writeBlob");async function G7(t,e,r,n,s,o,a,c){Qo(a!==0||n[Cb]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let p=l;l=null,p()}}i(u,"onDrain");let d=i(()=>new Promise((p,m)=>{Qo(l===null),o[Bi]?m(o[Bi]):l=p}),"waitForDrain");e.on("close",u).on("drain",u);try{for await(let p of r){if(o[Bi])throw o[Bi];let m=e.write(p);s.onBodySent(p),m||await d()}e.end(),s.onRequestSent(),c||(o[Eb]=!0),n[wu]()}catch(p){t(p)}finally{e.off("close",u).off("drain",u)}}i(G7,"writeIterable");$7.exports=Y3e});var wb=I((p$t,Y7)=>{"use strict";var Na=He(),{kBodyUsed:Xy}=Lt(),FF=require("node:assert"),{InvalidArgumentError:sVe}=rt(),oVe=require("node:events"),iVe=[300,301,302,303,307,308],V7=Symbol("body"),Ib=class{static{i(this,"BodyAsyncIterable")}constructor(e){this[V7]=e,this[Xy]=!1}async*[Symbol.asyncIterator](){FF(!this[Xy],"disturbed"),this[Xy]=!0,yield*this[V7]}},MF=class{static{i(this,"RedirectHandler")}constructor(e,r,n,s){if(r!=null&&(!Number.isInteger(r)||r<0))throw new sVe("maxRedirections must be a positive number");Na.validateHandler(s,n.method,n.upgrade),this.dispatch=e,this.location=null,this.abort=null,this.opts={...n,maxRedirections:0},this.maxRedirections=r,this.handler=s,this.history=[],this.redirectionLimitReached=!1,Na.isStream(this.opts.body)?(Na.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){FF(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[Xy]=!1,oVe.prototype.on.call(this.opts.body,"data",function(){this[Xy]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new Ib(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&Na.isIterable(this.opts.body)&&(this.opts.body=new Ib(this.opts.body))}onConnect(e){this.abort=e,this.handler.onConnect(e,{history:this.history})}onUpgrade(e,r,n){this.handler.onUpgrade(e,r,n)}onError(e){this.handler.onError(e)}onHeaders(e,r,n,s){if(this.location=this.history.length>=this.maxRedirections||Na.isDisturbed(this.opts.body)?null:aVe(e,r),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){this.request&&this.request.abort(new Error("max redirects")),this.redirectionLimitReached=!0,this.abort(new Error("max redirects"));return}if(this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(e,r,n,s);let{origin:o,pathname:a,search:c}=Na.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),l=c?`${a}${c}`:a;this.opts.headers=cVe(this.opts.headers,e===303,this.opts.origin!==o),this.opts.path=l,this.opts.origin=o,this.opts.maxRedirections=0,this.opts.query=null,e===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",this.opts.body=null)}onData(e){if(!this.location)return this.handler.onData(e)}onComplete(e){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(e)}onBodySent(e){this.handler.onBodySent&&this.handler.onBodySent(e)}};function aVe(t,e){if(iVe.indexOf(t)===-1)return null;for(let r=0;r{"use strict";var lVe=wb();function uVe({maxRedirections:t}){return e=>i(function(n,s){let{maxRedirections:o=t}=n;if(!o)return e(n,s);let a=new lVe(e,o,n,s);return n={...n,maxRedirections:0},e(n,a)},"Intercept")}i(uVe,"createRedirectInterceptor");J7.exports=uVe});var oA=I((h$t,oZ)=>{"use strict";var yl=require("node:assert"),tZ=require("node:net"),dVe=require("node:http"),wp=He(),{channels:nA}=Ff(),pVe=oX(),mVe=Hf(),{InvalidArgumentError:pr,InformationalError:fVe,ClientDestroyedError:AVe}=rt(),hVe=Fy(),{kUrl:Ta,kServerName:Su,kClient:gVe,kBusy:UF,kConnect:yVe,kResuming:Sp,kRunning:nE,kPending:sE,kSize:rE,kQueue:Ri,kConnected:EVe,kConnecting:sA,kNeedDrain:bu,kKeepAliveDefaultTimeout:j7,kHostHeader:CVe,kPendingIdx:Ni,kRunningIdx:El,kError:IVe,kPipelining:xb,kKeepAliveTimeoutValue:wVe,kMaxHeadersSize:SVe,kKeepAliveMaxTimeout:xVe,kKeepAliveTimeoutThreshold:bVe,kHeadersTimeout:BVe,kBodyTimeout:RVe,kStrictContentLength:NVe,kConnector:Zy,kMaxRedirections:TVe,kMaxRequests:qF,kCounter:vVe,kClose:PVe,kDestroy:QVe,kDispatch:_Ve,kInterceptors:K7,kLocalAddress:eE,kMaxResponseSize:DVe,kOnError:kVe,kHTTPContext:mr,kMaxConcurrentStreams:LVe,kResume:tE}=Lt(),OVe=O7(),MVe=z7(),X7=!1,xu=Symbol("kClosedResolve"),Z7=i(()=>{},"noop");function rZ(t){return t[xb]??t[mr]?.defaultPipelining??1}i(rZ,"getPipelining");var GF=class extends mVe{static{i(this,"Client")}constructor(e,{interceptors:r,maxHeaderSize:n,headersTimeout:s,socketTimeout:o,requestTimeout:a,connectTimeout:c,bodyTimeout:l,idleTimeout:u,keepAlive:d,keepAliveTimeout:p,maxKeepAliveTimeout:m,keepAliveMaxTimeout:f,keepAliveTimeoutThreshold:A,socketPath:h,pipelining:E,tls:C,strictContentLength:w,maxCachedSessions:x,maxRedirections:b,connect:N,maxRequestsPerClient:P,localAddress:_,maxResponseSize:re,autoSelectFamily:ye,autoSelectFamilyAttemptTimeout:ae,maxConcurrentStreams:qe,allowH2:ne,webSocket:K}={}){if(super({webSocket:K}),d!==void 0)throw new pr("unsupported keepAlive, use pipelining=0 instead");if(o!==void 0)throw new pr("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(a!==void 0)throw new pr("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(u!==void 0)throw new pr("unsupported idleTimeout, use keepAliveTimeout instead");if(m!==void 0)throw new pr("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(n!=null&&!Number.isFinite(n))throw new pr("invalid maxHeaderSize");if(h!=null&&typeof h!="string")throw new pr("invalid socketPath");if(c!=null&&(!Number.isFinite(c)||c<0))throw new pr("invalid connectTimeout");if(p!=null&&(!Number.isFinite(p)||p<=0))throw new pr("invalid keepAliveTimeout");if(f!=null&&(!Number.isFinite(f)||f<=0))throw new pr("invalid keepAliveMaxTimeout");if(A!=null&&!Number.isFinite(A))throw new pr("invalid keepAliveTimeoutThreshold");if(s!=null&&(!Number.isInteger(s)||s<0))throw new pr("headersTimeout must be a positive integer or zero");if(l!=null&&(!Number.isInteger(l)||l<0))throw new pr("bodyTimeout must be a positive integer or zero");if(N!=null&&typeof N!="function"&&typeof N!="object")throw new pr("connect must be a function or an object");if(b!=null&&(!Number.isInteger(b)||b<0))throw new pr("maxRedirections must be a positive number");if(P!=null&&(!Number.isInteger(P)||P<0))throw new pr("maxRequestsPerClient must be a positive number");if(_!=null&&(typeof _!="string"||tZ.isIP(_)===0))throw new pr("localAddress must be valid string IP address");if(re!=null&&(!Number.isInteger(re)||re<-1))throw new pr("maxResponseSize must be a positive number");if(ae!=null&&(!Number.isInteger(ae)||ae<-1))throw new pr("autoSelectFamilyAttemptTimeout must be a positive number");if(ne!=null&&typeof ne!="boolean")throw new pr("allowH2 must be a valid boolean value");if(qe!=null&&(typeof qe!="number"||qe<1))throw new pr("maxConcurrentStreams must be a positive integer, greater than 0");typeof N!="function"&&(N=hVe({...C,maxCachedSessions:x,allowH2:ne,socketPath:h,timeout:c,...ye?{autoSelectFamily:ye,autoSelectFamilyAttemptTimeout:ae}:void 0,...N})),r?.Client&&Array.isArray(r.Client)?(this[K7]=r.Client,X7||(X7=!0,process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.",{code:"UNDICI-CLIENT-INTERCEPTOR-DEPRECATED"}))):this[K7]=[FVe({maxRedirections:b})],this[Ta]=wp.parseOrigin(e),this[Zy]=N,this[xb]=E??1,this[SVe]=n||dVe.maxHeaderSize,this[j7]=p??4e3,this[xVe]=f??6e5,this[bVe]=A??2e3,this[wVe]=this[j7],this[Su]=null,this[eE]=_??null,this[Sp]=0,this[bu]=0,this[CVe]=`host: ${this[Ta].hostname}${this[Ta].port?`:${this[Ta].port}`:""}\r -`,this[RVe]=l??3e5,this[BVe]=s??3e5,this[NVe]=w??!0,this[TVe]=b,this[qF]=P,this[xu]=null,this[DVe]=re>-1?re:-1,this[LVe]=qe??100,this[mr]=null,this[Ri]=[],this[El]=0,this[Ni]=0,this[tE]=U=>HF(this,U),this[kVe]=U=>nZ(this,U)}get pipelining(){return this[xb]}set pipelining(e){this[xb]=e,this[tE](!0)}get[sE](){return this[Ri].length-this[Ni]}get[nE](){return this[Ni]-this[El]}get[rE](){return this[Ri].length-this[El]}get[EVe](){return!!this[mr]&&!this[sA]&&!this[mr].destroyed}get[UF](){return!!(this[mr]?.busy(null)||this[rE]>=(rZ(this)||1)||this[sE]>0)}[yVe](e){sZ(this),this.once("connect",e)}[_Ve](e,r){let n=e.origin||this[Ta].origin,s=new pVe(n,e,r);return this[Ri].push(s),this[Sp]||(wp.bodyLength(s.body)==null&&wp.isIterable(s.body)?(this[Sp]=1,queueMicrotask(()=>HF(this))):this[tE](!0)),this[Sp]&&this[bu]!==2&&this[UF]&&(this[bu]=2),this[bu]<2}async[PVe](){return new Promise(e=>{this[rE]?this[xu]=e:e(null)})}async[QVe](e){return new Promise(r=>{let n=this[Ri].splice(this[Ni]);for(let o=0;o{this[xu]&&(this[xu](),this[xu]=null),r(null)},"callback");this[mr]?(this[mr].destroy(e,s),this[mr]=null):queueMicrotask(s),this[tE]()})}},FVe=Sb();function nZ(t,e){if(t[nE]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){yl(t[Ni]===t[El]);let r=t[Ri].splice(t[El]);for(let n=0;n{t[Zy]({host:e,hostname:r,protocol:n,port:s,servername:t[Su],localAddress:t[eE]},(l,u)=>{l?c(l):a(u)})});if(t.destroyed){wp.destroy(o.on("error",Z7),new AVe);return}yl(o);try{t[mr]=o.alpnProtocol==="h2"?await MVe(t,o):await OVe(t,o)}catch(a){throw o.destroy().on("error",Z7),a}t[sA]=!1,o[vVe]=0,o[qF]=t[qF],o[gVe]=t,o[IVe]=null,nA.connected.hasSubscribers&&nA.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[mr]?.version,servername:t[Su],localAddress:t[eE]},connector:t[Zy],socket:o}),t.emit("connect",t[Ta],[t])}catch(o){if(t.destroyed)return;if(t[sA]=!1,nA.connectError.hasSubscribers&&nA.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[mr]?.version,servername:t[Su],localAddress:t[eE]},connector:t[Zy],error:o}),o.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(yl(t[nE]===0);t[sE]>0&&t[Ri][t[Ni]].servername===t[Su];){let a=t[Ri][t[Ni]++];wp.errorRequest(t,a,o)}else nZ(t,o);t.emit("connectionError",t[Ta],[t],o)}t[tE]()}i(sZ,"connect");function eZ(t){t[bu]=0,t.emit("drain",t[Ta],[t])}i(eZ,"emitDrain");function HF(t,e){t[Sp]!==2&&(t[Sp]=2,UVe(t,e),t[Sp]=0,t[El]>256&&(t[Ri].splice(0,t[El]),t[Ni]-=t[El],t[El]=0))}i(HF,"resume");function UVe(t,e){for(;;){if(t.destroyed){yl(t[sE]===0);return}if(t[xu]&&!t[rE]){t[xu](),t[xu]=null;return}if(t[mr]&&t[mr].resume(),t[UF])t[bu]=2;else if(t[bu]===2){e?(t[bu]=1,queueMicrotask(()=>eZ(t))):eZ(t);continue}if(t[sE]===0||t[nE]>=(rZ(t)||1))return;let r=t[Ri][t[Ni]];if(t[Ta].protocol==="https:"&&t[Su]!==r.servername){if(t[nE]>0)return;t[Su]=r.servername,t[mr]?.destroy(new fVe("servername changed"),()=>{t[mr]=null,HF(t)})}if(t[sA])return;if(!t[mr]){sZ(t);return}if(t[mr].destroyed||t[mr].busy(r))return;!r.aborted&&t[mr].write(r)?t[Ni]++:t[Ri].splice(t[Ni],1)}}i(UVe,"_resume");oZ.exports=GF});var $F=I((E$t,iZ)=>{"use strict";var bb=class{static{i(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};iZ.exports=class{static{i(this,"FixedQueue")}constructor(){this.head=this.tail=new bb}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new bb),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var cZ=I((I$t,aZ)=>{var{kFree:qVe,kConnected:GVe,kPending:HVe,kQueued:$Ve,kRunning:zVe,kSize:VVe}=Lt(),xp=Symbol("pool"),zF=class{static{i(this,"PoolStats")}constructor(e){this[xp]=e}get connected(){return this[xp][GVe]}get free(){return this[xp][qVe]}get pending(){return this[xp][HVe]}get queued(){return this[xp][$Ve]}get running(){return this[xp][zVe]}get size(){return this[xp][VVe]}};aZ.exports=zF});var KF=I((S$t,yZ)=>{"use strict";var WVe=Hf(),YVe=$F(),{kConnected:VF,kSize:lZ,kRunning:uZ,kPending:dZ,kQueued:oE,kBusy:JVe,kFree:jVe,kUrl:KVe,kClose:XVe,kDestroy:ZVe,kDispatch:e4e}=Lt(),t4e=cZ(),As=Symbol("clients"),qn=Symbol("needDrain"),iE=Symbol("queue"),WF=Symbol("closed resolve"),YF=Symbol("onDrain"),pZ=Symbol("onConnect"),mZ=Symbol("onDisconnect"),fZ=Symbol("onConnectionError"),JF=Symbol("get dispatcher"),hZ=Symbol("add client"),gZ=Symbol("remove client"),AZ=Symbol("stats"),jF=class extends WVe{static{i(this,"PoolBase")}constructor(e){super(e),this[iE]=new YVe,this[As]=[],this[oE]=0;let r=this;this[YF]=i(function(s,o){let a=r[iE],c=!1;for(;!c;){let l=a.shift();if(!l)break;r[oE]--,c=!this.dispatch(l.opts,l.handler)}this[qn]=c,!this[qn]&&r[qn]&&(r[qn]=!1,r.emit("drain",s,[r,...o])),r[WF]&&a.isEmpty()&&Promise.all(r[As].map(l=>l.close())).then(r[WF])},"onDrain"),this[pZ]=(n,s)=>{r.emit("connect",n,[r,...s])},this[mZ]=(n,s,o)=>{r.emit("disconnect",n,[r,...s],o)},this[fZ]=(n,s,o)=>{r.emit("connectionError",n,[r,...s],o)},this[AZ]=new t4e(this)}get[JVe](){return this[qn]}get[VF](){return this[As].filter(e=>e[VF]).length}get[jVe](){return this[As].filter(e=>e[VF]&&!e[qn]).length}get[dZ](){let e=this[oE];for(let{[dZ]:r}of this[As])e+=r;return e}get[uZ](){let e=0;for(let{[uZ]:r}of this[As])e+=r;return e}get[lZ](){let e=this[oE];for(let{[lZ]:r}of this[As])e+=r;return e}get stats(){return this[AZ]}async[XVe](){this[iE].isEmpty()?await Promise.all(this[As].map(e=>e.close())):await new Promise(e=>{this[WF]=e})}async[ZVe](e){for(;;){let r=this[iE].shift();if(!r)break;r.handler.onError(e)}await Promise.all(this[As].map(r=>r.destroy(e)))}[e4e](e,r){let n=this[JF]();return n?n.dispatch(e,r)||(n[qn]=!0,this[qn]=!this[JF]()):(this[qn]=!0,this[iE].push({opts:e,handler:r}),this[oE]++),!this[qn]}[hZ](e){return e.on("drain",this[YF]).on("connect",this[pZ]).on("disconnect",this[mZ]).on("connectionError",this[fZ]),this[As].push(e),this[qn]&&queueMicrotask(()=>{this[qn]&&this[YF](e[KVe],[this,e])}),this}[gZ](e){e.close(()=>{let r=this[As].indexOf(e);r!==-1&&this[As].splice(r,1)}),this[qn]=this[As].some(r=>!r[qn]&&r.closed!==!0&&r.destroyed!==!0)}};yZ.exports={PoolBase:jF,kClients:As,kNeedDrain:qn,kAddClient:hZ,kRemoveClient:gZ,kGetDispatcher:JF}});var iA=I((b$t,wZ)=>{"use strict";var{PoolBase:r4e,kClients:Bb,kNeedDrain:n4e,kAddClient:s4e,kGetDispatcher:o4e}=KF(),i4e=oA(),{InvalidArgumentError:XF}=rt(),EZ=He(),{kUrl:CZ,kInterceptors:a4e}=Lt(),c4e=Fy(),ZF=Symbol("options"),e1=Symbol("connections"),IZ=Symbol("factory");function l4e(t,e){return new i4e(t,e)}i(l4e,"defaultFactory");var t1=class extends r4e{static{i(this,"Pool")}constructor(e,{connections:r,factory:n=l4e,connect:s,connectTimeout:o,tls:a,maxCachedSessions:c,socketPath:l,autoSelectFamily:u,autoSelectFamilyAttemptTimeout:d,allowH2:p,...m}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new XF("invalid connections");if(typeof n!="function")throw new XF("factory must be a function.");if(s!=null&&typeof s!="function"&&typeof s!="object")throw new XF("connect must be a function or an object");typeof s!="function"&&(s=c4e({...a,maxCachedSessions:c,allowH2:p,socketPath:l,timeout:o,...u?{autoSelectFamily:u,autoSelectFamilyAttemptTimeout:d}:void 0,...s})),super(m),this[a4e]=m.interceptors?.Pool&&Array.isArray(m.interceptors.Pool)?m.interceptors.Pool:[],this[e1]=r||null,this[CZ]=EZ.parseOrigin(e),this[ZF]={...EZ.deepClone(m),connect:s,allowH2:p},this[ZF].interceptors=m.interceptors?{...m.interceptors}:void 0,this[IZ]=n,this.on("connectionError",(f,A,h)=>{for(let E of A){let C=this[Bb].indexOf(E);C!==-1&&this[Bb].splice(C,1)}})}[o4e](){for(let e of this[Bb])if(!e[n4e])return e;if(!this[e1]||this[Bb].length{"use strict";var{BalancedPoolMissingUpstreamError:u4e,InvalidArgumentError:d4e}=rt(),{PoolBase:p4e,kClients:wn,kNeedDrain:aE,kAddClient:m4e,kRemoveClient:f4e,kGetDispatcher:A4e}=KF(),h4e=iA(),{kUrl:r1,kInterceptors:g4e}=Lt(),{parseOrigin:SZ}=He(),xZ=Symbol("factory"),Rb=Symbol("options"),bZ=Symbol("kGreatestCommonDivisor"),bp=Symbol("kCurrentWeight"),Bp=Symbol("kIndex"),_o=Symbol("kWeight"),Nb=Symbol("kMaxWeightPerServer"),Tb=Symbol("kErrorPenalty");function y4e(t,e){if(t===0)return e;for(;e!==0;){let r=e;e=t%e,t=r}return t}i(y4e,"getGreatestCommonDivisor");function E4e(t,e){return new h4e(t,e)}i(E4e,"defaultFactory");var n1=class extends p4e{static{i(this,"BalancedPool")}constructor(e=[],{factory:r=E4e,...n}={}){if(super(),this[Rb]=n,this[Bp]=-1,this[bp]=0,this[Nb]=this[Rb].maxWeightPerServer||100,this[Tb]=this[Rb].errorPenalty||15,Array.isArray(e)||(e=[e]),typeof r!="function")throw new d4e("factory must be a function.");this[g4e]=n.interceptors?.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[xZ]=r;for(let s of e)this.addUpstream(s);this._updateBalancedPoolStats()}addUpstream(e){let r=SZ(e).origin;if(this[wn].find(s=>s[r1].origin===r&&s.closed!==!0&&s.destroyed!==!0))return this;let n=this[xZ](r,Object.assign({},this[Rb]));this[m4e](n),n.on("connect",()=>{n[_o]=Math.min(this[Nb],n[_o]+this[Tb])}),n.on("connectionError",()=>{n[_o]=Math.max(1,n[_o]-this[Tb]),this._updateBalancedPoolStats()}),n.on("disconnect",(...s)=>{let o=s[2];o&&o.code==="UND_ERR_SOCKET"&&(n[_o]=Math.max(1,n[_o]-this[Tb]),this._updateBalancedPoolStats())});for(let s of this[wn])s[_o]=this[Nb];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let r=0;rs[r1].origin===r&&s.closed!==!0&&s.destroyed!==!0);return n&&this[f4e](n),this}get upstreams(){return this[wn].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[r1].origin)}[A4e](){if(this[wn].length===0)throw new u4e;if(!this[wn].find(o=>!o[aE]&&o.closed!==!0&&o.destroyed!==!0)||this[wn].map(o=>o[aE]).reduce((o,a)=>o&&a,!0))return;let n=0,s=this[wn].findIndex(o=>!o[aE]);for(;n++this[wn][s][_o]&&!o[aE]&&(s=this[Bp]),this[Bp]===0&&(this[bp]=this[bp]-this[bZ],this[bp]<=0&&(this[bp]=this[Nb])),o[_o]>=this[bp]&&!o[aE])return o}return this[bp]=this[wn][s][_o],this[Bp]=s,this[wn][s]}};BZ.exports=n1});var aA=I((T$t,DZ)=>{"use strict";var{InvalidArgumentError:vb}=rt(),{kClients:Bu,kRunning:NZ,kClose:C4e,kDestroy:I4e,kDispatch:w4e,kInterceptors:S4e}=Lt(),x4e=Hf(),b4e=iA(),B4e=oA(),R4e=He(),N4e=Sb(),TZ=Symbol("onConnect"),vZ=Symbol("onDisconnect"),PZ=Symbol("onConnectionError"),T4e=Symbol("maxRedirections"),QZ=Symbol("onDrain"),_Z=Symbol("factory"),s1=Symbol("options");function v4e(t,e){return e&&e.connections===1?new B4e(t,e):new b4e(t,e)}i(v4e,"defaultFactory");var o1=class extends x4e{static{i(this,"Agent")}constructor({factory:e=v4e,maxRedirections:r=0,connect:n,...s}={}){if(typeof e!="function")throw new vb("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new vb("connect must be a function or an object");if(!Number.isInteger(r)||r<0)throw new vb("maxRedirections must be a positive number");super(s),n&&typeof n!="function"&&(n={...n}),this[S4e]=s.interceptors?.Agent&&Array.isArray(s.interceptors.Agent)?s.interceptors.Agent:[N4e({maxRedirections:r})],this[s1]={...R4e.deepClone(s),connect:n},this[s1].interceptors=s.interceptors?{...s.interceptors}:void 0,this[T4e]=r,this[_Z]=e,this[Bu]=new Map,this[QZ]=(o,a)=>{this.emit("drain",o,[this,...a])},this[TZ]=(o,a)=>{this.emit("connect",o,[this,...a])},this[vZ]=(o,a,c)=>{this.emit("disconnect",o,[this,...a],c)},this[PZ]=(o,a,c)=>{this.emit("connectionError",o,[this,...a],c)}}get[NZ](){let e=0;for(let r of this[Bu].values())e+=r[NZ];return e}[w4e](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new vb("opts.origin must be a non-empty string or URL.");let s=this[Bu].get(n);return s||(s=this[_Z](e.origin,this[s1]).on("drain",this[QZ]).on("connect",this[TZ]).on("disconnect",this[vZ]).on("connectionError",this[PZ]),this[Bu].set(n,s)),s.dispatch(e,r)}async[C4e](){let e=[];for(let r of this[Bu].values())e.push(r.close());this[Bu].clear(),await Promise.all(e)}async[I4e](e){let r=[];for(let n of this[Bu].values())r.push(n.destroy(e));this[Bu].clear(),await Promise.all(r)}};DZ.exports=o1});var u1=I((P$t,zZ)=>{"use strict";var{kProxy:i1,kClose:UZ,kDestroy:qZ,kDispatch:kZ,kInterceptors:P4e}=Lt(),{URL:Rp}=require("node:url"),Q4e=aA(),GZ=iA(),HZ=Hf(),{InvalidArgumentError:cA,RequestAbortedError:_4e,SecureProxyConnectionError:D4e}=rt(),LZ=Fy(),$Z=oA(),Pb=Symbol("proxy agent"),Qb=Symbol("proxy client"),Ru=Symbol("proxy headers"),a1=Symbol("request tls settings"),OZ=Symbol("proxy tls settings"),MZ=Symbol("connect endpoint function"),FZ=Symbol("tunnel proxy");function k4e(t){return t==="https:"?443:80}i(k4e,"defaultProtocolPort");function L4e(t,e){return new GZ(t,e)}i(L4e,"defaultFactory");var O4e=i(()=>{},"noop");function M4e(t,e){return e.connections===1?new $Z(t,e):new GZ(t,e)}i(M4e,"defaultAgentFactory");var c1=class extends HZ{static{i(this,"Http1ProxyWrapper")}#e;constructor(e,{headers:r={},connect:n,factory:s}){if(super(),!e)throw new cA("Proxy URL is mandatory");this[Ru]=r,s?this.#e=s(e,{connect:n}):this.#e=new $Z(e,{connect:n})}[kZ](e,r){let n=r.onHeaders;r.onHeaders=function(c,l,u){if(c===407){typeof r.onError=="function"&&r.onError(new cA("Proxy Authentication Required (407)"));return}n&&n.call(this,c,l,u)};let{origin:s,path:o="/",headers:a={}}=e;if(e.path=s+o,!("host"in a)&&!("Host"in a)){let{host:c}=new Rp(s);a.host=c}return e.headers={...this[Ru],...a},this.#e[kZ](e,r)}async[UZ](){return this.#e.close()}async[qZ](e){return this.#e.destroy(e)}},l1=class extends HZ{static{i(this,"ProxyAgent")}constructor(e){if(super(),!e||typeof e=="object"&&!(e instanceof Rp)&&!e.uri)throw new cA("Proxy uri is mandatory");let{clientFactory:r=L4e}=e;if(typeof r!="function")throw new cA("Proxy opts.clientFactory must be a function.");let{proxyTunnel:n=!0}=e,s=this.#e(e),{href:o,origin:a,port:c,protocol:l,username:u,password:d,hostname:p}=s;if(this[i1]={uri:o,protocol:l},this[P4e]=e.interceptors?.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],this[a1]=e.requestTls,this[OZ]=e.proxyTls,this[Ru]=e.headers||{},this[FZ]=n,e.auth&&e.token)throw new cA("opts.auth cannot be used in combination with opts.token");e.auth?this[Ru]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[Ru]["proxy-authorization"]=e.token:u&&d&&(this[Ru]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(u)}:${decodeURIComponent(d)}`).toString("base64")}`);let m=LZ({...e.proxyTls});this[MZ]=LZ({...e.requestTls});let f=e.factory||M4e,A=i((h,E)=>{let{protocol:C}=new Rp(h);return!this[FZ]&&C==="http:"&&this[i1].protocol==="http:"?new c1(this[i1].uri,{headers:this[Ru],connect:m,factory:f}):f(h,E)},"factory");this[Qb]=r(s,{connect:m}),this[Pb]=new Q4e({...e,factory:A,connect:i(async(h,E)=>{let C=h.host;h.port||(C+=`:${k4e(h.protocol)}`);try{let{socket:w,statusCode:x}=await this[Qb].connect({origin:a,port:c,path:C,signal:h.signal,headers:{...this[Ru],host:h.host},servername:this[OZ]?.servername||p});if(x!==200&&(w.on("error",O4e).destroy(),E(new _4e(`Proxy response (${x}) !== 200 when HTTP Tunneling`))),h.protocol!=="https:"){E(null,w);return}let b;this[a1]?b=this[a1].servername:b=h.servername,this[MZ]({...h,servername:b,httpSocket:w},E)}catch(w){w.code==="ERR_TLS_CERT_ALTNAME_INVALID"?E(new D4e(w)):E(w)}},"connect")})}dispatch(e,r){let n=F4e(e.headers);if(U4e(n),n&&!("host"in n)&&!("Host"in n)){let{host:s}=new Rp(e.origin);n.host=s}return this[Pb].dispatch({...e,headers:n},r)}#e(e){return typeof e=="string"?new Rp(e):e instanceof Rp?e:new Rp(e.uri)}async[UZ](){await this[Pb].close(),await this[Qb].close()}async[qZ](){await this[Pb].destroy(),await this[Qb].destroy()}};function F4e(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new cA("Proxy-Authorization should be sent in ProxyAgent constructor")}i(U4e,"throwIfProxyAuthIsSent");zZ.exports=l1});var KZ=I((_$t,jZ)=>{"use strict";var q4e=Hf(),{kClose:G4e,kDestroy:H4e,kClosed:VZ,kDestroyed:WZ,kDispatch:$4e,kNoProxyAgent:cE,kHttpProxyAgent:Nu,kHttpsProxyAgent:Np}=Lt(),YZ=u1(),z4e=aA(),V4e={"http:":80,"https:":443},JZ=!1,d1=class extends q4e{static{i(this,"EnvHttpProxyAgent")}#e=null;#t=null;#r=null;constructor(e={}){super(),this.#r=e,JZ||(JZ=!0,process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.",{code:"UNDICI-EHPA"}));let{httpProxy:r,httpsProxy:n,noProxy:s,...o}=e;this[cE]=new z4e(o);let a=r??process.env.http_proxy??process.env.HTTP_PROXY;a?this[Nu]=new YZ({...o,uri:a}):this[Nu]=this[cE];let c=n??process.env.https_proxy??process.env.HTTPS_PROXY;c?this[Np]=new YZ({...o,uri:c}):this[Np]=this[Nu],this.#n()}[$4e](e,r){let n=new URL(e.origin);return this.#o(n).dispatch(e,r)}async[G4e](){await this[cE].close(),this[Nu][VZ]||await this[Nu].close(),this[Np][VZ]||await this[Np].close()}async[H4e](e){await this[cE].destroy(e),this[Nu][WZ]||await this[Nu].destroy(e),this[Np][WZ]||await this[Np].destroy(e)}#o(e){let{protocol:r,host:n,port:s}=e;return n=n.replace(/:\d*$/,"").toLowerCase(),s=Number.parseInt(s,10)||V4e[r]||0,this.#s(n,s)?r==="https:"?this[Np]:this[Nu]:this[cE]}#s(e,r){if(this.#i&&this.#n(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n{"use strict";var lA=require("node:assert"),{kRetryHandlerDefaultRetry:XZ}=Lt(),{RequestRetryError:lE}=rt(),{isDisturbed:ZZ,parseHeaders:W4e,parseRangeHeader:eee,wrapRequestBody:Y4e}=He();function J4e(t){let e=Date.now();return new Date(t).getTime()-e}i(J4e,"calculateRetryAfterHeader");var p1=class t{static{i(this,"RetryHandler")}constructor(e,r){let{retryOptions:n,...s}=e,{retry:o,maxRetries:a,maxTimeout:c,minTimeout:l,timeoutFactor:u,methods:d,errorCodes:p,retryAfter:m,statusCodes:f}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts={...s,body:Y4e(e.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:o??t[XZ],retryAfter:m??!0,maxTimeout:c??30*1e3,minTimeout:l??500,timeoutFactor:u??2,maxRetries:a??5,methods:d??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:f??[500,502,503,504,429],errorCodes:p??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(A=>{this.aborted=!0,this.abort?this.abort(A):this.reason=A})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[XZ](e,{state:r,opts:n},s){let{statusCode:o,code:a,headers:c}=e,{method:l,retryOptions:u}=n,{maxRetries:d,minTimeout:p,maxTimeout:m,timeoutFactor:f,statusCodes:A,errorCodes:h,methods:E}=u,{counter:C}=r;if(a&&a!=="UND_ERR_REQ_RETRY"&&!h.includes(a)){s(e);return}if(Array.isArray(E)&&!E.includes(l)){s(e);return}if(o!=null&&Array.isArray(A)&&!A.includes(o)){s(e);return}if(C>d){s(e);return}let w=c?.["retry-after"];w&&(w=Number(w),w=Number.isNaN(w)?J4e(w):w*1e3);let x=w>0?Math.min(w,m):Math.min(p*f**(C-1),m);setTimeout(()=>s(null),x)}onHeaders(e,r,n,s){let o=W4e(r);if(this.retryCount+=1,e>=300)return this.retryOpts.statusCodes.includes(e)===!1?this.handler.onHeaders(e,r,n,s):(this.abort(new lE("Request failed",e,{headers:o,data:{count:this.retryCount}})),!1);if(this.resume!=null){if(this.resume=null,e!==206&&(this.start>0||e!==200))return this.abort(new lE("server does not support the range header and the payload was partially consumed",e,{headers:o,data:{count:this.retryCount}})),!1;let c=eee(o["content-range"]);if(!c)return this.abort(new lE("Content-Range mismatch",e,{headers:o,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==o.etag)return this.abort(new lE("ETag mismatch",e,{headers:o,data:{count:this.retryCount}})),!1;let{start:l,size:u,end:d=u-1}=c;return lA(this.start===l,"content-range mismatch"),lA(this.end==null||this.end===d,"content-range mismatch"),this.resume=n,!0}if(this.end==null){if(e===206){let c=eee(o["content-range"]);if(c==null)return this.handler.onHeaders(e,r,n,s);let{start:l,size:u,end:d=u-1}=c;lA(l!=null&&Number.isFinite(l),"content-range mismatch"),lA(d!=null&&Number.isFinite(d),"invalid content-length"),this.start=l,this.end=d}if(this.end==null){let c=o["content-length"];this.end=c!=null?Number(c)-1:null}return lA(Number.isFinite(this.start)),lA(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=n,this.etag=o.etag!=null?o.etag:null,this.etag!=null&&this.etag.startsWith("W/")&&(this.etag=null),this.handler.onHeaders(e,r,n,s)}let a=new lE("Request failed",e,{headers:o,data:{count:this.retryCount}});return this.abort(a),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||ZZ(this.opts.body))return this.handler.onError(e);this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(e,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},r.bind(this));function r(n){if(n!=null||this.aborted||ZZ(this.opts.body))return this.handler.onError(n);if(this.start!==0){let s={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(s["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...s}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(s){this.handler.onError(s)}}i(r,"onRetry")}};tee.exports=p1});var nee=I((O$t,ree)=>{"use strict";var j4e=Oy(),K4e=_b(),m1=class extends j4e{static{i(this,"RetryAgent")}#e=null;#t=null;constructor(e,r={}){super(r),this.#e=e,this.#t=r}dispatch(e,r){let n=new K4e({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};ree.exports=m1});var E1=I((F$t,pee)=>{"use strict";var cee=require("node:assert"),{Readable:X4e}=require("node:stream"),{RequestAbortedError:lee,NotSupportedError:Z4e,InvalidArgumentError:eWe,AbortError:f1}=rt(),uee=He(),{ReadableStreamFrom:tWe}=He(),Ws=Symbol("kConsume"),uE=Symbol("kReading"),Tu=Symbol("kBody"),see=Symbol("kAbort"),dee=Symbol("kContentType"),oee=Symbol("kContentLength"),rWe=i(()=>{},"noop"),A1=class extends X4e{static{i(this,"BodyReadable")}constructor({resume:e,abort:r,contentType:n="",contentLength:s,highWaterMark:o=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:o}),this._readableState.dataEmitted=!1,this[see]=r,this[Ws]=null,this[Tu]=null,this[dee]=n,this[oee]=s,this[uE]=!1}destroy(e){return!e&&!this._readableState.endEmitted&&(e=new lee),e&&this[see](),super.destroy(e)}_destroy(e,r){this[uE]?r(e):setImmediate(()=>{r(e)})}on(e,...r){return(e==="data"||e==="readable")&&(this[uE]=!0),super.on(e,...r)}addListener(e,...r){return this.on(e,...r)}off(e,...r){let n=super.off(e,...r);return(e==="data"||e==="readable")&&(this[uE]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,...r){return this.off(e,...r)}push(e){return this[Ws]&&e!==null?(g1(this[Ws],e),this[uE]?super.push(e):!0):super.push(e)}async text(){return dE(this,"text")}async json(){return dE(this,"json")}async blob(){return dE(this,"blob")}async bytes(){return dE(this,"bytes")}async arrayBuffer(){return dE(this,"arrayBuffer")}async formData(){throw new Z4e}get bodyUsed(){return uee.isDisturbed(this)}get body(){return this[Tu]||(this[Tu]=tWe(this),this[Ws]&&(this[Tu].getReader(),cee(this[Tu].locked))),this[Tu]}async dump(e){let r=Number.isFinite(e?.limit)?e.limit:131072,n=e?.signal;if(n!=null&&(typeof n!="object"||!("aborted"in n)))throw new eWe("signal must be an AbortSignal");return n?.throwIfAborted(),this._readableState.closeEmitted?null:await new Promise((s,o)=>{this[oee]>r&&this.destroy(new f1);let a=i(()=>{this.destroy(n.reason??new f1)},"onAbort");n?.addEventListener("abort",a),this.on("close",function(){n?.removeEventListener("abort",a),n?.aborted?o(n.reason??new f1):s(null)}).on("error",rWe).on("data",function(c){r-=c.length,r<=0&&this.destroy()}).resume()})}};function nWe(t){return t[Tu]&&t[Tu].locked===!0||t[Ws]}i(nWe,"isLocked");function sWe(t){return uee.isDisturbed(t)||nWe(t)}i(sWe,"isUnusable");async function dE(t,e){return cee(!t[Ws]),new Promise((r,n)=>{if(sWe(t)){let s=t._readableState;s.destroyed&&s.closeEmitted===!1?t.on("error",o=>{n(o)}).on("close",()=>{n(new TypeError("unusable"))}):n(s.errored??new TypeError("unusable"))}else queueMicrotask(()=>{t[Ws]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(s){y1(this[Ws],s)}).on("close",function(){this[Ws].body!==null&&y1(this[Ws],new lee)}),oWe(t[Ws])})})}i(dE,"consume");function oWe(t){if(t.body===null)return;let{_readableState:e}=t.stream;if(e.bufferIndex){let r=e.bufferIndex,n=e.buffer.length;for(let s=r;s2&&r[0]===239&&r[1]===187&&r[2]===191?3:0;return r.utf8Slice(s,n)}i(h1,"chunksDecode");function iee(t,e){if(t.length===0||e===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(t[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(e).buffer),n=0;for(let s=0;s{var iWe=require("node:assert"),{ResponseStatusCodeError:mee}=rt(),{chunksDecode:fee}=E1(),aWe=128*1024;async function cWe({callback:t,body:e,contentType:r,statusCode:n,statusMessage:s,headers:o}){iWe(e);let a=[],c=0;try{for await(let p of e)if(a.push(p),c+=p.length,c>aWe){a=[],c=0;break}}catch{a=[],c=0}let l=`Response status code ${n}${s?`: ${s}`:""}`;if(n===204||!r||!c){queueMicrotask(()=>t(new mee(l,n,o)));return}let u=Error.stackTraceLimit;Error.stackTraceLimit=0;let d;try{Aee(r)?d=JSON.parse(fee(a,c)):hee(r)&&(d=fee(a,c))}catch{}finally{Error.stackTraceLimit=u}queueMicrotask(()=>t(new mee(l,n,o,d)))}i(cWe,"getResolveErrorBodyCallback");var Aee=i(t=>t.length>15&&t[11]==="/"&&t[0]==="a"&&t[1]==="p"&&t[2]==="p"&&t[3]==="l"&&t[4]==="i"&&t[5]==="c"&&t[6]==="a"&&t[7]==="t"&&t[8]==="i"&&t[9]==="o"&&t[10]==="n"&&t[12]==="j"&&t[13]==="s"&&t[14]==="o"&&t[15]==="n","isContentTypeApplicationJson"),hee=i(t=>t.length>4&&t[4]==="/"&&t[0]==="t"&&t[1]==="e"&&t[2]==="x"&&t[3]==="t","isContentTypeText");gee.exports={getResolveErrorBodyCallback:cWe,isContentTypeApplicationJson:Aee,isContentTypeText:hee}});var Cee=I((H$t,I1)=>{"use strict";var lWe=require("node:assert"),{Readable:uWe}=E1(),{InvalidArgumentError:uA,RequestAbortedError:yee}=rt(),Ys=He(),{getResolveErrorBodyCallback:dWe}=C1(),{AsyncResource:pWe}=require("node:async_hooks"),Db=class extends pWe{static{i(this,"RequestHandler")}constructor(e,r){if(!e||typeof e!="object")throw new uA("invalid opts");let{signal:n,method:s,opaque:o,body:a,onInfo:c,responseHeaders:l,throwOnError:u,highWaterMark:d}=e;try{if(typeof r!="function")throw new uA("invalid callback");if(d&&(typeof d!="number"||d<0))throw new uA("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new uA("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new uA("invalid method");if(c&&typeof c!="function")throw new uA("invalid onInfo callback");super("UNDICI_REQUEST")}catch(p){throw Ys.isStream(a)&&Ys.destroy(a.on("error",Ys.nop),p),p}this.method=s,this.responseHeaders=l||null,this.opaque=o||null,this.callback=r,this.res=null,this.abort=null,this.body=a,this.trailers={},this.context=null,this.onInfo=c||null,this.throwOnError=u,this.highWaterMark=d,this.signal=n,this.reason=null,this.removeAbortListener=null,Ys.isStream(a)&&a.on("error",p=>{this.onError(p)}),this.signal&&(this.signal.aborted?this.reason=this.signal.reason??new yee:this.removeAbortListener=Ys.addAbortListener(this.signal,()=>{this.reason=this.signal.reason??new yee,this.res?Ys.destroy(this.res.on("error",Ys.nop),this.reason):this.abort&&this.abort(this.reason),this.removeAbortListener&&(this.res?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}))}onConnect(e,r){if(this.reason){e(this.reason);return}lWe(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,s){let{callback:o,opaque:a,abort:c,context:l,responseHeaders:u,highWaterMark:d}=this,p=u==="raw"?Ys.parseRawHeaders(r):Ys.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:p});return}let m=u==="raw"?Ys.parseHeaders(r):p,f=m["content-type"],A=m["content-length"],h=new uWe({resume:n,abort:c,contentType:f,contentLength:this.method!=="HEAD"&&A?Number(A):null,highWaterMark:d});this.removeAbortListener&&h.on("close",this.removeAbortListener),this.callback=null,this.res=h,o!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(dWe,null,{callback:o,body:h,contentType:f,statusCode:e,statusMessage:s,headers:p}):this.runInAsyncScope(o,null,null,{statusCode:e,headers:p,trailers:this.trailers,opaque:a,body:h,context:l}))}onData(e){return this.res.push(e)}onComplete(e){Ys.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:r,callback:n,body:s,opaque:o}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:o})})),r&&(this.res=null,queueMicrotask(()=>{Ys.destroy(r,e)})),s&&(this.body=null,Ys.destroy(s,e)),this.removeAbortListener&&(r?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}};function Eee(t,e){if(e===void 0)return new Promise((r,n)=>{Eee.call(this,t,(s,o)=>s?n(s):r(o))});try{this.dispatch(t,new Db(t,e))}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}i(Eee,"request");I1.exports=Eee;I1.exports.RequestHandler=Db});var pE=I((z$t,See)=>{var{addAbortListener:mWe}=He(),{RequestAbortedError:fWe}=rt(),dA=Symbol("kListener"),va=Symbol("kSignal");function Iee(t){t.abort?t.abort(t[va]?.reason):t.reason=t[va]?.reason??new fWe,wee(t)}i(Iee,"abort");function AWe(t,e){if(t.reason=null,t[va]=null,t[dA]=null,!!e){if(e.aborted){Iee(t);return}t[va]=e,t[dA]=()=>{Iee(t)},mWe(t[va],t[dA])}}i(AWe,"addSignal");function wee(t){t[va]&&("removeEventListener"in t[va]?t[va].removeEventListener("abort",t[dA]):t[va].removeListener("abort",t[dA]),t[va]=null,t[dA]=null)}i(wee,"removeSignal");See.exports={addSignal:AWe,removeSignal:wee}});var Ree=I((W$t,Bee)=>{"use strict";var hWe=require("node:assert"),{finished:gWe,PassThrough:yWe}=require("node:stream"),{InvalidArgumentError:pA,InvalidReturnValueError:EWe}=rt(),Ti=He(),{getResolveErrorBodyCallback:CWe}=C1(),{AsyncResource:IWe}=require("node:async_hooks"),{addSignal:wWe,removeSignal:xee}=pE(),w1=class extends IWe{static{i(this,"StreamHandler")}constructor(e,r,n){if(!e||typeof e!="object")throw new pA("invalid opts");let{signal:s,method:o,opaque:a,body:c,onInfo:l,responseHeaders:u,throwOnError:d}=e;try{if(typeof n!="function")throw new pA("invalid callback");if(typeof r!="function")throw new pA("invalid factory");if(s&&typeof s.on!="function"&&typeof s.addEventListener!="function")throw new pA("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new pA("invalid method");if(l&&typeof l!="function")throw new pA("invalid onInfo callback");super("UNDICI_STREAM")}catch(p){throw Ti.isStream(c)&&Ti.destroy(c.on("error",Ti.nop),p),p}this.responseHeaders=u||null,this.opaque=a||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=c,this.onInfo=l||null,this.throwOnError=d||!1,Ti.isStream(c)&&c.on("error",p=>{this.onError(p)}),wWe(this,s)}onConnect(e,r){if(this.reason){e(this.reason);return}hWe(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,s){let{factory:o,opaque:a,context:c,callback:l,responseHeaders:u}=this,d=u==="raw"?Ti.parseRawHeaders(r):Ti.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:d});return}this.factory=null;let p;if(this.throwOnError&&e>=400){let A=(u==="raw"?Ti.parseHeaders(r):d)["content-type"];p=new yWe,this.callback=null,this.runInAsyncScope(CWe,null,{callback:l,body:p,contentType:A,statusCode:e,statusMessage:s,headers:d})}else{if(o===null)return;if(p=this.runInAsyncScope(o,null,{statusCode:e,headers:d,opaque:a,context:c}),!p||typeof p.write!="function"||typeof p.end!="function"||typeof p.on!="function")throw new EWe("expected Writable");gWe(p,{readable:!1},f=>{let{callback:A,res:h,opaque:E,trailers:C,abort:w}=this;this.res=null,(f||!h.readable)&&Ti.destroy(h,f),this.callback=null,this.runInAsyncScope(A,null,f||null,{opaque:E,trailers:C}),f&&w()})}return p.on("drain",n),this.res=p,(p.writableNeedDrain!==void 0?p.writableNeedDrain:p._writableState?.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;xee(this),r&&(this.trailers=Ti.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:s,body:o}=this;xee(this),this.factory=null,r?(this.res=null,Ti.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),o&&(this.body=null,Ti.destroy(o,e))}};function bee(t,e,r){if(r===void 0)return new Promise((n,s)=>{bee.call(this,t,e,(o,a)=>o?s(o):n(a))});try{this.dispatch(t,new w1(t,e,r))}catch(n){if(typeof r!="function")throw n;let s=t?.opaque;queueMicrotask(()=>r(n,{opaque:s}))}}i(bee,"stream");Bee.exports=bee});var Pee=I((J$t,vee)=>{"use strict";var{Readable:Tee,Duplex:SWe,PassThrough:xWe}=require("node:stream"),{InvalidArgumentError:mE,InvalidReturnValueError:bWe,RequestAbortedError:S1}=rt(),Do=He(),{AsyncResource:BWe}=require("node:async_hooks"),{addSignal:RWe,removeSignal:NWe}=pE(),Nee=require("node:assert"),mA=Symbol("resume"),x1=class extends Tee{static{i(this,"PipelineRequest")}constructor(){super({autoDestroy:!0}),this[mA]=null}_read(){let{[mA]:e}=this;e&&(this[mA]=null,e())}_destroy(e,r){this._read(),r(e)}},b1=class extends Tee{static{i(this,"PipelineResponse")}constructor(e){super({autoDestroy:!0}),this[mA]=e}_read(){this[mA]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new S1),r(e)}},B1=class extends BWe{static{i(this,"PipelineHandler")}constructor(e,r){if(!e||typeof e!="object")throw new mE("invalid opts");if(typeof r!="function")throw new mE("invalid handler");let{signal:n,method:s,opaque:o,onInfo:a,responseHeaders:c}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new mE("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new mE("invalid method");if(a&&typeof a!="function")throw new mE("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=o||null,this.responseHeaders=c||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=a||null,this.req=new x1().on("error",Do.nop),this.ret=new SWe({readableObjectMode:e.objectMode,autoDestroy:!0,read:i(()=>{let{body:l}=this;l?.resume&&l.resume()},"read"),write:i((l,u,d)=>{let{req:p}=this;p.push(l,u)||p._readableState.destroyed?d():p[mA]=d},"write"),destroy:i((l,u)=>{let{body:d,req:p,res:m,ret:f,abort:A}=this;!l&&!f._readableState.endEmitted&&(l=new S1),A&&l&&A(),Do.destroy(d,l),Do.destroy(p,l),Do.destroy(m,l),NWe(this),u(l)},"destroy")}).on("prefinish",()=>{let{req:l}=this;l.push(null)}),this.res=null,RWe(this,n)}onConnect(e,r){let{ret:n,res:s}=this;if(this.reason){e(this.reason);return}Nee(!s,"pipeline cannot be retried"),Nee(!n.destroyed),this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:s,handler:o,context:a}=this;if(e<200){if(this.onInfo){let l=this.responseHeaders==="raw"?Do.parseRawHeaders(r):Do.parseHeaders(r);this.onInfo({statusCode:e,headers:l})}return}this.res=new b1(n);let c;try{this.handler=null;let l=this.responseHeaders==="raw"?Do.parseRawHeaders(r):Do.parseHeaders(r);c=this.runInAsyncScope(o,null,{statusCode:e,headers:l,opaque:s,body:this.res,context:a})}catch(l){throw this.res.on("error",Do.nop),l}if(!c||typeof c.on!="function")throw new bWe("expected Readable");c.on("data",l=>{let{ret:u,body:d}=this;!u.push(l)&&d.pause&&d.pause()}).on("error",l=>{let{ret:u}=this;Do.destroy(u,l)}).on("end",()=>{let{ret:l}=this;l.push(null)}).on("close",()=>{let{ret:l}=this;l._readableState.ended||Do.destroy(l,new S1)}),this.body=c}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,Do.destroy(r,e)}};function TWe(t,e){try{let r=new B1(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new xWe().destroy(r)}}i(TWe,"pipeline");vee.exports=TWe});var Oee=I((K$t,Lee)=>{"use strict";var{InvalidArgumentError:R1,SocketError:vWe}=rt(),{AsyncResource:PWe}=require("node:async_hooks"),Qee=He(),{addSignal:QWe,removeSignal:_ee}=pE(),Dee=require("node:assert"),N1=class extends PWe{static{i(this,"UpgradeHandler")}constructor(e,r){if(!e||typeof e!="object")throw new R1("invalid opts");if(typeof r!="function")throw new R1("invalid callback");let{signal:n,opaque:s,responseHeaders:o}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new R1("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=o||null,this.opaque=s||null,this.callback=r,this.abort=null,this.context=null,QWe(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}Dee(this.callback),this.abort=e,this.context=null}onHeaders(){throw new vWe("bad upgrade",null)}onUpgrade(e,r,n){Dee(e===101);let{callback:s,opaque:o,context:a}=this;_ee(this),this.callback=null;let c=this.responseHeaders==="raw"?Qee.parseRawHeaders(r):Qee.parseHeaders(r);this.runInAsyncScope(s,null,null,{headers:c,socket:n,opaque:o,context:a})}onError(e){let{callback:r,opaque:n}=this;_ee(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function kee(t,e){if(e===void 0)return new Promise((r,n)=>{kee.call(this,t,(s,o)=>s?n(s):r(o))});try{let r=new N1(t,e);this.dispatch({...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}i(kee,"upgrade");Lee.exports=kee});var Gee=I((Z$t,qee)=>{"use strict";var _We=require("node:assert"),{AsyncResource:DWe}=require("node:async_hooks"),{InvalidArgumentError:T1,SocketError:kWe}=rt(),Mee=He(),{addSignal:LWe,removeSignal:Fee}=pE(),v1=class extends DWe{static{i(this,"ConnectHandler")}constructor(e,r){if(!e||typeof e!="object")throw new T1("invalid opts");if(typeof r!="function")throw new T1("invalid callback");let{signal:n,opaque:s,responseHeaders:o}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new T1("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=s||null,this.responseHeaders=o||null,this.callback=r,this.abort=null,LWe(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}_We(this.callback),this.abort=e,this.context=r}onHeaders(){throw new kWe("bad connect",null)}onUpgrade(e,r,n){let{callback:s,opaque:o,context:a}=this;Fee(this),this.callback=null;let c=r;c!=null&&(c=this.responseHeaders==="raw"?Mee.parseRawHeaders(r):Mee.parseHeaders(r)),this.runInAsyncScope(s,null,null,{statusCode:e,headers:c,socket:n,opaque:o,context:a})}onError(e){let{callback:r,opaque:n}=this;Fee(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function Uee(t,e){if(e===void 0)return new Promise((r,n)=>{Uee.call(this,t,(s,o)=>s?n(s):r(o))});try{let r=new v1(t,e);this.dispatch({...t,method:"CONNECT"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}i(Uee,"connect");qee.exports=Uee});var Hee=I((tzt,fA)=>{"use strict";fA.exports.request=Cee();fA.exports.stream=Ree();fA.exports.pipeline=Pee();fA.exports.upgrade=Oee();fA.exports.connect=Gee()});var Q1=I((rzt,zee)=>{"use strict";var{UndiciError:OWe}=rt(),$ee=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"),P1=class t extends OWe{static{i(this,"MockNotMatchedError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&e[$ee]===!0}[$ee]=!0};zee.exports={MockNotMatchedError:P1}});var AA=I((szt,Vee)=>{"use strict";Vee.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var fE=I((ozt,nte)=>{"use strict";var{MockNotMatchedError:Tp}=Q1(),{kDispatches:kb,kMockAgent:MWe,kOriginalDispatch:FWe,kOrigin:UWe,kGetNetConnect:qWe}=AA(),{buildURL:GWe}=He(),{STATUS_CODES:HWe}=require("node:http"),{types:{isPromise:$We}}=require("node:util");function Cl(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}i(Cl,"matchValue");function Yee(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}i(Yee,"lowerCaseEntries");function Jee(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let s=Jee(e,r);if(!Cl(n,s))return!1}return!0}i(jee,"matchHeaders");function Wee(t){if(typeof t!="string")return t;let e=t.split("?");if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}i(Wee,"safeUrl");function zWe(t,{path:e,method:r,body:n,headers:s}){let o=Cl(t.path,e),a=Cl(t.method,r),c=typeof t.body<"u"?Cl(t.body,n):!0,l=jee(t,s);return o&&a&&c&&l}i(zWe,"matchKey");function Kee(t){return Buffer.isBuffer(t)||t instanceof Uint8Array||t instanceof ArrayBuffer?t:typeof t=="object"?JSON.stringify(t):t.toString()}i(Kee,"getResponseData");function Xee(t,e){let r=e.query?GWe(e.path,e.query):e.path,n=typeof r=="string"?Wee(r):r,s=t.filter(({consumed:o})=>!o).filter(({path:o})=>Cl(Wee(o),n));if(s.length===0)throw new Tp(`Mock dispatch not matched for path '${n}'`);if(s=s.filter(({method:o})=>Cl(o,e.method)),s.length===0)throw new Tp(`Mock dispatch not matched for method '${e.method}' on path '${n}'`);if(s=s.filter(({body:o})=>typeof o<"u"?Cl(o,e.body):!0),s.length===0)throw new Tp(`Mock dispatch not matched for body '${e.body}' on path '${n}'`);if(s=s.filter(o=>jee(o,e.headers)),s.length===0){let o=typeof e.headers=="object"?JSON.stringify(e.headers):e.headers;throw new Tp(`Mock dispatch not matched for headers '${o}' on path '${n}'`)}return s[0]}i(Xee,"getMockDispatch");function VWe(t,e,r){let n={timesInvoked:0,times:1,persist:!1,consumed:!1},s=typeof r=="function"?{callback:r}:{...r},o={...n,...e,pending:!0,data:{error:null,...s}};return t.push(o),o}i(VWe,"addMockDispatch");function _1(t,e){let r=t.findIndex(n=>n.consumed?zWe(n,e):!1);r!==-1&&t.splice(r,1)}i(_1,"deleteMockDispatch");function Zee(t){let{path:e,method:r,body:n,headers:s,query:o}=t;return{path:e,method:r,body:n,headers:s,query:o}}i(Zee,"buildKey");function D1(t){let e=Object.keys(t),r=[];for(let n=0;n=m,n.pending=p0?setTimeout(()=>{f(this[kb])},u):f(this[kb]);function f(h,E=o){let C=Array.isArray(t.headers)?k1(t.headers):t.headers,w=typeof E=="function"?E({...t,headers:C}):E;if($We(w)){w.then(P=>f(h,P));return}let x=Kee(w),b=D1(a),N=D1(c);e.onConnect?.(P=>e.onError(P),null),e.onHeaders?.(s,b,A,ete(s)),e.onData?.(Buffer.from(x)),e.onComplete?.(N),_1(h,r)}i(f,"handleReply");function A(){}return i(A,"resume"),!0}i(tte,"mockDispatch");function YWe(){let t=this[MWe],e=this[UWe],r=this[FWe];return i(function(s,o){if(t.isMockActive)try{tte.call(this,s,o)}catch(a){if(a instanceof Tp){let c=t[qWe]();if(c===!1)throw new Tp(`${a.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)`);if(rte(c,e))r.call(this,s,o);else throw new Tp(`${a.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)`)}else throw a}else r.call(this,s,o)},"dispatch")}i(YWe,"buildMockDispatch");function rte(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>Cl(n,r.host)))}i(rte,"checkNetConnect");function JWe(t){if(t){let{agent:e,...r}=t;return r}}i(JWe,"buildMockOptions");nte.exports={getResponseData:Kee,getMockDispatch:Xee,addMockDispatch:VWe,deleteMockDispatch:_1,buildKey:Zee,generateKeyValues:D1,matchValue:Cl,getResponse:WWe,getStatusText:ete,mockDispatch:tte,buildMockDispatch:YWe,checkNetConnect:rte,buildMockOptions:JWe,getHeaderByName:Jee,buildHeadersFromArray:k1}});var G1=I((azt,q1)=>{"use strict";var{getResponseData:jWe,buildKey:KWe,addMockDispatch:L1}=fE(),{kDispatches:Lb,kDispatchKey:Ob,kDefaultHeaders:O1,kDefaultTrailers:M1,kContentLength:F1,kMockDispatch:Mb}=AA(),{InvalidArgumentError:Pa}=rt(),{buildURL:XWe}=He(),hA=class{static{i(this,"MockScope")}constructor(e){this[Mb]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Pa("waitInMs must be a valid integer > 0");return this[Mb].delay=e,this}persist(){return this[Mb].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Pa("repeatTimes must be a valid integer > 0");return this[Mb].times=e,this}},U1=class{static{i(this,"MockInterceptor")}constructor(e,r){if(typeof e!="object")throw new Pa("opts must be an object");if(typeof e.path>"u")throw new Pa("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=XWe(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[Ob]=KWe(e),this[Lb]=r,this[O1]={},this[M1]={},this[F1]=!1}createMockScopeDispatchData({statusCode:e,data:r,responseOptions:n}){let s=jWe(r),o=this[F1]?{"content-length":s.length}:{},a={...this[O1],...o,...n.headers},c={...this[M1],...n.trailers};return{statusCode:e,data:r,headers:a,trailers:c}}validateReplyParameters(e){if(typeof e.statusCode>"u")throw new Pa("statusCode must be defined");if(typeof e.responseOptions!="object"||e.responseOptions===null)throw new Pa("responseOptions must be an object")}reply(e){if(typeof e=="function"){let o=i(c=>{let l=e(c);if(typeof l!="object"||l===null)throw new Pa("reply options callback must return an object");let u={data:"",responseOptions:{},...l};return this.validateReplyParameters(u),{...this.createMockScopeDispatchData(u)}},"wrappedDefaultsCallback"),a=L1(this[Lb],this[Ob],o);return new hA(a)}let r={statusCode:e,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),s=L1(this[Lb],this[Ob],n);return new hA(s)}replyWithError(e){if(typeof e>"u")throw new Pa("error must be defined");let r=L1(this[Lb],this[Ob],{error:e});return new hA(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new Pa("headers must be defined");return this[O1]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new Pa("trailers must be defined");return this[M1]=e,this}replyContentLength(){return this[F1]=!0,this}};q1.exports.MockInterceptor=U1;q1.exports.MockScope=hA});var z1=I((lzt,ute)=>{"use strict";var{promisify:ZWe}=require("node:util"),eYe=oA(),{buildMockDispatch:tYe}=fE(),{kDispatches:ste,kMockAgent:ote,kClose:ite,kOriginalClose:ate,kOrigin:cte,kOriginalDispatch:rYe,kConnected:H1}=AA(),{MockInterceptor:nYe}=G1(),lte=Lt(),{InvalidArgumentError:sYe}=rt(),$1=class extends eYe{static{i(this,"MockClient")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new sYe("Argument opts.agent must implement Agent");this[ote]=r.agent,this[cte]=e,this[ste]=[],this[H1]=1,this[rYe]=this.dispatch,this[ate]=this.close.bind(this),this.dispatch=tYe.call(this),this.close=this[ite]}get[lte.kConnected](){return this[H1]}intercept(e){return new nYe(e,this[ste])}async[ite](){await ZWe(this[ate])(),this[H1]=0,this[ote][lte.kClients].delete(this[cte])}};ute.exports=$1});var Y1=I((dzt,gte)=>{"use strict";var{promisify:oYe}=require("node:util"),iYe=iA(),{buildMockDispatch:aYe}=fE(),{kDispatches:dte,kMockAgent:pte,kClose:mte,kOriginalClose:fte,kOrigin:Ate,kOriginalDispatch:cYe,kConnected:V1}=AA(),{MockInterceptor:lYe}=G1(),hte=Lt(),{InvalidArgumentError:uYe}=rt(),W1=class extends iYe{static{i(this,"MockPool")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new uYe("Argument opts.agent must implement Agent");this[pte]=r.agent,this[Ate]=e,this[dte]=[],this[V1]=1,this[cYe]=this.dispatch,this[fte]=this.close.bind(this),this.dispatch=aYe.call(this),this.close=this[mte]}get[hte.kConnected](){return this[V1]}intercept(e){return new lYe(e,this[dte])}async[mte](){await oYe(this[fte])(),this[V1]=0,this[pte][hte.kClients].delete(this[Ate])}};gte.exports=W1});var Ete=I((fzt,yte)=>{"use strict";var dYe={pronoun:"it",is:"is",was:"was",this:"this"},pYe={pronoun:"they",is:"are",was:"were",this:"these"};yte.exports=class{static{i(this,"Pluralizer")}constructor(e,r){this.singular=e,this.plural=r}pluralize(e){let r=e===1,n=r?dYe:pYe,s=r?this.singular:this.plural;return{...n,count:e,noun:s}}}});var Ite=I((gzt,Cte)=>{"use strict";var{Transform:mYe}=require("node:stream"),{Console:fYe}=require("node:console"),AYe=process.versions.icu?"\u2705":"Y ",hYe=process.versions.icu?"\u274C":"N ";Cte.exports=class{static{i(this,"PendingInterceptorsFormatter")}constructor({disableColors:e}={}){this.transform=new mYe({transform(r,n,s){s(null,r)}}),this.logger=new fYe({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:s,data:{statusCode:o},persist:a,times:c,timesInvoked:l,origin:u})=>({Method:n,Origin:u,Path:s,"Status code":o,Persistent:a?AYe:hYe,Invocations:l,Remaining:a?1/0:c-l}));return this.logger.table(r),this.transform.read().toString()}}});var bte=I((Ezt,xte)=>{"use strict";var{kClients:vp}=Lt(),gYe=aA(),{kAgent:J1,kMockAgentSet:Fb,kMockAgentGet:wte,kDispatches:j1,kIsMockActive:Ub,kNetConnect:Pp,kGetNetConnect:yYe,kOptions:qb,kFactory:Gb}=AA(),EYe=z1(),CYe=Y1(),{matchValue:IYe,buildMockOptions:wYe}=fE(),{InvalidArgumentError:Ste,UndiciError:SYe}=rt(),xYe=Oy(),bYe=Ete(),BYe=Ite(),K1=class extends xYe{static{i(this,"MockAgent")}constructor(e){if(super(e),this[Pp]=!0,this[Ub]=!0,e?.agent&&typeof e.agent.dispatch!="function")throw new Ste("Argument opts.agent must implement Agent");let r=e?.agent?e.agent:new gYe(e);this[J1]=r,this[vp]=r[vp],this[qb]=wYe(e)}get(e){let r=this[wte](e);return r||(r=this[Gb](e),this[Fb](e,r)),r}dispatch(e,r){return this.get(e.origin),this[J1].dispatch(e,r)}async close(){await this[J1].close(),this[vp].clear()}deactivate(){this[Ub]=!1}activate(){this[Ub]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[Pp])?this[Pp].push(e):this[Pp]=[e];else if(typeof e>"u")this[Pp]=!0;else throw new Ste("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[Pp]=!1}get isMockActive(){return this[Ub]}[Fb](e,r){this[vp].set(e,r)}[Gb](e){let r=Object.assign({agent:this},this[qb]);return this[qb]&&this[qb].connections===1?new EYe(e,r):new CYe(e,r)}[wte](e){let r=this[vp].get(e);if(r)return r;if(typeof e!="string"){let n=this[Gb]("http://localhost:9999");return this[Fb](e,n),n}for(let[n,s]of Array.from(this[vp]))if(s&&typeof n!="string"&&IYe(n,e)){let o=this[Gb](e);return this[Fb](e,o),o[j1]=s[j1],o}}[yYe](){return this[Pp]}pendingInterceptors(){let e=this[vp];return Array.from(e.entries()).flatMap(([r,n])=>n[j1].map(s=>({...s,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new BYe}={}){let r=this.pendingInterceptors();if(r.length===0)return;let n=new bYe("interceptor","interceptors").pluralize(r.length);throw new SYe(` +`,"latin1"),r!==null&&s!==r){if(n[TF])throw new yp;process.emitWarning(new yp)}e[Nt].timeout&&e[Nt].timeoutType===tA&&e[Nt].timeout.refresh&&e[Nt].timeout.refresh(),n[hl]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Cu]=!1,e&&(pe(n[Br]<=1,"pipeline should only contain this request"),s(e))}};L7.exports=N3e});var z7=I((l$t,$7)=>{"use strict";var Qo=require("node:assert"),{pipeline:k3e}=require("node:stream"),We=He(),{RequestContentLengthMismatchError:DF,RequestAbortedError:M7,SocketError:Ky,InformationalError:kF}=rt(),{kUrl:gb,kReset:Eb,kClient:rA,kRunning:Cb,kPending:L3e,kQueue:Iu,kPendingIdx:LF,kRunningIdx:xi,kError:Bi,kSocket:Vr,kStrictContentLength:O3e,kOnError:OF,kMaxConcurrentStreams:H7,kHTTP2Session:bi,kResume:wu,kSize:M3e,kHTTPContext:F3e}=Lt(),gl=Symbol("open streams"),F7,U7=!1,yb;try{yb=require("node:http2")}catch{yb={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:U3e,HTTP2_HEADER_METHOD:q3e,HTTP2_HEADER_PATH:G3e,HTTP2_HEADER_SCHEME:H3e,HTTP2_HEADER_CONTENT_LENGTH:$3e,HTTP2_HEADER_EXPECT:z3e,HTTP2_HEADER_STATUS:V3e}}=yb;function W3e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}i(W3e,"parseH2Headers");async function Y3e(t,e){t[Vr]=e,U7||(U7=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=yb.connect(t[gb],{createConnection:i(()=>e,"createConnection"),peerMaxConcurrentStreams:t[H7]});r[gl]=0,r[rA]=t,r[Vr]=e,We.addListener(r,"error",j3e),We.addListener(r,"frameError",K3e),We.addListener(r,"end",X3e),We.addListener(r,"goaway",Z3e),We.addListener(r,"close",function(){let{[rA]:s}=this,{[Vr]:o}=s,a=this[Vr][Bi]||this[Bi]||new Ky("closed",We.getSocketInfo(o));if(s[bi]=null,s.destroyed){Qo(s[L3e]===0);let c=s[Iu].splice(s[xi]);for(let l=0;l{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return tVe(t,...s)},resume(){J3e(t)},destroy(s,o){n?queueMicrotask(o):e.destroy(s).on("close",o)},get destroyed(){return e.destroyed},busy(){return!1}}}i(Y3e,"connectH2");function J3e(t){let e=t[Vr];e?.destroyed===!1&&(t[M3e]===0&&t[H7]===0?(e.unref(),t[bi].unref()):(e.ref(),t[bi].ref()))}i(J3e,"resumeH2");function j3e(t){Qo(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Vr][Bi]=t,this[rA][OF](t)}i(j3e,"onHttp2SessionError");function K3e(t,e,r){if(r===0){let n=new kF(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Vr][Bi]=n,this[rA][OF](n)}}i(K3e,"onHttp2FrameError");function X3e(){let t=new Ky("other side closed",We.getSocketInfo(this[Vr]));this.destroy(t),We.destroy(this[Vr],t)}i(X3e,"onHttp2SessionEnd");function Z3e(t){let e=this[Bi]||new Ky(`HTTP/2: "GOAWAY" frame received with code ${t}`,We.getSocketInfo(this)),r=this[rA];if(r[Vr]=null,r[F3e]=null,this[bi]!=null&&(this[bi].destroy(e),this[bi]=null),We.destroy(this[Vr],e),r[xi]{e.aborted||e.completed||(b=b||new M7,We.errorRequest(t,e,b),m!=null&&We.destroy(m,b),We.destroy(d,b),t[Iu][t[xi]++]=null,t[wu]())},"abort");try{e.onConnect(h)}catch(b){We.errorRequest(t,e,b)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),m=r.request(p,{endStream:!1,signal:l}),m.id&&!m.pending?(e.onUpgrade(null,null,m),++r[gl],t[Iu][t[xi]++]=null):m.once("ready",()=>{e.onUpgrade(null,null,m),++r[gl],t[Iu][t[xi]++]=null}),m.once("close",()=>{r[gl]-=1,r[gl]===0&&r.unref()}),!0;p[G3e]=s,p[H3e]="https";let E=n==="PUT"||n==="POST"||n==="PATCH";d&&typeof d.read=="function"&&d.read(0);let C=We.bodyLength(d);if(We.isFormDataLike(d)){F7??=Xf().extractBody;let[b,N]=F7(d);p["content-type"]=N,d=b.stream,C=b.length}if(C==null&&(C=e.contentLength),(C===0||!E)&&(C=null),eVe(n)&&C>0&&e.contentLength!=null&&e.contentLength!==C){if(t[O3e])return We.errorRequest(t,e,new DF),!1;process.emitWarning(new DF)}C!=null&&(Qo(d,"no body must not have content length"),p[$3e]=`${C}`),r.ref();let w=n==="GET"||n==="HEAD"||d===null;return c?(p[z3e]="100-continue",m=r.request(p,{endStream:w,signal:l}),m.once("continue",x)):(m=r.request(p,{endStream:w,signal:l}),x()),++r[gl],m.once("response",b=>{let{[V3e]:N,...P}=b;if(e.onResponseStarted(),e.aborted){let _=new M7;We.errorRequest(t,e,_),We.destroy(m,_);return}e.onHeaders(Number(N),W3e(P),m.resume.bind(m),"")===!1&&m.pause(),m.on("data",_=>{e.onData(_)===!1&&m.pause()})}),m.once("end",()=>{(m.state?.state==null||m.state.state<6)&&e.onComplete([]),r[gl]===0&&r.unref(),h(new kF("HTTP/2: stream half-closed (remote)")),t[Iu][t[xi]++]=null,t[LF]=t[xi],t[wu]()}),m.once("close",()=>{r[gl]-=1,r[gl]===0&&r.unref()}),m.once("error",function(b){h(b)}),m.once("frameError",(b,N)=>{h(new kF(`HTTP/2: "frameError" received - type ${b}, code ${N}`))}),!0;function x(){!d||C===0?q7(h,m,null,t,e,t[Vr],C,E):We.isBuffer(d)?q7(h,m,d,t,e,t[Vr],C,E):We.isBlobLike(d)?typeof d.stream=="function"?G7(h,m,d.stream(),t,e,t[Vr],C,E):nVe(h,m,d,t,e,t[Vr],C,E):We.isStream(d)?rVe(h,t[Vr],E,m,d,t,e,C):We.isIterable(d)?G7(h,m,d,t,e,t[Vr],C,E):Qo(!1)}i(x,"writeBodyH2")}i(tVe,"writeH2");function q7(t,e,r,n,s,o,a,c){try{r!=null&&We.isBuffer(r)&&(Qo(a===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),s.onBodySent(r)),c||(o[Eb]=!0),s.onRequestSent(),n[wu]()}catch(l){t(l)}}i(q7,"writeBuffer");function rVe(t,e,r,n,s,o,a,c){Qo(c!==0||o[Cb]===0,"stream body cannot be pipelined");let l=k3e(s,n,d=>{d?(We.destroy(l,d),t(d)):(We.removeAllListeners(l),a.onRequestSent(),r||(e[Eb]=!0),o[wu]())});We.addListener(l,"data",u);function u(d){a.onBodySent(d)}i(u,"onPipeData")}i(rVe,"writeStream");async function nVe(t,e,r,n,s,o,a,c){Qo(a===r.size,"blob body must have content length");try{if(a!=null&&a!==r.size)throw new DF;let l=Buffer.from(await r.arrayBuffer());e.cork(),e.write(l),e.uncork(),e.end(),s.onBodySent(l),s.onRequestSent(),c||(o[Eb]=!0),n[wu]()}catch(l){t(l)}}i(nVe,"writeBlob");async function G7(t,e,r,n,s,o,a,c){Qo(a!==0||n[Cb]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let p=l;l=null,p()}}i(u,"onDrain");let d=i(()=>new Promise((p,m)=>{Qo(l===null),o[Bi]?m(o[Bi]):l=p}),"waitForDrain");e.on("close",u).on("drain",u);try{for await(let p of r){if(o[Bi])throw o[Bi];let m=e.write(p);s.onBodySent(p),m||await d()}e.end(),s.onRequestSent(),c||(o[Eb]=!0),n[wu]()}catch(p){t(p)}finally{e.off("close",u).off("drain",u)}}i(G7,"writeIterable");$7.exports=Y3e});var wb=I((d$t,Y7)=>{"use strict";var Na=He(),{kBodyUsed:Xy}=Lt(),FF=require("node:assert"),{InvalidArgumentError:sVe}=rt(),oVe=require("node:events"),iVe=[300,301,302,303,307,308],V7=Symbol("body"),Ib=class{static{i(this,"BodyAsyncIterable")}constructor(e){this[V7]=e,this[Xy]=!1}async*[Symbol.asyncIterator](){FF(!this[Xy],"disturbed"),this[Xy]=!0,yield*this[V7]}},MF=class{static{i(this,"RedirectHandler")}constructor(e,r,n,s){if(r!=null&&(!Number.isInteger(r)||r<0))throw new sVe("maxRedirections must be a positive number");Na.validateHandler(s,n.method,n.upgrade),this.dispatch=e,this.location=null,this.abort=null,this.opts={...n,maxRedirections:0},this.maxRedirections=r,this.handler=s,this.history=[],this.redirectionLimitReached=!1,Na.isStream(this.opts.body)?(Na.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){FF(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[Xy]=!1,oVe.prototype.on.call(this.opts.body,"data",function(){this[Xy]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new Ib(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&Na.isIterable(this.opts.body)&&(this.opts.body=new Ib(this.opts.body))}onConnect(e){this.abort=e,this.handler.onConnect(e,{history:this.history})}onUpgrade(e,r,n){this.handler.onUpgrade(e,r,n)}onError(e){this.handler.onError(e)}onHeaders(e,r,n,s){if(this.location=this.history.length>=this.maxRedirections||Na.isDisturbed(this.opts.body)?null:aVe(e,r),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){this.request&&this.request.abort(new Error("max redirects")),this.redirectionLimitReached=!0,this.abort(new Error("max redirects"));return}if(this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(e,r,n,s);let{origin:o,pathname:a,search:c}=Na.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),l=c?`${a}${c}`:a;this.opts.headers=cVe(this.opts.headers,e===303,this.opts.origin!==o),this.opts.path=l,this.opts.origin=o,this.opts.maxRedirections=0,this.opts.query=null,e===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",this.opts.body=null)}onData(e){if(!this.location)return this.handler.onData(e)}onComplete(e){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(e)}onBodySent(e){this.handler.onBodySent&&this.handler.onBodySent(e)}};function aVe(t,e){if(iVe.indexOf(t)===-1)return null;for(let r=0;r{"use strict";var lVe=wb();function uVe({maxRedirections:t}){return e=>i(function(n,s){let{maxRedirections:o=t}=n;if(!o)return e(n,s);let a=new lVe(e,o,n,s);return n={...n,maxRedirections:0},e(n,a)},"Intercept")}i(uVe,"createRedirectInterceptor");J7.exports=uVe});var oA=I((A$t,oZ)=>{"use strict";var yl=require("node:assert"),tZ=require("node:net"),dVe=require("node:http"),wp=He(),{channels:nA}=Ff(),pVe=oX(),mVe=Hf(),{InvalidArgumentError:pr,InformationalError:fVe,ClientDestroyedError:AVe}=rt(),hVe=Fy(),{kUrl:Ta,kServerName:Su,kClient:gVe,kBusy:UF,kConnect:yVe,kResuming:Sp,kRunning:nE,kPending:sE,kSize:rE,kQueue:Ri,kConnected:EVe,kConnecting:sA,kNeedDrain:bu,kKeepAliveDefaultTimeout:j7,kHostHeader:CVe,kPendingIdx:Ni,kRunningIdx:El,kError:IVe,kPipelining:xb,kKeepAliveTimeoutValue:wVe,kMaxHeadersSize:SVe,kKeepAliveMaxTimeout:xVe,kKeepAliveTimeoutThreshold:bVe,kHeadersTimeout:BVe,kBodyTimeout:RVe,kStrictContentLength:NVe,kConnector:Zy,kMaxRedirections:TVe,kMaxRequests:qF,kCounter:vVe,kClose:PVe,kDestroy:QVe,kDispatch:_Ve,kInterceptors:K7,kLocalAddress:eE,kMaxResponseSize:DVe,kOnError:kVe,kHTTPContext:mr,kMaxConcurrentStreams:LVe,kResume:tE}=Lt(),OVe=O7(),MVe=z7(),X7=!1,xu=Symbol("kClosedResolve"),Z7=i(()=>{},"noop");function rZ(t){return t[xb]??t[mr]?.defaultPipelining??1}i(rZ,"getPipelining");var GF=class extends mVe{static{i(this,"Client")}constructor(e,{interceptors:r,maxHeaderSize:n,headersTimeout:s,socketTimeout:o,requestTimeout:a,connectTimeout:c,bodyTimeout:l,idleTimeout:u,keepAlive:d,keepAliveTimeout:p,maxKeepAliveTimeout:m,keepAliveMaxTimeout:f,keepAliveTimeoutThreshold:A,socketPath:h,pipelining:E,tls:C,strictContentLength:w,maxCachedSessions:x,maxRedirections:b,connect:N,maxRequestsPerClient:P,localAddress:_,maxResponseSize:re,autoSelectFamily:ye,autoSelectFamilyAttemptTimeout:ae,maxConcurrentStreams:qe,allowH2:ne,webSocket:K}={}){if(super({webSocket:K}),d!==void 0)throw new pr("unsupported keepAlive, use pipelining=0 instead");if(o!==void 0)throw new pr("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(a!==void 0)throw new pr("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(u!==void 0)throw new pr("unsupported idleTimeout, use keepAliveTimeout instead");if(m!==void 0)throw new pr("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(n!=null&&!Number.isFinite(n))throw new pr("invalid maxHeaderSize");if(h!=null&&typeof h!="string")throw new pr("invalid socketPath");if(c!=null&&(!Number.isFinite(c)||c<0))throw new pr("invalid connectTimeout");if(p!=null&&(!Number.isFinite(p)||p<=0))throw new pr("invalid keepAliveTimeout");if(f!=null&&(!Number.isFinite(f)||f<=0))throw new pr("invalid keepAliveMaxTimeout");if(A!=null&&!Number.isFinite(A))throw new pr("invalid keepAliveTimeoutThreshold");if(s!=null&&(!Number.isInteger(s)||s<0))throw new pr("headersTimeout must be a positive integer or zero");if(l!=null&&(!Number.isInteger(l)||l<0))throw new pr("bodyTimeout must be a positive integer or zero");if(N!=null&&typeof N!="function"&&typeof N!="object")throw new pr("connect must be a function or an object");if(b!=null&&(!Number.isInteger(b)||b<0))throw new pr("maxRedirections must be a positive number");if(P!=null&&(!Number.isInteger(P)||P<0))throw new pr("maxRequestsPerClient must be a positive number");if(_!=null&&(typeof _!="string"||tZ.isIP(_)===0))throw new pr("localAddress must be valid string IP address");if(re!=null&&(!Number.isInteger(re)||re<-1))throw new pr("maxResponseSize must be a positive number");if(ae!=null&&(!Number.isInteger(ae)||ae<-1))throw new pr("autoSelectFamilyAttemptTimeout must be a positive number");if(ne!=null&&typeof ne!="boolean")throw new pr("allowH2 must be a valid boolean value");if(qe!=null&&(typeof qe!="number"||qe<1))throw new pr("maxConcurrentStreams must be a positive integer, greater than 0");typeof N!="function"&&(N=hVe({...C,maxCachedSessions:x,allowH2:ne,socketPath:h,timeout:c,...ye?{autoSelectFamily:ye,autoSelectFamilyAttemptTimeout:ae}:void 0,...N})),r?.Client&&Array.isArray(r.Client)?(this[K7]=r.Client,X7||(X7=!0,process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.",{code:"UNDICI-CLIENT-INTERCEPTOR-DEPRECATED"}))):this[K7]=[FVe({maxRedirections:b})],this[Ta]=wp.parseOrigin(e),this[Zy]=N,this[xb]=E??1,this[SVe]=n||dVe.maxHeaderSize,this[j7]=p??4e3,this[xVe]=f??6e5,this[bVe]=A??2e3,this[wVe]=this[j7],this[Su]=null,this[eE]=_??null,this[Sp]=0,this[bu]=0,this[CVe]=`host: ${this[Ta].hostname}${this[Ta].port?`:${this[Ta].port}`:""}\r +`,this[RVe]=l??3e5,this[BVe]=s??3e5,this[NVe]=w??!0,this[TVe]=b,this[qF]=P,this[xu]=null,this[DVe]=re>-1?re:-1,this[LVe]=qe??100,this[mr]=null,this[Ri]=[],this[El]=0,this[Ni]=0,this[tE]=U=>HF(this,U),this[kVe]=U=>nZ(this,U)}get pipelining(){return this[xb]}set pipelining(e){this[xb]=e,this[tE](!0)}get[sE](){return this[Ri].length-this[Ni]}get[nE](){return this[Ni]-this[El]}get[rE](){return this[Ri].length-this[El]}get[EVe](){return!!this[mr]&&!this[sA]&&!this[mr].destroyed}get[UF](){return!!(this[mr]?.busy(null)||this[rE]>=(rZ(this)||1)||this[sE]>0)}[yVe](e){sZ(this),this.once("connect",e)}[_Ve](e,r){let n=e.origin||this[Ta].origin,s=new pVe(n,e,r);return this[Ri].push(s),this[Sp]||(wp.bodyLength(s.body)==null&&wp.isIterable(s.body)?(this[Sp]=1,queueMicrotask(()=>HF(this))):this[tE](!0)),this[Sp]&&this[bu]!==2&&this[UF]&&(this[bu]=2),this[bu]<2}async[PVe](){return new Promise(e=>{this[rE]?this[xu]=e:e(null)})}async[QVe](e){return new Promise(r=>{let n=this[Ri].splice(this[Ni]);for(let o=0;o{this[xu]&&(this[xu](),this[xu]=null),r(null)},"callback");this[mr]?(this[mr].destroy(e,s),this[mr]=null):queueMicrotask(s),this[tE]()})}},FVe=Sb();function nZ(t,e){if(t[nE]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){yl(t[Ni]===t[El]);let r=t[Ri].splice(t[El]);for(let n=0;n{t[Zy]({host:e,hostname:r,protocol:n,port:s,servername:t[Su],localAddress:t[eE]},(l,u)=>{l?c(l):a(u)})});if(t.destroyed){wp.destroy(o.on("error",Z7),new AVe);return}yl(o);try{t[mr]=o.alpnProtocol==="h2"?await MVe(t,o):await OVe(t,o)}catch(a){throw o.destroy().on("error",Z7),a}t[sA]=!1,o[vVe]=0,o[qF]=t[qF],o[gVe]=t,o[IVe]=null,nA.connected.hasSubscribers&&nA.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[mr]?.version,servername:t[Su],localAddress:t[eE]},connector:t[Zy],socket:o}),t.emit("connect",t[Ta],[t])}catch(o){if(t.destroyed)return;if(t[sA]=!1,nA.connectError.hasSubscribers&&nA.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[mr]?.version,servername:t[Su],localAddress:t[eE]},connector:t[Zy],error:o}),o.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(yl(t[nE]===0);t[sE]>0&&t[Ri][t[Ni]].servername===t[Su];){let a=t[Ri][t[Ni]++];wp.errorRequest(t,a,o)}else nZ(t,o);t.emit("connectionError",t[Ta],[t],o)}t[tE]()}i(sZ,"connect");function eZ(t){t[bu]=0,t.emit("drain",t[Ta],[t])}i(eZ,"emitDrain");function HF(t,e){t[Sp]!==2&&(t[Sp]=2,UVe(t,e),t[Sp]=0,t[El]>256&&(t[Ri].splice(0,t[El]),t[Ni]-=t[El],t[El]=0))}i(HF,"resume");function UVe(t,e){for(;;){if(t.destroyed){yl(t[sE]===0);return}if(t[xu]&&!t[rE]){t[xu](),t[xu]=null;return}if(t[mr]&&t[mr].resume(),t[UF])t[bu]=2;else if(t[bu]===2){e?(t[bu]=1,queueMicrotask(()=>eZ(t))):eZ(t);continue}if(t[sE]===0||t[nE]>=(rZ(t)||1))return;let r=t[Ri][t[Ni]];if(t[Ta].protocol==="https:"&&t[Su]!==r.servername){if(t[nE]>0)return;t[Su]=r.servername,t[mr]?.destroy(new fVe("servername changed"),()=>{t[mr]=null,HF(t)})}if(t[sA])return;if(!t[mr]){sZ(t);return}if(t[mr].destroyed||t[mr].busy(r))return;!r.aborted&&t[mr].write(r)?t[Ni]++:t[Ri].splice(t[Ni],1)}}i(UVe,"_resume");oZ.exports=GF});var $F=I((y$t,iZ)=>{"use strict";var bb=class{static{i(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};iZ.exports=class{static{i(this,"FixedQueue")}constructor(){this.head=this.tail=new bb}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new bb),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var cZ=I((C$t,aZ)=>{var{kFree:qVe,kConnected:GVe,kPending:HVe,kQueued:$Ve,kRunning:zVe,kSize:VVe}=Lt(),xp=Symbol("pool"),zF=class{static{i(this,"PoolStats")}constructor(e){this[xp]=e}get connected(){return this[xp][GVe]}get free(){return this[xp][qVe]}get pending(){return this[xp][HVe]}get queued(){return this[xp][$Ve]}get running(){return this[xp][zVe]}get size(){return this[xp][VVe]}};aZ.exports=zF});var KF=I((w$t,yZ)=>{"use strict";var WVe=Hf(),YVe=$F(),{kConnected:VF,kSize:lZ,kRunning:uZ,kPending:dZ,kQueued:oE,kBusy:JVe,kFree:jVe,kUrl:KVe,kClose:XVe,kDestroy:ZVe,kDispatch:e4e}=Lt(),t4e=cZ(),As=Symbol("clients"),qn=Symbol("needDrain"),iE=Symbol("queue"),WF=Symbol("closed resolve"),YF=Symbol("onDrain"),pZ=Symbol("onConnect"),mZ=Symbol("onDisconnect"),fZ=Symbol("onConnectionError"),JF=Symbol("get dispatcher"),hZ=Symbol("add client"),gZ=Symbol("remove client"),AZ=Symbol("stats"),jF=class extends WVe{static{i(this,"PoolBase")}constructor(e){super(e),this[iE]=new YVe,this[As]=[],this[oE]=0;let r=this;this[YF]=i(function(s,o){let a=r[iE],c=!1;for(;!c;){let l=a.shift();if(!l)break;r[oE]--,c=!this.dispatch(l.opts,l.handler)}this[qn]=c,!this[qn]&&r[qn]&&(r[qn]=!1,r.emit("drain",s,[r,...o])),r[WF]&&a.isEmpty()&&Promise.all(r[As].map(l=>l.close())).then(r[WF])},"onDrain"),this[pZ]=(n,s)=>{r.emit("connect",n,[r,...s])},this[mZ]=(n,s,o)=>{r.emit("disconnect",n,[r,...s],o)},this[fZ]=(n,s,o)=>{r.emit("connectionError",n,[r,...s],o)},this[AZ]=new t4e(this)}get[JVe](){return this[qn]}get[VF](){return this[As].filter(e=>e[VF]).length}get[jVe](){return this[As].filter(e=>e[VF]&&!e[qn]).length}get[dZ](){let e=this[oE];for(let{[dZ]:r}of this[As])e+=r;return e}get[uZ](){let e=0;for(let{[uZ]:r}of this[As])e+=r;return e}get[lZ](){let e=this[oE];for(let{[lZ]:r}of this[As])e+=r;return e}get stats(){return this[AZ]}async[XVe](){this[iE].isEmpty()?await Promise.all(this[As].map(e=>e.close())):await new Promise(e=>{this[WF]=e})}async[ZVe](e){for(;;){let r=this[iE].shift();if(!r)break;r.handler.onError(e)}await Promise.all(this[As].map(r=>r.destroy(e)))}[e4e](e,r){let n=this[JF]();return n?n.dispatch(e,r)||(n[qn]=!0,this[qn]=!this[JF]()):(this[qn]=!0,this[iE].push({opts:e,handler:r}),this[oE]++),!this[qn]}[hZ](e){return e.on("drain",this[YF]).on("connect",this[pZ]).on("disconnect",this[mZ]).on("connectionError",this[fZ]),this[As].push(e),this[qn]&&queueMicrotask(()=>{this[qn]&&this[YF](e[KVe],[this,e])}),this}[gZ](e){e.close(()=>{let r=this[As].indexOf(e);r!==-1&&this[As].splice(r,1)}),this[qn]=this[As].some(r=>!r[qn]&&r.closed!==!0&&r.destroyed!==!0)}};yZ.exports={PoolBase:jF,kClients:As,kNeedDrain:qn,kAddClient:hZ,kRemoveClient:gZ,kGetDispatcher:JF}});var iA=I((x$t,wZ)=>{"use strict";var{PoolBase:r4e,kClients:Bb,kNeedDrain:n4e,kAddClient:s4e,kGetDispatcher:o4e}=KF(),i4e=oA(),{InvalidArgumentError:XF}=rt(),EZ=He(),{kUrl:CZ,kInterceptors:a4e}=Lt(),c4e=Fy(),ZF=Symbol("options"),e1=Symbol("connections"),IZ=Symbol("factory");function l4e(t,e){return new i4e(t,e)}i(l4e,"defaultFactory");var t1=class extends r4e{static{i(this,"Pool")}constructor(e,{connections:r,factory:n=l4e,connect:s,connectTimeout:o,tls:a,maxCachedSessions:c,socketPath:l,autoSelectFamily:u,autoSelectFamilyAttemptTimeout:d,allowH2:p,...m}={}){if(r!=null&&(!Number.isFinite(r)||r<0))throw new XF("invalid connections");if(typeof n!="function")throw new XF("factory must be a function.");if(s!=null&&typeof s!="function"&&typeof s!="object")throw new XF("connect must be a function or an object");typeof s!="function"&&(s=c4e({...a,maxCachedSessions:c,allowH2:p,socketPath:l,timeout:o,...u?{autoSelectFamily:u,autoSelectFamilyAttemptTimeout:d}:void 0,...s})),super(m),this[a4e]=m.interceptors?.Pool&&Array.isArray(m.interceptors.Pool)?m.interceptors.Pool:[],this[e1]=r||null,this[CZ]=EZ.parseOrigin(e),this[ZF]={...EZ.deepClone(m),connect:s,allowH2:p},this[ZF].interceptors=m.interceptors?{...m.interceptors}:void 0,this[IZ]=n,this.on("connectionError",(f,A,h)=>{for(let E of A){let C=this[Bb].indexOf(E);C!==-1&&this[Bb].splice(C,1)}})}[o4e](){for(let e of this[Bb])if(!e[n4e])return e;if(!this[e1]||this[Bb].length{"use strict";var{BalancedPoolMissingUpstreamError:u4e,InvalidArgumentError:d4e}=rt(),{PoolBase:p4e,kClients:wn,kNeedDrain:aE,kAddClient:m4e,kRemoveClient:f4e,kGetDispatcher:A4e}=KF(),h4e=iA(),{kUrl:r1,kInterceptors:g4e}=Lt(),{parseOrigin:SZ}=He(),xZ=Symbol("factory"),Rb=Symbol("options"),bZ=Symbol("kGreatestCommonDivisor"),bp=Symbol("kCurrentWeight"),Bp=Symbol("kIndex"),_o=Symbol("kWeight"),Nb=Symbol("kMaxWeightPerServer"),Tb=Symbol("kErrorPenalty");function y4e(t,e){if(t===0)return e;for(;e!==0;){let r=e;e=t%e,t=r}return t}i(y4e,"getGreatestCommonDivisor");function E4e(t,e){return new h4e(t,e)}i(E4e,"defaultFactory");var n1=class extends p4e{static{i(this,"BalancedPool")}constructor(e=[],{factory:r=E4e,...n}={}){if(super(),this[Rb]=n,this[Bp]=-1,this[bp]=0,this[Nb]=this[Rb].maxWeightPerServer||100,this[Tb]=this[Rb].errorPenalty||15,Array.isArray(e)||(e=[e]),typeof r!="function")throw new d4e("factory must be a function.");this[g4e]=n.interceptors?.BalancedPool&&Array.isArray(n.interceptors.BalancedPool)?n.interceptors.BalancedPool:[],this[xZ]=r;for(let s of e)this.addUpstream(s);this._updateBalancedPoolStats()}addUpstream(e){let r=SZ(e).origin;if(this[wn].find(s=>s[r1].origin===r&&s.closed!==!0&&s.destroyed!==!0))return this;let n=this[xZ](r,Object.assign({},this[Rb]));this[m4e](n),n.on("connect",()=>{n[_o]=Math.min(this[Nb],n[_o]+this[Tb])}),n.on("connectionError",()=>{n[_o]=Math.max(1,n[_o]-this[Tb]),this._updateBalancedPoolStats()}),n.on("disconnect",(...s)=>{let o=s[2];o&&o.code==="UND_ERR_SOCKET"&&(n[_o]=Math.max(1,n[_o]-this[Tb]),this._updateBalancedPoolStats())});for(let s of this[wn])s[_o]=this[Nb];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let r=0;rs[r1].origin===r&&s.closed!==!0&&s.destroyed!==!0);return n&&this[f4e](n),this}get upstreams(){return this[wn].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[r1].origin)}[A4e](){if(this[wn].length===0)throw new u4e;if(!this[wn].find(o=>!o[aE]&&o.closed!==!0&&o.destroyed!==!0)||this[wn].map(o=>o[aE]).reduce((o,a)=>o&&a,!0))return;let n=0,s=this[wn].findIndex(o=>!o[aE]);for(;n++this[wn][s][_o]&&!o[aE]&&(s=this[Bp]),this[Bp]===0&&(this[bp]=this[bp]-this[bZ],this[bp]<=0&&(this[bp]=this[Nb])),o[_o]>=this[bp]&&!o[aE])return o}return this[bp]=this[wn][s][_o],this[Bp]=s,this[wn][s]}};BZ.exports=n1});var aA=I((N$t,DZ)=>{"use strict";var{InvalidArgumentError:vb}=rt(),{kClients:Bu,kRunning:NZ,kClose:C4e,kDestroy:I4e,kDispatch:w4e,kInterceptors:S4e}=Lt(),x4e=Hf(),b4e=iA(),B4e=oA(),R4e=He(),N4e=Sb(),TZ=Symbol("onConnect"),vZ=Symbol("onDisconnect"),PZ=Symbol("onConnectionError"),T4e=Symbol("maxRedirections"),QZ=Symbol("onDrain"),_Z=Symbol("factory"),s1=Symbol("options");function v4e(t,e){return e&&e.connections===1?new B4e(t,e):new b4e(t,e)}i(v4e,"defaultFactory");var o1=class extends x4e{static{i(this,"Agent")}constructor({factory:e=v4e,maxRedirections:r=0,connect:n,...s}={}){if(typeof e!="function")throw new vb("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new vb("connect must be a function or an object");if(!Number.isInteger(r)||r<0)throw new vb("maxRedirections must be a positive number");super(s),n&&typeof n!="function"&&(n={...n}),this[S4e]=s.interceptors?.Agent&&Array.isArray(s.interceptors.Agent)?s.interceptors.Agent:[N4e({maxRedirections:r})],this[s1]={...R4e.deepClone(s),connect:n},this[s1].interceptors=s.interceptors?{...s.interceptors}:void 0,this[T4e]=r,this[_Z]=e,this[Bu]=new Map,this[QZ]=(o,a)=>{this.emit("drain",o,[this,...a])},this[TZ]=(o,a)=>{this.emit("connect",o,[this,...a])},this[vZ]=(o,a,c)=>{this.emit("disconnect",o,[this,...a],c)},this[PZ]=(o,a,c)=>{this.emit("connectionError",o,[this,...a],c)}}get[NZ](){let e=0;for(let r of this[Bu].values())e+=r[NZ];return e}[w4e](e,r){let n;if(e.origin&&(typeof e.origin=="string"||e.origin instanceof URL))n=String(e.origin);else throw new vb("opts.origin must be a non-empty string or URL.");let s=this[Bu].get(n);return s||(s=this[_Z](e.origin,this[s1]).on("drain",this[QZ]).on("connect",this[TZ]).on("disconnect",this[vZ]).on("connectionError",this[PZ]),this[Bu].set(n,s)),s.dispatch(e,r)}async[C4e](){let e=[];for(let r of this[Bu].values())e.push(r.close());this[Bu].clear(),await Promise.all(e)}async[I4e](e){let r=[];for(let n of this[Bu].values())r.push(n.destroy(e));this[Bu].clear(),await Promise.all(r)}};DZ.exports=o1});var u1=I((v$t,zZ)=>{"use strict";var{kProxy:i1,kClose:UZ,kDestroy:qZ,kDispatch:kZ,kInterceptors:P4e}=Lt(),{URL:Rp}=require("node:url"),Q4e=aA(),GZ=iA(),HZ=Hf(),{InvalidArgumentError:cA,RequestAbortedError:_4e,SecureProxyConnectionError:D4e}=rt(),LZ=Fy(),$Z=oA(),Pb=Symbol("proxy agent"),Qb=Symbol("proxy client"),Ru=Symbol("proxy headers"),a1=Symbol("request tls settings"),OZ=Symbol("proxy tls settings"),MZ=Symbol("connect endpoint function"),FZ=Symbol("tunnel proxy");function k4e(t){return t==="https:"?443:80}i(k4e,"defaultProtocolPort");function L4e(t,e){return new GZ(t,e)}i(L4e,"defaultFactory");var O4e=i(()=>{},"noop");function M4e(t,e){return e.connections===1?new $Z(t,e):new GZ(t,e)}i(M4e,"defaultAgentFactory");var c1=class extends HZ{static{i(this,"Http1ProxyWrapper")}#e;constructor(e,{headers:r={},connect:n,factory:s}){if(super(),!e)throw new cA("Proxy URL is mandatory");this[Ru]=r,s?this.#e=s(e,{connect:n}):this.#e=new $Z(e,{connect:n})}[kZ](e,r){let n=r.onHeaders;r.onHeaders=function(c,l,u){if(c===407){typeof r.onError=="function"&&r.onError(new cA("Proxy Authentication Required (407)"));return}n&&n.call(this,c,l,u)};let{origin:s,path:o="/",headers:a={}}=e;if(e.path=s+o,!("host"in a)&&!("Host"in a)){let{host:c}=new Rp(s);a.host=c}return e.headers={...this[Ru],...a},this.#e[kZ](e,r)}async[UZ](){return this.#e.close()}async[qZ](e){return this.#e.destroy(e)}},l1=class extends HZ{static{i(this,"ProxyAgent")}constructor(e){if(super(),!e||typeof e=="object"&&!(e instanceof Rp)&&!e.uri)throw new cA("Proxy uri is mandatory");let{clientFactory:r=L4e}=e;if(typeof r!="function")throw new cA("Proxy opts.clientFactory must be a function.");let{proxyTunnel:n=!0}=e,s=this.#e(e),{href:o,origin:a,port:c,protocol:l,username:u,password:d,hostname:p}=s;if(this[i1]={uri:o,protocol:l},this[P4e]=e.interceptors?.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],this[a1]=e.requestTls,this[OZ]=e.proxyTls,this[Ru]=e.headers||{},this[FZ]=n,e.auth&&e.token)throw new cA("opts.auth cannot be used in combination with opts.token");e.auth?this[Ru]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[Ru]["proxy-authorization"]=e.token:u&&d&&(this[Ru]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(u)}:${decodeURIComponent(d)}`).toString("base64")}`);let m=LZ({...e.proxyTls});this[MZ]=LZ({...e.requestTls});let f=e.factory||M4e,A=i((h,E)=>{let{protocol:C}=new Rp(h);return!this[FZ]&&C==="http:"&&this[i1].protocol==="http:"?new c1(this[i1].uri,{headers:this[Ru],connect:m,factory:f}):f(h,E)},"factory");this[Qb]=r(s,{connect:m}),this[Pb]=new Q4e({...e,factory:A,connect:i(async(h,E)=>{let C=h.host;h.port||(C+=`:${k4e(h.protocol)}`);try{let{socket:w,statusCode:x}=await this[Qb].connect({origin:a,port:c,path:C,signal:h.signal,headers:{...this[Ru],host:h.host},servername:this[OZ]?.servername||p});if(x!==200&&(w.on("error",O4e).destroy(),E(new _4e(`Proxy response (${x}) !== 200 when HTTP Tunneling`))),h.protocol!=="https:"){E(null,w);return}let b;this[a1]?b=this[a1].servername:b=h.servername,this[MZ]({...h,servername:b,httpSocket:w},E)}catch(w){w.code==="ERR_TLS_CERT_ALTNAME_INVALID"?E(new D4e(w)):E(w)}},"connect")})}dispatch(e,r){let n=F4e(e.headers);if(U4e(n),n&&!("host"in n)&&!("Host"in n)){let{host:s}=new Rp(e.origin);n.host=s}return this[Pb].dispatch({...e,headers:n},r)}#e(e){return typeof e=="string"?new Rp(e):e instanceof Rp?e:new Rp(e.uri)}async[UZ](){await this[Pb].close(),await this[Qb].close()}async[qZ](){await this[Pb].destroy(),await this[Qb].destroy()}};function F4e(t){if(Array.isArray(t)){let e={};for(let r=0;rr.toLowerCase()==="proxy-authorization"))throw new cA("Proxy-Authorization should be sent in ProxyAgent constructor")}i(U4e,"throwIfProxyAuthIsSent");zZ.exports=l1});var KZ=I((Q$t,jZ)=>{"use strict";var q4e=Hf(),{kClose:G4e,kDestroy:H4e,kClosed:VZ,kDestroyed:WZ,kDispatch:$4e,kNoProxyAgent:cE,kHttpProxyAgent:Nu,kHttpsProxyAgent:Np}=Lt(),YZ=u1(),z4e=aA(),V4e={"http:":80,"https:":443},JZ=!1,d1=class extends q4e{static{i(this,"EnvHttpProxyAgent")}#e=null;#t=null;#r=null;constructor(e={}){super(),this.#r=e,JZ||(JZ=!0,process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.",{code:"UNDICI-EHPA"}));let{httpProxy:r,httpsProxy:n,noProxy:s,...o}=e;this[cE]=new z4e(o);let a=r??process.env.http_proxy??process.env.HTTP_PROXY;a?this[Nu]=new YZ({...o,uri:a}):this[Nu]=this[cE];let c=n??process.env.https_proxy??process.env.HTTPS_PROXY;c?this[Np]=new YZ({...o,uri:c}):this[Np]=this[Nu],this.#n()}[$4e](e,r){let n=new URL(e.origin);return this.#o(n).dispatch(e,r)}async[G4e](){await this[cE].close(),this[Nu][VZ]||await this[Nu].close(),this[Np][VZ]||await this[Np].close()}async[H4e](e){await this[cE].destroy(e),this[Nu][WZ]||await this[Nu].destroy(e),this[Np][WZ]||await this[Np].destroy(e)}#o(e){let{protocol:r,host:n,port:s}=e;return n=n.replace(/:\d*$/,"").toLowerCase(),s=Number.parseInt(s,10)||V4e[r]||0,this.#s(n,s)?r==="https:"?this[Np]:this[Nu]:this[cE]}#s(e,r){if(this.#i&&this.#n(),this.#t.length===0)return!0;if(this.#e==="*")return!1;for(let n=0;n{"use strict";var lA=require("node:assert"),{kRetryHandlerDefaultRetry:XZ}=Lt(),{RequestRetryError:lE}=rt(),{isDisturbed:ZZ,parseHeaders:W4e,parseRangeHeader:eee,wrapRequestBody:Y4e}=He();function J4e(t){let e=Date.now();return new Date(t).getTime()-e}i(J4e,"calculateRetryAfterHeader");var p1=class t{static{i(this,"RetryHandler")}constructor(e,r){let{retryOptions:n,...s}=e,{retry:o,maxRetries:a,maxTimeout:c,minTimeout:l,timeoutFactor:u,methods:d,errorCodes:p,retryAfter:m,statusCodes:f}=n??{};this.dispatch=r.dispatch,this.handler=r.handler,this.opts={...s,body:Y4e(e.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:o??t[XZ],retryAfter:m??!0,maxTimeout:c??30*1e3,minTimeout:l??500,timeoutFactor:u??2,maxRetries:a??5,methods:d??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:f??[500,502,503,504,429],errorCodes:p??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(A=>{this.aborted=!0,this.abort?this.abort(A):this.reason=A})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,r,n){this.handler.onUpgrade&&this.handler.onUpgrade(e,r,n)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[XZ](e,{state:r,opts:n},s){let{statusCode:o,code:a,headers:c}=e,{method:l,retryOptions:u}=n,{maxRetries:d,minTimeout:p,maxTimeout:m,timeoutFactor:f,statusCodes:A,errorCodes:h,methods:E}=u,{counter:C}=r;if(a&&a!=="UND_ERR_REQ_RETRY"&&!h.includes(a)){s(e);return}if(Array.isArray(E)&&!E.includes(l)){s(e);return}if(o!=null&&Array.isArray(A)&&!A.includes(o)){s(e);return}if(C>d){s(e);return}let w=c?.["retry-after"];w&&(w=Number(w),w=Number.isNaN(w)?J4e(w):w*1e3);let x=w>0?Math.min(w,m):Math.min(p*f**(C-1),m);setTimeout(()=>s(null),x)}onHeaders(e,r,n,s){let o=W4e(r);if(this.retryCount+=1,e>=300)return this.retryOpts.statusCodes.includes(e)===!1?this.handler.onHeaders(e,r,n,s):(this.abort(new lE("Request failed",e,{headers:o,data:{count:this.retryCount}})),!1);if(this.resume!=null){if(this.resume=null,e!==206&&(this.start>0||e!==200))return this.abort(new lE("server does not support the range header and the payload was partially consumed",e,{headers:o,data:{count:this.retryCount}})),!1;let c=eee(o["content-range"]);if(!c)return this.abort(new lE("Content-Range mismatch",e,{headers:o,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==o.etag)return this.abort(new lE("ETag mismatch",e,{headers:o,data:{count:this.retryCount}})),!1;let{start:l,size:u,end:d=u-1}=c;return lA(this.start===l,"content-range mismatch"),lA(this.end==null||this.end===d,"content-range mismatch"),this.resume=n,!0}if(this.end==null){if(e===206){let c=eee(o["content-range"]);if(c==null)return this.handler.onHeaders(e,r,n,s);let{start:l,size:u,end:d=u-1}=c;lA(l!=null&&Number.isFinite(l),"content-range mismatch"),lA(d!=null&&Number.isFinite(d),"invalid content-length"),this.start=l,this.end=d}if(this.end==null){let c=o["content-length"];this.end=c!=null?Number(c)-1:null}return lA(Number.isFinite(this.start)),lA(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=n,this.etag=o.etag!=null?o.etag:null,this.etag!=null&&this.etag.startsWith("W/")&&(this.etag=null),this.handler.onHeaders(e,r,n,s)}let a=new lE("Request failed",e,{headers:o,data:{count:this.retryCount}});return this.abort(a),!1}onData(e){return this.start+=e.length,this.handler.onData(e)}onComplete(e){return this.retryCount=0,this.handler.onComplete(e)}onError(e){if(this.aborted||ZZ(this.opts.body))return this.handler.onError(e);this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(e,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},r.bind(this));function r(n){if(n!=null||this.aborted||ZZ(this.opts.body))return this.handler.onError(n);if(this.start!==0){let s={range:`bytes=${this.start}-${this.end??""}`};this.etag!=null&&(s["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...s}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(s){this.handler.onError(s)}}i(r,"onRetry")}};tee.exports=p1});var nee=I((L$t,ree)=>{"use strict";var j4e=Oy(),K4e=_b(),m1=class extends j4e{static{i(this,"RetryAgent")}#e=null;#t=null;constructor(e,r={}){super(r),this.#e=e,this.#t=r}dispatch(e,r){let n=new K4e({...e,retryOptions:this.#t},{dispatch:this.#e.dispatch.bind(this.#e),handler:r});return this.#e.dispatch(e,n)}close(){return this.#e.close()}destroy(){return this.#e.destroy()}};ree.exports=m1});var E1=I((M$t,pee)=>{"use strict";var cee=require("node:assert"),{Readable:X4e}=require("node:stream"),{RequestAbortedError:lee,NotSupportedError:Z4e,InvalidArgumentError:eWe,AbortError:f1}=rt(),uee=He(),{ReadableStreamFrom:tWe}=He(),Ws=Symbol("kConsume"),uE=Symbol("kReading"),Tu=Symbol("kBody"),see=Symbol("kAbort"),dee=Symbol("kContentType"),oee=Symbol("kContentLength"),rWe=i(()=>{},"noop"),A1=class extends X4e{static{i(this,"BodyReadable")}constructor({resume:e,abort:r,contentType:n="",contentLength:s,highWaterMark:o=64*1024}){super({autoDestroy:!0,read:e,highWaterMark:o}),this._readableState.dataEmitted=!1,this[see]=r,this[Ws]=null,this[Tu]=null,this[dee]=n,this[oee]=s,this[uE]=!1}destroy(e){return!e&&!this._readableState.endEmitted&&(e=new lee),e&&this[see](),super.destroy(e)}_destroy(e,r){this[uE]?r(e):setImmediate(()=>{r(e)})}on(e,...r){return(e==="data"||e==="readable")&&(this[uE]=!0),super.on(e,...r)}addListener(e,...r){return this.on(e,...r)}off(e,...r){let n=super.off(e,...r);return(e==="data"||e==="readable")&&(this[uE]=this.listenerCount("data")>0||this.listenerCount("readable")>0),n}removeListener(e,...r){return this.off(e,...r)}push(e){return this[Ws]&&e!==null?(g1(this[Ws],e),this[uE]?super.push(e):!0):super.push(e)}async text(){return dE(this,"text")}async json(){return dE(this,"json")}async blob(){return dE(this,"blob")}async bytes(){return dE(this,"bytes")}async arrayBuffer(){return dE(this,"arrayBuffer")}async formData(){throw new Z4e}get bodyUsed(){return uee.isDisturbed(this)}get body(){return this[Tu]||(this[Tu]=tWe(this),this[Ws]&&(this[Tu].getReader(),cee(this[Tu].locked))),this[Tu]}async dump(e){let r=Number.isFinite(e?.limit)?e.limit:131072,n=e?.signal;if(n!=null&&(typeof n!="object"||!("aborted"in n)))throw new eWe("signal must be an AbortSignal");return n?.throwIfAborted(),this._readableState.closeEmitted?null:await new Promise((s,o)=>{this[oee]>r&&this.destroy(new f1);let a=i(()=>{this.destroy(n.reason??new f1)},"onAbort");n?.addEventListener("abort",a),this.on("close",function(){n?.removeEventListener("abort",a),n?.aborted?o(n.reason??new f1):s(null)}).on("error",rWe).on("data",function(c){r-=c.length,r<=0&&this.destroy()}).resume()})}};function nWe(t){return t[Tu]&&t[Tu].locked===!0||t[Ws]}i(nWe,"isLocked");function sWe(t){return uee.isDisturbed(t)||nWe(t)}i(sWe,"isUnusable");async function dE(t,e){return cee(!t[Ws]),new Promise((r,n)=>{if(sWe(t)){let s=t._readableState;s.destroyed&&s.closeEmitted===!1?t.on("error",o=>{n(o)}).on("close",()=>{n(new TypeError("unusable"))}):n(s.errored??new TypeError("unusable"))}else queueMicrotask(()=>{t[Ws]={type:e,stream:t,resolve:r,reject:n,length:0,body:[]},t.on("error",function(s){y1(this[Ws],s)}).on("close",function(){this[Ws].body!==null&&y1(this[Ws],new lee)}),oWe(t[Ws])})})}i(dE,"consume");function oWe(t){if(t.body===null)return;let{_readableState:e}=t.stream;if(e.bufferIndex){let r=e.bufferIndex,n=e.buffer.length;for(let s=r;s2&&r[0]===239&&r[1]===187&&r[2]===191?3:0;return r.utf8Slice(s,n)}i(h1,"chunksDecode");function iee(t,e){if(t.length===0||e===0)return new Uint8Array(0);if(t.length===1)return new Uint8Array(t[0]);let r=new Uint8Array(Buffer.allocUnsafeSlow(e).buffer),n=0;for(let s=0;s{var iWe=require("node:assert"),{ResponseStatusCodeError:mee}=rt(),{chunksDecode:fee}=E1(),aWe=128*1024;async function cWe({callback:t,body:e,contentType:r,statusCode:n,statusMessage:s,headers:o}){iWe(e);let a=[],c=0;try{for await(let p of e)if(a.push(p),c+=p.length,c>aWe){a=[],c=0;break}}catch{a=[],c=0}let l=`Response status code ${n}${s?`: ${s}`:""}`;if(n===204||!r||!c){queueMicrotask(()=>t(new mee(l,n,o)));return}let u=Error.stackTraceLimit;Error.stackTraceLimit=0;let d;try{Aee(r)?d=JSON.parse(fee(a,c)):hee(r)&&(d=fee(a,c))}catch{}finally{Error.stackTraceLimit=u}queueMicrotask(()=>t(new mee(l,n,o,d)))}i(cWe,"getResolveErrorBodyCallback");var Aee=i(t=>t.length>15&&t[11]==="/"&&t[0]==="a"&&t[1]==="p"&&t[2]==="p"&&t[3]==="l"&&t[4]==="i"&&t[5]==="c"&&t[6]==="a"&&t[7]==="t"&&t[8]==="i"&&t[9]==="o"&&t[10]==="n"&&t[12]==="j"&&t[13]==="s"&&t[14]==="o"&&t[15]==="n","isContentTypeApplicationJson"),hee=i(t=>t.length>4&&t[4]==="/"&&t[0]==="t"&&t[1]==="e"&&t[2]==="x"&&t[3]==="t","isContentTypeText");gee.exports={getResolveErrorBodyCallback:cWe,isContentTypeApplicationJson:Aee,isContentTypeText:hee}});var Cee=I((G$t,I1)=>{"use strict";var lWe=require("node:assert"),{Readable:uWe}=E1(),{InvalidArgumentError:uA,RequestAbortedError:yee}=rt(),Ys=He(),{getResolveErrorBodyCallback:dWe}=C1(),{AsyncResource:pWe}=require("node:async_hooks"),Db=class extends pWe{static{i(this,"RequestHandler")}constructor(e,r){if(!e||typeof e!="object")throw new uA("invalid opts");let{signal:n,method:s,opaque:o,body:a,onInfo:c,responseHeaders:l,throwOnError:u,highWaterMark:d}=e;try{if(typeof r!="function")throw new uA("invalid callback");if(d&&(typeof d!="number"||d<0))throw new uA("invalid highWaterMark");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new uA("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new uA("invalid method");if(c&&typeof c!="function")throw new uA("invalid onInfo callback");super("UNDICI_REQUEST")}catch(p){throw Ys.isStream(a)&&Ys.destroy(a.on("error",Ys.nop),p),p}this.method=s,this.responseHeaders=l||null,this.opaque=o||null,this.callback=r,this.res=null,this.abort=null,this.body=a,this.trailers={},this.context=null,this.onInfo=c||null,this.throwOnError=u,this.highWaterMark=d,this.signal=n,this.reason=null,this.removeAbortListener=null,Ys.isStream(a)&&a.on("error",p=>{this.onError(p)}),this.signal&&(this.signal.aborted?this.reason=this.signal.reason??new yee:this.removeAbortListener=Ys.addAbortListener(this.signal,()=>{this.reason=this.signal.reason??new yee,this.res?Ys.destroy(this.res.on("error",Ys.nop),this.reason):this.abort&&this.abort(this.reason),this.removeAbortListener&&(this.res?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}))}onConnect(e,r){if(this.reason){e(this.reason);return}lWe(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,s){let{callback:o,opaque:a,abort:c,context:l,responseHeaders:u,highWaterMark:d}=this,p=u==="raw"?Ys.parseRawHeaders(r):Ys.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:p});return}let m=u==="raw"?Ys.parseHeaders(r):p,f=m["content-type"],A=m["content-length"],h=new uWe({resume:n,abort:c,contentType:f,contentLength:this.method!=="HEAD"&&A?Number(A):null,highWaterMark:d});this.removeAbortListener&&h.on("close",this.removeAbortListener),this.callback=null,this.res=h,o!==null&&(this.throwOnError&&e>=400?this.runInAsyncScope(dWe,null,{callback:o,body:h,contentType:f,statusCode:e,statusMessage:s,headers:p}):this.runInAsyncScope(o,null,null,{statusCode:e,headers:p,trailers:this.trailers,opaque:a,body:h,context:l}))}onData(e){return this.res.push(e)}onComplete(e){Ys.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:r,callback:n,body:s,opaque:o}=this;n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:o})})),r&&(this.res=null,queueMicrotask(()=>{Ys.destroy(r,e)})),s&&(this.body=null,Ys.destroy(s,e)),this.removeAbortListener&&(r?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null)}};function Eee(t,e){if(e===void 0)return new Promise((r,n)=>{Eee.call(this,t,(s,o)=>s?n(s):r(o))});try{this.dispatch(t,new Db(t,e))}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}i(Eee,"request");I1.exports=Eee;I1.exports.RequestHandler=Db});var pE=I(($$t,See)=>{var{addAbortListener:mWe}=He(),{RequestAbortedError:fWe}=rt(),dA=Symbol("kListener"),va=Symbol("kSignal");function Iee(t){t.abort?t.abort(t[va]?.reason):t.reason=t[va]?.reason??new fWe,wee(t)}i(Iee,"abort");function AWe(t,e){if(t.reason=null,t[va]=null,t[dA]=null,!!e){if(e.aborted){Iee(t);return}t[va]=e,t[dA]=()=>{Iee(t)},mWe(t[va],t[dA])}}i(AWe,"addSignal");function wee(t){t[va]&&("removeEventListener"in t[va]?t[va].removeEventListener("abort",t[dA]):t[va].removeListener("abort",t[dA]),t[va]=null,t[dA]=null)}i(wee,"removeSignal");See.exports={addSignal:AWe,removeSignal:wee}});var Ree=I((V$t,Bee)=>{"use strict";var hWe=require("node:assert"),{finished:gWe,PassThrough:yWe}=require("node:stream"),{InvalidArgumentError:pA,InvalidReturnValueError:EWe}=rt(),Ti=He(),{getResolveErrorBodyCallback:CWe}=C1(),{AsyncResource:IWe}=require("node:async_hooks"),{addSignal:wWe,removeSignal:xee}=pE(),w1=class extends IWe{static{i(this,"StreamHandler")}constructor(e,r,n){if(!e||typeof e!="object")throw new pA("invalid opts");let{signal:s,method:o,opaque:a,body:c,onInfo:l,responseHeaders:u,throwOnError:d}=e;try{if(typeof n!="function")throw new pA("invalid callback");if(typeof r!="function")throw new pA("invalid factory");if(s&&typeof s.on!="function"&&typeof s.addEventListener!="function")throw new pA("signal must be an EventEmitter or EventTarget");if(o==="CONNECT")throw new pA("invalid method");if(l&&typeof l!="function")throw new pA("invalid onInfo callback");super("UNDICI_STREAM")}catch(p){throw Ti.isStream(c)&&Ti.destroy(c.on("error",Ti.nop),p),p}this.responseHeaders=u||null,this.opaque=a||null,this.factory=r,this.callback=n,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=c,this.onInfo=l||null,this.throwOnError=d||!1,Ti.isStream(c)&&c.on("error",p=>{this.onError(p)}),wWe(this,s)}onConnect(e,r){if(this.reason){e(this.reason);return}hWe(this.callback),this.abort=e,this.context=r}onHeaders(e,r,n,s){let{factory:o,opaque:a,context:c,callback:l,responseHeaders:u}=this,d=u==="raw"?Ti.parseRawHeaders(r):Ti.parseHeaders(r);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:d});return}this.factory=null;let p;if(this.throwOnError&&e>=400){let A=(u==="raw"?Ti.parseHeaders(r):d)["content-type"];p=new yWe,this.callback=null,this.runInAsyncScope(CWe,null,{callback:l,body:p,contentType:A,statusCode:e,statusMessage:s,headers:d})}else{if(o===null)return;if(p=this.runInAsyncScope(o,null,{statusCode:e,headers:d,opaque:a,context:c}),!p||typeof p.write!="function"||typeof p.end!="function"||typeof p.on!="function")throw new EWe("expected Writable");gWe(p,{readable:!1},f=>{let{callback:A,res:h,opaque:E,trailers:C,abort:w}=this;this.res=null,(f||!h.readable)&&Ti.destroy(h,f),this.callback=null,this.runInAsyncScope(A,null,f||null,{opaque:E,trailers:C}),f&&w()})}return p.on("drain",n),this.res=p,(p.writableNeedDrain!==void 0?p.writableNeedDrain:p._writableState?.needDrain)!==!0}onData(e){let{res:r}=this;return r?r.write(e):!0}onComplete(e){let{res:r}=this;xee(this),r&&(this.trailers=Ti.parseHeaders(e),r.end())}onError(e){let{res:r,callback:n,opaque:s,body:o}=this;xee(this),this.factory=null,r?(this.res=null,Ti.destroy(r,e)):n&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(n,null,e,{opaque:s})})),o&&(this.body=null,Ti.destroy(o,e))}};function bee(t,e,r){if(r===void 0)return new Promise((n,s)=>{bee.call(this,t,e,(o,a)=>o?s(o):n(a))});try{this.dispatch(t,new w1(t,e,r))}catch(n){if(typeof r!="function")throw n;let s=t?.opaque;queueMicrotask(()=>r(n,{opaque:s}))}}i(bee,"stream");Bee.exports=bee});var Pee=I((Y$t,vee)=>{"use strict";var{Readable:Tee,Duplex:SWe,PassThrough:xWe}=require("node:stream"),{InvalidArgumentError:mE,InvalidReturnValueError:bWe,RequestAbortedError:S1}=rt(),Do=He(),{AsyncResource:BWe}=require("node:async_hooks"),{addSignal:RWe,removeSignal:NWe}=pE(),Nee=require("node:assert"),mA=Symbol("resume"),x1=class extends Tee{static{i(this,"PipelineRequest")}constructor(){super({autoDestroy:!0}),this[mA]=null}_read(){let{[mA]:e}=this;e&&(this[mA]=null,e())}_destroy(e,r){this._read(),r(e)}},b1=class extends Tee{static{i(this,"PipelineResponse")}constructor(e){super({autoDestroy:!0}),this[mA]=e}_read(){this[mA]()}_destroy(e,r){!e&&!this._readableState.endEmitted&&(e=new S1),r(e)}},B1=class extends BWe{static{i(this,"PipelineHandler")}constructor(e,r){if(!e||typeof e!="object")throw new mE("invalid opts");if(typeof r!="function")throw new mE("invalid handler");let{signal:n,method:s,opaque:o,onInfo:a,responseHeaders:c}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new mE("signal must be an EventEmitter or EventTarget");if(s==="CONNECT")throw new mE("invalid method");if(a&&typeof a!="function")throw new mE("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=o||null,this.responseHeaders=c||null,this.handler=r,this.abort=null,this.context=null,this.onInfo=a||null,this.req=new x1().on("error",Do.nop),this.ret=new SWe({readableObjectMode:e.objectMode,autoDestroy:!0,read:i(()=>{let{body:l}=this;l?.resume&&l.resume()},"read"),write:i((l,u,d)=>{let{req:p}=this;p.push(l,u)||p._readableState.destroyed?d():p[mA]=d},"write"),destroy:i((l,u)=>{let{body:d,req:p,res:m,ret:f,abort:A}=this;!l&&!f._readableState.endEmitted&&(l=new S1),A&&l&&A(),Do.destroy(d,l),Do.destroy(p,l),Do.destroy(m,l),NWe(this),u(l)},"destroy")}).on("prefinish",()=>{let{req:l}=this;l.push(null)}),this.res=null,RWe(this,n)}onConnect(e,r){let{ret:n,res:s}=this;if(this.reason){e(this.reason);return}Nee(!s,"pipeline cannot be retried"),Nee(!n.destroyed),this.abort=e,this.context=r}onHeaders(e,r,n){let{opaque:s,handler:o,context:a}=this;if(e<200){if(this.onInfo){let l=this.responseHeaders==="raw"?Do.parseRawHeaders(r):Do.parseHeaders(r);this.onInfo({statusCode:e,headers:l})}return}this.res=new b1(n);let c;try{this.handler=null;let l=this.responseHeaders==="raw"?Do.parseRawHeaders(r):Do.parseHeaders(r);c=this.runInAsyncScope(o,null,{statusCode:e,headers:l,opaque:s,body:this.res,context:a})}catch(l){throw this.res.on("error",Do.nop),l}if(!c||typeof c.on!="function")throw new bWe("expected Readable");c.on("data",l=>{let{ret:u,body:d}=this;!u.push(l)&&d.pause&&d.pause()}).on("error",l=>{let{ret:u}=this;Do.destroy(u,l)}).on("end",()=>{let{ret:l}=this;l.push(null)}).on("close",()=>{let{ret:l}=this;l._readableState.ended||Do.destroy(l,new S1)}),this.body=c}onData(e){let{res:r}=this;return r.push(e)}onComplete(e){let{res:r}=this;r.push(null)}onError(e){let{ret:r}=this;this.handler=null,Do.destroy(r,e)}};function TWe(t,e){try{let r=new B1(t,e);return this.dispatch({...t,body:r.req},r),r.ret}catch(r){return new xWe().destroy(r)}}i(TWe,"pipeline");vee.exports=TWe});var Oee=I((j$t,Lee)=>{"use strict";var{InvalidArgumentError:R1,SocketError:vWe}=rt(),{AsyncResource:PWe}=require("node:async_hooks"),Qee=He(),{addSignal:QWe,removeSignal:_ee}=pE(),Dee=require("node:assert"),N1=class extends PWe{static{i(this,"UpgradeHandler")}constructor(e,r){if(!e||typeof e!="object")throw new R1("invalid opts");if(typeof r!="function")throw new R1("invalid callback");let{signal:n,opaque:s,responseHeaders:o}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new R1("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=o||null,this.opaque=s||null,this.callback=r,this.abort=null,this.context=null,QWe(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}Dee(this.callback),this.abort=e,this.context=null}onHeaders(){throw new vWe("bad upgrade",null)}onUpgrade(e,r,n){Dee(e===101);let{callback:s,opaque:o,context:a}=this;_ee(this),this.callback=null;let c=this.responseHeaders==="raw"?Qee.parseRawHeaders(r):Qee.parseHeaders(r);this.runInAsyncScope(s,null,null,{headers:c,socket:n,opaque:o,context:a})}onError(e){let{callback:r,opaque:n}=this;_ee(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function kee(t,e){if(e===void 0)return new Promise((r,n)=>{kee.call(this,t,(s,o)=>s?n(s):r(o))});try{let r=new N1(t,e);this.dispatch({...t,method:t.method||"GET",upgrade:t.protocol||"Websocket"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}i(kee,"upgrade");Lee.exports=kee});var Gee=I((X$t,qee)=>{"use strict";var _We=require("node:assert"),{AsyncResource:DWe}=require("node:async_hooks"),{InvalidArgumentError:T1,SocketError:kWe}=rt(),Mee=He(),{addSignal:LWe,removeSignal:Fee}=pE(),v1=class extends DWe{static{i(this,"ConnectHandler")}constructor(e,r){if(!e||typeof e!="object")throw new T1("invalid opts");if(typeof r!="function")throw new T1("invalid callback");let{signal:n,opaque:s,responseHeaders:o}=e;if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new T1("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=s||null,this.responseHeaders=o||null,this.callback=r,this.abort=null,LWe(this,n)}onConnect(e,r){if(this.reason){e(this.reason);return}_We(this.callback),this.abort=e,this.context=r}onHeaders(){throw new kWe("bad connect",null)}onUpgrade(e,r,n){let{callback:s,opaque:o,context:a}=this;Fee(this),this.callback=null;let c=r;c!=null&&(c=this.responseHeaders==="raw"?Mee.parseRawHeaders(r):Mee.parseHeaders(r)),this.runInAsyncScope(s,null,null,{statusCode:e,headers:c,socket:n,opaque:o,context:a})}onError(e){let{callback:r,opaque:n}=this;Fee(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,e,{opaque:n})}))}};function Uee(t,e){if(e===void 0)return new Promise((r,n)=>{Uee.call(this,t,(s,o)=>s?n(s):r(o))});try{let r=new v1(t,e);this.dispatch({...t,method:"CONNECT"},r)}catch(r){if(typeof e!="function")throw r;let n=t?.opaque;queueMicrotask(()=>e(r,{opaque:n}))}}i(Uee,"connect");qee.exports=Uee});var Hee=I((ezt,fA)=>{"use strict";fA.exports.request=Cee();fA.exports.stream=Ree();fA.exports.pipeline=Pee();fA.exports.upgrade=Oee();fA.exports.connect=Gee()});var Q1=I((tzt,zee)=>{"use strict";var{UndiciError:OWe}=rt(),$ee=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"),P1=class t extends OWe{static{i(this,"MockNotMatchedError")}constructor(e){super(e),Error.captureStackTrace(this,t),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&e[$ee]===!0}[$ee]=!0};zee.exports={MockNotMatchedError:P1}});var AA=I((nzt,Vee)=>{"use strict";Vee.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var fE=I((szt,nte)=>{"use strict";var{MockNotMatchedError:Tp}=Q1(),{kDispatches:kb,kMockAgent:MWe,kOriginalDispatch:FWe,kOrigin:UWe,kGetNetConnect:qWe}=AA(),{buildURL:GWe}=He(),{STATUS_CODES:HWe}=require("node:http"),{types:{isPromise:$We}}=require("node:util");function Cl(t,e){return typeof t=="string"?t===e:t instanceof RegExp?t.test(e):typeof t=="function"?t(e)===!0:!1}i(Cl,"matchValue");function Yee(t){return Object.fromEntries(Object.entries(t).map(([e,r])=>[e.toLocaleLowerCase(),r]))}i(Yee,"lowerCaseEntries");function Jee(t,e){if(Array.isArray(t)){for(let r=0;r"u")return!0;if(typeof e!="object"||typeof t.headers!="object")return!1;for(let[r,n]of Object.entries(t.headers)){let s=Jee(e,r);if(!Cl(n,s))return!1}return!0}i(jee,"matchHeaders");function Wee(t){if(typeof t!="string")return t;let e=t.split("?");if(e.length!==2)return t;let r=new URLSearchParams(e.pop());return r.sort(),[...e,r.toString()].join("?")}i(Wee,"safeUrl");function zWe(t,{path:e,method:r,body:n,headers:s}){let o=Cl(t.path,e),a=Cl(t.method,r),c=typeof t.body<"u"?Cl(t.body,n):!0,l=jee(t,s);return o&&a&&c&&l}i(zWe,"matchKey");function Kee(t){return Buffer.isBuffer(t)||t instanceof Uint8Array||t instanceof ArrayBuffer?t:typeof t=="object"?JSON.stringify(t):t.toString()}i(Kee,"getResponseData");function Xee(t,e){let r=e.query?GWe(e.path,e.query):e.path,n=typeof r=="string"?Wee(r):r,s=t.filter(({consumed:o})=>!o).filter(({path:o})=>Cl(Wee(o),n));if(s.length===0)throw new Tp(`Mock dispatch not matched for path '${n}'`);if(s=s.filter(({method:o})=>Cl(o,e.method)),s.length===0)throw new Tp(`Mock dispatch not matched for method '${e.method}' on path '${n}'`);if(s=s.filter(({body:o})=>typeof o<"u"?Cl(o,e.body):!0),s.length===0)throw new Tp(`Mock dispatch not matched for body '${e.body}' on path '${n}'`);if(s=s.filter(o=>jee(o,e.headers)),s.length===0){let o=typeof e.headers=="object"?JSON.stringify(e.headers):e.headers;throw new Tp(`Mock dispatch not matched for headers '${o}' on path '${n}'`)}return s[0]}i(Xee,"getMockDispatch");function VWe(t,e,r){let n={timesInvoked:0,times:1,persist:!1,consumed:!1},s=typeof r=="function"?{callback:r}:{...r},o={...n,...e,pending:!0,data:{error:null,...s}};return t.push(o),o}i(VWe,"addMockDispatch");function _1(t,e){let r=t.findIndex(n=>n.consumed?zWe(n,e):!1);r!==-1&&t.splice(r,1)}i(_1,"deleteMockDispatch");function Zee(t){let{path:e,method:r,body:n,headers:s,query:o}=t;return{path:e,method:r,body:n,headers:s,query:o}}i(Zee,"buildKey");function D1(t){let e=Object.keys(t),r=[];for(let n=0;n=m,n.pending=p0?setTimeout(()=>{f(this[kb])},u):f(this[kb]);function f(h,E=o){let C=Array.isArray(t.headers)?k1(t.headers):t.headers,w=typeof E=="function"?E({...t,headers:C}):E;if($We(w)){w.then(P=>f(h,P));return}let x=Kee(w),b=D1(a),N=D1(c);e.onConnect?.(P=>e.onError(P),null),e.onHeaders?.(s,b,A,ete(s)),e.onData?.(Buffer.from(x)),e.onComplete?.(N),_1(h,r)}i(f,"handleReply");function A(){}return i(A,"resume"),!0}i(tte,"mockDispatch");function YWe(){let t=this[MWe],e=this[UWe],r=this[FWe];return i(function(s,o){if(t.isMockActive)try{tte.call(this,s,o)}catch(a){if(a instanceof Tp){let c=t[qWe]();if(c===!1)throw new Tp(`${a.message}: subsequent request to origin ${e} was not allowed (net.connect disabled)`);if(rte(c,e))r.call(this,s,o);else throw new Tp(`${a.message}: subsequent request to origin ${e} was not allowed (net.connect is not enabled for this origin)`)}else throw a}else r.call(this,s,o)},"dispatch")}i(YWe,"buildMockDispatch");function rte(t,e){let r=new URL(e);return t===!0?!0:!!(Array.isArray(t)&&t.some(n=>Cl(n,r.host)))}i(rte,"checkNetConnect");function JWe(t){if(t){let{agent:e,...r}=t;return r}}i(JWe,"buildMockOptions");nte.exports={getResponseData:Kee,getMockDispatch:Xee,addMockDispatch:VWe,deleteMockDispatch:_1,buildKey:Zee,generateKeyValues:D1,matchValue:Cl,getResponse:WWe,getStatusText:ete,mockDispatch:tte,buildMockDispatch:YWe,checkNetConnect:rte,buildMockOptions:JWe,getHeaderByName:Jee,buildHeadersFromArray:k1}});var G1=I((izt,q1)=>{"use strict";var{getResponseData:jWe,buildKey:KWe,addMockDispatch:L1}=fE(),{kDispatches:Lb,kDispatchKey:Ob,kDefaultHeaders:O1,kDefaultTrailers:M1,kContentLength:F1,kMockDispatch:Mb}=AA(),{InvalidArgumentError:Pa}=rt(),{buildURL:XWe}=He(),hA=class{static{i(this,"MockScope")}constructor(e){this[Mb]=e}delay(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Pa("waitInMs must be a valid integer > 0");return this[Mb].delay=e,this}persist(){return this[Mb].persist=!0,this}times(e){if(typeof e!="number"||!Number.isInteger(e)||e<=0)throw new Pa("repeatTimes must be a valid integer > 0");return this[Mb].times=e,this}},U1=class{static{i(this,"MockInterceptor")}constructor(e,r){if(typeof e!="object")throw new Pa("opts must be an object");if(typeof e.path>"u")throw new Pa("opts.path must be defined");if(typeof e.method>"u"&&(e.method="GET"),typeof e.path=="string")if(e.query)e.path=XWe(e.path,e.query);else{let n=new URL(e.path,"data://");e.path=n.pathname+n.search}typeof e.method=="string"&&(e.method=e.method.toUpperCase()),this[Ob]=KWe(e),this[Lb]=r,this[O1]={},this[M1]={},this[F1]=!1}createMockScopeDispatchData({statusCode:e,data:r,responseOptions:n}){let s=jWe(r),o=this[F1]?{"content-length":s.length}:{},a={...this[O1],...o,...n.headers},c={...this[M1],...n.trailers};return{statusCode:e,data:r,headers:a,trailers:c}}validateReplyParameters(e){if(typeof e.statusCode>"u")throw new Pa("statusCode must be defined");if(typeof e.responseOptions!="object"||e.responseOptions===null)throw new Pa("responseOptions must be an object")}reply(e){if(typeof e=="function"){let o=i(c=>{let l=e(c);if(typeof l!="object"||l===null)throw new Pa("reply options callback must return an object");let u={data:"",responseOptions:{},...l};return this.validateReplyParameters(u),{...this.createMockScopeDispatchData(u)}},"wrappedDefaultsCallback"),a=L1(this[Lb],this[Ob],o);return new hA(a)}let r={statusCode:e,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(r);let n=this.createMockScopeDispatchData(r),s=L1(this[Lb],this[Ob],n);return new hA(s)}replyWithError(e){if(typeof e>"u")throw new Pa("error must be defined");let r=L1(this[Lb],this[Ob],{error:e});return new hA(r)}defaultReplyHeaders(e){if(typeof e>"u")throw new Pa("headers must be defined");return this[O1]=e,this}defaultReplyTrailers(e){if(typeof e>"u")throw new Pa("trailers must be defined");return this[M1]=e,this}replyContentLength(){return this[F1]=!0,this}};q1.exports.MockInterceptor=U1;q1.exports.MockScope=hA});var z1=I((czt,ute)=>{"use strict";var{promisify:ZWe}=require("node:util"),eYe=oA(),{buildMockDispatch:tYe}=fE(),{kDispatches:ste,kMockAgent:ote,kClose:ite,kOriginalClose:ate,kOrigin:cte,kOriginalDispatch:rYe,kConnected:H1}=AA(),{MockInterceptor:nYe}=G1(),lte=Lt(),{InvalidArgumentError:sYe}=rt(),$1=class extends eYe{static{i(this,"MockClient")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new sYe("Argument opts.agent must implement Agent");this[ote]=r.agent,this[cte]=e,this[ste]=[],this[H1]=1,this[rYe]=this.dispatch,this[ate]=this.close.bind(this),this.dispatch=tYe.call(this),this.close=this[ite]}get[lte.kConnected](){return this[H1]}intercept(e){return new nYe(e,this[ste])}async[ite](){await ZWe(this[ate])(),this[H1]=0,this[ote][lte.kClients].delete(this[cte])}};ute.exports=$1});var Y1=I((uzt,gte)=>{"use strict";var{promisify:oYe}=require("node:util"),iYe=iA(),{buildMockDispatch:aYe}=fE(),{kDispatches:dte,kMockAgent:pte,kClose:mte,kOriginalClose:fte,kOrigin:Ate,kOriginalDispatch:cYe,kConnected:V1}=AA(),{MockInterceptor:lYe}=G1(),hte=Lt(),{InvalidArgumentError:uYe}=rt(),W1=class extends iYe{static{i(this,"MockPool")}constructor(e,r){if(super(e,r),!r||!r.agent||typeof r.agent.dispatch!="function")throw new uYe("Argument opts.agent must implement Agent");this[pte]=r.agent,this[Ate]=e,this[dte]=[],this[V1]=1,this[cYe]=this.dispatch,this[fte]=this.close.bind(this),this.dispatch=aYe.call(this),this.close=this[mte]}get[hte.kConnected](){return this[V1]}intercept(e){return new lYe(e,this[dte])}async[mte](){await oYe(this[fte])(),this[V1]=0,this[pte][hte.kClients].delete(this[Ate])}};gte.exports=W1});var Ete=I((mzt,yte)=>{"use strict";var dYe={pronoun:"it",is:"is",was:"was",this:"this"},pYe={pronoun:"they",is:"are",was:"were",this:"these"};yte.exports=class{static{i(this,"Pluralizer")}constructor(e,r){this.singular=e,this.plural=r}pluralize(e){let r=e===1,n=r?dYe:pYe,s=r?this.singular:this.plural;return{...n,count:e,noun:s}}}});var Ite=I((hzt,Cte)=>{"use strict";var{Transform:mYe}=require("node:stream"),{Console:fYe}=require("node:console"),AYe=process.versions.icu?"\u2705":"Y ",hYe=process.versions.icu?"\u274C":"N ";Cte.exports=class{static{i(this,"PendingInterceptorsFormatter")}constructor({disableColors:e}={}){this.transform=new mYe({transform(r,n,s){s(null,r)}}),this.logger=new fYe({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let r=e.map(({method:n,path:s,data:{statusCode:o},persist:a,times:c,timesInvoked:l,origin:u})=>({Method:n,Origin:u,Path:s,"Status code":o,Persistent:a?AYe:hYe,Invocations:l,Remaining:a?1/0:c-l}));return this.logger.table(r),this.transform.read().toString()}}});var bte=I((yzt,xte)=>{"use strict";var{kClients:vp}=Lt(),gYe=aA(),{kAgent:J1,kMockAgentSet:Fb,kMockAgentGet:wte,kDispatches:j1,kIsMockActive:Ub,kNetConnect:Pp,kGetNetConnect:yYe,kOptions:qb,kFactory:Gb}=AA(),EYe=z1(),CYe=Y1(),{matchValue:IYe,buildMockOptions:wYe}=fE(),{InvalidArgumentError:Ste,UndiciError:SYe}=rt(),xYe=Oy(),bYe=Ete(),BYe=Ite(),K1=class extends xYe{static{i(this,"MockAgent")}constructor(e){if(super(e),this[Pp]=!0,this[Ub]=!0,e?.agent&&typeof e.agent.dispatch!="function")throw new Ste("Argument opts.agent must implement Agent");let r=e?.agent?e.agent:new gYe(e);this[J1]=r,this[vp]=r[vp],this[qb]=wYe(e)}get(e){let r=this[wte](e);return r||(r=this[Gb](e),this[Fb](e,r)),r}dispatch(e,r){return this.get(e.origin),this[J1].dispatch(e,r)}async close(){await this[J1].close(),this[vp].clear()}deactivate(){this[Ub]=!1}activate(){this[Ub]=!0}enableNetConnect(e){if(typeof e=="string"||typeof e=="function"||e instanceof RegExp)Array.isArray(this[Pp])?this[Pp].push(e):this[Pp]=[e];else if(typeof e>"u")this[Pp]=!0;else throw new Ste("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[Pp]=!1}get isMockActive(){return this[Ub]}[Fb](e,r){this[vp].set(e,r)}[Gb](e){let r=Object.assign({agent:this},this[qb]);return this[qb]&&this[qb].connections===1?new EYe(e,r):new CYe(e,r)}[wte](e){let r=this[vp].get(e);if(r)return r;if(typeof e!="string"){let n=this[Gb]("http://localhost:9999");return this[Fb](e,n),n}for(let[n,s]of Array.from(this[vp]))if(s&&typeof n!="string"&&IYe(n,e)){let o=this[Gb](e);return this[Fb](e,o),o[j1]=s[j1],o}}[yYe](){return this[Pp]}pendingInterceptors(){let e=this[vp];return Array.from(e.entries()).flatMap(([r,n])=>n[j1].map(s=>({...s,origin:r}))).filter(({pending:r})=>r)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new BYe}={}){let r=this.pendingInterceptors();if(r.length===0)return;let n=new bYe("interceptor","interceptors").pluralize(r.length);throw new SYe(` ${n.count} ${n.noun} ${n.is} pending: ${e.format(r)} -`.trim())}};xte.exports=K1});var Hb=I((Izt,Tte)=>{"use strict";var Bte=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:RYe}=rt(),NYe=aA();Nte()===void 0&&Rte(new NYe);function Rte(t){if(!t||typeof t.dispatch!="function")throw new RYe("Argument agent must implement Agent");Object.defineProperty(globalThis,Bte,{value:t,writable:!0,enumerable:!1,configurable:!1})}i(Rte,"setGlobalDispatcher");function Nte(){return globalThis[Bte]}i(Nte,"getGlobalDispatcher");Tte.exports={setGlobalDispatcher:Rte,getGlobalDispatcher:Nte}});var $b=I((xzt,vte)=>{"use strict";vte.exports=class{static{i(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var Qte=I((Bzt,Pte)=>{"use strict";var TYe=wb();Pte.exports=t=>{let e=t?.maxRedirections;return r=>i(function(s,o){let{maxRedirections:a=e,...c}=s;if(!a)return r(s,o);let l=new TYe(r,a,s,o);return r(c,l)},"redirectInterceptor")}});var Dte=I((Nzt,_te)=>{"use strict";var vYe=_b();_te.exports=t=>e=>i(function(n,s){return e(n,new vYe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))},"retryInterceptor")});var Lte=I((vzt,kte)=>{"use strict";var PYe=He(),{InvalidArgumentError:QYe,RequestAbortedError:_Ye}=rt(),DYe=$b(),X1=class extends DYe{static{i(this,"DumpHandler")}#e=1024*1024;#t=null;#r=!1;#o=!1;#s=0;#n=null;#i=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new QYe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#i=r}onConnect(e){this.#t=e,this.#i.onConnect(this.#a.bind(this))}#a(e){this.#o=!0,this.#n=e}onHeaders(e,r,n,s){let a=PYe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new _Ye(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#o?!0:this.#i.onHeaders(e,r,n,s)}onError(e){this.#r||(e=this.#n??e,this.#i.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#r=!0,this.#o?this.#i.onError(this.#n):this.#i.onComplete([])),!0}onComplete(e){if(!this.#r){if(this.#o){this.#i.onError(this.reason);return}this.#i.onComplete(e)}}};function kYe({maxSize:t}={maxSize:1024*1024}){return e=>i(function(n,s){let{dumpMaxSize:o=t}=n,a=new X1({maxSize:o},s);return e(n,a)},"Intercept")}i(kYe,"createDumpInterceptor");kte.exports=kYe});var Fte=I((Qzt,Mte)=>{"use strict";var{isIP:LYe}=require("node:net"),{lookup:OYe}=require("node:dns"),MYe=$b(),{InvalidArgumentError:gA,InformationalError:FYe}=rt(),Ote=Math.pow(2,31)-1,Z1=class{static{i(this,"DNSInstance")}#e=0;#t=0;#r=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#o,this.pick=e.pick??this.#s}get full(){return this.#r.size===this.#t}runLookup(e,r,n){let s=this.#r.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let o={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,o,(a,c)=>{if(a||c==null||c.length===0){n(a??new FYe("No DNS entries found"));return}this.setRecords(e,c);let l=this.#r.get(e.hostname),u=this.pick(e,l,o.affinity),d;typeof u.port=="number"?d=`:${u.port}`:e.port!==""?d=`:${e.port}`:d="",n(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${d}`)});else{let a=this.pick(e,s,o.affinity);if(a==null){this.#r.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#o(e,r,n){OYe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,o)=>{if(s)return n(s);let a=new Map;for(let c of o)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#s(e,r,n){let s=null,{records:o,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===Ote?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),o[n]!=null&&o[n].ips.length>0?c=o[n]:c=o[n===4?6:4]):c=o[n],c==null||c.ips.length===0)return s;c.offset==null||c.offset===Ote?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return s=c.ips[l]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(c.ips.splice(l,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let o of r){o.timestamp=n,typeof o.ttl=="number"?o.ttl=Math.min(o.ttl,this.#e):o.ttl=this.#e;let a=s.records[o.family]??{ips:[]};a.ips.push(o),s.records[o.family]=a}this.#r.set(e.hostname,s)}getHandler(e,r){return new eU(this,e,r)}},eU=class extends MYe{static{i(this,"DNSDispatchHandler")}#e=null;#t=null;#r=null;#o=null;#s=null;constructor(e,{origin:r,handler:n,dispatch:s},o){super(n),this.#s=r,this.#o=n,this.#t={...o},this.#e=e,this.#r=s}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#s,this.#t,(r,n)=>{if(r)return this.#o.onError(r);let s={...this.#t,origin:n};this.#r(s,this)});return}this.#o.onError(e);return}case"ENOTFOUND":this.#e.deleteRecord(this.#s);default:this.#o.onError(e);break}}};Mte.exports=t=>{if(t?.maxTTL!=null&&(typeof t?.maxTTL!="number"||t?.maxTTL<0))throw new gA("Invalid maxTTL. Must be a positive number");if(t?.maxItems!=null&&(typeof t?.maxItems!="number"||t?.maxItems<1))throw new gA("Invalid maxItems. Must be a positive number and greater than zero");if(t?.affinity!=null&&t?.affinity!==4&&t?.affinity!==6)throw new gA("Invalid affinity. Must be either 4 or 6");if(t?.dualStack!=null&&typeof t?.dualStack!="boolean")throw new gA("Invalid dualStack. Must be a boolean");if(t?.lookup!=null&&typeof t?.lookup!="function")throw new gA("Invalid lookup. Must be a function");if(t?.pick!=null&&typeof t?.pick!="function")throw new gA("Invalid pick. Must be a function");let e=t?.dualStack??!0,r;e?r=t?.affinity??null:r=t?.affinity??4;let n={maxTTL:t?.maxTTL??1e4,lookup:t?.lookup??null,pick:t?.pick??null,dualStack:e,affinity:r,maxItems:t?.maxItems??1/0},s=new Z1(n);return o=>i(function(c,l){let u=c.origin.constructor===URL?c.origin:new URL(c.origin);return LYe(u.hostname)!==0?o(c,l):(s.runLookup(u,c,(d,p)=>{if(d)return l.onError(d);let m=null;m={...c,servername:u.hostname,origin:p,headers:{host:u.hostname,...c.headers}},o(m,s.getHandler({origin:u,dispatch:o,handler:l},c))}),!0)},"dnsInterceptor")}});var Qp=I((Dzt,Vte)=>{"use strict";var{kConstruct:UYe}=Lt(),{kEnumerableProperty:yA}=He(),{iteratorMixin:qYe,isValidHeaderName:AE,isValidHeaderValue:qte}=zs(),{webidl:Xe}=sn(),tU=require("node:assert"),zb=require("node:util"),Rr=Symbol("headers map"),Js=Symbol("headers map sorted");function Ute(t){return t===10||t===13||t===9||t===32}i(Ute,"isHTTPWhiteSpaceCharCode");function Gte(t){let e=0,r=t.length;for(;r>e&&Ute(t.charCodeAt(r-1));)--r;for(;r>e&&Ute(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}i(Gte,"headerValueNormalize");function Hte(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}i(Hte,"fill");function rU(t,e,r){if(r=Gte(r),AE(e)){if(!qte(r))throw Xe.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Xe.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(zte(t)==="immutable")throw new TypeError("immutable");return nU(t).append(e,r,!1)}i(rU,"appendHeader");function $te(t,e){return t[0]>1),r[u][0]<=d[0]?l=u+1:c=u;if(o!==u){for(a=o;a>l;)r[a]=r[--a];r[l]=d}}if(!n.next().done)throw new TypeError("Unreachable");return r}else{let n=0;for(let{0:s,1:{value:o}}of this[Rr])r[n++]=[s,o],tU(o!==null);return r.sort($te)}}},vi=class t{static{i(this,"Headers")}#e;#t;constructor(e=void 0){Xe.util.markAsUncloneable(this),e!==UYe&&(this.#t=new Vb,this.#e="none",e!==void 0&&(e=Xe.converters.HeadersInit(e,"Headers contructor","init"),Hte(this,e)))}append(e,r){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,2,"Headers.append");let n="Headers.append";return e=Xe.converters.ByteString(e,n,"name"),r=Xe.converters.ByteString(r,n,"value"),rU(this,e,r)}delete(e){if(Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,1,"Headers.delete"),e=Xe.converters.ByteString(e,"Headers.delete","name"),!AE(e))throw Xe.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.contains(e,!1)&&this.#t.delete(e,!1)}get(e){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,1,"Headers.get");let r="Headers.get";if(e=Xe.converters.ByteString(e,r,"name"),!AE(e))throw Xe.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.get(e,!1)}has(e){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,1,"Headers.has");let r="Headers.has";if(e=Xe.converters.ByteString(e,r,"name"),!AE(e))throw Xe.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.contains(e,!1)}set(e,r){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,2,"Headers.set");let n="Headers.set";if(e=Xe.converters.ByteString(e,n,"name"),r=Xe.converters.ByteString(r,n,"value"),r=Gte(r),AE(e)){if(!qte(r))throw Xe.errors.invalidArgument({prefix:n,value:r,type:"header value"})}else throw Xe.errors.invalidArgument({prefix:n,value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.set(e,r,!1)}getSetCookie(){Xe.brandCheck(this,t);let e=this.#t.cookies;return e?[...e]:[]}get[Js](){if(this.#t[Js])return this.#t[Js];let e=[],r=this.#t.toSortedArray(),n=this.#t.cookies;if(n===null||n.length===1)return this.#t[Js]=r;for(let s=0;s>"](t,e,r,n.bind(t)):Xe.converters["record"](t,e,r)}throw Xe.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};Vte.exports={fill:Hte,compareHeaderName:$te,Headers:vi,HeadersList:Vb,getHeadersGuard:zte,setHeadersGuard:GYe,setHeadersList:HYe,getHeadersList:nU}});var gE=I((Lzt,sre)=>{"use strict";var{Headers:Xte,HeadersList:Wte,fill:$Ye,getHeadersGuard:zYe,setHeadersGuard:Zte,setHeadersList:ere}=Qp(),{extractBody:Yte,cloneBody:VYe,mixinBody:WYe,hasFinalizationRegistry:tre,streamRegistry:rre,bodyUnusable:YYe}=Xf(),sU=He(),Jte=require("node:util"),{kEnumerableProperty:js}=sU,{isValidReasonPhrase:JYe,isCancelled:jYe,isAborted:KYe,isBlobLike:XYe,serializeJavascriptValueToJSONString:ZYe,isErrorLike:eJe,isomorphicEncode:tJe,environmentSettingsObject:rJe}=zs(),{redirectStatusSet:nJe,nullBodyStatus:sJe}=Uy(),{kState:Mt,kHeaders:Il}=Eu(),{webidl:Fe}=sn(),{FormData:oJe}=Vy(),{URLSerializer:jte}=ms(),{kConstruct:Yb}=Lt(),oU=require("node:assert"),{types:iJe}=require("node:util"),aJe=new TextEncoder("utf-8"),_p=class t{static{i(this,"Response")}static error(){return hE(Jb(),"immutable")}static json(e,r={}){Fe.argumentLengthCheck(arguments,1,"Response.json"),r!==null&&(r=Fe.converters.ResponseInit(r));let n=aJe.encode(ZYe(e)),s=Yte(n),o=hE(EA({}),"response");return Kte(o,r,{body:s[0],type:"application/json"}),o}static redirect(e,r=302){Fe.argumentLengthCheck(arguments,1,"Response.redirect"),e=Fe.converters.USVString(e),r=Fe.converters["unsigned short"](r);let n;try{n=new URL(e,rJe.settingsObject.baseUrl)}catch(a){throw new TypeError(`Failed to parse URL from ${e}`,{cause:a})}if(!nJe.has(r))throw new RangeError(`Invalid status code ${r}`);let s=hE(EA({}),"immutable");s[Mt].status=r;let o=tJe(jte(n));return s[Mt].headersList.append("location",o,!0),s}constructor(e=null,r={}){if(Fe.util.markAsUncloneable(this),e===Yb)return;e!==null&&(e=Fe.converters.BodyInit(e)),r=Fe.converters.ResponseInit(r),this[Mt]=EA({}),this[Il]=new Xte(Yb),Zte(this[Il],"response"),ere(this[Il],this[Mt].headersList);let n=null;if(e!=null){let[s,o]=Yte(e);n={body:s,type:o}}Kte(this,r,n)}get type(){return Fe.brandCheck(this,t),this[Mt].type}get url(){Fe.brandCheck(this,t);let e=this[Mt].urlList,r=e[e.length-1]??null;return r===null?"":jte(r,!0)}get redirected(){return Fe.brandCheck(this,t),this[Mt].urlList.length>1}get status(){return Fe.brandCheck(this,t),this[Mt].status}get ok(){return Fe.brandCheck(this,t),this[Mt].status>=200&&this[Mt].status<=299}get statusText(){return Fe.brandCheck(this,t),this[Mt].statusText}get headers(){return Fe.brandCheck(this,t),this[Il]}get body(){return Fe.brandCheck(this,t),this[Mt].body?this[Mt].body.stream:null}get bodyUsed(){return Fe.brandCheck(this,t),!!this[Mt].body&&sU.isDisturbed(this[Mt].body.stream)}clone(){if(Fe.brandCheck(this,t),YYe(this))throw Fe.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=iU(this[Mt]);return tre&&this[Mt].body?.stream&&rre.register(this,new WeakRef(this[Mt].body.stream)),hE(e,zYe(this[Il]))}[Jte.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${Jte.formatWithOptions(r,n)}`}};WYe(_p);Object.defineProperties(_p.prototype,{type:js,url:js,status:js,ok:js,redirected:js,statusText:js,headers:js,clone:js,body:js,bodyUsed:js,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(_p,{json:js,redirect:js,error:js});function iU(t){if(t.internalResponse)return nre(iU(t.internalResponse),t.type);let e=EA({...t,body:null});return t.body!=null&&(e.body=VYe(e,t.body)),e}i(iU,"cloneResponse");function EA(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t?.headersList?new Wte(t?.headersList):new Wte,urlList:t?.urlList?[...t.urlList]:[]}}i(EA,"makeResponse");function Jb(t){let e=eJe(t);return EA({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}i(Jb,"makeNetworkError");function cJe(t){return t.type==="error"&&t.status===0}i(cJe,"isNetworkError");function Wb(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,n){return n in e?e[n]:r[n]},set(r,n,s){return oU(!(n in e)),r[n]=s,!0}})}i(Wb,"makeFilteredResponse");function nre(t,e){if(e==="basic")return Wb(t,{type:"basic",headersList:t.headersList});if(e==="cors")return Wb(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return Wb(t,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(e==="opaqueredirect")return Wb(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});oU(!1)}i(nre,"filterResponse");function lJe(t,e=null){return oU(jYe(t)),KYe(t)?Jb(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:e})):Jb(Object.assign(new DOMException("Request was cancelled."),{cause:e}))}i(lJe,"makeAppropriateNetworkError");function Kte(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!JYe(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(t[Mt].status=e.status),"statusText"in e&&e.statusText!=null&&(t[Mt].statusText=e.statusText),"headers"in e&&e.headers!=null&&$Ye(t[Il],e.headers),r){if(sJe.includes(t.status))throw Fe.errors.exception({header:"Response constructor",message:`Invalid response status code ${t.status}`});t[Mt].body=r.body,r.type!=null&&!t[Mt].headersList.contains("content-type",!0)&&t[Mt].headersList.append("content-type",r.type,!0)}}i(Kte,"initializeResponse");function hE(t,e){let r=new _p(Yb);return r[Mt]=t,r[Il]=new Xte(Yb),ere(r[Il],t.headersList),Zte(r[Il],e),tre&&t.body?.stream&&rre.register(r,new WeakRef(t.body.stream)),r}i(hE,"fromInnerResponse");Fe.converters.ReadableStream=Fe.interfaceConverter(ReadableStream);Fe.converters.FormData=Fe.interfaceConverter(oJe);Fe.converters.URLSearchParams=Fe.interfaceConverter(URLSearchParams);Fe.converters.XMLHttpRequestBodyInit=function(t,e,r){return typeof t=="string"?Fe.converters.USVString(t,e,r):XYe(t)?Fe.converters.Blob(t,e,r,{strict:!1}):ArrayBuffer.isView(t)||iJe.isArrayBuffer(t)?Fe.converters.BufferSource(t,e,r):sU.isFormDataLike(t)?Fe.converters.FormData(t,e,r,{strict:!1}):t instanceof URLSearchParams?Fe.converters.URLSearchParams(t,e,r):Fe.converters.DOMString(t,e,r)};Fe.converters.BodyInit=function(t,e,r){return t instanceof ReadableStream?Fe.converters.ReadableStream(t,e,r):t?.[Symbol.asyncIterator]?t:Fe.converters.XMLHttpRequestBodyInit(t,e,r)};Fe.converters.ResponseInit=Fe.dictionaryConverter([{key:"status",converter:Fe.converters["unsigned short"],defaultValue:i(()=>200,"defaultValue")},{key:"statusText",converter:Fe.converters.ByteString,defaultValue:i(()=>"","defaultValue")},{key:"headers",converter:Fe.converters.HeadersInit}]);sre.exports={isNetworkError:cJe,makeNetworkError:Jb,makeResponse:EA,makeAppropriateNetworkError:lJe,filterResponse:nre,Response:_p,cloneResponse:iU,fromInnerResponse:hE}});var cre=I((Mzt,are)=>{"use strict";var{kConnected:ore,kSize:ire}=Lt(),aU=class{static{i(this,"CompatWeakRef")}constructor(e){this.value=e}deref(){return this.value[ore]===0&&this.value[ire]===0?void 0:this.value}},cU=class{static{i(this,"CompatFinalizer")}constructor(e){this.finalizer=e}register(e,r){e.on&&e.on("disconnect",()=>{e[ore]===0&&e[ire]===0&&this.finalizer(r)})}unregister(e){}};are.exports=function(){return process.env.NODE_V8_COVERAGE&&process.version.startsWith("v18")?(process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"),{WeakRef:aU,FinalizationRegistry:cU}):{WeakRef,FinalizationRegistry}}});var CA=I((Uzt,Sre)=>{"use strict";var{extractBody:uJe,mixinBody:dJe,cloneBody:pJe,bodyUnusable:lre}=Xf(),{Headers:yre,fill:mJe,HeadersList:Zb,setHeadersGuard:uU,getHeadersGuard:fJe,setHeadersList:Ere,getHeadersList:ure}=Qp(),{FinalizationRegistry:AJe}=cre()(),Kb=He(),dre=require("node:util"),{isValidHTTPToken:hJe,sameOrigin:pre,environmentSettingsObject:jb}=zs(),{forbiddenMethodsSet:gJe,corsSafeListedMethodsSet:yJe,referrerPolicy:EJe,requestRedirect:CJe,requestMode:IJe,requestCredentials:wJe,requestCache:SJe,requestDuplex:xJe}=Uy(),{kEnumerableProperty:Nr,normalizedMethodRecordsBase:bJe,normalizedMethodRecords:BJe}=Kb,{kHeaders:Ks,kSignal:Xb,kState:Tt,kDispatcher:lU}=Eu(),{webidl:Ce}=sn(),{URLSerializer:RJe}=ms(),{kConstruct:e0}=Lt(),NJe=require("node:assert"),{getMaxListeners:mre,setMaxListeners:fre,getEventListeners:TJe,defaultMaxListeners:Are}=require("node:events"),vJe=Symbol("abortController"),Cre=new AJe(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),t0=new WeakMap;function hre(t){return e;function e(){let r=t.deref();if(r!==void 0){Cre.unregister(e),this.removeEventListener("abort",e),r.abort(this.reason);let n=t0.get(r.signal);if(n!==void 0){if(n.size!==0){for(let s of n){let o=s.deref();o!==void 0&&o.abort(this.reason)}n.clear()}t0.delete(r.signal)}}}}i(hre,"buildAbort");var gre=!1,vu=class t{static{i(this,"Request")}constructor(e,r={}){if(Ce.util.markAsUncloneable(this),e===e0)return;let n="Request constructor";Ce.argumentLengthCheck(arguments,1,n),e=Ce.converters.RequestInfo(e,n,"input"),r=Ce.converters.RequestInit(r,n,"init");let s=null,o=null,a=jb.settingsObject.baseUrl,c=null;if(typeof e=="string"){this[lU]=r.dispatcher;let C;try{C=new URL(e,a)}catch(w){throw new TypeError("Failed to parse URL from "+e,{cause:w})}if(C.username||C.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);s=r0({urlList:[C]}),o="cors"}else this[lU]=r.dispatcher||e[lU],NJe(e instanceof t),s=e[Tt],c=e[Xb];let l=jb.settingsObject.origin,u="client";if(s.window?.constructor?.name==="EnvironmentSettingsObject"&&pre(s.window,l)&&(u=s.window),r.window!=null)throw new TypeError(`'window' option '${u}' must be null`);"window"in r&&(u="no-window"),s=r0({method:s.method,headersList:s.headersList,unsafeRequest:s.unsafeRequest,client:jb.settingsObject,window:u,priority:s.priority,origin:s.origin,referrer:s.referrer,referrerPolicy:s.referrerPolicy,mode:s.mode,credentials:s.credentials,cache:s.cache,redirect:s.redirect,integrity:s.integrity,keepalive:s.keepalive,reloadNavigation:s.reloadNavigation,historyNavigation:s.historyNavigation,urlList:[...s.urlList]});let d=Object.keys(r).length!==0;if(d&&(s.mode==="navigate"&&(s.mode="same-origin"),s.reloadNavigation=!1,s.historyNavigation=!1,s.origin="client",s.referrer="client",s.referrerPolicy="",s.url=s.urlList[s.urlList.length-1],s.urlList=[s.url]),r.referrer!==void 0){let C=r.referrer;if(C==="")s.referrer="no-referrer";else{let w;try{w=new URL(C,a)}catch(x){throw new TypeError(`Referrer "${C}" is not a valid URL.`,{cause:x})}w.protocol==="about:"&&w.hostname==="client"||l&&!pre(w,jb.settingsObject.baseUrl)?s.referrer="client":s.referrer=w}}r.referrerPolicy!==void 0&&(s.referrerPolicy=r.referrerPolicy);let p;if(r.mode!==void 0?p=r.mode:p=o,p==="navigate")throw Ce.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(p!=null&&(s.mode=p),r.credentials!==void 0&&(s.credentials=r.credentials),r.cache!==void 0&&(s.cache=r.cache),s.cache==="only-if-cached"&&s.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(s.redirect=r.redirect),r.integrity!=null&&(s.integrity=String(r.integrity)),r.keepalive!==void 0&&(s.keepalive=!!r.keepalive),r.method!==void 0){let C=r.method,w=BJe[C];if(w!==void 0)s.method=w;else{if(!hJe(C))throw new TypeError(`'${C}' is not a valid HTTP method.`);let x=C.toUpperCase();if(gJe.has(x))throw new TypeError(`'${C}' HTTP method is unsupported.`);C=bJe[x]??C,s.method=C}!gre&&s.method==="patch"&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),gre=!0)}r.signal!==void 0&&(c=r.signal),this[Tt]=s;let m=new AbortController;if(this[Xb]=m.signal,c!=null){if(!c||typeof c.aborted!="boolean"||typeof c.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(c.aborted)m.abort(c.reason);else{this[vJe]=m;let C=new WeakRef(m),w=hre(C);try{(typeof mre=="function"&&mre(c)===Are||TJe(c,"abort").length>=Are)&&fre(1500,c)}catch{}Kb.addAbortListener(c,w),Cre.register(m,{signal:c,abort:w},w)}}if(this[Ks]=new yre(e0),Ere(this[Ks],s.headersList),uU(this[Ks],"request"),p==="no-cors"){if(!yJe.has(s.method))throw new TypeError(`'${s.method} is unsupported in no-cors mode.`);uU(this[Ks],"request-no-cors")}if(d){let C=ure(this[Ks]),w=r.headers!==void 0?r.headers:new Zb(C);if(C.clear(),w instanceof Zb){for(let{name:x,value:b}of w.rawValues())C.append(x,b,!1);C.cookies=w.cookies}else mJe(this[Ks],w)}let f=e instanceof t?e[Tt].body:null;if((r.body!=null||f!=null)&&(s.method==="GET"||s.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let A=null;if(r.body!=null){let[C,w]=uJe(r.body,s.keepalive);A=C,w&&!ure(this[Ks]).contains("content-type",!0)&&this[Ks].append("content-type",w)}let h=A??f;if(h!=null&&h.source==null){if(A!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(s.mode!=="same-origin"&&s.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');s.useCORSPreflightFlag=!0}let E=h;if(A==null&&f!=null){if(lre(e))throw new TypeError("Cannot construct a Request with a Request object that has already been used.");let C=new TransformStream;f.stream.pipeThrough(C),E={source:f.source,length:f.length,stream:C.readable}}this[Tt].body=E}get method(){return Ce.brandCheck(this,t),this[Tt].method}get url(){return Ce.brandCheck(this,t),RJe(this[Tt].url)}get headers(){return Ce.brandCheck(this,t),this[Ks]}get destination(){return Ce.brandCheck(this,t),this[Tt].destination}get referrer(){return Ce.brandCheck(this,t),this[Tt].referrer==="no-referrer"?"":this[Tt].referrer==="client"?"about:client":this[Tt].referrer.toString()}get referrerPolicy(){return Ce.brandCheck(this,t),this[Tt].referrerPolicy}get mode(){return Ce.brandCheck(this,t),this[Tt].mode}get credentials(){return this[Tt].credentials}get cache(){return Ce.brandCheck(this,t),this[Tt].cache}get redirect(){return Ce.brandCheck(this,t),this[Tt].redirect}get integrity(){return Ce.brandCheck(this,t),this[Tt].integrity}get keepalive(){return Ce.brandCheck(this,t),this[Tt].keepalive}get isReloadNavigation(){return Ce.brandCheck(this,t),this[Tt].reloadNavigation}get isHistoryNavigation(){return Ce.brandCheck(this,t),this[Tt].historyNavigation}get signal(){return Ce.brandCheck(this,t),this[Xb]}get body(){return Ce.brandCheck(this,t),this[Tt].body?this[Tt].body.stream:null}get bodyUsed(){return Ce.brandCheck(this,t),!!this[Tt].body&&Kb.isDisturbed(this[Tt].body.stream)}get duplex(){return Ce.brandCheck(this,t),"half"}clone(){if(Ce.brandCheck(this,t),lre(this))throw new TypeError("unusable");let e=Ire(this[Tt]),r=new AbortController;if(this.signal.aborted)r.abort(this.signal.reason);else{let n=t0.get(this.signal);n===void 0&&(n=new Set,t0.set(this.signal,n));let s=new WeakRef(r);n.add(s),Kb.addAbortListener(r.signal,hre(s))}return wre(e,r.signal,fJe(this[Ks]))}[dre.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${dre.formatWithOptions(r,n)}`}};dJe(vu);function r0(t){return{method:t.method??"GET",localURLsOnly:t.localURLsOnly??!1,unsafeRequest:t.unsafeRequest??!1,body:t.body??null,client:t.client??null,reservedClient:t.reservedClient??null,replacesClientId:t.replacesClientId??"",window:t.window??"client",keepalive:t.keepalive??!1,serviceWorkers:t.serviceWorkers??"all",initiator:t.initiator??"",destination:t.destination??"",priority:t.priority??null,origin:t.origin??"client",policyContainer:t.policyContainer??"client",referrer:t.referrer??"client",referrerPolicy:t.referrerPolicy??"",mode:t.mode??"no-cors",useCORSPreflightFlag:t.useCORSPreflightFlag??!1,credentials:t.credentials??"same-origin",useCredentials:t.useCredentials??!1,cache:t.cache??"default",redirect:t.redirect??"follow",integrity:t.integrity??"",cryptoGraphicsNonceMetadata:t.cryptoGraphicsNonceMetadata??"",parserMetadata:t.parserMetadata??"",reloadNavigation:t.reloadNavigation??!1,historyNavigation:t.historyNavigation??!1,userActivation:t.userActivation??!1,taintedOrigin:t.taintedOrigin??!1,redirectCount:t.redirectCount??0,responseTainting:t.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:t.preventNoCacheCacheControlHeaderModification??!1,done:t.done??!1,timingAllowFailed:t.timingAllowFailed??!1,urlList:t.urlList,url:t.urlList[0],headersList:t.headersList?new Zb(t.headersList):new Zb}}i(r0,"makeRequest");function Ire(t){let e=r0({...t,body:null});return t.body!=null&&(e.body=pJe(e,t.body)),e}i(Ire,"cloneRequest");function wre(t,e,r){let n=new vu(e0);return n[Tt]=t,n[Xb]=e,n[Ks]=new yre(e0),Ere(n[Ks],t.headersList),uU(n[Ks],r),n}i(wre,"fromInnerRequest");Object.defineProperties(vu.prototype,{method:Nr,url:Nr,headers:Nr,redirect:Nr,clone:Nr,signal:Nr,duplex:Nr,destination:Nr,body:Nr,bodyUsed:Nr,isHistoryNavigation:Nr,isReloadNavigation:Nr,keepalive:Nr,integrity:Nr,cache:Nr,credentials:Nr,attribute:Nr,referrerPolicy:Nr,referrer:Nr,mode:Nr,[Symbol.toStringTag]:{value:"Request",configurable:!0}});Ce.converters.Request=Ce.interfaceConverter(vu);Ce.converters.RequestInfo=function(t,e,r){return typeof t=="string"?Ce.converters.USVString(t,e,r):t instanceof vu?Ce.converters.Request(t,e,r):Ce.converters.USVString(t,e,r)};Ce.converters.AbortSignal=Ce.interfaceConverter(AbortSignal);Ce.converters.RequestInit=Ce.dictionaryConverter([{key:"method",converter:Ce.converters.ByteString},{key:"headers",converter:Ce.converters.HeadersInit},{key:"body",converter:Ce.nullableConverter(Ce.converters.BodyInit)},{key:"referrer",converter:Ce.converters.USVString},{key:"referrerPolicy",converter:Ce.converters.DOMString,allowedValues:EJe},{key:"mode",converter:Ce.converters.DOMString,allowedValues:IJe},{key:"credentials",converter:Ce.converters.DOMString,allowedValues:wJe},{key:"cache",converter:Ce.converters.DOMString,allowedValues:SJe},{key:"redirect",converter:Ce.converters.DOMString,allowedValues:CJe},{key:"integrity",converter:Ce.converters.DOMString},{key:"keepalive",converter:Ce.converters.boolean},{key:"signal",converter:Ce.nullableConverter(t=>Ce.converters.AbortSignal(t,"RequestInit","signal",{strict:!1}))},{key:"window",converter:Ce.converters.any},{key:"duplex",converter:Ce.converters.DOMString,allowedValues:xJe},{key:"dispatcher",converter:Ce.converters.any}]);Sre.exports={Request:vu,makeRequest:r0,fromInnerRequest:wre,cloneRequest:Ire}});var EE=I((Gzt,Mre)=>{"use strict";var{makeNetworkError:dt,makeAppropriateNetworkError:n0,filterResponse:dU,makeResponse:s0,fromInnerResponse:PJe}=gE(),{HeadersList:xre}=Qp(),{Request:QJe,cloneRequest:_Je}=CA(),Pu=require("node:zlib"),{bytesMatch:DJe,makePolicyContainer:kJe,clonePolicyContainer:LJe,requestBadPort:OJe,TAOCheck:MJe,appendRequestOriginHeader:FJe,responseLocationURL:UJe,requestCurrentURL:Qa,setRequestReferrerPolicyOnRedirect:qJe,tryUpgradeRequestToAPotentiallyTrustworthyURL:GJe,createOpaqueTimingInfo:hU,appendFetchMetadata:HJe,corsCheck:$Je,crossOriginResourcePolicyCheck:zJe,determineRequestsReferrer:VJe,coarsenedSharedCurrentTime:yE,createDeferredPromise:WJe,isBlobLike:YJe,sameOrigin:AU,isCancelled:Dp,isAborted:bre,isErrorLike:JJe,fullyReadBody:jJe,readableStreamClose:KJe,isomorphicEncode:o0,urlIsLocal:XJe,urlIsHttpHttpsScheme:gU,urlHasHttpsScheme:ZJe,clampAndCoarsenConnectionTimingInfo:e8e,simpleRangeHeaderValue:t8e,buildContentRange:r8e,createInflate:n8e,extractMimeType:s8e}=zs(),{kState:Tre,kDispatcher:o8e}=Eu(),kp=require("node:assert"),{safelyExtractBody:yU,extractBody:Bre}=Xf(),{redirectStatusSet:vre,nullBodyStatus:Pre,safeMethodsSet:i8e,requestBodyHeader:a8e,subresourceSet:c8e}=Uy(),l8e=require("node:events"),{Readable:u8e,pipeline:d8e,finished:p8e}=require("node:stream"),{addAbortListener:m8e,isErrored:f8e,isReadable:i0,bufferToLowerCasedHeaderName:Rre}=He(),{dataURLProcessor:A8e,serializeAMimeType:h8e,minimizeSupportedMimeType:g8e}=ms(),{getGlobalDispatcher:y8e}=Hb(),{webidl:E8e}=sn(),{STATUS_CODES:C8e}=require("node:http"),I8e=["GET","HEAD"],w8e=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",pU,a0=class extends l8e{static{i(this,"Fetch")}constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function S8e(t){Qre(t,"fetch")}i(S8e,"handleFetchDone");function x8e(t,e=void 0){E8e.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=WJe(),n;try{n=new QJe(t,e)}catch(d){return r.reject(d),r.promise}let s=n[Tre];if(n.signal.aborted)return mU(r,s,null,n.signal.reason),r.promise;s.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(s.serviceWorkers="none");let a=null,c=!1,l=null;return m8e(n.signal,()=>{c=!0,kp(l!=null),l.abort(n.signal.reason);let d=a?.deref();mU(r,s,d,n.signal.reason)}),l=Dre({request:s,processResponseEndOfBody:S8e,processResponse:i(d=>{if(!c){if(d.aborted){mU(r,s,a,l.serializedAbortReason);return}if(d.type==="error"){r.reject(new TypeError("fetch failed",{cause:d.error}));return}a=new WeakRef(PJe(d,"immutable")),r.resolve(a.deref()),r=null}},"processResponse"),dispatcher:n[o8e]}),r.promise}i(x8e,"fetch");function Qre(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],n=t.timingInfo,s=t.cacheState;gU(r)&&n!==null&&(t.timingAllowPassed||(n=hU({startTime:n.startTime}),s=""),n.endTime=yE(),t.timingInfo=n,_re(n,r.href,e,globalThis,s))}i(Qre,"finalizeAndReportTiming");var _re=performance.markResourceTiming;function mU(t,e,r,n){if(t&&t.reject(n),e.body!=null&&i0(e.body?.stream)&&e.body.stream.cancel(n).catch(o=>{if(o.code!=="ERR_INVALID_STATE")throw o}),r==null)return;let s=r[Tre];s.body!=null&&i0(s.body?.stream)&&s.body.stream.cancel(n).catch(o=>{if(o.code!=="ERR_INVALID_STATE")throw o})}i(mU,"abortFetch");function Dre({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:s,processResponseConsumeBody:o,useParallelQueue:a=!1,dispatcher:c=y8e()}){kp(c);let l=null,u=!1;t.client!=null&&(l=t.client.globalObject,u=t.client.crossOriginIsolatedCapability);let d=yE(u),p=hU({startTime:d}),m={controller:new a0(c),request:t,timingInfo:p,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:o,processResponseEndOfBody:s,taskDestination:l,crossOriginIsolatedCapability:u};return kp(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=LJe(t.client.policyContainer):t.policyContainer=kJe()),t.headersList.contains("accept",!0)||t.headersList.append("accept","*/*",!0),t.headersList.contains("accept-language",!0)||t.headersList.append("accept-language","*",!0),t.priority,c8e.has(t.destination),kre(m).catch(f=>{m.controller.terminate(f)}),m.controller}i(Dre,"fetching");async function kre(t,e=!1){let r=t.request,n=null;if(r.localURLsOnly&&!XJe(Qa(r))&&(n=dt("local URLs only")),GJe(r),OJe(r)==="blocked"&&(n=dt("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=VJe(r)),n===null&&(n=await(async()=>{let o=Qa(r);return AU(o,r.url)&&r.responseTainting==="basic"||o.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",await Nre(t)):r.mode==="same-origin"?dt('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?dt('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",await Nre(t)):gU(Qa(r))?(r.responseTainting="cors",await Lre(t)):dt("URL scheme must be a HTTP(S) scheme")})()),e)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=dU(n,"basic"):r.responseTainting==="cors"?n=dU(n,"cors"):r.responseTainting==="opaque"?n=dU(n,"opaque"):kp(!1));let s=n.status===0?n:n.internalResponse;if(s.urlList.length===0&&s.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&s.status===206&&s.rangeRequested&&!r.headers.contains("range",!0)&&(n=s=dt()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||Pre.includes(s.status))&&(s.body=null,t.controller.dump=!0),r.integrity){let o=i(c=>fU(t,dt(c)),"processBodyError");if(r.responseTainting==="opaque"||n.body==null){o(n.error);return}let a=i(c=>{if(!DJe(c,r.integrity)){o("integrity mismatch");return}n.body=yU(c)[0],fU(t,n)},"processBody");await jJe(n.body,a,o)}else fU(t,n)}i(kre,"mainFetch");function Nre(t){if(Dp(t)&&t.request.redirectCount===0)return Promise.resolve(n0(t));let{request:e}=t,{protocol:r}=Qa(e);switch(r){case"about:":return Promise.resolve(dt("about scheme is not supported"));case"blob:":{pU||(pU=require("node:buffer").resolveObjectURL);let n=Qa(e);if(n.search.length!==0)return Promise.resolve(dt("NetworkError when attempting to fetch resource."));let s=pU(n.toString());if(e.method!=="GET"||!YJe(s))return Promise.resolve(dt("invalid method"));let o=s0(),a=s.size,c=o0(`${a}`),l=s.type;if(e.headersList.contains("range",!0)){o.rangeRequested=!0;let u=e.headersList.get("range",!0),d=t8e(u,!0);if(d==="failure")return Promise.resolve(dt("failed to fetch the data URL"));let{rangeStartValue:p,rangeEndValue:m}=d;if(p===null)p=a-m,m=p+m-1;else{if(p>=a)return Promise.resolve(dt("Range start is greater than the blob's size."));(m===null||m>=a)&&(m=a-1)}let f=s.slice(p,m,l),A=Bre(f);o.body=A[0];let h=o0(`${f.size}`),E=r8e(p,m,a);o.status=206,o.statusText="Partial Content",o.headersList.set("content-length",h,!0),o.headersList.set("content-type",l,!0),o.headersList.set("content-range",E,!0)}else{let u=Bre(s);o.statusText="OK",o.body=u[0],o.headersList.set("content-length",c,!0),o.headersList.set("content-type",l,!0)}return Promise.resolve(o)}case"data:":{let n=Qa(e),s=A8e(n);if(s==="failure")return Promise.resolve(dt("failed to fetch the data URL"));let o=h8e(s.mimeType);return Promise.resolve(s0({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:o}]],body:yU(s.body)[0]}))}case"file:":return Promise.resolve(dt("not implemented... yet..."));case"http:":case"https:":return Lre(t).catch(n=>dt(n));default:return Promise.resolve(dt("unknown scheme"))}}i(Nre,"schemeFetch");function b8e(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}i(b8e,"finalizeResponse");function fU(t,e){let r=t.timingInfo,n=i(()=>{let o=Date.now();t.request.destination==="document"&&(t.controller.fullTimingInfo=r),t.controller.reportTimingSteps=()=>{if(t.request.url.protocol!=="https:")return;r.endTime=o;let c=e.cacheState,l=e.bodyInfo;e.timingAllowPassed||(r=hU(r),c="");let u=0;if(t.request.mode!=="navigator"||!e.hasCrossOriginRedirects){u=e.status;let d=s8e(e.headersList);d!=="failure"&&(l.contentType=g8e(d))}t.request.initiatorType!=null&&_re(r,t.request.url.href,t.request.initiatorType,globalThis,c,l,u)};let a=i(()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e)),t.request.initiatorType!=null&&t.controller.reportTimingSteps()},"processResponseEndOfBodyTask");queueMicrotask(()=>a())},"processResponseEndOfBody");t.processResponse!=null&&queueMicrotask(()=>{t.processResponse(e),t.processResponse=null});let s=e.type==="error"?e:e.internalResponse??e;s.body==null?n():p8e(s.body.stream,()=>{n()})}i(fU,"fetchFinale");async function Lre(t){let e=t.request,r=null,n=null,s=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),n=r=await Ore(t),e.responseTainting==="cors"&&$Je(e,r)==="failure")return dt("cors failure");MJe(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&zJe(e.origin,e.client,e.destination,n)==="blocked"?dt("blocked"):(vre.has(n.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(void 0,!1),e.redirect==="error"?r=dt("unexpected redirect"):e.redirect==="manual"?r=n:e.redirect==="follow"?r=await B8e(t,r):kp(!1)),r.timingInfo=s,r)}i(Lre,"httpFetch");function B8e(t,e){let r=t.request,n=e.internalResponse?e.internalResponse:e,s;try{if(s=UJe(n,Qa(r).hash),s==null)return e}catch(a){return Promise.resolve(dt(a))}if(!gU(s))return Promise.resolve(dt("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(dt("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(s.username||s.password)&&!AU(r,s))return Promise.resolve(dt('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(s.username||s.password))return Promise.resolve(dt('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(dt());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!I8e.includes(r.method)){r.method="GET",r.body=null;for(let a of a8e)r.headersList.delete(a)}AU(Qa(r),s)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),r.body!=null&&(kp(r.body.source!=null),r.body=yU(r.body.source)[0]);let o=t.timingInfo;return o.redirectEndTime=o.postRedirectStartTime=yE(t.crossOriginIsolatedCapability),o.redirectStartTime===0&&(o.redirectStartTime=o.startTime),r.urlList.push(s),qJe(r,n),kre(t,!0)}i(B8e,"httpRedirectFetch");async function Ore(t,e=!1,r=!1){let n=t.request,s=null,o=null,a=null,c=null,l=!1;n.window==="no-window"&&n.redirect==="error"?(s=t,o=n):(o=_Je(n),s={...t},s.request=o);let u=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",d=o.body?o.body.length:null,p=null;if(o.body==null&&["POST","PUT"].includes(o.method)&&(p="0"),d!=null&&(p=o0(`${d}`)),p!=null&&o.headersList.append("content-length",p,!0),d!=null&&o.keepalive,o.referrer instanceof URL&&o.headersList.append("referer",o0(o.referrer.href),!0),FJe(o),HJe(o),o.headersList.contains("user-agent",!0)||o.headersList.append("user-agent",w8e),o.cache==="default"&&(o.headersList.contains("if-modified-since",!0)||o.headersList.contains("if-none-match",!0)||o.headersList.contains("if-unmodified-since",!0)||o.headersList.contains("if-match",!0)||o.headersList.contains("if-range",!0))&&(o.cache="no-store"),o.cache==="no-cache"&&!o.preventNoCacheCacheControlHeaderModification&&!o.headersList.contains("cache-control",!0)&&o.headersList.append("cache-control","max-age=0",!0),(o.cache==="no-store"||o.cache==="reload")&&(o.headersList.contains("pragma",!0)||o.headersList.append("pragma","no-cache",!0),o.headersList.contains("cache-control",!0)||o.headersList.append("cache-control","no-cache",!0)),o.headersList.contains("range",!0)&&o.headersList.append("accept-encoding","identity",!0),o.headersList.contains("accept-encoding",!0)||(ZJe(Qa(o))?o.headersList.append("accept-encoding","br, gzip, deflate",!0):o.headersList.append("accept-encoding","gzip, deflate",!0)),o.headersList.delete("host",!0),c==null&&(o.cache="no-store"),o.cache!=="no-store"&&o.cache,a==null){if(o.cache==="only-if-cached")return dt("only if cached");let m=await R8e(s,u,r);!i8e.has(o.method)&&m.status>=200&&m.status<=399,l&&m.status,a==null&&(a=m)}if(a.urlList=[...o.urlList],o.headersList.contains("range",!0)&&(a.rangeRequested=!0),a.requestIncludesCredentials=u,a.status===407)return n.window==="no-window"?dt():Dp(t)?n0(t):dt("proxy authentication required");if(a.status===421&&!r&&(n.body==null||n.body.source!=null)){if(Dp(t))return n0(t);t.controller.connection.destroy(),a=await Ore(t,e,!0)}return a}i(Ore,"httpNetworkOrCacheFetch");async function R8e(t,e=!1,r=!1){kp(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(A,h=!0){this.destroyed||(this.destroyed=!0,h&&this.abort?.(A??new DOMException("The operation was aborted.","AbortError")))}};let n=t.request,s=null,o=t.timingInfo;null==null&&(n.cache="no-store");let c=r?"yes":"no";n.mode;let l=null;if(n.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(n.body!=null){let A=i(async function*(C){Dp(t)||(yield C,t.processRequestBodyChunkLength?.(C.byteLength))},"processBodyChunk"),h=i(()=>{Dp(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},"processEndOfBody"),E=i(C=>{Dp(t)||(C.name==="AbortError"?t.controller.abort():t.controller.terminate(C))},"processBodyError");l=(async function*(){try{for await(let C of n.body.stream)yield*A(C);h()}catch(C){E(C)}})()}try{let{body:A,status:h,statusText:E,headersList:C,socket:w}=await f({body:l});if(w)s=s0({status:h,statusText:E,headersList:C,socket:w});else{let x=A[Symbol.asyncIterator]();t.controller.next=()=>x.next(),s=s0({status:h,statusText:E,headersList:C})}}catch(A){return A.name==="AbortError"?(t.controller.connection.destroy(),n0(t,A)):dt(A)}let u=i(async()=>{await t.controller.resume()},"pullAlgorithm"),d=i(A=>{Dp(t)||t.controller.abort(A)},"cancelAlgorithm"),p=new ReadableStream({async start(A){t.controller.controller=A},async pull(A){await u(A)},async cancel(A){await d(A)},type:"bytes"});s.body={stream:p,source:null,length:null},t.controller.onAborted=m,t.controller.on("terminated",m),t.controller.resume=async()=>{for(;;){let A,h;try{let{done:C,value:w}=await t.controller.next();if(bre(t))break;A=C?void 0:w}catch(C){t.controller.ended&&!o.encodedBodySize?A=void 0:(A=C,h=!0)}if(A===void 0){KJe(t.controller.controller),b8e(t,s);return}if(o.decodedBodySize+=A?.byteLength??0,h){t.controller.terminate(A);return}let E=new Uint8Array(A);if(E.byteLength&&t.controller.controller.enqueue(E),f8e(p)){t.controller.terminate();return}if(t.controller.controller.desiredSize<=0)return}};function m(A){bre(t)?(s.aborted=!0,i0(p)&&t.controller.controller.error(t.controller.serializedAbortReason)):i0(p)&&t.controller.controller.error(new TypeError("terminated",{cause:JJe(A)?A:void 0})),t.controller.connection.destroy()}return i(m,"onAborted"),s;function f({body:A}){let h=Qa(n),E=t.controller.dispatcher;return new Promise((C,w)=>E.dispatch({path:h.pathname+h.search,origin:h.origin,method:n.method,body:E.isMockActive?n.body&&(n.body.source||n.body.stream):A,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(x){let{connection:b}=t.controller;o.finalConnectionTimingInfo=e8e(void 0,o.postRedirectStartTime,t.crossOriginIsolatedCapability),b.destroyed?x(new DOMException("The operation was aborted.","AbortError")):(t.controller.on("terminated",x),this.abort=b.abort=x),o.finalNetworkRequestStartTime=yE(t.crossOriginIsolatedCapability)},onResponseStarted(){o.finalNetworkResponseStartTime=yE(t.crossOriginIsolatedCapability)},onHeaders(x,b,N,P){if(x<200)return;let _="",re=new xre;for(let ne=0;neU)return w(new Error(`too many content-encodings in response: ${K.length}, maximum allowed is ${U}`)),!0;for(let wt=K.length-1;wt>=0;--wt){let X=K[wt].trim();if(X==="x-gzip"||X==="gzip")ye.push(Pu.createGunzip({flush:Pu.constants.Z_SYNC_FLUSH,finishFlush:Pu.constants.Z_SYNC_FLUSH}));else if(X==="deflate")ye.push(n8e({flush:Pu.constants.Z_SYNC_FLUSH,finishFlush:Pu.constants.Z_SYNC_FLUSH}));else if(X==="br")ye.push(Pu.createBrotliDecompress({flush:Pu.constants.BROTLI_OPERATION_FLUSH,finishFlush:Pu.constants.BROTLI_OPERATION_FLUSH}));else{ye.length=0;break}}}let qe=this.onError.bind(this);return C({status:x,statusText:P,headersList:re,body:ye.length?d8e(this.body,...ye,ne=>{ne&&this.onError(ne)}).on("error",qe):this.body.on("error",qe)}),!0},onData(x){if(t.controller.dump)return;let b=x;return o.encodedBodySize+=b.byteLength,this.body.push(b)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.onAborted&&t.controller.off("terminated",t.controller.onAborted),t.controller.ended=!0,this.body.push(null)},onError(x){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(x),t.controller.terminate(x),w(x)},onUpgrade(x,b,N){if(x!==101)return;let P=new xre;for(let _=0;_{"use strict";Fre.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var qre=I((zzt,Ure)=>{"use strict";var{webidl:Xs}=sn(),c0=Symbol("ProgressEvent state"),CU=class t extends Event{static{i(this,"ProgressEvent")}constructor(e,r={}){e=Xs.converters.DOMString(e,"ProgressEvent constructor","type"),r=Xs.converters.ProgressEventInit(r??{}),super(e,r),this[c0]={lengthComputable:r.lengthComputable,loaded:r.loaded,total:r.total}}get lengthComputable(){return Xs.brandCheck(this,t),this[c0].lengthComputable}get loaded(){return Xs.brandCheck(this,t),this[c0].loaded}get total(){return Xs.brandCheck(this,t),this[c0].total}};Xs.converters.ProgressEventInit=Xs.dictionaryConverter([{key:"lengthComputable",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"loaded",converter:Xs.converters["unsigned long long"],defaultValue:i(()=>0,"defaultValue")},{key:"total",converter:Xs.converters["unsigned long long"],defaultValue:i(()=>0,"defaultValue")},{key:"bubbles",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"cancelable",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"composed",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")}]);Ure.exports={ProgressEvent:CU}});var Hre=I((Wzt,Gre)=>{"use strict";function N8e(t){if(!t)return"failure";switch(t.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}i(N8e,"getEncoding");Gre.exports={getEncoding:N8e}});var Kre=I((Jzt,jre)=>{"use strict";var{kState:IA,kError:IU,kResult:$re,kAborted:CE,kLastProgressEventFired:wU}=EU(),{ProgressEvent:T8e}=qre(),{getEncoding:zre}=Hre(),{serializeAMimeType:v8e,parseMIMEType:Vre}=ms(),{types:P8e}=require("node:util"),{StringDecoder:Wre}=require("string_decoder"),{btoa:Yre}=require("node:buffer"),Q8e={enumerable:!0,writable:!1,configurable:!1};function _8e(t,e,r,n){if(t[IA]==="loading")throw new DOMException("Invalid state","InvalidStateError");t[IA]="loading",t[$re]=null,t[IU]=null;let o=e.stream().getReader(),a=[],c=o.read(),l=!0;(async()=>{for(;!t[CE];)try{let{done:u,value:d}=await c;if(l&&!t[CE]&&queueMicrotask(()=>{Qu("loadstart",t)}),l=!1,!u&&P8e.isUint8Array(d))a.push(d),(t[wU]===void 0||Date.now()-t[wU]>=50)&&!t[CE]&&(t[wU]=Date.now(),queueMicrotask(()=>{Qu("progress",t)})),c=o.read();else if(u){queueMicrotask(()=>{t[IA]="done";try{let p=D8e(a,r,e.type,n);if(t[CE])return;t[$re]=p,Qu("load",t)}catch(p){t[IU]=p,Qu("error",t)}t[IA]!=="loading"&&Qu("loadend",t)});break}}catch(u){if(t[CE])return;queueMicrotask(()=>{t[IA]="done",t[IU]=u,Qu("error",t),t[IA]!=="loading"&&Qu("loadend",t)});break}})()}i(_8e,"readOperation");function Qu(t,e){let r=new T8e(t,{bubbles:!1,cancelable:!1});e.dispatchEvent(r)}i(Qu,"fireAProgressEvent");function D8e(t,e,r,n){switch(e){case"DataURL":{let s="data:",o=Vre(r||"application/octet-stream");o!=="failure"&&(s+=v8e(o)),s+=";base64,";let a=new Wre("latin1");for(let c of t)s+=Yre(a.write(c));return s+=Yre(a.end()),s}case"Text":{let s="failure";if(n&&(s=zre(n)),s==="failure"&&r){let o=Vre(r);o!=="failure"&&(s=zre(o.parameters.get("charset")))}return s==="failure"&&(s="UTF-8"),k8e(t,s)}case"ArrayBuffer":return Jre(t).buffer;case"BinaryString":{let s="",o=new Wre("latin1");for(let a of t)s+=o.write(a);return s+=o.end(),s}}}i(D8e,"packageData");function k8e(t,e){let r=Jre(t),n=L8e(r),s=0;n!==null&&(e=n,s=n==="UTF-8"?3:2);let o=r.slice(s);return new TextDecoder(e).decode(o)}i(k8e,"decode");function L8e(t){let[e,r,n]=t;return e===239&&r===187&&n===191?"UTF-8":e===254&&r===255?"UTF-16BE":e===255&&r===254?"UTF-16LE":null}i(L8e,"BOMSniffing");function Jre(t){let e=t.reduce((n,s)=>n+s.byteLength,0),r=0;return t.reduce((n,s)=>(n.set(s,r),r+=s.byteLength,n),new Uint8Array(e))}i(Jre,"combineByteSequences");jre.exports={staticPropertyDescriptors:Q8e,readOperation:_8e,fireAProgressEvent:Qu}});var tne=I((Kzt,ene)=>{"use strict";var{staticPropertyDescriptors:wA,readOperation:l0,fireAProgressEvent:Xre}=Kre(),{kState:Lp,kError:Zre,kResult:u0,kEvents:ot,kAborted:O8e}=EU(),{webidl:mt}=sn(),{kEnumerableProperty:hs}=He(),Pi=class t extends EventTarget{static{i(this,"FileReader")}constructor(){super(),this[Lp]="empty",this[u0]=null,this[Zre]=null,this[ot]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(e){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsArrayBuffer"),e=mt.converters.Blob(e,{strict:!1}),l0(this,e,"ArrayBuffer")}readAsBinaryString(e){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsBinaryString"),e=mt.converters.Blob(e,{strict:!1}),l0(this,e,"BinaryString")}readAsText(e,r=void 0){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsText"),e=mt.converters.Blob(e,{strict:!1}),r!==void 0&&(r=mt.converters.DOMString(r,"FileReader.readAsText","encoding")),l0(this,e,"Text",r)}readAsDataURL(e){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsDataURL"),e=mt.converters.Blob(e,{strict:!1}),l0(this,e,"DataURL")}abort(){if(this[Lp]==="empty"||this[Lp]==="done"){this[u0]=null;return}this[Lp]==="loading"&&(this[Lp]="done",this[u0]=null),this[O8e]=!0,Xre("abort",this),this[Lp]!=="loading"&&Xre("loadend",this)}get readyState(){switch(mt.brandCheck(this,t),this[Lp]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return mt.brandCheck(this,t),this[u0]}get error(){return mt.brandCheck(this,t),this[Zre]}get onloadend(){return mt.brandCheck(this,t),this[ot].loadend}set onloadend(e){mt.brandCheck(this,t),this[ot].loadend&&this.removeEventListener("loadend",this[ot].loadend),typeof e=="function"?(this[ot].loadend=e,this.addEventListener("loadend",e)):this[ot].loadend=null}get onerror(){return mt.brandCheck(this,t),this[ot].error}set onerror(e){mt.brandCheck(this,t),this[ot].error&&this.removeEventListener("error",this[ot].error),typeof e=="function"?(this[ot].error=e,this.addEventListener("error",e)):this[ot].error=null}get onloadstart(){return mt.brandCheck(this,t),this[ot].loadstart}set onloadstart(e){mt.brandCheck(this,t),this[ot].loadstart&&this.removeEventListener("loadstart",this[ot].loadstart),typeof e=="function"?(this[ot].loadstart=e,this.addEventListener("loadstart",e)):this[ot].loadstart=null}get onprogress(){return mt.brandCheck(this,t),this[ot].progress}set onprogress(e){mt.brandCheck(this,t),this[ot].progress&&this.removeEventListener("progress",this[ot].progress),typeof e=="function"?(this[ot].progress=e,this.addEventListener("progress",e)):this[ot].progress=null}get onload(){return mt.brandCheck(this,t),this[ot].load}set onload(e){mt.brandCheck(this,t),this[ot].load&&this.removeEventListener("load",this[ot].load),typeof e=="function"?(this[ot].load=e,this.addEventListener("load",e)):this[ot].load=null}get onabort(){return mt.brandCheck(this,t),this[ot].abort}set onabort(e){mt.brandCheck(this,t),this[ot].abort&&this.removeEventListener("abort",this[ot].abort),typeof e=="function"?(this[ot].abort=e,this.addEventListener("abort",e)):this[ot].abort=null}};Pi.EMPTY=Pi.prototype.EMPTY=0;Pi.LOADING=Pi.prototype.LOADING=1;Pi.DONE=Pi.prototype.DONE=2;Object.defineProperties(Pi.prototype,{EMPTY:wA,LOADING:wA,DONE:wA,readAsArrayBuffer:hs,readAsBinaryString:hs,readAsText:hs,readAsDataURL:hs,abort:hs,readyState:hs,result:hs,error:hs,onloadstart:hs,onprogress:hs,onload:hs,onabort:hs,onerror:hs,onloadend:hs,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Pi,{EMPTY:wA,LOADING:wA,DONE:wA});ene.exports={FileReader:Pi}});var d0=I((Zzt,rne)=>{"use strict";rne.exports={kConstruct:Lt().kConstruct}});var one=I((e3t,sne)=>{"use strict";var M8e=require("node:assert"),{URLSerializer:nne}=ms(),{isValidHeaderName:F8e}=zs();function U8e(t,e,r=!1){let n=nne(t,r),s=nne(e,r);return n===s}i(U8e,"urlEquals");function q8e(t){M8e(t!==null);let e=[];for(let r of t.split(","))r=r.trim(),F8e(r)&&e.push(r);return e}i(q8e,"getFieldValues");sne.exports={urlEquals:U8e,getFieldValues:q8e}});var cne=I((r3t,ane)=>{"use strict";var{kConstruct:G8e}=d0(),{urlEquals:H8e,getFieldValues:SU}=one(),{kEnumerableProperty:Op,isDisturbed:$8e}=He(),{webidl:le}=sn(),{Response:z8e,cloneResponse:V8e,fromInnerResponse:W8e}=gE(),{Request:wl,fromInnerRequest:Y8e}=CA(),{kState:Qi}=Eu(),{fetching:J8e}=EE(),{urlIsHttpHttpsScheme:p0,createDeferredPromise:SA,readAllBytes:j8e}=zs(),xU=require("node:assert"),m0=class t{static{i(this,"Cache")}#e;constructor(){arguments[0]!==G8e&&le.illegalConstructor(),le.util.markAsUncloneable(this),this.#e=arguments[1]}async match(e,r={}){le.brandCheck(this,t);let n="Cache.match";le.argumentLengthCheck(arguments,1,n),e=le.converters.RequestInfo(e,n,"request"),r=le.converters.CacheQueryOptions(r,n,"options");let s=this.#s(e,r,1);if(s.length!==0)return s[0]}async matchAll(e=void 0,r={}){le.brandCheck(this,t);let n="Cache.matchAll";return e!==void 0&&(e=le.converters.RequestInfo(e,n,"request")),r=le.converters.CacheQueryOptions(r,n,"options"),this.#s(e,r)}async add(e){le.brandCheck(this,t);let r="Cache.add";le.argumentLengthCheck(arguments,1,r),e=le.converters.RequestInfo(e,r,"request");let n=[e];return await this.addAll(n)}async addAll(e){le.brandCheck(this,t);let r="Cache.addAll";le.argumentLengthCheck(arguments,1,r);let n=[],s=[];for(let m of e){if(m===void 0)throw le.errors.conversionFailed({prefix:r,argument:"Argument 1",types:["undefined is not allowed"]});if(m=le.converters.RequestInfo(m),typeof m=="string")continue;let f=m[Qi];if(!p0(f.url)||f.method!=="GET")throw le.errors.exception({header:r,message:"Expected http/s scheme when method is not GET."})}let o=[];for(let m of e){let f=new wl(m)[Qi];if(!p0(f.url))throw le.errors.exception({header:r,message:"Expected http/s scheme."});f.initiator="fetch",f.destination="subresource",s.push(f);let A=SA();o.push(J8e({request:f,processResponse(h){if(h.type==="error"||h.status===206||h.status<200||h.status>299)A.reject(le.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(h.headersList.contains("vary")){let E=SU(h.headersList.get("vary"));for(let C of E)if(C==="*"){A.reject(le.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let w of o)w.abort();return}}},processResponseEndOfBody(h){if(h.aborted){A.reject(new DOMException("aborted","AbortError"));return}A.resolve(h)}})),n.push(A.promise)}let c=await Promise.all(n),l=[],u=0;for(let m of c){let f={type:"put",request:s[u],response:m};l.push(f),u++}let d=SA(),p=null;try{this.#t(l)}catch(m){p=m}return queueMicrotask(()=>{p===null?d.resolve(void 0):d.reject(p)}),d.promise}async put(e,r){le.brandCheck(this,t);let n="Cache.put";le.argumentLengthCheck(arguments,2,n),e=le.converters.RequestInfo(e,n,"request"),r=le.converters.Response(r,n,"response");let s=null;if(e instanceof wl?s=e[Qi]:s=new wl(e)[Qi],!p0(s.url)||s.method!=="GET")throw le.errors.exception({header:n,message:"Expected an http/s scheme when method is not GET"});let o=r[Qi];if(o.status===206)throw le.errors.exception({header:n,message:"Got 206 status"});if(o.headersList.contains("vary")){let f=SU(o.headersList.get("vary"));for(let A of f)if(A==="*")throw le.errors.exception({header:n,message:"Got * vary field value"})}if(o.body&&($8e(o.body.stream)||o.body.stream.locked))throw le.errors.exception({header:n,message:"Response body is locked or disturbed"});let a=V8e(o),c=SA();if(o.body!=null){let A=o.body.stream.getReader();j8e(A).then(c.resolve,c.reject)}else c.resolve(void 0);let l=[],u={type:"put",request:s,response:a};l.push(u);let d=await c.promise;a.body!=null&&(a.body.source=d);let p=SA(),m=null;try{this.#t(l)}catch(f){m=f}return queueMicrotask(()=>{m===null?p.resolve():p.reject(m)}),p.promise}async delete(e,r={}){le.brandCheck(this,t);let n="Cache.delete";le.argumentLengthCheck(arguments,1,n),e=le.converters.RequestInfo(e,n,"request"),r=le.converters.CacheQueryOptions(r,n,"options");let s=null;if(e instanceof wl){if(s=e[Qi],s.method!=="GET"&&!r.ignoreMethod)return!1}else xU(typeof e=="string"),s=new wl(e)[Qi];let o=[],a={type:"delete",request:s,options:r};o.push(a);let c=SA(),l=null,u;try{u=this.#t(o)}catch(d){l=d}return queueMicrotask(()=>{l===null?c.resolve(!!u?.length):c.reject(l)}),c.promise}async keys(e=void 0,r={}){le.brandCheck(this,t);let n="Cache.keys";e!==void 0&&(e=le.converters.RequestInfo(e,n,"request")),r=le.converters.CacheQueryOptions(r,n,"options");let s=null;if(e!==void 0)if(e instanceof wl){if(s=e[Qi],s.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(s=new wl(e)[Qi]);let o=SA(),a=[];if(e===void 0)for(let c of this.#e)a.push(c[0]);else{let c=this.#r(s,r);for(let l of c)a.push(l[0])}return queueMicrotask(()=>{let c=[];for(let l of a){let u=Y8e(l,new AbortController().signal,"immutable");c.push(u)}o.resolve(Object.freeze(c))}),o.promise}#t(e){let r=this.#e,n=[...r],s=[],o=[];try{for(let a of e){if(a.type!=="delete"&&a.type!=="put")throw le.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(a.type==="delete"&&a.response!=null)throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#r(a.request,a.options,s).length)throw new DOMException("???","InvalidStateError");let c;if(a.type==="delete"){if(c=this.#r(a.request,a.options),c.length===0)return[];for(let l of c){let u=r.indexOf(l);xU(u!==-1),r.splice(u,1)}}else if(a.type==="put"){if(a.response==null)throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let l=a.request;if(!p0(l.url))throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(l.method!=="GET")throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(a.options!=null)throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});c=this.#r(a.request);for(let u of c){let d=r.indexOf(u);xU(d!==-1),r.splice(d,1)}r.push([a.request,a.response]),s.push([a.request,a.response])}o.push([a.request,a.response])}return o}catch(a){throw this.#e.length=0,this.#e=n,a}}#r(e,r,n){let s=[],o=n??this.#e;for(let a of o){let[c,l]=a;this.#o(e,c,l,r)&&s.push(a)}return s}#o(e,r,n=null,s){let o=new URL(e.url),a=new URL(r.url);if(s?.ignoreSearch&&(a.search="",o.search=""),!H8e(o,a,!0))return!1;if(n==null||s?.ignoreVary||!n.headersList.contains("vary"))return!0;let c=SU(n.headersList.get("vary"));for(let l of c){if(l==="*")return!1;let u=r.headersList.get(l),d=e.headersList.get(l);if(u!==d)return!1}return!0}#s(e,r,n=1/0){let s=null;if(e!==void 0)if(e instanceof wl){if(s=e[Qi],s.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(s=new wl(e)[Qi]);let o=[];if(e===void 0)for(let c of this.#e)o.push(c[1]);else{let c=this.#r(s,r);for(let l of c)o.push(l[1])}let a=[];for(let c of o){let l=W8e(c,"immutable");if(a.push(l.clone()),a.length>=n)break}return Object.freeze(a)}};Object.defineProperties(m0.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:Op,matchAll:Op,add:Op,addAll:Op,put:Op,delete:Op,keys:Op});var ine=[{key:"ignoreSearch",converter:le.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"ignoreMethod",converter:le.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"ignoreVary",converter:le.converters.boolean,defaultValue:i(()=>!1,"defaultValue")}];le.converters.CacheQueryOptions=le.dictionaryConverter(ine);le.converters.MultiCacheQueryOptions=le.dictionaryConverter([...ine,{key:"cacheName",converter:le.converters.DOMString}]);le.converters.Response=le.interfaceConverter(z8e);le.converters["sequence"]=le.sequenceConverter(le.converters.RequestInfo);ane.exports={Cache:m0}});var une=I((s3t,lne)=>{"use strict";var{kConstruct:IE}=d0(),{Cache:f0}=cne(),{webidl:Sn}=sn(),{kEnumerableProperty:wE}=He(),A0=class t{static{i(this,"CacheStorage")}#e=new Map;constructor(){arguments[0]!==IE&&Sn.illegalConstructor(),Sn.util.markAsUncloneable(this)}async match(e,r={}){if(Sn.brandCheck(this,t),Sn.argumentLengthCheck(arguments,1,"CacheStorage.match"),e=Sn.converters.RequestInfo(e),r=Sn.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new f0(IE,n).match(e,r)}}else for(let n of this.#e.values()){let o=await new f0(IE,n).match(e,r);if(o!==void 0)return o}}async has(e){Sn.brandCheck(this,t);let r="CacheStorage.has";return Sn.argumentLengthCheck(arguments,1,r),e=Sn.converters.DOMString(e,r,"cacheName"),this.#e.has(e)}async open(e){Sn.brandCheck(this,t);let r="CacheStorage.open";if(Sn.argumentLengthCheck(arguments,1,r),e=Sn.converters.DOMString(e,r,"cacheName"),this.#e.has(e)){let s=this.#e.get(e);return new f0(IE,s)}let n=[];return this.#e.set(e,n),new f0(IE,n)}async delete(e){Sn.brandCheck(this,t);let r="CacheStorage.delete";return Sn.argumentLengthCheck(arguments,1,r),e=Sn.converters.DOMString(e,r,"cacheName"),this.#e.delete(e)}async keys(){return Sn.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(A0.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:wE,has:wE,open:wE,delete:wE,keys:wE});lne.exports={CacheStorage:A0}});var pne=I((i3t,dne)=>{"use strict";dne.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var bU=I((a3t,gne)=>{"use strict";function K8e(t){for(let e=0;e=0&&r<=8||r>=10&&r<=31||r===127)return!0}return!1}i(K8e,"isCTLExcludingHtab");function mne(t){for(let e=0;e126||r===34||r===40||r===41||r===60||r===62||r===64||r===44||r===59||r===58||r===92||r===47||r===91||r===93||r===63||r===61||r===123||r===125)throw new Error("Invalid cookie name")}}i(mne,"validateCookieName");function fne(t){let e=t.length,r=0;if(t[0]==='"'){if(e===1||t[e-1]!=='"')throw new Error("Invalid cookie value");--e,++r}for(;r126||n===34||n===44||n===59||n===92)throw new Error("Invalid cookie value")}}i(fne,"validateCookieValue");function Ane(t){for(let e=0;ee.toString().padStart(2,"0"));function hne(t){return typeof t=="number"&&(t=new Date(t)),`${Z8e[t.getUTCDay()]}, ${h0[t.getUTCDate()]} ${e5e[t.getUTCMonth()]} ${t.getUTCFullYear()} ${h0[t.getUTCHours()]}:${h0[t.getUTCMinutes()]}:${h0[t.getUTCSeconds()]} GMT`}i(hne,"toIMFDate");function t5e(t){if(t<0)throw new Error("Invalid cookie max-age")}i(t5e,"validateCookieMaxAge");function r5e(t){if(t.name.length===0)return null;mne(t.name),fne(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(t5e(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(X8e(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(Ane(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${hne(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...s]=r.split("=");e.push(`${n.trim()}=${s.join("=")}`)}return e.join("; ")}i(r5e,"stringify");gne.exports={isCTLExcludingHtab:K8e,validateCookieName:mne,validateCookiePath:Ane,validateCookieValue:fne,toIMFDate:hne,stringify:r5e}});var Ene=I((l3t,yne)=>{"use strict";var{maxNameValuePairSize:n5e,maxAttributeValueSize:s5e}=pne(),{isCTLExcludingHtab:o5e}=bU(),{collectASequenceOfCodePointsFast:g0}=ms(),i5e=require("node:assert");function a5e(t){if(o5e(t))return null;let e="",r="",n="",s="";if(t.includes(";")){let o={position:0};e=g0(";",t,o),r=t.slice(o.position)}else e=t;if(!e.includes("="))s=e;else{let o={position:0};n=g0("=",e,o),s=e.slice(o.position+1)}return n=n.trim(),s=s.trim(),n.length+s.length>n5e?null:{name:n,value:s,...xA(r)}}i(a5e,"parseSetCookie");function xA(t,e={}){if(t.length===0)return e;i5e(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=g0(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let n="",s="";if(r.includes("=")){let a={position:0};n=g0("=",r,a),s=r.slice(a.position+1)}else n=r;if(n=n.trim(),s=s.trim(),s.length>s5e)return xA(t,e);let o=n.toLowerCase();if(o==="expires"){let a=new Date(s);e.expires=a}else if(o==="max-age"){let a=s.charCodeAt(0);if((a<48||a>57)&&s[0]!=="-"||!/^\d+$/.test(s))return xA(t,e);let c=Number(s);e.maxAge=c}else if(o==="domain"){let a=s;a[0]==="."&&(a=a.slice(1)),a=a.toLowerCase(),e.domain=a}else if(o==="path"){let a="";s.length===0||s[0]!=="/"?a="/":a=s,e.path=a}else if(o==="secure")e.secure=!0;else if(o==="httponly")e.httpOnly=!0;else if(o==="samesite"){let a=s.toLowerCase();a==="none"?e.sameSite="None":a==="strict"?e.sameSite="Strict":a==="lax"&&(e.sameSite="Lax")}else e.unparsed??=[],e.unparsed.push(`${n}=${s}`);return xA(t,e)}i(xA,"parseUnparsedAttributes");yne.exports={parseSetCookie:a5e,parseUnparsedAttributes:xA}});var wne=I((d3t,Ine)=>{"use strict";var{parseSetCookie:c5e}=Ene(),{stringify:l5e}=bU(),{webidl:Ye}=sn(),{Headers:y0}=Qp();function u5e(t){Ye.argumentLengthCheck(arguments,1,"getCookies"),Ye.brandCheck(t,y0,{strict:!1});let e=t.get("cookie"),r={};if(!e)return r;for(let n of e.split(";")){let[s,...o]=n.split("=");r[s.trim()]=o.join("=")}return r}i(u5e,"getCookies");function d5e(t,e,r){Ye.brandCheck(t,y0,{strict:!1});let n="deleteCookie";Ye.argumentLengthCheck(arguments,2,n),e=Ye.converters.DOMString(e,n,"name"),r=Ye.converters.DeleteCookieAttributes(r),Cne(t,{name:e,value:"",expires:new Date(0),...r})}i(d5e,"deleteCookie");function p5e(t){Ye.argumentLengthCheck(arguments,1,"getSetCookies"),Ye.brandCheck(t,y0,{strict:!1});let e=t.getSetCookie();return e?e.map(r=>c5e(r)):[]}i(p5e,"getSetCookies");function Cne(t,e){Ye.argumentLengthCheck(arguments,2,"setCookie"),Ye.brandCheck(t,y0,{strict:!1}),e=Ye.converters.Cookie(e);let r=l5e(e);r&&t.append("Set-Cookie",r)}i(Cne,"setCookie");Ye.converters.DeleteCookieAttributes=Ye.dictionaryConverter([{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"path",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"domain",defaultValue:i(()=>null,"defaultValue")}]);Ye.converters.Cookie=Ye.dictionaryConverter([{converter:Ye.converters.DOMString,key:"name"},{converter:Ye.converters.DOMString,key:"value"},{converter:Ye.nullableConverter(t=>typeof t=="number"?Ye.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters["long long"]),key:"maxAge",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"domain",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"path",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.boolean),key:"secure",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.boolean),key:"httpOnly",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:Ye.sequenceConverter(Ye.converters.DOMString),key:"unparsed",defaultValue:i(()=>new Array(0),"defaultValue")}]);Ine.exports={getCookies:u5e,deleteCookie:d5e,getSetCookies:p5e,setCookie:Cne}});var BA=I((m3t,xne)=>{"use strict";var{webidl:ce}=sn(),{kEnumerableProperty:gs}=He(),{kConstruct:Sne}=Lt(),{MessagePort:m5e}=require("node:worker_threads"),bA=class t extends Event{static{i(this,"MessageEvent")}#e;constructor(e,r={}){if(e===Sne){super(arguments[1],arguments[2]),ce.util.markAsUncloneable(this);return}let n="MessageEvent constructor";ce.argumentLengthCheck(arguments,1,n),e=ce.converters.DOMString(e,n,"type"),r=ce.converters.MessageEventInit(r,n,"eventInitDict"),super(e,r),this.#e=r,ce.util.markAsUncloneable(this)}get data(){return ce.brandCheck(this,t),this.#e.data}get origin(){return ce.brandCheck(this,t),this.#e.origin}get lastEventId(){return ce.brandCheck(this,t),this.#e.lastEventId}get source(){return ce.brandCheck(this,t),this.#e.source}get ports(){return ce.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,n=!1,s=null,o="",a="",c=null,l=[]){return ce.brandCheck(this,t),ce.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new t(e,{bubbles:r,cancelable:n,data:s,origin:o,lastEventId:a,source:c,ports:l})}static createFastMessageEvent(e,r){let n=new t(Sne,e,r);return n.#e=r,n.#e.data??=null,n.#e.origin??="",n.#e.lastEventId??="",n.#e.source??=null,n.#e.ports??=[],n}},{createFastMessageEvent:f5e}=bA;delete bA.createFastMessageEvent;var E0=class t extends Event{static{i(this,"CloseEvent")}#e;constructor(e,r={}){let n="CloseEvent constructor";ce.argumentLengthCheck(arguments,1,n),e=ce.converters.DOMString(e,n,"type"),r=ce.converters.CloseEventInit(r),super(e,r),this.#e=r,ce.util.markAsUncloneable(this)}get wasClean(){return ce.brandCheck(this,t),this.#e.wasClean}get code(){return ce.brandCheck(this,t),this.#e.code}get reason(){return ce.brandCheck(this,t),this.#e.reason}},C0=class t extends Event{static{i(this,"ErrorEvent")}#e;constructor(e,r){let n="ErrorEvent constructor";ce.argumentLengthCheck(arguments,1,n),super(e,r),ce.util.markAsUncloneable(this),e=ce.converters.DOMString(e,n,"type"),r=ce.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return ce.brandCheck(this,t),this.#e.message}get filename(){return ce.brandCheck(this,t),this.#e.filename}get lineno(){return ce.brandCheck(this,t),this.#e.lineno}get colno(){return ce.brandCheck(this,t),this.#e.colno}get error(){return ce.brandCheck(this,t),this.#e.error}};Object.defineProperties(bA.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:gs,origin:gs,lastEventId:gs,source:gs,ports:gs,initMessageEvent:gs});Object.defineProperties(E0.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:gs,code:gs,wasClean:gs});Object.defineProperties(C0.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:gs,filename:gs,lineno:gs,colno:gs,error:gs});ce.converters.MessagePort=ce.interfaceConverter(m5e);ce.converters["sequence"]=ce.sequenceConverter(ce.converters.MessagePort);var BU=[{key:"bubbles",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"cancelable",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"composed",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")}];ce.converters.MessageEventInit=ce.dictionaryConverter([...BU,{key:"data",converter:ce.converters.any,defaultValue:i(()=>null,"defaultValue")},{key:"origin",converter:ce.converters.USVString,defaultValue:i(()=>"","defaultValue")},{key:"lastEventId",converter:ce.converters.DOMString,defaultValue:i(()=>"","defaultValue")},{key:"source",converter:ce.nullableConverter(ce.converters.MessagePort),defaultValue:i(()=>null,"defaultValue")},{key:"ports",converter:ce.converters["sequence"],defaultValue:i(()=>new Array(0),"defaultValue")}]);ce.converters.CloseEventInit=ce.dictionaryConverter([...BU,{key:"wasClean",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"code",converter:ce.converters["unsigned short"],defaultValue:i(()=>0,"defaultValue")},{key:"reason",converter:ce.converters.USVString,defaultValue:i(()=>"","defaultValue")}]);ce.converters.ErrorEventInit=ce.dictionaryConverter([...BU,{key:"message",converter:ce.converters.DOMString,defaultValue:i(()=>"","defaultValue")},{key:"filename",converter:ce.converters.USVString,defaultValue:i(()=>"","defaultValue")},{key:"lineno",converter:ce.converters["unsigned long"],defaultValue:i(()=>0,"defaultValue")},{key:"colno",converter:ce.converters["unsigned long"],defaultValue:i(()=>0,"defaultValue")},{key:"error",converter:ce.converters.any}]);xne.exports={MessageEvent:bA,CloseEvent:E0,ErrorEvent:C0,createFastMessageEvent:f5e}});var Mp=I((A3t,bne)=>{"use strict";var A5e="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",h5e={enumerable:!0,writable:!1,configurable:!1},g5e={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},y5e={NOT_SENT:0,PROCESSING:1,SENT:2},E5e={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},C5e=2**16-1,I5e={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},w5e=Buffer.allocUnsafe(0),S5e={string:1,typedArray:2,arrayBuffer:3,blob:4};bne.exports={uid:A5e,sentCloseFrameState:y5e,staticPropertyDescriptors:h5e,states:g5e,opcodes:E5e,maxUnsigned16Bit:C5e,parserStates:I5e,emptyBuffer:w5e,sendHints:S5e}});var SE=I((h3t,Bne)=>{"use strict";Bne.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var BE=I((g3t,kne)=>{"use strict";var{kReadyState:xE,kController:x5e,kResponse:b5e,kBinaryType:B5e,kWebSocketURL:R5e}=SE(),{states:bE,opcodes:_u}=Mp(),{ErrorEvent:N5e,createFastMessageEvent:T5e}=BA(),{isUtf8:v5e}=require("node:buffer"),{collectASequenceOfCodePointsFast:P5e,removeHTTPWhitespace:Rne}=ms();function Q5e(t){return t[xE]===bE.CONNECTING}i(Q5e,"isConnecting");function _5e(t){return t[xE]===bE.OPEN}i(_5e,"isEstablished");function D5e(t){return t[xE]===bE.CLOSING}i(D5e,"isClosing");function k5e(t){return t[xE]===bE.CLOSED}i(k5e,"isClosed");function RU(t,e,r=(s,o)=>new Event(s,o),n={}){let s=r(t,n);e.dispatchEvent(s)}i(RU,"fireEvent");function L5e(t,e,r){if(t[xE]!==bE.OPEN)return;let n;if(e===_u.TEXT)try{n=Dne(r)}catch{Tne(t,"Received invalid UTF-8 in text frame.");return}else e===_u.BINARY&&(t[B5e]==="blob"?n=new Blob([r]):n=O5e(r));RU("message",t,T5e,{origin:t[R5e].origin,data:n})}i(L5e,"websocketMessageReceived");function O5e(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}i(O5e,"toArrayBuffer");function M5e(t){if(t.length===0)return!1;for(let e=0;e126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125)return!1}return!0}i(M5e,"isValidSubprotocol");function F5e(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}i(F5e,"isValidStatusCode");function Tne(t,e){let{[x5e]:r,[b5e]:n}=t;r.abort(),n?.socket&&!n.socket.destroyed&&n.socket.destroy(),e&&RU("error",t,(s,o)=>new N5e(s,o),{error:new Error(e),message:e})}i(Tne,"failWebsocketConnection");function vne(t){return t===_u.CLOSE||t===_u.PING||t===_u.PONG}i(vne,"isControlFrame");function Pne(t){return t===_u.CONTINUATION}i(Pne,"isContinuationFrame");function Qne(t){return t===_u.TEXT||t===_u.BINARY}i(Qne,"isTextBinaryFrame");function U5e(t){return Qne(t)||Pne(t)||vne(t)}i(U5e,"isValidOpcode");function q5e(t){let e={position:0},r=new Map;for(;e.position57)return!1}let e=Number.parseInt(t,10);return e>=8&&e<=15}i(G5e,"isValidClientWindowBits");var _ne=typeof process.versions.icu=="string",Nne=_ne?new TextDecoder("utf-8",{fatal:!0}):void 0,Dne=_ne?Nne.decode.bind(Nne):function(t){if(v5e(t))return t.toString("utf-8");throw new TypeError("Invalid utf-8 received.")};kne.exports={isConnecting:Q5e,isEstablished:_5e,isClosing:D5e,isClosed:k5e,fireEvent:RU,isValidSubprotocol:M5e,isValidStatusCode:F5e,failWebsocketConnection:Tne,websocketMessageReceived:L5e,utf8Decode:Dne,isControlFrame:vne,isContinuationFrame:Pne,isTextBinaryFrame:Qne,isValidOpcode:U5e,parseExtensions:q5e,isValidClientWindowBits:G5e}});var w0=I((E3t,Lne)=>{"use strict";var{maxUnsigned16Bit:H5e}=Mp(),I0=16386,NU,RE=null,RA=I0;try{NU=require("node:crypto")}catch{NU={randomFillSync:i(function(e,r,n){for(let s=0;sH5e?(a+=8,o=127):s>125&&(a+=2,o=126);let c=Buffer.allocUnsafe(s+a);c[0]=c[1]=0,c[0]|=128,c[0]=(c[0]&240)+e;c[a-4]=n[0],c[a-3]=n[1],c[a-2]=n[2],c[a-1]=n[3],c[1]=o,o===126?c.writeUInt16BE(s,2):o===127&&(c[2]=c[3]=0,c.writeUIntBE(s,4,6)),c[1]|=128;for(let l=0;l{"use strict";var{uid:z5e,states:NE,sentCloseFrameState:S0,emptyBuffer:V5e,opcodes:W5e}=Mp(),{kReadyState:TE,kSentClose:x0,kByteParser:Mne,kReceivedClose:One,kResponse:Fne}=SE(),{fireEvent:Y5e,failWebsocketConnection:Du,isClosing:J5e,isClosed:j5e,isEstablished:K5e,parseExtensions:X5e}=BE(),{channels:NA}=Ff(),{CloseEvent:Z5e}=BA(),{makeRequest:eje}=CA(),{fetching:tje}=EE(),{Headers:rje,getHeadersList:nje}=Qp(),{getDecodeSplit:sje}=zs(),{WebsocketFrameSend:oje}=w0(),vU;try{vU=require("node:crypto")}catch{}function ije(t,e,r,n,s,o){let a=t;a.protocol=t.protocol==="ws:"?"http:":"https:";let c=eje({urlList:[a],client:r,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(o.headers){let p=nje(new rje(o.headers));c.headersList=p}let l=vU.randomBytes(16).toString("base64");c.headersList.append("sec-websocket-key",l),c.headersList.append("sec-websocket-version","13");for(let p of e)c.headersList.append("sec-websocket-protocol",p);return c.headersList.append("sec-websocket-extensions","permessage-deflate; client_max_window_bits"),tje({request:c,useParallelQueue:!0,dispatcher:o.dispatcher,processResponse(p){if(p.type==="error"||p.status!==101){Du(n,"Received network error or non-101 status code.");return}if(e.length!==0&&!p.headersList.get("Sec-WebSocket-Protocol")){Du(n,"Server did not respond with sent protocols.");return}if(p.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){Du(n,'Server did not set Upgrade header to "websocket".');return}if(p.headersList.get("Connection")?.toLowerCase()!=="upgrade"){Du(n,'Server did not set Connection header to "upgrade".');return}let m=p.headersList.get("Sec-WebSocket-Accept"),f=vU.createHash("sha1").update(l+z5e).digest("base64");if(m!==f){Du(n,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let A=p.headersList.get("Sec-WebSocket-Extensions"),h;if(A!==null&&(h=X5e(A),!h.has("permessage-deflate"))){Du(n,"Sec-WebSocket-Extensions header does not match.");return}let E=p.headersList.get("Sec-WebSocket-Protocol");if(E!==null&&!sje("sec-websocket-protocol",c.headersList).includes(E)){Du(n,"Protocol was not set in the opening handshake.");return}p.socket.on("data",Une),p.socket.on("close",qne),p.socket.on("error",Gne),NA.open.hasSubscribers&&NA.open.publish({address:p.socket.address(),protocol:E,extensions:A}),s(p,h)}})}i(ije,"establishWebSocketConnection");function aje(t,e,r,n){if(!(J5e(t)||j5e(t)))if(!K5e(t))Du(t,"Connection was closed before it was established."),t[TE]=NE.CLOSING;else if(t[x0]===S0.NOT_SENT){t[x0]=S0.PROCESSING;let s=new oje;e!==void 0&&r===void 0?(s.frameData=Buffer.allocUnsafe(2),s.frameData.writeUInt16BE(e,0)):e!==void 0&&r!==void 0?(s.frameData=Buffer.allocUnsafe(2+n),s.frameData.writeUInt16BE(e,0),s.frameData.write(r,2,"utf-8")):s.frameData=V5e,t[Fne].socket.write(s.createFrame(W5e.CLOSE)),t[x0]=S0.SENT,t[TE]=NE.CLOSING}else t[TE]=NE.CLOSING}i(aje,"closeWebSocketConnection");function Une(t){this.ws[Mne].write(t)||this.pause()}i(Une,"onSocketData");function qne(){let{ws:t}=this,{[Fne]:e}=t;e.socket.off("data",Une),e.socket.off("close",qne),e.socket.off("error",Gne);let r=t[x0]===S0.SENT&&t[One],n=1005,s="",o=t[Mne].closingInfo;o&&!o.error?(n=o.code??1005,s=o.reason):t[One]||(n=1006),t[TE]=NE.CLOSED,Y5e("close",t,(a,c)=>new Z5e(a,c),{wasClean:r,code:n,reason:s}),NA.close.hasSubscribers&&NA.close.publish({websocket:t,code:n,reason:s})}i(qne,"onSocketClose");function Gne(t){let{ws:e}=this;e[TE]=NE.CLOSING,NA.socketError.hasSubscribers&&NA.socketError.publish(t),this.destroy()}i(Gne,"onSocketError");Hne.exports={establishWebSocketConnection:ije,closeWebSocketConnection:aje}});var zne=I((S3t,$ne)=>{"use strict";var{createInflateRaw:cje,Z_DEFAULT_WINDOWBITS:lje}=require("node:zlib"),{isValidClientWindowBits:uje}=BE(),{MessageSizeExceededError:dje}=rt(),pje=Buffer.from([0,0,255,255]),b0=Symbol("kBuffer"),vE=Symbol("kLength"),QU=class{static{i(this,"PerMessageDeflate")}#e;#t={};#r=0;constructor(e,r){this.#t.serverNoContextTakeover=e.has("server_no_context_takeover"),this.#t.serverMaxWindowBits=e.get("server_max_window_bits"),this.#r=r.maxPayloadSize}decompress(e,r,n){if(!this.#e){let s=lje;if(this.#t.serverMaxWindowBits){if(!uje(this.#t.serverMaxWindowBits)){n(new Error("Invalid server_max_window_bits"));return}s=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=cje({windowBits:s})}catch(o){n(o);return}this.#e[b0]=[],this.#e[vE]=0,this.#e.on("data",o=>{if(this.#e[vE]+=o.length,this.#r>0&&this.#e[vE]>this.#r){n(new dje),this.#e.removeAllListeners(),this.#e=null;return}this.#e[b0].push(o)}),this.#e.on("error",o=>{this.#e=null,n(o)})}this.#e.write(e),r&&this.#e.write(pje),this.#e.flush(()=>{if(!this.#e)return;let s=Buffer.concat(this.#e[b0],this.#e[vE]);this.#e[b0].length=0,this.#e[vE]=0,n(null,s)})}};$ne.exports={PerMessageDeflate:QU}});var tse=I((b3t,ese)=>{"use strict";var{Writable:mje}=require("node:stream"),fje=require("node:assert"),{parserStates:ys,opcodes:TA,states:Aje,emptyBuffer:Vne,sentCloseFrameState:Wne}=Mp(),{kReadyState:hje,kSentClose:Yne,kResponse:Jne,kReceivedClose:jne}=SE(),{channels:B0}=Ff(),{isValidStatusCode:gje,isValidOpcode:yje,failWebsocketConnection:Zs,websocketMessageReceived:Kne,utf8Decode:Eje,isControlFrame:_U,isTextBinaryFrame:DU,isContinuationFrame:Cje}=BE(),{WebsocketFrameSend:Xne}=w0(),{closeWebSocketConnection:Zne}=PU(),{PerMessageDeflate:Ije}=zne(),{MessageSizeExceededError:kU}=rt();function PE(t,e,r){Zne(t,e,r,Buffer.byteLength(r)),Zs(t,r)}i(PE,"failWebsocketConnectionWithCode");var LU=class extends mje{static{i(this,"ByteParser")}#e=[];#t=0;#r=0;#o=!1;#s=ys.INFO;#n={};#i=[];#a;#l;#c;constructor(e,r,n={}){super(),this.ws=e,this.#a=r??new Map,this.#l=n.maxFragments??0,this.#c=n.maxPayloadSize??0,this.#a.has("permessage-deflate")&&this.#a.set("permessage-deflate",new Ije(r,n))}_write(e,r,n){this.#e.push(e),this.#r+=e.length,this.#o=!0,this.run(n)}#u(){return this.#c>0&&!_U(this.#n.opcode)&&this.#n.payloadLength+this.#t>this.#c?(PE(this.ws,1009,"Payload size exceeds maximum allowed size"),!1):!0}run(e){for(;this.#o;)if(this.#s===ys.INFO){if(this.#r<2)return e();let r=this.consume(2),n=(r[0]&128)!==0,s=r[0]&15,o=(r[1]&128)===128,a=!n&&s!==TA.CONTINUATION,c=r[1]&127,l=r[0]&64,u=r[0]&32,d=r[0]&16;if(!yje(s))return Zs(this.ws,"Invalid opcode received"),e();if(o)return Zs(this.ws,"Frame cannot be masked"),e();if(l!==0&&!this.#a.has("permessage-deflate")){Zs(this.ws,"Expected RSV1 to be clear.");return}if(u!==0||d!==0){Zs(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(a&&!DU(s)){Zs(this.ws,"Invalid frame type was fragmented.");return}if(DU(s)&&this.#i.length>0){Zs(this.ws,"Expected continuation frame");return}if(this.#n.fragmented&&a){Zs(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((c>125||a)&&_U(s)){Zs(this.ws,"Control frame either too large or fragmented");return}if(Cje(s)&&this.#i.length===0&&!this.#n.compressed){Zs(this.ws,"Unexpected continuation frame");return}if(c<=125){if(this.#n.payloadLength=c,this.#s=ys.READ_DATA,!this.#u())return}else c===126?this.#s=ys.PAYLOADLENGTH_16:c===127&&(this.#s=ys.PAYLOADLENGTH_64);DU(s)&&(this.#n.binaryType=s,this.#n.compressed=l!==0),this.#n.opcode=s,this.#n.masked=o,this.#n.fin=n,this.#n.fragmented=a}else if(this.#s===ys.PAYLOADLENGTH_16){if(this.#r<2)return e();let r=this.consume(2);if(this.#n.payloadLength=r.readUInt16BE(0),this.#s=ys.READ_DATA,!this.#u())return}else if(this.#s===ys.PAYLOADLENGTH_64){if(this.#r<8)return e();let r=this.consume(8),n=r.readUInt32BE(0),s=r.readUInt32BE(4);if(n!==0||s>2**31-1){Zs(this.ws,"Received payload length > 2^31 bytes.");return}if(this.#n.payloadLength=s,this.#s=ys.READ_DATA,!this.#u())return}else if(this.#s===ys.READ_DATA){if(this.#r{if(n){let o=n instanceof kU?1009:1007;PE(this.ws,o,n.message);return}if(this.writeFragments(s)){if(this.#c>0&&this.#t>this.#c){PE(this.ws,1009,new kU().message);return}if(!this.#n.fin){this.#s=ys.INFO,this.#o=!0,this.run(e);return}Kne(this.ws,this.#n.binaryType,this.consumeFragments()),this.#o=!0,this.#s=ys.INFO,this.run(e)}}),this.#o=!1;break}else{if(!this.writeFragments(r))return;if(this.#c>0&&this.#t>this.#c){PE(this.ws,1009,new kU().message);return}!this.#n.fragmented&&this.#n.fin&&Kne(this.ws,this.#n.binaryType,this.consumeFragments()),this.#s=ys.INFO}}}consume(e){if(e>this.#r)throw new Error("Called consume() before buffers satiated.");if(e===0)return Vne;if(this.#e[0].length===e)return this.#r-=this.#e[0].length,this.#e.shift();let r=Buffer.allocUnsafe(e),n=0;for(;n!==e;){let s=this.#e[0],{length:o}=s;if(o+n===e){r.set(this.#e.shift(),n);break}else if(o+n>e){r.set(s.subarray(0,e-n),n),this.#e[0]=s.subarray(e-n);break}else r.set(this.#e.shift(),n),n+=s.length}return this.#r-=e,r}writeFragments(e){return this.#l>0&&this.#i.length===this.#l?(PE(this.ws,1008,"Too many message fragments"),!1):(this.#t+=e.length,this.#i.push(e),!0)}consumeFragments(){let e=this.#i;if(e.length===1)return this.#t=0,e.shift();let r=Buffer.concat(e,this.#t);return this.#i=[],this.#t=0,r}parseCloseBody(e){fje(e.length!==1);let r;if(e.length>=2&&(r=e.readUInt16BE(0)),r!==void 0&&!gje(r))return{code:1002,reason:"Invalid status code",error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=Eje(n)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:r,reason:n,error:!1}}parseControlFrame(e){let{opcode:r,payloadLength:n}=this.#n;if(r===TA.CLOSE){if(n===1)return Zs(this.ws,"Received close frame with a 1-byte body."),!1;if(this.#n.closeInfo=this.parseCloseBody(e),this.#n.closeInfo.error){let{code:s,reason:o}=this.#n.closeInfo;return Zne(this.ws,s,o,o.length),Zs(this.ws,o),!1}if(this.ws[Yne]!==Wne.SENT){let s=Vne;this.#n.closeInfo.code&&(s=Buffer.allocUnsafe(2),s.writeUInt16BE(this.#n.closeInfo.code,0));let o=new Xne(s);this.ws[Jne].socket.write(o.createFrame(TA.CLOSE),a=>{a||(this.ws[Yne]=Wne.SENT)})}return this.ws[hje]=Aje.CLOSING,this.ws[jne]=!0,!1}else if(r===TA.PING){if(!this.ws[jne]){let s=new Xne(e);this.ws[Jne].socket.write(s.createFrame(TA.PONG)),B0.ping.hasSubscribers&&B0.ping.publish({payload:e})}}else r===TA.PONG&&B0.pong.hasSubscribers&&B0.pong.publish({payload:e});return!0}get closingInfo(){return this.#n.closeInfo}};ese.exports={ByteParser:LU}});var ise=I((R3t,ose)=>{"use strict";var{WebsocketFrameSend:wje}=w0(),{opcodes:rse,sendHints:vA}=Mp(),Sje=$F(),nse=Buffer[Symbol.species],OU=class{static{i(this,"SendQueue")}#e=new Sje;#t=!1;#r;constructor(e){this.#r=e}add(e,r,n){if(n!==vA.blob){let o=sse(e,n);if(!this.#t)this.#r.write(o,r);else{let a={promise:null,callback:r,frame:o};this.#e.push(a)}return}let s={promise:e.arrayBuffer().then(o=>{s.promise=null,s.frame=sse(o,n)}),callback:r,frame:null};this.#e.push(s),this.#t||this.#o()}async#o(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let r=e.shift();r.promise!==null&&await r.promise,this.#r.write(r.frame,r.callback),r.callback=r.frame=null}this.#t=!1}};function sse(t,e){return new wje(xje(t,e)).createFrame(e===vA.string?rse.TEXT:rse.BINARY)}i(sse,"createFrame");function xje(t,e){switch(e){case vA.string:return Buffer.from(t);case vA.arrayBuffer:case vA.blob:return new nse(t);case vA.typedArray:return new nse(t.buffer,t.byteOffset,t.byteLength)}}i(xje,"toBuffer");ose.exports={SendQueue:OU}});var hse=I((T3t,Ase)=>{"use strict";var{webidl:xe}=sn(),{URLSerializer:bje}=ms(),{environmentSettingsObject:ase}=zs(),{staticPropertyDescriptors:ku,states:QE,sentCloseFrameState:Bje,sendHints:R0}=Mp(),{kWebSocketURL:cse,kReadyState:MU,kController:lse,kBinaryType:N0,kResponse:use,kSentClose:Rje,kByteParser:Nje}=SE(),{isConnecting:Tje,isEstablished:vje,isClosing:Pje,isValidSubprotocol:Qje,fireEvent:dse}=BE(),{establishWebSocketConnection:_je,closeWebSocketConnection:pse}=PU(),{ByteParser:Dje}=tse(),{kEnumerableProperty:ko,isBlobLike:mse}=He(),{getGlobalDispatcher:kje}=Hb(),{types:fse}=require("node:util"),{ErrorEvent:Lje,CloseEvent:Oje}=BA(),{SendQueue:Mje}=ise(),eo=class t extends EventTarget{static{i(this,"WebSocket")}#e={open:null,error:null,close:null,message:null};#t=0;#r="";#o="";#s;constructor(e,r=[]){super(),xe.util.markAsUncloneable(this);let n="WebSocket constructor";xe.argumentLengthCheck(arguments,1,n);let s=xe.converters["DOMString or sequence or WebSocketInit"](r,n,"options");e=xe.converters.USVString(e,n,"url"),r=s.protocols;let o=ase.settingsObject.baseUrl,a;try{a=new URL(e,o)}catch(l){throw new DOMException(l,"SyntaxError")}if(a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),a.protocol!=="ws:"&&a.protocol!=="wss:")throw new DOMException(`Expected a ws: or wss: protocol, got ${a.protocol}`,"SyntaxError");if(a.hash||a.href.endsWith("#"))throw new DOMException("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(l=>l.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(l=>Qje(l)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[cse]=new URL(a.href);let c=ase.settingsObject;this[lse]=_je(a,r,c,this,(l,u)=>this.#n(l,u),s),this[MU]=t.CONNECTING,this[Rje]=Bje.NOT_SENT,this[N0]="blob"}close(e=void 0,r=void 0){xe.brandCheck(this,t);let n="WebSocket.close";if(e!==void 0&&(e=xe.converters["unsigned short"](e,n,"code",{clamp:!0})),r!==void 0&&(r=xe.converters.USVString(r,n,"reason")),e!==void 0&&e!==1e3&&(e<3e3||e>4999))throw new DOMException("invalid code","InvalidAccessError");let s=0;if(r!==void 0&&(s=Buffer.byteLength(r),s>123))throw new DOMException(`Reason must be less than 123 bytes; received ${s}`,"SyntaxError");pse(this,e,r,s)}send(e){xe.brandCheck(this,t);let r="WebSocket.send";if(xe.argumentLengthCheck(arguments,1,r),e=xe.converters.WebSocketSendData(e,r,"data"),Tje(this))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!vje(this)||Pje(this)))if(typeof e=="string"){let n=Buffer.byteLength(e);this.#t+=n,this.#s.add(e,()=>{this.#t-=n},R0.string)}else fse.isArrayBuffer(e)?(this.#t+=e.byteLength,this.#s.add(e,()=>{this.#t-=e.byteLength},R0.arrayBuffer)):ArrayBuffer.isView(e)?(this.#t+=e.byteLength,this.#s.add(e,()=>{this.#t-=e.byteLength},R0.typedArray)):mse(e)&&(this.#t+=e.size,this.#s.add(e,()=>{this.#t-=e.size},R0.blob))}get readyState(){return xe.brandCheck(this,t),this[MU]}get bufferedAmount(){return xe.brandCheck(this,t),this.#t}get url(){return xe.brandCheck(this,t),bje(this[cse])}get extensions(){return xe.brandCheck(this,t),this.#o}get protocol(){return xe.brandCheck(this,t),this.#r}get onopen(){return xe.brandCheck(this,t),this.#e.open}set onopen(e){xe.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onerror(){return xe.brandCheck(this,t),this.#e.error}set onerror(e){xe.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}get onclose(){return xe.brandCheck(this,t),this.#e.close}set onclose(e){xe.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close),typeof e=="function"?(this.#e.close=e,this.addEventListener("close",e)):this.#e.close=null}get onmessage(){return xe.brandCheck(this,t),this.#e.message}set onmessage(e){xe.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get binaryType(){return xe.brandCheck(this,t),this[N0]}set binaryType(e){xe.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this[N0]="blob":this[N0]=e}#n(e,r){this[use]=e;let n=this[lse]?.dispatcher?.webSocketOptions,s=n?.maxFragments,o=n?.maxPayloadSize,a=new Dje(this,r,{maxFragments:s,maxPayloadSize:o});a.on("drain",Fje),a.on("error",Uje.bind(this)),e.socket.ws=this,this[Nje]=a,this.#s=new Mje(e.socket),this[MU]=QE.OPEN;let c=e.headersList.get("sec-websocket-extensions");c!==null&&(this.#o=c);let l=e.headersList.get("sec-websocket-protocol");l!==null&&(this.#r=l),dse("open",this)}};eo.CONNECTING=eo.prototype.CONNECTING=QE.CONNECTING;eo.OPEN=eo.prototype.OPEN=QE.OPEN;eo.CLOSING=eo.prototype.CLOSING=QE.CLOSING;eo.CLOSED=eo.prototype.CLOSED=QE.CLOSED;Object.defineProperties(eo.prototype,{CONNECTING:ku,OPEN:ku,CLOSING:ku,CLOSED:ku,url:ko,readyState:ko,bufferedAmount:ko,onopen:ko,onerror:ko,onclose:ko,close:ko,onmessage:ko,binaryType:ko,send:ko,extensions:ko,protocol:ko,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(eo,{CONNECTING:ku,OPEN:ku,CLOSING:ku,CLOSED:ku});xe.converters["sequence"]=xe.sequenceConverter(xe.converters.DOMString);xe.converters["DOMString or sequence"]=function(t,e,r){return xe.util.Type(t)==="Object"&&Symbol.iterator in t?xe.converters["sequence"](t):xe.converters.DOMString(t,e,r)};xe.converters.WebSocketInit=xe.dictionaryConverter([{key:"protocols",converter:xe.converters["DOMString or sequence"],defaultValue:i(()=>new Array(0),"defaultValue")},{key:"dispatcher",converter:xe.converters.any,defaultValue:i(()=>kje(),"defaultValue")},{key:"headers",converter:xe.nullableConverter(xe.converters.HeadersInit)}]);xe.converters["DOMString or sequence or WebSocketInit"]=function(t){return xe.util.Type(t)==="Object"&&!(Symbol.iterator in t)?xe.converters.WebSocketInit(t):{protocols:xe.converters["DOMString or sequence"](t)}};xe.converters.WebSocketSendData=function(t){if(xe.util.Type(t)==="Object"){if(mse(t))return xe.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||fse.isArrayBuffer(t))return xe.converters.BufferSource(t)}return xe.converters.USVString(t)};function Fje(){this.ws[use].socket.resume()}i(Fje,"onParserDrain");function Uje(t){let e,r;t instanceof Oje?(e=t.reason,r=t.code):e=t.message,dse("error",this,()=>new Lje("error",{error:t,message:e})),pse(this,r)}i(Uje,"onParserError");Ase.exports={WebSocket:eo}});var FU=I((P3t,gse)=>{"use strict";function qje(t){return t.indexOf("\0")===-1}i(qje,"isValidLastEventId");function Gje(t){if(t.length===0)return!1;for(let e=0;e57)return!1;return!0}i(Gje,"isASCIINumber");function Hje(t){return new Promise(e=>{setTimeout(e,t).unref()})}i(Hje,"delay");gse.exports={isValidLastEventId:qje,isASCIINumber:Gje,delay:Hje}});var Ise=I((_3t,Cse)=>{"use strict";var{Transform:$je}=require("node:stream"),{isASCIINumber:yse,isValidLastEventId:Ese}=FU(),Sl=[239,187,191],UU=10,T0=13,zje=58,Vje=32,qU=class extends $je{static{i(this,"EventSourceStream")}state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,r,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===Sl[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===Sl[0]&&this.buffer[1]===Sl[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===Sl[0]&&this.buffer[1]===Sl[1]&&this.buffer[2]===Sl[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===Sl[0]&&this.buffer[1]===Sl[1]&&this.buffer[2]===Sl[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(r[s]=o);break}}processEvent(e){e.retry&&yse(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Ese(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};Cse.exports={EventSourceStream:qU}});var Tse=I((k3t,Nse)=>{"use strict";var{pipeline:Wje}=require("node:stream"),{fetching:Yje}=EE(),{makeRequest:Jje}=CA(),{webidl:xl}=sn(),{EventSourceStream:jje}=Ise(),{parseMIMEType:Kje}=ms(),{createFastMessageEvent:Xje}=BA(),{isNetworkError:wse}=gE(),{delay:Zje}=FU(),{kEnumerableProperty:Fp}=He(),{environmentSettingsObject:Sse}=zs(),xse=!1,bse=3e3,_E=0,Bse=1,DE=2,e6e="anonymous",t6e="use-credentials",PA=class t extends EventTarget{static{i(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#r=!1;#o=_E;#s=null;#n=null;#i;#a;constructor(e,r={}){super(),xl.util.markAsUncloneable(this);let n="EventSource constructor";xl.argumentLengthCheck(arguments,1,n),xse||(xse=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=xl.converters.USVString(e,n,"url"),r=xl.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#i=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:bse};let s=Sse,o;try{o=new URL(e,s.settingsObject.baseUrl),this.#a.origin=o.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=o.href;let a=e6e;r.withCredentials&&(a=t6e,this.#r=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=Sse.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#s=Jje(c),this.#l()}get readyState(){return this.#o}get url(){return this.#t}get withCredentials(){return this.#r}#l(){if(this.#o===DE)return;this.#o=_E;let e={request:this.#s,dispatcher:this.#i},r=i(n=>{wse(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(wse(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),o=s!==null?Kje(s):"failure",a=o!=="failure"&&o.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#o=Bse,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let c=new jje({eventSourceSettings:this.#a,push:i(l=>{this.dispatchEvent(Xje(l.type,l.options))},"push")});Wje(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#n=Yje(e)}async#c(){this.#o!==DE&&(this.#o=_E,this.dispatchEvent(new Event("error")),await Zje(this.#a.reconnectionTime),this.#o===_E&&(this.#a.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#l()))}close(){xl.brandCheck(this,t),this.#o!==DE&&(this.#o=DE,this.#n.abort(),this.#s=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},Rse={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:_E,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Bse,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:DE,writable:!1}};Object.defineProperties(PA,Rse);Object.defineProperties(PA.prototype,Rse);Object.defineProperties(PA.prototype,{close:Fp,onerror:Fp,onmessage:Fp,onopen:Fp,readyState:Fp,url:Fp,withCredentials:Fp});xl.converters.EventSourceInitDict=xl.dictionaryConverter([{key:"withCredentials",converter:xl.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"dispatcher",converter:xl.converters.any}]);Nse.exports={EventSource:PA,defaultReconnectionTime:bse}});var Up=I((O3t,Ie)=>{"use strict";var r6e=oA(),vse=Oy(),n6e=iA(),s6e=RZ(),o6e=aA(),i6e=u1(),a6e=KZ(),c6e=nee(),Pse=rt(),P0=He(),{InvalidArgumentError:v0}=Pse,QA=Hee(),l6e=Fy(),u6e=z1(),d6e=bte(),p6e=Y1(),m6e=Q1(),f6e=_b(),{getGlobalDispatcher:Qse,setGlobalDispatcher:A6e}=Hb(),h6e=$b(),g6e=wb(),y6e=Sb();Object.assign(vse.prototype,QA);Ie.exports.Dispatcher=vse;Ie.exports.Client=r6e;Ie.exports.Pool=n6e;Ie.exports.BalancedPool=s6e;Ie.exports.Agent=o6e;Ie.exports.ProxyAgent=i6e;Ie.exports.EnvHttpProxyAgent=a6e;Ie.exports.RetryAgent=c6e;Ie.exports.RetryHandler=f6e;Ie.exports.DecoratorHandler=h6e;Ie.exports.RedirectHandler=g6e;Ie.exports.createRedirectInterceptor=y6e;Ie.exports.interceptors={redirect:Qte(),retry:Dte(),dump:Lte(),dns:Fte()};Ie.exports.buildConnector=l6e;Ie.exports.errors=Pse;Ie.exports.util={parseHeaders:P0.parseHeaders,headerNameToString:P0.headerNameToString};function kE(t){return(e,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new v0("invalid url");if(r!=null&&typeof r!="object")throw new v0("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new v0("invalid opts.path");let a=r.path;r.path.startsWith("/")||(a=`/${a}`),e=new URL(P0.parseOrigin(e).origin+a)}else r||(r=typeof e=="object"?e:{}),e=P0.parseURL(e);let{agent:s,dispatcher:o=Qse()}=r;if(s)throw new v0("unsupported opts.agent. Did you mean opts.client?");return t.call(o,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}i(kE,"makeDispatcher");Ie.exports.setGlobalDispatcher=A6e;Ie.exports.getGlobalDispatcher=Qse;var E6e=EE().fetch;Ie.exports.fetch=i(async function(e,r=void 0){try{return await E6e(e,r)}catch(n){throw n&&typeof n=="object"&&Error.captureStackTrace(n),n}},"fetch");Ie.exports.Headers=Qp().Headers;Ie.exports.Response=gE().Response;Ie.exports.Request=CA().Request;Ie.exports.FormData=Vy().FormData;Ie.exports.File=globalThis.File??require("node:buffer").File;Ie.exports.FileReader=tne().FileReader;var{setGlobalOrigin:C6e,getGlobalOrigin:I6e}=dF();Ie.exports.setGlobalOrigin=C6e;Ie.exports.getGlobalOrigin=I6e;var{CacheStorage:w6e}=une(),{kConstruct:S6e}=d0();Ie.exports.caches=new w6e(S6e);var{deleteCookie:x6e,getCookies:b6e,getSetCookies:B6e,setCookie:R6e}=wne();Ie.exports.deleteCookie=x6e;Ie.exports.getCookies=b6e;Ie.exports.getSetCookies=B6e;Ie.exports.setCookie=R6e;var{parseMIMEType:N6e,serializeAMimeType:T6e}=ms();Ie.exports.parseMIMEType=N6e;Ie.exports.serializeAMimeType=T6e;var{CloseEvent:v6e,ErrorEvent:P6e,MessageEvent:Q6e}=BA();Ie.exports.WebSocket=hse().WebSocket;Ie.exports.CloseEvent=v6e;Ie.exports.ErrorEvent=P6e;Ie.exports.MessageEvent=Q6e;Ie.exports.request=kE(QA.request);Ie.exports.stream=kE(QA.stream);Ie.exports.pipeline=kE(QA.pipeline);Ie.exports.connect=kE(QA.connect);Ie.exports.upgrade=kE(QA.upgrade);Ie.exports.MockClient=u6e;Ie.exports.MockPool=p6e;Ie.exports.MockAgent=d6e;Ie.exports.mockErrors=m6e;var{EventSource:_6e}=Tse();Ie.exports.EventSource=_6e});var VE=I((g4t,Aoe)=>{"use strict";var a9e="2.0.0",c9e=Number.MAX_SAFE_INTEGER||9007199254740991,l9e=16,u9e=250,d9e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Aoe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:l9e,MAX_SAFE_BUILD_LENGTH:u9e,MAX_SAFE_INTEGER:c9e,RELEASE_TYPES:d9e,SEMVER_SPEC_VERSION:a9e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var WE=I((y4t,hoe)=>{"use strict";var p9e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};hoe.exports=p9e});var LA=I((ka,goe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:c2,MAX_SAFE_BUILD_LENGTH:m9e,MAX_LENGTH:f9e}=VE(),A9e=WE();ka=goe.exports={};var h9e=ka.re=[],g9e=ka.safeRe=[],H=ka.src=[],y9e=ka.safeSrc=[],$=ka.t={},E9e=0,l2="[a-zA-Z0-9-]",C9e=[["\\s",1],["\\d",f9e],[l2,m9e]],I9e=i(t=>{for(let[e,r]of C9e)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),_e=i((t,e,r)=>{let n=I9e(e),s=E9e++;A9e(t,s,e),$[t]=s,H[s]=e,y9e[s]=n,h9e[s]=new RegExp(e,r?"g":void 0),g9e[s]=new RegExp(n,r?"g":void 0)},"createToken");_e("NUMERICIDENTIFIER","0|[1-9]\\d*");_e("NUMERICIDENTIFIERLOOSE","\\d+");_e("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l2}*`);_e("MAINVERSION",`(${H[$.NUMERICIDENTIFIER]})\\.(${H[$.NUMERICIDENTIFIER]})\\.(${H[$.NUMERICIDENTIFIER]})`);_e("MAINVERSIONLOOSE",`(${H[$.NUMERICIDENTIFIERLOOSE]})\\.(${H[$.NUMERICIDENTIFIERLOOSE]})\\.(${H[$.NUMERICIDENTIFIERLOOSE]})`);_e("PRERELEASEIDENTIFIER",`(?:${H[$.NONNUMERICIDENTIFIER]}|${H[$.NUMERICIDENTIFIER]})`);_e("PRERELEASEIDENTIFIERLOOSE",`(?:${H[$.NONNUMERICIDENTIFIER]}|${H[$.NUMERICIDENTIFIERLOOSE]})`);_e("PRERELEASE",`(?:-(${H[$.PRERELEASEIDENTIFIER]}(?:\\.${H[$.PRERELEASEIDENTIFIER]})*))`);_e("PRERELEASELOOSE",`(?:-?(${H[$.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${H[$.PRERELEASEIDENTIFIERLOOSE]})*))`);_e("BUILDIDENTIFIER",`${l2}+`);_e("BUILD",`(?:\\+(${H[$.BUILDIDENTIFIER]}(?:\\.${H[$.BUILDIDENTIFIER]})*))`);_e("FULLPLAIN",`v?${H[$.MAINVERSION]}${H[$.PRERELEASE]}?${H[$.BUILD]}?`);_e("FULL",`^${H[$.FULLPLAIN]}$`);_e("LOOSEPLAIN",`[v=\\s]*${H[$.MAINVERSIONLOOSE]}${H[$.PRERELEASELOOSE]}?${H[$.BUILD]}?`);_e("LOOSE",`^${H[$.LOOSEPLAIN]}$`);_e("GTLT","((?:<|>)?=?)");_e("XRANGEIDENTIFIERLOOSE",`${H[$.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);_e("XRANGEIDENTIFIER",`${H[$.NUMERICIDENTIFIER]}|x|X|\\*`);_e("XRANGEPLAIN",`[v=\\s]*(${H[$.XRANGEIDENTIFIER]})(?:\\.(${H[$.XRANGEIDENTIFIER]})(?:\\.(${H[$.XRANGEIDENTIFIER]})(?:${H[$.PRERELEASE]})?${H[$.BUILD]}?)?)?`);_e("XRANGEPLAINLOOSE",`[v=\\s]*(${H[$.XRANGEIDENTIFIERLOOSE]})(?:\\.(${H[$.XRANGEIDENTIFIERLOOSE]})(?:\\.(${H[$.XRANGEIDENTIFIERLOOSE]})(?:${H[$.PRERELEASELOOSE]})?${H[$.BUILD]}?)?)?`);_e("XRANGE",`^${H[$.GTLT]}\\s*${H[$.XRANGEPLAIN]}$`);_e("XRANGELOOSE",`^${H[$.GTLT]}\\s*${H[$.XRANGEPLAINLOOSE]}$`);_e("COERCEPLAIN",`(^|[^\\d])(\\d{1,${c2}})(?:\\.(\\d{1,${c2}}))?(?:\\.(\\d{1,${c2}}))?`);_e("COERCE",`${H[$.COERCEPLAIN]}(?:$|[^\\d])`);_e("COERCEFULL",H[$.COERCEPLAIN]+`(?:${H[$.PRERELEASE]})?(?:${H[$.BUILD]})?(?:$|[^\\d])`);_e("COERCERTL",H[$.COERCE],!0);_e("COERCERTLFULL",H[$.COERCEFULL],!0);_e("LONETILDE","(?:~>?)");_e("TILDETRIM",`(\\s*)${H[$.LONETILDE]}\\s+`,!0);ka.tildeTrimReplace="$1~";_e("TILDE",`^${H[$.LONETILDE]}${H[$.XRANGEPLAIN]}$`);_e("TILDELOOSE",`^${H[$.LONETILDE]}${H[$.XRANGEPLAINLOOSE]}$`);_e("LONECARET","(?:\\^)");_e("CARETTRIM",`(\\s*)${H[$.LONECARET]}\\s+`,!0);ka.caretTrimReplace="$1^";_e("CARET",`^${H[$.LONECARET]}${H[$.XRANGEPLAIN]}$`);_e("CARETLOOSE",`^${H[$.LONECARET]}${H[$.XRANGEPLAINLOOSE]}$`);_e("COMPARATORLOOSE",`^${H[$.GTLT]}\\s*(${H[$.LOOSEPLAIN]})$|^$`);_e("COMPARATOR",`^${H[$.GTLT]}\\s*(${H[$.FULLPLAIN]})$|^$`);_e("COMPARATORTRIM",`(\\s*)${H[$.GTLT]}\\s*(${H[$.LOOSEPLAIN]}|${H[$.XRANGEPLAIN]})`,!0);ka.comparatorTrimReplace="$1$2$3";_e("HYPHENRANGE",`^\\s*(${H[$.XRANGEPLAIN]})\\s+-\\s+(${H[$.XRANGEPLAIN]})\\s*$`);_e("HYPHENRANGELOOSE",`^\\s*(${H[$.XRANGEPLAINLOOSE]})\\s+-\\s+(${H[$.XRANGEPLAINLOOSE]})\\s*$`);_e("STAR","(<|>)?=?\\s*\\*");_e("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");_e("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var U0=I((C4t,yoe)=>{"use strict";var w9e=Object.freeze({loose:!0}),S9e=Object.freeze({}),x9e=i(t=>t?typeof t!="object"?w9e:t:S9e,"parseOptions");yoe.exports=x9e});var u2=I((w4t,Ioe)=>{"use strict";var Eoe=/^[0-9]+$/,Coe=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:tCoe(e,t),"rcompareIdentifiers");Ioe.exports={compareIdentifiers:Coe,rcompareIdentifiers:b9e}});var bn=I((x4t,Soe)=>{"use strict";var q0=WE(),{MAX_LENGTH:woe,MAX_SAFE_INTEGER:G0}=VE(),{safeRe:H0,t:$0}=LA(),B9e=U0(),{compareIdentifiers:d2}=u2(),p2=class t{static{i(this,"SemVer")}constructor(e,r){if(r=B9e(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>woe)throw new TypeError(`version is longer than ${woe} characters`);q0("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?H0[$0.LOOSE]:H0[$0.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>G0||this.major<0)throw new TypeError("Invalid major version");if(this.minor>G0||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>G0||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&oe.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(q0("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return d2(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(q0("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return d2(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?H0[$0.PRERELEASELOOSE]:H0[$0.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),d2(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Soe.exports=p2});var Vp=I((B4t,boe)=>{"use strict";var xoe=bn(),R9e=i((t,e,r=!1)=>{if(t instanceof xoe)return t;try{return new xoe(t,e)}catch(n){if(!r)return null;throw n}},"parse");boe.exports=R9e});var Roe=I((N4t,Boe)=>{"use strict";var N9e=Vp(),T9e=i((t,e)=>{let r=N9e(t,e);return r?r.version:null},"valid");Boe.exports=T9e});var Toe=I((v4t,Noe)=>{"use strict";var v9e=Vp(),P9e=i((t,e)=>{let r=v9e(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");Noe.exports=P9e});var Qoe=I((Q4t,Poe)=>{"use strict";var voe=bn(),Q9e=i((t,e,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new voe(t instanceof voe?t.version:t,r).inc(e,n,s).version}catch{return null}},"inc");Poe.exports=Q9e});var koe=I((D4t,Doe)=>{"use strict";var _oe=Vp(),_9e=i((t,e)=>{let r=_oe(t,null,!0),n=_oe(e,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,a=o?r:n,c=o?n:r,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"},"diff");Doe.exports=_9e});var Ooe=I((L4t,Loe)=>{"use strict";var D9e=bn(),k9e=i((t,e)=>new D9e(t,e).major,"major");Loe.exports=k9e});var Foe=I((M4t,Moe)=>{"use strict";var L9e=bn(),O9e=i((t,e)=>new L9e(t,e).minor,"minor");Moe.exports=O9e});var qoe=I((U4t,Uoe)=>{"use strict";var M9e=bn(),F9e=i((t,e)=>new M9e(t,e).patch,"patch");Uoe.exports=F9e});var Hoe=I((G4t,Goe)=>{"use strict";var U9e=Vp(),q9e=i((t,e)=>{let r=U9e(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");Goe.exports=q9e});var Oo=I(($4t,zoe)=>{"use strict";var $oe=bn(),G9e=i((t,e,r)=>new $oe(t,r).compare(new $oe(e,r)),"compare");zoe.exports=G9e});var Woe=I((V4t,Voe)=>{"use strict";var H9e=Oo(),$9e=i((t,e,r)=>H9e(e,t,r),"rcompare");Voe.exports=$9e});var Joe=I((Y4t,Yoe)=>{"use strict";var z9e=Oo(),V9e=i((t,e)=>z9e(t,e,!0),"compareLoose");Yoe.exports=V9e});var z0=I((j4t,Koe)=>{"use strict";var joe=bn(),W9e=i((t,e,r)=>{let n=new joe(t,r),s=new joe(e,r);return n.compare(s)||n.compareBuild(s)},"compareBuild");Koe.exports=W9e});var Zoe=I((X4t,Xoe)=>{"use strict";var Y9e=z0(),J9e=i((t,e)=>t.sort((r,n)=>Y9e(r,n,e)),"sort");Xoe.exports=J9e});var tie=I((eWt,eie)=>{"use strict";var j9e=z0(),K9e=i((t,e)=>t.sort((r,n)=>j9e(n,r,e)),"rsort");eie.exports=K9e});var YE=I((rWt,rie)=>{"use strict";var X9e=Oo(),Z9e=i((t,e,r)=>X9e(t,e,r)>0,"gt");rie.exports=Z9e});var V0=I((sWt,nie)=>{"use strict";var eKe=Oo(),tKe=i((t,e,r)=>eKe(t,e,r)<0,"lt");nie.exports=tKe});var m2=I((iWt,sie)=>{"use strict";var rKe=Oo(),nKe=i((t,e,r)=>rKe(t,e,r)===0,"eq");sie.exports=nKe});var f2=I((cWt,oie)=>{"use strict";var sKe=Oo(),oKe=i((t,e,r)=>sKe(t,e,r)!==0,"neq");oie.exports=oKe});var W0=I((uWt,iie)=>{"use strict";var iKe=Oo(),aKe=i((t,e,r)=>iKe(t,e,r)>=0,"gte");iie.exports=aKe});var Y0=I((pWt,aie)=>{"use strict";var cKe=Oo(),lKe=i((t,e,r)=>cKe(t,e,r)<=0,"lte");aie.exports=lKe});var A2=I((fWt,cie)=>{"use strict";var uKe=m2(),dKe=f2(),pKe=YE(),mKe=W0(),fKe=V0(),AKe=Y0(),hKe=i((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return uKe(t,r,n);case"!=":return dKe(t,r,n);case">":return pKe(t,r,n);case">=":return mKe(t,r,n);case"<":return fKe(t,r,n);case"<=":return AKe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");cie.exports=hKe});var uie=I((hWt,lie)=>{"use strict";var gKe=bn(),yKe=Vp(),{safeRe:J0,t:j0}=LA(),EKe=i((t,e)=>{if(t instanceof gKe)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?J0[j0.COERCEFULL]:J0[j0.COERCE]);else{let l=e.includePrerelease?J0[j0.COERCERTLFULL]:J0[j0.COERCERTL],u;for(;(u=l.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return yKe(`${n}.${s}.${o}${a}${c}`,e)},"coerce");lie.exports=EKe});var pie=I((yWt,die)=>{"use strict";var h2=class{static{i(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,r)}return this}};die.exports=h2});var Mo=I((CWt,hie)=>{"use strict";var CKe=/\s+/g,g2=class t{static{i(this,"Range")}constructor(e,r){if(r=wKe(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof y2)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(CKe," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!fie(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&TKe(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&RKe)|(this.options.loose&&NKe))+":"+e,s=mie.get(n);if(s)return s;let o=this.options.loose,a=o?$n[Bn.HYPHENRANGELOOSE]:$n[Bn.HYPHENRANGE];e=e.replace(a,FKe(this.options.includePrerelease)),vt("hyphen replace",e),e=e.replace($n[Bn.COMPARATORTRIM],xKe),vt("comparator trim",e),e=e.replace($n[Bn.TILDETRIM],bKe),vt("tilde trim",e),e=e.replace($n[Bn.CARETTRIM],BKe),vt("caret trim",e);let c=e.split(" ").map(p=>vKe(p,this.options)).join(" ").split(/\s+/).map(p=>MKe(p,this.options));o&&(c=c.filter(p=>(vt("loose invalid filter",p,this.options),!!p.match($n[Bn.COMPARATORLOOSE])))),vt("range list",c);let l=new Map,u=c.map(p=>new y2(p,this.options));for(let p of u){if(fie(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return mie.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Aie(n,r)&&e.set.some(s=>Aie(s,r)&&n.every(o=>s.every(a=>o.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new SKe(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),TKe=i(t=>t.value==="","isAny"),Aie=i((t,e)=>{let r=!0,n=t.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,e)),s=n.pop();return r},"isSatisfiable"),vKe=i((t,e)=>(t=t.replace($n[Bn.BUILD],""),vt("comp",t,e),t=_Ke(t,e),vt("caret",t),t=PKe(t,e),vt("tildes",t),t=kKe(t,e),vt("xrange",t),t=OKe(t,e),vt("stars",t),t),"parseComparator"),zn=i(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),PKe=i((t,e)=>t.trim().split(/\s+/).map(r=>QKe(r,e)).join(" "),"replaceTildes"),QKe=i((t,e)=>{let r=e.loose?$n[Bn.TILDELOOSE]:$n[Bn.TILDE];return t.replace(r,(n,s,o,a,c)=>{vt("tilde",t,n,s,o,a,c);let l;return zn(s)?l="":zn(o)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:zn(a)?l=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:c?(vt("replaceTilde pr",c),l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,vt("tilde return",l),l})},"replaceTilde"),_Ke=i((t,e)=>t.trim().split(/\s+/).map(r=>DKe(r,e)).join(" "),"replaceCarets"),DKe=i((t,e)=>{vt("caret",t,e);let r=e.loose?$n[Bn.CARETLOOSE]:$n[Bn.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{vt("caret",t,s,o,a,c,l);let u;return zn(o)?u="":zn(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:zn(c)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:l?(vt("replaceCaret pr",l),o==="0"?a==="0"?u=`>=${o}.${a}.${c}-${l} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c}-${l} <${+o+1}.0.0-0`):(vt("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${c}${n} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`),vt("caret return",u),u})},"replaceCaret"),kKe=i((t,e)=>(vt("replaceXRanges",t,e),t.split(/\s+/).map(r=>LKe(r,e)).join(" ")),"replaceXRanges"),LKe=i((t,e)=>{t=t.trim();let r=e.loose?$n[Bn.XRANGELOOSE]:$n[Bn.XRANGE];return t.replace(r,(n,s,o,a,c,l)=>{vt("xRange",t,n,s,o,a,c,l);let u=zn(o),d=u||zn(a),p=d||zn(c),m=p;return s==="="&&m&&(s=""),l=e.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(d&&(a=0),c=0,s===">"?(s=">=",d?(o=+o+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",d?o=+o+1:a=+a+1),s==="<"&&(l="-0"),n=`${s+o}.${a}.${c}${l}`):d?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),vt("xRange return",n),n})},"replaceXRange"),OKe=i((t,e)=>(vt("replaceStars",t,e),t.trim().replace($n[Bn.STAR],"")),"replaceStars"),MKe=i((t,e)=>(vt("replaceGTE0",t,e),t.trim().replace($n[e.includePrerelease?Bn.GTE0PRE:Bn.GTE0],"")),"replaceGTE0"),FKe=i(t=>(e,r,n,s,o,a,c,l,u,d,p,m)=>(zn(n)?r="":zn(s)?r=`>=${n}.0.0${t?"-0":""}`:zn(o)?r=`>=${n}.${s}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,zn(u)?l="":zn(d)?l=`<${+u+1}.0.0-0`:zn(p)?l=`<${u}.${+d+1}.0-0`:m?l=`<=${u}.${d}.${p}-${m}`:t?l=`<${u}.${d}.${+p+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),"hyphenReplace"),UKe=i((t,e,r)=>{for(let n=0;n0){let s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0},"testSet")});var JE=I((wWt,wie)=>{"use strict";var jE=Symbol("SemVer ANY"),I2=class t{static{i(this,"Comparator")}static get ANY(){return jE}constructor(e,r){if(r=gie(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),C2("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===jE?this.value="":this.value=this.operator+this.semver.version,C2("comp",this)}parse(e){let r=this.options.loose?yie[Eie.COMPARATORLOOSE]:yie[Eie.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Cie(n[2],this.options.loose):this.semver=jE}toString(){return this.value}test(e){if(C2("Comparator.test",e,this.options.loose),this.semver===jE||e===jE)return!0;if(typeof e=="string")try{e=new Cie(e,this.options)}catch{return!1}return E2(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Iie(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Iie(this.value,r).test(e.semver):(r=gie(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||E2(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||E2(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};wie.exports=I2;var gie=U0(),{safeRe:yie,t:Eie}=LA(),E2=A2(),C2=WE(),Cie=bn(),Iie=Mo()});var KE=I((xWt,Sie)=>{"use strict";var qKe=Mo(),GKe=i((t,e,r)=>{try{e=new qKe(e,r)}catch{return!1}return e.test(t)},"satisfies");Sie.exports=GKe});var bie=I((BWt,xie)=>{"use strict";var HKe=Mo(),$Ke=i((t,e)=>new HKe(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");xie.exports=$Ke});var Rie=I((NWt,Bie)=>{"use strict";var zKe=bn(),VKe=Mo(),WKe=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new VKe(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new zKe(n,r))}),n},"maxSatisfying");Bie.exports=WKe});var Tie=I((vWt,Nie)=>{"use strict";var YKe=bn(),JKe=Mo(),jKe=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new JKe(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new YKe(n,r))}),n},"minSatisfying");Nie.exports=jKe});var Qie=I((QWt,Pie)=>{"use strict";var w2=bn(),KKe=Mo(),vie=YE(),XKe=i((t,e)=>{t=new KKe(t,e);let r=new w2("0.0.0");if(t.test(r)||(r=new w2("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let c=new w2(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||vie(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||vie(r,o))&&(r=o)}return r&&t.test(r)?r:null},"minVersion");Pie.exports=XKe});var Die=I((DWt,_ie)=>{"use strict";var ZKe=Mo(),eXe=i((t,e)=>{try{return new ZKe(t,e).range||"*"}catch{return null}},"validRange");_ie.exports=eXe});var K0=I((LWt,Mie)=>{"use strict";var tXe=bn(),Oie=JE(),{ANY:rXe}=Oie,nXe=Mo(),sXe=KE(),kie=YE(),Lie=V0(),oXe=Y0(),iXe=W0(),aXe=i((t,e,r,n)=>{t=new tXe(t,n),e=new nXe(e,n);let s,o,a,c,l;switch(r){case">":s=kie,o=oXe,a=Lie,c=">",l=">=";break;case"<":s=Lie,o=iXe,a=kie,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sXe(t,e,n))return!1;for(let u=0;u{f.semver===rXe&&(f=new Oie(">=0.0.0")),p=p||f,m=m||f,s(f.semver,p.semver,n)?p=f:a(f.semver,m.semver,n)&&(m=f)}),p.operator===c||p.operator===l||(!m.operator||m.operator===c)&&o(t,m.semver))return!1;if(m.operator===l&&a(t,m.semver))return!1}return!0},"outside");Mie.exports=aXe});var Uie=I((MWt,Fie)=>{"use strict";var cXe=K0(),lXe=i((t,e,r)=>cXe(t,e,">",r),"gtr");Fie.exports=lXe});var Gie=I((UWt,qie)=>{"use strict";var uXe=K0(),dXe=i((t,e,r)=>uXe(t,e,"<",r),"ltr");qie.exports=dXe});var zie=I((GWt,$ie)=>{"use strict";var Hie=Mo(),pXe=i((t,e,r)=>(t=new Hie(t,r),e=new Hie(e,r),t.intersects(e,r)),"intersects");$ie.exports=pXe});var Wie=I(($Wt,Vie)=>{"use strict";var mXe=KE(),fXe=Oo();Vie.exports=(t,e,r)=>{let n=[],s=null,o=null,a=t.sort((d,p)=>fXe(d,p,r));for(let d of a)mXe(d,e,r)?(o=d,s||(s=d)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let c=[];for(let[d,p]of n)d===p?c.push(d):!p&&d===a[0]?c.push("*"):p?d===a[0]?c.push(`<=${p}`):c.push(`${d} - ${p}`):c.push(`>=${d}`);let l=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{"use strict";var Yie=Mo(),x2=JE(),{ANY:S2}=x2,XE=KE(),b2=Oo(),AXe=i((t,e,r={})=>{if(t===e)return!0;t=new Yie(t,r),e=new Yie(e,r);let n=!1;e:for(let s of t.set){for(let o of e.set){let a=gXe(s,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},"subset"),hXe=[new x2(">=0.0.0-0")],Jie=[new x2(">=0.0.0")],gXe=i((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===S2){if(e.length===1&&e[0].semver===S2)return!0;r.includePrerelease?t=hXe:t=Jie}if(e.length===1&&e[0].semver===S2){if(r.includePrerelease)return!0;e=Jie}let n=new Set,s,o;for(let f of t)f.operator===">"||f.operator===">="?s=jie(s,f,r):f.operator==="<"||f.operator==="<="?o=Kie(o,f,r):n.add(f.semver);if(n.size>1)return null;let a;if(s&&o){if(a=b2(s.semver,o.semver,r),a>0)return null;if(a===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(s&&!XE(f,String(s),r)||o&&!XE(f,String(o),r))return null;for(let A of e)if(!XE(f,String(A),r))return!1;return!0}let c,l,u,d,p=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,m=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(d=d||f.operator===">"||f.operator===">=",u=u||f.operator==="<"||f.operator==="<=",s){if(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(c=jie(s,f,r),c===f&&c!==s)return!1}else if(s.operator===">="&&!XE(s.semver,String(f),r))return!1}if(o){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(l=Kie(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!XE(o.semver,String(f),r))return!1}if(!f.operator&&(o||s)&&a!==0)return!1}return!(s&&u&&!o&&a!==0||o&&d&&!s&&a!==0||m||p)},"simpleSubset"),jie=i((t,e,r)=>{if(!t)return e;let n=b2(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),Kie=i((t,e,r)=>{if(!t)return e;let n=b2(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");Xie.exports=AXe});var R2=I((WWt,rae)=>{"use strict";var B2=LA(),eae=VE(),yXe=bn(),tae=u2(),EXe=Vp(),CXe=Roe(),IXe=Toe(),wXe=Qoe(),SXe=koe(),xXe=Ooe(),bXe=Foe(),BXe=qoe(),RXe=Hoe(),NXe=Oo(),TXe=Woe(),vXe=Joe(),PXe=z0(),QXe=Zoe(),_Xe=tie(),DXe=YE(),kXe=V0(),LXe=m2(),OXe=f2(),MXe=W0(),FXe=Y0(),UXe=A2(),qXe=uie(),GXe=JE(),HXe=Mo(),$Xe=KE(),zXe=bie(),VXe=Rie(),WXe=Tie(),YXe=Qie(),JXe=Die(),jXe=K0(),KXe=Uie(),XXe=Gie(),ZXe=zie(),e7e=Wie(),t7e=Zie();rae.exports={parse:EXe,valid:CXe,clean:IXe,inc:wXe,diff:SXe,major:xXe,minor:bXe,patch:BXe,prerelease:RXe,compare:NXe,rcompare:TXe,compareLoose:vXe,compareBuild:PXe,sort:QXe,rsort:_Xe,gt:DXe,lt:kXe,eq:LXe,neq:OXe,gte:MXe,lte:FXe,cmp:UXe,coerce:qXe,Comparator:GXe,Range:HXe,satisfies:$Xe,toComparators:zXe,maxSatisfying:VXe,minSatisfying:WXe,minVersion:YXe,validRange:JXe,outside:jXe,gtr:KXe,ltr:XXe,intersects:ZXe,simplifyRange:e7e,subset:t7e,SemVer:yXe,re:B2.re,src:B2.src,tokens:B2.t,SEMVER_SPEC_VERSION:eae.SEMVER_SPEC_VERSION,RELEASE_TYPES:eae.RELEASE_TYPES,compareIdentifiers:tae.compareIdentifiers,rcompareIdentifiers:tae.rcompareIdentifiers}});var Eae=I((cJt,yae)=>{yae.exports=function(t,e){for(var r=[],n=0;n{"use strict";Sae.exports=Iae;function Iae(t,e,r){t instanceof RegExp&&(t=Cae(t,r)),e instanceof RegExp&&(e=Cae(e,r));var n=wae(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}i(Iae,"balanced");function Cae(t,e){var r=e.match(t);return r?r[0]:null}i(Cae,"maybeMatch");Iae.range=wae;function wae(t,e,r){var n,s,o,a,c,l=r.indexOf(t),u=r.indexOf(e,l+1),d=l;if(l>=0&&u>0){if(t===e)return[l,u];for(n=[],o=r.length;d>=0&&!c;)d==l?(n.push(d),l=r.indexOf(t,d+1)):n.length==1?c=[n.pop(),u]:(s=n.pop(),s=0?l:u;n.length&&(c=[o,a])}return c}i(wae,"range")});var Qae=I((dJt,Pae)=>{var C7e=Eae(),bae=xae();Pae.exports=S7e;var Bae="\0SLASH"+Math.random()+"\0",Rae="\0OPEN"+Math.random()+"\0",M2="\0CLOSE"+Math.random()+"\0",Nae="\0COMMA"+Math.random()+"\0",Tae="\0PERIOD"+Math.random()+"\0";function O2(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}i(O2,"numeric");function I7e(t){return t.split("\\\\").join(Bae).split("\\{").join(Rae).split("\\}").join(M2).split("\\,").join(Nae).split("\\.").join(Tae)}i(I7e,"escapeBraces");function w7e(t){return t.split(Bae).join("\\").split(Rae).join("{").split(M2).join("}").split(Nae).join(",").split(Tae).join(".")}i(w7e,"unescapeBraces");function vae(t){if(!t)return[""];var e=[],r=bae("{","}",t);if(!r)return t.split(",");var n=r.pre,s=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+s+"}";var c=vae(o);return o.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}i(vae,"parseCommaParts");function S7e(t,e){if(!t)return[];e=e||{};var r=e.max==null?1/0:e.max;return t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),nC(I7e(t),r,!0).map(w7e)}i(S7e,"expandTop");function x7e(t){return"{"+t+"}"}i(x7e,"embrace");function b7e(t){return/^-?0\d/.test(t)}i(b7e,"isPadded");function B7e(t,e){return t<=e}i(B7e,"lte");function R7e(t,e){return t>=e}i(R7e,"gte");function nC(t,e,r){for(var n=[];;){var s=bae("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),c=o||a,l=s.body.indexOf(",")>=0;if(!c&&!l){if(s.post.match(/,(?!,).*\}/)){t=s.pre+"{"+s.body+M2+s.post,r=!0;continue}return[t]}var u;if(c)u=s.body.split(/\.\./);else if(u=vae(s.body),u.length===1&&(u=nC(u[0],e,!1).map(x7e),u.length===1)){var p=s.post.length?nC(s.post,e,!1):[""];return p.map(function(ne){return s.pre+u[0]+ne})}var d=s.pre,p=s.post.length?nC(s.post,e,!1):[""],m;if(c){var f=O2(u[0]),A=O2(u[1]),h=Math.max(u[0].length,u[1].length),E=u.length==3?Math.max(Math.abs(O2(u[2])),1):1,C=B7e,w=A0){var _=new Array(P+1).join("0");b<0?N="-"+_+N.slice(1):N=_+N}}m.push(N)}}else m=C7e(u,function(qe){return nC(qe,e,!1)});for(var re=0;re{Oae.exports=ro;ro.Minimatch=vr;var sC=(function(){try{return require("path")}catch{}})()||{sep:"/"};ro.sep=sC.sep;var Wp=ro.GLOBSTAR=vr.GLOBSTAR={},N7e=Qae(),_ae={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},F2="[^/]",U2=F2+"*?",T7e="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",v7e="(?:(?!(?:\\/|^)\\.).)*?",Dae=P7e("().*{}+?[]^$\\!");function P7e(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}i(P7e,"charSet");var kae=/\/+/;ro.filter=Q7e;function Q7e(t,e){return e=e||{},function(r,n,s){return ro(r,t,e)}}i(Q7e,"filter");function Gu(t,e){e=e||{};var r={};return Object.keys(t).forEach(function(n){r[n]=t[n]}),Object.keys(e).forEach(function(n){r[n]=e[n]}),r}i(Gu,"ext");ro.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return ro;var e=ro,r=i(function(s,o,a){return e(s,o,Gu(t,a))},"minimatch");return r.Minimatch=i(function(s,o){return new e.Minimatch(s,Gu(t,o))},"Minimatch"),r.Minimatch.defaults=i(function(s){return e.defaults(Gu(t,s)).Minimatch},"defaults"),r.filter=i(function(s,o){return e.filter(s,Gu(t,o))},"filter"),r.defaults=i(function(s){return e.defaults(Gu(t,s))},"defaults"),r.makeRe=i(function(s,o){return e.makeRe(s,Gu(t,o))},"makeRe"),r.braceExpand=i(function(s,o){return e.braceExpand(s,Gu(t,o))},"braceExpand"),r.match=function(n,s,o){return e.match(n,s,Gu(t,o))},r};vr.defaults=function(t){return ro.defaults(t).Minimatch};function ro(t,e,r){return nB(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new vr(e,r).match(t)}i(ro,"minimatch");function vr(t,e){if(!(this instanceof vr))return new vr(t,e);nB(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&sC.sep!=="/"&&(t=t.split(sC.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}i(vr,"Minimatch");vr.prototype.debug=function(){};vr.prototype.make=_7e;function _7e(){var t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=i(function(){console.error.apply(console,arguments)},"debug")),this.debug(this.pattern,r),r=this.globParts=r.map(function(n){return n.split(kae)}),this.debug(this.pattern,r),r=r.map(function(n,s,o){return n.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}i(_7e,"make");vr.prototype.parseNegate=D7e;function D7e(){var t=this.pattern,e=!1,r=this.options,n=0;if(!r.nonegate){for(var s=0,o=t.length;s"u"?this.pattern:t,nB(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:N7e(t)}i(Lae,"braceExpand");var k7e=1024*64,nB=i(function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>k7e)throw new TypeError("pattern is too long")},"assertValidPattern");vr.prototype.parse=L7e;var rB={};function L7e(t,e){nB(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return Wp;if(t==="")return"";var n="",s=!!r.nocase,o=!1,a=[],c=[],l,u=!1,d=-1,p=-1,m=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=this;function A(){if(l){switch(l){case"*":n+=U2,s=!0;break;case"?":n+=F2,s=!0;break;default:n+="\\"+l;break}f.debug("clearStateChar %j %j",l,n),l=!1}}i(A,"clearStateChar");for(var h=0,E=t.length,C;h-1;re--){var ye=c[re],ae=n.slice(0,ye.reStart),qe=n.slice(ye.reStart,ye.reEnd-8),ne=n.slice(ye.reEnd-8,ye.reEnd),K=n.slice(ye.reEnd);ne+=K;var U=ae.split("(").length-1,wt=K;for(h=0;h"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;sC.sep!=="/"&&(e=e.split(sC.sep).join("/")),e=e.split(kae),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var o,a;for(a=e.length-1;a>=0&&(o=e[a],!o);a--);for(a=0;a=0;o--)if(e[o]===Wp){c=o;break}var l=e.slice(s,a),u=r?e.slice(a+1):e.slice(a+1,c),d=r?[]:e.slice(c+1);if(l.length){var p=t.slice(n,n+l.length);if(!this._matchOne(p,l,r,0,0))return!1;n+=l.length}var m=0;if(d.length){if(d.length+n>t.length)return!1;var f=t.length-d.length;if(this._matchOne(t,d,r,f,0))m=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(f--,!this._matchOne(t,d,r,f,0)))return!1;m=d.length+1}}if(!u.length){var A=!!m;for(o=n;o{"use strict";var W7e="2.0.0",Y7e=Number.MAX_SAFE_INTEGER||9007199254740991,J7e=16,j7e=250,K7e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Gae.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:J7e,MAX_SAFE_BUILD_LENGTH:j7e,MAX_SAFE_INTEGER:Y7e,RELEASE_TYPES:K7e,SEMVER_SPEC_VERSION:W7e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var aC=I((LJt,Hae)=>{"use strict";var X7e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Hae.exports=X7e});var GA=I((Oa,$ae)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:G2,MAX_SAFE_BUILD_LENGTH:Z7e,MAX_LENGTH:eZe}=qA(),tZe=aC();Oa=$ae.exports={};var rZe=Oa.re=[],nZe=Oa.safeRe=[],z=Oa.src=[],sZe=Oa.safeSrc=[],V=Oa.t={},oZe=0,H2="[a-zA-Z0-9-]",iZe=[["\\s",1],["\\d",eZe],[H2,Z7e]],aZe=i(t=>{for(let[e,r]of iZe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),De=i((t,e,r)=>{let n=aZe(e),s=oZe++;tZe(t,s,e),V[t]=s,z[s]=e,sZe[s]=n,rZe[s]=new RegExp(e,r?"g":void 0),nZe[s]=new RegExp(n,r?"g":void 0)},"createToken");De("NUMERICIDENTIFIER","0|[1-9]\\d*");De("NUMERICIDENTIFIERLOOSE","\\d+");De("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${H2}*`);De("MAINVERSION",`(${z[V.NUMERICIDENTIFIER]})\\.(${z[V.NUMERICIDENTIFIER]})\\.(${z[V.NUMERICIDENTIFIER]})`);De("MAINVERSIONLOOSE",`(${z[V.NUMERICIDENTIFIERLOOSE]})\\.(${z[V.NUMERICIDENTIFIERLOOSE]})\\.(${z[V.NUMERICIDENTIFIERLOOSE]})`);De("PRERELEASEIDENTIFIER",`(?:${z[V.NONNUMERICIDENTIFIER]}|${z[V.NUMERICIDENTIFIER]})`);De("PRERELEASEIDENTIFIERLOOSE",`(?:${z[V.NONNUMERICIDENTIFIER]}|${z[V.NUMERICIDENTIFIERLOOSE]})`);De("PRERELEASE",`(?:-(${z[V.PRERELEASEIDENTIFIER]}(?:\\.${z[V.PRERELEASEIDENTIFIER]})*))`);De("PRERELEASELOOSE",`(?:-?(${z[V.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${z[V.PRERELEASEIDENTIFIERLOOSE]})*))`);De("BUILDIDENTIFIER",`${H2}+`);De("BUILD",`(?:\\+(${z[V.BUILDIDENTIFIER]}(?:\\.${z[V.BUILDIDENTIFIER]})*))`);De("FULLPLAIN",`v?${z[V.MAINVERSION]}${z[V.PRERELEASE]}?${z[V.BUILD]}?`);De("FULL",`^${z[V.FULLPLAIN]}$`);De("LOOSEPLAIN",`[v=\\s]*${z[V.MAINVERSIONLOOSE]}${z[V.PRERELEASELOOSE]}?${z[V.BUILD]}?`);De("LOOSE",`^${z[V.LOOSEPLAIN]}$`);De("GTLT","((?:<|>)?=?)");De("XRANGEIDENTIFIERLOOSE",`${z[V.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);De("XRANGEIDENTIFIER",`${z[V.NUMERICIDENTIFIER]}|x|X|\\*`);De("XRANGEPLAIN",`[v=\\s]*(${z[V.XRANGEIDENTIFIER]})(?:\\.(${z[V.XRANGEIDENTIFIER]})(?:\\.(${z[V.XRANGEIDENTIFIER]})(?:${z[V.PRERELEASE]})?${z[V.BUILD]}?)?)?`);De("XRANGEPLAINLOOSE",`[v=\\s]*(${z[V.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[V.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[V.XRANGEIDENTIFIERLOOSE]})(?:${z[V.PRERELEASELOOSE]})?${z[V.BUILD]}?)?)?`);De("XRANGE",`^${z[V.GTLT]}\\s*${z[V.XRANGEPLAIN]}$`);De("XRANGELOOSE",`^${z[V.GTLT]}\\s*${z[V.XRANGEPLAINLOOSE]}$`);De("COERCEPLAIN",`(^|[^\\d])(\\d{1,${G2}})(?:\\.(\\d{1,${G2}}))?(?:\\.(\\d{1,${G2}}))?`);De("COERCE",`${z[V.COERCEPLAIN]}(?:$|[^\\d])`);De("COERCEFULL",z[V.COERCEPLAIN]+`(?:${z[V.PRERELEASE]})?(?:${z[V.BUILD]})?(?:$|[^\\d])`);De("COERCERTL",z[V.COERCE],!0);De("COERCERTLFULL",z[V.COERCEFULL],!0);De("LONETILDE","(?:~>?)");De("TILDETRIM",`(\\s*)${z[V.LONETILDE]}\\s+`,!0);Oa.tildeTrimReplace="$1~";De("TILDE",`^${z[V.LONETILDE]}${z[V.XRANGEPLAIN]}$`);De("TILDELOOSE",`^${z[V.LONETILDE]}${z[V.XRANGEPLAINLOOSE]}$`);De("LONECARET","(?:\\^)");De("CARETTRIM",`(\\s*)${z[V.LONECARET]}\\s+`,!0);Oa.caretTrimReplace="$1^";De("CARET",`^${z[V.LONECARET]}${z[V.XRANGEPLAIN]}$`);De("CARETLOOSE",`^${z[V.LONECARET]}${z[V.XRANGEPLAINLOOSE]}$`);De("COMPARATORLOOSE",`^${z[V.GTLT]}\\s*(${z[V.LOOSEPLAIN]})$|^$`);De("COMPARATOR",`^${z[V.GTLT]}\\s*(${z[V.FULLPLAIN]})$|^$`);De("COMPARATORTRIM",`(\\s*)${z[V.GTLT]}\\s*(${z[V.LOOSEPLAIN]}|${z[V.XRANGEPLAIN]})`,!0);Oa.comparatorTrimReplace="$1$2$3";De("HYPHENRANGE",`^\\s*(${z[V.XRANGEPLAIN]})\\s+-\\s+(${z[V.XRANGEPLAIN]})\\s*$`);De("HYPHENRANGELOOSE",`^\\s*(${z[V.XRANGEPLAINLOOSE]})\\s+-\\s+(${z[V.XRANGEPLAINLOOSE]})\\s*$`);De("STAR","(<|>)?=?\\s*\\*");De("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");De("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var iB=I((MJt,zae)=>{"use strict";var cZe=Object.freeze({loose:!0}),lZe=Object.freeze({}),uZe=i(t=>t?typeof t!="object"?cZe:t:lZe,"parseOptions");zae.exports=uZe});var $2=I((UJt,Yae)=>{"use strict";var Vae=/^[0-9]+$/,Wae=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:tWae(e,t),"rcompareIdentifiers");Yae.exports={compareIdentifiers:Wae,rcompareIdentifiers:dZe}});var on=I((GJt,jae)=>{"use strict";var aB=aC(),{MAX_LENGTH:Jae,MAX_SAFE_INTEGER:cB}=qA(),{safeRe:lB,t:uB}=GA(),pZe=iB(),{compareIdentifiers:z2}=$2(),V2=class t{static{i(this,"SemVer")}constructor(e,r){if(r=pZe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Jae)throw new TypeError(`version is longer than ${Jae} characters`);aB("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?lB[uB.LOOSE]:lB[uB.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>cB||this.major<0)throw new TypeError("Invalid major version");if(this.minor>cB||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>cB||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&oe.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(aB("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return z2(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(aB("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return z2(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?lB[uB.PRERELEASELOOSE]:lB[uB.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),z2(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};jae.exports=V2});var zu=I(($Jt,Xae)=>{"use strict";var Kae=on(),mZe=i((t,e,r=!1)=>{if(t instanceof Kae)return t;try{return new Kae(t,e)}catch(n){if(!r)return null;throw n}},"parse");Xae.exports=mZe});var ece=I((VJt,Zae)=>{"use strict";var fZe=zu(),AZe=i((t,e)=>{let r=fZe(t,e);return r?r.version:null},"valid");Zae.exports=AZe});var rce=I((YJt,tce)=>{"use strict";var hZe=zu(),gZe=i((t,e)=>{let r=hZe(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");tce.exports=gZe});var oce=I((jJt,sce)=>{"use strict";var nce=on(),yZe=i((t,e,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new nce(t instanceof nce?t.version:t,r).inc(e,n,s).version}catch{return null}},"inc");sce.exports=yZe});var cce=I((XJt,ace)=>{"use strict";var ice=zu(),EZe=i((t,e)=>{let r=ice(t,null,!0),n=ice(e,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,a=o?r:n,c=o?n:r,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"},"diff");ace.exports=EZe});var uce=I((e8t,lce)=>{"use strict";var CZe=on(),IZe=i((t,e)=>new CZe(t,e).major,"major");lce.exports=IZe});var pce=I((r8t,dce)=>{"use strict";var wZe=on(),SZe=i((t,e)=>new wZe(t,e).minor,"minor");dce.exports=SZe});var fce=I((s8t,mce)=>{"use strict";var xZe=on(),bZe=i((t,e)=>new xZe(t,e).patch,"patch");mce.exports=bZe});var hce=I((i8t,Ace)=>{"use strict";var BZe=zu(),RZe=i((t,e)=>{let r=BZe(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");Ace.exports=RZe});var qo=I((c8t,yce)=>{"use strict";var gce=on(),NZe=i((t,e,r)=>new gce(t,r).compare(new gce(e,r)),"compare");yce.exports=NZe});var Cce=I((u8t,Ece)=>{"use strict";var TZe=qo(),vZe=i((t,e,r)=>TZe(e,t,r),"rcompare");Ece.exports=vZe});var wce=I((p8t,Ice)=>{"use strict";var PZe=qo(),QZe=i((t,e)=>PZe(t,e,!0),"compareLoose");Ice.exports=QZe});var dB=I((f8t,xce)=>{"use strict";var Sce=on(),_Ze=i((t,e,r)=>{let n=new Sce(t,r),s=new Sce(e,r);return n.compare(s)||n.compareBuild(s)},"compareBuild");xce.exports=_Ze});var Bce=I((h8t,bce)=>{"use strict";var DZe=dB(),kZe=i((t,e)=>t.sort((r,n)=>DZe(r,n,e)),"sort");bce.exports=kZe});var Nce=I((y8t,Rce)=>{"use strict";var LZe=dB(),OZe=i((t,e)=>t.sort((r,n)=>LZe(n,r,e)),"rsort");Rce.exports=OZe});var cC=I((C8t,Tce)=>{"use strict";var MZe=qo(),FZe=i((t,e,r)=>MZe(t,e,r)>0,"gt");Tce.exports=FZe});var pB=I((w8t,vce)=>{"use strict";var UZe=qo(),qZe=i((t,e,r)=>UZe(t,e,r)<0,"lt");vce.exports=qZe});var W2=I((x8t,Pce)=>{"use strict";var GZe=qo(),HZe=i((t,e,r)=>GZe(t,e,r)===0,"eq");Pce.exports=HZe});var Y2=I((B8t,Qce)=>{"use strict";var $Ze=qo(),zZe=i((t,e,r)=>$Ze(t,e,r)!==0,"neq");Qce.exports=zZe});var mB=I((N8t,_ce)=>{"use strict";var VZe=qo(),WZe=i((t,e,r)=>VZe(t,e,r)>=0,"gte");_ce.exports=WZe});var fB=I((v8t,Dce)=>{"use strict";var YZe=qo(),JZe=i((t,e,r)=>YZe(t,e,r)<=0,"lte");Dce.exports=JZe});var J2=I((Q8t,kce)=>{"use strict";var jZe=W2(),KZe=Y2(),XZe=cC(),ZZe=mB(),eet=pB(),tet=fB(),ret=i((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return jZe(t,r,n);case"!=":return KZe(t,r,n);case">":return XZe(t,r,n);case">=":return ZZe(t,r,n);case"<":return eet(t,r,n);case"<=":return tet(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");kce.exports=ret});var Oce=I((D8t,Lce)=>{"use strict";var net=on(),set=zu(),{safeRe:AB,t:hB}=GA(),oet=i((t,e)=>{if(t instanceof net)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?AB[hB.COERCEFULL]:AB[hB.COERCE]);else{let l=e.includePrerelease?AB[hB.COERCERTLFULL]:AB[hB.COERCERTL],u;for(;(u=l.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return set(`${n}.${s}.${o}${a}${c}`,e)},"coerce");Lce.exports=oet});var Fce=I((L8t,Mce)=>{"use strict";var iet=zu(),aet=qA(),cet=on(),uet=i((t,e,r)=>{if(!aet.RELEASE_TYPES.includes(e))return null;let n=det(t,r);return n&&pet(n,e)},"truncate"),det=i((t,e)=>{let r=t instanceof cet?t.version:t;return iet(r,e)},"cloneInputVersion"),pet=i((t,e)=>{if(met(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},"doTruncation"),met=i(t=>t.startsWith("pre"),"isPrerelease");Mce.exports=uet});var qce=I((M8t,Uce)=>{"use strict";var j2=class{static{i(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,r)}return this}};Uce.exports=j2});var Go=I((U8t,zce)=>{"use strict";var fet=/\s+/g,K2=class t{static{i(this,"Range")}constructor(e,r){if(r=het(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof X2)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(fet," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Hce(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Bet(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(bet,"");let n=((this.options.includePrerelease&&wet)|(this.options.loose&&xet))+":"+e,s=Gce.get(n);if(s)return s;let o=this.options.loose,a=o?Vn[an.HYPHENRANGELOOSE]:Vn[an.HYPHENRANGE];e=e.replace(a,Let(this.options.includePrerelease)),Pt("hyphen replace",e),e=e.replace(Vn[an.COMPARATORTRIM],Eet),Pt("comparator trim",e),e=e.replace(Vn[an.TILDETRIM],Cet),Pt("tilde trim",e),e=e.replace(Vn[an.CARETTRIM],Iet),Pt("caret trim",e);let c=e.split(" ").map(p=>Ret(p,this.options)).join(" ").split(/\s+/).map(p=>ket(p,this.options));o&&(c=c.filter(p=>(Pt("loose invalid filter",p,this.options),!!p.match(Vn[an.COMPARATORLOOSE])))),Pt("range list",c);let l=new Map,u=c.map(p=>new X2(p,this.options));for(let p of u){if(Hce(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return Gce.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>$ce(n,r)&&e.set.some(s=>$ce(s,r)&&n.every(o=>s.every(a=>o.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new get(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),Bet=i(t=>t.value==="","isAny"),$ce=i((t,e)=>{let r=!0,n=t.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,e)),s=n.pop();return r},"isSatisfiable"),Ret=i((t,e)=>(t=t.replace(Vn[an.BUILD],""),Pt("comp",t,e),t=vet(t,e),Pt("caret",t),t=Net(t,e),Pt("tildes",t),t=Qet(t,e),Pt("xrange",t),t=Det(t,e),Pt("stars",t),t),"parseComparator"),Wn=i(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),Net=i((t,e)=>t.trim().split(/\s+/).map(r=>Tet(r,e)).join(" "),"replaceTildes"),Tet=i((t,e)=>{let r=e.loose?Vn[an.TILDELOOSE]:Vn[an.TILDE];return t.replace(r,(n,s,o,a,c)=>{Pt("tilde",t,n,s,o,a,c);let l;return Wn(s)?l="":Wn(o)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:Wn(a)?l=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:c?(Pt("replaceTilde pr",c),l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,Pt("tilde return",l),l})},"replaceTilde"),vet=i((t,e)=>t.trim().split(/\s+/).map(r=>Pet(r,e)).join(" "),"replaceCarets"),Pet=i((t,e)=>{Pt("caret",t,e);let r=e.loose?Vn[an.CARETLOOSE]:Vn[an.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{Pt("caret",t,s,o,a,c,l);let u;return Wn(o)?u="":Wn(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:Wn(c)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:l?(Pt("replaceCaret pr",l),o==="0"?a==="0"?u=`>=${o}.${a}.${c}-${l} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c}-${l} <${+o+1}.0.0-0`):(Pt("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${c}${n} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`),Pt("caret return",u),u})},"replaceCaret"),Qet=i((t,e)=>(Pt("replaceXRanges",t,e),t.split(/\s+/).map(r=>_et(r,e)).join(" ")),"replaceXRanges"),_et=i((t,e)=>{t=t.trim();let r=e.loose?Vn[an.XRANGELOOSE]:Vn[an.XRANGE];return t.replace(r,(n,s,o,a,c,l)=>{Pt("xRange",t,n,s,o,a,c,l);let u=Wn(o),d=u||Wn(a),p=d||Wn(c),m=p;return s==="="&&m&&(s=""),l=e.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(d&&(a=0),c=0,s===">"?(s=">=",d?(o=+o+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",d?o=+o+1:a=+a+1),s==="<"&&(l="-0"),n=`${s+o}.${a}.${c}${l}`):d?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),Pt("xRange return",n),n})},"replaceXRange"),Det=i((t,e)=>(Pt("replaceStars",t,e),t.trim().replace(Vn[an.STAR],"")),"replaceStars"),ket=i((t,e)=>(Pt("replaceGTE0",t,e),t.trim().replace(Vn[e.includePrerelease?an.GTE0PRE:an.GTE0],"")),"replaceGTE0"),Let=i(t=>(e,r,n,s,o,a,c,l,u,d,p,m)=>(Wn(n)?r="":Wn(s)?r=`>=${n}.0.0${t?"-0":""}`:Wn(o)?r=`>=${n}.${s}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Wn(u)?l="":Wn(d)?l=`<${+u+1}.0.0-0`:Wn(p)?l=`<${u}.${+d+1}.0-0`:m?l=`<=${u}.${d}.${p}-${m}`:t?l=`<${u}.${d}.${+p+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),"hyphenReplace"),Oet=i((t,e,r)=>{for(let n=0;n0){let s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0},"testSet")});var lC=I((G8t,Kce)=>{"use strict";var uC=Symbol("SemVer ANY"),tq=class t{static{i(this,"Comparator")}static get ANY(){return uC}constructor(e,r){if(r=Vce(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),eq("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===uC?this.value="":this.value=this.operator+this.semver.version,eq("comp",this)}parse(e){let r=this.options.loose?Wce[Yce.COMPARATORLOOSE]:Wce[Yce.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Jce(n[2],this.options.loose):this.semver=uC}toString(){return this.value}test(e){if(eq("Comparator.test",e,this.options.loose),this.semver===uC||e===uC)return!0;if(typeof e=="string")try{e=new Jce(e,this.options)}catch{return!1}return Z2(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new jce(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new jce(this.value,r).test(e.semver):(r=Vce(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Z2(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Z2(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Kce.exports=tq;var Vce=iB(),{safeRe:Wce,t:Yce}=GA(),Z2=J2(),eq=aC(),Jce=on(),jce=Go()});var dC=I(($8t,Xce)=>{"use strict";var Met=Go(),Fet=i((t,e,r)=>{try{e=new Met(e,r)}catch{return!1}return e.test(t)},"satisfies");Xce.exports=Fet});var ele=I((V8t,Zce)=>{"use strict";var Uet=Go(),qet=i((t,e)=>new Uet(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");Zce.exports=qet});var rle=I((Y8t,tle)=>{"use strict";var Get=on(),Het=Go(),$et=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Het(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Get(n,r))}),n},"maxSatisfying");tle.exports=$et});var sle=I((j8t,nle)=>{"use strict";var zet=on(),Vet=Go(),Wet=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Vet(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new zet(n,r))}),n},"minSatisfying");nle.exports=Wet});var ale=I((X8t,ile)=>{"use strict";var rq=on(),Yet=Go(),ole=cC(),Jet=i((t,e)=>{t=new Yet(t,e);let r=new rq("0.0.0");if(t.test(r)||(r=new rq("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let c=new rq(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||ole(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||ole(r,o))&&(r=o)}return r&&t.test(r)?r:null},"minVersion");ile.exports=Jet});var lle=I((e5t,cle)=>{"use strict";var jet=Go(),Ket=i((t,e)=>{try{return new jet(t,e).range||"*"}catch{return null}},"validRange");cle.exports=Ket});var gB=I((r5t,mle)=>{"use strict";var Xet=on(),ple=lC(),{ANY:Zet}=ple,ett=Go(),ttt=dC(),ule=cC(),dle=pB(),rtt=fB(),ntt=mB(),stt=i((t,e,r,n)=>{t=new Xet(t,n),e=new ett(e,n);let s,o,a,c,l;switch(r){case">":s=ule,o=rtt,a=dle,c=">",l=">=";break;case"<":s=dle,o=ntt,a=ule,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ttt(t,e,n))return!1;for(let u=0;u{f.semver===Zet&&(f=new ple(">=0.0.0")),p=p||f,m=m||f,s(f.semver,p.semver,n)?p=f:a(f.semver,m.semver,n)&&(m=f)}),p.operator===c||p.operator===l||(!m.operator||m.operator===c)&&o(t,m.semver))return!1;if(m.operator===l&&a(t,m.semver))return!1}return!0},"outside");mle.exports=stt});var Ale=I((s5t,fle)=>{"use strict";var ott=gB(),itt=i((t,e,r)=>ott(t,e,">",r),"gtr");fle.exports=itt});var gle=I((i5t,hle)=>{"use strict";var att=gB(),ctt=i((t,e,r)=>att(t,e,"<",r),"ltr");hle.exports=ctt});var Cle=I((c5t,Ele)=>{"use strict";var yle=Go(),ltt=i((t,e,r)=>(t=new yle(t,r),e=new yle(e,r),t.intersects(e,r)),"intersects");Ele.exports=ltt});var wle=I((u5t,Ile)=>{"use strict";var utt=dC(),dtt=qo();Ile.exports=(t,e,r)=>{let n=[],s=null,o=null,a=t.sort((d,p)=>dtt(d,p,r));for(let d of a)utt(d,e,r)?(o=d,s||(s=d)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let c=[];for(let[d,p]of n)d===p?c.push(d):!p&&d===a[0]?c.push("*"):p?d===a[0]?c.push(`<=${p}`):c.push(`${d} - ${p}`):c.push(`>=${d}`);let l=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{"use strict";var Sle=Go(),oq=lC(),{ANY:nq}=oq,sq=dC(),iq=qo(),ptt=i((t,e,r={})=>{if(t===e)return!0;t=new Sle(t,r),e=new Sle(e,r);let n=!1;e:for(let s of t.set){for(let o of e.set){let a=ftt(s,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},"subset"),mtt=[new oq(">=0.0.0-0")],xle=[new oq(">=0.0.0")],ftt=i((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===nq){if(e.length===1&&e[0].semver===nq)return!0;r.includePrerelease?t=mtt:t=xle}if(e.length===1&&e[0].semver===nq){if(r.includePrerelease)return!0;e=xle}let n=new Set,s,o;for(let f of t)f.operator===">"||f.operator===">="?s=ble(s,f,r):f.operator==="<"||f.operator==="<="?o=Ble(o,f,r):n.add(f.semver);if(n.size>1)return null;let a;if(s&&o){if(a=iq(s.semver,o.semver,r),a>0)return null;if(a===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(s&&!sq(f,String(s),r)||o&&!sq(f,String(o),r))return null;for(let A of e)if(!sq(f,String(A),r))return!1;return!0}let c,l,u,d,p=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,m=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(d=d||f.operator===">"||f.operator===">=",u=u||f.operator==="<"||f.operator==="<=",s){if(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(c=ble(s,f,r),c===f&&c!==s)return!1}else if(s.operator===">="&&!f.test(s.semver))return!1}if(o){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(l=Ble(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||s)&&a!==0)return!1}return!(s&&u&&!o&&a!==0||o&&d&&!s&&a!==0||m||p)},"simpleSubset"),ble=i((t,e,r)=>{if(!t)return e;let n=iq(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),Ble=i((t,e,r)=>{if(!t)return e;let n=iq(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");Rle.exports=ptt});var Qle=I((m5t,Ple)=>{"use strict";var aq=GA(),Tle=qA(),Att=on(),vle=$2(),htt=zu(),gtt=ece(),ytt=rce(),Ett=oce(),Ctt=cce(),Itt=uce(),wtt=pce(),Stt=fce(),xtt=hce(),btt=qo(),Btt=Cce(),Rtt=wce(),Ntt=dB(),Ttt=Bce(),vtt=Nce(),Ptt=cC(),Qtt=pB(),_tt=W2(),Dtt=Y2(),ktt=mB(),Ltt=fB(),Ott=J2(),Mtt=Oce(),Ftt=Fce(),Utt=lC(),qtt=Go(),Gtt=dC(),Htt=ele(),$tt=rle(),ztt=sle(),Vtt=ale(),Wtt=lle(),Ytt=gB(),Jtt=Ale(),jtt=gle(),Ktt=Cle(),Xtt=wle(),Ztt=Nle();Ple.exports={parse:htt,valid:gtt,clean:ytt,inc:Ett,diff:Ctt,major:Itt,minor:wtt,patch:Stt,prerelease:xtt,compare:btt,rcompare:Btt,compareLoose:Rtt,compareBuild:Ntt,sort:Ttt,rsort:vtt,gt:Ptt,lt:Qtt,eq:_tt,neq:Dtt,gte:ktt,lte:Ltt,cmp:Ott,coerce:Mtt,truncate:Ftt,Comparator:Utt,Range:qtt,satisfies:Gtt,toComparators:Htt,maxSatisfying:$tt,minSatisfying:ztt,minVersion:Vtt,validRange:Wtt,outside:Ytt,gtr:Jtt,ltr:jtt,intersects:Ktt,simplifyRange:Xtt,subset:Ztt,SemVer:Att,re:aq.re,src:aq.src,tokens:aq.t,SEMVER_SPEC_VERSION:Tle.SEMVER_SPEC_VERSION,RELEASE_TYPES:Tle.RELEASE_TYPES,compareIdentifiers:vle.compareIdentifiers,rcompareIdentifiers:vle.rcompareIdentifiers}});var Iue=I((g6t,Cue)=>{var JA=1e3,jA=JA*60,KA=jA*60,rm=KA*24,krt=rm*7,Lrt=rm*365.25;Cue.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Ort(t);if(r==="number"&&isFinite(t))return e.long?Frt(t):Mrt(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Ort(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Lrt;case"weeks":case"week":case"w":return r*krt;case"days":case"day":case"d":return r*rm;case"hours":case"hour":case"hrs":case"hr":case"h":return r*KA;case"minutes":case"minute":case"mins":case"min":case"m":return r*jA;case"seconds":case"second":case"secs":case"sec":case"s":return r*JA;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}i(Ort,"parse");function Mrt(t){var e=Math.abs(t);return e>=rm?Math.round(t/rm)+"d":e>=KA?Math.round(t/KA)+"h":e>=jA?Math.round(t/jA)+"m":e>=JA?Math.round(t/JA)+"s":t+"ms"}i(Mrt,"fmtShort");function Frt(t){var e=Math.abs(t);return e>=rm?HB(t,e,rm,"day"):e>=KA?HB(t,e,KA,"hour"):e>=jA?HB(t,e,jA,"minute"):e>=JA?HB(t,e,JA,"second"):t+" ms"}i(Frt,"fmtLong");function HB(t,e,r,n){var s=e>=r*1.5;return Math.round(t/r)+" "+n+(s?"s":"")}i(HB,"plural")});var Qq=I((E6t,wue)=>{function Urt(t){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=s,r.enabled=a,r.humanize=Iue(),r.destroy=u,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let p=0;for(let m=0;m{if(P==="%%")return"%";b++;let re=r.formatters[_];if(typeof re=="function"){let ye=E[b];P=re.call(C,ye),E.splice(b,1),b--}return P}),r.formatArgs.call(C,E),(C.log||r.log).apply(C,E)}return i(h,"debug"),h.namespace=d,h.useColors=r.useColors(),h.color=r.selectColor(d),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:i(()=>m!==null?m:(f!==r.namespaces&&(f=r.namespaces,A=r.enabled(d)),A),"get"),set:i(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(h),h}i(r,"createDebug");function n(d,p){let m=r(this.namespace+(typeof p>"u"?":":p)+d);return m.log=this.log,m}i(n,"extend");function s(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let p,m=(typeof d=="string"?d:"").split(/[\s,]+/),f=m.length;for(p=0;p"-"+p)].join(",");return r.enable(""),d}i(o,"disable");function a(d){if(d[d.length-1]==="*")return!0;let p,m;for(p=0,m=r.skips.length;p{io.formatArgs=Grt;io.save=Hrt;io.load=$rt;io.useColors=qrt;io.storage=zrt();io.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})();io.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 qrt(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}i(qrt,"useColors");function Grt(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+$B.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),t.splice(n,0,e)}i(Grt,"formatArgs");io.log=console.debug||console.log||(()=>{});function Hrt(t){try{t?io.storage.setItem("debug",t):io.storage.removeItem("debug")}catch{}}i(Hrt,"save");function $rt(){let t;try{t=io.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}i($rt,"load");function zrt(){try{return localStorage}catch{}}i(zrt,"localstorage");$B.exports=Qq()(io);var{formatters:Vrt}=$B.exports;Vrt.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var bue=I((w6t,xue)=>{"use strict";xue.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),s=e.indexOf("--");return n!==-1&&(s===-1||n{"use strict";var Wrt=require("os"),Bue=require("tty"),$o=bue(),{env:Wr}=process,Yu;$o("no-color")||$o("no-colors")||$o("color=false")||$o("color=never")?Yu=0:($o("color")||$o("colors")||$o("color=true")||$o("color=always"))&&(Yu=1);"FORCE_COLOR"in Wr&&(Wr.FORCE_COLOR==="true"?Yu=1:Wr.FORCE_COLOR==="false"?Yu=0:Yu=Wr.FORCE_COLOR.length===0?1:Math.min(parseInt(Wr.FORCE_COLOR,10),3));function _q(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}i(_q,"translateLevel");function Dq(t,e){if(Yu===0)return 0;if($o("color=16m")||$o("color=full")||$o("color=truecolor"))return 3;if($o("color=256"))return 2;if(t&&!e&&Yu===void 0)return 0;let r=Yu||0;if(Wr.TERM==="dumb")return r;if(process.platform==="win32"){let n=Wrt.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Wr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Wr)||Wr.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Wr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Wr.TEAMCITY_VERSION)?1:0;if(Wr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Wr){let n=parseInt((Wr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Wr.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Wr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Wr.TERM)||"COLORTERM"in Wr?1:r}i(Dq,"supportsColor");function Yrt(t){let e=Dq(t,t&&t.isTTY);return _q(e)}i(Yrt,"getSupportLevel");Rue.exports={supportsColor:Yrt,stdout:_q(Dq(!0,Bue.isatty(1))),stderr:_q(Dq(!0,Bue.isatty(2)))}});var vue=I((cn,VB)=>{var Jrt=require("tty"),zB=require("util");cn.init=rnt;cn.log=Zrt;cn.formatArgs=Krt;cn.save=ent;cn.load=tnt;cn.useColors=jrt;cn.destroy=zB.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");cn.colors=[6,2,3,4,5,1];try{let t=Nue();t&&(t.stderr||t).level>=2&&(cn.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{}cn.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function jrt(){return"colors"in cn.inspectOpts?!!cn.inspectOpts.colors:Jrt.isatty(process.stderr.fd)}i(jrt,"useColors");function Krt(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${e} \x1B[0m`;t[0]=o+t[0].split(` +`.trim())}};xte.exports=K1});var Hb=I((Czt,Tte)=>{"use strict";var Bte=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:RYe}=rt(),NYe=aA();Nte()===void 0&&Rte(new NYe);function Rte(t){if(!t||typeof t.dispatch!="function")throw new RYe("Argument agent must implement Agent");Object.defineProperty(globalThis,Bte,{value:t,writable:!0,enumerable:!1,configurable:!1})}i(Rte,"setGlobalDispatcher");function Nte(){return globalThis[Bte]}i(Nte,"getGlobalDispatcher");Tte.exports={setGlobalDispatcher:Rte,getGlobalDispatcher:Nte}});var $b=I((Szt,vte)=>{"use strict";vte.exports=class{static{i(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var Qte=I((bzt,Pte)=>{"use strict";var TYe=wb();Pte.exports=t=>{let e=t?.maxRedirections;return r=>i(function(s,o){let{maxRedirections:a=e,...c}=s;if(!a)return r(s,o);let l=new TYe(r,a,s,o);return r(c,l)},"redirectInterceptor")}});var Dte=I((Rzt,_te)=>{"use strict";var vYe=_b();_te.exports=t=>e=>i(function(n,s){return e(n,new vYe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))},"retryInterceptor")});var Lte=I((Tzt,kte)=>{"use strict";var PYe=He(),{InvalidArgumentError:QYe,RequestAbortedError:_Ye}=rt(),DYe=$b(),X1=class extends DYe{static{i(this,"DumpHandler")}#e=1024*1024;#t=null;#r=!1;#o=!1;#s=0;#n=null;#i=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new QYe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#i=r}onConnect(e){this.#t=e,this.#i.onConnect(this.#a.bind(this))}#a(e){this.#o=!0,this.#n=e}onHeaders(e,r,n,s){let a=PYe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new _Ye(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#o?!0:this.#i.onHeaders(e,r,n,s)}onError(e){this.#r||(e=this.#n??e,this.#i.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#r=!0,this.#o?this.#i.onError(this.#n):this.#i.onComplete([])),!0}onComplete(e){if(!this.#r){if(this.#o){this.#i.onError(this.reason);return}this.#i.onComplete(e)}}};function kYe({maxSize:t}={maxSize:1024*1024}){return e=>i(function(n,s){let{dumpMaxSize:o=t}=n,a=new X1({maxSize:o},s);return e(n,a)},"Intercept")}i(kYe,"createDumpInterceptor");kte.exports=kYe});var Fte=I((Pzt,Mte)=>{"use strict";var{isIP:LYe}=require("node:net"),{lookup:OYe}=require("node:dns"),MYe=$b(),{InvalidArgumentError:gA,InformationalError:FYe}=rt(),Ote=Math.pow(2,31)-1,Z1=class{static{i(this,"DNSInstance")}#e=0;#t=0;#r=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#o,this.pick=e.pick??this.#s}get full(){return this.#r.size===this.#t}runLookup(e,r,n){let s=this.#r.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let o={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,o,(a,c)=>{if(a||c==null||c.length===0){n(a??new FYe("No DNS entries found"));return}this.setRecords(e,c);let l=this.#r.get(e.hostname),u=this.pick(e,l,o.affinity),d;typeof u.port=="number"?d=`:${u.port}`:e.port!==""?d=`:${e.port}`:d="",n(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${d}`)});else{let a=this.pick(e,s,o.affinity);if(a==null){this.#r.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#o(e,r,n){OYe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,o)=>{if(s)return n(s);let a=new Map;for(let c of o)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#s(e,r,n){let s=null,{records:o,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===Ote?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),o[n]!=null&&o[n].ips.length>0?c=o[n]:c=o[n===4?6:4]):c=o[n],c==null||c.ips.length===0)return s;c.offset==null||c.offset===Ote?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return s=c.ips[l]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(c.ips.splice(l,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let o of r){o.timestamp=n,typeof o.ttl=="number"?o.ttl=Math.min(o.ttl,this.#e):o.ttl=this.#e;let a=s.records[o.family]??{ips:[]};a.ips.push(o),s.records[o.family]=a}this.#r.set(e.hostname,s)}getHandler(e,r){return new eU(this,e,r)}},eU=class extends MYe{static{i(this,"DNSDispatchHandler")}#e=null;#t=null;#r=null;#o=null;#s=null;constructor(e,{origin:r,handler:n,dispatch:s},o){super(n),this.#s=r,this.#o=n,this.#t={...o},this.#e=e,this.#r=s}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#s,this.#t,(r,n)=>{if(r)return this.#o.onError(r);let s={...this.#t,origin:n};this.#r(s,this)});return}this.#o.onError(e);return}case"ENOTFOUND":this.#e.deleteRecord(this.#s);default:this.#o.onError(e);break}}};Mte.exports=t=>{if(t?.maxTTL!=null&&(typeof t?.maxTTL!="number"||t?.maxTTL<0))throw new gA("Invalid maxTTL. Must be a positive number");if(t?.maxItems!=null&&(typeof t?.maxItems!="number"||t?.maxItems<1))throw new gA("Invalid maxItems. Must be a positive number and greater than zero");if(t?.affinity!=null&&t?.affinity!==4&&t?.affinity!==6)throw new gA("Invalid affinity. Must be either 4 or 6");if(t?.dualStack!=null&&typeof t?.dualStack!="boolean")throw new gA("Invalid dualStack. Must be a boolean");if(t?.lookup!=null&&typeof t?.lookup!="function")throw new gA("Invalid lookup. Must be a function");if(t?.pick!=null&&typeof t?.pick!="function")throw new gA("Invalid pick. Must be a function");let e=t?.dualStack??!0,r;e?r=t?.affinity??null:r=t?.affinity??4;let n={maxTTL:t?.maxTTL??1e4,lookup:t?.lookup??null,pick:t?.pick??null,dualStack:e,affinity:r,maxItems:t?.maxItems??1/0},s=new Z1(n);return o=>i(function(c,l){let u=c.origin.constructor===URL?c.origin:new URL(c.origin);return LYe(u.hostname)!==0?o(c,l):(s.runLookup(u,c,(d,p)=>{if(d)return l.onError(d);let m=null;m={...c,servername:u.hostname,origin:p,headers:{host:u.hostname,...c.headers}},o(m,s.getHandler({origin:u,dispatch:o,handler:l},c))}),!0)},"dnsInterceptor")}});var Qp=I((_zt,Vte)=>{"use strict";var{kConstruct:UYe}=Lt(),{kEnumerableProperty:yA}=He(),{iteratorMixin:qYe,isValidHeaderName:AE,isValidHeaderValue:qte}=zs(),{webidl:Xe}=sn(),tU=require("node:assert"),zb=require("node:util"),Rr=Symbol("headers map"),Js=Symbol("headers map sorted");function Ute(t){return t===10||t===13||t===9||t===32}i(Ute,"isHTTPWhiteSpaceCharCode");function Gte(t){let e=0,r=t.length;for(;r>e&&Ute(t.charCodeAt(r-1));)--r;for(;r>e&&Ute(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}i(Gte,"headerValueNormalize");function Hte(t,e){if(Array.isArray(e))for(let r=0;r>","record"]})}i(Hte,"fill");function rU(t,e,r){if(r=Gte(r),AE(e)){if(!qte(r))throw Xe.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw Xe.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(zte(t)==="immutable")throw new TypeError("immutable");return nU(t).append(e,r,!1)}i(rU,"appendHeader");function $te(t,e){return t[0]>1),r[u][0]<=d[0]?l=u+1:c=u;if(o!==u){for(a=o;a>l;)r[a]=r[--a];r[l]=d}}if(!n.next().done)throw new TypeError("Unreachable");return r}else{let n=0;for(let{0:s,1:{value:o}}of this[Rr])r[n++]=[s,o],tU(o!==null);return r.sort($te)}}},vi=class t{static{i(this,"Headers")}#e;#t;constructor(e=void 0){Xe.util.markAsUncloneable(this),e!==UYe&&(this.#t=new Vb,this.#e="none",e!==void 0&&(e=Xe.converters.HeadersInit(e,"Headers contructor","init"),Hte(this,e)))}append(e,r){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,2,"Headers.append");let n="Headers.append";return e=Xe.converters.ByteString(e,n,"name"),r=Xe.converters.ByteString(r,n,"value"),rU(this,e,r)}delete(e){if(Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,1,"Headers.delete"),e=Xe.converters.ByteString(e,"Headers.delete","name"),!AE(e))throw Xe.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.contains(e,!1)&&this.#t.delete(e,!1)}get(e){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,1,"Headers.get");let r="Headers.get";if(e=Xe.converters.ByteString(e,r,"name"),!AE(e))throw Xe.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.get(e,!1)}has(e){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,1,"Headers.has");let r="Headers.has";if(e=Xe.converters.ByteString(e,r,"name"),!AE(e))throw Xe.errors.invalidArgument({prefix:r,value:e,type:"header name"});return this.#t.contains(e,!1)}set(e,r){Xe.brandCheck(this,t),Xe.argumentLengthCheck(arguments,2,"Headers.set");let n="Headers.set";if(e=Xe.converters.ByteString(e,n,"name"),r=Xe.converters.ByteString(r,n,"value"),r=Gte(r),AE(e)){if(!qte(r))throw Xe.errors.invalidArgument({prefix:n,value:r,type:"header value"})}else throw Xe.errors.invalidArgument({prefix:n,value:e,type:"header name"});if(this.#e==="immutable")throw new TypeError("immutable");this.#t.set(e,r,!1)}getSetCookie(){Xe.brandCheck(this,t);let e=this.#t.cookies;return e?[...e]:[]}get[Js](){if(this.#t[Js])return this.#t[Js];let e=[],r=this.#t.toSortedArray(),n=this.#t.cookies;if(n===null||n.length===1)return this.#t[Js]=r;for(let s=0;s>"](t,e,r,n.bind(t)):Xe.converters["record"](t,e,r)}throw Xe.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};Vte.exports={fill:Hte,compareHeaderName:$te,Headers:vi,HeadersList:Vb,getHeadersGuard:zte,setHeadersGuard:GYe,setHeadersList:HYe,getHeadersList:nU}});var gE=I((kzt,sre)=>{"use strict";var{Headers:Xte,HeadersList:Wte,fill:$Ye,getHeadersGuard:zYe,setHeadersGuard:Zte,setHeadersList:ere}=Qp(),{extractBody:Yte,cloneBody:VYe,mixinBody:WYe,hasFinalizationRegistry:tre,streamRegistry:rre,bodyUnusable:YYe}=Xf(),sU=He(),Jte=require("node:util"),{kEnumerableProperty:js}=sU,{isValidReasonPhrase:JYe,isCancelled:jYe,isAborted:KYe,isBlobLike:XYe,serializeJavascriptValueToJSONString:ZYe,isErrorLike:eJe,isomorphicEncode:tJe,environmentSettingsObject:rJe}=zs(),{redirectStatusSet:nJe,nullBodyStatus:sJe}=Uy(),{kState:Mt,kHeaders:Il}=Eu(),{webidl:Fe}=sn(),{FormData:oJe}=Vy(),{URLSerializer:jte}=ms(),{kConstruct:Yb}=Lt(),oU=require("node:assert"),{types:iJe}=require("node:util"),aJe=new TextEncoder("utf-8"),_p=class t{static{i(this,"Response")}static error(){return hE(Jb(),"immutable")}static json(e,r={}){Fe.argumentLengthCheck(arguments,1,"Response.json"),r!==null&&(r=Fe.converters.ResponseInit(r));let n=aJe.encode(ZYe(e)),s=Yte(n),o=hE(EA({}),"response");return Kte(o,r,{body:s[0],type:"application/json"}),o}static redirect(e,r=302){Fe.argumentLengthCheck(arguments,1,"Response.redirect"),e=Fe.converters.USVString(e),r=Fe.converters["unsigned short"](r);let n;try{n=new URL(e,rJe.settingsObject.baseUrl)}catch(a){throw new TypeError(`Failed to parse URL from ${e}`,{cause:a})}if(!nJe.has(r))throw new RangeError(`Invalid status code ${r}`);let s=hE(EA({}),"immutable");s[Mt].status=r;let o=tJe(jte(n));return s[Mt].headersList.append("location",o,!0),s}constructor(e=null,r={}){if(Fe.util.markAsUncloneable(this),e===Yb)return;e!==null&&(e=Fe.converters.BodyInit(e)),r=Fe.converters.ResponseInit(r),this[Mt]=EA({}),this[Il]=new Xte(Yb),Zte(this[Il],"response"),ere(this[Il],this[Mt].headersList);let n=null;if(e!=null){let[s,o]=Yte(e);n={body:s,type:o}}Kte(this,r,n)}get type(){return Fe.brandCheck(this,t),this[Mt].type}get url(){Fe.brandCheck(this,t);let e=this[Mt].urlList,r=e[e.length-1]??null;return r===null?"":jte(r,!0)}get redirected(){return Fe.brandCheck(this,t),this[Mt].urlList.length>1}get status(){return Fe.brandCheck(this,t),this[Mt].status}get ok(){return Fe.brandCheck(this,t),this[Mt].status>=200&&this[Mt].status<=299}get statusText(){return Fe.brandCheck(this,t),this[Mt].statusText}get headers(){return Fe.brandCheck(this,t),this[Il]}get body(){return Fe.brandCheck(this,t),this[Mt].body?this[Mt].body.stream:null}get bodyUsed(){return Fe.brandCheck(this,t),!!this[Mt].body&&sU.isDisturbed(this[Mt].body.stream)}clone(){if(Fe.brandCheck(this,t),YYe(this))throw Fe.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=iU(this[Mt]);return tre&&this[Mt].body?.stream&&rre.register(this,new WeakRef(this[Mt].body.stream)),hE(e,zYe(this[Il]))}[Jte.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${Jte.formatWithOptions(r,n)}`}};WYe(_p);Object.defineProperties(_p.prototype,{type:js,url:js,status:js,ok:js,redirected:js,statusText:js,headers:js,clone:js,body:js,bodyUsed:js,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(_p,{json:js,redirect:js,error:js});function iU(t){if(t.internalResponse)return nre(iU(t.internalResponse),t.type);let e=EA({...t,body:null});return t.body!=null&&(e.body=VYe(e,t.body)),e}i(iU,"cloneResponse");function EA(t){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...t,headersList:t?.headersList?new Wte(t?.headersList):new Wte,urlList:t?.urlList?[...t.urlList]:[]}}i(EA,"makeResponse");function Jb(t){let e=eJe(t);return EA({type:"error",status:0,error:e?t:new Error(t&&String(t)),aborted:t&&t.name==="AbortError"})}i(Jb,"makeNetworkError");function cJe(t){return t.type==="error"&&t.status===0}i(cJe,"isNetworkError");function Wb(t,e){return e={internalResponse:t,...e},new Proxy(t,{get(r,n){return n in e?e[n]:r[n]},set(r,n,s){return oU(!(n in e)),r[n]=s,!0}})}i(Wb,"makeFilteredResponse");function nre(t,e){if(e==="basic")return Wb(t,{type:"basic",headersList:t.headersList});if(e==="cors")return Wb(t,{type:"cors",headersList:t.headersList});if(e==="opaque")return Wb(t,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(e==="opaqueredirect")return Wb(t,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});oU(!1)}i(nre,"filterResponse");function lJe(t,e=null){return oU(jYe(t)),KYe(t)?Jb(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:e})):Jb(Object.assign(new DOMException("Request was cancelled."),{cause:e}))}i(lJe,"makeAppropriateNetworkError");function Kte(t,e,r){if(e.status!==null&&(e.status<200||e.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in e&&e.statusText!=null&&!JYe(String(e.statusText)))throw new TypeError("Invalid statusText");if("status"in e&&e.status!=null&&(t[Mt].status=e.status),"statusText"in e&&e.statusText!=null&&(t[Mt].statusText=e.statusText),"headers"in e&&e.headers!=null&&$Ye(t[Il],e.headers),r){if(sJe.includes(t.status))throw Fe.errors.exception({header:"Response constructor",message:`Invalid response status code ${t.status}`});t[Mt].body=r.body,r.type!=null&&!t[Mt].headersList.contains("content-type",!0)&&t[Mt].headersList.append("content-type",r.type,!0)}}i(Kte,"initializeResponse");function hE(t,e){let r=new _p(Yb);return r[Mt]=t,r[Il]=new Xte(Yb),ere(r[Il],t.headersList),Zte(r[Il],e),tre&&t.body?.stream&&rre.register(r,new WeakRef(t.body.stream)),r}i(hE,"fromInnerResponse");Fe.converters.ReadableStream=Fe.interfaceConverter(ReadableStream);Fe.converters.FormData=Fe.interfaceConverter(oJe);Fe.converters.URLSearchParams=Fe.interfaceConverter(URLSearchParams);Fe.converters.XMLHttpRequestBodyInit=function(t,e,r){return typeof t=="string"?Fe.converters.USVString(t,e,r):XYe(t)?Fe.converters.Blob(t,e,r,{strict:!1}):ArrayBuffer.isView(t)||iJe.isArrayBuffer(t)?Fe.converters.BufferSource(t,e,r):sU.isFormDataLike(t)?Fe.converters.FormData(t,e,r,{strict:!1}):t instanceof URLSearchParams?Fe.converters.URLSearchParams(t,e,r):Fe.converters.DOMString(t,e,r)};Fe.converters.BodyInit=function(t,e,r){return t instanceof ReadableStream?Fe.converters.ReadableStream(t,e,r):t?.[Symbol.asyncIterator]?t:Fe.converters.XMLHttpRequestBodyInit(t,e,r)};Fe.converters.ResponseInit=Fe.dictionaryConverter([{key:"status",converter:Fe.converters["unsigned short"],defaultValue:i(()=>200,"defaultValue")},{key:"statusText",converter:Fe.converters.ByteString,defaultValue:i(()=>"","defaultValue")},{key:"headers",converter:Fe.converters.HeadersInit}]);sre.exports={isNetworkError:cJe,makeNetworkError:Jb,makeResponse:EA,makeAppropriateNetworkError:lJe,filterResponse:nre,Response:_p,cloneResponse:iU,fromInnerResponse:hE}});var cre=I((Ozt,are)=>{"use strict";var{kConnected:ore,kSize:ire}=Lt(),aU=class{static{i(this,"CompatWeakRef")}constructor(e){this.value=e}deref(){return this.value[ore]===0&&this.value[ire]===0?void 0:this.value}},cU=class{static{i(this,"CompatFinalizer")}constructor(e){this.finalizer=e}register(e,r){e.on&&e.on("disconnect",()=>{e[ore]===0&&e[ire]===0&&this.finalizer(r)})}unregister(e){}};are.exports=function(){return process.env.NODE_V8_COVERAGE&&process.version.startsWith("v18")?(process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"),{WeakRef:aU,FinalizationRegistry:cU}):{WeakRef,FinalizationRegistry}}});var CA=I((Fzt,Sre)=>{"use strict";var{extractBody:uJe,mixinBody:dJe,cloneBody:pJe,bodyUnusable:lre}=Xf(),{Headers:yre,fill:mJe,HeadersList:Zb,setHeadersGuard:uU,getHeadersGuard:fJe,setHeadersList:Ere,getHeadersList:ure}=Qp(),{FinalizationRegistry:AJe}=cre()(),Kb=He(),dre=require("node:util"),{isValidHTTPToken:hJe,sameOrigin:pre,environmentSettingsObject:jb}=zs(),{forbiddenMethodsSet:gJe,corsSafeListedMethodsSet:yJe,referrerPolicy:EJe,requestRedirect:CJe,requestMode:IJe,requestCredentials:wJe,requestCache:SJe,requestDuplex:xJe}=Uy(),{kEnumerableProperty:Nr,normalizedMethodRecordsBase:bJe,normalizedMethodRecords:BJe}=Kb,{kHeaders:Ks,kSignal:Xb,kState:Tt,kDispatcher:lU}=Eu(),{webidl:Ce}=sn(),{URLSerializer:RJe}=ms(),{kConstruct:e0}=Lt(),NJe=require("node:assert"),{getMaxListeners:mre,setMaxListeners:fre,getEventListeners:TJe,defaultMaxListeners:Are}=require("node:events"),vJe=Symbol("abortController"),Cre=new AJe(({signal:t,abort:e})=>{t.removeEventListener("abort",e)}),t0=new WeakMap;function hre(t){return e;function e(){let r=t.deref();if(r!==void 0){Cre.unregister(e),this.removeEventListener("abort",e),r.abort(this.reason);let n=t0.get(r.signal);if(n!==void 0){if(n.size!==0){for(let s of n){let o=s.deref();o!==void 0&&o.abort(this.reason)}n.clear()}t0.delete(r.signal)}}}}i(hre,"buildAbort");var gre=!1,vu=class t{static{i(this,"Request")}constructor(e,r={}){if(Ce.util.markAsUncloneable(this),e===e0)return;let n="Request constructor";Ce.argumentLengthCheck(arguments,1,n),e=Ce.converters.RequestInfo(e,n,"input"),r=Ce.converters.RequestInit(r,n,"init");let s=null,o=null,a=jb.settingsObject.baseUrl,c=null;if(typeof e=="string"){this[lU]=r.dispatcher;let C;try{C=new URL(e,a)}catch(w){throw new TypeError("Failed to parse URL from "+e,{cause:w})}if(C.username||C.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+e);s=r0({urlList:[C]}),o="cors"}else this[lU]=r.dispatcher||e[lU],NJe(e instanceof t),s=e[Tt],c=e[Xb];let l=jb.settingsObject.origin,u="client";if(s.window?.constructor?.name==="EnvironmentSettingsObject"&&pre(s.window,l)&&(u=s.window),r.window!=null)throw new TypeError(`'window' option '${u}' must be null`);"window"in r&&(u="no-window"),s=r0({method:s.method,headersList:s.headersList,unsafeRequest:s.unsafeRequest,client:jb.settingsObject,window:u,priority:s.priority,origin:s.origin,referrer:s.referrer,referrerPolicy:s.referrerPolicy,mode:s.mode,credentials:s.credentials,cache:s.cache,redirect:s.redirect,integrity:s.integrity,keepalive:s.keepalive,reloadNavigation:s.reloadNavigation,historyNavigation:s.historyNavigation,urlList:[...s.urlList]});let d=Object.keys(r).length!==0;if(d&&(s.mode==="navigate"&&(s.mode="same-origin"),s.reloadNavigation=!1,s.historyNavigation=!1,s.origin="client",s.referrer="client",s.referrerPolicy="",s.url=s.urlList[s.urlList.length-1],s.urlList=[s.url]),r.referrer!==void 0){let C=r.referrer;if(C==="")s.referrer="no-referrer";else{let w;try{w=new URL(C,a)}catch(x){throw new TypeError(`Referrer "${C}" is not a valid URL.`,{cause:x})}w.protocol==="about:"&&w.hostname==="client"||l&&!pre(w,jb.settingsObject.baseUrl)?s.referrer="client":s.referrer=w}}r.referrerPolicy!==void 0&&(s.referrerPolicy=r.referrerPolicy);let p;if(r.mode!==void 0?p=r.mode:p=o,p==="navigate")throw Ce.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(p!=null&&(s.mode=p),r.credentials!==void 0&&(s.credentials=r.credentials),r.cache!==void 0&&(s.cache=r.cache),s.cache==="only-if-cached"&&s.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(r.redirect!==void 0&&(s.redirect=r.redirect),r.integrity!=null&&(s.integrity=String(r.integrity)),r.keepalive!==void 0&&(s.keepalive=!!r.keepalive),r.method!==void 0){let C=r.method,w=BJe[C];if(w!==void 0)s.method=w;else{if(!hJe(C))throw new TypeError(`'${C}' is not a valid HTTP method.`);let x=C.toUpperCase();if(gJe.has(x))throw new TypeError(`'${C}' HTTP method is unsupported.`);C=bJe[x]??C,s.method=C}!gre&&s.method==="patch"&&(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),gre=!0)}r.signal!==void 0&&(c=r.signal),this[Tt]=s;let m=new AbortController;if(this[Xb]=m.signal,c!=null){if(!c||typeof c.aborted!="boolean"||typeof c.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(c.aborted)m.abort(c.reason);else{this[vJe]=m;let C=new WeakRef(m),w=hre(C);try{(typeof mre=="function"&&mre(c)===Are||TJe(c,"abort").length>=Are)&&fre(1500,c)}catch{}Kb.addAbortListener(c,w),Cre.register(m,{signal:c,abort:w},w)}}if(this[Ks]=new yre(e0),Ere(this[Ks],s.headersList),uU(this[Ks],"request"),p==="no-cors"){if(!yJe.has(s.method))throw new TypeError(`'${s.method} is unsupported in no-cors mode.`);uU(this[Ks],"request-no-cors")}if(d){let C=ure(this[Ks]),w=r.headers!==void 0?r.headers:new Zb(C);if(C.clear(),w instanceof Zb){for(let{name:x,value:b}of w.rawValues())C.append(x,b,!1);C.cookies=w.cookies}else mJe(this[Ks],w)}let f=e instanceof t?e[Tt].body:null;if((r.body!=null||f!=null)&&(s.method==="GET"||s.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let A=null;if(r.body!=null){let[C,w]=uJe(r.body,s.keepalive);A=C,w&&!ure(this[Ks]).contains("content-type",!0)&&this[Ks].append("content-type",w)}let h=A??f;if(h!=null&&h.source==null){if(A!=null&&r.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(s.mode!=="same-origin"&&s.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');s.useCORSPreflightFlag=!0}let E=h;if(A==null&&f!=null){if(lre(e))throw new TypeError("Cannot construct a Request with a Request object that has already been used.");let C=new TransformStream;f.stream.pipeThrough(C),E={source:f.source,length:f.length,stream:C.readable}}this[Tt].body=E}get method(){return Ce.brandCheck(this,t),this[Tt].method}get url(){return Ce.brandCheck(this,t),RJe(this[Tt].url)}get headers(){return Ce.brandCheck(this,t),this[Ks]}get destination(){return Ce.brandCheck(this,t),this[Tt].destination}get referrer(){return Ce.brandCheck(this,t),this[Tt].referrer==="no-referrer"?"":this[Tt].referrer==="client"?"about:client":this[Tt].referrer.toString()}get referrerPolicy(){return Ce.brandCheck(this,t),this[Tt].referrerPolicy}get mode(){return Ce.brandCheck(this,t),this[Tt].mode}get credentials(){return this[Tt].credentials}get cache(){return Ce.brandCheck(this,t),this[Tt].cache}get redirect(){return Ce.brandCheck(this,t),this[Tt].redirect}get integrity(){return Ce.brandCheck(this,t),this[Tt].integrity}get keepalive(){return Ce.brandCheck(this,t),this[Tt].keepalive}get isReloadNavigation(){return Ce.brandCheck(this,t),this[Tt].reloadNavigation}get isHistoryNavigation(){return Ce.brandCheck(this,t),this[Tt].historyNavigation}get signal(){return Ce.brandCheck(this,t),this[Xb]}get body(){return Ce.brandCheck(this,t),this[Tt].body?this[Tt].body.stream:null}get bodyUsed(){return Ce.brandCheck(this,t),!!this[Tt].body&&Kb.isDisturbed(this[Tt].body.stream)}get duplex(){return Ce.brandCheck(this,t),"half"}clone(){if(Ce.brandCheck(this,t),lre(this))throw new TypeError("unusable");let e=Ire(this[Tt]),r=new AbortController;if(this.signal.aborted)r.abort(this.signal.reason);else{let n=t0.get(this.signal);n===void 0&&(n=new Set,t0.set(this.signal,n));let s=new WeakRef(r);n.add(s),Kb.addAbortListener(r.signal,hre(s))}return wre(e,r.signal,fJe(this[Ks]))}[dre.inspect.custom](e,r){r.depth===null&&(r.depth=2),r.colors??=!0;let n={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${dre.formatWithOptions(r,n)}`}};dJe(vu);function r0(t){return{method:t.method??"GET",localURLsOnly:t.localURLsOnly??!1,unsafeRequest:t.unsafeRequest??!1,body:t.body??null,client:t.client??null,reservedClient:t.reservedClient??null,replacesClientId:t.replacesClientId??"",window:t.window??"client",keepalive:t.keepalive??!1,serviceWorkers:t.serviceWorkers??"all",initiator:t.initiator??"",destination:t.destination??"",priority:t.priority??null,origin:t.origin??"client",policyContainer:t.policyContainer??"client",referrer:t.referrer??"client",referrerPolicy:t.referrerPolicy??"",mode:t.mode??"no-cors",useCORSPreflightFlag:t.useCORSPreflightFlag??!1,credentials:t.credentials??"same-origin",useCredentials:t.useCredentials??!1,cache:t.cache??"default",redirect:t.redirect??"follow",integrity:t.integrity??"",cryptoGraphicsNonceMetadata:t.cryptoGraphicsNonceMetadata??"",parserMetadata:t.parserMetadata??"",reloadNavigation:t.reloadNavigation??!1,historyNavigation:t.historyNavigation??!1,userActivation:t.userActivation??!1,taintedOrigin:t.taintedOrigin??!1,redirectCount:t.redirectCount??0,responseTainting:t.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:t.preventNoCacheCacheControlHeaderModification??!1,done:t.done??!1,timingAllowFailed:t.timingAllowFailed??!1,urlList:t.urlList,url:t.urlList[0],headersList:t.headersList?new Zb(t.headersList):new Zb}}i(r0,"makeRequest");function Ire(t){let e=r0({...t,body:null});return t.body!=null&&(e.body=pJe(e,t.body)),e}i(Ire,"cloneRequest");function wre(t,e,r){let n=new vu(e0);return n[Tt]=t,n[Xb]=e,n[Ks]=new yre(e0),Ere(n[Ks],t.headersList),uU(n[Ks],r),n}i(wre,"fromInnerRequest");Object.defineProperties(vu.prototype,{method:Nr,url:Nr,headers:Nr,redirect:Nr,clone:Nr,signal:Nr,duplex:Nr,destination:Nr,body:Nr,bodyUsed:Nr,isHistoryNavigation:Nr,isReloadNavigation:Nr,keepalive:Nr,integrity:Nr,cache:Nr,credentials:Nr,attribute:Nr,referrerPolicy:Nr,referrer:Nr,mode:Nr,[Symbol.toStringTag]:{value:"Request",configurable:!0}});Ce.converters.Request=Ce.interfaceConverter(vu);Ce.converters.RequestInfo=function(t,e,r){return typeof t=="string"?Ce.converters.USVString(t,e,r):t instanceof vu?Ce.converters.Request(t,e,r):Ce.converters.USVString(t,e,r)};Ce.converters.AbortSignal=Ce.interfaceConverter(AbortSignal);Ce.converters.RequestInit=Ce.dictionaryConverter([{key:"method",converter:Ce.converters.ByteString},{key:"headers",converter:Ce.converters.HeadersInit},{key:"body",converter:Ce.nullableConverter(Ce.converters.BodyInit)},{key:"referrer",converter:Ce.converters.USVString},{key:"referrerPolicy",converter:Ce.converters.DOMString,allowedValues:EJe},{key:"mode",converter:Ce.converters.DOMString,allowedValues:IJe},{key:"credentials",converter:Ce.converters.DOMString,allowedValues:wJe},{key:"cache",converter:Ce.converters.DOMString,allowedValues:SJe},{key:"redirect",converter:Ce.converters.DOMString,allowedValues:CJe},{key:"integrity",converter:Ce.converters.DOMString},{key:"keepalive",converter:Ce.converters.boolean},{key:"signal",converter:Ce.nullableConverter(t=>Ce.converters.AbortSignal(t,"RequestInit","signal",{strict:!1}))},{key:"window",converter:Ce.converters.any},{key:"duplex",converter:Ce.converters.DOMString,allowedValues:xJe},{key:"dispatcher",converter:Ce.converters.any}]);Sre.exports={Request:vu,makeRequest:r0,fromInnerRequest:wre,cloneRequest:Ire}});var EE=I((qzt,Mre)=>{"use strict";var{makeNetworkError:dt,makeAppropriateNetworkError:n0,filterResponse:dU,makeResponse:s0,fromInnerResponse:PJe}=gE(),{HeadersList:xre}=Qp(),{Request:QJe,cloneRequest:_Je}=CA(),Pu=require("node:zlib"),{bytesMatch:DJe,makePolicyContainer:kJe,clonePolicyContainer:LJe,requestBadPort:OJe,TAOCheck:MJe,appendRequestOriginHeader:FJe,responseLocationURL:UJe,requestCurrentURL:Qa,setRequestReferrerPolicyOnRedirect:qJe,tryUpgradeRequestToAPotentiallyTrustworthyURL:GJe,createOpaqueTimingInfo:hU,appendFetchMetadata:HJe,corsCheck:$Je,crossOriginResourcePolicyCheck:zJe,determineRequestsReferrer:VJe,coarsenedSharedCurrentTime:yE,createDeferredPromise:WJe,isBlobLike:YJe,sameOrigin:AU,isCancelled:Dp,isAborted:bre,isErrorLike:JJe,fullyReadBody:jJe,readableStreamClose:KJe,isomorphicEncode:o0,urlIsLocal:XJe,urlIsHttpHttpsScheme:gU,urlHasHttpsScheme:ZJe,clampAndCoarsenConnectionTimingInfo:e8e,simpleRangeHeaderValue:t8e,buildContentRange:r8e,createInflate:n8e,extractMimeType:s8e}=zs(),{kState:Tre,kDispatcher:o8e}=Eu(),kp=require("node:assert"),{safelyExtractBody:yU,extractBody:Bre}=Xf(),{redirectStatusSet:vre,nullBodyStatus:Pre,safeMethodsSet:i8e,requestBodyHeader:a8e,subresourceSet:c8e}=Uy(),l8e=require("node:events"),{Readable:u8e,pipeline:d8e,finished:p8e}=require("node:stream"),{addAbortListener:m8e,isErrored:f8e,isReadable:i0,bufferToLowerCasedHeaderName:Rre}=He(),{dataURLProcessor:A8e,serializeAMimeType:h8e,minimizeSupportedMimeType:g8e}=ms(),{getGlobalDispatcher:y8e}=Hb(),{webidl:E8e}=sn(),{STATUS_CODES:C8e}=require("node:http"),I8e=["GET","HEAD"],w8e=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",pU,a0=class extends l8e{static{i(this,"Fetch")}constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(e){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){this.state==="ongoing"&&(this.state="aborted",e||(e=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}};function S8e(t){Qre(t,"fetch")}i(S8e,"handleFetchDone");function x8e(t,e=void 0){E8e.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=WJe(),n;try{n=new QJe(t,e)}catch(d){return r.reject(d),r.promise}let s=n[Tre];if(n.signal.aborted)return mU(r,s,null,n.signal.reason),r.promise;s.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(s.serviceWorkers="none");let a=null,c=!1,l=null;return m8e(n.signal,()=>{c=!0,kp(l!=null),l.abort(n.signal.reason);let d=a?.deref();mU(r,s,d,n.signal.reason)}),l=Dre({request:s,processResponseEndOfBody:S8e,processResponse:i(d=>{if(!c){if(d.aborted){mU(r,s,a,l.serializedAbortReason);return}if(d.type==="error"){r.reject(new TypeError("fetch failed",{cause:d.error}));return}a=new WeakRef(PJe(d,"immutable")),r.resolve(a.deref()),r=null}},"processResponse"),dispatcher:n[o8e]}),r.promise}i(x8e,"fetch");function Qre(t,e="other"){if(t.type==="error"&&t.aborted||!t.urlList?.length)return;let r=t.urlList[0],n=t.timingInfo,s=t.cacheState;gU(r)&&n!==null&&(t.timingAllowPassed||(n=hU({startTime:n.startTime}),s=""),n.endTime=yE(),t.timingInfo=n,_re(n,r.href,e,globalThis,s))}i(Qre,"finalizeAndReportTiming");var _re=performance.markResourceTiming;function mU(t,e,r,n){if(t&&t.reject(n),e.body!=null&&i0(e.body?.stream)&&e.body.stream.cancel(n).catch(o=>{if(o.code!=="ERR_INVALID_STATE")throw o}),r==null)return;let s=r[Tre];s.body!=null&&i0(s.body?.stream)&&s.body.stream.cancel(n).catch(o=>{if(o.code!=="ERR_INVALID_STATE")throw o})}i(mU,"abortFetch");function Dre({request:t,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseEndOfBody:s,processResponseConsumeBody:o,useParallelQueue:a=!1,dispatcher:c=y8e()}){kp(c);let l=null,u=!1;t.client!=null&&(l=t.client.globalObject,u=t.client.crossOriginIsolatedCapability);let d=yE(u),p=hU({startTime:d}),m={controller:new a0(c),request:t,timingInfo:p,processRequestBodyChunkLength:e,processRequestEndOfBody:r,processResponse:n,processResponseConsumeBody:o,processResponseEndOfBody:s,taskDestination:l,crossOriginIsolatedCapability:u};return kp(!t.body||t.body.stream),t.window==="client"&&(t.window=t.client?.globalObject?.constructor?.name==="Window"?t.client:"no-window"),t.origin==="client"&&(t.origin=t.client.origin),t.policyContainer==="client"&&(t.client!=null?t.policyContainer=LJe(t.client.policyContainer):t.policyContainer=kJe()),t.headersList.contains("accept",!0)||t.headersList.append("accept","*/*",!0),t.headersList.contains("accept-language",!0)||t.headersList.append("accept-language","*",!0),t.priority,c8e.has(t.destination),kre(m).catch(f=>{m.controller.terminate(f)}),m.controller}i(Dre,"fetching");async function kre(t,e=!1){let r=t.request,n=null;if(r.localURLsOnly&&!XJe(Qa(r))&&(n=dt("local URLs only")),GJe(r),OJe(r)==="blocked"&&(n=dt("bad port")),r.referrerPolicy===""&&(r.referrerPolicy=r.policyContainer.referrerPolicy),r.referrer!=="no-referrer"&&(r.referrer=VJe(r)),n===null&&(n=await(async()=>{let o=Qa(r);return AU(o,r.url)&&r.responseTainting==="basic"||o.protocol==="data:"||r.mode==="navigate"||r.mode==="websocket"?(r.responseTainting="basic",await Nre(t)):r.mode==="same-origin"?dt('request mode cannot be "same-origin"'):r.mode==="no-cors"?r.redirect!=="follow"?dt('redirect mode cannot be "follow" for "no-cors" request'):(r.responseTainting="opaque",await Nre(t)):gU(Qa(r))?(r.responseTainting="cors",await Lre(t)):dt("URL scheme must be a HTTP(S) scheme")})()),e)return n;n.status!==0&&!n.internalResponse&&(r.responseTainting,r.responseTainting==="basic"?n=dU(n,"basic"):r.responseTainting==="cors"?n=dU(n,"cors"):r.responseTainting==="opaque"?n=dU(n,"opaque"):kp(!1));let s=n.status===0?n:n.internalResponse;if(s.urlList.length===0&&s.urlList.push(...r.urlList),r.timingAllowFailed||(n.timingAllowPassed=!0),n.type==="opaque"&&s.status===206&&s.rangeRequested&&!r.headers.contains("range",!0)&&(n=s=dt()),n.status!==0&&(r.method==="HEAD"||r.method==="CONNECT"||Pre.includes(s.status))&&(s.body=null,t.controller.dump=!0),r.integrity){let o=i(c=>fU(t,dt(c)),"processBodyError");if(r.responseTainting==="opaque"||n.body==null){o(n.error);return}let a=i(c=>{if(!DJe(c,r.integrity)){o("integrity mismatch");return}n.body=yU(c)[0],fU(t,n)},"processBody");await jJe(n.body,a,o)}else fU(t,n)}i(kre,"mainFetch");function Nre(t){if(Dp(t)&&t.request.redirectCount===0)return Promise.resolve(n0(t));let{request:e}=t,{protocol:r}=Qa(e);switch(r){case"about:":return Promise.resolve(dt("about scheme is not supported"));case"blob:":{pU||(pU=require("node:buffer").resolveObjectURL);let n=Qa(e);if(n.search.length!==0)return Promise.resolve(dt("NetworkError when attempting to fetch resource."));let s=pU(n.toString());if(e.method!=="GET"||!YJe(s))return Promise.resolve(dt("invalid method"));let o=s0(),a=s.size,c=o0(`${a}`),l=s.type;if(e.headersList.contains("range",!0)){o.rangeRequested=!0;let u=e.headersList.get("range",!0),d=t8e(u,!0);if(d==="failure")return Promise.resolve(dt("failed to fetch the data URL"));let{rangeStartValue:p,rangeEndValue:m}=d;if(p===null)p=a-m,m=p+m-1;else{if(p>=a)return Promise.resolve(dt("Range start is greater than the blob's size."));(m===null||m>=a)&&(m=a-1)}let f=s.slice(p,m,l),A=Bre(f);o.body=A[0];let h=o0(`${f.size}`),E=r8e(p,m,a);o.status=206,o.statusText="Partial Content",o.headersList.set("content-length",h,!0),o.headersList.set("content-type",l,!0),o.headersList.set("content-range",E,!0)}else{let u=Bre(s);o.statusText="OK",o.body=u[0],o.headersList.set("content-length",c,!0),o.headersList.set("content-type",l,!0)}return Promise.resolve(o)}case"data:":{let n=Qa(e),s=A8e(n);if(s==="failure")return Promise.resolve(dt("failed to fetch the data URL"));let o=h8e(s.mimeType);return Promise.resolve(s0({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:o}]],body:yU(s.body)[0]}))}case"file:":return Promise.resolve(dt("not implemented... yet..."));case"http:":case"https:":return Lre(t).catch(n=>dt(n));default:return Promise.resolve(dt("unknown scheme"))}}i(Nre,"schemeFetch");function b8e(t,e){t.request.done=!0,t.processResponseDone!=null&&queueMicrotask(()=>t.processResponseDone(e))}i(b8e,"finalizeResponse");function fU(t,e){let r=t.timingInfo,n=i(()=>{let o=Date.now();t.request.destination==="document"&&(t.controller.fullTimingInfo=r),t.controller.reportTimingSteps=()=>{if(t.request.url.protocol!=="https:")return;r.endTime=o;let c=e.cacheState,l=e.bodyInfo;e.timingAllowPassed||(r=hU(r),c="");let u=0;if(t.request.mode!=="navigator"||!e.hasCrossOriginRedirects){u=e.status;let d=s8e(e.headersList);d!=="failure"&&(l.contentType=g8e(d))}t.request.initiatorType!=null&&_re(r,t.request.url.href,t.request.initiatorType,globalThis,c,l,u)};let a=i(()=>{t.request.done=!0,t.processResponseEndOfBody!=null&&queueMicrotask(()=>t.processResponseEndOfBody(e)),t.request.initiatorType!=null&&t.controller.reportTimingSteps()},"processResponseEndOfBodyTask");queueMicrotask(()=>a())},"processResponseEndOfBody");t.processResponse!=null&&queueMicrotask(()=>{t.processResponse(e),t.processResponse=null});let s=e.type==="error"?e:e.internalResponse??e;s.body==null?n():p8e(s.body.stream,()=>{n()})}i(fU,"fetchFinale");async function Lre(t){let e=t.request,r=null,n=null,s=t.timingInfo;if(e.serviceWorkers,r===null){if(e.redirect==="follow"&&(e.serviceWorkers="none"),n=r=await Ore(t),e.responseTainting==="cors"&&$Je(e,r)==="failure")return dt("cors failure");MJe(e,r)==="failure"&&(e.timingAllowFailed=!0)}return(e.responseTainting==="opaque"||r.type==="opaque")&&zJe(e.origin,e.client,e.destination,n)==="blocked"?dt("blocked"):(vre.has(n.status)&&(e.redirect!=="manual"&&t.controller.connection.destroy(void 0,!1),e.redirect==="error"?r=dt("unexpected redirect"):e.redirect==="manual"?r=n:e.redirect==="follow"?r=await B8e(t,r):kp(!1)),r.timingInfo=s,r)}i(Lre,"httpFetch");function B8e(t,e){let r=t.request,n=e.internalResponse?e.internalResponse:e,s;try{if(s=UJe(n,Qa(r).hash),s==null)return e}catch(a){return Promise.resolve(dt(a))}if(!gU(s))return Promise.resolve(dt("URL scheme must be a HTTP(S) scheme"));if(r.redirectCount===20)return Promise.resolve(dt("redirect count exceeded"));if(r.redirectCount+=1,r.mode==="cors"&&(s.username||s.password)&&!AU(r,s))return Promise.resolve(dt('cross origin not allowed for request mode "cors"'));if(r.responseTainting==="cors"&&(s.username||s.password))return Promise.resolve(dt('URL cannot contain credentials for request mode "cors"'));if(n.status!==303&&r.body!=null&&r.body.source==null)return Promise.resolve(dt());if([301,302].includes(n.status)&&r.method==="POST"||n.status===303&&!I8e.includes(r.method)){r.method="GET",r.body=null;for(let a of a8e)r.headersList.delete(a)}AU(Qa(r),s)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),r.body!=null&&(kp(r.body.source!=null),r.body=yU(r.body.source)[0]);let o=t.timingInfo;return o.redirectEndTime=o.postRedirectStartTime=yE(t.crossOriginIsolatedCapability),o.redirectStartTime===0&&(o.redirectStartTime=o.startTime),r.urlList.push(s),qJe(r,n),kre(t,!0)}i(B8e,"httpRedirectFetch");async function Ore(t,e=!1,r=!1){let n=t.request,s=null,o=null,a=null,c=null,l=!1;n.window==="no-window"&&n.redirect==="error"?(s=t,o=n):(o=_Je(n),s={...t},s.request=o);let u=n.credentials==="include"||n.credentials==="same-origin"&&n.responseTainting==="basic",d=o.body?o.body.length:null,p=null;if(o.body==null&&["POST","PUT"].includes(o.method)&&(p="0"),d!=null&&(p=o0(`${d}`)),p!=null&&o.headersList.append("content-length",p,!0),d!=null&&o.keepalive,o.referrer instanceof URL&&o.headersList.append("referer",o0(o.referrer.href),!0),FJe(o),HJe(o),o.headersList.contains("user-agent",!0)||o.headersList.append("user-agent",w8e),o.cache==="default"&&(o.headersList.contains("if-modified-since",!0)||o.headersList.contains("if-none-match",!0)||o.headersList.contains("if-unmodified-since",!0)||o.headersList.contains("if-match",!0)||o.headersList.contains("if-range",!0))&&(o.cache="no-store"),o.cache==="no-cache"&&!o.preventNoCacheCacheControlHeaderModification&&!o.headersList.contains("cache-control",!0)&&o.headersList.append("cache-control","max-age=0",!0),(o.cache==="no-store"||o.cache==="reload")&&(o.headersList.contains("pragma",!0)||o.headersList.append("pragma","no-cache",!0),o.headersList.contains("cache-control",!0)||o.headersList.append("cache-control","no-cache",!0)),o.headersList.contains("range",!0)&&o.headersList.append("accept-encoding","identity",!0),o.headersList.contains("accept-encoding",!0)||(ZJe(Qa(o))?o.headersList.append("accept-encoding","br, gzip, deflate",!0):o.headersList.append("accept-encoding","gzip, deflate",!0)),o.headersList.delete("host",!0),c==null&&(o.cache="no-store"),o.cache!=="no-store"&&o.cache,a==null){if(o.cache==="only-if-cached")return dt("only if cached");let m=await R8e(s,u,r);!i8e.has(o.method)&&m.status>=200&&m.status<=399,l&&m.status,a==null&&(a=m)}if(a.urlList=[...o.urlList],o.headersList.contains("range",!0)&&(a.rangeRequested=!0),a.requestIncludesCredentials=u,a.status===407)return n.window==="no-window"?dt():Dp(t)?n0(t):dt("proxy authentication required");if(a.status===421&&!r&&(n.body==null||n.body.source!=null)){if(Dp(t))return n0(t);t.controller.connection.destroy(),a=await Ore(t,e,!0)}return a}i(Ore,"httpNetworkOrCacheFetch");async function R8e(t,e=!1,r=!1){kp(!t.controller.connection||t.controller.connection.destroyed),t.controller.connection={abort:null,destroyed:!1,destroy(A,h=!0){this.destroyed||(this.destroyed=!0,h&&this.abort?.(A??new DOMException("The operation was aborted.","AbortError")))}};let n=t.request,s=null,o=t.timingInfo;null==null&&(n.cache="no-store");let c=r?"yes":"no";n.mode;let l=null;if(n.body==null&&t.processRequestEndOfBody)queueMicrotask(()=>t.processRequestEndOfBody());else if(n.body!=null){let A=i(async function*(C){Dp(t)||(yield C,t.processRequestBodyChunkLength?.(C.byteLength))},"processBodyChunk"),h=i(()=>{Dp(t)||t.processRequestEndOfBody&&t.processRequestEndOfBody()},"processEndOfBody"),E=i(C=>{Dp(t)||(C.name==="AbortError"?t.controller.abort():t.controller.terminate(C))},"processBodyError");l=(async function*(){try{for await(let C of n.body.stream)yield*A(C);h()}catch(C){E(C)}})()}try{let{body:A,status:h,statusText:E,headersList:C,socket:w}=await f({body:l});if(w)s=s0({status:h,statusText:E,headersList:C,socket:w});else{let x=A[Symbol.asyncIterator]();t.controller.next=()=>x.next(),s=s0({status:h,statusText:E,headersList:C})}}catch(A){return A.name==="AbortError"?(t.controller.connection.destroy(),n0(t,A)):dt(A)}let u=i(async()=>{await t.controller.resume()},"pullAlgorithm"),d=i(A=>{Dp(t)||t.controller.abort(A)},"cancelAlgorithm"),p=new ReadableStream({async start(A){t.controller.controller=A},async pull(A){await u(A)},async cancel(A){await d(A)},type:"bytes"});s.body={stream:p,source:null,length:null},t.controller.onAborted=m,t.controller.on("terminated",m),t.controller.resume=async()=>{for(;;){let A,h;try{let{done:C,value:w}=await t.controller.next();if(bre(t))break;A=C?void 0:w}catch(C){t.controller.ended&&!o.encodedBodySize?A=void 0:(A=C,h=!0)}if(A===void 0){KJe(t.controller.controller),b8e(t,s);return}if(o.decodedBodySize+=A?.byteLength??0,h){t.controller.terminate(A);return}let E=new Uint8Array(A);if(E.byteLength&&t.controller.controller.enqueue(E),f8e(p)){t.controller.terminate();return}if(t.controller.controller.desiredSize<=0)return}};function m(A){bre(t)?(s.aborted=!0,i0(p)&&t.controller.controller.error(t.controller.serializedAbortReason)):i0(p)&&t.controller.controller.error(new TypeError("terminated",{cause:JJe(A)?A:void 0})),t.controller.connection.destroy()}return i(m,"onAborted"),s;function f({body:A}){let h=Qa(n),E=t.controller.dispatcher;return new Promise((C,w)=>E.dispatch({path:h.pathname+h.search,origin:h.origin,method:n.method,body:E.isMockActive?n.body&&(n.body.source||n.body.stream):A,headers:n.headersList.entries,maxRedirections:0,upgrade:n.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(x){let{connection:b}=t.controller;o.finalConnectionTimingInfo=e8e(void 0,o.postRedirectStartTime,t.crossOriginIsolatedCapability),b.destroyed?x(new DOMException("The operation was aborted.","AbortError")):(t.controller.on("terminated",x),this.abort=b.abort=x),o.finalNetworkRequestStartTime=yE(t.crossOriginIsolatedCapability)},onResponseStarted(){o.finalNetworkResponseStartTime=yE(t.crossOriginIsolatedCapability)},onHeaders(x,b,N,P){if(x<200)return;let _="",re=new xre;for(let ne=0;neU)return w(new Error(`too many content-encodings in response: ${K.length}, maximum allowed is ${U}`)),!0;for(let wt=K.length-1;wt>=0;--wt){let X=K[wt].trim();if(X==="x-gzip"||X==="gzip")ye.push(Pu.createGunzip({flush:Pu.constants.Z_SYNC_FLUSH,finishFlush:Pu.constants.Z_SYNC_FLUSH}));else if(X==="deflate")ye.push(n8e({flush:Pu.constants.Z_SYNC_FLUSH,finishFlush:Pu.constants.Z_SYNC_FLUSH}));else if(X==="br")ye.push(Pu.createBrotliDecompress({flush:Pu.constants.BROTLI_OPERATION_FLUSH,finishFlush:Pu.constants.BROTLI_OPERATION_FLUSH}));else{ye.length=0;break}}}let qe=this.onError.bind(this);return C({status:x,statusText:P,headersList:re,body:ye.length?d8e(this.body,...ye,ne=>{ne&&this.onError(ne)}).on("error",qe):this.body.on("error",qe)}),!0},onData(x){if(t.controller.dump)return;let b=x;return o.encodedBodySize+=b.byteLength,this.body.push(b)},onComplete(){this.abort&&t.controller.off("terminated",this.abort),t.controller.onAborted&&t.controller.off("terminated",t.controller.onAborted),t.controller.ended=!0,this.body.push(null)},onError(x){this.abort&&t.controller.off("terminated",this.abort),this.body?.destroy(x),t.controller.terminate(x),w(x)},onUpgrade(x,b,N){if(x!==101)return;let P=new xre;for(let _=0;_{"use strict";Fre.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var qre=I(($zt,Ure)=>{"use strict";var{webidl:Xs}=sn(),c0=Symbol("ProgressEvent state"),CU=class t extends Event{static{i(this,"ProgressEvent")}constructor(e,r={}){e=Xs.converters.DOMString(e,"ProgressEvent constructor","type"),r=Xs.converters.ProgressEventInit(r??{}),super(e,r),this[c0]={lengthComputable:r.lengthComputable,loaded:r.loaded,total:r.total}}get lengthComputable(){return Xs.brandCheck(this,t),this[c0].lengthComputable}get loaded(){return Xs.brandCheck(this,t),this[c0].loaded}get total(){return Xs.brandCheck(this,t),this[c0].total}};Xs.converters.ProgressEventInit=Xs.dictionaryConverter([{key:"lengthComputable",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"loaded",converter:Xs.converters["unsigned long long"],defaultValue:i(()=>0,"defaultValue")},{key:"total",converter:Xs.converters["unsigned long long"],defaultValue:i(()=>0,"defaultValue")},{key:"bubbles",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"cancelable",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"composed",converter:Xs.converters.boolean,defaultValue:i(()=>!1,"defaultValue")}]);Ure.exports={ProgressEvent:CU}});var Hre=I((Vzt,Gre)=>{"use strict";function N8e(t){if(!t)return"failure";switch(t.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}i(N8e,"getEncoding");Gre.exports={getEncoding:N8e}});var Kre=I((Yzt,jre)=>{"use strict";var{kState:IA,kError:IU,kResult:$re,kAborted:CE,kLastProgressEventFired:wU}=EU(),{ProgressEvent:T8e}=qre(),{getEncoding:zre}=Hre(),{serializeAMimeType:v8e,parseMIMEType:Vre}=ms(),{types:P8e}=require("node:util"),{StringDecoder:Wre}=require("string_decoder"),{btoa:Yre}=require("node:buffer"),Q8e={enumerable:!0,writable:!1,configurable:!1};function _8e(t,e,r,n){if(t[IA]==="loading")throw new DOMException("Invalid state","InvalidStateError");t[IA]="loading",t[$re]=null,t[IU]=null;let o=e.stream().getReader(),a=[],c=o.read(),l=!0;(async()=>{for(;!t[CE];)try{let{done:u,value:d}=await c;if(l&&!t[CE]&&queueMicrotask(()=>{Qu("loadstart",t)}),l=!1,!u&&P8e.isUint8Array(d))a.push(d),(t[wU]===void 0||Date.now()-t[wU]>=50)&&!t[CE]&&(t[wU]=Date.now(),queueMicrotask(()=>{Qu("progress",t)})),c=o.read();else if(u){queueMicrotask(()=>{t[IA]="done";try{let p=D8e(a,r,e.type,n);if(t[CE])return;t[$re]=p,Qu("load",t)}catch(p){t[IU]=p,Qu("error",t)}t[IA]!=="loading"&&Qu("loadend",t)});break}}catch(u){if(t[CE])return;queueMicrotask(()=>{t[IA]="done",t[IU]=u,Qu("error",t),t[IA]!=="loading"&&Qu("loadend",t)});break}})()}i(_8e,"readOperation");function Qu(t,e){let r=new T8e(t,{bubbles:!1,cancelable:!1});e.dispatchEvent(r)}i(Qu,"fireAProgressEvent");function D8e(t,e,r,n){switch(e){case"DataURL":{let s="data:",o=Vre(r||"application/octet-stream");o!=="failure"&&(s+=v8e(o)),s+=";base64,";let a=new Wre("latin1");for(let c of t)s+=Yre(a.write(c));return s+=Yre(a.end()),s}case"Text":{let s="failure";if(n&&(s=zre(n)),s==="failure"&&r){let o=Vre(r);o!=="failure"&&(s=zre(o.parameters.get("charset")))}return s==="failure"&&(s="UTF-8"),k8e(t,s)}case"ArrayBuffer":return Jre(t).buffer;case"BinaryString":{let s="",o=new Wre("latin1");for(let a of t)s+=o.write(a);return s+=o.end(),s}}}i(D8e,"packageData");function k8e(t,e){let r=Jre(t),n=L8e(r),s=0;n!==null&&(e=n,s=n==="UTF-8"?3:2);let o=r.slice(s);return new TextDecoder(e).decode(o)}i(k8e,"decode");function L8e(t){let[e,r,n]=t;return e===239&&r===187&&n===191?"UTF-8":e===254&&r===255?"UTF-16BE":e===255&&r===254?"UTF-16LE":null}i(L8e,"BOMSniffing");function Jre(t){let e=t.reduce((n,s)=>n+s.byteLength,0),r=0;return t.reduce((n,s)=>(n.set(s,r),r+=s.byteLength,n),new Uint8Array(e))}i(Jre,"combineByteSequences");jre.exports={staticPropertyDescriptors:Q8e,readOperation:_8e,fireAProgressEvent:Qu}});var tne=I((jzt,ene)=>{"use strict";var{staticPropertyDescriptors:wA,readOperation:l0,fireAProgressEvent:Xre}=Kre(),{kState:Lp,kError:Zre,kResult:u0,kEvents:ot,kAborted:O8e}=EU(),{webidl:mt}=sn(),{kEnumerableProperty:hs}=He(),Pi=class t extends EventTarget{static{i(this,"FileReader")}constructor(){super(),this[Lp]="empty",this[u0]=null,this[Zre]=null,this[ot]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(e){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsArrayBuffer"),e=mt.converters.Blob(e,{strict:!1}),l0(this,e,"ArrayBuffer")}readAsBinaryString(e){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsBinaryString"),e=mt.converters.Blob(e,{strict:!1}),l0(this,e,"BinaryString")}readAsText(e,r=void 0){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsText"),e=mt.converters.Blob(e,{strict:!1}),r!==void 0&&(r=mt.converters.DOMString(r,"FileReader.readAsText","encoding")),l0(this,e,"Text",r)}readAsDataURL(e){mt.brandCheck(this,t),mt.argumentLengthCheck(arguments,1,"FileReader.readAsDataURL"),e=mt.converters.Blob(e,{strict:!1}),l0(this,e,"DataURL")}abort(){if(this[Lp]==="empty"||this[Lp]==="done"){this[u0]=null;return}this[Lp]==="loading"&&(this[Lp]="done",this[u0]=null),this[O8e]=!0,Xre("abort",this),this[Lp]!=="loading"&&Xre("loadend",this)}get readyState(){switch(mt.brandCheck(this,t),this[Lp]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return mt.brandCheck(this,t),this[u0]}get error(){return mt.brandCheck(this,t),this[Zre]}get onloadend(){return mt.brandCheck(this,t),this[ot].loadend}set onloadend(e){mt.brandCheck(this,t),this[ot].loadend&&this.removeEventListener("loadend",this[ot].loadend),typeof e=="function"?(this[ot].loadend=e,this.addEventListener("loadend",e)):this[ot].loadend=null}get onerror(){return mt.brandCheck(this,t),this[ot].error}set onerror(e){mt.brandCheck(this,t),this[ot].error&&this.removeEventListener("error",this[ot].error),typeof e=="function"?(this[ot].error=e,this.addEventListener("error",e)):this[ot].error=null}get onloadstart(){return mt.brandCheck(this,t),this[ot].loadstart}set onloadstart(e){mt.brandCheck(this,t),this[ot].loadstart&&this.removeEventListener("loadstart",this[ot].loadstart),typeof e=="function"?(this[ot].loadstart=e,this.addEventListener("loadstart",e)):this[ot].loadstart=null}get onprogress(){return mt.brandCheck(this,t),this[ot].progress}set onprogress(e){mt.brandCheck(this,t),this[ot].progress&&this.removeEventListener("progress",this[ot].progress),typeof e=="function"?(this[ot].progress=e,this.addEventListener("progress",e)):this[ot].progress=null}get onload(){return mt.brandCheck(this,t),this[ot].load}set onload(e){mt.brandCheck(this,t),this[ot].load&&this.removeEventListener("load",this[ot].load),typeof e=="function"?(this[ot].load=e,this.addEventListener("load",e)):this[ot].load=null}get onabort(){return mt.brandCheck(this,t),this[ot].abort}set onabort(e){mt.brandCheck(this,t),this[ot].abort&&this.removeEventListener("abort",this[ot].abort),typeof e=="function"?(this[ot].abort=e,this.addEventListener("abort",e)):this[ot].abort=null}};Pi.EMPTY=Pi.prototype.EMPTY=0;Pi.LOADING=Pi.prototype.LOADING=1;Pi.DONE=Pi.prototype.DONE=2;Object.defineProperties(Pi.prototype,{EMPTY:wA,LOADING:wA,DONE:wA,readAsArrayBuffer:hs,readAsBinaryString:hs,readAsText:hs,readAsDataURL:hs,abort:hs,readyState:hs,result:hs,error:hs,onloadstart:hs,onprogress:hs,onload:hs,onabort:hs,onerror:hs,onloadend:hs,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Pi,{EMPTY:wA,LOADING:wA,DONE:wA});ene.exports={FileReader:Pi}});var d0=I((Xzt,rne)=>{"use strict";rne.exports={kConstruct:Lt().kConstruct}});var one=I((Zzt,sne)=>{"use strict";var M8e=require("node:assert"),{URLSerializer:nne}=ms(),{isValidHeaderName:F8e}=zs();function U8e(t,e,r=!1){let n=nne(t,r),s=nne(e,r);return n===s}i(U8e,"urlEquals");function q8e(t){M8e(t!==null);let e=[];for(let r of t.split(","))r=r.trim(),F8e(r)&&e.push(r);return e}i(q8e,"getFieldValues");sne.exports={urlEquals:U8e,getFieldValues:q8e}});var cne=I((t3t,ane)=>{"use strict";var{kConstruct:G8e}=d0(),{urlEquals:H8e,getFieldValues:SU}=one(),{kEnumerableProperty:Op,isDisturbed:$8e}=He(),{webidl:le}=sn(),{Response:z8e,cloneResponse:V8e,fromInnerResponse:W8e}=gE(),{Request:wl,fromInnerRequest:Y8e}=CA(),{kState:Qi}=Eu(),{fetching:J8e}=EE(),{urlIsHttpHttpsScheme:p0,createDeferredPromise:SA,readAllBytes:j8e}=zs(),xU=require("node:assert"),m0=class t{static{i(this,"Cache")}#e;constructor(){arguments[0]!==G8e&&le.illegalConstructor(),le.util.markAsUncloneable(this),this.#e=arguments[1]}async match(e,r={}){le.brandCheck(this,t);let n="Cache.match";le.argumentLengthCheck(arguments,1,n),e=le.converters.RequestInfo(e,n,"request"),r=le.converters.CacheQueryOptions(r,n,"options");let s=this.#s(e,r,1);if(s.length!==0)return s[0]}async matchAll(e=void 0,r={}){le.brandCheck(this,t);let n="Cache.matchAll";return e!==void 0&&(e=le.converters.RequestInfo(e,n,"request")),r=le.converters.CacheQueryOptions(r,n,"options"),this.#s(e,r)}async add(e){le.brandCheck(this,t);let r="Cache.add";le.argumentLengthCheck(arguments,1,r),e=le.converters.RequestInfo(e,r,"request");let n=[e];return await this.addAll(n)}async addAll(e){le.brandCheck(this,t);let r="Cache.addAll";le.argumentLengthCheck(arguments,1,r);let n=[],s=[];for(let m of e){if(m===void 0)throw le.errors.conversionFailed({prefix:r,argument:"Argument 1",types:["undefined is not allowed"]});if(m=le.converters.RequestInfo(m),typeof m=="string")continue;let f=m[Qi];if(!p0(f.url)||f.method!=="GET")throw le.errors.exception({header:r,message:"Expected http/s scheme when method is not GET."})}let o=[];for(let m of e){let f=new wl(m)[Qi];if(!p0(f.url))throw le.errors.exception({header:r,message:"Expected http/s scheme."});f.initiator="fetch",f.destination="subresource",s.push(f);let A=SA();o.push(J8e({request:f,processResponse(h){if(h.type==="error"||h.status===206||h.status<200||h.status>299)A.reject(le.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(h.headersList.contains("vary")){let E=SU(h.headersList.get("vary"));for(let C of E)if(C==="*"){A.reject(le.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let w of o)w.abort();return}}},processResponseEndOfBody(h){if(h.aborted){A.reject(new DOMException("aborted","AbortError"));return}A.resolve(h)}})),n.push(A.promise)}let c=await Promise.all(n),l=[],u=0;for(let m of c){let f={type:"put",request:s[u],response:m};l.push(f),u++}let d=SA(),p=null;try{this.#t(l)}catch(m){p=m}return queueMicrotask(()=>{p===null?d.resolve(void 0):d.reject(p)}),d.promise}async put(e,r){le.brandCheck(this,t);let n="Cache.put";le.argumentLengthCheck(arguments,2,n),e=le.converters.RequestInfo(e,n,"request"),r=le.converters.Response(r,n,"response");let s=null;if(e instanceof wl?s=e[Qi]:s=new wl(e)[Qi],!p0(s.url)||s.method!=="GET")throw le.errors.exception({header:n,message:"Expected an http/s scheme when method is not GET"});let o=r[Qi];if(o.status===206)throw le.errors.exception({header:n,message:"Got 206 status"});if(o.headersList.contains("vary")){let f=SU(o.headersList.get("vary"));for(let A of f)if(A==="*")throw le.errors.exception({header:n,message:"Got * vary field value"})}if(o.body&&($8e(o.body.stream)||o.body.stream.locked))throw le.errors.exception({header:n,message:"Response body is locked or disturbed"});let a=V8e(o),c=SA();if(o.body!=null){let A=o.body.stream.getReader();j8e(A).then(c.resolve,c.reject)}else c.resolve(void 0);let l=[],u={type:"put",request:s,response:a};l.push(u);let d=await c.promise;a.body!=null&&(a.body.source=d);let p=SA(),m=null;try{this.#t(l)}catch(f){m=f}return queueMicrotask(()=>{m===null?p.resolve():p.reject(m)}),p.promise}async delete(e,r={}){le.brandCheck(this,t);let n="Cache.delete";le.argumentLengthCheck(arguments,1,n),e=le.converters.RequestInfo(e,n,"request"),r=le.converters.CacheQueryOptions(r,n,"options");let s=null;if(e instanceof wl){if(s=e[Qi],s.method!=="GET"&&!r.ignoreMethod)return!1}else xU(typeof e=="string"),s=new wl(e)[Qi];let o=[],a={type:"delete",request:s,options:r};o.push(a);let c=SA(),l=null,u;try{u=this.#t(o)}catch(d){l=d}return queueMicrotask(()=>{l===null?c.resolve(!!u?.length):c.reject(l)}),c.promise}async keys(e=void 0,r={}){le.brandCheck(this,t);let n="Cache.keys";e!==void 0&&(e=le.converters.RequestInfo(e,n,"request")),r=le.converters.CacheQueryOptions(r,n,"options");let s=null;if(e!==void 0)if(e instanceof wl){if(s=e[Qi],s.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(s=new wl(e)[Qi]);let o=SA(),a=[];if(e===void 0)for(let c of this.#e)a.push(c[0]);else{let c=this.#r(s,r);for(let l of c)a.push(l[0])}return queueMicrotask(()=>{let c=[];for(let l of a){let u=Y8e(l,new AbortController().signal,"immutable");c.push(u)}o.resolve(Object.freeze(c))}),o.promise}#t(e){let r=this.#e,n=[...r],s=[],o=[];try{for(let a of e){if(a.type!=="delete"&&a.type!=="put")throw le.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(a.type==="delete"&&a.response!=null)throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#r(a.request,a.options,s).length)throw new DOMException("???","InvalidStateError");let c;if(a.type==="delete"){if(c=this.#r(a.request,a.options),c.length===0)return[];for(let l of c){let u=r.indexOf(l);xU(u!==-1),r.splice(u,1)}}else if(a.type==="put"){if(a.response==null)throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let l=a.request;if(!p0(l.url))throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(l.method!=="GET")throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(a.options!=null)throw le.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});c=this.#r(a.request);for(let u of c){let d=r.indexOf(u);xU(d!==-1),r.splice(d,1)}r.push([a.request,a.response]),s.push([a.request,a.response])}o.push([a.request,a.response])}return o}catch(a){throw this.#e.length=0,this.#e=n,a}}#r(e,r,n){let s=[],o=n??this.#e;for(let a of o){let[c,l]=a;this.#o(e,c,l,r)&&s.push(a)}return s}#o(e,r,n=null,s){let o=new URL(e.url),a=new URL(r.url);if(s?.ignoreSearch&&(a.search="",o.search=""),!H8e(o,a,!0))return!1;if(n==null||s?.ignoreVary||!n.headersList.contains("vary"))return!0;let c=SU(n.headersList.get("vary"));for(let l of c){if(l==="*")return!1;let u=r.headersList.get(l),d=e.headersList.get(l);if(u!==d)return!1}return!0}#s(e,r,n=1/0){let s=null;if(e!==void 0)if(e instanceof wl){if(s=e[Qi],s.method!=="GET"&&!r.ignoreMethod)return[]}else typeof e=="string"&&(s=new wl(e)[Qi]);let o=[];if(e===void 0)for(let c of this.#e)o.push(c[1]);else{let c=this.#r(s,r);for(let l of c)o.push(l[1])}let a=[];for(let c of o){let l=W8e(c,"immutable");if(a.push(l.clone()),a.length>=n)break}return Object.freeze(a)}};Object.defineProperties(m0.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:Op,matchAll:Op,add:Op,addAll:Op,put:Op,delete:Op,keys:Op});var ine=[{key:"ignoreSearch",converter:le.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"ignoreMethod",converter:le.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"ignoreVary",converter:le.converters.boolean,defaultValue:i(()=>!1,"defaultValue")}];le.converters.CacheQueryOptions=le.dictionaryConverter(ine);le.converters.MultiCacheQueryOptions=le.dictionaryConverter([...ine,{key:"cacheName",converter:le.converters.DOMString}]);le.converters.Response=le.interfaceConverter(z8e);le.converters["sequence"]=le.sequenceConverter(le.converters.RequestInfo);ane.exports={Cache:m0}});var une=I((n3t,lne)=>{"use strict";var{kConstruct:IE}=d0(),{Cache:f0}=cne(),{webidl:Sn}=sn(),{kEnumerableProperty:wE}=He(),A0=class t{static{i(this,"CacheStorage")}#e=new Map;constructor(){arguments[0]!==IE&&Sn.illegalConstructor(),Sn.util.markAsUncloneable(this)}async match(e,r={}){if(Sn.brandCheck(this,t),Sn.argumentLengthCheck(arguments,1,"CacheStorage.match"),e=Sn.converters.RequestInfo(e),r=Sn.converters.MultiCacheQueryOptions(r),r.cacheName!=null){if(this.#e.has(r.cacheName)){let n=this.#e.get(r.cacheName);return await new f0(IE,n).match(e,r)}}else for(let n of this.#e.values()){let o=await new f0(IE,n).match(e,r);if(o!==void 0)return o}}async has(e){Sn.brandCheck(this,t);let r="CacheStorage.has";return Sn.argumentLengthCheck(arguments,1,r),e=Sn.converters.DOMString(e,r,"cacheName"),this.#e.has(e)}async open(e){Sn.brandCheck(this,t);let r="CacheStorage.open";if(Sn.argumentLengthCheck(arguments,1,r),e=Sn.converters.DOMString(e,r,"cacheName"),this.#e.has(e)){let s=this.#e.get(e);return new f0(IE,s)}let n=[];return this.#e.set(e,n),new f0(IE,n)}async delete(e){Sn.brandCheck(this,t);let r="CacheStorage.delete";return Sn.argumentLengthCheck(arguments,1,r),e=Sn.converters.DOMString(e,r,"cacheName"),this.#e.delete(e)}async keys(){return Sn.brandCheck(this,t),[...this.#e.keys()]}};Object.defineProperties(A0.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:wE,has:wE,open:wE,delete:wE,keys:wE});lne.exports={CacheStorage:A0}});var pne=I((o3t,dne)=>{"use strict";dne.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var bU=I((i3t,gne)=>{"use strict";function K8e(t){for(let e=0;e=0&&r<=8||r>=10&&r<=31||r===127)return!0}return!1}i(K8e,"isCTLExcludingHtab");function mne(t){for(let e=0;e126||r===34||r===40||r===41||r===60||r===62||r===64||r===44||r===59||r===58||r===92||r===47||r===91||r===93||r===63||r===61||r===123||r===125)throw new Error("Invalid cookie name")}}i(mne,"validateCookieName");function fne(t){let e=t.length,r=0;if(t[0]==='"'){if(e===1||t[e-1]!=='"')throw new Error("Invalid cookie value");--e,++r}for(;r126||n===34||n===44||n===59||n===92)throw new Error("Invalid cookie value")}}i(fne,"validateCookieValue");function Ane(t){for(let e=0;ee.toString().padStart(2,"0"));function hne(t){return typeof t=="number"&&(t=new Date(t)),`${Z8e[t.getUTCDay()]}, ${h0[t.getUTCDate()]} ${e5e[t.getUTCMonth()]} ${t.getUTCFullYear()} ${h0[t.getUTCHours()]}:${h0[t.getUTCMinutes()]}:${h0[t.getUTCSeconds()]} GMT`}i(hne,"toIMFDate");function t5e(t){if(t<0)throw new Error("Invalid cookie max-age")}i(t5e,"validateCookieMaxAge");function r5e(t){if(t.name.length===0)return null;mne(t.name),fne(t.value);let e=[`${t.name}=${t.value}`];t.name.startsWith("__Secure-")&&(t.secure=!0),t.name.startsWith("__Host-")&&(t.secure=!0,t.domain=null,t.path="/"),t.secure&&e.push("Secure"),t.httpOnly&&e.push("HttpOnly"),typeof t.maxAge=="number"&&(t5e(t.maxAge),e.push(`Max-Age=${t.maxAge}`)),t.domain&&(X8e(t.domain),e.push(`Domain=${t.domain}`)),t.path&&(Ane(t.path),e.push(`Path=${t.path}`)),t.expires&&t.expires.toString()!=="Invalid Date"&&e.push(`Expires=${hne(t.expires)}`),t.sameSite&&e.push(`SameSite=${t.sameSite}`);for(let r of t.unparsed){if(!r.includes("="))throw new Error("Invalid unparsed");let[n,...s]=r.split("=");e.push(`${n.trim()}=${s.join("=")}`)}return e.join("; ")}i(r5e,"stringify");gne.exports={isCTLExcludingHtab:K8e,validateCookieName:mne,validateCookiePath:Ane,validateCookieValue:fne,toIMFDate:hne,stringify:r5e}});var Ene=I((c3t,yne)=>{"use strict";var{maxNameValuePairSize:n5e,maxAttributeValueSize:s5e}=pne(),{isCTLExcludingHtab:o5e}=bU(),{collectASequenceOfCodePointsFast:g0}=ms(),i5e=require("node:assert");function a5e(t){if(o5e(t))return null;let e="",r="",n="",s="";if(t.includes(";")){let o={position:0};e=g0(";",t,o),r=t.slice(o.position)}else e=t;if(!e.includes("="))s=e;else{let o={position:0};n=g0("=",e,o),s=e.slice(o.position+1)}return n=n.trim(),s=s.trim(),n.length+s.length>n5e?null:{name:n,value:s,...xA(r)}}i(a5e,"parseSetCookie");function xA(t,e={}){if(t.length===0)return e;i5e(t[0]===";"),t=t.slice(1);let r="";t.includes(";")?(r=g0(";",t,{position:0}),t=t.slice(r.length)):(r=t,t="");let n="",s="";if(r.includes("=")){let a={position:0};n=g0("=",r,a),s=r.slice(a.position+1)}else n=r;if(n=n.trim(),s=s.trim(),s.length>s5e)return xA(t,e);let o=n.toLowerCase();if(o==="expires"){let a=new Date(s);e.expires=a}else if(o==="max-age"){let a=s.charCodeAt(0);if((a<48||a>57)&&s[0]!=="-"||!/^\d+$/.test(s))return xA(t,e);let c=Number(s);e.maxAge=c}else if(o==="domain"){let a=s;a[0]==="."&&(a=a.slice(1)),a=a.toLowerCase(),e.domain=a}else if(o==="path"){let a="";s.length===0||s[0]!=="/"?a="/":a=s,e.path=a}else if(o==="secure")e.secure=!0;else if(o==="httponly")e.httpOnly=!0;else if(o==="samesite"){let a=s.toLowerCase();a==="none"?e.sameSite="None":a==="strict"?e.sameSite="Strict":a==="lax"&&(e.sameSite="Lax")}else e.unparsed??=[],e.unparsed.push(`${n}=${s}`);return xA(t,e)}i(xA,"parseUnparsedAttributes");yne.exports={parseSetCookie:a5e,parseUnparsedAttributes:xA}});var wne=I((u3t,Ine)=>{"use strict";var{parseSetCookie:c5e}=Ene(),{stringify:l5e}=bU(),{webidl:Ye}=sn(),{Headers:y0}=Qp();function u5e(t){Ye.argumentLengthCheck(arguments,1,"getCookies"),Ye.brandCheck(t,y0,{strict:!1});let e=t.get("cookie"),r={};if(!e)return r;for(let n of e.split(";")){let[s,...o]=n.split("=");r[s.trim()]=o.join("=")}return r}i(u5e,"getCookies");function d5e(t,e,r){Ye.brandCheck(t,y0,{strict:!1});let n="deleteCookie";Ye.argumentLengthCheck(arguments,2,n),e=Ye.converters.DOMString(e,n,"name"),r=Ye.converters.DeleteCookieAttributes(r),Cne(t,{name:e,value:"",expires:new Date(0),...r})}i(d5e,"deleteCookie");function p5e(t){Ye.argumentLengthCheck(arguments,1,"getSetCookies"),Ye.brandCheck(t,y0,{strict:!1});let e=t.getSetCookie();return e?e.map(r=>c5e(r)):[]}i(p5e,"getSetCookies");function Cne(t,e){Ye.argumentLengthCheck(arguments,2,"setCookie"),Ye.brandCheck(t,y0,{strict:!1}),e=Ye.converters.Cookie(e);let r=l5e(e);r&&t.append("Set-Cookie",r)}i(Cne,"setCookie");Ye.converters.DeleteCookieAttributes=Ye.dictionaryConverter([{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"path",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"domain",defaultValue:i(()=>null,"defaultValue")}]);Ye.converters.Cookie=Ye.dictionaryConverter([{converter:Ye.converters.DOMString,key:"name"},{converter:Ye.converters.DOMString,key:"value"},{converter:Ye.nullableConverter(t=>typeof t=="number"?Ye.converters["unsigned long long"](t):new Date(t)),key:"expires",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters["long long"]),key:"maxAge",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"domain",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.DOMString),key:"path",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.boolean),key:"secure",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.nullableConverter(Ye.converters.boolean),key:"httpOnly",defaultValue:i(()=>null,"defaultValue")},{converter:Ye.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:Ye.sequenceConverter(Ye.converters.DOMString),key:"unparsed",defaultValue:i(()=>new Array(0),"defaultValue")}]);Ine.exports={getCookies:u5e,deleteCookie:d5e,getSetCookies:p5e,setCookie:Cne}});var BA=I((p3t,xne)=>{"use strict";var{webidl:ce}=sn(),{kEnumerableProperty:gs}=He(),{kConstruct:Sne}=Lt(),{MessagePort:m5e}=require("node:worker_threads"),bA=class t extends Event{static{i(this,"MessageEvent")}#e;constructor(e,r={}){if(e===Sne){super(arguments[1],arguments[2]),ce.util.markAsUncloneable(this);return}let n="MessageEvent constructor";ce.argumentLengthCheck(arguments,1,n),e=ce.converters.DOMString(e,n,"type"),r=ce.converters.MessageEventInit(r,n,"eventInitDict"),super(e,r),this.#e=r,ce.util.markAsUncloneable(this)}get data(){return ce.brandCheck(this,t),this.#e.data}get origin(){return ce.brandCheck(this,t),this.#e.origin}get lastEventId(){return ce.brandCheck(this,t),this.#e.lastEventId}get source(){return ce.brandCheck(this,t),this.#e.source}get ports(){return ce.brandCheck(this,t),Object.isFrozen(this.#e.ports)||Object.freeze(this.#e.ports),this.#e.ports}initMessageEvent(e,r=!1,n=!1,s=null,o="",a="",c=null,l=[]){return ce.brandCheck(this,t),ce.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new t(e,{bubbles:r,cancelable:n,data:s,origin:o,lastEventId:a,source:c,ports:l})}static createFastMessageEvent(e,r){let n=new t(Sne,e,r);return n.#e=r,n.#e.data??=null,n.#e.origin??="",n.#e.lastEventId??="",n.#e.source??=null,n.#e.ports??=[],n}},{createFastMessageEvent:f5e}=bA;delete bA.createFastMessageEvent;var E0=class t extends Event{static{i(this,"CloseEvent")}#e;constructor(e,r={}){let n="CloseEvent constructor";ce.argumentLengthCheck(arguments,1,n),e=ce.converters.DOMString(e,n,"type"),r=ce.converters.CloseEventInit(r),super(e,r),this.#e=r,ce.util.markAsUncloneable(this)}get wasClean(){return ce.brandCheck(this,t),this.#e.wasClean}get code(){return ce.brandCheck(this,t),this.#e.code}get reason(){return ce.brandCheck(this,t),this.#e.reason}},C0=class t extends Event{static{i(this,"ErrorEvent")}#e;constructor(e,r){let n="ErrorEvent constructor";ce.argumentLengthCheck(arguments,1,n),super(e,r),ce.util.markAsUncloneable(this),e=ce.converters.DOMString(e,n,"type"),r=ce.converters.ErrorEventInit(r??{}),this.#e=r}get message(){return ce.brandCheck(this,t),this.#e.message}get filename(){return ce.brandCheck(this,t),this.#e.filename}get lineno(){return ce.brandCheck(this,t),this.#e.lineno}get colno(){return ce.brandCheck(this,t),this.#e.colno}get error(){return ce.brandCheck(this,t),this.#e.error}};Object.defineProperties(bA.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:gs,origin:gs,lastEventId:gs,source:gs,ports:gs,initMessageEvent:gs});Object.defineProperties(E0.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:gs,code:gs,wasClean:gs});Object.defineProperties(C0.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:gs,filename:gs,lineno:gs,colno:gs,error:gs});ce.converters.MessagePort=ce.interfaceConverter(m5e);ce.converters["sequence"]=ce.sequenceConverter(ce.converters.MessagePort);var BU=[{key:"bubbles",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"cancelable",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"composed",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")}];ce.converters.MessageEventInit=ce.dictionaryConverter([...BU,{key:"data",converter:ce.converters.any,defaultValue:i(()=>null,"defaultValue")},{key:"origin",converter:ce.converters.USVString,defaultValue:i(()=>"","defaultValue")},{key:"lastEventId",converter:ce.converters.DOMString,defaultValue:i(()=>"","defaultValue")},{key:"source",converter:ce.nullableConverter(ce.converters.MessagePort),defaultValue:i(()=>null,"defaultValue")},{key:"ports",converter:ce.converters["sequence"],defaultValue:i(()=>new Array(0),"defaultValue")}]);ce.converters.CloseEventInit=ce.dictionaryConverter([...BU,{key:"wasClean",converter:ce.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"code",converter:ce.converters["unsigned short"],defaultValue:i(()=>0,"defaultValue")},{key:"reason",converter:ce.converters.USVString,defaultValue:i(()=>"","defaultValue")}]);ce.converters.ErrorEventInit=ce.dictionaryConverter([...BU,{key:"message",converter:ce.converters.DOMString,defaultValue:i(()=>"","defaultValue")},{key:"filename",converter:ce.converters.USVString,defaultValue:i(()=>"","defaultValue")},{key:"lineno",converter:ce.converters["unsigned long"],defaultValue:i(()=>0,"defaultValue")},{key:"colno",converter:ce.converters["unsigned long"],defaultValue:i(()=>0,"defaultValue")},{key:"error",converter:ce.converters.any}]);xne.exports={MessageEvent:bA,CloseEvent:E0,ErrorEvent:C0,createFastMessageEvent:f5e}});var Mp=I((f3t,bne)=>{"use strict";var A5e="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",h5e={enumerable:!0,writable:!1,configurable:!1},g5e={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},y5e={NOT_SENT:0,PROCESSING:1,SENT:2},E5e={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},C5e=2**16-1,I5e={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},w5e=Buffer.allocUnsafe(0),S5e={string:1,typedArray:2,arrayBuffer:3,blob:4};bne.exports={uid:A5e,sentCloseFrameState:y5e,staticPropertyDescriptors:h5e,states:g5e,opcodes:E5e,maxUnsigned16Bit:C5e,parserStates:I5e,emptyBuffer:w5e,sendHints:S5e}});var SE=I((A3t,Bne)=>{"use strict";Bne.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var BE=I((h3t,kne)=>{"use strict";var{kReadyState:xE,kController:x5e,kResponse:b5e,kBinaryType:B5e,kWebSocketURL:R5e}=SE(),{states:bE,opcodes:_u}=Mp(),{ErrorEvent:N5e,createFastMessageEvent:T5e}=BA(),{isUtf8:v5e}=require("node:buffer"),{collectASequenceOfCodePointsFast:P5e,removeHTTPWhitespace:Rne}=ms();function Q5e(t){return t[xE]===bE.CONNECTING}i(Q5e,"isConnecting");function _5e(t){return t[xE]===bE.OPEN}i(_5e,"isEstablished");function D5e(t){return t[xE]===bE.CLOSING}i(D5e,"isClosing");function k5e(t){return t[xE]===bE.CLOSED}i(k5e,"isClosed");function RU(t,e,r=(s,o)=>new Event(s,o),n={}){let s=r(t,n);e.dispatchEvent(s)}i(RU,"fireEvent");function L5e(t,e,r){if(t[xE]!==bE.OPEN)return;let n;if(e===_u.TEXT)try{n=Dne(r)}catch{Tne(t,"Received invalid UTF-8 in text frame.");return}else e===_u.BINARY&&(t[B5e]==="blob"?n=new Blob([r]):n=O5e(r));RU("message",t,T5e,{origin:t[R5e].origin,data:n})}i(L5e,"websocketMessageReceived");function O5e(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}i(O5e,"toArrayBuffer");function M5e(t){if(t.length===0)return!1;for(let e=0;e126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125)return!1}return!0}i(M5e,"isValidSubprotocol");function F5e(t){return t>=1e3&&t<1015?t!==1004&&t!==1005&&t!==1006:t>=3e3&&t<=4999}i(F5e,"isValidStatusCode");function Tne(t,e){let{[x5e]:r,[b5e]:n}=t;r.abort(),n?.socket&&!n.socket.destroyed&&n.socket.destroy(),e&&RU("error",t,(s,o)=>new N5e(s,o),{error:new Error(e),message:e})}i(Tne,"failWebsocketConnection");function vne(t){return t===_u.CLOSE||t===_u.PING||t===_u.PONG}i(vne,"isControlFrame");function Pne(t){return t===_u.CONTINUATION}i(Pne,"isContinuationFrame");function Qne(t){return t===_u.TEXT||t===_u.BINARY}i(Qne,"isTextBinaryFrame");function U5e(t){return Qne(t)||Pne(t)||vne(t)}i(U5e,"isValidOpcode");function q5e(t){let e={position:0},r=new Map;for(;e.position57)return!1}let e=Number.parseInt(t,10);return e>=8&&e<=15}i(G5e,"isValidClientWindowBits");var _ne=typeof process.versions.icu=="string",Nne=_ne?new TextDecoder("utf-8",{fatal:!0}):void 0,Dne=_ne?Nne.decode.bind(Nne):function(t){if(v5e(t))return t.toString("utf-8");throw new TypeError("Invalid utf-8 received.")};kne.exports={isConnecting:Q5e,isEstablished:_5e,isClosing:D5e,isClosed:k5e,fireEvent:RU,isValidSubprotocol:M5e,isValidStatusCode:F5e,failWebsocketConnection:Tne,websocketMessageReceived:L5e,utf8Decode:Dne,isControlFrame:vne,isContinuationFrame:Pne,isTextBinaryFrame:Qne,isValidOpcode:U5e,parseExtensions:q5e,isValidClientWindowBits:G5e}});var w0=I((y3t,Lne)=>{"use strict";var{maxUnsigned16Bit:H5e}=Mp(),I0=16386,NU,RE=null,RA=I0;try{NU=require("node:crypto")}catch{NU={randomFillSync:i(function(e,r,n){for(let s=0;sH5e?(a+=8,o=127):s>125&&(a+=2,o=126);let c=Buffer.allocUnsafe(s+a);c[0]=c[1]=0,c[0]|=128,c[0]=(c[0]&240)+e;c[a-4]=n[0],c[a-3]=n[1],c[a-2]=n[2],c[a-1]=n[3],c[1]=o,o===126?c.writeUInt16BE(s,2):o===127&&(c[2]=c[3]=0,c.writeUIntBE(s,4,6)),c[1]|=128;for(let l=0;l{"use strict";var{uid:z5e,states:NE,sentCloseFrameState:S0,emptyBuffer:V5e,opcodes:W5e}=Mp(),{kReadyState:TE,kSentClose:x0,kByteParser:Mne,kReceivedClose:One,kResponse:Fne}=SE(),{fireEvent:Y5e,failWebsocketConnection:Du,isClosing:J5e,isClosed:j5e,isEstablished:K5e,parseExtensions:X5e}=BE(),{channels:NA}=Ff(),{CloseEvent:Z5e}=BA(),{makeRequest:eje}=CA(),{fetching:tje}=EE(),{Headers:rje,getHeadersList:nje}=Qp(),{getDecodeSplit:sje}=zs(),{WebsocketFrameSend:oje}=w0(),vU;try{vU=require("node:crypto")}catch{}function ije(t,e,r,n,s,o){let a=t;a.protocol=t.protocol==="ws:"?"http:":"https:";let c=eje({urlList:[a],client:r,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(o.headers){let p=nje(new rje(o.headers));c.headersList=p}let l=vU.randomBytes(16).toString("base64");c.headersList.append("sec-websocket-key",l),c.headersList.append("sec-websocket-version","13");for(let p of e)c.headersList.append("sec-websocket-protocol",p);return c.headersList.append("sec-websocket-extensions","permessage-deflate; client_max_window_bits"),tje({request:c,useParallelQueue:!0,dispatcher:o.dispatcher,processResponse(p){if(p.type==="error"||p.status!==101){Du(n,"Received network error or non-101 status code.");return}if(e.length!==0&&!p.headersList.get("Sec-WebSocket-Protocol")){Du(n,"Server did not respond with sent protocols.");return}if(p.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){Du(n,'Server did not set Upgrade header to "websocket".');return}if(p.headersList.get("Connection")?.toLowerCase()!=="upgrade"){Du(n,'Server did not set Connection header to "upgrade".');return}let m=p.headersList.get("Sec-WebSocket-Accept"),f=vU.createHash("sha1").update(l+z5e).digest("base64");if(m!==f){Du(n,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let A=p.headersList.get("Sec-WebSocket-Extensions"),h;if(A!==null&&(h=X5e(A),!h.has("permessage-deflate"))){Du(n,"Sec-WebSocket-Extensions header does not match.");return}let E=p.headersList.get("Sec-WebSocket-Protocol");if(E!==null&&!sje("sec-websocket-protocol",c.headersList).includes(E)){Du(n,"Protocol was not set in the opening handshake.");return}p.socket.on("data",Une),p.socket.on("close",qne),p.socket.on("error",Gne),NA.open.hasSubscribers&&NA.open.publish({address:p.socket.address(),protocol:E,extensions:A}),s(p,h)}})}i(ije,"establishWebSocketConnection");function aje(t,e,r,n){if(!(J5e(t)||j5e(t)))if(!K5e(t))Du(t,"Connection was closed before it was established."),t[TE]=NE.CLOSING;else if(t[x0]===S0.NOT_SENT){t[x0]=S0.PROCESSING;let s=new oje;e!==void 0&&r===void 0?(s.frameData=Buffer.allocUnsafe(2),s.frameData.writeUInt16BE(e,0)):e!==void 0&&r!==void 0?(s.frameData=Buffer.allocUnsafe(2+n),s.frameData.writeUInt16BE(e,0),s.frameData.write(r,2,"utf-8")):s.frameData=V5e,t[Fne].socket.write(s.createFrame(W5e.CLOSE)),t[x0]=S0.SENT,t[TE]=NE.CLOSING}else t[TE]=NE.CLOSING}i(aje,"closeWebSocketConnection");function Une(t){this.ws[Mne].write(t)||this.pause()}i(Une,"onSocketData");function qne(){let{ws:t}=this,{[Fne]:e}=t;e.socket.off("data",Une),e.socket.off("close",qne),e.socket.off("error",Gne);let r=t[x0]===S0.SENT&&t[One],n=1005,s="",o=t[Mne].closingInfo;o&&!o.error?(n=o.code??1005,s=o.reason):t[One]||(n=1006),t[TE]=NE.CLOSED,Y5e("close",t,(a,c)=>new Z5e(a,c),{wasClean:r,code:n,reason:s}),NA.close.hasSubscribers&&NA.close.publish({websocket:t,code:n,reason:s})}i(qne,"onSocketClose");function Gne(t){let{ws:e}=this;e[TE]=NE.CLOSING,NA.socketError.hasSubscribers&&NA.socketError.publish(t),this.destroy()}i(Gne,"onSocketError");Hne.exports={establishWebSocketConnection:ije,closeWebSocketConnection:aje}});var zne=I((w3t,$ne)=>{"use strict";var{createInflateRaw:cje,Z_DEFAULT_WINDOWBITS:lje}=require("node:zlib"),{isValidClientWindowBits:uje}=BE(),{MessageSizeExceededError:dje}=rt(),pje=Buffer.from([0,0,255,255]),b0=Symbol("kBuffer"),vE=Symbol("kLength"),QU=class{static{i(this,"PerMessageDeflate")}#e;#t={};#r=0;constructor(e,r){this.#t.serverNoContextTakeover=e.has("server_no_context_takeover"),this.#t.serverMaxWindowBits=e.get("server_max_window_bits"),this.#r=r.maxPayloadSize}decompress(e,r,n){if(!this.#e){let s=lje;if(this.#t.serverMaxWindowBits){if(!uje(this.#t.serverMaxWindowBits)){n(new Error("Invalid server_max_window_bits"));return}s=Number.parseInt(this.#t.serverMaxWindowBits)}try{this.#e=cje({windowBits:s})}catch(o){n(o);return}this.#e[b0]=[],this.#e[vE]=0,this.#e.on("data",o=>{if(this.#e[vE]+=o.length,this.#r>0&&this.#e[vE]>this.#r){n(new dje),this.#e.removeAllListeners(),this.#e=null;return}this.#e[b0].push(o)}),this.#e.on("error",o=>{this.#e=null,n(o)})}this.#e.write(e),r&&this.#e.write(pje),this.#e.flush(()=>{if(!this.#e)return;let s=Buffer.concat(this.#e[b0],this.#e[vE]);this.#e[b0].length=0,this.#e[vE]=0,n(null,s)})}};$ne.exports={PerMessageDeflate:QU}});var tse=I((x3t,ese)=>{"use strict";var{Writable:mje}=require("node:stream"),fje=require("node:assert"),{parserStates:ys,opcodes:TA,states:Aje,emptyBuffer:Vne,sentCloseFrameState:Wne}=Mp(),{kReadyState:hje,kSentClose:Yne,kResponse:Jne,kReceivedClose:jne}=SE(),{channels:B0}=Ff(),{isValidStatusCode:gje,isValidOpcode:yje,failWebsocketConnection:Zs,websocketMessageReceived:Kne,utf8Decode:Eje,isControlFrame:_U,isTextBinaryFrame:DU,isContinuationFrame:Cje}=BE(),{WebsocketFrameSend:Xne}=w0(),{closeWebSocketConnection:Zne}=PU(),{PerMessageDeflate:Ije}=zne(),{MessageSizeExceededError:kU}=rt();function PE(t,e,r){Zne(t,e,r,Buffer.byteLength(r)),Zs(t,r)}i(PE,"failWebsocketConnectionWithCode");var LU=class extends mje{static{i(this,"ByteParser")}#e=[];#t=0;#r=0;#o=!1;#s=ys.INFO;#n={};#i=[];#a;#l;#c;constructor(e,r,n={}){super(),this.ws=e,this.#a=r??new Map,this.#l=n.maxFragments??0,this.#c=n.maxPayloadSize??0,this.#a.has("permessage-deflate")&&this.#a.set("permessage-deflate",new Ije(r,n))}_write(e,r,n){this.#e.push(e),this.#r+=e.length,this.#o=!0,this.run(n)}#u(){return this.#c>0&&!_U(this.#n.opcode)&&this.#n.payloadLength+this.#t>this.#c?(PE(this.ws,1009,"Payload size exceeds maximum allowed size"),!1):!0}run(e){for(;this.#o;)if(this.#s===ys.INFO){if(this.#r<2)return e();let r=this.consume(2),n=(r[0]&128)!==0,s=r[0]&15,o=(r[1]&128)===128,a=!n&&s!==TA.CONTINUATION,c=r[1]&127,l=r[0]&64,u=r[0]&32,d=r[0]&16;if(!yje(s))return Zs(this.ws,"Invalid opcode received"),e();if(o)return Zs(this.ws,"Frame cannot be masked"),e();if(l!==0&&!this.#a.has("permessage-deflate")){Zs(this.ws,"Expected RSV1 to be clear.");return}if(u!==0||d!==0){Zs(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(a&&!DU(s)){Zs(this.ws,"Invalid frame type was fragmented.");return}if(DU(s)&&this.#i.length>0){Zs(this.ws,"Expected continuation frame");return}if(this.#n.fragmented&&a){Zs(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((c>125||a)&&_U(s)){Zs(this.ws,"Control frame either too large or fragmented");return}if(Cje(s)&&this.#i.length===0&&!this.#n.compressed){Zs(this.ws,"Unexpected continuation frame");return}if(c<=125){if(this.#n.payloadLength=c,this.#s=ys.READ_DATA,!this.#u())return}else c===126?this.#s=ys.PAYLOADLENGTH_16:c===127&&(this.#s=ys.PAYLOADLENGTH_64);DU(s)&&(this.#n.binaryType=s,this.#n.compressed=l!==0),this.#n.opcode=s,this.#n.masked=o,this.#n.fin=n,this.#n.fragmented=a}else if(this.#s===ys.PAYLOADLENGTH_16){if(this.#r<2)return e();let r=this.consume(2);if(this.#n.payloadLength=r.readUInt16BE(0),this.#s=ys.READ_DATA,!this.#u())return}else if(this.#s===ys.PAYLOADLENGTH_64){if(this.#r<8)return e();let r=this.consume(8),n=r.readUInt32BE(0),s=r.readUInt32BE(4);if(n!==0||s>2**31-1){Zs(this.ws,"Received payload length > 2^31 bytes.");return}if(this.#n.payloadLength=s,this.#s=ys.READ_DATA,!this.#u())return}else if(this.#s===ys.READ_DATA){if(this.#r{if(n){let o=n instanceof kU?1009:1007;PE(this.ws,o,n.message);return}if(this.writeFragments(s)){if(this.#c>0&&this.#t>this.#c){PE(this.ws,1009,new kU().message);return}if(!this.#n.fin){this.#s=ys.INFO,this.#o=!0,this.run(e);return}Kne(this.ws,this.#n.binaryType,this.consumeFragments()),this.#o=!0,this.#s=ys.INFO,this.run(e)}}),this.#o=!1;break}else{if(!this.writeFragments(r))return;if(this.#c>0&&this.#t>this.#c){PE(this.ws,1009,new kU().message);return}!this.#n.fragmented&&this.#n.fin&&Kne(this.ws,this.#n.binaryType,this.consumeFragments()),this.#s=ys.INFO}}}consume(e){if(e>this.#r)throw new Error("Called consume() before buffers satiated.");if(e===0)return Vne;if(this.#e[0].length===e)return this.#r-=this.#e[0].length,this.#e.shift();let r=Buffer.allocUnsafe(e),n=0;for(;n!==e;){let s=this.#e[0],{length:o}=s;if(o+n===e){r.set(this.#e.shift(),n);break}else if(o+n>e){r.set(s.subarray(0,e-n),n),this.#e[0]=s.subarray(e-n);break}else r.set(this.#e.shift(),n),n+=s.length}return this.#r-=e,r}writeFragments(e){return this.#l>0&&this.#i.length===this.#l?(PE(this.ws,1008,"Too many message fragments"),!1):(this.#t+=e.length,this.#i.push(e),!0)}consumeFragments(){let e=this.#i;if(e.length===1)return this.#t=0,e.shift();let r=Buffer.concat(e,this.#t);return this.#i=[],this.#t=0,r}parseCloseBody(e){fje(e.length!==1);let r;if(e.length>=2&&(r=e.readUInt16BE(0)),r!==void 0&&!gje(r))return{code:1002,reason:"Invalid status code",error:!0};let n=e.subarray(2);n[0]===239&&n[1]===187&&n[2]===191&&(n=n.subarray(3));try{n=Eje(n)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:r,reason:n,error:!1}}parseControlFrame(e){let{opcode:r,payloadLength:n}=this.#n;if(r===TA.CLOSE){if(n===1)return Zs(this.ws,"Received close frame with a 1-byte body."),!1;if(this.#n.closeInfo=this.parseCloseBody(e),this.#n.closeInfo.error){let{code:s,reason:o}=this.#n.closeInfo;return Zne(this.ws,s,o,o.length),Zs(this.ws,o),!1}if(this.ws[Yne]!==Wne.SENT){let s=Vne;this.#n.closeInfo.code&&(s=Buffer.allocUnsafe(2),s.writeUInt16BE(this.#n.closeInfo.code,0));let o=new Xne(s);this.ws[Jne].socket.write(o.createFrame(TA.CLOSE),a=>{a||(this.ws[Yne]=Wne.SENT)})}return this.ws[hje]=Aje.CLOSING,this.ws[jne]=!0,!1}else if(r===TA.PING){if(!this.ws[jne]){let s=new Xne(e);this.ws[Jne].socket.write(s.createFrame(TA.PONG)),B0.ping.hasSubscribers&&B0.ping.publish({payload:e})}}else r===TA.PONG&&B0.pong.hasSubscribers&&B0.pong.publish({payload:e});return!0}get closingInfo(){return this.#n.closeInfo}};ese.exports={ByteParser:LU}});var ise=I((B3t,ose)=>{"use strict";var{WebsocketFrameSend:wje}=w0(),{opcodes:rse,sendHints:vA}=Mp(),Sje=$F(),nse=Buffer[Symbol.species],OU=class{static{i(this,"SendQueue")}#e=new Sje;#t=!1;#r;constructor(e){this.#r=e}add(e,r,n){if(n!==vA.blob){let o=sse(e,n);if(!this.#t)this.#r.write(o,r);else{let a={promise:null,callback:r,frame:o};this.#e.push(a)}return}let s={promise:e.arrayBuffer().then(o=>{s.promise=null,s.frame=sse(o,n)}),callback:r,frame:null};this.#e.push(s),this.#t||this.#o()}async#o(){this.#t=!0;let e=this.#e;for(;!e.isEmpty();){let r=e.shift();r.promise!==null&&await r.promise,this.#r.write(r.frame,r.callback),r.callback=r.frame=null}this.#t=!1}};function sse(t,e){return new wje(xje(t,e)).createFrame(e===vA.string?rse.TEXT:rse.BINARY)}i(sse,"createFrame");function xje(t,e){switch(e){case vA.string:return Buffer.from(t);case vA.arrayBuffer:case vA.blob:return new nse(t);case vA.typedArray:return new nse(t.buffer,t.byteOffset,t.byteLength)}}i(xje,"toBuffer");ose.exports={SendQueue:OU}});var hse=I((N3t,Ase)=>{"use strict";var{webidl:xe}=sn(),{URLSerializer:bje}=ms(),{environmentSettingsObject:ase}=zs(),{staticPropertyDescriptors:ku,states:QE,sentCloseFrameState:Bje,sendHints:R0}=Mp(),{kWebSocketURL:cse,kReadyState:MU,kController:lse,kBinaryType:N0,kResponse:use,kSentClose:Rje,kByteParser:Nje}=SE(),{isConnecting:Tje,isEstablished:vje,isClosing:Pje,isValidSubprotocol:Qje,fireEvent:dse}=BE(),{establishWebSocketConnection:_je,closeWebSocketConnection:pse}=PU(),{ByteParser:Dje}=tse(),{kEnumerableProperty:ko,isBlobLike:mse}=He(),{getGlobalDispatcher:kje}=Hb(),{types:fse}=require("node:util"),{ErrorEvent:Lje,CloseEvent:Oje}=BA(),{SendQueue:Mje}=ise(),eo=class t extends EventTarget{static{i(this,"WebSocket")}#e={open:null,error:null,close:null,message:null};#t=0;#r="";#o="";#s;constructor(e,r=[]){super(),xe.util.markAsUncloneable(this);let n="WebSocket constructor";xe.argumentLengthCheck(arguments,1,n);let s=xe.converters["DOMString or sequence or WebSocketInit"](r,n,"options");e=xe.converters.USVString(e,n,"url"),r=s.protocols;let o=ase.settingsObject.baseUrl,a;try{a=new URL(e,o)}catch(l){throw new DOMException(l,"SyntaxError")}if(a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),a.protocol!=="ws:"&&a.protocol!=="wss:")throw new DOMException(`Expected a ws: or wss: protocol, got ${a.protocol}`,"SyntaxError");if(a.hash||a.href.endsWith("#"))throw new DOMException("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(l=>l.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(l=>Qje(l)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[cse]=new URL(a.href);let c=ase.settingsObject;this[lse]=_je(a,r,c,this,(l,u)=>this.#n(l,u),s),this[MU]=t.CONNECTING,this[Rje]=Bje.NOT_SENT,this[N0]="blob"}close(e=void 0,r=void 0){xe.brandCheck(this,t);let n="WebSocket.close";if(e!==void 0&&(e=xe.converters["unsigned short"](e,n,"code",{clamp:!0})),r!==void 0&&(r=xe.converters.USVString(r,n,"reason")),e!==void 0&&e!==1e3&&(e<3e3||e>4999))throw new DOMException("invalid code","InvalidAccessError");let s=0;if(r!==void 0&&(s=Buffer.byteLength(r),s>123))throw new DOMException(`Reason must be less than 123 bytes; received ${s}`,"SyntaxError");pse(this,e,r,s)}send(e){xe.brandCheck(this,t);let r="WebSocket.send";if(xe.argumentLengthCheck(arguments,1,r),e=xe.converters.WebSocketSendData(e,r,"data"),Tje(this))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!vje(this)||Pje(this)))if(typeof e=="string"){let n=Buffer.byteLength(e);this.#t+=n,this.#s.add(e,()=>{this.#t-=n},R0.string)}else fse.isArrayBuffer(e)?(this.#t+=e.byteLength,this.#s.add(e,()=>{this.#t-=e.byteLength},R0.arrayBuffer)):ArrayBuffer.isView(e)?(this.#t+=e.byteLength,this.#s.add(e,()=>{this.#t-=e.byteLength},R0.typedArray)):mse(e)&&(this.#t+=e.size,this.#s.add(e,()=>{this.#t-=e.size},R0.blob))}get readyState(){return xe.brandCheck(this,t),this[MU]}get bufferedAmount(){return xe.brandCheck(this,t),this.#t}get url(){return xe.brandCheck(this,t),bje(this[cse])}get extensions(){return xe.brandCheck(this,t),this.#o}get protocol(){return xe.brandCheck(this,t),this.#r}get onopen(){return xe.brandCheck(this,t),this.#e.open}set onopen(e){xe.brandCheck(this,t),this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onerror(){return xe.brandCheck(this,t),this.#e.error}set onerror(e){xe.brandCheck(this,t),this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}get onclose(){return xe.brandCheck(this,t),this.#e.close}set onclose(e){xe.brandCheck(this,t),this.#e.close&&this.removeEventListener("close",this.#e.close),typeof e=="function"?(this.#e.close=e,this.addEventListener("close",e)):this.#e.close=null}get onmessage(){return xe.brandCheck(this,t),this.#e.message}set onmessage(e){xe.brandCheck(this,t),this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get binaryType(){return xe.brandCheck(this,t),this[N0]}set binaryType(e){xe.brandCheck(this,t),e!=="blob"&&e!=="arraybuffer"?this[N0]="blob":this[N0]=e}#n(e,r){this[use]=e;let n=this[lse]?.dispatcher?.webSocketOptions,s=n?.maxFragments,o=n?.maxPayloadSize,a=new Dje(this,r,{maxFragments:s,maxPayloadSize:o});a.on("drain",Fje),a.on("error",Uje.bind(this)),e.socket.ws=this,this[Nje]=a,this.#s=new Mje(e.socket),this[MU]=QE.OPEN;let c=e.headersList.get("sec-websocket-extensions");c!==null&&(this.#o=c);let l=e.headersList.get("sec-websocket-protocol");l!==null&&(this.#r=l),dse("open",this)}};eo.CONNECTING=eo.prototype.CONNECTING=QE.CONNECTING;eo.OPEN=eo.prototype.OPEN=QE.OPEN;eo.CLOSING=eo.prototype.CLOSING=QE.CLOSING;eo.CLOSED=eo.prototype.CLOSED=QE.CLOSED;Object.defineProperties(eo.prototype,{CONNECTING:ku,OPEN:ku,CLOSING:ku,CLOSED:ku,url:ko,readyState:ko,bufferedAmount:ko,onopen:ko,onerror:ko,onclose:ko,close:ko,onmessage:ko,binaryType:ko,send:ko,extensions:ko,protocol:ko,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(eo,{CONNECTING:ku,OPEN:ku,CLOSING:ku,CLOSED:ku});xe.converters["sequence"]=xe.sequenceConverter(xe.converters.DOMString);xe.converters["DOMString or sequence"]=function(t,e,r){return xe.util.Type(t)==="Object"&&Symbol.iterator in t?xe.converters["sequence"](t):xe.converters.DOMString(t,e,r)};xe.converters.WebSocketInit=xe.dictionaryConverter([{key:"protocols",converter:xe.converters["DOMString or sequence"],defaultValue:i(()=>new Array(0),"defaultValue")},{key:"dispatcher",converter:xe.converters.any,defaultValue:i(()=>kje(),"defaultValue")},{key:"headers",converter:xe.nullableConverter(xe.converters.HeadersInit)}]);xe.converters["DOMString or sequence or WebSocketInit"]=function(t){return xe.util.Type(t)==="Object"&&!(Symbol.iterator in t)?xe.converters.WebSocketInit(t):{protocols:xe.converters["DOMString or sequence"](t)}};xe.converters.WebSocketSendData=function(t){if(xe.util.Type(t)==="Object"){if(mse(t))return xe.converters.Blob(t,{strict:!1});if(ArrayBuffer.isView(t)||fse.isArrayBuffer(t))return xe.converters.BufferSource(t)}return xe.converters.USVString(t)};function Fje(){this.ws[use].socket.resume()}i(Fje,"onParserDrain");function Uje(t){let e,r;t instanceof Oje?(e=t.reason,r=t.code):e=t.message,dse("error",this,()=>new Lje("error",{error:t,message:e})),pse(this,r)}i(Uje,"onParserError");Ase.exports={WebSocket:eo}});var FU=I((v3t,gse)=>{"use strict";function qje(t){return t.indexOf("\0")===-1}i(qje,"isValidLastEventId");function Gje(t){if(t.length===0)return!1;for(let e=0;e57)return!1;return!0}i(Gje,"isASCIINumber");function Hje(t){return new Promise(e=>{setTimeout(e,t).unref()})}i(Hje,"delay");gse.exports={isValidLastEventId:qje,isASCIINumber:Gje,delay:Hje}});var Ise=I((Q3t,Cse)=>{"use strict";var{Transform:$je}=require("node:stream"),{isASCIINumber:yse,isValidLastEventId:Ese}=FU(),Sl=[239,187,191],UU=10,T0=13,zje=58,Vje=32,qU=class extends $je{static{i(this,"EventSourceStream")}state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,r,n){if(e.length===0){n();return}if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===Sl[0]){n();return}this.checkBOM=!1,n();return;case 2:if(this.buffer[0]===Sl[0]&&this.buffer[1]===Sl[1]){n();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===Sl[0]&&this.buffer[1]===Sl[1]&&this.buffer[2]===Sl[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,n();return}this.checkBOM=!1;break;default:this.buffer[0]===Sl[0]&&this.buffer[1]===Sl[1]&&this.buffer[2]===Sl[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1;break}for(;this.pos0&&(r[s]=o);break}}processEvent(e){e.retry&&yse(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Ese(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};Cse.exports={EventSourceStream:qU}});var Tse=I((D3t,Nse)=>{"use strict";var{pipeline:Wje}=require("node:stream"),{fetching:Yje}=EE(),{makeRequest:Jje}=CA(),{webidl:xl}=sn(),{EventSourceStream:jje}=Ise(),{parseMIMEType:Kje}=ms(),{createFastMessageEvent:Xje}=BA(),{isNetworkError:wse}=gE(),{delay:Zje}=FU(),{kEnumerableProperty:Fp}=He(),{environmentSettingsObject:Sse}=zs(),xse=!1,bse=3e3,_E=0,Bse=1,DE=2,e6e="anonymous",t6e="use-credentials",PA=class t extends EventTarget{static{i(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#r=!1;#o=_E;#s=null;#n=null;#i;#a;constructor(e,r={}){super(),xl.util.markAsUncloneable(this);let n="EventSource constructor";xl.argumentLengthCheck(arguments,1,n),xse||(xse=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=xl.converters.USVString(e,n,"url"),r=xl.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#i=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:bse};let s=Sse,o;try{o=new URL(e,s.settingsObject.baseUrl),this.#a.origin=o.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=o.href;let a=e6e;r.withCredentials&&(a=t6e,this.#r=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=Sse.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#s=Jje(c),this.#l()}get readyState(){return this.#o}get url(){return this.#t}get withCredentials(){return this.#r}#l(){if(this.#o===DE)return;this.#o=_E;let e={request:this.#s,dispatcher:this.#i},r=i(n=>{wse(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(wse(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),o=s!==null?Kje(s):"failure",a=o!=="failure"&&o.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#o=Bse,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let c=new jje({eventSourceSettings:this.#a,push:i(l=>{this.dispatchEvent(Xje(l.type,l.options))},"push")});Wje(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#n=Yje(e)}async#c(){this.#o!==DE&&(this.#o=_E,this.dispatchEvent(new Event("error")),await Zje(this.#a.reconnectionTime),this.#o===_E&&(this.#a.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#l()))}close(){xl.brandCheck(this,t),this.#o!==DE&&(this.#o=DE,this.#n.abort(),this.#s=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},Rse={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:_E,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Bse,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:DE,writable:!1}};Object.defineProperties(PA,Rse);Object.defineProperties(PA.prototype,Rse);Object.defineProperties(PA.prototype,{close:Fp,onerror:Fp,onmessage:Fp,onopen:Fp,readyState:Fp,url:Fp,withCredentials:Fp});xl.converters.EventSourceInitDict=xl.dictionaryConverter([{key:"withCredentials",converter:xl.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"dispatcher",converter:xl.converters.any}]);Nse.exports={EventSource:PA,defaultReconnectionTime:bse}});var Up=I((L3t,Ie)=>{"use strict";var r6e=oA(),vse=Oy(),n6e=iA(),s6e=RZ(),o6e=aA(),i6e=u1(),a6e=KZ(),c6e=nee(),Pse=rt(),P0=He(),{InvalidArgumentError:v0}=Pse,QA=Hee(),l6e=Fy(),u6e=z1(),d6e=bte(),p6e=Y1(),m6e=Q1(),f6e=_b(),{getGlobalDispatcher:Qse,setGlobalDispatcher:A6e}=Hb(),h6e=$b(),g6e=wb(),y6e=Sb();Object.assign(vse.prototype,QA);Ie.exports.Dispatcher=vse;Ie.exports.Client=r6e;Ie.exports.Pool=n6e;Ie.exports.BalancedPool=s6e;Ie.exports.Agent=o6e;Ie.exports.ProxyAgent=i6e;Ie.exports.EnvHttpProxyAgent=a6e;Ie.exports.RetryAgent=c6e;Ie.exports.RetryHandler=f6e;Ie.exports.DecoratorHandler=h6e;Ie.exports.RedirectHandler=g6e;Ie.exports.createRedirectInterceptor=y6e;Ie.exports.interceptors={redirect:Qte(),retry:Dte(),dump:Lte(),dns:Fte()};Ie.exports.buildConnector=l6e;Ie.exports.errors=Pse;Ie.exports.util={parseHeaders:P0.parseHeaders,headerNameToString:P0.headerNameToString};function kE(t){return(e,r,n)=>{if(typeof r=="function"&&(n=r,r=null),!e||typeof e!="string"&&typeof e!="object"&&!(e instanceof URL))throw new v0("invalid url");if(r!=null&&typeof r!="object")throw new v0("invalid opts");if(r&&r.path!=null){if(typeof r.path!="string")throw new v0("invalid opts.path");let a=r.path;r.path.startsWith("/")||(a=`/${a}`),e=new URL(P0.parseOrigin(e).origin+a)}else r||(r=typeof e=="object"?e:{}),e=P0.parseURL(e);let{agent:s,dispatcher:o=Qse()}=r;if(s)throw new v0("unsupported opts.agent. Did you mean opts.client?");return t.call(o,{...r,origin:e.origin,path:e.search?`${e.pathname}${e.search}`:e.pathname,method:r.method||(r.body?"PUT":"GET")},n)}}i(kE,"makeDispatcher");Ie.exports.setGlobalDispatcher=A6e;Ie.exports.getGlobalDispatcher=Qse;var E6e=EE().fetch;Ie.exports.fetch=i(async function(e,r=void 0){try{return await E6e(e,r)}catch(n){throw n&&typeof n=="object"&&Error.captureStackTrace(n),n}},"fetch");Ie.exports.Headers=Qp().Headers;Ie.exports.Response=gE().Response;Ie.exports.Request=CA().Request;Ie.exports.FormData=Vy().FormData;Ie.exports.File=globalThis.File??require("node:buffer").File;Ie.exports.FileReader=tne().FileReader;var{setGlobalOrigin:C6e,getGlobalOrigin:I6e}=dF();Ie.exports.setGlobalOrigin=C6e;Ie.exports.getGlobalOrigin=I6e;var{CacheStorage:w6e}=une(),{kConstruct:S6e}=d0();Ie.exports.caches=new w6e(S6e);var{deleteCookie:x6e,getCookies:b6e,getSetCookies:B6e,setCookie:R6e}=wne();Ie.exports.deleteCookie=x6e;Ie.exports.getCookies=b6e;Ie.exports.getSetCookies=B6e;Ie.exports.setCookie=R6e;var{parseMIMEType:N6e,serializeAMimeType:T6e}=ms();Ie.exports.parseMIMEType=N6e;Ie.exports.serializeAMimeType=T6e;var{CloseEvent:v6e,ErrorEvent:P6e,MessageEvent:Q6e}=BA();Ie.exports.WebSocket=hse().WebSocket;Ie.exports.CloseEvent=v6e;Ie.exports.ErrorEvent=P6e;Ie.exports.MessageEvent=Q6e;Ie.exports.request=kE(QA.request);Ie.exports.stream=kE(QA.stream);Ie.exports.pipeline=kE(QA.pipeline);Ie.exports.connect=kE(QA.connect);Ie.exports.upgrade=kE(QA.upgrade);Ie.exports.MockClient=u6e;Ie.exports.MockPool=p6e;Ie.exports.MockAgent=d6e;Ie.exports.mockErrors=m6e;var{EventSource:_6e}=Tse();Ie.exports.EventSource=_6e});var VE=I((h4t,Aoe)=>{"use strict";var a9e="2.0.0",c9e=Number.MAX_SAFE_INTEGER||9007199254740991,l9e=16,u9e=250,d9e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Aoe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:l9e,MAX_SAFE_BUILD_LENGTH:u9e,MAX_SAFE_INTEGER:c9e,RELEASE_TYPES:d9e,SEMVER_SPEC_VERSION:a9e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var WE=I((g4t,hoe)=>{"use strict";var p9e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};hoe.exports=p9e});var LA=I((ka,goe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:c2,MAX_SAFE_BUILD_LENGTH:m9e,MAX_LENGTH:f9e}=VE(),A9e=WE();ka=goe.exports={};var h9e=ka.re=[],g9e=ka.safeRe=[],H=ka.src=[],y9e=ka.safeSrc=[],$=ka.t={},E9e=0,l2="[a-zA-Z0-9-]",C9e=[["\\s",1],["\\d",f9e],[l2,m9e]],I9e=i(t=>{for(let[e,r]of C9e)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),_e=i((t,e,r)=>{let n=I9e(e),s=E9e++;A9e(t,s,e),$[t]=s,H[s]=e,y9e[s]=n,h9e[s]=new RegExp(e,r?"g":void 0),g9e[s]=new RegExp(n,r?"g":void 0)},"createToken");_e("NUMERICIDENTIFIER","0|[1-9]\\d*");_e("NUMERICIDENTIFIERLOOSE","\\d+");_e("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l2}*`);_e("MAINVERSION",`(${H[$.NUMERICIDENTIFIER]})\\.(${H[$.NUMERICIDENTIFIER]})\\.(${H[$.NUMERICIDENTIFIER]})`);_e("MAINVERSIONLOOSE",`(${H[$.NUMERICIDENTIFIERLOOSE]})\\.(${H[$.NUMERICIDENTIFIERLOOSE]})\\.(${H[$.NUMERICIDENTIFIERLOOSE]})`);_e("PRERELEASEIDENTIFIER",`(?:${H[$.NONNUMERICIDENTIFIER]}|${H[$.NUMERICIDENTIFIER]})`);_e("PRERELEASEIDENTIFIERLOOSE",`(?:${H[$.NONNUMERICIDENTIFIER]}|${H[$.NUMERICIDENTIFIERLOOSE]})`);_e("PRERELEASE",`(?:-(${H[$.PRERELEASEIDENTIFIER]}(?:\\.${H[$.PRERELEASEIDENTIFIER]})*))`);_e("PRERELEASELOOSE",`(?:-?(${H[$.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${H[$.PRERELEASEIDENTIFIERLOOSE]})*))`);_e("BUILDIDENTIFIER",`${l2}+`);_e("BUILD",`(?:\\+(${H[$.BUILDIDENTIFIER]}(?:\\.${H[$.BUILDIDENTIFIER]})*))`);_e("FULLPLAIN",`v?${H[$.MAINVERSION]}${H[$.PRERELEASE]}?${H[$.BUILD]}?`);_e("FULL",`^${H[$.FULLPLAIN]}$`);_e("LOOSEPLAIN",`[v=\\s]*${H[$.MAINVERSIONLOOSE]}${H[$.PRERELEASELOOSE]}?${H[$.BUILD]}?`);_e("LOOSE",`^${H[$.LOOSEPLAIN]}$`);_e("GTLT","((?:<|>)?=?)");_e("XRANGEIDENTIFIERLOOSE",`${H[$.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);_e("XRANGEIDENTIFIER",`${H[$.NUMERICIDENTIFIER]}|x|X|\\*`);_e("XRANGEPLAIN",`[v=\\s]*(${H[$.XRANGEIDENTIFIER]})(?:\\.(${H[$.XRANGEIDENTIFIER]})(?:\\.(${H[$.XRANGEIDENTIFIER]})(?:${H[$.PRERELEASE]})?${H[$.BUILD]}?)?)?`);_e("XRANGEPLAINLOOSE",`[v=\\s]*(${H[$.XRANGEIDENTIFIERLOOSE]})(?:\\.(${H[$.XRANGEIDENTIFIERLOOSE]})(?:\\.(${H[$.XRANGEIDENTIFIERLOOSE]})(?:${H[$.PRERELEASELOOSE]})?${H[$.BUILD]}?)?)?`);_e("XRANGE",`^${H[$.GTLT]}\\s*${H[$.XRANGEPLAIN]}$`);_e("XRANGELOOSE",`^${H[$.GTLT]}\\s*${H[$.XRANGEPLAINLOOSE]}$`);_e("COERCEPLAIN",`(^|[^\\d])(\\d{1,${c2}})(?:\\.(\\d{1,${c2}}))?(?:\\.(\\d{1,${c2}}))?`);_e("COERCE",`${H[$.COERCEPLAIN]}(?:$|[^\\d])`);_e("COERCEFULL",H[$.COERCEPLAIN]+`(?:${H[$.PRERELEASE]})?(?:${H[$.BUILD]})?(?:$|[^\\d])`);_e("COERCERTL",H[$.COERCE],!0);_e("COERCERTLFULL",H[$.COERCEFULL],!0);_e("LONETILDE","(?:~>?)");_e("TILDETRIM",`(\\s*)${H[$.LONETILDE]}\\s+`,!0);ka.tildeTrimReplace="$1~";_e("TILDE",`^${H[$.LONETILDE]}${H[$.XRANGEPLAIN]}$`);_e("TILDELOOSE",`^${H[$.LONETILDE]}${H[$.XRANGEPLAINLOOSE]}$`);_e("LONECARET","(?:\\^)");_e("CARETTRIM",`(\\s*)${H[$.LONECARET]}\\s+`,!0);ka.caretTrimReplace="$1^";_e("CARET",`^${H[$.LONECARET]}${H[$.XRANGEPLAIN]}$`);_e("CARETLOOSE",`^${H[$.LONECARET]}${H[$.XRANGEPLAINLOOSE]}$`);_e("COMPARATORLOOSE",`^${H[$.GTLT]}\\s*(${H[$.LOOSEPLAIN]})$|^$`);_e("COMPARATOR",`^${H[$.GTLT]}\\s*(${H[$.FULLPLAIN]})$|^$`);_e("COMPARATORTRIM",`(\\s*)${H[$.GTLT]}\\s*(${H[$.LOOSEPLAIN]}|${H[$.XRANGEPLAIN]})`,!0);ka.comparatorTrimReplace="$1$2$3";_e("HYPHENRANGE",`^\\s*(${H[$.XRANGEPLAIN]})\\s+-\\s+(${H[$.XRANGEPLAIN]})\\s*$`);_e("HYPHENRANGELOOSE",`^\\s*(${H[$.XRANGEPLAINLOOSE]})\\s+-\\s+(${H[$.XRANGEPLAINLOOSE]})\\s*$`);_e("STAR","(<|>)?=?\\s*\\*");_e("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");_e("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var U0=I((E4t,yoe)=>{"use strict";var w9e=Object.freeze({loose:!0}),S9e=Object.freeze({}),x9e=i(t=>t?typeof t!="object"?w9e:t:S9e,"parseOptions");yoe.exports=x9e});var u2=I((I4t,Ioe)=>{"use strict";var Eoe=/^[0-9]+$/,Coe=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:tCoe(e,t),"rcompareIdentifiers");Ioe.exports={compareIdentifiers:Coe,rcompareIdentifiers:b9e}});var bn=I((S4t,Soe)=>{"use strict";var q0=WE(),{MAX_LENGTH:woe,MAX_SAFE_INTEGER:G0}=VE(),{safeRe:H0,t:$0}=LA(),B9e=U0(),{compareIdentifiers:d2}=u2(),p2=class t{static{i(this,"SemVer")}constructor(e,r){if(r=B9e(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>woe)throw new TypeError(`version is longer than ${woe} characters`);q0("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?H0[$0.LOOSE]:H0[$0.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>G0||this.major<0)throw new TypeError("Invalid major version");if(this.minor>G0||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>G0||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&oe.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(q0("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return d2(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(q0("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return d2(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?H0[$0.PRERELEASELOOSE]:H0[$0.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),d2(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Soe.exports=p2});var Vp=I((b4t,boe)=>{"use strict";var xoe=bn(),R9e=i((t,e,r=!1)=>{if(t instanceof xoe)return t;try{return new xoe(t,e)}catch(n){if(!r)return null;throw n}},"parse");boe.exports=R9e});var Roe=I((R4t,Boe)=>{"use strict";var N9e=Vp(),T9e=i((t,e)=>{let r=N9e(t,e);return r?r.version:null},"valid");Boe.exports=T9e});var Toe=I((T4t,Noe)=>{"use strict";var v9e=Vp(),P9e=i((t,e)=>{let r=v9e(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");Noe.exports=P9e});var Qoe=I((P4t,Poe)=>{"use strict";var voe=bn(),Q9e=i((t,e,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new voe(t instanceof voe?t.version:t,r).inc(e,n,s).version}catch{return null}},"inc");Poe.exports=Q9e});var koe=I((_4t,Doe)=>{"use strict";var _oe=Vp(),_9e=i((t,e)=>{let r=_oe(t,null,!0),n=_oe(e,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,a=o?r:n,c=o?n:r,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"},"diff");Doe.exports=_9e});var Ooe=I((k4t,Loe)=>{"use strict";var D9e=bn(),k9e=i((t,e)=>new D9e(t,e).major,"major");Loe.exports=k9e});var Foe=I((O4t,Moe)=>{"use strict";var L9e=bn(),O9e=i((t,e)=>new L9e(t,e).minor,"minor");Moe.exports=O9e});var qoe=I((F4t,Uoe)=>{"use strict";var M9e=bn(),F9e=i((t,e)=>new M9e(t,e).patch,"patch");Uoe.exports=F9e});var Hoe=I((q4t,Goe)=>{"use strict";var U9e=Vp(),q9e=i((t,e)=>{let r=U9e(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");Goe.exports=q9e});var Oo=I((H4t,zoe)=>{"use strict";var $oe=bn(),G9e=i((t,e,r)=>new $oe(t,r).compare(new $oe(e,r)),"compare");zoe.exports=G9e});var Woe=I((z4t,Voe)=>{"use strict";var H9e=Oo(),$9e=i((t,e,r)=>H9e(e,t,r),"rcompare");Voe.exports=$9e});var Joe=I((W4t,Yoe)=>{"use strict";var z9e=Oo(),V9e=i((t,e)=>z9e(t,e,!0),"compareLoose");Yoe.exports=V9e});var z0=I((J4t,Koe)=>{"use strict";var joe=bn(),W9e=i((t,e,r)=>{let n=new joe(t,r),s=new joe(e,r);return n.compare(s)||n.compareBuild(s)},"compareBuild");Koe.exports=W9e});var Zoe=I((K4t,Xoe)=>{"use strict";var Y9e=z0(),J9e=i((t,e)=>t.sort((r,n)=>Y9e(r,n,e)),"sort");Xoe.exports=J9e});var tie=I((Z4t,eie)=>{"use strict";var j9e=z0(),K9e=i((t,e)=>t.sort((r,n)=>j9e(n,r,e)),"rsort");eie.exports=K9e});var YE=I((tWt,rie)=>{"use strict";var X9e=Oo(),Z9e=i((t,e,r)=>X9e(t,e,r)>0,"gt");rie.exports=Z9e});var V0=I((nWt,nie)=>{"use strict";var eKe=Oo(),tKe=i((t,e,r)=>eKe(t,e,r)<0,"lt");nie.exports=tKe});var m2=I((oWt,sie)=>{"use strict";var rKe=Oo(),nKe=i((t,e,r)=>rKe(t,e,r)===0,"eq");sie.exports=nKe});var f2=I((aWt,oie)=>{"use strict";var sKe=Oo(),oKe=i((t,e,r)=>sKe(t,e,r)!==0,"neq");oie.exports=oKe});var W0=I((lWt,iie)=>{"use strict";var iKe=Oo(),aKe=i((t,e,r)=>iKe(t,e,r)>=0,"gte");iie.exports=aKe});var Y0=I((dWt,aie)=>{"use strict";var cKe=Oo(),lKe=i((t,e,r)=>cKe(t,e,r)<=0,"lte");aie.exports=lKe});var A2=I((mWt,cie)=>{"use strict";var uKe=m2(),dKe=f2(),pKe=YE(),mKe=W0(),fKe=V0(),AKe=Y0(),hKe=i((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return uKe(t,r,n);case"!=":return dKe(t,r,n);case">":return pKe(t,r,n);case">=":return mKe(t,r,n);case"<":return fKe(t,r,n);case"<=":return AKe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");cie.exports=hKe});var uie=I((AWt,lie)=>{"use strict";var gKe=bn(),yKe=Vp(),{safeRe:J0,t:j0}=LA(),EKe=i((t,e)=>{if(t instanceof gKe)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?J0[j0.COERCEFULL]:J0[j0.COERCE]);else{let l=e.includePrerelease?J0[j0.COERCERTLFULL]:J0[j0.COERCERTL],u;for(;(u=l.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return yKe(`${n}.${s}.${o}${a}${c}`,e)},"coerce");lie.exports=EKe});var pie=I((gWt,die)=>{"use strict";var h2=class{static{i(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,r)}return this}};die.exports=h2});var Mo=I((EWt,hie)=>{"use strict";var CKe=/\s+/g,g2=class t{static{i(this,"Range")}constructor(e,r){if(r=wKe(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof y2)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(CKe," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!fie(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&TKe(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&RKe)|(this.options.loose&&NKe))+":"+e,s=mie.get(n);if(s)return s;let o=this.options.loose,a=o?$n[Bn.HYPHENRANGELOOSE]:$n[Bn.HYPHENRANGE];e=e.replace(a,FKe(this.options.includePrerelease)),vt("hyphen replace",e),e=e.replace($n[Bn.COMPARATORTRIM],xKe),vt("comparator trim",e),e=e.replace($n[Bn.TILDETRIM],bKe),vt("tilde trim",e),e=e.replace($n[Bn.CARETTRIM],BKe),vt("caret trim",e);let c=e.split(" ").map(p=>vKe(p,this.options)).join(" ").split(/\s+/).map(p=>MKe(p,this.options));o&&(c=c.filter(p=>(vt("loose invalid filter",p,this.options),!!p.match($n[Bn.COMPARATORLOOSE])))),vt("range list",c);let l=new Map,u=c.map(p=>new y2(p,this.options));for(let p of u){if(fie(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return mie.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Aie(n,r)&&e.set.some(s=>Aie(s,r)&&n.every(o=>s.every(a=>o.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new SKe(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),TKe=i(t=>t.value==="","isAny"),Aie=i((t,e)=>{let r=!0,n=t.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,e)),s=n.pop();return r},"isSatisfiable"),vKe=i((t,e)=>(t=t.replace($n[Bn.BUILD],""),vt("comp",t,e),t=_Ke(t,e),vt("caret",t),t=PKe(t,e),vt("tildes",t),t=kKe(t,e),vt("xrange",t),t=OKe(t,e),vt("stars",t),t),"parseComparator"),zn=i(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),PKe=i((t,e)=>t.trim().split(/\s+/).map(r=>QKe(r,e)).join(" "),"replaceTildes"),QKe=i((t,e)=>{let r=e.loose?$n[Bn.TILDELOOSE]:$n[Bn.TILDE];return t.replace(r,(n,s,o,a,c)=>{vt("tilde",t,n,s,o,a,c);let l;return zn(s)?l="":zn(o)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:zn(a)?l=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:c?(vt("replaceTilde pr",c),l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,vt("tilde return",l),l})},"replaceTilde"),_Ke=i((t,e)=>t.trim().split(/\s+/).map(r=>DKe(r,e)).join(" "),"replaceCarets"),DKe=i((t,e)=>{vt("caret",t,e);let r=e.loose?$n[Bn.CARETLOOSE]:$n[Bn.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{vt("caret",t,s,o,a,c,l);let u;return zn(o)?u="":zn(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:zn(c)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:l?(vt("replaceCaret pr",l),o==="0"?a==="0"?u=`>=${o}.${a}.${c}-${l} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c}-${l} <${+o+1}.0.0-0`):(vt("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${c}${n} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`),vt("caret return",u),u})},"replaceCaret"),kKe=i((t,e)=>(vt("replaceXRanges",t,e),t.split(/\s+/).map(r=>LKe(r,e)).join(" ")),"replaceXRanges"),LKe=i((t,e)=>{t=t.trim();let r=e.loose?$n[Bn.XRANGELOOSE]:$n[Bn.XRANGE];return t.replace(r,(n,s,o,a,c,l)=>{vt("xRange",t,n,s,o,a,c,l);let u=zn(o),d=u||zn(a),p=d||zn(c),m=p;return s==="="&&m&&(s=""),l=e.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(d&&(a=0),c=0,s===">"?(s=">=",d?(o=+o+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",d?o=+o+1:a=+a+1),s==="<"&&(l="-0"),n=`${s+o}.${a}.${c}${l}`):d?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),vt("xRange return",n),n})},"replaceXRange"),OKe=i((t,e)=>(vt("replaceStars",t,e),t.trim().replace($n[Bn.STAR],"")),"replaceStars"),MKe=i((t,e)=>(vt("replaceGTE0",t,e),t.trim().replace($n[e.includePrerelease?Bn.GTE0PRE:Bn.GTE0],"")),"replaceGTE0"),FKe=i(t=>(e,r,n,s,o,a,c,l,u,d,p,m)=>(zn(n)?r="":zn(s)?r=`>=${n}.0.0${t?"-0":""}`:zn(o)?r=`>=${n}.${s}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,zn(u)?l="":zn(d)?l=`<${+u+1}.0.0-0`:zn(p)?l=`<${u}.${+d+1}.0-0`:m?l=`<=${u}.${d}.${p}-${m}`:t?l=`<${u}.${d}.${+p+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),"hyphenReplace"),UKe=i((t,e,r)=>{for(let n=0;n0){let s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0},"testSet")});var JE=I((IWt,wie)=>{"use strict";var jE=Symbol("SemVer ANY"),I2=class t{static{i(this,"Comparator")}static get ANY(){return jE}constructor(e,r){if(r=gie(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),C2("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===jE?this.value="":this.value=this.operator+this.semver.version,C2("comp",this)}parse(e){let r=this.options.loose?yie[Eie.COMPARATORLOOSE]:yie[Eie.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Cie(n[2],this.options.loose):this.semver=jE}toString(){return this.value}test(e){if(C2("Comparator.test",e,this.options.loose),this.semver===jE||e===jE)return!0;if(typeof e=="string")try{e=new Cie(e,this.options)}catch{return!1}return E2(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Iie(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Iie(this.value,r).test(e.semver):(r=gie(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||E2(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||E2(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};wie.exports=I2;var gie=U0(),{safeRe:yie,t:Eie}=LA(),E2=A2(),C2=WE(),Cie=bn(),Iie=Mo()});var KE=I((SWt,Sie)=>{"use strict";var qKe=Mo(),GKe=i((t,e,r)=>{try{e=new qKe(e,r)}catch{return!1}return e.test(t)},"satisfies");Sie.exports=GKe});var bie=I((bWt,xie)=>{"use strict";var HKe=Mo(),$Ke=i((t,e)=>new HKe(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");xie.exports=$Ke});var Rie=I((RWt,Bie)=>{"use strict";var zKe=bn(),VKe=Mo(),WKe=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new VKe(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new zKe(n,r))}),n},"maxSatisfying");Bie.exports=WKe});var Tie=I((TWt,Nie)=>{"use strict";var YKe=bn(),JKe=Mo(),jKe=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new JKe(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new YKe(n,r))}),n},"minSatisfying");Nie.exports=jKe});var Qie=I((PWt,Pie)=>{"use strict";var w2=bn(),KKe=Mo(),vie=YE(),XKe=i((t,e)=>{t=new KKe(t,e);let r=new w2("0.0.0");if(t.test(r)||(r=new w2("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let c=new w2(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||vie(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||vie(r,o))&&(r=o)}return r&&t.test(r)?r:null},"minVersion");Pie.exports=XKe});var Die=I((_Wt,_ie)=>{"use strict";var ZKe=Mo(),eXe=i((t,e)=>{try{return new ZKe(t,e).range||"*"}catch{return null}},"validRange");_ie.exports=eXe});var K0=I((kWt,Mie)=>{"use strict";var tXe=bn(),Oie=JE(),{ANY:rXe}=Oie,nXe=Mo(),sXe=KE(),kie=YE(),Lie=V0(),oXe=Y0(),iXe=W0(),aXe=i((t,e,r,n)=>{t=new tXe(t,n),e=new nXe(e,n);let s,o,a,c,l;switch(r){case">":s=kie,o=oXe,a=Lie,c=">",l=">=";break;case"<":s=Lie,o=iXe,a=kie,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sXe(t,e,n))return!1;for(let u=0;u{f.semver===rXe&&(f=new Oie(">=0.0.0")),p=p||f,m=m||f,s(f.semver,p.semver,n)?p=f:a(f.semver,m.semver,n)&&(m=f)}),p.operator===c||p.operator===l||(!m.operator||m.operator===c)&&o(t,m.semver))return!1;if(m.operator===l&&a(t,m.semver))return!1}return!0},"outside");Mie.exports=aXe});var Uie=I((OWt,Fie)=>{"use strict";var cXe=K0(),lXe=i((t,e,r)=>cXe(t,e,">",r),"gtr");Fie.exports=lXe});var Gie=I((FWt,qie)=>{"use strict";var uXe=K0(),dXe=i((t,e,r)=>uXe(t,e,"<",r),"ltr");qie.exports=dXe});var zie=I((qWt,$ie)=>{"use strict";var Hie=Mo(),pXe=i((t,e,r)=>(t=new Hie(t,r),e=new Hie(e,r),t.intersects(e,r)),"intersects");$ie.exports=pXe});var Wie=I((HWt,Vie)=>{"use strict";var mXe=KE(),fXe=Oo();Vie.exports=(t,e,r)=>{let n=[],s=null,o=null,a=t.sort((d,p)=>fXe(d,p,r));for(let d of a)mXe(d,e,r)?(o=d,s||(s=d)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let c=[];for(let[d,p]of n)d===p?c.push(d):!p&&d===a[0]?c.push("*"):p?d===a[0]?c.push(`<=${p}`):c.push(`${d} - ${p}`):c.push(`>=${d}`);let l=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{"use strict";var Yie=Mo(),x2=JE(),{ANY:S2}=x2,XE=KE(),b2=Oo(),AXe=i((t,e,r={})=>{if(t===e)return!0;t=new Yie(t,r),e=new Yie(e,r);let n=!1;e:for(let s of t.set){for(let o of e.set){let a=gXe(s,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},"subset"),hXe=[new x2(">=0.0.0-0")],Jie=[new x2(">=0.0.0")],gXe=i((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===S2){if(e.length===1&&e[0].semver===S2)return!0;r.includePrerelease?t=hXe:t=Jie}if(e.length===1&&e[0].semver===S2){if(r.includePrerelease)return!0;e=Jie}let n=new Set,s,o;for(let f of t)f.operator===">"||f.operator===">="?s=jie(s,f,r):f.operator==="<"||f.operator==="<="?o=Kie(o,f,r):n.add(f.semver);if(n.size>1)return null;let a;if(s&&o){if(a=b2(s.semver,o.semver,r),a>0)return null;if(a===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(s&&!XE(f,String(s),r)||o&&!XE(f,String(o),r))return null;for(let A of e)if(!XE(f,String(A),r))return!1;return!0}let c,l,u,d,p=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,m=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(d=d||f.operator===">"||f.operator===">=",u=u||f.operator==="<"||f.operator==="<=",s){if(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(c=jie(s,f,r),c===f&&c!==s)return!1}else if(s.operator===">="&&!XE(s.semver,String(f),r))return!1}if(o){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(l=Kie(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!XE(o.semver,String(f),r))return!1}if(!f.operator&&(o||s)&&a!==0)return!1}return!(s&&u&&!o&&a!==0||o&&d&&!s&&a!==0||m||p)},"simpleSubset"),jie=i((t,e,r)=>{if(!t)return e;let n=b2(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),Kie=i((t,e,r)=>{if(!t)return e;let n=b2(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");Xie.exports=AXe});var R2=I((VWt,rae)=>{"use strict";var B2=LA(),eae=VE(),yXe=bn(),tae=u2(),EXe=Vp(),CXe=Roe(),IXe=Toe(),wXe=Qoe(),SXe=koe(),xXe=Ooe(),bXe=Foe(),BXe=qoe(),RXe=Hoe(),NXe=Oo(),TXe=Woe(),vXe=Joe(),PXe=z0(),QXe=Zoe(),_Xe=tie(),DXe=YE(),kXe=V0(),LXe=m2(),OXe=f2(),MXe=W0(),FXe=Y0(),UXe=A2(),qXe=uie(),GXe=JE(),HXe=Mo(),$Xe=KE(),zXe=bie(),VXe=Rie(),WXe=Tie(),YXe=Qie(),JXe=Die(),jXe=K0(),KXe=Uie(),XXe=Gie(),ZXe=zie(),e7e=Wie(),t7e=Zie();rae.exports={parse:EXe,valid:CXe,clean:IXe,inc:wXe,diff:SXe,major:xXe,minor:bXe,patch:BXe,prerelease:RXe,compare:NXe,rcompare:TXe,compareLoose:vXe,compareBuild:PXe,sort:QXe,rsort:_Xe,gt:DXe,lt:kXe,eq:LXe,neq:OXe,gte:MXe,lte:FXe,cmp:UXe,coerce:qXe,Comparator:GXe,Range:HXe,satisfies:$Xe,toComparators:zXe,maxSatisfying:VXe,minSatisfying:WXe,minVersion:YXe,validRange:JXe,outside:jXe,gtr:KXe,ltr:XXe,intersects:ZXe,simplifyRange:e7e,subset:t7e,SemVer:yXe,re:B2.re,src:B2.src,tokens:B2.t,SEMVER_SPEC_VERSION:eae.SEMVER_SPEC_VERSION,RELEASE_TYPES:eae.RELEASE_TYPES,compareIdentifiers:tae.compareIdentifiers,rcompareIdentifiers:tae.rcompareIdentifiers}});var Eae=I((aJt,yae)=>{yae.exports=function(t,e){for(var r=[],n=0;n{"use strict";Sae.exports=Iae;function Iae(t,e,r){t instanceof RegExp&&(t=Cae(t,r)),e instanceof RegExp&&(e=Cae(e,r));var n=wae(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}i(Iae,"balanced");function Cae(t,e){var r=e.match(t);return r?r[0]:null}i(Cae,"maybeMatch");Iae.range=wae;function wae(t,e,r){var n,s,o,a,c,l=r.indexOf(t),u=r.indexOf(e,l+1),d=l;if(l>=0&&u>0){if(t===e)return[l,u];for(n=[],o=r.length;d>=0&&!c;)d==l?(n.push(d),l=r.indexOf(t,d+1)):n.length==1?c=[n.pop(),u]:(s=n.pop(),s=0?l:u;n.length&&(c=[o,a])}return c}i(wae,"range")});var Qae=I((uJt,Pae)=>{var C7e=Eae(),bae=xae();Pae.exports=S7e;var Bae="\0SLASH"+Math.random()+"\0",Rae="\0OPEN"+Math.random()+"\0",M2="\0CLOSE"+Math.random()+"\0",Nae="\0COMMA"+Math.random()+"\0",Tae="\0PERIOD"+Math.random()+"\0";function O2(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}i(O2,"numeric");function I7e(t){return t.split("\\\\").join(Bae).split("\\{").join(Rae).split("\\}").join(M2).split("\\,").join(Nae).split("\\.").join(Tae)}i(I7e,"escapeBraces");function w7e(t){return t.split(Bae).join("\\").split(Rae).join("{").split(M2).join("}").split(Nae).join(",").split(Tae).join(".")}i(w7e,"unescapeBraces");function vae(t){if(!t)return[""];var e=[],r=bae("{","}",t);if(!r)return t.split(",");var n=r.pre,s=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+s+"}";var c=vae(o);return o.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}i(vae,"parseCommaParts");function S7e(t,e){if(!t)return[];e=e||{};var r=e.max==null?1/0:e.max;return t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),nC(I7e(t),r,!0).map(w7e)}i(S7e,"expandTop");function x7e(t){return"{"+t+"}"}i(x7e,"embrace");function b7e(t){return/^-?0\d/.test(t)}i(b7e,"isPadded");function B7e(t,e){return t<=e}i(B7e,"lte");function R7e(t,e){return t>=e}i(R7e,"gte");function nC(t,e,r){for(var n=[];;){var s=bae("{","}",t);if(!s||/\$$/.test(s.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),c=o||a,l=s.body.indexOf(",")>=0;if(!c&&!l){if(s.post.match(/,(?!,).*\}/)){t=s.pre+"{"+s.body+M2+s.post,r=!0;continue}return[t]}var u;if(c)u=s.body.split(/\.\./);else if(u=vae(s.body),u.length===1&&(u=nC(u[0],e,!1).map(x7e),u.length===1)){var p=s.post.length?nC(s.post,e,!1):[""];return p.map(function(ne){return s.pre+u[0]+ne})}var d=s.pre,p=s.post.length?nC(s.post,e,!1):[""],m;if(c){var f=O2(u[0]),A=O2(u[1]),h=Math.max(u[0].length,u[1].length),E=u.length==3?Math.max(Math.abs(O2(u[2])),1):1,C=B7e,w=A0){var _=new Array(P+1).join("0");b<0?N="-"+_+N.slice(1):N=_+N}}m.push(N)}}else m=C7e(u,function(qe){return nC(qe,e,!1)});for(var re=0;re{Oae.exports=ro;ro.Minimatch=vr;var sC=(function(){try{return require("path")}catch{}})()||{sep:"/"};ro.sep=sC.sep;var Wp=ro.GLOBSTAR=vr.GLOBSTAR={},N7e=Qae(),_ae={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},F2="[^/]",U2=F2+"*?",T7e="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",v7e="(?:(?!(?:\\/|^)\\.).)*?",Dae=P7e("().*{}+?[]^$\\!");function P7e(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}i(P7e,"charSet");var kae=/\/+/;ro.filter=Q7e;function Q7e(t,e){return e=e||{},function(r,n,s){return ro(r,t,e)}}i(Q7e,"filter");function Gu(t,e){e=e||{};var r={};return Object.keys(t).forEach(function(n){r[n]=t[n]}),Object.keys(e).forEach(function(n){r[n]=e[n]}),r}i(Gu,"ext");ro.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return ro;var e=ro,r=i(function(s,o,a){return e(s,o,Gu(t,a))},"minimatch");return r.Minimatch=i(function(s,o){return new e.Minimatch(s,Gu(t,o))},"Minimatch"),r.Minimatch.defaults=i(function(s){return e.defaults(Gu(t,s)).Minimatch},"defaults"),r.filter=i(function(s,o){return e.filter(s,Gu(t,o))},"filter"),r.defaults=i(function(s){return e.defaults(Gu(t,s))},"defaults"),r.makeRe=i(function(s,o){return e.makeRe(s,Gu(t,o))},"makeRe"),r.braceExpand=i(function(s,o){return e.braceExpand(s,Gu(t,o))},"braceExpand"),r.match=function(n,s,o){return e.match(n,s,Gu(t,o))},r};vr.defaults=function(t){return ro.defaults(t).Minimatch};function ro(t,e,r){return nB(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new vr(e,r).match(t)}i(ro,"minimatch");function vr(t,e){if(!(this instanceof vr))return new vr(t,e);nB(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&sC.sep!=="/"&&(t=t.split(sC.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}i(vr,"Minimatch");vr.prototype.debug=function(){};vr.prototype.make=_7e;function _7e(){var t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=i(function(){console.error.apply(console,arguments)},"debug")),this.debug(this.pattern,r),r=this.globParts=r.map(function(n){return n.split(kae)}),this.debug(this.pattern,r),r=r.map(function(n,s,o){return n.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}i(_7e,"make");vr.prototype.parseNegate=D7e;function D7e(){var t=this.pattern,e=!1,r=this.options,n=0;if(!r.nonegate){for(var s=0,o=t.length;s"u"?this.pattern:t,nB(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:N7e(t)}i(Lae,"braceExpand");var k7e=1024*64,nB=i(function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>k7e)throw new TypeError("pattern is too long")},"assertValidPattern");vr.prototype.parse=L7e;var rB={};function L7e(t,e){nB(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return Wp;if(t==="")return"";var n="",s=!!r.nocase,o=!1,a=[],c=[],l,u=!1,d=-1,p=-1,m=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=this;function A(){if(l){switch(l){case"*":n+=U2,s=!0;break;case"?":n+=F2,s=!0;break;default:n+="\\"+l;break}f.debug("clearStateChar %j %j",l,n),l=!1}}i(A,"clearStateChar");for(var h=0,E=t.length,C;h-1;re--){var ye=c[re],ae=n.slice(0,ye.reStart),qe=n.slice(ye.reStart,ye.reEnd-8),ne=n.slice(ye.reEnd-8,ye.reEnd),K=n.slice(ye.reEnd);ne+=K;var U=ae.split("(").length-1,wt=K;for(h=0;h"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;sC.sep!=="/"&&(e=e.split(sC.sep).join("/")),e=e.split(kae),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var o,a;for(a=e.length-1;a>=0&&(o=e[a],!o);a--);for(a=0;a=0;o--)if(e[o]===Wp){c=o;break}var l=e.slice(s,a),u=r?e.slice(a+1):e.slice(a+1,c),d=r?[]:e.slice(c+1);if(l.length){var p=t.slice(n,n+l.length);if(!this._matchOne(p,l,r,0,0))return!1;n+=l.length}var m=0;if(d.length){if(d.length+n>t.length)return!1;var f=t.length-d.length;if(this._matchOne(t,d,r,f,0))m=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(f--,!this._matchOne(t,d,r,f,0)))return!1;m=d.length+1}}if(!u.length){var A=!!m;for(o=n;o{"use strict";var W7e="2.0.0",Y7e=Number.MAX_SAFE_INTEGER||9007199254740991,J7e=16,j7e=250,K7e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Gae.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:J7e,MAX_SAFE_BUILD_LENGTH:j7e,MAX_SAFE_INTEGER:Y7e,RELEASE_TYPES:K7e,SEMVER_SPEC_VERSION:W7e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var aC=I((kJt,Hae)=>{"use strict";var X7e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Hae.exports=X7e});var GA=I((Oa,$ae)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:G2,MAX_SAFE_BUILD_LENGTH:Z7e,MAX_LENGTH:eZe}=qA(),tZe=aC();Oa=$ae.exports={};var rZe=Oa.re=[],nZe=Oa.safeRe=[],z=Oa.src=[],sZe=Oa.safeSrc=[],V=Oa.t={},oZe=0,H2="[a-zA-Z0-9-]",iZe=[["\\s",1],["\\d",eZe],[H2,Z7e]],aZe=i(t=>{for(let[e,r]of iZe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),De=i((t,e,r)=>{let n=aZe(e),s=oZe++;tZe(t,s,e),V[t]=s,z[s]=e,sZe[s]=n,rZe[s]=new RegExp(e,r?"g":void 0),nZe[s]=new RegExp(n,r?"g":void 0)},"createToken");De("NUMERICIDENTIFIER","0|[1-9]\\d*");De("NUMERICIDENTIFIERLOOSE","\\d+");De("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${H2}*`);De("MAINVERSION",`(${z[V.NUMERICIDENTIFIER]})\\.(${z[V.NUMERICIDENTIFIER]})\\.(${z[V.NUMERICIDENTIFIER]})`);De("MAINVERSIONLOOSE",`(${z[V.NUMERICIDENTIFIERLOOSE]})\\.(${z[V.NUMERICIDENTIFIERLOOSE]})\\.(${z[V.NUMERICIDENTIFIERLOOSE]})`);De("PRERELEASEIDENTIFIER",`(?:${z[V.NONNUMERICIDENTIFIER]}|${z[V.NUMERICIDENTIFIER]})`);De("PRERELEASEIDENTIFIERLOOSE",`(?:${z[V.NONNUMERICIDENTIFIER]}|${z[V.NUMERICIDENTIFIERLOOSE]})`);De("PRERELEASE",`(?:-(${z[V.PRERELEASEIDENTIFIER]}(?:\\.${z[V.PRERELEASEIDENTIFIER]})*))`);De("PRERELEASELOOSE",`(?:-?(${z[V.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${z[V.PRERELEASEIDENTIFIERLOOSE]})*))`);De("BUILDIDENTIFIER",`${H2}+`);De("BUILD",`(?:\\+(${z[V.BUILDIDENTIFIER]}(?:\\.${z[V.BUILDIDENTIFIER]})*))`);De("FULLPLAIN",`v?${z[V.MAINVERSION]}${z[V.PRERELEASE]}?${z[V.BUILD]}?`);De("FULL",`^${z[V.FULLPLAIN]}$`);De("LOOSEPLAIN",`[v=\\s]*${z[V.MAINVERSIONLOOSE]}${z[V.PRERELEASELOOSE]}?${z[V.BUILD]}?`);De("LOOSE",`^${z[V.LOOSEPLAIN]}$`);De("GTLT","((?:<|>)?=?)");De("XRANGEIDENTIFIERLOOSE",`${z[V.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);De("XRANGEIDENTIFIER",`${z[V.NUMERICIDENTIFIER]}|x|X|\\*`);De("XRANGEPLAIN",`[v=\\s]*(${z[V.XRANGEIDENTIFIER]})(?:\\.(${z[V.XRANGEIDENTIFIER]})(?:\\.(${z[V.XRANGEIDENTIFIER]})(?:${z[V.PRERELEASE]})?${z[V.BUILD]}?)?)?`);De("XRANGEPLAINLOOSE",`[v=\\s]*(${z[V.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[V.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[V.XRANGEIDENTIFIERLOOSE]})(?:${z[V.PRERELEASELOOSE]})?${z[V.BUILD]}?)?)?`);De("XRANGE",`^${z[V.GTLT]}\\s*${z[V.XRANGEPLAIN]}$`);De("XRANGELOOSE",`^${z[V.GTLT]}\\s*${z[V.XRANGEPLAINLOOSE]}$`);De("COERCEPLAIN",`(^|[^\\d])(\\d{1,${G2}})(?:\\.(\\d{1,${G2}}))?(?:\\.(\\d{1,${G2}}))?`);De("COERCE",`${z[V.COERCEPLAIN]}(?:$|[^\\d])`);De("COERCEFULL",z[V.COERCEPLAIN]+`(?:${z[V.PRERELEASE]})?(?:${z[V.BUILD]})?(?:$|[^\\d])`);De("COERCERTL",z[V.COERCE],!0);De("COERCERTLFULL",z[V.COERCEFULL],!0);De("LONETILDE","(?:~>?)");De("TILDETRIM",`(\\s*)${z[V.LONETILDE]}\\s+`,!0);Oa.tildeTrimReplace="$1~";De("TILDE",`^${z[V.LONETILDE]}${z[V.XRANGEPLAIN]}$`);De("TILDELOOSE",`^${z[V.LONETILDE]}${z[V.XRANGEPLAINLOOSE]}$`);De("LONECARET","(?:\\^)");De("CARETTRIM",`(\\s*)${z[V.LONECARET]}\\s+`,!0);Oa.caretTrimReplace="$1^";De("CARET",`^${z[V.LONECARET]}${z[V.XRANGEPLAIN]}$`);De("CARETLOOSE",`^${z[V.LONECARET]}${z[V.XRANGEPLAINLOOSE]}$`);De("COMPARATORLOOSE",`^${z[V.GTLT]}\\s*(${z[V.LOOSEPLAIN]})$|^$`);De("COMPARATOR",`^${z[V.GTLT]}\\s*(${z[V.FULLPLAIN]})$|^$`);De("COMPARATORTRIM",`(\\s*)${z[V.GTLT]}\\s*(${z[V.LOOSEPLAIN]}|${z[V.XRANGEPLAIN]})`,!0);Oa.comparatorTrimReplace="$1$2$3";De("HYPHENRANGE",`^\\s*(${z[V.XRANGEPLAIN]})\\s+-\\s+(${z[V.XRANGEPLAIN]})\\s*$`);De("HYPHENRANGELOOSE",`^\\s*(${z[V.XRANGEPLAINLOOSE]})\\s+-\\s+(${z[V.XRANGEPLAINLOOSE]})\\s*$`);De("STAR","(<|>)?=?\\s*\\*");De("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");De("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var iB=I((OJt,zae)=>{"use strict";var cZe=Object.freeze({loose:!0}),lZe=Object.freeze({}),uZe=i(t=>t?typeof t!="object"?cZe:t:lZe,"parseOptions");zae.exports=uZe});var $2=I((FJt,Yae)=>{"use strict";var Vae=/^[0-9]+$/,Wae=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:tWae(e,t),"rcompareIdentifiers");Yae.exports={compareIdentifiers:Wae,rcompareIdentifiers:dZe}});var on=I((qJt,jae)=>{"use strict";var aB=aC(),{MAX_LENGTH:Jae,MAX_SAFE_INTEGER:cB}=qA(),{safeRe:lB,t:uB}=GA(),pZe=iB(),{compareIdentifiers:z2}=$2(),V2=class t{static{i(this,"SemVer")}constructor(e,r){if(r=pZe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Jae)throw new TypeError(`version is longer than ${Jae} characters`);aB("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?lB[uB.LOOSE]:lB[uB.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>cB||this.major<0)throw new TypeError("Invalid major version");if(this.minor>cB||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>cB||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&oe.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(aB("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return z2(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(aB("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return z2(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?lB[uB.PRERELEASELOOSE]:lB[uB.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),z2(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};jae.exports=V2});var zu=I((HJt,Xae)=>{"use strict";var Kae=on(),mZe=i((t,e,r=!1)=>{if(t instanceof Kae)return t;try{return new Kae(t,e)}catch(n){if(!r)return null;throw n}},"parse");Xae.exports=mZe});var ece=I((zJt,Zae)=>{"use strict";var fZe=zu(),AZe=i((t,e)=>{let r=fZe(t,e);return r?r.version:null},"valid");Zae.exports=AZe});var rce=I((WJt,tce)=>{"use strict";var hZe=zu(),gZe=i((t,e)=>{let r=hZe(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");tce.exports=gZe});var oce=I((JJt,sce)=>{"use strict";var nce=on(),yZe=i((t,e,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new nce(t instanceof nce?t.version:t,r).inc(e,n,s).version}catch{return null}},"inc");sce.exports=yZe});var cce=I((KJt,ace)=>{"use strict";var ice=zu(),EZe=i((t,e)=>{let r=ice(t,null,!0),n=ice(e,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,a=o?r:n,c=o?n:r,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"},"diff");ace.exports=EZe});var uce=I((ZJt,lce)=>{"use strict";var CZe=on(),IZe=i((t,e)=>new CZe(t,e).major,"major");lce.exports=IZe});var pce=I((t8t,dce)=>{"use strict";var wZe=on(),SZe=i((t,e)=>new wZe(t,e).minor,"minor");dce.exports=SZe});var fce=I((n8t,mce)=>{"use strict";var xZe=on(),bZe=i((t,e)=>new xZe(t,e).patch,"patch");mce.exports=bZe});var hce=I((o8t,Ace)=>{"use strict";var BZe=zu(),RZe=i((t,e)=>{let r=BZe(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");Ace.exports=RZe});var qo=I((a8t,yce)=>{"use strict";var gce=on(),NZe=i((t,e,r)=>new gce(t,r).compare(new gce(e,r)),"compare");yce.exports=NZe});var Cce=I((l8t,Ece)=>{"use strict";var TZe=qo(),vZe=i((t,e,r)=>TZe(e,t,r),"rcompare");Ece.exports=vZe});var wce=I((d8t,Ice)=>{"use strict";var PZe=qo(),QZe=i((t,e)=>PZe(t,e,!0),"compareLoose");Ice.exports=QZe});var dB=I((m8t,xce)=>{"use strict";var Sce=on(),_Ze=i((t,e,r)=>{let n=new Sce(t,r),s=new Sce(e,r);return n.compare(s)||n.compareBuild(s)},"compareBuild");xce.exports=_Ze});var Bce=I((A8t,bce)=>{"use strict";var DZe=dB(),kZe=i((t,e)=>t.sort((r,n)=>DZe(r,n,e)),"sort");bce.exports=kZe});var Nce=I((g8t,Rce)=>{"use strict";var LZe=dB(),OZe=i((t,e)=>t.sort((r,n)=>LZe(n,r,e)),"rsort");Rce.exports=OZe});var cC=I((E8t,Tce)=>{"use strict";var MZe=qo(),FZe=i((t,e,r)=>MZe(t,e,r)>0,"gt");Tce.exports=FZe});var pB=I((I8t,vce)=>{"use strict";var UZe=qo(),qZe=i((t,e,r)=>UZe(t,e,r)<0,"lt");vce.exports=qZe});var W2=I((S8t,Pce)=>{"use strict";var GZe=qo(),HZe=i((t,e,r)=>GZe(t,e,r)===0,"eq");Pce.exports=HZe});var Y2=I((b8t,Qce)=>{"use strict";var $Ze=qo(),zZe=i((t,e,r)=>$Ze(t,e,r)!==0,"neq");Qce.exports=zZe});var mB=I((R8t,_ce)=>{"use strict";var VZe=qo(),WZe=i((t,e,r)=>VZe(t,e,r)>=0,"gte");_ce.exports=WZe});var fB=I((T8t,Dce)=>{"use strict";var YZe=qo(),JZe=i((t,e,r)=>YZe(t,e,r)<=0,"lte");Dce.exports=JZe});var J2=I((P8t,kce)=>{"use strict";var jZe=W2(),KZe=Y2(),XZe=cC(),ZZe=mB(),eet=pB(),tet=fB(),ret=i((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return jZe(t,r,n);case"!=":return KZe(t,r,n);case">":return XZe(t,r,n);case">=":return ZZe(t,r,n);case"<":return eet(t,r,n);case"<=":return tet(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");kce.exports=ret});var Oce=I((_8t,Lce)=>{"use strict";var net=on(),set=zu(),{safeRe:AB,t:hB}=GA(),oet=i((t,e)=>{if(t instanceof net)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?AB[hB.COERCEFULL]:AB[hB.COERCE]);else{let l=e.includePrerelease?AB[hB.COERCERTLFULL]:AB[hB.COERCERTL],u;for(;(u=l.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return set(`${n}.${s}.${o}${a}${c}`,e)},"coerce");Lce.exports=oet});var Fce=I((k8t,Mce)=>{"use strict";var iet=zu(),aet=qA(),cet=on(),uet=i((t,e,r)=>{if(!aet.RELEASE_TYPES.includes(e))return null;let n=det(t,r);return n&&pet(n,e)},"truncate"),det=i((t,e)=>{let r=t instanceof cet?t.version:t;return iet(r,e)},"cloneInputVersion"),pet=i((t,e)=>{if(met(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},"doTruncation"),met=i(t=>t.startsWith("pre"),"isPrerelease");Mce.exports=uet});var qce=I((O8t,Uce)=>{"use strict";var j2=class{static{i(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,r)}return this}};Uce.exports=j2});var Go=I((F8t,zce)=>{"use strict";var fet=/\s+/g,K2=class t{static{i(this,"Range")}constructor(e,r){if(r=het(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof X2)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(fet," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Hce(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Bet(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(bet,"");let n=((this.options.includePrerelease&&wet)|(this.options.loose&&xet))+":"+e,s=Gce.get(n);if(s)return s;let o=this.options.loose,a=o?Vn[an.HYPHENRANGELOOSE]:Vn[an.HYPHENRANGE];e=e.replace(a,Let(this.options.includePrerelease)),Pt("hyphen replace",e),e=e.replace(Vn[an.COMPARATORTRIM],Eet),Pt("comparator trim",e),e=e.replace(Vn[an.TILDETRIM],Cet),Pt("tilde trim",e),e=e.replace(Vn[an.CARETTRIM],Iet),Pt("caret trim",e);let c=e.split(" ").map(p=>Ret(p,this.options)).join(" ").split(/\s+/).map(p=>ket(p,this.options));o&&(c=c.filter(p=>(Pt("loose invalid filter",p,this.options),!!p.match(Vn[an.COMPARATORLOOSE])))),Pt("range list",c);let l=new Map,u=c.map(p=>new X2(p,this.options));for(let p of u){if(Hce(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return Gce.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>$ce(n,r)&&e.set.some(s=>$ce(s,r)&&n.every(o=>s.every(a=>o.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new get(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),Bet=i(t=>t.value==="","isAny"),$ce=i((t,e)=>{let r=!0,n=t.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,e)),s=n.pop();return r},"isSatisfiable"),Ret=i((t,e)=>(t=t.replace(Vn[an.BUILD],""),Pt("comp",t,e),t=vet(t,e),Pt("caret",t),t=Net(t,e),Pt("tildes",t),t=Qet(t,e),Pt("xrange",t),t=Det(t,e),Pt("stars",t),t),"parseComparator"),Wn=i(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),Net=i((t,e)=>t.trim().split(/\s+/).map(r=>Tet(r,e)).join(" "),"replaceTildes"),Tet=i((t,e)=>{let r=e.loose?Vn[an.TILDELOOSE]:Vn[an.TILDE];return t.replace(r,(n,s,o,a,c)=>{Pt("tilde",t,n,s,o,a,c);let l;return Wn(s)?l="":Wn(o)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:Wn(a)?l=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:c?(Pt("replaceTilde pr",c),l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,Pt("tilde return",l),l})},"replaceTilde"),vet=i((t,e)=>t.trim().split(/\s+/).map(r=>Pet(r,e)).join(" "),"replaceCarets"),Pet=i((t,e)=>{Pt("caret",t,e);let r=e.loose?Vn[an.CARETLOOSE]:Vn[an.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{Pt("caret",t,s,o,a,c,l);let u;return Wn(o)?u="":Wn(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:Wn(c)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:l?(Pt("replaceCaret pr",l),o==="0"?a==="0"?u=`>=${o}.${a}.${c}-${l} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c}-${l} <${+o+1}.0.0-0`):(Pt("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${c}${n} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`),Pt("caret return",u),u})},"replaceCaret"),Qet=i((t,e)=>(Pt("replaceXRanges",t,e),t.split(/\s+/).map(r=>_et(r,e)).join(" ")),"replaceXRanges"),_et=i((t,e)=>{t=t.trim();let r=e.loose?Vn[an.XRANGELOOSE]:Vn[an.XRANGE];return t.replace(r,(n,s,o,a,c,l)=>{Pt("xRange",t,n,s,o,a,c,l);let u=Wn(o),d=u||Wn(a),p=d||Wn(c),m=p;return s==="="&&m&&(s=""),l=e.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(d&&(a=0),c=0,s===">"?(s=">=",d?(o=+o+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",d?o=+o+1:a=+a+1),s==="<"&&(l="-0"),n=`${s+o}.${a}.${c}${l}`):d?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),Pt("xRange return",n),n})},"replaceXRange"),Det=i((t,e)=>(Pt("replaceStars",t,e),t.trim().replace(Vn[an.STAR],"")),"replaceStars"),ket=i((t,e)=>(Pt("replaceGTE0",t,e),t.trim().replace(Vn[e.includePrerelease?an.GTE0PRE:an.GTE0],"")),"replaceGTE0"),Let=i(t=>(e,r,n,s,o,a,c,l,u,d,p,m)=>(Wn(n)?r="":Wn(s)?r=`>=${n}.0.0${t?"-0":""}`:Wn(o)?r=`>=${n}.${s}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Wn(u)?l="":Wn(d)?l=`<${+u+1}.0.0-0`:Wn(p)?l=`<${u}.${+d+1}.0-0`:m?l=`<=${u}.${d}.${p}-${m}`:t?l=`<${u}.${d}.${+p+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),"hyphenReplace"),Oet=i((t,e,r)=>{for(let n=0;n0){let s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0},"testSet")});var lC=I((q8t,Kce)=>{"use strict";var uC=Symbol("SemVer ANY"),tq=class t{static{i(this,"Comparator")}static get ANY(){return uC}constructor(e,r){if(r=Vce(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),eq("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===uC?this.value="":this.value=this.operator+this.semver.version,eq("comp",this)}parse(e){let r=this.options.loose?Wce[Yce.COMPARATORLOOSE]:Wce[Yce.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Jce(n[2],this.options.loose):this.semver=uC}toString(){return this.value}test(e){if(eq("Comparator.test",e,this.options.loose),this.semver===uC||e===uC)return!0;if(typeof e=="string")try{e=new Jce(e,this.options)}catch{return!1}return Z2(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new jce(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new jce(this.value,r).test(e.semver):(r=Vce(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Z2(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Z2(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Kce.exports=tq;var Vce=iB(),{safeRe:Wce,t:Yce}=GA(),Z2=J2(),eq=aC(),Jce=on(),jce=Go()});var dC=I((H8t,Xce)=>{"use strict";var Met=Go(),Fet=i((t,e,r)=>{try{e=new Met(e,r)}catch{return!1}return e.test(t)},"satisfies");Xce.exports=Fet});var ele=I((z8t,Zce)=>{"use strict";var Uet=Go(),qet=i((t,e)=>new Uet(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");Zce.exports=qet});var rle=I((W8t,tle)=>{"use strict";var Get=on(),Het=Go(),$et=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Het(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Get(n,r))}),n},"maxSatisfying");tle.exports=$et});var sle=I((J8t,nle)=>{"use strict";var zet=on(),Vet=Go(),Wet=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Vet(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new zet(n,r))}),n},"minSatisfying");nle.exports=Wet});var ale=I((K8t,ile)=>{"use strict";var rq=on(),Yet=Go(),ole=cC(),Jet=i((t,e)=>{t=new Yet(t,e);let r=new rq("0.0.0");if(t.test(r)||(r=new rq("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let c=new rq(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||ole(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||ole(r,o))&&(r=o)}return r&&t.test(r)?r:null},"minVersion");ile.exports=Jet});var lle=I((Z8t,cle)=>{"use strict";var jet=Go(),Ket=i((t,e)=>{try{return new jet(t,e).range||"*"}catch{return null}},"validRange");cle.exports=Ket});var gB=I((t5t,mle)=>{"use strict";var Xet=on(),ple=lC(),{ANY:Zet}=ple,ett=Go(),ttt=dC(),ule=cC(),dle=pB(),rtt=fB(),ntt=mB(),stt=i((t,e,r,n)=>{t=new Xet(t,n),e=new ett(e,n);let s,o,a,c,l;switch(r){case">":s=ule,o=rtt,a=dle,c=">",l=">=";break;case"<":s=dle,o=ntt,a=ule,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ttt(t,e,n))return!1;for(let u=0;u{f.semver===Zet&&(f=new ple(">=0.0.0")),p=p||f,m=m||f,s(f.semver,p.semver,n)?p=f:a(f.semver,m.semver,n)&&(m=f)}),p.operator===c||p.operator===l||(!m.operator||m.operator===c)&&o(t,m.semver))return!1;if(m.operator===l&&a(t,m.semver))return!1}return!0},"outside");mle.exports=stt});var Ale=I((n5t,fle)=>{"use strict";var ott=gB(),itt=i((t,e,r)=>ott(t,e,">",r),"gtr");fle.exports=itt});var gle=I((o5t,hle)=>{"use strict";var att=gB(),ctt=i((t,e,r)=>att(t,e,"<",r),"ltr");hle.exports=ctt});var Cle=I((a5t,Ele)=>{"use strict";var yle=Go(),ltt=i((t,e,r)=>(t=new yle(t,r),e=new yle(e,r),t.intersects(e,r)),"intersects");Ele.exports=ltt});var wle=I((l5t,Ile)=>{"use strict";var utt=dC(),dtt=qo();Ile.exports=(t,e,r)=>{let n=[],s=null,o=null,a=t.sort((d,p)=>dtt(d,p,r));for(let d of a)utt(d,e,r)?(o=d,s||(s=d)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let c=[];for(let[d,p]of n)d===p?c.push(d):!p&&d===a[0]?c.push("*"):p?d===a[0]?c.push(`<=${p}`):c.push(`${d} - ${p}`):c.push(`>=${d}`);let l=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{"use strict";var Sle=Go(),oq=lC(),{ANY:nq}=oq,sq=dC(),iq=qo(),ptt=i((t,e,r={})=>{if(t===e)return!0;t=new Sle(t,r),e=new Sle(e,r);let n=!1;e:for(let s of t.set){for(let o of e.set){let a=ftt(s,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},"subset"),mtt=[new oq(">=0.0.0-0")],xle=[new oq(">=0.0.0")],ftt=i((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===nq){if(e.length===1&&e[0].semver===nq)return!0;r.includePrerelease?t=mtt:t=xle}if(e.length===1&&e[0].semver===nq){if(r.includePrerelease)return!0;e=xle}let n=new Set,s,o;for(let f of t)f.operator===">"||f.operator===">="?s=ble(s,f,r):f.operator==="<"||f.operator==="<="?o=Ble(o,f,r):n.add(f.semver);if(n.size>1)return null;let a;if(s&&o){if(a=iq(s.semver,o.semver,r),a>0)return null;if(a===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(s&&!sq(f,String(s),r)||o&&!sq(f,String(o),r))return null;for(let A of e)if(!sq(f,String(A),r))return!1;return!0}let c,l,u,d,p=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,m=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(d=d||f.operator===">"||f.operator===">=",u=u||f.operator==="<"||f.operator==="<=",s){if(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(c=ble(s,f,r),c===f&&c!==s)return!1}else if(s.operator===">="&&!f.test(s.semver))return!1}if(o){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(l=Ble(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||s)&&a!==0)return!1}return!(s&&u&&!o&&a!==0||o&&d&&!s&&a!==0||m||p)},"simpleSubset"),ble=i((t,e,r)=>{if(!t)return e;let n=iq(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),Ble=i((t,e,r)=>{if(!t)return e;let n=iq(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");Rle.exports=ptt});var Qle=I((p5t,Ple)=>{"use strict";var aq=GA(),Tle=qA(),Att=on(),vle=$2(),htt=zu(),gtt=ece(),ytt=rce(),Ett=oce(),Ctt=cce(),Itt=uce(),wtt=pce(),Stt=fce(),xtt=hce(),btt=qo(),Btt=Cce(),Rtt=wce(),Ntt=dB(),Ttt=Bce(),vtt=Nce(),Ptt=cC(),Qtt=pB(),_tt=W2(),Dtt=Y2(),ktt=mB(),Ltt=fB(),Ott=J2(),Mtt=Oce(),Ftt=Fce(),Utt=lC(),qtt=Go(),Gtt=dC(),Htt=ele(),$tt=rle(),ztt=sle(),Vtt=ale(),Wtt=lle(),Ytt=gB(),Jtt=Ale(),jtt=gle(),Ktt=Cle(),Xtt=wle(),Ztt=Nle();Ple.exports={parse:htt,valid:gtt,clean:ytt,inc:Ett,diff:Ctt,major:Itt,minor:wtt,patch:Stt,prerelease:xtt,compare:btt,rcompare:Btt,compareLoose:Rtt,compareBuild:Ntt,sort:Ttt,rsort:vtt,gt:Ptt,lt:Qtt,eq:_tt,neq:Dtt,gte:ktt,lte:Ltt,cmp:Ott,coerce:Mtt,truncate:Ftt,Comparator:Utt,Range:qtt,satisfies:Gtt,toComparators:Htt,maxSatisfying:$tt,minSatisfying:ztt,minVersion:Vtt,validRange:Wtt,outside:Ytt,gtr:Jtt,ltr:jtt,intersects:Ktt,simplifyRange:Xtt,subset:Ztt,SemVer:Att,re:aq.re,src:aq.src,tokens:aq.t,SEMVER_SPEC_VERSION:Tle.SEMVER_SPEC_VERSION,RELEASE_TYPES:Tle.RELEASE_TYPES,compareIdentifiers:vle.compareIdentifiers,rcompareIdentifiers:vle.rcompareIdentifiers}});var Iue=I((h6t,Cue)=>{var JA=1e3,jA=JA*60,KA=jA*60,rm=KA*24,krt=rm*7,Lrt=rm*365.25;Cue.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Ort(t);if(r==="number"&&isFinite(t))return e.long?Frt(t):Mrt(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Ort(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Lrt;case"weeks":case"week":case"w":return r*krt;case"days":case"day":case"d":return r*rm;case"hours":case"hour":case"hrs":case"hr":case"h":return r*KA;case"minutes":case"minute":case"mins":case"min":case"m":return r*jA;case"seconds":case"second":case"secs":case"sec":case"s":return r*JA;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}i(Ort,"parse");function Mrt(t){var e=Math.abs(t);return e>=rm?Math.round(t/rm)+"d":e>=KA?Math.round(t/KA)+"h":e>=jA?Math.round(t/jA)+"m":e>=JA?Math.round(t/JA)+"s":t+"ms"}i(Mrt,"fmtShort");function Frt(t){var e=Math.abs(t);return e>=rm?HB(t,e,rm,"day"):e>=KA?HB(t,e,KA,"hour"):e>=jA?HB(t,e,jA,"minute"):e>=JA?HB(t,e,JA,"second"):t+" ms"}i(Frt,"fmtLong");function HB(t,e,r,n){var s=e>=r*1.5;return Math.round(t/r)+" "+n+(s?"s":"")}i(HB,"plural")});var Qq=I((y6t,wue)=>{function Urt(t){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=s,r.enabled=a,r.humanize=Iue(),r.destroy=u,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let p=0;for(let m=0;m{if(P==="%%")return"%";b++;let re=r.formatters[_];if(typeof re=="function"){let ye=E[b];P=re.call(C,ye),E.splice(b,1),b--}return P}),r.formatArgs.call(C,E),(C.log||r.log).apply(C,E)}return i(h,"debug"),h.namespace=d,h.useColors=r.useColors(),h.color=r.selectColor(d),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:i(()=>m!==null?m:(f!==r.namespaces&&(f=r.namespaces,A=r.enabled(d)),A),"get"),set:i(E=>{m=E},"set")}),typeof r.init=="function"&&r.init(h),h}i(r,"createDebug");function n(d,p){let m=r(this.namespace+(typeof p>"u"?":":p)+d);return m.log=this.log,m}i(n,"extend");function s(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let p,m=(typeof d=="string"?d:"").split(/[\s,]+/),f=m.length;for(p=0;p"-"+p)].join(",");return r.enable(""),d}i(o,"disable");function a(d){if(d[d.length-1]==="*")return!0;let p,m;for(p=0,m=r.skips.length;p{io.formatArgs=Grt;io.save=Hrt;io.load=$rt;io.useColors=qrt;io.storage=zrt();io.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})();io.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 qrt(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}i(qrt,"useColors");function Grt(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+$B.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r))}),t.splice(n,0,e)}i(Grt,"formatArgs");io.log=console.debug||console.log||(()=>{});function Hrt(t){try{t?io.storage.setItem("debug",t):io.storage.removeItem("debug")}catch{}}i(Hrt,"save");function $rt(){let t;try{t=io.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}i($rt,"load");function zrt(){try{return localStorage}catch{}}i(zrt,"localstorage");$B.exports=Qq()(io);var{formatters:Vrt}=$B.exports;Vrt.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var bue=I((I6t,xue)=>{"use strict";xue.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),s=e.indexOf("--");return n!==-1&&(s===-1||n{"use strict";var Wrt=require("os"),Bue=require("tty"),$o=bue(),{env:Wr}=process,Yu;$o("no-color")||$o("no-colors")||$o("color=false")||$o("color=never")?Yu=0:($o("color")||$o("colors")||$o("color=true")||$o("color=always"))&&(Yu=1);"FORCE_COLOR"in Wr&&(Wr.FORCE_COLOR==="true"?Yu=1:Wr.FORCE_COLOR==="false"?Yu=0:Yu=Wr.FORCE_COLOR.length===0?1:Math.min(parseInt(Wr.FORCE_COLOR,10),3));function _q(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}i(_q,"translateLevel");function Dq(t,e){if(Yu===0)return 0;if($o("color=16m")||$o("color=full")||$o("color=truecolor"))return 3;if($o("color=256"))return 2;if(t&&!e&&Yu===void 0)return 0;let r=Yu||0;if(Wr.TERM==="dumb")return r;if(process.platform==="win32"){let n=Wrt.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Wr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Wr)||Wr.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Wr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Wr.TEAMCITY_VERSION)?1:0;if(Wr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Wr){let n=parseInt((Wr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Wr.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Wr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Wr.TERM)||"COLORTERM"in Wr?1:r}i(Dq,"supportsColor");function Yrt(t){let e=Dq(t,t&&t.isTTY);return _q(e)}i(Yrt,"getSupportLevel");Rue.exports={supportsColor:Yrt,stdout:_q(Dq(!0,Bue.isatty(1))),stderr:_q(Dq(!0,Bue.isatty(2)))}});var vue=I((cn,VB)=>{var Jrt=require("tty"),zB=require("util");cn.init=rnt;cn.log=Zrt;cn.formatArgs=Krt;cn.save=ent;cn.load=tnt;cn.useColors=jrt;cn.destroy=zB.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");cn.colors=[6,2,3,4,5,1];try{let t=Nue();t&&(t.stderr||t).level>=2&&(cn.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{}cn.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function jrt(){return"colors"in cn.inspectOpts?!!cn.inspectOpts.colors:Jrt.isatty(process.stderr.fd)}i(jrt,"useColors");function Krt(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${e} \x1B[0m`;t[0]=o+t[0].split(` `).join(` `+o),t.push(s+"m+"+VB.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Xrt()+e+" "+t[0]}i(Krt,"formatArgs");function Xrt(){return cn.inspectOpts.hideDate?"":new Date().toISOString()+" "}i(Xrt,"getDate");function Zrt(...t){return process.stderr.write(zB.format(...t)+` `)}i(Zrt,"log");function ent(t){t?process.env.DEBUG=t:delete process.env.DEBUG}i(ent,"save");function tnt(){return process.env.DEBUG}i(tnt,"load");function rnt(t){t.inspectOpts={};let e=Object.keys(cn.inspectOpts);for(let r=0;re.trim()).join(" ")};Tue.O=function(t){return this.inspectOpts.colors=this.useColors,zB.inspect(t,this.inspectOpts)}});var nm=I((B6t,kq)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?kq.exports=Sue():kq.exports=vue()});var _ue=I(ws=>{"use strict";var nnt=ws&&ws.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),snt=ws&&ws.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pue=ws&&ws.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nnt(e,t,r);return snt(e,t),e};Object.defineProperty(ws,"__esModule",{value:!0});ws.req=ws.json=ws.toBuffer=void 0;var ont=Pue(require("http")),int=Pue(require("https"));async function Que(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(Que,"toBuffer");ws.toBuffer=Que;async function ant(t){let r=(await Que(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}i(ant,"json");ws.json=ant;function cnt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?int:ont).request(t,e),s=new Promise((o,a)=>{n.once("response",o).once("error",a).end()});return n.then=s.then.bind(s),n}i(cnt,"req");ws.req=cnt});var Oue=I(ao=>{"use strict";var kue=ao&&ao.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lnt=ao&&ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lue=ao&&ao.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&kue(e,t,r);return lnt(e,t),e},unt=ao&&ao.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kue(e,t,r)};Object.defineProperty(ao,"__esModule",{value:!0});ao.Agent=void 0;var dnt=Lue(require("net")),Due=Lue(require("http")),pnt=require("https");unt(_ue(),ao);var qa=Symbol("AgentBaseInternalState"),Lq=class extends Due.Agent{static{i(this,"Agent")}constructor(e){super(e),this[qa]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(` +`).map(e=>e.trim()).join(" ")};Tue.O=function(t){return this.inspectOpts.colors=this.useColors,zB.inspect(t,this.inspectOpts)}});var nm=I((b6t,kq)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?kq.exports=Sue():kq.exports=vue()});var _ue=I(ws=>{"use strict";var nnt=ws&&ws.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),snt=ws&&ws.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pue=ws&&ws.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nnt(e,t,r);return snt(e,t),e};Object.defineProperty(ws,"__esModule",{value:!0});ws.req=ws.json=ws.toBuffer=void 0;var ont=Pue(require("http")),int=Pue(require("https"));async function Que(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(Que,"toBuffer");ws.toBuffer=Que;async function ant(t){let r=(await Que(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}i(ant,"json");ws.json=ant;function cnt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?int:ont).request(t,e),s=new Promise((o,a)=>{n.once("response",o).once("error",a).end()});return n.then=s.then.bind(s),n}i(cnt,"req");ws.req=cnt});var Oue=I(ao=>{"use strict";var kue=ao&&ao.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lnt=ao&&ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lue=ao&&ao.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&kue(e,t,r);return lnt(e,t),e},unt=ao&&ao.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kue(e,t,r)};Object.defineProperty(ao,"__esModule",{value:!0});ao.Agent=void 0;var dnt=Lue(require("net")),Due=Lue(require("http")),pnt=require("https");unt(_ue(),ao);var qa=Symbol("AgentBaseInternalState"),Lq=class extends Due.Agent{static{i(this,"Agent")}constructor(e){super(e),this[qa]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(` `).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new dnt.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?pnt.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),a=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(o,a),c instanceof Due.Agent)try{return c.addRequest(e,s)}catch(l){return n(l)}this[qa].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(o,a),n(c)})}createConnection(){let e=this[qa].currentSocket;if(this[qa].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[qa].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[qa]&&(this[qa].defaultPort=e)}get protocol(){return this[qa].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[qa]&&(this[qa].protocol=e)}};ao.Agent=Lq});var Mue=I(XA=>{"use strict";var mnt=XA&&XA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(XA,"__esModule",{value:!0});XA.parseProxyResponse=void 0;var fnt=mnt(nm()),WB=(0,fnt.default)("https-proxy-agent:parse-proxy-response");function Ant(t){return new Promise((e,r)=>{let n=0,s=[];function o(){let d=t.read();d?u(d):t.once("readable",o)}i(o,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",o)}i(a,"cleanup");function c(){a(),WB("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}i(c,"onend");function l(d){a(),WB("onerror %o",d),r(d)}i(l,"onerror");function u(d){s.push(d),n+=d.length;let p=Buffer.concat(s,n),m=p.indexOf(`\r \r `);if(m===-1){WB("have not received end of HTTP headers yet..."),o();return}let f=p.slice(0,m).toString("ascii").split(`\r @@ -61,9 +61,9 @@ ${o}`;break;case"retry":yse(o)&&(r[s]=o);break;case"id":Ese(o)&&(r[s]=o);break;c `)+4,e.outputData[0].data=e._header+n.substring(s),ZA("Output buffer: %o",e.outputData[0].data));let o;return this.proxy.protocol==="https:"?(ZA("Creating `tls.Socket`: %o",this.connectOpts),o=Ont.connect(this.connectOpts)):(ZA("Creating `net.Socket`: %o",this.connectOpts),o=Lnt.connect(this.connectOpts)),await(0,Fnt.once)(o,"connect"),o}};jB.protocols=["http","https"];Vo.HttpProxyAgent=jB;function qnt(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(qnt,"omit")});var Ide=I(uR=>{"use strict";Object.defineProperty(uR,"__esModule",{value:!0});uR.state=void 0;uR.state={instrumenterImplementation:void 0}});var Mde=I(AR=>{"use strict";Object.defineProperty(AR,"__esModule",{value:!0});AR.state=void 0;AR.state={operationRequestMap:new WeakMap}});var hfe=I(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var alt=require("os"),clt=require("util");function llt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}i(llt,"_interopDefaultLegacy");var ult=llt(clt);function dlt(t,...e){process.stderr.write(`${ult.default.format(t,...e)}${alt.EOL}`)}i(dlt,"log");var ife=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,cfe,A3=[],h3=[],DN=[];ife&&g3(ife);var lfe=Object.assign(t=>ufe(t),{enable:g3,enabled:y3,disable:plt,log:dlt});function g3(t){cfe=t,A3=[],h3=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?h3.push(new RegExp(`^${n.substr(1)}$`)):A3.push(new RegExp(`^${n}$`));for(let n of DN)n.enabled=y3(n.namespace)}i(g3,"enable");function y3(t){if(t.endsWith("*"))return!0;for(let e of h3)if(e.test(t))return!1;for(let e of A3)if(e.test(t))return!0;return!1}i(y3,"enabled");function plt(){let t=cfe||"";return g3(""),t}i(plt,"disable");function ufe(t){let e=Object.assign(r,{enabled:y3(t),destroy:mlt,log:lfe.log,namespace:t,extend:flt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return i(r,"debug"),DN.push(e),e}i(ufe,"createDebugger");function mlt(){let t=DN.indexOf(this);return t>=0?(DN.splice(t,1),!0):!1}i(mlt,"destroy");function flt(t){let e=ufe(`${this.namespace}:${t}`);return e.log=this.log,e}i(flt,"extend");var lI=lfe,dfe=new Set,QN=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,kN,LN=lI("azure");LN.log=(...t)=>{lI.log(...t)};var E3=["verbose","info","warning","error"];QN&&(Afe(QN)?pfe(QN):console.error(`AZURE_LOG_LEVEL set to unknown log level '${QN}'; logging is not enabled. Acceptable values: ${E3.join(", ")}.`));function pfe(t){if(t&&!Afe(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${E3.join(",")}`);kN=t;let e=[];for(let r of dfe)ffe(r)&&e.push(r.namespace);lI.enable(e.join(","))}i(pfe,"setLogLevel");function Alt(){return kN}i(Alt,"getLogLevel");var afe={verbose:400,info:300,warning:200,error:100};function hlt(t){let e=LN.extend(t);return mfe(LN,e),{error:_N(e,"error"),warning:_N(e,"warning"),info:_N(e,"info"),verbose:_N(e,"verbose")}}i(hlt,"createClientLogger");function mfe(t,e){e.log=(...r)=>{t.log(...r)}}i(mfe,"patchLogMethod");function _N(t,e){let r=Object.assign(t.extend(e),{level:e});if(mfe(t,r),ffe(r)){let n=lI.disable();lI.enable(n+","+r.namespace)}return dfe.add(r),r}i(_N,"createLogger");function ffe(t){return!!(kN&&afe[t.level]<=afe[kN])}i(ffe,"shouldEnable");function Afe(t){return E3.includes(t)}i(Afe,"isAzureLogLevel");gh.AzureLogger=LN;gh.createClientLogger=hlt;gh.getLogLevel=Alt;gh.setLogLevel=pfe});var w3=I(dI=>{"use strict";Object.defineProperty(dI,"__esModule",{value:!0});var yh=new WeakMap,ON=new WeakMap,uI=class t{static{i(this,"AbortSignal")}constructor(){this.onabort=null,yh.set(this,[]),ON.set(this,!1)}get aborted(){if(!ON.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return ON.get(this)}static get none(){return new t}addEventListener(e,r){if(!yh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");yh.get(this).push(r)}removeEventListener(e,r){if(!yh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=yh.get(this),s=n.indexOf(r);s>-1&&n.splice(s,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function gfe(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=yh.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),ON.set(t,!0)}i(gfe,"abortSignal");var C3=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},I3=class{static{i(this,"AbortController")}constructor(e){if(this._signal=new uI,!!e){Array.isArray(e)||(e=arguments);for(let r of e)r.aborted?this.abort():r.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){gfe(this._signal)}static timeout(e){let r=new uI,n=setTimeout(gfe,e,r);return typeof n.unref=="function"&&n.unref(),r}};dI.AbortController=I3;dI.AbortError=C3;dI.AbortSignal=uI});var wfe=I(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});var glt=w3(),B3=require("crypto"),S3,ylt=typeof process<"u"&&!!process.version&&!!(!((S3=process.versions)===null||S3===void 0)&&S3.node);function yfe(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((o,a)=>{function c(){a(new glt.AbortError(s??"The operation was aborted."))}i(c,"rejectOnAbort");function l(){n?.removeEventListener("abort",u)}i(l,"removeListeners");function u(){r?.(),l(),c()}if(i(u,"onAbort"),n?.aborted)return c();try{t(d=>{l(),o(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}i(yfe,"createAbortablePromise");var Elt="The delay was aborted.";function Clt(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return yfe(o=>{r=setTimeout(o,t)},{cleanupBeforeAbort:i(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??Elt})}i(Clt,"delay");function Ilt(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t}i(Ilt,"getRandomIntegerInclusive");function Efe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}i(Efe,"isObject");function Cfe(t){if(Efe(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}i(Cfe,"isError");function wlt(t){if(Cfe(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}i(wlt,"getErrorMessage");async function Slt(t,e,r){let n=Buffer.from(t,"base64");return B3.createHmac("sha256",n).update(e).digest(r)}i(Slt,"computeSha256Hmac");async function xlt(t,e){return B3.createHash("sha256").update(t).digest(e)}i(xlt,"computeSha256Hash");function R3(t){return typeof t<"u"&&t!==null}i(R3,"isDefined");function blt(t,e){if(!R3(t)||typeof t!="object")return!1;for(let r of e)if(!Ife(t,r))return!1;return!0}i(blt,"isObjectWithProperties");function Ife(t,e){return R3(t)&&typeof t=="object"&&e in t}i(Ife,"objectHasProperty");function Blt(){let t="";for(let e=0;e<32;e++){let r=Math.floor(Math.random()*16);e===12?t+="4":e===16?t+=r&3|8:t+=r.toString(16),(e===7||e===11||e===15||e===19)&&(t+="-")}return t}i(Blt,"generateUUID");var x3,b3=typeof((x3=globalThis?.crypto)===null||x3===void 0?void 0:x3.randomUUID)=="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):B3.randomUUID;b3||(b3=Blt);function Rlt(){return b3()}i(Rlt,"randomUUID");Zn.computeSha256Hash=xlt;Zn.computeSha256Hmac=Slt;Zn.createAbortablePromise=yfe;Zn.delay=Clt;Zn.getErrorMessage=wlt;Zn.getRandomIntegerInclusive=Ilt;Zn.isDefined=R3;Zn.isError=Cfe;Zn.isNode=ylt;Zn.isObject=Efe;Zn.isObjectWithProperties=blt;Zn.objectHasProperty=Ife;Zn.randomUUID=Rlt});var Hfe=I(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var Nlt=hfe(),Sfe=w3(),Tlt=wfe(),Im=Nlt.createClientLogger("core-lro"),bfe=2e3,Bfe=["succeeded","canceled","failed"];function Rfe(t){try{return JSON.parse(t).state}catch{throw new Error(`Unable to deserialize input state: ${t}`)}}i(Rfe,"deserializeState");function xfe(t){let{state:e,stateProxy:r,isOperationError:n}=t;return s=>{throw n(s)&&(r.setError(e,s),r.setFailed(e)),s}}i(xfe,"setStateError");function vlt(t,e){let r=t;return r.slice(-1)!=="."&&(r=r+"."),r+" "+e}i(vlt,"appendReadableErrorMessage");function Plt(t){let e=t.message,r=t.code,n=t;for(;n.innererror;)n=n.innererror,r=n.code,e=vlt(e,n.message);return{code:r,message:e}}i(Plt,"simplifyError");function Nfe(t){let{state:e,stateProxy:r,status:n,isDone:s,processResult:o,getError:a,response:c,setErrorAsResult:l}=t;switch(n){case"succeeded":{r.setSucceeded(e);break}case"failed":{let u=a?.(c),d="";if(u){let{code:m,message:f}=Plt(u);d=`. ${m}. ${f}`}let p=`The long-running operation has failed${d}`;r.setError(e,new Error(p)),r.setFailed(e),Im.warning(p);break}case"canceled":{r.setCanceled(e);break}}(s?.(c,e)||s===void 0&&["succeeded","canceled"].concat(l?[]:["failed"]).includes(n))&&r.setResult(e,Qlt({response:c,state:e,processResult:o}))}i(Nfe,"processOperationStatus");function Qlt(t){let{processResult:e,response:r,state:n}=t;return e?e(r,n):r}i(Qlt,"buildResult");async function Tfe(t){let{init:e,stateProxy:r,processResult:n,getOperationStatus:s,withOperationLocation:o,setErrorAsResult:a}=t,{operationLocation:c,resourceLocation:l,metadata:u,response:d}=await e();c&&o?.(c,!1);let p={metadata:u,operationLocation:c,resourceLocation:l};Im.verbose("LRO: Operation description:",p);let m=r.initState(p),f=s({response:d,state:m,operationLocation:c});return Nfe({state:m,status:f,stateProxy:r,response:d,setErrorAsResult:a,processResult:n}),m}i(Tfe,"initOperation");async function _lt(t){let{poll:e,state:r,stateProxy:n,operationLocation:s,getOperationStatus:o,getResourceLocation:a,isOperationError:c,options:l}=t,u=await e(s,l).catch(xfe({state:r,stateProxy:n,isOperationError:c})),d=o(u,r);if(Im.verbose(`LRO: Status: Polling from: ${r.config.operationLocation} Operation status: ${d} - Polling status: ${Bfe.includes(d)?"Stopped":"Running"}`),d==="succeeded"){let p=a(u,r);if(p!==void 0)return{response:await e(p).catch(xfe({state:r,stateProxy:n,isOperationError:c})),status:d}}return{response:u,status:d}}i(_lt,"pollOperationHelper");async function vfe(t){let{poll:e,state:r,stateProxy:n,options:s,getOperationStatus:o,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:u,getPollingInterval:d,processResult:p,getError:m,updateState:f,setDelay:A,isDone:h,setErrorAsResult:E}=t,{operationLocation:C}=r.config;if(C!==void 0){let{response:w,status:x}=await _lt({poll:e,getOperationStatus:o,state:r,stateProxy:n,operationLocation:C,getResourceLocation:a,isOperationError:l,options:s});if(Nfe({status:x,response:w,state:r,stateProxy:n,isDone:h,processResult:p,getError:m,setErrorAsResult:E}),!Bfe.includes(x)){let b=d?.(w);b&&A(b);let N=c?.(w,r);if(N!==void 0){let P=C!==N;r.config.operationLocation=N,u?.(N,P)}else u?.(C,!1)}f?.(r,w)}}i(vfe,"pollOperation");function Pfe(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}i(Pfe,"getOperationLocationPollingUrl");function Qfe(t){return t.headers.location}i(Qfe,"getLocationHeader");function _fe(t){return t.headers["operation-location"]}i(_fe,"getOperationLocationHeader");function Dfe(t){return t.headers["azure-asyncoperation"]}i(Dfe,"getAzureAsyncOperationHeader");function Dlt(t){let{location:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t;switch(r){case"PUT":return n;case"DELETE":return;default:switch(s){case"azure-async-operation":return;case"original-uri":return n;default:return e}}}i(Dlt,"findResourceLocation");function kfe(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t,o=_fe(e),a=Dfe(e),c=Pfe({operationLocation:o,azureAsyncOperation:a}),l=Qfe(e),u=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:Dlt({requestMethod:u,location:l,requestPath:n,resourceLocationConfig:s})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:u==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}i(kfe,"inferLroMode");function Lfe(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return v3(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return Im.verbose(`LRO: unrecognized operation status: ${e}`),e}}i(Lfe,"transformStatus");function klt(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return Lfe({status:r,statusCode:t.statusCode})}i(klt,"getStatus");function Llt(t){var e,r;let{properties:n,provisioningState:s}=(e=t.body)!==null&&e!==void 0?e:{},o=(r=n?.provisioningState)!==null&&r!==void 0?r:s;return Lfe({status:o,statusCode:t.statusCode})}i(Llt,"getProvisioningState");function v3(t){return t===202?"running":t<300?"succeeded":"failed"}i(v3,"toOperationStatus");function Ofe({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?Olt(new Date(e)):r*1e3}}i(Ofe,"parseRetryAfter");function Mfe(t){let e=t.flatResponse.error;if(!e){Im.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Im.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}i(Mfe,"getErrorFromResponse");function Olt(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e{let a=await s.sendInitialRequest(),c=kfe({rawResponse:a.rawResponse,requestPath:s.requestPath,requestMethod:s.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:Ffe,setErrorAsResult:o})}i(Mlt,"initHttpOperation");function Ufe({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return Pfe({operationLocation:_fe(t),azureAsyncOperation:Dfe(t)});case"ResourceLocation":return Qfe(t);default:return}}i(Ufe,"getOperationLocation");function P3({rawResponse:t},e){var r;let n=(r=e.config.metadata)===null||r===void 0?void 0:r.mode;switch(n){case"OperationLocation":return klt(t);case"ResourceLocation":return v3(t.statusCode);case"Body":return Llt(t);default:throw new Error(`Internal error: Unexpected operation mode: ${n}`)}}i(P3,"getOperationStatus");function qfe({flatResponse:t},e){if(typeof t=="object"){let r=t.resourceLocation;r!==void 0&&(e.config.resourceLocation=r)}return e.config.resourceLocation}i(qfe,"getResourceLocation");function Gfe(t){return t.name==="RestError"}i(Gfe,"isOperationError");async function Flt(t){let{lro:e,stateProxy:r,options:n,processResult:s,updateState:o,setDelay:a,state:c,setErrorAsResult:l}=t;return vfe({state:c,stateProxy:r,setDelay:a,processResult:s?({flatResponse:u},d)=>s(u,d):({flatResponse:u})=>u,getError:Mfe,updateState:o,getPollingInterval:Ofe,getOperationLocation:Ufe,getOperationStatus:P3,isOperationError:Gfe,getResourceLocation:qfe,options:n,poll:i(async(u,d)=>e.sendPollRequest(u,d),"poll"),setErrorAsResult:l})}i(Flt,"pollHttpOperation");var Ult=i(()=>({initState:i(t=>({status:"running",config:t}),"initState"),setCanceled:i(t=>t.status="canceled","setCanceled"),setError:i((t,e)=>t.error=e,"setError"),setResult:i((t,e)=>t.result=e,"setResult"),setRunning:i(t=>t.status="running","setRunning"),setSucceeded:i(t=>t.status="succeeded","setSucceeded"),setFailed:i(t=>t.status="failed","setFailed"),getError:i(t=>t.error,"getError"),getResult:i(t=>t.result,"getResult"),isCanceled:i(t=>t.status==="canceled","isCanceled"),isFailed:i(t=>t.status==="failed","isFailed"),isRunning:i(t=>t.status==="running","isRunning"),isSucceeded:i(t=>t.status==="succeeded","isSucceeded")}),"createStateProxy$1");function qlt(t){let{getOperationLocation:e,getStatusFromInitialResponse:r,getStatusFromPollResponse:n,isOperationError:s,getResourceLocation:o,getPollingInterval:a,getError:c,resolveOnUnsuccessful:l}=t;return async({init:u,poll:d},p)=>{let{processResult:m,updateState:f,withOperationLocation:A,intervalInMs:h=bfe,restoreFrom:E}=p||{},C=Ult(),w=A?(()=>{let qe=!1;return(ne,K)=>{K?A(ne):qe||A(ne),qe=!0}})():void 0,x=E?Rfe(E):await Tfe({init:u,stateProxy:C,processResult:m,getOperationStatus:r,withOperationLocation:w,setErrorAsResult:!l}),b,N=new Sfe.AbortController,P=new Map,_=i(async()=>P.forEach(qe=>qe(x)),"handleProgressEvents"),re="Operation was canceled",ye=h,ae={getOperationState:i(()=>x,"getOperationState"),getResult:i(()=>x.result,"getResult"),isDone:i(()=>["succeeded","failed","canceled"].includes(x.status),"isDone"),isStopped:i(()=>b===void 0,"isStopped"),stopPolling:i(()=>{N.abort()},"stopPolling"),toString:i(()=>JSON.stringify({state:x}),"toString"),onProgress:i(qe=>{let ne=Symbol();return P.set(ne,qe),()=>P.delete(ne)},"onProgress"),pollUntilDone:i(qe=>b??(b=(async()=>{let{abortSignal:ne}=qe||{},{signal:K}=ne?new Sfe.AbortController([ne,N.signal]):N;if(!ae.isDone())for(await ae.poll({abortSignal:K});!ae.isDone();)await Tlt.delay(ye,{abortSignal:K}),await ae.poll({abortSignal:K});if(l)return ae.getResult();switch(x.status){case"succeeded":return ae.getResult();case"canceled":throw new Error(re);case"failed":throw x.error;case"notStarted":case"running":throw new Error("Polling completed without succeeding or failing")}})().finally(()=>{b=void 0})),"pollUntilDone"),async poll(qe){if(l){if(ae.isDone())return}else switch(x.status){case"succeeded":return;case"canceled":throw new Error(re);case"failed":throw x.error}if(await vfe({poll:d,state:x,stateProxy:C,getOperationLocation:e,isOperationError:s,withOperationLocation:w,getPollingInterval:a,getOperationStatus:n,getResourceLocation:o,processResult:m,getError:c,updateState:f,options:qe,setDelay:i(ne=>{ye=ne},"setDelay"),setErrorAsResult:!l}),await _(),!l)switch(x.status){case"canceled":throw new Error(re);case"failed":throw x.error}}};return ae}}i(qlt,"buildCreatePoller");async function Glt(t,e){let{resourceLocationConfig:r,intervalInMs:n,processResult:s,restoreFrom:o,updateState:a,withOperationLocation:c,resolveOnUnsuccessful:l=!1}=e||{};return qlt({getStatusFromInitialResponse:Ffe,getStatusFromPollResponse:P3,isOperationError:Gfe,getOperationLocation:Ufe,getResourceLocation:qfe,getPollingInterval:Ofe,getError:Mfe,resolveOnUnsuccessful:l})({init:i(async()=>{let u=await t.sendInitialRequest(),d=kfe({rawResponse:u.rawResponse,requestPath:t.requestPath,requestMethod:t.requestMethod,resourceLocationConfig:r});return Object.assign({response:u,operationLocation:d?.operationLocation,resourceLocation:d?.resourceLocation},d?.mode?{metadata:{mode:d.mode}}:{})},"init"),poll:t.sendPollRequest},{intervalInMs:n,withOperationLocation:c,restoreFrom:o,updateState:a,processResult:s?({flatResponse:u},d)=>s(u,d):({flatResponse:u})=>u})}i(Glt,"createHttpPoller");var Hlt=i(()=>({initState:i(t=>({config:t,isStarted:!0}),"initState"),setCanceled:i(t=>t.isCancelled=!0,"setCanceled"),setError:i((t,e)=>t.error=e,"setError"),setResult:i((t,e)=>t.result=e,"setResult"),setRunning:i(t=>t.isStarted=!0,"setRunning"),setSucceeded:i(t=>t.isCompleted=!0,"setSucceeded"),setFailed:i(()=>{},"setFailed"),getError:i(t=>t.error,"getError"),getResult:i(t=>t.result,"getResult"),isCanceled:i(t=>!!t.isCancelled,"isCanceled"),isFailed:i(t=>!!t.error,"isFailed"),isRunning:i(t=>!!t.isStarted,"isRunning"),isSucceeded:i(t=>!!(t.isCompleted&&!t.isCancelled&&!t.error),"isSucceeded")}),"createStateProxy"),N3=class{static{i(this,"GenericPollOperation")}constructor(e,r,n,s,o,a,c){this.state=e,this.lro=r,this.setErrorAsResult=n,this.lroResourceLocationConfig=s,this.processResult=o,this.updateState=a,this.isDone=c}setPollerConfig(e){this.pollerConfig=e}async update(e){var r;let n=Hlt();this.state.isStarted||(this.state=Object.assign(Object.assign({},this.state),await Mlt({lro:this.lro,stateProxy:n,resourceLocationConfig:this.lroResourceLocationConfig,processResult:this.processResult,setErrorAsResult:this.setErrorAsResult})));let s=this.updateState,o=this.isDone;return!this.state.isCompleted&&this.state.error===void 0&&await Flt({lro:this.lro,state:this.state,stateProxy:n,processResult:this.processResult,updateState:s?(a,{rawResponse:c})=>s(a,c):void 0,isDone:o?({flatResponse:a},c)=>o(a,c):void 0,options:e,setDelay:i(a=>{this.pollerConfig.intervalInMs=a},"setDelay"),setErrorAsResult:this.setErrorAsResult}),(r=e?.fireProgress)===null||r===void 0||r.call(e,this.state),this}async cancel(){return Im.error("`cancelOperation` is deprecated because it wasn't implemented"),this}toString(){return JSON.stringify({state:this.state})}},MN=class t extends Error{static{i(this,"PollerStoppedError")}constructor(e){super(e),this.name="PollerStoppedError",Object.setPrototypeOf(this,t.prototype)}},FN=class t extends Error{static{i(this,"PollerCancelledError")}constructor(e){super(e),this.name="PollerCancelledError",Object.setPrototypeOf(this,t.prototype)}},UN=class{static{i(this,"Poller")}constructor(e){this.resolveOnUnsuccessful=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise((r,n)=>{this.resolve=r,this.reject=n}),this.promise.catch(()=>{})}async startPolling(e={}){for(this.stopped&&(this.stopped=!1);!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){this.isDone()||(this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})),this.processUpdatedState()}fireProgress(e){for(let r of this.pollProgressCallbacks)r(e)}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);let r=i(()=>{this.pollOncePromise=void 0},"clearPollOncePromise");this.pollOncePromise.then(r,r).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){let e=new FN("Operation was canceled");throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter(r=>r!==e)}}isDone(){let e=this.operation.state;return!!(e.isCompleted||e.isCancelled||e.error)}stopPolling(){this.stopped||(this.stopped=!0,this.reject&&this.reject(new MN("This poller is already stopped")))}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise)this.cancelPromise=this.cancelOnce(e);else if(e.abortSignal)throw new Error("A cancel request is currently pending");return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return this.operation.toString()}},T3=class extends UN{static{i(this,"LroEngine")}constructor(e,r){let{intervalInMs:n=bfe,resumeFrom:s,resolveOnUnsuccessful:o=!1,isDone:a,lroResourceLocationConfig:c,processResult:l,updateState:u}=r||{},d=s?Rfe(s):{},p=new N3(d,e,!o,c,l,u,a);super(p),this.resolveOnUnsuccessful=o,this.config={intervalInMs:n},p.setPollerConfig(this.config)}delay(){return new Promise(e=>setTimeout(()=>e(),this.config.intervalInMs))}};wm.LroEngine=T3;wm.Poller=UN;wm.PollerCancelledError=FN;wm.PollerStoppedError=MN;wm.createHttpPoller=Glt});var dAe=I((Mmr,uut)=>{uut.exports={name:"@actions/cache",version:"6.2.0",description:"Actions cache lib",keywords:["github","actions","cache"],homepage:"https://github.com/actions/toolkit/tree/main/packages/cache",license:"MIT",type:"module",main:"lib/cache.js",types:"lib/cache.d.ts",exports:{".":{types:"./lib/cache.d.ts",import:"./lib/cache.js"}},directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/cache"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:'echo "Error: run tests from root" && exit 1',tsc:"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1",semver:"^7.7.4"},devDependencies:{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1",typescript:"^5.9.3"},overrides:{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}});var mAe=I((Fmr,pAe)=>{var dut=dAe();pAe.exports={version:dut.version}});var ZN=I(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.isJsonObject=Sh.typeofJsonValue=void 0;function Eut(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}i(Eut,"typeofJsonValue");Sh.typeofJsonValue=Eut;function Cut(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}i(Cut,"isJsonObject");Sh.isJsonObject=Cut});var tT=I(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});xh.base64encode=xh.base64decode=void 0;var Hl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),eT=[];for(let t=0;t{let a=await s.sendInitialRequest(),c=kfe({rawResponse:a.rawResponse,requestPath:s.requestPath,requestMethod:s.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:Ffe,setErrorAsResult:o})}i(Mlt,"initHttpOperation");function Ufe({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return Pfe({operationLocation:_fe(t),azureAsyncOperation:Dfe(t)});case"ResourceLocation":return Qfe(t);default:return}}i(Ufe,"getOperationLocation");function P3({rawResponse:t},e){var r;let n=(r=e.config.metadata)===null||r===void 0?void 0:r.mode;switch(n){case"OperationLocation":return klt(t);case"ResourceLocation":return v3(t.statusCode);case"Body":return Llt(t);default:throw new Error(`Internal error: Unexpected operation mode: ${n}`)}}i(P3,"getOperationStatus");function qfe({flatResponse:t},e){if(typeof t=="object"){let r=t.resourceLocation;r!==void 0&&(e.config.resourceLocation=r)}return e.config.resourceLocation}i(qfe,"getResourceLocation");function Gfe(t){return t.name==="RestError"}i(Gfe,"isOperationError");async function Flt(t){let{lro:e,stateProxy:r,options:n,processResult:s,updateState:o,setDelay:a,state:c,setErrorAsResult:l}=t;return vfe({state:c,stateProxy:r,setDelay:a,processResult:s?({flatResponse:u},d)=>s(u,d):({flatResponse:u})=>u,getError:Mfe,updateState:o,getPollingInterval:Ofe,getOperationLocation:Ufe,getOperationStatus:P3,isOperationError:Gfe,getResourceLocation:qfe,options:n,poll:i(async(u,d)=>e.sendPollRequest(u,d),"poll"),setErrorAsResult:l})}i(Flt,"pollHttpOperation");var Ult=i(()=>({initState:i(t=>({status:"running",config:t}),"initState"),setCanceled:i(t=>t.status="canceled","setCanceled"),setError:i((t,e)=>t.error=e,"setError"),setResult:i((t,e)=>t.result=e,"setResult"),setRunning:i(t=>t.status="running","setRunning"),setSucceeded:i(t=>t.status="succeeded","setSucceeded"),setFailed:i(t=>t.status="failed","setFailed"),getError:i(t=>t.error,"getError"),getResult:i(t=>t.result,"getResult"),isCanceled:i(t=>t.status==="canceled","isCanceled"),isFailed:i(t=>t.status==="failed","isFailed"),isRunning:i(t=>t.status==="running","isRunning"),isSucceeded:i(t=>t.status==="succeeded","isSucceeded")}),"createStateProxy$1");function qlt(t){let{getOperationLocation:e,getStatusFromInitialResponse:r,getStatusFromPollResponse:n,isOperationError:s,getResourceLocation:o,getPollingInterval:a,getError:c,resolveOnUnsuccessful:l}=t;return async({init:u,poll:d},p)=>{let{processResult:m,updateState:f,withOperationLocation:A,intervalInMs:h=bfe,restoreFrom:E}=p||{},C=Ult(),w=A?(()=>{let qe=!1;return(ne,K)=>{K?A(ne):qe||A(ne),qe=!0}})():void 0,x=E?Rfe(E):await Tfe({init:u,stateProxy:C,processResult:m,getOperationStatus:r,withOperationLocation:w,setErrorAsResult:!l}),b,N=new Sfe.AbortController,P=new Map,_=i(async()=>P.forEach(qe=>qe(x)),"handleProgressEvents"),re="Operation was canceled",ye=h,ae={getOperationState:i(()=>x,"getOperationState"),getResult:i(()=>x.result,"getResult"),isDone:i(()=>["succeeded","failed","canceled"].includes(x.status),"isDone"),isStopped:i(()=>b===void 0,"isStopped"),stopPolling:i(()=>{N.abort()},"stopPolling"),toString:i(()=>JSON.stringify({state:x}),"toString"),onProgress:i(qe=>{let ne=Symbol();return P.set(ne,qe),()=>P.delete(ne)},"onProgress"),pollUntilDone:i(qe=>b??(b=(async()=>{let{abortSignal:ne}=qe||{},{signal:K}=ne?new Sfe.AbortController([ne,N.signal]):N;if(!ae.isDone())for(await ae.poll({abortSignal:K});!ae.isDone();)await Tlt.delay(ye,{abortSignal:K}),await ae.poll({abortSignal:K});if(l)return ae.getResult();switch(x.status){case"succeeded":return ae.getResult();case"canceled":throw new Error(re);case"failed":throw x.error;case"notStarted":case"running":throw new Error("Polling completed without succeeding or failing")}})().finally(()=>{b=void 0})),"pollUntilDone"),async poll(qe){if(l){if(ae.isDone())return}else switch(x.status){case"succeeded":return;case"canceled":throw new Error(re);case"failed":throw x.error}if(await vfe({poll:d,state:x,stateProxy:C,getOperationLocation:e,isOperationError:s,withOperationLocation:w,getPollingInterval:a,getOperationStatus:n,getResourceLocation:o,processResult:m,getError:c,updateState:f,options:qe,setDelay:i(ne=>{ye=ne},"setDelay"),setErrorAsResult:!l}),await _(),!l)switch(x.status){case"canceled":throw new Error(re);case"failed":throw x.error}}};return ae}}i(qlt,"buildCreatePoller");async function Glt(t,e){let{resourceLocationConfig:r,intervalInMs:n,processResult:s,restoreFrom:o,updateState:a,withOperationLocation:c,resolveOnUnsuccessful:l=!1}=e||{};return qlt({getStatusFromInitialResponse:Ffe,getStatusFromPollResponse:P3,isOperationError:Gfe,getOperationLocation:Ufe,getResourceLocation:qfe,getPollingInterval:Ofe,getError:Mfe,resolveOnUnsuccessful:l})({init:i(async()=>{let u=await t.sendInitialRequest(),d=kfe({rawResponse:u.rawResponse,requestPath:t.requestPath,requestMethod:t.requestMethod,resourceLocationConfig:r});return Object.assign({response:u,operationLocation:d?.operationLocation,resourceLocation:d?.resourceLocation},d?.mode?{metadata:{mode:d.mode}}:{})},"init"),poll:t.sendPollRequest},{intervalInMs:n,withOperationLocation:c,restoreFrom:o,updateState:a,processResult:s?({flatResponse:u},d)=>s(u,d):({flatResponse:u})=>u})}i(Glt,"createHttpPoller");var Hlt=i(()=>({initState:i(t=>({config:t,isStarted:!0}),"initState"),setCanceled:i(t=>t.isCancelled=!0,"setCanceled"),setError:i((t,e)=>t.error=e,"setError"),setResult:i((t,e)=>t.result=e,"setResult"),setRunning:i(t=>t.isStarted=!0,"setRunning"),setSucceeded:i(t=>t.isCompleted=!0,"setSucceeded"),setFailed:i(()=>{},"setFailed"),getError:i(t=>t.error,"getError"),getResult:i(t=>t.result,"getResult"),isCanceled:i(t=>!!t.isCancelled,"isCanceled"),isFailed:i(t=>!!t.error,"isFailed"),isRunning:i(t=>!!t.isStarted,"isRunning"),isSucceeded:i(t=>!!(t.isCompleted&&!t.isCancelled&&!t.error),"isSucceeded")}),"createStateProxy"),N3=class{static{i(this,"GenericPollOperation")}constructor(e,r,n,s,o,a,c){this.state=e,this.lro=r,this.setErrorAsResult=n,this.lroResourceLocationConfig=s,this.processResult=o,this.updateState=a,this.isDone=c}setPollerConfig(e){this.pollerConfig=e}async update(e){var r;let n=Hlt();this.state.isStarted||(this.state=Object.assign(Object.assign({},this.state),await Mlt({lro:this.lro,stateProxy:n,resourceLocationConfig:this.lroResourceLocationConfig,processResult:this.processResult,setErrorAsResult:this.setErrorAsResult})));let s=this.updateState,o=this.isDone;return!this.state.isCompleted&&this.state.error===void 0&&await Flt({lro:this.lro,state:this.state,stateProxy:n,processResult:this.processResult,updateState:s?(a,{rawResponse:c})=>s(a,c):void 0,isDone:o?({flatResponse:a},c)=>o(a,c):void 0,options:e,setDelay:i(a=>{this.pollerConfig.intervalInMs=a},"setDelay"),setErrorAsResult:this.setErrorAsResult}),(r=e?.fireProgress)===null||r===void 0||r.call(e,this.state),this}async cancel(){return Im.error("`cancelOperation` is deprecated because it wasn't implemented"),this}toString(){return JSON.stringify({state:this.state})}},MN=class t extends Error{static{i(this,"PollerStoppedError")}constructor(e){super(e),this.name="PollerStoppedError",Object.setPrototypeOf(this,t.prototype)}},FN=class t extends Error{static{i(this,"PollerCancelledError")}constructor(e){super(e),this.name="PollerCancelledError",Object.setPrototypeOf(this,t.prototype)}},UN=class{static{i(this,"Poller")}constructor(e){this.resolveOnUnsuccessful=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise((r,n)=>{this.resolve=r,this.reject=n}),this.promise.catch(()=>{})}async startPolling(e={}){for(this.stopped&&(this.stopped=!1);!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){this.isDone()||(this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})),this.processUpdatedState()}fireProgress(e){for(let r of this.pollProgressCallbacks)r(e)}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);let r=i(()=>{this.pollOncePromise=void 0},"clearPollOncePromise");this.pollOncePromise.then(r,r).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){let e=new FN("Operation was canceled");throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter(r=>r!==e)}}isDone(){let e=this.operation.state;return!!(e.isCompleted||e.isCancelled||e.error)}stopPolling(){this.stopped||(this.stopped=!0,this.reject&&this.reject(new MN("This poller is already stopped")))}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise)this.cancelPromise=this.cancelOnce(e);else if(e.abortSignal)throw new Error("A cancel request is currently pending");return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return this.operation.toString()}},T3=class extends UN{static{i(this,"LroEngine")}constructor(e,r){let{intervalInMs:n=bfe,resumeFrom:s,resolveOnUnsuccessful:o=!1,isDone:a,lroResourceLocationConfig:c,processResult:l,updateState:u}=r||{},d=s?Rfe(s):{},p=new N3(d,e,!o,c,l,u,a);super(p),this.resolveOnUnsuccessful=o,this.config={intervalInMs:n},p.setPollerConfig(this.config)}delay(){return new Promise(e=>setTimeout(()=>e(),this.config.intervalInMs))}};wm.LroEngine=T3;wm.Poller=UN;wm.PollerCancelledError=FN;wm.PollerStoppedError=MN;wm.createHttpPoller=Glt});var dAe=I((Omr,uut)=>{uut.exports={name:"@actions/cache",version:"6.2.0",description:"Actions cache lib",keywords:["github","actions","cache"],homepage:"https://github.com/actions/toolkit/tree/main/packages/cache",license:"MIT",type:"module",main:"lib/cache.js",types:"lib/cache.d.ts",exports:{".":{types:"./lib/cache.d.ts",import:"./lib/cache.js"}},directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/cache"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:'echo "Error: run tests from root" && exit 1',tsc:"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1",semver:"^7.7.4"},devDependencies:{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1",typescript:"^5.9.3"},overrides:{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}});var mAe=I((Mmr,pAe)=>{var dut=dAe();pAe.exports={version:dut.version}});var ZN=I(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.isJsonObject=Sh.typeofJsonValue=void 0;function Eut(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}i(Eut,"typeofJsonValue");Sh.typeofJsonValue=Eut;function Cut(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}i(Cut,"isJsonObject");Sh.isJsonObject=Cut});var tT=I(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});xh.base64encode=xh.base64decode=void 0;var Hl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),eT=[];for(let t=0;t>4,a=o,s=2;break;case 2:r[n++]=(a&15)<<4|(o&60)>>2,a=o,s=3;break;case 3:r[n++]=(a&3)<<6|o,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}i(Iut,"base64decode");xh.base64decode=Iut;function wut(t){let e="",r=0,n,s=0;for(let o=0;o>2],s=(n&3)<<4,r=1;break;case 1:e+=Hl[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=Hl[s|n>>6],e+=Hl[n&63],r=0;break}return r&&(e+=Hl[s],e+="=",r==1&&(e+="=")),e}i(wut,"base64encode");xh.base64encode=wut});var EAe=I(rT=>{"use strict";Object.defineProperty(rT,"__esModule",{value:!0});rT.utf8read=void 0;var G3=i(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function Sut(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,o,a=t.length;for(;e191&&o<224?n[s++]=(o&31)<<6|t[e++]&63:o>239&&o<365?(o=((o&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(o>>10),n[s++]=56320+(o&1023)):n[s++]=(o&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(G3(n)),s=0);return r.length?(s&&r.push(G3(n.slice(0,s))),r.join("")):G3(n.slice(0,s))}i(Sut,"utf8read");rT.utf8read=Sut});var EI=I(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.WireType=fc.mergeBinaryOptions=fc.UnknownFieldHandler=void 0;var xut;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,o,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:o,data:a})},t.onWrite=(r,n,s)=>{for(let{no:o,wireType:a,data:c}of t.list(n))s.tag(o,a).raw(c)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(o=>o.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=i(r=>r&&Array.isArray(r[t.symbol]),"is")})(xut=fc.UnknownFieldHandler||(fc.UnknownFieldHandler={}));function but(t,e){return Object.assign(Object.assign({},t),e)}i(but,"mergeBinaryOptions");fc.mergeBinaryOptions=but;var But;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(But=fc.WireType||(fc.WireType={}))});var sT=I(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.varint32read=vs.varint32write=vs.int64toString=vs.int64fromString=vs.varint64write=vs.varint64read=void 0;function Rut(){let t=0,e=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(t|=(s&127)<>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<>>o,c=!(!(a>>>7)&&e==0),l=(c?a|128:a)&255;if(r.push(l),!c)return}let n=t>>>28&15|(e&7)<<4,s=e>>3!=0;if(r.push((s?n|128:n)&255),!!s){for(let o=3;o<31;o=o+7){let a=e>>>o,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}i(Nut,"varint64write");vs.varint64write=Nut;var nT=65536*65536;function Tut(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function o(a,c){let l=Number(t.slice(a,c));s*=r,n=n*r+l,n>=nT&&(s=s+(n/nT|0),n=n%nT)}return i(o,"add1e6digit"),o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[e,n,s]}i(Tut,"int64fromString");vs.int64fromString=Tut;function vut(t,e){if(e>>>0<=2097151)return""+(nT*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,o=r+n*6777216+s*6710656,a=n+s*8147497,c=s*2,l=1e7;o>=l&&(a+=Math.floor(o/l),o%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function u(d,p){let m=d?String(d):"";return p?"0000000".slice(m.length)+m:m}return i(u,"decimalFrom1e7"),u(c,0)+u(a,c)+u(o,1)}i(vut,"int64toString");vs.int64toString=vut;function Put(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}i(Put,"varint32write");vs.varint32write=Put;function Qut(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}i(Qut,"varint32read");vs.varint32read=Qut});var ad=I(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.PbLong=id.PbULong=id.detectBi=void 0;var CI=sT(),yt;function CAe(){let t=new DataView(new ArrayBuffer(8));yt=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}i(CAe,"detectBi");id.detectBi=CAe;CAe();function IAe(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}i(IAe,"assertBi");var wAe=/^-?[0-9]+$/,iT=4294967296,oT=2147483648,aT=class{static{i(this,"SharedPbLong")}constructor(e,r){this.lo=e|0,this.hi=r|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*iT+(this.lo>>>0);if(!Number.isSafeInteger(e))throw new Error("cannot convert to safe number");return e}},II=class t extends aT{static{i(this,"PbULong")}static from(e){if(yt)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=yt.C(e);case"number":if(e===0)return this.ZERO;e=yt.C(e);case"bigint":if(!e)return this.ZERO;if(eyt.UMAX)throw new Error("ulong too large");return yt.V.setBigUint64(0,e,!0),new t(yt.V.getInt32(0,!0),yt.V.getInt32(4,!0))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=e.trim(),!wAe.test(e))throw new Error("string is no integer");let[r,n,s]=CI.int64fromString(e);if(r)throw new Error("signed value for ulong");return new t(n,s);case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");if(e<0)throw new Error("signed value for ulong");return new t(e,e/iT)}throw new Error("unknown value "+typeof e)}toString(){return yt?this.toBigInt().toString():CI.int64toString(this.lo,this.hi)}toBigInt(){return IAe(yt),yt.V.setInt32(0,this.lo,!0),yt.V.setInt32(4,this.hi,!0),yt.V.getBigUint64(0,!0)}};id.PbULong=II;II.ZERO=new II(0,0);var wI=class t extends aT{static{i(this,"PbLong")}static from(e){if(yt)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=yt.C(e);case"number":if(e===0)return this.ZERO;e=yt.C(e);case"bigint":if(!e)return this.ZERO;if(eyt.MAX)throw new Error("signed long too large");return yt.V.setBigInt64(0,e,!0),new t(yt.V.getInt32(0,!0),yt.V.getInt32(4,!0))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=e.trim(),!wAe.test(e))throw new Error("string is no integer");let[r,n,s]=CI.int64fromString(e);if(r){if(s>oT||s==oT&&n!=0)throw new Error("signed long too small")}else if(s>=oT)throw new Error("signed long too large");let o=new t(n,s);return r?o.negate():o;case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");return e>0?new t(e,e/iT):new t(-e,-e/iT).negate()}throw new Error("unknown value "+typeof e)}isNegative(){return(this.hi&oT)!==0}negate(){let e=~this.hi,r=this.lo;return r?r=~r+1:e+=1,new t(r,e)}toString(){if(yt)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+CI.int64toString(e.lo,e.hi)}return CI.int64toString(this.lo,this.hi)}toBigInt(){return IAe(yt),yt.V.setInt32(0,this.lo,!0),yt.V.setInt32(4,this.hi,!0),yt.V.getBigInt64(0,!0)}};id.PbLong=wI;wI.ZERO=new wI(0,0)});var H3=I(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});Bh.BinaryReader=Bh.binaryReadOptions=void 0;var bh=EI(),SI=ad(),SAe=sT(),xAe={readUnknownField:!0,readerFactory:i(t=>new cT(t),"readerFactory")};function _ut(t){return t?Object.assign(Object.assign({},xAe),t):xAe}i(_ut,"binaryReadOptions");Bh.binaryReadOptions=_ut;var cT=class{static{i(this,"BinaryReader")}constructor(e,r){this.varint64=SAe.varint64read,this.uint32=SAe.varint32read,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=r??new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}tag(){let e=this.uint32(),r=e>>>3,n=e&7;if(r<=0||n<0||n>5)throw new Error("illegal tag: field no "+r+" wire type "+n);return[r,n]}skip(e){let r=this.pos;switch(e){case bh.WireType.Varint:for(;this.buf[this.pos++]&128;);break;case bh.WireType.Bit64:this.pos+=4;case bh.WireType.Bit32:this.pos+=4;break;case bh.WireType.LengthDelimited:let n=this.uint32();this.pos+=n;break;case bh.WireType.StartGroup:let s;for(;(s=this.tag()[1])!==bh.WireType.EndGroup;)this.skip(s);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return new SI.PbLong(...this.varint64())}uint64(){return new SI.PbULong(...this.varint64())}sint64(){let[e,r]=this.varint64(),n=-(e&1);return e=(e>>>1|(r&1)<<31)^n,r=r>>>1^n,new SI.PbLong(e,r)}bool(){let[e,r]=this.varint64();return e!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new SI.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new SI.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),r=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(r,r+e)}string(){return this.textDecoder.decode(this.bytes())}};Bh.BinaryReader=cT});var Rh=I(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.assertFloat32=Zo.assertUInt32=Zo.assertInt32=Zo.assertNever=Zo.assert=void 0;function Dut(t,e){if(!t)throw new Error(e)}i(Dut,"assert");Zo.assert=Dut;function kut(t,e){throw new Error(e??"Unexpected object: "+t)}i(kut,"assertNever");Zo.assertNever=kut;var Lut=34028234663852886e22,Out=-34028234663852886e22,Mut=4294967295,Fut=2147483647,Uut=-2147483648;function qut(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>Fut||tMut||t<0)throw new Error("invalid uint 32: "+t)}i(Gut,"assertUInt32");Zo.assertUInt32=Gut;function Hut(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>Lut||t{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.BinaryWriter=Th.binaryWriteOptions=void 0;var xI=ad(),bI=sT(),Nh=Rh(),bAe={writeUnknownFields:!0,writerFactory:i(()=>new lT,"writerFactory")};function $ut(t){return t?Object.assign(Object.assign({},bAe),t):bAe}i($ut,"binaryWriteOptions");Th.binaryWriteOptions=$ut;var lT=class{static{i(this,"BinaryWriter")}constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let s=0;s>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Nh.assertUInt32(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return Nh.assertInt32(e),bI.varint32write(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let r=this.textEncoder.encode(e);return this.uint32(r.byteLength),this.raw(r)}float(e){Nh.assertFloat32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,e,!0),this.raw(r)}double(e){let r=new Uint8Array(8);return new DataView(r.buffer).setFloat64(0,e,!0),this.raw(r)}fixed32(e){Nh.assertUInt32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e,!0),this.raw(r)}sfixed32(e){Nh.assertInt32(e);let r=new Uint8Array(4);return new DataView(r.buffer).setInt32(0,e,!0),this.raw(r)}sint32(e){return Nh.assertInt32(e),e=(e<<1^e>>31)>>>0,bI.varint32write(e,this.buf),this}sfixed64(e){let r=new Uint8Array(8),n=new DataView(r.buffer),s=xI.PbLong.from(e);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(r)}fixed64(e){let r=new Uint8Array(8),n=new DataView(r.buffer),s=xI.PbULong.from(e);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(r)}int64(e){let r=xI.PbLong.from(e);return bI.varint64write(r.lo,r.hi,this.buf),this}sint64(e){let r=xI.PbLong.from(e),n=r.hi>>31,s=r.lo<<1^n,o=(r.hi<<1|r.lo>>>31)^n;return bI.varint64write(s,o,this.buf),this}uint64(e){let r=xI.PbULong.from(e);return bI.varint64write(r.lo,r.hi,this.buf),this}};Th.BinaryWriter=lT});var z3=I(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.mergeJsonOptions=cd.jsonWriteOptions=cd.jsonReadOptions=void 0;var BAe={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},RAe={ignoreUnknownFields:!1};function zut(t){return t?Object.assign(Object.assign({},RAe),t):RAe}i(zut,"jsonReadOptions");cd.jsonReadOptions=zut;function Vut(t){return t?Object.assign(Object.assign({},BAe),t):BAe}i(Vut,"jsonWriteOptions");cd.jsonWriteOptions=Vut;function Wut(t,e){var r,n;let s=Object.assign(Object.assign({},t),e);return s.typeRegistry=[...(r=t?.typeRegistry)!==null&&r!==void 0?r:[],...(n=e?.typeRegistry)!==null&&n!==void 0?n:[]],s}i(Wut,"mergeJsonOptions");cd.mergeJsonOptions=Wut});var BI=I(uT=>{"use strict";Object.defineProperty(uT,"__esModule",{value:!0});uT.MESSAGE_TYPE=void 0;uT.MESSAGE_TYPE=Symbol.for("protobuf-ts/message-type")});var V3=I(dT=>{"use strict";Object.defineProperty(dT,"__esModule",{value:!0});dT.lowerCamelCase=void 0;function Yut(t){let e=!1,r=[];for(let n=0;n{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.readMessageOption=Fr.readFieldOption=Fr.readFieldOptions=Fr.normalizeFieldInfo=Fr.RepeatType=Fr.LongType=Fr.ScalarType=void 0;var NAe=V3(),Jut;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(Jut=Fr.ScalarType||(Fr.ScalarType={}));var jut;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING",t[t.NUMBER=2]="NUMBER"})(jut=Fr.LongType||(Fr.LongType={}));var TAe;(function(t){t[t.NO=0]="NO",t[t.PACKED=1]="PACKED",t[t.UNPACKED=2]="UNPACKED"})(TAe=Fr.RepeatType||(Fr.RepeatType={}));function Kut(t){var e,r,n,s;return t.localName=(e=t.localName)!==null&&e!==void 0?e:NAe.lowerCamelCase(t.name),t.jsonName=(r=t.jsonName)!==null&&r!==void 0?r:NAe.lowerCamelCase(t.name),t.repeat=(n=t.repeat)!==null&&n!==void 0?n:TAe.NO,t.opt=(s=t.opt)!==null&&s!==void 0?s:t.repeat||t.oneof?!1:t.kind=="message",t}i(Kut,"normalizeFieldInfo");Fr.normalizeFieldInfo=Kut;function Xut(t,e,r,n){var s;let o=(s=t.fields.find((a,c)=>a.localName==e||c==e))===null||s===void 0?void 0:s.options;return o&&o[r]?n.fromJson(o[r]):void 0}i(Xut,"readFieldOptions");Fr.readFieldOptions=Xut;function Zut(t,e,r,n){var s;let o=(s=t.fields.find((c,l)=>c.localName==e||l==e))===null||s===void 0?void 0:s.options;if(!o)return;let a=o[r];return a===void 0?a:n?n.fromJson(a):a}i(Zut,"readFieldOption");Fr.readFieldOption=Zut;function edt(t,e,r){let s=t.options[e];return s===void 0?s:r?r.fromJson(s):s}i(edt,"readMessageOption");Fr.readMessageOption=edt});var W3=I(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.getSelectedOneofValue=Ps.clearOneofValue=Ps.setUnknownOneofValue=Ps.setOneofValue=Ps.getOneofValue=Ps.isOneofGroup=void 0;function tdt(t){if(typeof t!="object"||t===null||!t.hasOwnProperty("oneofKind"))return!1;switch(typeof t.oneofKind){case"string":return t[t.oneofKind]===void 0?!1:Object.keys(t).length==2;case"undefined":return Object.keys(t).length==1;default:return!1}}i(tdt,"isOneofGroup");Ps.isOneofGroup=tdt;function rdt(t,e){return t[e]}i(rdt,"getOneofValue");Ps.getOneofValue=rdt;function ndt(t,e,r){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=e,r!==void 0&&(t[e]=r)}i(ndt,"setOneofValue");Ps.setOneofValue=ndt;function sdt(t,e,r){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=e,r!==void 0&&e!==void 0&&(t[e]=r)}i(sdt,"setUnknownOneofValue");Ps.setUnknownOneofValue=sdt;function odt(t){t.oneofKind!==void 0&&delete t[t.oneofKind],t.oneofKind=void 0}i(odt,"clearOneofValue");Ps.clearOneofValue=odt;function idt(t){if(t.oneofKind!==void 0)return t[t.oneofKind]}i(idt,"getSelectedOneofValue");Ps.getSelectedOneofValue=idt});var J3=I(pT=>{"use strict";Object.defineProperty(pT,"__esModule",{value:!0});pT.ReflectionTypeCheck=void 0;var ir=Hi(),adt=W3(),Y3=class{static{i(this,"ReflectionTypeCheck")}constructor(e){var r;this.fields=(r=e.fields)!==null&&r!==void 0?r:[]}prepare(){if(this.data)return;let e=[],r=[],n=[];for(let s of this.fields)if(s.oneof)n.includes(s.oneof)||(n.push(s.oneof),e.push(s.oneof),r.push(s.oneof));else switch(r.push(s.localName),s.kind){case"scalar":case"enum":(!s.opt||s.repeat)&&e.push(s.localName);break;case"message":s.repeat&&e.push(s.localName);break;case"map":e.push(s.localName);break}this.data={req:e,known:r,oneofs:Object.values(n)}}is(e,r,n=!1){if(r<0)return!0;if(e==null||typeof e!="object")return!1;this.prepare();let s=Object.keys(e),o=this.data;if(s.length!s.includes(a))||!n&&s.some(a=>!o.known.includes(a)))return!1;if(r<1)return!0;for(let a of o.oneofs){let c=e[a];if(!adt.isOneofGroup(c))return!1;if(c.oneofKind===void 0)continue;let l=this.fields.find(u=>u.localName===c.oneofKind);if(!l||!this.field(c[c.oneofKind],l,n,r))return!1}for(let a of this.fields)if(a.oneof===void 0&&!this.field(e[a.localName],a,n,r))return!1;return!0}field(e,r,n,s){let o=r.repeat;switch(r.kind){case"scalar":return e===void 0?r.opt:o?this.scalars(e,r.T,s,r.L):this.scalar(e,r.T,r.L);case"enum":return e===void 0?r.opt:o?this.scalars(e,ir.ScalarType.INT32,s):this.scalar(e,ir.ScalarType.INT32);case"message":return e===void 0?!0:o?this.messages(e,r.T(),n,s):this.message(e,r.T(),n,s);case"map":if(typeof e!="object"||e===null)return!1;if(s<2)return!0;if(!this.mapKeys(e,r.K,s))return!1;switch(r.V.kind){case"scalar":return this.scalars(Object.values(e),r.V.T,s,r.V.L);case"enum":return this.scalars(Object.values(e),ir.ScalarType.INT32,s);case"message":return this.messages(Object.values(e),r.V.T(),n,s)}break}return!0}message(e,r,n,s){return n?r.isAssignable(e,s):r.is(e,s)}messages(e,r,n,s){if(!Array.isArray(e))return!1;if(s<2)return!0;if(n){for(let o=0;oparseInt(o)),r,n);case ir.ScalarType.BOOL:return this.scalars(s.slice(0,n).map(o=>o=="true"?!0:o=="false"?!1:o),r,n);default:return this.scalars(s,r,n,ir.LongType.STRING)}}};pT.ReflectionTypeCheck=Y3});var fT=I(mT=>{"use strict";Object.defineProperty(mT,"__esModule",{value:!0});mT.reflectionLongConvert=void 0;var vAe=Hi();function cdt(t,e){switch(e){case vAe.LongType.BIGINT:return t.toBigInt();case vAe.LongType.NUMBER:return t.toNumber();default:return t.toString()}}i(cdt,"reflectionLongConvert");mT.reflectionLongConvert=cdt});var K3=I(gT=>{"use strict";Object.defineProperty(gT,"__esModule",{value:!0});gT.ReflectionJsonReader=void 0;var PAe=ZN(),ldt=tT(),Ur=Hi(),AT=ad(),xm=Rh(),hT=fT(),j3=class{static{i(this,"ReflectionJsonReader")}constructor(e){this.info=e}prepare(){var e;if(this.fMap===void 0){this.fMap={};let r=(e=this.info.fields)!==null&&e!==void 0?e:[];for(let n of r)this.fMap[n.name]=n,this.fMap[n.jsonName]=n,this.fMap[n.localName]=n}}assert(e,r,n){if(!e){let s=PAe.typeofJsonValue(n);throw(s=="number"||s=="boolean")&&(s=n.toString()),new Error(`Cannot parse JSON ${s} for ${this.info.typeName}#${r}`)}}read(e,r,n){this.prepare();let s=[];for(let[o,a]of Object.entries(e)){let c=this.fMap[o];if(!c){if(!n.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${o}`);continue}let l=c.localName,u;if(c.oneof){if(a===null&&(c.kind!=="enum"||c.T()[0]!=="google.protobuf.NullValue"))continue;if(s.includes(c.oneof))throw new Error(`Multiple members of the oneof group "${c.oneof}" of ${this.info.typeName} are present in JSON.`);s.push(c.oneof),u=r[c.oneof]={oneofKind:l}}else u=r;if(c.kind=="map"){if(a===null)continue;this.assert(PAe.isJsonObject(a),c.name,a);let d=u[l];for(let[p,m]of Object.entries(a)){this.assert(m!==null,c.name+" map value",null);let f;switch(c.V.kind){case"message":f=c.V.T().internalJsonRead(m,n);break;case"enum":if(f=this.enum(c.V.T(),m,c.name,n.ignoreUnknownFields),f===!1)continue;break;case"scalar":f=this.scalar(m,c.V.T,c.V.L,c.name);break}this.assert(f!==void 0,c.name+" map value",m);let A=p;c.K==Ur.ScalarType.BOOL&&(A=A=="true"?!0:A=="false"?!1:A),A=this.scalar(A,c.K,Ur.LongType.STRING,c.name).toString(),d[A]=f}}else if(c.repeat){if(a===null)continue;this.assert(Array.isArray(a),c.name,a);let d=u[l];for(let p of a){this.assert(p!==null,c.name,null);let m;switch(c.kind){case"message":m=c.T().internalJsonRead(p,n);break;case"enum":if(m=this.enum(c.T(),p,c.name,n.ignoreUnknownFields),m===!1)continue;break;case"scalar":m=this.scalar(p,c.T,c.L,c.name);break}this.assert(m!==void 0,c.name,a),d.push(m)}}else switch(c.kind){case"message":if(a===null&&c.T().typeName!="google.protobuf.Value"){this.assert(c.oneof===void 0,c.name+" (oneof member)",null);continue}u[l]=c.T().internalJsonRead(a,n,u[l]);break;case"enum":if(a===null)continue;let d=this.enum(c.T(),a,c.name,n.ignoreUnknownFields);if(d===!1)continue;u[l]=d;break;case"scalar":if(a===null)continue;u[l]=this.scalar(a,c.T,c.L,c.name);break}}}enum(e,r,n,s){if(e[0]=="google.protobuf.NullValue"&&xm.assert(r===null||r==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`),r===null)return 0;switch(typeof r){case"number":return xm.assert(Number.isInteger(r),`Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${r}.`),r;case"string":let o=r;e[2]&&r.substring(0,e[2].length)===e[2]&&(o=r.substring(e[2].length));let a=e[1][o];return typeof a>"u"&&s?!1:(xm.assert(typeof a=="number",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${r}".`),a)}xm.assert(!1,`Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof r}".`)}scalar(e,r,n,s){let o;try{switch(r){case Ur.ScalarType.DOUBLE:case Ur.ScalarType.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""){o="empty string";break}if(typeof e=="string"&&e.trim().length!==e.length){o="extra whitespace";break}if(typeof e!="string"&&typeof e!="number")break;let a=Number(e);if(Number.isNaN(a)){o="not a number";break}if(!Number.isFinite(a)){o="too large or small";break}return r==Ur.ScalarType.FLOAT&&xm.assertFloat32(a),a;case Ur.ScalarType.INT32:case Ur.ScalarType.FIXED32:case Ur.ScalarType.SFIXED32:case Ur.ScalarType.SINT32:case Ur.ScalarType.UINT32:if(e===null)return 0;let c;if(typeof e=="number"?c=e:e===""?o="empty string":typeof e=="string"&&(e.trim().length!==e.length?o="extra whitespace":c=Number(e)),c===void 0)break;return r==Ur.ScalarType.UINT32?xm.assertUInt32(c):xm.assertInt32(c),c;case Ur.ScalarType.INT64:case Ur.ScalarType.SFIXED64:case Ur.ScalarType.SINT64:if(e===null)return hT.reflectionLongConvert(AT.PbLong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return hT.reflectionLongConvert(AT.PbLong.from(e),n);case Ur.ScalarType.FIXED64:case Ur.ScalarType.UINT64:if(e===null)return hT.reflectionLongConvert(AT.PbULong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return hT.reflectionLongConvert(AT.PbULong.from(e),n);case Ur.ScalarType.BOOL:if(e===null)return!1;if(typeof e!="boolean")break;return e;case Ur.ScalarType.STRING:if(e===null)return"";if(typeof e!="string"){o="extra whitespace";break}try{encodeURIComponent(e)}catch(l){l="invalid UTF8";break}return e;case Ur.ScalarType.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!="string")break;return ldt.base64decode(e)}}catch(a){o=a.message}this.assert(!1,s+(o?" - "+o:""),e)}};gT.ReflectionJsonReader=j3});var Z3=I(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});yT.ReflectionJsonWriter=void 0;var udt=tT(),QAe=ad(),es=Hi(),qt=Rh(),X3=class{static{i(this,"ReflectionJsonWriter")}constructor(e){var r;this.fields=(r=e.fields)!==null&&r!==void 0?r:[]}write(e,r){let n={},s=e;for(let o of this.fields){if(!o.oneof){let u=this.field(o,s[o.localName],r);u!==void 0&&(n[r.useProtoFieldName?o.name:o.jsonName]=u);continue}let a=s[o.oneof];if(a.oneofKind!==o.localName)continue;let c=o.kind=="scalar"||o.kind=="enum"?Object.assign(Object.assign({},r),{emitDefaultValues:!0}):r,l=this.field(o,a[o.localName],c);qt.assert(l!==void 0),n[r.useProtoFieldName?o.name:o.jsonName]=l}return n}field(e,r,n){let s;if(e.kind=="map"){qt.assert(typeof r=="object"&&r!==null);let o={};switch(e.V.kind){case"scalar":for(let[l,u]of Object.entries(r)){let d=this.scalar(e.V.T,u,e.name,!1,!0);qt.assert(d!==void 0),o[l.toString()]=d}break;case"message":let a=e.V.T();for(let[l,u]of Object.entries(r)){let d=this.message(a,u,e.name,n);qt.assert(d!==void 0),o[l.toString()]=d}break;case"enum":let c=e.V.T();for(let[l,u]of Object.entries(r)){qt.assert(u===void 0||typeof u=="number");let d=this.enum(c,u,e.name,!1,!0,n.enumAsInteger);qt.assert(d!==void 0),o[l.toString()]=d}break}(n.emitDefaultValues||Object.keys(o).length>0)&&(s=o)}else if(e.repeat){qt.assert(Array.isArray(r));let o=[];switch(e.kind){case"scalar":for(let l=0;l0||n.emitDefaultValues)&&(s=o)}else switch(e.kind){case"scalar":s=this.scalar(e.T,r,e.name,e.opt,n.emitDefaultValues);break;case"enum":s=this.enum(e.T(),r,e.name,e.opt,n.emitDefaultValues,n.enumAsInteger);break;case"message":s=this.message(e.T(),r,e.name,n);break}return s}enum(e,r,n,s,o,a){if(e[0]=="google.protobuf.NullValue")return!o&&!s?void 0:null;if(r===void 0){qt.assert(s);return}if(!(r===0&&!o&&!s))return qt.assert(typeof r=="number"),qt.assert(Number.isInteger(r)),a||!e[1].hasOwnProperty(r)?r:e[2]?e[2]+e[1][r]:e[1][r]}message(e,r,n,s){return r===void 0?s.emitDefaultValues?null:void 0:e.internalJsonWrite(r,s)}scalar(e,r,n,s,o){if(r===void 0){qt.assert(s);return}let a=o||s;switch(e){case es.ScalarType.INT32:case es.ScalarType.SFIXED32:case es.ScalarType.SINT32:return r===0?a?0:void 0:(qt.assertInt32(r),r);case es.ScalarType.FIXED32:case es.ScalarType.UINT32:return r===0?a?0:void 0:(qt.assertUInt32(r),r);case es.ScalarType.FLOAT:qt.assertFloat32(r);case es.ScalarType.DOUBLE:return r===0?a?0:void 0:(qt.assert(typeof r=="number"),Number.isNaN(r)?"NaN":r===Number.POSITIVE_INFINITY?"Infinity":r===Number.NEGATIVE_INFINITY?"-Infinity":r);case es.ScalarType.STRING:return r===""?a?"":void 0:(qt.assert(typeof r=="string"),r);case es.ScalarType.BOOL:return r===!1?a?!1:void 0:(qt.assert(typeof r=="boolean"),r);case es.ScalarType.UINT64:case es.ScalarType.FIXED64:qt.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let c=QAe.PbULong.from(r);return c.isZero()&&!a?void 0:c.toString();case es.ScalarType.INT64:case es.ScalarType.SFIXED64:case es.ScalarType.SINT64:qt.assert(typeof r=="number"||typeof r=="string"||typeof r=="bigint");let l=QAe.PbLong.from(r);return l.isZero()&&!a?void 0:l.toString();case es.ScalarType.BYTES:return qt.assert(r instanceof Uint8Array),r.byteLength?udt.base64encode(r):a?"":void 0}}};yT.ReflectionJsonWriter=X3});var CT=I(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.reflectionScalarDefault=void 0;var $i=Hi(),_Ae=fT(),DAe=ad();function ddt(t,e=$i.LongType.STRING){switch(t){case $i.ScalarType.BOOL:return!1;case $i.ScalarType.UINT64:case $i.ScalarType.FIXED64:return _Ae.reflectionLongConvert(DAe.PbULong.ZERO,e);case $i.ScalarType.INT64:case $i.ScalarType.SFIXED64:case $i.ScalarType.SINT64:return _Ae.reflectionLongConvert(DAe.PbLong.ZERO,e);case $i.ScalarType.DOUBLE:case $i.ScalarType.FLOAT:return 0;case $i.ScalarType.BYTES:return new Uint8Array(0);case $i.ScalarType.STRING:return"";default:return 0}}i(ddt,"reflectionScalarDefault");ET.reflectionScalarDefault=ddt});var tV=I(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});IT.ReflectionBinaryReader=void 0;var kAe=EI(),Er=Hi(),RI=fT(),LAe=CT(),eV=class{static{i(this,"ReflectionBinaryReader")}constructor(e){this.info=e}prepare(){var e;if(!this.fieldNoToField){let r=(e=this.info.fields)!==null&&e!==void 0?e:[];this.fieldNoToField=new Map(r.map(n=>[n.no,n]))}}read(e,r,n,s){this.prepare();let o=s===void 0?e.len:e.pos+s;for(;e.pos{"use strict";Object.defineProperty(wT,"__esModule",{value:!0});wT.ReflectionBinaryWriter=void 0;var Ao=EI(),bt=Hi(),vh=Rh(),NI=ad(),rV=class{static{i(this,"ReflectionBinaryWriter")}constructor(e){this.info=e}prepare(){if(!this.fields){let e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort((r,n)=>r.no-n.no)}}write(e,r,n){this.prepare();for(let o of this.fields){let a,c,l=o.repeat,u=o.localName;if(o.oneof){let d=e[o.oneof];if(d.oneofKind!==u)continue;a=d[u],c=!0}else a=e[u],c=!1;switch(o.kind){case"scalar":case"enum":let d=o.kind=="enum"?bt.ScalarType.INT32:o.T;if(l)if(vh.assert(Array.isArray(a)),l==bt.RepeatType.PACKED)this.packed(r,d,o.no,a);else for(let p of a)this.scalar(r,d,o.no,p,!0);else a===void 0?vh.assert(o.opt):this.scalar(r,d,o.no,a,c||o.opt);break;case"message":if(l){vh.assert(Array.isArray(a));for(let p of a)this.message(r,n,o.T(),o.no,p)}else this.message(r,n,o.T(),o.no,a);break;case"map":vh.assert(typeof a=="object"&&a!==null);for(let[p,m]of Object.entries(a))this.mapEntry(r,n,o,p,m);break}}let s=n.writeUnknownFields;s!==!1&&(s===!0?Ao.UnknownFieldHandler.onWrite:s)(this.info.typeName,e,r)}mapEntry(e,r,n,s,o){e.tag(n.no,Ao.WireType.LengthDelimited),e.fork();let a=s;switch(n.K){case bt.ScalarType.INT32:case bt.ScalarType.FIXED32:case bt.ScalarType.UINT32:case bt.ScalarType.SFIXED32:case bt.ScalarType.SINT32:a=Number.parseInt(s);break;case bt.ScalarType.BOOL:vh.assert(s=="true"||s=="false"),a=s=="true";break}switch(this.scalar(e,n.K,1,a,!0),n.V.kind){case"scalar":this.scalar(e,n.V.T,2,o,!0);break;case"enum":this.scalar(e,bt.ScalarType.INT32,2,o,!0);break;case"message":this.message(e,r,n.V.T(),2,o);break}e.join()}message(e,r,n,s,o){o!==void 0&&(n.internalBinaryWrite(o,e.tag(s,Ao.WireType.LengthDelimited).fork(),r),e.join())}scalar(e,r,n,s,o){let[a,c,l]=this.scalarInfo(r,s);(!l||o)&&(e.tag(n,a),e[c](s))}packed(e,r,n,s){if(!s.length)return;vh.assert(r!==bt.ScalarType.BYTES&&r!==bt.ScalarType.STRING),e.tag(n,Ao.WireType.LengthDelimited),e.fork();let[,o]=this.scalarInfo(r);for(let a=0;a{"use strict";Object.defineProperty(ST,"__esModule",{value:!0});ST.reflectionCreate=void 0;var pdt=CT(),mdt=BI();function fdt(t){let e=t.messagePrototype?Object.create(t.messagePrototype):Object.defineProperty({},mdt.MESSAGE_TYPE,{value:t});for(let r of t.fields){let n=r.localName;if(!r.opt)if(r.oneof)e[r.oneof]={oneofKind:void 0};else if(r.repeat)e[n]=[];else switch(r.kind){case"scalar":e[n]=pdt.reflectionScalarDefault(r.T,r.L);break;case"enum":e[n]=0;break;case"map":e[n]={};break}}return e}i(fdt,"reflectionCreate");ST.reflectionCreate=fdt});var oV=I(xT=>{"use strict";Object.defineProperty(xT,"__esModule",{value:!0});xT.reflectionMergePartial=void 0;function Adt(t,e,r){let n,s=r,o;for(let a of t.fields){let c=a.localName;if(a.oneof){let l=s[a.oneof];if(l?.oneofKind==null)continue;if(n=l[c],o=e[a.oneof],o.oneofKind=l.oneofKind,n==null){delete o[c];continue}}else if(n=s[c],o=e,n==null)continue;switch(a.repeat&&(o[c].length=n.length),a.kind){case"scalar":case"enum":if(a.repeat)for(let u=0;u{"use strict";Object.defineProperty(BT,"__esModule",{value:!0});BT.reflectionEquals=void 0;var iV=Hi();function hdt(t,e,r){if(e===r)return!0;if(!e||!r)return!1;for(let n of t.fields){let s=n.localName,o=n.oneof?e[n.oneof][s]:e[s],a=n.oneof?r[n.oneof][s]:r[s];switch(n.kind){case"enum":case"scalar":let c=n.kind=="enum"?iV.ScalarType.INT32:n.T;if(!(n.repeat?OAe(c,o,a):FAe(c,o,a)))return!1;break;case"map":if(!(n.V.kind=="message"?MAe(n.V.T(),bT(o),bT(a)):OAe(n.V.kind=="enum"?iV.ScalarType.INT32:n.V.T,bT(o),bT(a))))return!1;break;case"message":let l=n.T();if(!(n.repeat?MAe(l,o,a):l.equals(o,a)))return!1;break}}return!0}i(hdt,"reflectionEquals");BT.reflectionEquals=hdt;var bT=Object.values;function FAe(t,e,r){if(e===r)return!0;if(t!==iV.ScalarType.BYTES)return!1;let n=e,s=r;if(n.length!==s.length)return!1;for(let o=0;o{"use strict";Object.defineProperty(RT,"__esModule",{value:!0});RT.MessageType=void 0;var gdt=BI(),ydt=Hi(),Edt=J3(),Cdt=K3(),Idt=Z3(),wdt=tV(),Sdt=nV(),xdt=sV(),cV=oV(),bdt=ZN(),UAe=z3(),Bdt=aV(),Rdt=$3(),Ndt=H3(),qAe=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({})),Tdt=qAe[gdt.MESSAGE_TYPE]={},lV=class{static{i(this,"MessageType")}constructor(e,r,n){this.defaultCheckDepth=16,this.typeName=e,this.fields=r.map(ydt.normalizeFieldInfo),this.options=n??{},Tdt.value=this,this.messagePrototype=Object.create(null,qAe),this.refTypeCheck=new Edt.ReflectionTypeCheck(this),this.refJsonReader=new Cdt.ReflectionJsonReader(this),this.refJsonWriter=new Idt.ReflectionJsonWriter(this),this.refBinReader=new wdt.ReflectionBinaryReader(this),this.refBinWriter=new Sdt.ReflectionBinaryWriter(this)}create(e){let r=xdt.reflectionCreate(this);return e!==void 0&&cV.reflectionMergePartial(this,r,e),r}clone(e){let r=this.create();return cV.reflectionMergePartial(this,r,e),r}equals(e,r){return Bdt.reflectionEquals(this,e,r)}is(e,r=this.defaultCheckDepth){return this.refTypeCheck.is(e,r,!1)}isAssignable(e,r=this.defaultCheckDepth){return this.refTypeCheck.is(e,r,!0)}mergePartial(e,r){cV.reflectionMergePartial(this,e,r)}fromBinary(e,r){let n=Ndt.binaryReadOptions(r);return this.internalBinaryRead(n.readerFactory(e),e.byteLength,n)}fromJson(e,r){return this.internalJsonRead(e,UAe.jsonReadOptions(r))}fromJsonString(e,r){let n=JSON.parse(e);return this.fromJson(n,r)}toJson(e,r){return this.internalJsonWrite(e,UAe.jsonWriteOptions(r))}toJsonString(e,r){var n;let s=this.toJson(e,r);return JSON.stringify(s,null,(n=r?.prettySpaces)!==null&&n!==void 0?n:0)}toBinary(e,r){let n=Rdt.binaryWriteOptions(r);return this.internalBinaryWrite(e,n.writerFactory(),n).finish()}internalJsonRead(e,r,n){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let s=n??this.create();return this.refJsonReader.read(e,s,r),s}throw new Error(`Unable to parse message ${this.typeName} from JSON ${bdt.typeofJsonValue(e)}.`)}internalJsonWrite(e,r){return this.refJsonWriter.write(e,r)}internalBinaryWrite(e,r,n){return this.refBinWriter.write(e,r,n),r}internalBinaryRead(e,r,n,s){let o=s??this.create();return this.refBinReader.read(e,o,n,r),o}};RT.MessageType=lV});var HAe=I(NT=>{"use strict";Object.defineProperty(NT,"__esModule",{value:!0});NT.containsMessageType=void 0;var vdt=BI();function Pdt(t){return t[vdt.MESSAGE_TYPE]!=null}i(Pdt,"containsMessageType");NT.containsMessageType=Pdt});var zAe=I(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.listEnumNumbers=Ac.listEnumNames=Ac.listEnumValues=Ac.isEnumObject=void 0;function $Ae(t){if(typeof t!="object"||t===null||!t.hasOwnProperty(0))return!1;for(let e of Object.keys(t)){let r=parseInt(e);if(Number.isNaN(r)){let n=t[e];if(n===void 0||typeof n!="number"||t[n]===void 0)return!1}else{let n=t[r];if(n===void 0||t[n]!==r)return!1}}return!0}i($Ae,"isEnumObject");Ac.isEnumObject=$Ae;function uV(t){if(!$Ae(t))throw new Error("not a typescript enum object");let e=[];for(let[r,n]of Object.entries(t))typeof n=="number"&&e.push({name:r,number:n});return e}i(uV,"listEnumValues");Ac.listEnumValues=uV;function Qdt(t){return uV(t).map(e=>e.name)}i(Qdt,"listEnumNames");Ac.listEnumNames=Qdt;function _dt(t){return uV(t).map(e=>e.number).filter((e,r,n)=>n.indexOf(e)==r)}i(_dt,"listEnumNumbers");Ac.listEnumNumbers=_dt});var Cr=I(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});var VAe=ZN();Object.defineProperty(me,"typeofJsonValue",{enumerable:!0,get:i(function(){return VAe.typeofJsonValue},"get")});Object.defineProperty(me,"isJsonObject",{enumerable:!0,get:i(function(){return VAe.isJsonObject},"get")});var WAe=tT();Object.defineProperty(me,"base64decode",{enumerable:!0,get:i(function(){return WAe.base64decode},"get")});Object.defineProperty(me,"base64encode",{enumerable:!0,get:i(function(){return WAe.base64encode},"get")});var Ddt=EAe();Object.defineProperty(me,"utf8read",{enumerable:!0,get:i(function(){return Ddt.utf8read},"get")});var dV=EI();Object.defineProperty(me,"WireType",{enumerable:!0,get:i(function(){return dV.WireType},"get")});Object.defineProperty(me,"mergeBinaryOptions",{enumerable:!0,get:i(function(){return dV.mergeBinaryOptions},"get")});Object.defineProperty(me,"UnknownFieldHandler",{enumerable:!0,get:i(function(){return dV.UnknownFieldHandler},"get")});var YAe=H3();Object.defineProperty(me,"BinaryReader",{enumerable:!0,get:i(function(){return YAe.BinaryReader},"get")});Object.defineProperty(me,"binaryReadOptions",{enumerable:!0,get:i(function(){return YAe.binaryReadOptions},"get")});var JAe=$3();Object.defineProperty(me,"BinaryWriter",{enumerable:!0,get:i(function(){return JAe.BinaryWriter},"get")});Object.defineProperty(me,"binaryWriteOptions",{enumerable:!0,get:i(function(){return JAe.binaryWriteOptions},"get")});var jAe=ad();Object.defineProperty(me,"PbLong",{enumerable:!0,get:i(function(){return jAe.PbLong},"get")});Object.defineProperty(me,"PbULong",{enumerable:!0,get:i(function(){return jAe.PbULong},"get")});var pV=z3();Object.defineProperty(me,"jsonReadOptions",{enumerable:!0,get:i(function(){return pV.jsonReadOptions},"get")});Object.defineProperty(me,"jsonWriteOptions",{enumerable:!0,get:i(function(){return pV.jsonWriteOptions},"get")});Object.defineProperty(me,"mergeJsonOptions",{enumerable:!0,get:i(function(){return pV.mergeJsonOptions},"get")});var kdt=BI();Object.defineProperty(me,"MESSAGE_TYPE",{enumerable:!0,get:i(function(){return kdt.MESSAGE_TYPE},"get")});var Ldt=GAe();Object.defineProperty(me,"MessageType",{enumerable:!0,get:i(function(){return Ldt.MessageType},"get")});var bm=Hi();Object.defineProperty(me,"ScalarType",{enumerable:!0,get:i(function(){return bm.ScalarType},"get")});Object.defineProperty(me,"LongType",{enumerable:!0,get:i(function(){return bm.LongType},"get")});Object.defineProperty(me,"RepeatType",{enumerable:!0,get:i(function(){return bm.RepeatType},"get")});Object.defineProperty(me,"normalizeFieldInfo",{enumerable:!0,get:i(function(){return bm.normalizeFieldInfo},"get")});Object.defineProperty(me,"readFieldOptions",{enumerable:!0,get:i(function(){return bm.readFieldOptions},"get")});Object.defineProperty(me,"readFieldOption",{enumerable:!0,get:i(function(){return bm.readFieldOption},"get")});Object.defineProperty(me,"readMessageOption",{enumerable:!0,get:i(function(){return bm.readMessageOption},"get")});var Odt=J3();Object.defineProperty(me,"ReflectionTypeCheck",{enumerable:!0,get:i(function(){return Odt.ReflectionTypeCheck},"get")});var Mdt=sV();Object.defineProperty(me,"reflectionCreate",{enumerable:!0,get:i(function(){return Mdt.reflectionCreate},"get")});var Fdt=CT();Object.defineProperty(me,"reflectionScalarDefault",{enumerable:!0,get:i(function(){return Fdt.reflectionScalarDefault},"get")});var Udt=oV();Object.defineProperty(me,"reflectionMergePartial",{enumerable:!0,get:i(function(){return Udt.reflectionMergePartial},"get")});var qdt=aV();Object.defineProperty(me,"reflectionEquals",{enumerable:!0,get:i(function(){return qdt.reflectionEquals},"get")});var Gdt=tV();Object.defineProperty(me,"ReflectionBinaryReader",{enumerable:!0,get:i(function(){return Gdt.ReflectionBinaryReader},"get")});var Hdt=nV();Object.defineProperty(me,"ReflectionBinaryWriter",{enumerable:!0,get:i(function(){return Hdt.ReflectionBinaryWriter},"get")});var $dt=K3();Object.defineProperty(me,"ReflectionJsonReader",{enumerable:!0,get:i(function(){return $dt.ReflectionJsonReader},"get")});var zdt=Z3();Object.defineProperty(me,"ReflectionJsonWriter",{enumerable:!0,get:i(function(){return zdt.ReflectionJsonWriter},"get")});var Vdt=HAe();Object.defineProperty(me,"containsMessageType",{enumerable:!0,get:i(function(){return Vdt.containsMessageType},"get")});var TI=W3();Object.defineProperty(me,"isOneofGroup",{enumerable:!0,get:i(function(){return TI.isOneofGroup},"get")});Object.defineProperty(me,"setOneofValue",{enumerable:!0,get:i(function(){return TI.setOneofValue},"get")});Object.defineProperty(me,"getOneofValue",{enumerable:!0,get:i(function(){return TI.getOneofValue},"get")});Object.defineProperty(me,"clearOneofValue",{enumerable:!0,get:i(function(){return TI.clearOneofValue},"get")});Object.defineProperty(me,"getSelectedOneofValue",{enumerable:!0,get:i(function(){return TI.getSelectedOneofValue},"get")});var TT=zAe();Object.defineProperty(me,"listEnumValues",{enumerable:!0,get:i(function(){return TT.listEnumValues},"get")});Object.defineProperty(me,"listEnumNames",{enumerable:!0,get:i(function(){return TT.listEnumNames},"get")});Object.defineProperty(me,"listEnumNumbers",{enumerable:!0,get:i(function(){return TT.listEnumNumbers},"get")});Object.defineProperty(me,"isEnumObject",{enumerable:!0,get:i(function(){return TT.isEnumObject},"get")});var Wdt=V3();Object.defineProperty(me,"lowerCamelCase",{enumerable:!0,get:i(function(){return Wdt.lowerCamelCase},"get")});var vI=Rh();Object.defineProperty(me,"assert",{enumerable:!0,get:i(function(){return vI.assert},"get")});Object.defineProperty(me,"assertNever",{enumerable:!0,get:i(function(){return vI.assertNever},"get")});Object.defineProperty(me,"assertInt32",{enumerable:!0,get:i(function(){return vI.assertInt32},"get")});Object.defineProperty(me,"assertUInt32",{enumerable:!0,get:i(function(){return vI.assertUInt32},"get")});Object.defineProperty(me,"assertFloat32",{enumerable:!0,get:i(function(){return vI.assertFloat32},"get")})});var mV=I(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.readServiceOption=hc.readMethodOption=hc.readMethodOptions=hc.normalizeMethodInfo=void 0;var Ydt=Cr();function Jdt(t,e){var r,n,s;let o=t;return o.service=e,o.localName=(r=o.localName)!==null&&r!==void 0?r:Ydt.lowerCamelCase(o.name),o.serverStreaming=!!o.serverStreaming,o.clientStreaming=!!o.clientStreaming,o.options=(n=o.options)!==null&&n!==void 0?n:{},o.idempotency=(s=o.idempotency)!==null&&s!==void 0?s:void 0,o}i(Jdt,"normalizeMethodInfo");hc.normalizeMethodInfo=Jdt;function jdt(t,e,r,n){var s;let o=(s=t.methods.find((a,c)=>a.localName===e||c===e))===null||s===void 0?void 0:s.options;return o&&o[r]?n.fromJson(o[r]):void 0}i(jdt,"readMethodOptions");hc.readMethodOptions=jdt;function Kdt(t,e,r,n){var s;let o=(s=t.methods.find((c,l)=>c.localName===e||l===e))===null||s===void 0?void 0:s.options;if(!o)return;let a=o[r];return a===void 0?a:n?n.fromJson(a):a}i(Kdt,"readMethodOption");hc.readMethodOption=Kdt;function Xdt(t,e,r){let n=t.options;if(!n)return;let s=n[e];return s===void 0?s:r?r.fromJson(s):s}i(Xdt,"readServiceOption");hc.readServiceOption=Xdt});var KAe=I(vT=>{"use strict";Object.defineProperty(vT,"__esModule",{value:!0});vT.ServiceType=void 0;var Zdt=mV(),fV=class{static{i(this,"ServiceType")}constructor(e,r,n){this.typeName=e,this.methods=r.map(s=>Zdt.normalizeMethodInfo(s,this)),this.options=n??{}}};vT.ServiceType=fV});var hV=I(PT=>{"use strict";Object.defineProperty(PT,"__esModule",{value:!0});PT.RpcError=void 0;var AV=class extends Error{static{i(this,"RpcError")}constructor(e,r="UNKNOWN",n){super(e),this.name="RpcError",Object.setPrototypeOf(this,new.target.prototype),this.code=r,this.meta=n??{}}toString(){let e=[this.name+": "+this.message];this.code&&(e.push(""),e.push("Code: "+this.code)),this.serviceName&&this.methodName&&e.push("Method: "+this.serviceName+"/"+this.methodName);let r=Object.entries(this.meta);if(r.length){e.push(""),e.push("Meta:");for(let[n,s]of r)e.push(` ${n}: ${s}`)}return e.join(` -`)}};PT.RpcError=AV});var gV=I(_T=>{"use strict";Object.defineProperty(_T,"__esModule",{value:!0});_T.mergeRpcOptions=void 0;var XAe=Cr();function ept(t,e){if(!e)return t;let r={};QT(t,r),QT(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=XAe.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=XAe.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},QT(t.meta,r.meta),QT(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}i(ept,"mergeRpcOptions");_T.mergeRpcOptions=ept;function QT(t,e){if(!t)return;let r=e;for(let[n,s]of Object.entries(t))s instanceof Date?r[n]=new Date(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}i(QT,"copy")});var EV=I(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.Deferred=Bm.DeferredState=void 0;var gc;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(gc=Bm.DeferredState||(Bm.DeferredState={}));var yV=class{static{i(this,"Deferred")}constructor(e=!0){this._state=gc.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==gc.PENDING)throw new Error(`cannot resolve ${gc[this.state].toLowerCase()}`);this._resolve(e),this._state=gc.RESOLVED}reject(e){if(this.state!==gc.PENDING)throw new Error(`cannot reject ${gc[this.state].toLowerCase()}`);this._reject(e),this._state=gc.REJECTED}resolvePending(e){this._state===gc.PENDING&&this.resolve(e)}rejectPending(e){this._state===gc.PENDING&&this.reject(e)}};Bm.Deferred=yV});var IV=I(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.RpcOutputStreamController=void 0;var ZAe=EV(),Rm=Cr(),CV=class{static{i(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){Rm.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){Rm.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){Rm.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){Rm.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:i(()=>{let e=this._itState;Rm.assert(e,"bad state"),Rm.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new ZAe.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Rm.assert(n.state==ZAe.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};DT.RpcOutputStreamController=CV});var SV=I(Ph=>{"use strict";var tpt=Ph&&Ph.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ph,"__esModule",{value:!0});Ph.UnaryCall=void 0;var wV=class{static{i(this,"UnaryCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return tpt(this,void 0,void 0,function*(){let[e,r,n,s]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:s}})}};Ph.UnaryCall=wV});var bV=I(Qh=>{"use strict";var rpt=Qh&&Qh.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Qh,"__esModule",{value:!0});Qh.ServerStreamingCall=void 0;var xV=class{static{i(this,"ServerStreamingCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.responses=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return rpt(this,void 0,void 0,function*(){let[e,r,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:r,trailers:n}})}};Qh.ServerStreamingCall=xV});var RV=I(_h=>{"use strict";var npt=_h&&_h.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(_h,"__esModule",{value:!0});_h.ClientStreamingCall=void 0;var BV=class{static{i(this,"ClientStreamingCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.requests=n,this.headers=s,this.response=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return npt(this,void 0,void 0,function*(){let[e,r,n,s]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:r,status:n,trailers:s}})}};_h.ClientStreamingCall=BV});var TV=I(Dh=>{"use strict";var spt=Dh&&Dh.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Dh,"__esModule",{value:!0});Dh.DuplexStreamingCall=void 0;var NV=class{static{i(this,"DuplexStreamingCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.requests=n,this.headers=s,this.responses=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return spt(this,void 0,void 0,function*(){let[e,r,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:r,trailers:n}})}};Dh.DuplexStreamingCall=NV});var the=I(Oh=>{"use strict";var opt=Oh&&Oh.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Oh,"__esModule",{value:!0});Oh.TestTransport=void 0;var ei=hV(),kT=Cr(),ehe=IV(),ipt=gV(),apt=SV(),cpt=bV(),lpt=RV(),upt=TV(),Lh=class t{static{i(this,"TestTransport")}constructor(e){this.suppressUncaughtRejections=!0,this.headerDelay=10,this.responseDelay=50,this.betweenResponseDelay=10,this.afterResponseDelay=10,this.data=e??{}}get sentMessages(){return this.lastInput instanceof kh?this.lastInput.sent:typeof this.lastInput=="object"?[this.lastInput.single]:[]}get sendComplete(){return this.lastInput instanceof kh?this.lastInput.completed:typeof this.lastInput=="object"}promiseHeaders(){var e;let r=(e=this.data.headers)!==null&&e!==void 0?e:t.defaultHeaders;return r instanceof ei.RpcError?Promise.reject(r):Promise.resolve(r)}promiseSingleResponse(e){if(this.data.response instanceof ei.RpcError)return Promise.reject(this.data.response);let r;return Array.isArray(this.data.response)?(kT.assert(this.data.response.length>0),r=this.data.response[0]):this.data.response!==void 0?r=this.data.response:r=e.O.create(),kT.assert(e.O.is(r)),Promise.resolve(r)}streamResponses(e,r,n){return opt(this,void 0,void 0,function*(){let s=[];if(this.data.response===void 0)s.push(e.O.create());else if(Array.isArray(this.data.response))for(let o of this.data.response)kT.assert(e.O.is(o)),s.push(o);else this.data.response instanceof ei.RpcError||(kT.assert(e.O.is(this.data.response)),s.push(this.data.response));try{yield Xr(this.responseDelay,n)(void 0)}catch(o){r.notifyError(o);return}if(this.data.response instanceof ei.RpcError){r.notifyError(this.data.response);return}for(let o of s){r.notifyMessage(o);try{yield Xr(this.betweenResponseDelay,n)(void 0)}catch(a){r.notifyError(a);return}}if(this.data.status instanceof ei.RpcError){r.notifyError(this.data.status);return}if(this.data.trailers instanceof ei.RpcError){r.notifyError(this.data.trailers);return}r.notifyComplete()})}promiseStatus(){var e;let r=(e=this.data.status)!==null&&e!==void 0?e:t.defaultStatus;return r instanceof ei.RpcError?Promise.reject(r):Promise.resolve(r)}promiseTrailers(){var e;let r=(e=this.data.trailers)!==null&&e!==void 0?e:t.defaultTrailers;return r instanceof ei.RpcError?Promise.reject(r):Promise.resolve(r)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections)for(let r of e)r.catch(()=>{})}mergeOptions(e){return ipt.mergeRpcOptions({},e)}unary(e,r,n){var s;let o=(s=n.meta)!==null&&s!==void 0?s:{},a=this.promiseHeaders().then(Xr(this.headerDelay,n.abort)),c=a.catch(d=>{}).then(Xr(this.responseDelay,n.abort)).then(d=>this.promiseSingleResponse(e)),l=c.catch(d=>{}).then(Xr(this.afterResponseDelay,n.abort)).then(d=>this.promiseStatus()),u=c.catch(d=>{}).then(Xr(this.afterResponseDelay,n.abort)).then(d=>this.promiseTrailers());return this.maybeSuppressUncaught(l,u),this.lastInput={single:r},new apt.UnaryCall(e,o,r,a,c,l,u)}serverStreaming(e,r,n){var s;let o=(s=n.meta)!==null&&s!==void 0?s:{},a=this.promiseHeaders().then(Xr(this.headerDelay,n.abort)),c=new ehe.RpcOutputStreamController,l=a.then(Xr(this.responseDelay,n.abort)).catch(()=>{}).then(()=>this.streamResponses(e,c,n.abort)).then(Xr(this.afterResponseDelay,n.abort)),u=l.then(()=>this.promiseStatus()),d=l.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(u,d),this.lastInput={single:r},new cpt.ServerStreamingCall(e,o,r,a,c,u,d)}clientStreaming(e,r){var n;let s=(n=r.meta)!==null&&n!==void 0?n:{},o=this.promiseHeaders().then(Xr(this.headerDelay,r.abort)),a=o.catch(u=>{}).then(Xr(this.responseDelay,r.abort)).then(u=>this.promiseSingleResponse(e)),c=a.catch(u=>{}).then(Xr(this.afterResponseDelay,r.abort)).then(u=>this.promiseStatus()),l=a.catch(u=>{}).then(Xr(this.afterResponseDelay,r.abort)).then(u=>this.promiseTrailers());return this.maybeSuppressUncaught(c,l),this.lastInput=new kh(this.data,r.abort),new lpt.ClientStreamingCall(e,s,this.lastInput,o,a,c,l)}duplex(e,r){var n;let s=(n=r.meta)!==null&&n!==void 0?n:{},o=this.promiseHeaders().then(Xr(this.headerDelay,r.abort)),a=new ehe.RpcOutputStreamController,c=o.then(Xr(this.responseDelay,r.abort)).catch(()=>{}).then(()=>this.streamResponses(e,a,r.abort)).then(Xr(this.afterResponseDelay,r.abort)),l=c.then(()=>this.promiseStatus()),u=c.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(l,u),this.lastInput=new kh(this.data,r.abort),new upt.DuplexStreamingCall(e,s,this.lastInput,o,a,l,u)}};Oh.TestTransport=Lh;Lh.defaultHeaders={responseHeader:"test"};Lh.defaultStatus={code:"OK",detail:"all good"};Lh.defaultTrailers={responseTrailer:"test"};function Xr(t,e){return r=>new Promise((n,s)=>{if(e?.aborted)s(new ei.RpcError("user cancel","CANCELLED"));else{let o=setTimeout(()=>n(r),t);e&&e.addEventListener("abort",a=>{clearTimeout(o),s(new ei.RpcError("user cancel","CANCELLED"))})}})}i(Xr,"delay");var kh=class{static{i(this,"TestInputStream")}constructor(e,r){this._completed=!1,this._sent=[],this.data=e,this.abort=r}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof ei.RpcError)return Promise.reject(this.data.inputMessage);let r=this.data.inputMessage===void 0?10:this.data.inputMessage;return Promise.resolve(void 0).then(()=>{this._sent.push(e)}).then(Xr(r,this.abort))}complete(){if(this.data.inputComplete instanceof ei.RpcError)return Promise.reject(this.data.inputComplete);let e=this.data.inputComplete===void 0?10:this.data.inputComplete;return Promise.resolve(void 0).then(()=>{this._completed=!0}).then(Xr(e,this.abort))}}});var rhe=I(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.stackDuplexStreamingInterceptors=ti.stackClientStreamingInterceptors=ti.stackServerStreamingInterceptors=ti.stackUnaryInterceptors=ti.stackIntercept=void 0;var dpt=Cr();function PI(t,e,r,n,s){var o,a,c,l;if(t=="unary"){let u=i((d,p,m)=>e.unary(d,p,m),"tail");for(let d of((o=n.interceptors)!==null&&o!==void 0?o:[]).filter(p=>p.interceptUnary).reverse()){let p=u;u=i((m,f,A)=>d.interceptUnary(p,m,f,A),"tail")}return u(r,s,n)}if(t=="serverStreaming"){let u=i((d,p,m)=>e.serverStreaming(d,p,m),"tail");for(let d of((a=n.interceptors)!==null&&a!==void 0?a:[]).filter(p=>p.interceptServerStreaming).reverse()){let p=u;u=i((m,f,A)=>d.interceptServerStreaming(p,m,f,A),"tail")}return u(r,s,n)}if(t=="clientStreaming"){let u=i((d,p)=>e.clientStreaming(d,p),"tail");for(let d of((c=n.interceptors)!==null&&c!==void 0?c:[]).filter(p=>p.interceptClientStreaming).reverse()){let p=u;u=i((m,f)=>d.interceptClientStreaming(p,m,f),"tail")}return u(r,n)}if(t=="duplex"){let u=i((d,p)=>e.duplex(d,p),"tail");for(let d of((l=n.interceptors)!==null&&l!==void 0?l:[]).filter(p=>p.interceptDuplex).reverse()){let p=u;u=i((m,f)=>d.interceptDuplex(p,m,f),"tail")}return u(r,n)}dpt.assertNever(t)}i(PI,"stackIntercept");ti.stackIntercept=PI;function ppt(t,e,r,n){return PI("unary",t,e,n,r)}i(ppt,"stackUnaryInterceptors");ti.stackUnaryInterceptors=ppt;function mpt(t,e,r,n){return PI("serverStreaming",t,e,n,r)}i(mpt,"stackServerStreamingInterceptors");ti.stackServerStreamingInterceptors=mpt;function fpt(t,e,r){return PI("clientStreaming",t,e,r)}i(fpt,"stackClientStreamingInterceptors");ti.stackClientStreamingInterceptors=fpt;function Apt(t,e,r){return PI("duplex",t,e,r)}i(Apt,"stackDuplexStreamingInterceptors");ti.stackDuplexStreamingInterceptors=Apt});var nhe=I(LT=>{"use strict";Object.defineProperty(LT,"__esModule",{value:!0});LT.ServerCallContextController=void 0;var vV=class{static{i(this,"ServerCallContextController")}constructor(e,r,n,s,o={code:"OK",detail:""}){this._cancelled=!1,this._listeners=[],this.method=e,this.headers=r,this.deadline=n,this.trailers={},this._sendRH=s,this.status=o}notifyCancelled(){if(!this._cancelled){this._cancelled=!0;for(let e of this._listeners)e()}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){let r=this._listeners;return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}};LT.ServerCallContextController=vV});var ohe=I(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});var hpt=KAe();Object.defineProperty(ar,"ServiceType",{enumerable:!0,get:i(function(){return hpt.ServiceType},"get")});var PV=mV();Object.defineProperty(ar,"readMethodOptions",{enumerable:!0,get:i(function(){return PV.readMethodOptions},"get")});Object.defineProperty(ar,"readMethodOption",{enumerable:!0,get:i(function(){return PV.readMethodOption},"get")});Object.defineProperty(ar,"readServiceOption",{enumerable:!0,get:i(function(){return PV.readServiceOption},"get")});var gpt=hV();Object.defineProperty(ar,"RpcError",{enumerable:!0,get:i(function(){return gpt.RpcError},"get")});var ypt=gV();Object.defineProperty(ar,"mergeRpcOptions",{enumerable:!0,get:i(function(){return ypt.mergeRpcOptions},"get")});var Ept=IV();Object.defineProperty(ar,"RpcOutputStreamController",{enumerable:!0,get:i(function(){return Ept.RpcOutputStreamController},"get")});var Cpt=the();Object.defineProperty(ar,"TestTransport",{enumerable:!0,get:i(function(){return Cpt.TestTransport},"get")});var she=EV();Object.defineProperty(ar,"Deferred",{enumerable:!0,get:i(function(){return she.Deferred},"get")});Object.defineProperty(ar,"DeferredState",{enumerable:!0,get:i(function(){return she.DeferredState},"get")});var Ipt=TV();Object.defineProperty(ar,"DuplexStreamingCall",{enumerable:!0,get:i(function(){return Ipt.DuplexStreamingCall},"get")});var wpt=RV();Object.defineProperty(ar,"ClientStreamingCall",{enumerable:!0,get:i(function(){return wpt.ClientStreamingCall},"get")});var Spt=bV();Object.defineProperty(ar,"ServerStreamingCall",{enumerable:!0,get:i(function(){return Spt.ServerStreamingCall},"get")});var xpt=SV();Object.defineProperty(ar,"UnaryCall",{enumerable:!0,get:i(function(){return xpt.UnaryCall},"get")});var QI=rhe();Object.defineProperty(ar,"stackIntercept",{enumerable:!0,get:i(function(){return QI.stackIntercept},"get")});Object.defineProperty(ar,"stackDuplexStreamingInterceptors",{enumerable:!0,get:i(function(){return QI.stackDuplexStreamingInterceptors},"get")});Object.defineProperty(ar,"stackClientStreamingInterceptors",{enumerable:!0,get:i(function(){return QI.stackClientStreamingInterceptors},"get")});Object.defineProperty(ar,"stackServerStreamingInterceptors",{enumerable:!0,get:i(function(){return QI.stackServerStreamingInterceptors},"get")});Object.defineProperty(ar,"stackUnaryInterceptors",{enumerable:!0,get:i(function(){return QI.stackUnaryInterceptors},"get")});var bpt=nhe();Object.defineProperty(ar,"ServerCallContextController",{enumerable:!0,get:i(function(){return bpt.ServerCallContextController},"get")})});var Hh=I((ghr,Whe)=>{"use strict";var _ft="2.0.0",Dft=Number.MAX_SAFE_INTEGER||9007199254740991,kft=16,Lft=250,Oft=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Whe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:kft,MAX_SAFE_BUILD_LENGTH:Lft,MAX_SAFE_INTEGER:Dft,RELEASE_TYPES:Oft,SEMVER_SPEC_VERSION:_ft,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var OI=I((yhr,Yhe)=>{"use strict";var Mft=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Yhe.exports=Mft});var $h=I((Ec,Jhe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:x4,MAX_SAFE_BUILD_LENGTH:Fft,MAX_LENGTH:Uft}=Hh(),qft=OI();Ec=Jhe.exports={};var Gft=Ec.re=[],Hft=Ec.safeRe=[],W=Ec.src=[],$ft=Ec.safeSrc=[],Y=Ec.t={},zft=0,b4="[a-zA-Z0-9-]",Vft=[["\\s",1],["\\d",Uft],[b4,Fft]],Wft=i(t=>{for(let[e,r]of Vft)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),Oe=i((t,e,r)=>{let n=Wft(e),s=zft++;qft(t,s,e),Y[t]=s,W[s]=e,$ft[s]=n,Gft[s]=new RegExp(e,r?"g":void 0),Hft[s]=new RegExp(n,r?"g":void 0)},"createToken");Oe("NUMERICIDENTIFIER","0|[1-9]\\d*");Oe("NUMERICIDENTIFIERLOOSE","\\d+");Oe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${b4}*`);Oe("MAINVERSION",`(${W[Y.NUMERICIDENTIFIER]})\\.(${W[Y.NUMERICIDENTIFIER]})\\.(${W[Y.NUMERICIDENTIFIER]})`);Oe("MAINVERSIONLOOSE",`(${W[Y.NUMERICIDENTIFIERLOOSE]})\\.(${W[Y.NUMERICIDENTIFIERLOOSE]})\\.(${W[Y.NUMERICIDENTIFIERLOOSE]})`);Oe("PRERELEASEIDENTIFIER",`(?:${W[Y.NONNUMERICIDENTIFIER]}|${W[Y.NUMERICIDENTIFIER]})`);Oe("PRERELEASEIDENTIFIERLOOSE",`(?:${W[Y.NONNUMERICIDENTIFIER]}|${W[Y.NUMERICIDENTIFIERLOOSE]})`);Oe("PRERELEASE",`(?:-(${W[Y.PRERELEASEIDENTIFIER]}(?:\\.${W[Y.PRERELEASEIDENTIFIER]})*))`);Oe("PRERELEASELOOSE",`(?:-?(${W[Y.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${W[Y.PRERELEASEIDENTIFIERLOOSE]})*))`);Oe("BUILDIDENTIFIER",`${b4}+`);Oe("BUILD",`(?:\\+(${W[Y.BUILDIDENTIFIER]}(?:\\.${W[Y.BUILDIDENTIFIER]})*))`);Oe("FULLPLAIN",`v?${W[Y.MAINVERSION]}${W[Y.PRERELEASE]}?${W[Y.BUILD]}?`);Oe("FULL",`^${W[Y.FULLPLAIN]}$`);Oe("LOOSEPLAIN",`[v=\\s]*${W[Y.MAINVERSIONLOOSE]}${W[Y.PRERELEASELOOSE]}?${W[Y.BUILD]}?`);Oe("LOOSE",`^${W[Y.LOOSEPLAIN]}$`);Oe("GTLT","((?:<|>)?=?)");Oe("XRANGEIDENTIFIERLOOSE",`${W[Y.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Oe("XRANGEIDENTIFIER",`${W[Y.NUMERICIDENTIFIER]}|x|X|\\*`);Oe("XRANGEPLAIN",`[v=\\s]*(${W[Y.XRANGEIDENTIFIER]})(?:\\.(${W[Y.XRANGEIDENTIFIER]})(?:\\.(${W[Y.XRANGEIDENTIFIER]})(?:${W[Y.PRERELEASE]})?${W[Y.BUILD]}?)?)?`);Oe("XRANGEPLAINLOOSE",`[v=\\s]*(${W[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${W[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${W[Y.XRANGEIDENTIFIERLOOSE]})(?:${W[Y.PRERELEASELOOSE]})?${W[Y.BUILD]}?)?)?`);Oe("XRANGE",`^${W[Y.GTLT]}\\s*${W[Y.XRANGEPLAIN]}$`);Oe("XRANGELOOSE",`^${W[Y.GTLT]}\\s*${W[Y.XRANGEPLAINLOOSE]}$`);Oe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${x4}})(?:\\.(\\d{1,${x4}}))?(?:\\.(\\d{1,${x4}}))?`);Oe("COERCE",`${W[Y.COERCEPLAIN]}(?:$|[^\\d])`);Oe("COERCEFULL",W[Y.COERCEPLAIN]+`(?:${W[Y.PRERELEASE]})?(?:${W[Y.BUILD]})?(?:$|[^\\d])`);Oe("COERCERTL",W[Y.COERCE],!0);Oe("COERCERTLFULL",W[Y.COERCEFULL],!0);Oe("LONETILDE","(?:~>?)");Oe("TILDETRIM",`(\\s*)${W[Y.LONETILDE]}\\s+`,!0);Ec.tildeTrimReplace="$1~";Oe("TILDE",`^${W[Y.LONETILDE]}${W[Y.XRANGEPLAIN]}$`);Oe("TILDELOOSE",`^${W[Y.LONETILDE]}${W[Y.XRANGEPLAINLOOSE]}$`);Oe("LONECARET","(?:\\^)");Oe("CARETTRIM",`(\\s*)${W[Y.LONECARET]}\\s+`,!0);Ec.caretTrimReplace="$1^";Oe("CARET",`^${W[Y.LONECARET]}${W[Y.XRANGEPLAIN]}$`);Oe("CARETLOOSE",`^${W[Y.LONECARET]}${W[Y.XRANGEPLAINLOOSE]}$`);Oe("COMPARATORLOOSE",`^${W[Y.GTLT]}\\s*(${W[Y.LOOSEPLAIN]})$|^$`);Oe("COMPARATOR",`^${W[Y.GTLT]}\\s*(${W[Y.FULLPLAIN]})$|^$`);Oe("COMPARATORTRIM",`(\\s*)${W[Y.GTLT]}\\s*(${W[Y.LOOSEPLAIN]}|${W[Y.XRANGEPLAIN]})`,!0);Ec.comparatorTrimReplace="$1$2$3";Oe("HYPHENRANGE",`^\\s*(${W[Y.XRANGEPLAIN]})\\s+-\\s+(${W[Y.XRANGEPLAIN]})\\s*$`);Oe("HYPHENRANGELOOSE",`^\\s*(${W[Y.XRANGEPLAINLOOSE]})\\s+-\\s+(${W[Y.XRANGEPLAINLOOSE]})\\s*$`);Oe("STAR","(<|>)?=?\\s*\\*");Oe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Oe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ev=I((Chr,jhe)=>{"use strict";var Yft=Object.freeze({loose:!0}),Jft=Object.freeze({}),jft=i(t=>t?typeof t!="object"?Yft:t:Jft,"parseOptions");jhe.exports=jft});var B4=I((whr,Zhe)=>{"use strict";var Khe=/^[0-9]+$/,Xhe=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:tXhe(e,t),"rcompareIdentifiers");Zhe.exports={compareIdentifiers:Xhe,rcompareIdentifiers:Kft}});var ln=I((xhr,tge)=>{"use strict";var tv=OI(),{MAX_LENGTH:ege,MAX_SAFE_INTEGER:rv}=Hh(),{safeRe:nv,t:sv}=$h(),Xft=ev(),{compareIdentifiers:R4}=B4(),Zft=i((t,e)=>{let r=e.split(".");if(r.length>t.length)return!1;for(let n=0;nege)throw new TypeError(`version is longer than ${ege} characters`);tv("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?nv[sv.LOOSE]:nv[sv.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>rv||this.major<0)throw new TypeError("Invalid major version");if(this.minor>rv||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>rv||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&oe.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(tv("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return R4(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(tv("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return R4(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?nv[sv.PRERELEASELOOSE]:nv[sv.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];if(n===!1&&(o=[r]),Zft(this.prerelease,r)){let a=this.prerelease[r.split(".").length];isNaN(a)&&(this.prerelease=o)}else this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};tge.exports=N4});var md=I((Bhr,nge)=>{"use strict";var rge=ln(),eAt=i((t,e,r=!1)=>{if(t instanceof rge)return t;try{return new rge(t,e)}catch(n){if(!r)return null;throw n}},"parse");nge.exports=eAt});var oge=I((Nhr,sge)=>{"use strict";var tAt=md(),rAt=i((t,e)=>{let r=tAt(t,e);return r?r.version:null},"valid");sge.exports=rAt});var age=I((vhr,ige)=>{"use strict";var nAt=md(),sAt=i((t,e)=>{let r=nAt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");ige.exports=sAt});var uge=I((Qhr,lge)=>{"use strict";var cge=ln(),oAt=i((t,e,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new cge(t instanceof cge?t.version:t,r).inc(e,n,s).version}catch{return null}},"inc");lge.exports=oAt});var mge=I((Dhr,pge)=>{"use strict";var dge=md(),iAt=i((t,e)=>{let r=dge(t,null,!0),n=dge(e,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,a=o?r:n,c=o?n:r,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"},"diff");pge.exports=iAt});var Age=I((Lhr,fge)=>{"use strict";var aAt=ln(),cAt=i((t,e)=>new aAt(t,e).major,"major");fge.exports=cAt});var gge=I((Mhr,hge)=>{"use strict";var lAt=ln(),uAt=i((t,e)=>new lAt(t,e).minor,"minor");hge.exports=uAt});var Ege=I((Uhr,yge)=>{"use strict";var dAt=ln(),pAt=i((t,e)=>new dAt(t,e).patch,"patch");yge.exports=pAt});var Ige=I((Ghr,Cge)=>{"use strict";var mAt=md(),fAt=i((t,e)=>{let r=mAt(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");Cge.exports=fAt});var ri=I(($hr,Sge)=>{"use strict";var wge=ln(),AAt=i((t,e,r)=>new wge(t,r).compare(new wge(e,r)),"compare");Sge.exports=AAt});var bge=I((Vhr,xge)=>{"use strict";var hAt=ri(),gAt=i((t,e,r)=>hAt(e,t,r),"rcompare");xge.exports=gAt});var Rge=I((Yhr,Bge)=>{"use strict";var yAt=ri(),EAt=i((t,e)=>yAt(t,e,!0),"compareLoose");Bge.exports=EAt});var ov=I((jhr,Tge)=>{"use strict";var Nge=ln(),CAt=i((t,e,r)=>{let n=new Nge(t,r),s=new Nge(e,r);return n.compare(s)||n.compareBuild(s)},"compareBuild");Tge.exports=CAt});var Pge=I((Xhr,vge)=>{"use strict";var IAt=ov(),wAt=i((t,e)=>t.sort((r,n)=>IAt(r,n,e)),"sort");vge.exports=wAt});var _ge=I((egr,Qge)=>{"use strict";var SAt=ov(),xAt=i((t,e)=>t.sort((r,n)=>SAt(n,r,e)),"rsort");Qge.exports=xAt});var MI=I((rgr,Dge)=>{"use strict";var bAt=ri(),BAt=i((t,e,r)=>bAt(t,e,r)>0,"gt");Dge.exports=BAt});var iv=I((sgr,kge)=>{"use strict";var RAt=ri(),NAt=i((t,e,r)=>RAt(t,e,r)<0,"lt");kge.exports=NAt});var T4=I((igr,Lge)=>{"use strict";var TAt=ri(),vAt=i((t,e,r)=>TAt(t,e,r)===0,"eq");Lge.exports=vAt});var v4=I((cgr,Oge)=>{"use strict";var PAt=ri(),QAt=i((t,e,r)=>PAt(t,e,r)!==0,"neq");Oge.exports=QAt});var av=I((ugr,Mge)=>{"use strict";var _At=ri(),DAt=i((t,e,r)=>_At(t,e,r)>=0,"gte");Mge.exports=DAt});var cv=I((pgr,Fge)=>{"use strict";var kAt=ri(),LAt=i((t,e,r)=>kAt(t,e,r)<=0,"lte");Fge.exports=LAt});var P4=I((fgr,Uge)=>{"use strict";var OAt=T4(),MAt=v4(),FAt=MI(),UAt=av(),qAt=iv(),GAt=cv(),HAt=i((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return OAt(t,r,n);case"!=":return MAt(t,r,n);case">":return FAt(t,r,n);case">=":return UAt(t,r,n);case"<":return qAt(t,r,n);case"<=":return GAt(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");Uge.exports=HAt});var Gge=I((hgr,qge)=>{"use strict";var $At=ln(),zAt=md(),{safeRe:lv,t:uv}=$h(),VAt=i((t,e)=>{if(t instanceof $At)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?lv[uv.COERCEFULL]:lv[uv.COERCE]);else{let l=e.includePrerelease?lv[uv.COERCERTLFULL]:lv[uv.COERCERTL],u;for(;(u=l.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return zAt(`${n}.${s}.${o}${a}${c}`,e)},"coerce");qge.exports=VAt});var $ge=I((ygr,Hge)=>{"use strict";var WAt=md(),YAt=Hh(),JAt=ln(),jAt=i((t,e,r)=>{if(!YAt.RELEASE_TYPES.includes(e))return null;let n=KAt(t,r);return n&&XAt(n,e)},"truncate"),KAt=i((t,e)=>{let r=t instanceof JAt?t.version:t;return WAt(r,e)},"cloneInputVersion"),XAt=i((t,e)=>{if(ZAt(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},"doTruncation"),ZAt=i(t=>t.startsWith("pre"),"isPrerelease");Hge.exports=jAt});var Vge=I((Cgr,zge)=>{"use strict";var Q4=class{static{i(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,r)}return this}};zge.exports=Q4});var ni=I((wgr,jge)=>{"use strict";var eht=/\s+/g,_4=class t{static{i(this,"Range")}constructor(e,r){if(r=rht(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof D4)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(eht," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Yge(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&dht(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(uht,"");let n=((this.options.includePrerelease&&cht)|(this.options.loose&&lht))+":"+e,s=Wge.get(n);if(s)return s;let o=this.options.loose,a=o?ns[un.HYPHENRANGELOOSE]:ns[un.HYPHENRANGE];e=e.replace(a,wht(this.options.includePrerelease)),Qt("hyphen replace",e),e=e.replace(ns[un.COMPARATORTRIM],oht),Qt("comparator trim",e),e=e.replace(ns[un.TILDETRIM],iht),Qt("tilde trim",e),e=e.replace(ns[un.CARETTRIM],aht),Qt("caret trim",e);let c=e.split(" ").map(p=>pht(p,this.options)).join(" ").split(/\s+/).map(p=>Iht(p,this.options));o&&(c=c.filter(p=>(Qt("loose invalid filter",p,this.options),!!p.match(ns[un.COMPARATORLOOSE])))),Qt("range list",c);let l=new Map,u=c.map(p=>new D4(p,this.options));for(let p of u){if(Yge(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return Wge.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Jge(n,r)&&e.set.some(s=>Jge(s,r)&&n.every(o=>s.every(a=>o.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new nht(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),dht=i(t=>t.value==="","isAny"),Jge=i((t,e)=>{let r=!0,n=t.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,e)),s=n.pop();return r},"isSatisfiable"),pht=i((t,e)=>(t=t.replace(ns[un.BUILD],""),Qt("comp",t,e),t=hht(t,e),Qt("caret",t),t=fht(t,e),Qt("tildes",t),t=yht(t,e),Qt("xrange",t),t=Cht(t,e),Qt("stars",t),t),"parseComparator"),qr=i(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),mht=i((t,e,r)=>qr(t)&&!qr(e)||qr(e)&&r&&!qr(r),"invalidXRangeOrder"),fht=i((t,e)=>t.trim().split(/\s+/).map(r=>Aht(r,e)).join(" "),"replaceTildes"),Aht=i((t,e)=>{let r=e.loose?ns[un.TILDELOOSE]:ns[un.TILDE],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{Qt("tilde",t,s,o,a,c,l);let u;return qr(o)?u="":qr(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:qr(c)?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:l?(Qt("replaceTilde pr",l),u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`):u=`>=${o}.${a}.${c} <${o}.${+a+1}.0-0`,Qt("tilde return",u),u})},"replaceTilde"),hht=i((t,e)=>t.trim().split(/\s+/).map(r=>ght(r,e)).join(" "),"replaceCarets"),ght=i((t,e)=>{Qt("caret",t,e);let r=e.loose?ns[un.CARETLOOSE]:ns[un.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{Qt("caret",t,s,o,a,c,l);let u;return qr(o)?u="":qr(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:qr(c)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:l?(Qt("replaceCaret pr",l),o==="0"?a==="0"?u=`>=${o}.${a}.${c}-${l} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c}-${l} <${+o+1}.0.0-0`):(Qt("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${c} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`),Qt("caret return",u),u})},"replaceCaret"),yht=i((t,e)=>(Qt("replaceXRanges",t,e),t.split(/\s+/).map(r=>Eht(r,e)).join(" ")),"replaceXRanges"),Eht=i((t,e)=>{t=t.trim();let r=e.loose?ns[un.XRANGELOOSE]:ns[un.XRANGE];return t.replace(r,(n,s,o,a,c,l)=>{if(Qt("xRange",t,n,s,o,a,c,l),mht(o,a,c))return t;let u=qr(o),d=u||qr(a),p=d||qr(c),m=p;return s==="="&&m&&(s=""),l=e.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(d&&(a=0),c=0,s===">"?(s=">=",d?(o=+o+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",d?o=+o+1:a=+a+1),s==="<"&&(l="-0"),n=`${s+o}.${a}.${c}${l}`):d?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),Qt("xRange return",n),n})},"replaceXRange"),Cht=i((t,e)=>(Qt("replaceStars",t,e),t.trim().replace(ns[un.STAR],"")),"replaceStars"),Iht=i((t,e)=>(Qt("replaceGTE0",t,e),t.trim().replace(ns[e.includePrerelease?un.GTE0PRE:un.GTE0],"")),"replaceGTE0"),wht=i(t=>(e,r,n,s,o,a,c,l,u,d,p,m)=>(qr(n)?r="":qr(s)?r=`>=${n}.0.0${t?"-0":""}`:qr(o)?r=`>=${n}.${s}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,qr(u)?l="":qr(d)?l=`<${+u+1}.0.0-0`:qr(p)?l=`<${u}.${+d+1}.0-0`:m?l=`<=${u}.${d}.${p}-${m}`:t?l=`<${u}.${d}.${+p+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),"hyphenReplace"),Sht=i((t,e,r)=>{for(let n=0;n0){let s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0},"testSet")});var FI=I((xgr,rye)=>{"use strict";var UI=Symbol("SemVer ANY"),O4=class t{static{i(this,"Comparator")}static get ANY(){return UI}constructor(e,r){if(r=Kge(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),L4("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===UI?this.value="":this.value=this.operator+this.semver.version,L4("comp",this)}parse(e){let r=this.options.loose?Xge[Zge.COMPARATORLOOSE]:Xge[Zge.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new eye(n[2],this.options.loose):this.semver=UI}toString(){return this.value}test(e){if(L4("Comparator.test",e,this.options.loose),this.semver===UI||e===UI)return!0;if(typeof e=="string")try{e=new eye(e,this.options)}catch{return!1}return k4(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new tye(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new tye(this.value,r).test(e.semver):(r=Kge(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||k4(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||k4(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};rye.exports=O4;var Kge=ev(),{safeRe:Xge,t:Zge}=$h(),k4=P4(),L4=OI(),eye=ln(),tye=ni()});var qI=I((Bgr,nye)=>{"use strict";var xht=ni(),bht=i((t,e,r)=>{try{e=new xht(e,r)}catch{return!1}return e.test(t)},"satisfies");nye.exports=bht});var oye=I((Ngr,sye)=>{"use strict";var Bht=ni(),Rht=i((t,e)=>new Bht(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");sye.exports=Rht});var aye=I((vgr,iye)=>{"use strict";var Nht=ln(),Tht=ni(),vht=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Tht(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Nht(n,r))}),n},"maxSatisfying");iye.exports=vht});var lye=I((Qgr,cye)=>{"use strict";var Pht=ln(),Qht=ni(),_ht=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Qht(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new Pht(n,r))}),n},"minSatisfying");cye.exports=_ht});var pye=I((Dgr,dye)=>{"use strict";var M4=ln(),Dht=ni(),uye=MI(),kht=i((t,e)=>{t=new Dht(t,e);let r=new M4("0.0.0");if(t.test(r)||(r=new M4("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let c=new M4(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||uye(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||uye(r,o))&&(r=o)}return r&&t.test(r)?r:null},"minVersion");dye.exports=kht});var fye=I((Lgr,mye)=>{"use strict";var Lht=ni(),Oht=i((t,e)=>{try{return new Lht(t,e).range||"*"}catch{return null}},"validRange");mye.exports=Oht});var dv=I((Mgr,yye)=>{"use strict";var Mht=ln(),gye=FI(),{ANY:Fht}=gye,Uht=ni(),qht=qI(),Aye=MI(),hye=iv(),Ght=cv(),Hht=av(),$ht=i((t,e,r,n)=>{t=new Mht(t,n),e=new Uht(e,n);let s,o,a,c,l;switch(r){case">":s=Aye,o=Ght,a=hye,c=">",l=">=";break;case"<":s=hye,o=Hht,a=Aye,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(qht(t,e,n))return!1;for(let u=0;u{f.semver===Fht&&(f=new gye(">=0.0.0")),p=p||f,m=m||f,s(f.semver,p.semver,n)?p=f:a(f.semver,m.semver,n)&&(m=f)}),p.operator===c||p.operator===l||(!m.operator||m.operator===c)&&o(t,m.semver))return!1;if(m.operator===l&&a(t,m.semver))return!1}return!0},"outside");yye.exports=$ht});var Cye=I((Ugr,Eye)=>{"use strict";var zht=dv(),Vht=i((t,e,r)=>zht(t,e,">",r),"gtr");Eye.exports=Vht});var wye=I((Ggr,Iye)=>{"use strict";var Wht=dv(),Yht=i((t,e,r)=>Wht(t,e,"<",r),"ltr");Iye.exports=Yht});var bye=I(($gr,xye)=>{"use strict";var Sye=ni(),Jht=i((t,e,r)=>(t=new Sye(t,r),e=new Sye(e,r),t.intersects(e,r)),"intersects");xye.exports=Jht});var Rye=I((Vgr,Bye)=>{"use strict";var jht=qI(),Kht=ri();Bye.exports=(t,e,r)=>{let n=[],s=null,o=null,a=t.sort((d,p)=>Kht(d,p,r));for(let d of a)jht(d,e,r)?(o=d,s||(s=d)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let c=[];for(let[d,p]of n)d===p?c.push(d):!p&&d===a[0]?c.push("*"):p?d===a[0]?c.push(`<=${p}`):c.push(`${d} - ${p}`):c.push(`>=${d}`);let l=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{"use strict";var Nye=ni(),q4=FI(),{ANY:F4}=q4,U4=qI(),G4=ri(),Xht=i((t,e,r={})=>{if(t===e)return!0;t=new Nye(t,r),e=new Nye(e,r);let n=!1;e:for(let s of t.set){for(let o of e.set){let a=egt(s,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},"subset"),Zht=[new q4(">=0.0.0-0")],Tye=[new q4(">=0.0.0")],egt=i((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===F4){if(e.length===1&&e[0].semver===F4)return!0;r.includePrerelease?t=Zht:t=Tye}if(e.length===1&&e[0].semver===F4){if(r.includePrerelease)return!0;e=Tye}let n=new Set,s,o;for(let f of t)f.operator===">"||f.operator===">="?s=vye(s,f,r):f.operator==="<"||f.operator==="<="?o=Pye(o,f,r):n.add(f.semver);if(n.size>1)return null;let a;if(s&&o){if(a=G4(s.semver,o.semver,r),a>0)return null;if(a===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(s&&!U4(f,String(s),r)||o&&!U4(f,String(o),r))return null;for(let A of e)if(!U4(f,String(A),r))return!1;return!0}let c,l,u,d,p=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,m=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(d=d||f.operator===">"||f.operator===">=",u=u||f.operator==="<"||f.operator==="<=",s){if(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(c=vye(s,f,r),c===f&&c!==s)return!1}else if(s.operator===">="&&!f.test(s.semver))return!1}if(o){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(l=Pye(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||s)&&a!==0)return!1}return!(s&&u&&!o&&a!==0||o&&d&&!s&&a!==0||m||p)},"simpleSubset"),vye=i((t,e,r)=>{if(!t)return e;let n=G4(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),Pye=i((t,e,r)=>{if(!t)return e;let n=G4(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");Qye.exports=Xht});var Oye=I((Jgr,Lye)=>{"use strict";var H4=$h(),Dye=Hh(),tgt=ln(),kye=B4(),rgt=md(),ngt=oge(),sgt=age(),ogt=uge(),igt=mge(),agt=Age(),cgt=gge(),lgt=Ege(),ugt=Ige(),dgt=ri(),pgt=bge(),mgt=Rge(),fgt=ov(),Agt=Pge(),hgt=_ge(),ggt=MI(),ygt=iv(),Egt=T4(),Cgt=v4(),Igt=av(),wgt=cv(),Sgt=P4(),xgt=Gge(),bgt=$ge(),Bgt=FI(),Rgt=ni(),Ngt=qI(),Tgt=oye(),vgt=aye(),Pgt=lye(),Qgt=pye(),_gt=fye(),Dgt=dv(),kgt=Cye(),Lgt=wye(),Ogt=bye(),Mgt=Rye(),Fgt=_ye();Lye.exports={parse:rgt,valid:ngt,clean:sgt,inc:ogt,diff:igt,major:agt,minor:cgt,patch:lgt,prerelease:ugt,compare:dgt,rcompare:pgt,compareLoose:mgt,compareBuild:fgt,sort:Agt,rsort:hgt,gt:ggt,lt:ygt,eq:Egt,neq:Cgt,gte:Igt,lte:wgt,cmp:Sgt,coerce:xgt,truncate:bgt,Comparator:Bgt,Range:Rgt,satisfies:Ngt,toComparators:Tgt,maxSatisfying:vgt,minSatisfying:Pgt,minVersion:Qgt,validRange:_gt,outside:Dgt,gtr:kgt,ltr:Lgt,intersects:Ogt,simplifyRange:Mgt,subset:Fgt,SemVer:tgt,re:H4.re,src:H4.src,tokens:H4.t,SEMVER_SPEC_VERSION:Dye.SEMVER_SPEC_VERSION,RELEASE_TYPES:Dye.RELEASE_TYPES,compareIdentifiers:kye.compareIdentifiers,rcompareIdentifiers:kye.rcompareIdentifiers}});var tEe=I((Xgr,Wl)=>{var At=require("fs"),fv=require("os"),Gr=require("path"),Mye=require("crypto"),Cc={fs:At.constants,os:fv.constants},Fye="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Hye=/XXXXXX/,Ugt=3,$ye=(Cc.O_CREAT||Cc.fs.O_CREAT)|(Cc.O_EXCL||Cc.fs.O_EXCL)|(Cc.O_RDWR||Cc.fs.O_RDWR),qgt=fv.platform()==="win32",Ggt=Cc.EBADF||Cc.os.errno.EBADF,Hgt=Cc.ENOENT||Cc.os.errno.ENOENT,zye=448,Vye=384,$gt="exit",zh=[],Wye=At.rmdirSync.bind(At),Yye=!1;function zgt(t,e){return At.rm(t,{recursive:!0},e)}i(zgt,"rimraf");function Jye(t){return At.rmSync(t,{recursive:!0})}i(Jye,"FN_RIMRAF_SYNC");function W4(t,e){let r=Vh(t,e),n=r[0],s=r[1];tyt(n,function(o,a){if(o)return s(o);let c=a.tries;i((function l(){try{let u=Kye(a);At.stat(u,function(d){if(!d)return c-- >0?l():s(new Error("Could not get a unique tmp filename, max tries reached "+u));s(null,u)})}catch(u){s(u)}}),"_getUniqueName")()})}i(W4,"tmpName");function Y4(t){let e=Vh(t),r=e[0],n=ryt(r),s=n.tries;do{let o=Kye(n);try{At.statSync(o)}catch{return o}}while(s-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}i(Y4,"tmpNameSync");function Vgt(t,e){let r=Vh(t,e),n=r[0],s=r[1];W4(n,i(function(a,c){if(a)return s(a);At.open(c,$ye,n.mode||Vye,i(function(u,d){if(u)return s(u);if(n.discardDescriptor)return At.close(d,i(function(m){return s(m,c,void 0,z4(c,-1,n,!1))},"_discardCallback"));{let p=n.discardDescriptor||n.detachDescriptor;s(null,c,d,z4(c,p?-1:d,n,!1))}},"_fileCreated"))},"_tmpNameCreated"))}i(Vgt,"file");function Wgt(t){let e=Vh(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,s=Y4(r),o=At.openSync(s,$ye,r.mode||Vye);return r.discardDescriptor&&(At.closeSync(o),o=void 0),{name:s,fd:o,removeCallback:z4(s,n?-1:o,r,!0)}}i(Wgt,"fileSync");function Ygt(t,e){let r=Vh(t,e),n=r[0],s=r[1];W4(n,i(function(a,c){if(a)return s(a);At.mkdir(c,n.mode||zye,i(function(u){if(u)return s(u);s(null,c,jye(c,n,!1))},"_dirCreated"))},"_tmpNameCreated"))}i(Ygt,"dir");function Jgt(t){let e=Vh(t),r=e[0],n=Y4(r);return At.mkdirSync(n,r.mode||zye),{name:n,removeCallback:jye(n,r,!0)}}i(Jgt,"dirSync");function jgt(t,e){let r=i(function(n){if(n&&!V4(n))return e(n);e()},"_handler");0<=t[0]?At.close(t[0],function(){At.unlink(t[1],r)}):At.unlink(t[1],r)}i(jgt,"_removeFileAsync");function Kgt(t){let e=null;try{0<=t[0]&&At.closeSync(t[0])}catch(r){if(!nyt(r)&&!V4(r))throw r}finally{try{At.unlinkSync(t[1])}catch(r){V4(r)||(e=r)}}if(e!==null)throw e}i(Kgt,"_removeFileSync");function z4(t,e,r,n){let s=mv(Kgt,[e,t],n),o=mv(jgt,[e,t],n,s);return r.keep||zh.unshift(s),n?s:o}i(z4,"_prepareTmpFileRemoveCallback");function jye(t,e,r){let n=e.unsafeCleanup?zgt:At.rmdir.bind(At),s=e.unsafeCleanup?Jye:Wye,o=mv(s,t,r),a=mv(n,t,r,o);return e.keep||zh.unshift(o),r?o:a}i(jye,"_prepareTmpDirRemoveCallback");function mv(t,e,r,n){let s=!1;return i(function o(a){if(!s){let c=n||o,l=zh.indexOf(c);return l>=0&&zh.splice(l,1),s=!0,r||t===Wye||t===Jye?t(e):t(e,a||function(){})}},"_cleanupCallback")}i(mv,"_prepareRemoveCallback");function Xgt(){if(Yye)for(;zh.length;)try{zh[0]()}catch{}}i(Xgt,"_garbageCollector");function Uye(t){let e=[],r=null;try{r=Mye.randomBytes(t)}catch{r=Mye.pseudoRandomBytes(t)}for(let n=0;n"u"}i(Ds,"_isUndefined");function Vh(t,e){if(typeof t=="function")return[{},t];if(Ds(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}i(Vh,"_parseArguments");function Zgt(t,e,r){let n=Gr.isAbsolute(t)?t:Gr.join(e,t);At.stat(n,function(s){s?At.realpath(Gr.dirname(n),function(o,a){if(o)return r(o);r(null,Gr.join(a,Gr.basename(n)))}):At.realpath(n,r)})}i(Zgt,"_resolvePath");function eyt(t,e){let r=Gr.isAbsolute(t)?t:Gr.join(e,t);try{return At.statSync(r),At.realpathSync(r)}catch{let s=At.realpathSync(Gr.dirname(r));return Gr.join(s,Gr.basename(r))}}i(eyt,"_resolvePathSync");function Kye(t){let e=t.tmpdir;if(!Ds(t.name))return Gr.join(e,t.dir,t.name);if(!Ds(t.template))return Gr.join(e,t.dir,t.template).replace(Hye,Uye(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",Uye(12),t.postfix?"-"+t.postfix:""].join("");return Gr.join(e,t.dir,r)}i(Kye,"_generateTmpName");function $4(t,e){if(typeof e!="string")throw new Error(`${t} option must be a string, got "${typeof e}".`);if(e.includes(".."))throw new Error("Relative value not allowed");return e}i($4,"_assertPath");function Xye(t){if(!Ds(t.name)){let e=t.name;if(Gr.isAbsolute(e))throw new Error(`name option must not contain an absolute path, found "${e}".`);let r=Gr.basename(e);if(r===".."||r==="."||r!==e)throw new Error(`name option must not contain a path, found "${e}".`)}if(!Ds(t.template)){if(typeof t.template!="string")throw new Error(`template option must be a string, got "${typeof t.template}".`);if(!t.template.match(Hye))throw new Error(`Invalid template, found "${t.template}".`)}if(!Ds(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=Ds(t.name)?t.tries||Ugt:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.prefix=Ds(t.prefix)?"":$4("prefix",t.prefix),t.postfix=Ds(t.postfix)?"":$4("postfix",t.postfix),t.template=Ds(t.template)?void 0:$4("template",t.template)}i(Xye,"_assertOptionsBase");function qye(t,e,r,n){if(Ds(e))return n(null);Zgt(e,r,function(s,o){if(s)return n(s);let a=Gr.relative(r,o);if(a.startsWith("..")||Gr.isAbsolute(a))return n(new Error(`${t} option must be relative to "${r}", found "${a}".`));n(null,a)})}i(qye,"_getRelativePath");function Gye(t,e,r){if(Ds(e))return;let n=eyt(e,r),s=Gr.relative(r,n);if(s.startsWith("..")||Gr.isAbsolute(s))throw new Error(`${t} option must be relative to "${r}", found "${s}".`);return s}i(Gye,"_getRelativePathSync");function tyt(t,e){oyt(t,function(r,n){if(r)return e(r);t.tmpdir=n;try{Xye(t,n)}catch(s){return e(s)}qye("dir",t.dir,n,function(s,o){if(s)return e(s);t.dir=Ds(o)?"":o,qye("template",t.template,n,function(a,c){if(a)return e(a);t.template=c,e(null,t)})})})}i(tyt,"_assertAndSanitizeOptions");function ryt(t){let e=t.tmpdir=eEe(t);Xye(t,e);let r=Gye("dir",t.dir,e);return t.dir=Ds(r)?"":r,t.template=Gye("template",t.template,e),t}i(ryt,"_assertAndSanitizeOptionsSync");function nyt(t){return Zye(t,-Ggt,"EBADF")}i(nyt,"_isEBADF");function V4(t){return Zye(t,-Hgt,"ENOENT")}i(V4,"_isENOENT");function Zye(t,e,r){return qgt?t.code===r:t.code===r&&t.errno===e}i(Zye,"_isExpectedError");function syt(){Yye=!0}i(syt,"setGracefulCleanup");function oyt(t,e){return At.realpath(t&&t.tmpdir||fv.tmpdir(),e)}i(oyt,"_getTmpDir");function eEe(t){return At.realpathSync(t&&t.tmpdir||fv.tmpdir())}i(eEe,"_getTmpDirSync");process.addListener($gt,Xgt);Object.defineProperty(Wl.exports,"tmpdir",{enumerable:!0,configurable:!1,get:i(function(){return eEe()},"get")});Wl.exports.dir=Ygt;Wl.exports.dirSync=Jgt;Wl.exports.file=Vgt;Wl.exports.fileSync=Wgt;Wl.exports.tmpName=W4;Wl.exports.tmpNameSync=Y4;Wl.exports.setGracefulCleanup=syt});var ss=I(yo=>{"use strict";yo.__esModule=!0;yo.extend=oEe;yo.indexOf=uyt;yo.escapeExpression=dyt;yo.isEmpty=pyt;yo.createFrame=myt;yo.blockParams=fyt;yo.appendContextPath=Ayt;var iyt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},ayt=/[&<>"'`=]/g,cyt=/[&<>"'`=]/;function lyt(t){return iyt[t]}i(lyt,"escapeChar");function oEe(t){for(var e=1;e{"use strict";hv.__esModule=!0;var X4=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Z4(t,e){var r=e&&e.loc,n=void 0,s=void 0,o=void 0,a=void 0;r&&(n=r.start.line,s=r.end.line,o=r.start.column,a=r.end.column,t+=" - "+n+":"+o);for(var c=Error.prototype.constructor.call(this,t),l=0;l{"use strict";gv.__esModule=!0;var eW=ss();gv.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,s=r.fn;if(e===!0)return s(this);if(e===!1||e==null)return n(this);if(eW.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=eW.createFrame(r.data);o.contextPath=eW.appendContextPath(r.data.contextPath,r.name),r={data:o}}return s(e,r)})};cEe.exports=gv.default});var dEe=I((yv,uEe)=>{"use strict";yv.__esModule=!0;function hyt(t){return t&&t.__esModule?t:{default:t}}i(hyt,"_interopRequireDefault");var GI=ss(),gyt=Eo(),yyt=hyt(gyt);yv.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new yyt.default("Must pass iterator to #each");var n=r.fn,s=r.inverse,o=0,a="",c=void 0,l=void 0;r.data&&r.ids&&(l=GI.appendContextPath(r.data.contextPath,r.ids[0])+"."),GI.isFunction(e)&&(e=e.call(this)),r.data&&(c=GI.createFrame(r.data));function u(A,h,E){c&&(c.key=A,c.index=h,c.first=h===0,c.last=!!E,l&&(c.contextPath=l+A)),a=a+n(e[A],{data:c,blockParams:GI.blockParams([e[A],A],[l+A,null])})}if(i(u,"execIteration"),e&&typeof e=="object")if(GI.isArray(e))for(var d=e.length;o{"use strict";Ev.__esModule=!0;function Eyt(t){return t&&t.__esModule?t:{default:t}}i(Eyt,"_interopRequireDefault");var Cyt=Eo(),Iyt=Eyt(Cyt);Ev.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Iyt.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};pEe.exports=Ev.default});var gEe=I((Cv,hEe)=>{"use strict";Cv.__esModule=!0;function wyt(t){return t&&t.__esModule?t:{default:t}}i(wyt,"_interopRequireDefault");var fEe=ss(),Syt=Eo(),AEe=wyt(Syt);Cv.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new AEe.default("#if requires exactly one argument");return fEe.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||fEe.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new AEe.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};hEe.exports=Cv.default});var EEe=I((Iv,yEe)=>{"use strict";Iv.__esModule=!0;Iv.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n{"use strict";wv.__esModule=!0;wv.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};CEe.exports=wv.default});var SEe=I((Sv,wEe)=>{"use strict";Sv.__esModule=!0;function xyt(t){return t&&t.__esModule?t:{default:t}}i(xyt,"_interopRequireDefault");var HI=ss(),byt=Eo(),Byt=xyt(byt);Sv.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new Byt.default("#with requires exactly one argument");HI.isFunction(e)&&(e=e.call(this));var n=r.fn;if(HI.isEmpty(e))return r.inverse(this);var s=r.data;return r.data&&r.ids&&(s=HI.createFrame(r.data),s.contextPath=HI.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:s,blockParams:HI.blockParams([e],[s&&s.contextPath])})})};wEe.exports=Sv.default});var tW=I(xv=>{"use strict";xv.__esModule=!0;xv.registerDefaultHelpers=qyt;xv.moveHelperToHooks=Gyt;function km(t){return t&&t.__esModule?t:{default:t}}i(km,"_interopRequireDefault");var Ryt=lEe(),Nyt=km(Ryt),Tyt=dEe(),vyt=km(Tyt),Pyt=mEe(),Qyt=km(Pyt),_yt=gEe(),Dyt=km(_yt),kyt=EEe(),Lyt=km(kyt),Oyt=IEe(),Myt=km(Oyt),Fyt=SEe(),Uyt=km(Fyt);function qyt(t){Nyt.default(t),vyt.default(t),Qyt.default(t),Dyt.default(t),Lyt.default(t),Myt.default(t),Uyt.default(t)}i(qyt,"registerDefaultHelpers");function Gyt(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}i(Gyt,"moveHelperToHooks")});var bEe=I((bv,xEe)=>{"use strict";bv.__esModule=!0;var Hyt=ss();bv.default=function(t){t.registerDecorator("inline",function(e,r,n,s){var o=e;return r.partials||(r.partials={},o=i(function(a,c){var l=n.partials;n.partials=Hyt.extend({},l,r.partials);var u=e(a,c);return n.partials=l,u},"ret")),r.partials[s.args[0]]=s.fn,o})};xEe.exports=bv.default});var BEe=I(rW=>{"use strict";rW.__esModule=!0;rW.registerDefaultDecorators=Wyt;function $yt(t){return t&&t.__esModule?t:{default:t}}i($yt,"_interopRequireDefault");var zyt=bEe(),Vyt=$yt(zyt);function Wyt(t){Vyt.default(t)}i(Wyt,"registerDefaultDecorators")});var nW=I((Bv,REe)=>{"use strict";Bv.__esModule=!0;var Yyt=ss(),Wh={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:i(function(e){if(typeof e=="string"){var r=Yyt.indexOf(Wh.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},"lookupLevel"),log:i(function(e){if(e=Wh.lookupLevel(e),typeof console<"u"&&Wh.lookupLevel(Wh.level)<=e){var r=Wh.methodMap[e];console[r]||(r="log");for(var n=arguments.length,s=Array(n>1?n-1:0),o=1;o{"use strict";$I.__esModule=!0;$I.createProtoAccessControl=Xyt;$I.resultIsAllowed=Zyt;$I.resetLoggedProperties=tEt;function Jyt(t){return t&&t.__esModule?t:{default:t}}i(Jyt,"_interopRequireDefault");var NEe=ss(),jyt=nW(),Kyt=Jyt(jyt),Rv=Object.create(null);function Xyt(t){var e=Object.create(null);e.__proto__=!1,NEe.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,NEe.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}i(Xyt,"createProtoAccessControl");function Zyt(t,e,r){return TEe(typeof t=="function"?e.methods:e.properties,r)}i(Zyt,"resultIsAllowed");function TEe(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(eEt(e),!1)}i(TEe,"checkWhiteList");function eEt(t){Rv[t]!==!0&&(Rv[t]=!0,Kyt.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent. +`)}};PT.RpcError=AV});var gV=I(_T=>{"use strict";Object.defineProperty(_T,"__esModule",{value:!0});_T.mergeRpcOptions=void 0;var XAe=Cr();function ept(t,e){if(!e)return t;let r={};QT(t,r),QT(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=XAe.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=XAe.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},QT(t.meta,r.meta),QT(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}i(ept,"mergeRpcOptions");_T.mergeRpcOptions=ept;function QT(t,e){if(!t)return;let r=e;for(let[n,s]of Object.entries(t))s instanceof Date?r[n]=new Date(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}i(QT,"copy")});var EV=I(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.Deferred=Bm.DeferredState=void 0;var gc;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(gc=Bm.DeferredState||(Bm.DeferredState={}));var yV=class{static{i(this,"Deferred")}constructor(e=!0){this._state=gc.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==gc.PENDING)throw new Error(`cannot resolve ${gc[this.state].toLowerCase()}`);this._resolve(e),this._state=gc.RESOLVED}reject(e){if(this.state!==gc.PENDING)throw new Error(`cannot reject ${gc[this.state].toLowerCase()}`);this._reject(e),this._state=gc.REJECTED}resolvePending(e){this._state===gc.PENDING&&this.resolve(e)}rejectPending(e){this._state===gc.PENDING&&this.reject(e)}};Bm.Deferred=yV});var IV=I(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.RpcOutputStreamController=void 0;var ZAe=EV(),Rm=Cr(),CV=class{static{i(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){Rm.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){Rm.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){Rm.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){Rm.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:i(()=>{let e=this._itState;Rm.assert(e,"bad state"),Rm.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new ZAe.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Rm.assert(n.state==ZAe.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};DT.RpcOutputStreamController=CV});var SV=I(Ph=>{"use strict";var tpt=Ph&&Ph.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ph,"__esModule",{value:!0});Ph.UnaryCall=void 0;var wV=class{static{i(this,"UnaryCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return tpt(this,void 0,void 0,function*(){let[e,r,n,s]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:s}})}};Ph.UnaryCall=wV});var bV=I(Qh=>{"use strict";var rpt=Qh&&Qh.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Qh,"__esModule",{value:!0});Qh.ServerStreamingCall=void 0;var xV=class{static{i(this,"ServerStreamingCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.responses=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return rpt(this,void 0,void 0,function*(){let[e,r,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:r,trailers:n}})}};Qh.ServerStreamingCall=xV});var RV=I(_h=>{"use strict";var npt=_h&&_h.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(_h,"__esModule",{value:!0});_h.ClientStreamingCall=void 0;var BV=class{static{i(this,"ClientStreamingCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.requests=n,this.headers=s,this.response=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return npt(this,void 0,void 0,function*(){let[e,r,n,s]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:r,status:n,trailers:s}})}};_h.ClientStreamingCall=BV});var TV=I(Dh=>{"use strict";var spt=Dh&&Dh.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Dh,"__esModule",{value:!0});Dh.DuplexStreamingCall=void 0;var NV=class{static{i(this,"DuplexStreamingCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.requests=n,this.headers=s,this.responses=o,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return spt(this,void 0,void 0,function*(){let[e,r,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:r,trailers:n}})}};Dh.DuplexStreamingCall=NV});var the=I(Oh=>{"use strict";var opt=Oh&&Oh.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Oh,"__esModule",{value:!0});Oh.TestTransport=void 0;var ei=hV(),kT=Cr(),ehe=IV(),ipt=gV(),apt=SV(),cpt=bV(),lpt=RV(),upt=TV(),Lh=class t{static{i(this,"TestTransport")}constructor(e){this.suppressUncaughtRejections=!0,this.headerDelay=10,this.responseDelay=50,this.betweenResponseDelay=10,this.afterResponseDelay=10,this.data=e??{}}get sentMessages(){return this.lastInput instanceof kh?this.lastInput.sent:typeof this.lastInput=="object"?[this.lastInput.single]:[]}get sendComplete(){return this.lastInput instanceof kh?this.lastInput.completed:typeof this.lastInput=="object"}promiseHeaders(){var e;let r=(e=this.data.headers)!==null&&e!==void 0?e:t.defaultHeaders;return r instanceof ei.RpcError?Promise.reject(r):Promise.resolve(r)}promiseSingleResponse(e){if(this.data.response instanceof ei.RpcError)return Promise.reject(this.data.response);let r;return Array.isArray(this.data.response)?(kT.assert(this.data.response.length>0),r=this.data.response[0]):this.data.response!==void 0?r=this.data.response:r=e.O.create(),kT.assert(e.O.is(r)),Promise.resolve(r)}streamResponses(e,r,n){return opt(this,void 0,void 0,function*(){let s=[];if(this.data.response===void 0)s.push(e.O.create());else if(Array.isArray(this.data.response))for(let o of this.data.response)kT.assert(e.O.is(o)),s.push(o);else this.data.response instanceof ei.RpcError||(kT.assert(e.O.is(this.data.response)),s.push(this.data.response));try{yield Xr(this.responseDelay,n)(void 0)}catch(o){r.notifyError(o);return}if(this.data.response instanceof ei.RpcError){r.notifyError(this.data.response);return}for(let o of s){r.notifyMessage(o);try{yield Xr(this.betweenResponseDelay,n)(void 0)}catch(a){r.notifyError(a);return}}if(this.data.status instanceof ei.RpcError){r.notifyError(this.data.status);return}if(this.data.trailers instanceof ei.RpcError){r.notifyError(this.data.trailers);return}r.notifyComplete()})}promiseStatus(){var e;let r=(e=this.data.status)!==null&&e!==void 0?e:t.defaultStatus;return r instanceof ei.RpcError?Promise.reject(r):Promise.resolve(r)}promiseTrailers(){var e;let r=(e=this.data.trailers)!==null&&e!==void 0?e:t.defaultTrailers;return r instanceof ei.RpcError?Promise.reject(r):Promise.resolve(r)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections)for(let r of e)r.catch(()=>{})}mergeOptions(e){return ipt.mergeRpcOptions({},e)}unary(e,r,n){var s;let o=(s=n.meta)!==null&&s!==void 0?s:{},a=this.promiseHeaders().then(Xr(this.headerDelay,n.abort)),c=a.catch(d=>{}).then(Xr(this.responseDelay,n.abort)).then(d=>this.promiseSingleResponse(e)),l=c.catch(d=>{}).then(Xr(this.afterResponseDelay,n.abort)).then(d=>this.promiseStatus()),u=c.catch(d=>{}).then(Xr(this.afterResponseDelay,n.abort)).then(d=>this.promiseTrailers());return this.maybeSuppressUncaught(l,u),this.lastInput={single:r},new apt.UnaryCall(e,o,r,a,c,l,u)}serverStreaming(e,r,n){var s;let o=(s=n.meta)!==null&&s!==void 0?s:{},a=this.promiseHeaders().then(Xr(this.headerDelay,n.abort)),c=new ehe.RpcOutputStreamController,l=a.then(Xr(this.responseDelay,n.abort)).catch(()=>{}).then(()=>this.streamResponses(e,c,n.abort)).then(Xr(this.afterResponseDelay,n.abort)),u=l.then(()=>this.promiseStatus()),d=l.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(u,d),this.lastInput={single:r},new cpt.ServerStreamingCall(e,o,r,a,c,u,d)}clientStreaming(e,r){var n;let s=(n=r.meta)!==null&&n!==void 0?n:{},o=this.promiseHeaders().then(Xr(this.headerDelay,r.abort)),a=o.catch(u=>{}).then(Xr(this.responseDelay,r.abort)).then(u=>this.promiseSingleResponse(e)),c=a.catch(u=>{}).then(Xr(this.afterResponseDelay,r.abort)).then(u=>this.promiseStatus()),l=a.catch(u=>{}).then(Xr(this.afterResponseDelay,r.abort)).then(u=>this.promiseTrailers());return this.maybeSuppressUncaught(c,l),this.lastInput=new kh(this.data,r.abort),new lpt.ClientStreamingCall(e,s,this.lastInput,o,a,c,l)}duplex(e,r){var n;let s=(n=r.meta)!==null&&n!==void 0?n:{},o=this.promiseHeaders().then(Xr(this.headerDelay,r.abort)),a=new ehe.RpcOutputStreamController,c=o.then(Xr(this.responseDelay,r.abort)).catch(()=>{}).then(()=>this.streamResponses(e,a,r.abort)).then(Xr(this.afterResponseDelay,r.abort)),l=c.then(()=>this.promiseStatus()),u=c.then(()=>this.promiseTrailers());return this.maybeSuppressUncaught(l,u),this.lastInput=new kh(this.data,r.abort),new upt.DuplexStreamingCall(e,s,this.lastInput,o,a,l,u)}};Oh.TestTransport=Lh;Lh.defaultHeaders={responseHeader:"test"};Lh.defaultStatus={code:"OK",detail:"all good"};Lh.defaultTrailers={responseTrailer:"test"};function Xr(t,e){return r=>new Promise((n,s)=>{if(e?.aborted)s(new ei.RpcError("user cancel","CANCELLED"));else{let o=setTimeout(()=>n(r),t);e&&e.addEventListener("abort",a=>{clearTimeout(o),s(new ei.RpcError("user cancel","CANCELLED"))})}})}i(Xr,"delay");var kh=class{static{i(this,"TestInputStream")}constructor(e,r){this._completed=!1,this._sent=[],this.data=e,this.abort=r}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof ei.RpcError)return Promise.reject(this.data.inputMessage);let r=this.data.inputMessage===void 0?10:this.data.inputMessage;return Promise.resolve(void 0).then(()=>{this._sent.push(e)}).then(Xr(r,this.abort))}complete(){if(this.data.inputComplete instanceof ei.RpcError)return Promise.reject(this.data.inputComplete);let e=this.data.inputComplete===void 0?10:this.data.inputComplete;return Promise.resolve(void 0).then(()=>{this._completed=!0}).then(Xr(e,this.abort))}}});var rhe=I(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.stackDuplexStreamingInterceptors=ti.stackClientStreamingInterceptors=ti.stackServerStreamingInterceptors=ti.stackUnaryInterceptors=ti.stackIntercept=void 0;var dpt=Cr();function PI(t,e,r,n,s){var o,a,c,l;if(t=="unary"){let u=i((d,p,m)=>e.unary(d,p,m),"tail");for(let d of((o=n.interceptors)!==null&&o!==void 0?o:[]).filter(p=>p.interceptUnary).reverse()){let p=u;u=i((m,f,A)=>d.interceptUnary(p,m,f,A),"tail")}return u(r,s,n)}if(t=="serverStreaming"){let u=i((d,p,m)=>e.serverStreaming(d,p,m),"tail");for(let d of((a=n.interceptors)!==null&&a!==void 0?a:[]).filter(p=>p.interceptServerStreaming).reverse()){let p=u;u=i((m,f,A)=>d.interceptServerStreaming(p,m,f,A),"tail")}return u(r,s,n)}if(t=="clientStreaming"){let u=i((d,p)=>e.clientStreaming(d,p),"tail");for(let d of((c=n.interceptors)!==null&&c!==void 0?c:[]).filter(p=>p.interceptClientStreaming).reverse()){let p=u;u=i((m,f)=>d.interceptClientStreaming(p,m,f),"tail")}return u(r,n)}if(t=="duplex"){let u=i((d,p)=>e.duplex(d,p),"tail");for(let d of((l=n.interceptors)!==null&&l!==void 0?l:[]).filter(p=>p.interceptDuplex).reverse()){let p=u;u=i((m,f)=>d.interceptDuplex(p,m,f),"tail")}return u(r,n)}dpt.assertNever(t)}i(PI,"stackIntercept");ti.stackIntercept=PI;function ppt(t,e,r,n){return PI("unary",t,e,n,r)}i(ppt,"stackUnaryInterceptors");ti.stackUnaryInterceptors=ppt;function mpt(t,e,r,n){return PI("serverStreaming",t,e,n,r)}i(mpt,"stackServerStreamingInterceptors");ti.stackServerStreamingInterceptors=mpt;function fpt(t,e,r){return PI("clientStreaming",t,e,r)}i(fpt,"stackClientStreamingInterceptors");ti.stackClientStreamingInterceptors=fpt;function Apt(t,e,r){return PI("duplex",t,e,r)}i(Apt,"stackDuplexStreamingInterceptors");ti.stackDuplexStreamingInterceptors=Apt});var nhe=I(LT=>{"use strict";Object.defineProperty(LT,"__esModule",{value:!0});LT.ServerCallContextController=void 0;var vV=class{static{i(this,"ServerCallContextController")}constructor(e,r,n,s,o={code:"OK",detail:""}){this._cancelled=!1,this._listeners=[],this.method=e,this.headers=r,this.deadline=n,this.trailers={},this._sendRH=s,this.status=o}notifyCancelled(){if(!this._cancelled){this._cancelled=!0;for(let e of this._listeners)e()}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){let r=this._listeners;return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}};LT.ServerCallContextController=vV});var ohe=I(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});var hpt=KAe();Object.defineProperty(ar,"ServiceType",{enumerable:!0,get:i(function(){return hpt.ServiceType},"get")});var PV=mV();Object.defineProperty(ar,"readMethodOptions",{enumerable:!0,get:i(function(){return PV.readMethodOptions},"get")});Object.defineProperty(ar,"readMethodOption",{enumerable:!0,get:i(function(){return PV.readMethodOption},"get")});Object.defineProperty(ar,"readServiceOption",{enumerable:!0,get:i(function(){return PV.readServiceOption},"get")});var gpt=hV();Object.defineProperty(ar,"RpcError",{enumerable:!0,get:i(function(){return gpt.RpcError},"get")});var ypt=gV();Object.defineProperty(ar,"mergeRpcOptions",{enumerable:!0,get:i(function(){return ypt.mergeRpcOptions},"get")});var Ept=IV();Object.defineProperty(ar,"RpcOutputStreamController",{enumerable:!0,get:i(function(){return Ept.RpcOutputStreamController},"get")});var Cpt=the();Object.defineProperty(ar,"TestTransport",{enumerable:!0,get:i(function(){return Cpt.TestTransport},"get")});var she=EV();Object.defineProperty(ar,"Deferred",{enumerable:!0,get:i(function(){return she.Deferred},"get")});Object.defineProperty(ar,"DeferredState",{enumerable:!0,get:i(function(){return she.DeferredState},"get")});var Ipt=TV();Object.defineProperty(ar,"DuplexStreamingCall",{enumerable:!0,get:i(function(){return Ipt.DuplexStreamingCall},"get")});var wpt=RV();Object.defineProperty(ar,"ClientStreamingCall",{enumerable:!0,get:i(function(){return wpt.ClientStreamingCall},"get")});var Spt=bV();Object.defineProperty(ar,"ServerStreamingCall",{enumerable:!0,get:i(function(){return Spt.ServerStreamingCall},"get")});var xpt=SV();Object.defineProperty(ar,"UnaryCall",{enumerable:!0,get:i(function(){return xpt.UnaryCall},"get")});var QI=rhe();Object.defineProperty(ar,"stackIntercept",{enumerable:!0,get:i(function(){return QI.stackIntercept},"get")});Object.defineProperty(ar,"stackDuplexStreamingInterceptors",{enumerable:!0,get:i(function(){return QI.stackDuplexStreamingInterceptors},"get")});Object.defineProperty(ar,"stackClientStreamingInterceptors",{enumerable:!0,get:i(function(){return QI.stackClientStreamingInterceptors},"get")});Object.defineProperty(ar,"stackServerStreamingInterceptors",{enumerable:!0,get:i(function(){return QI.stackServerStreamingInterceptors},"get")});Object.defineProperty(ar,"stackUnaryInterceptors",{enumerable:!0,get:i(function(){return QI.stackUnaryInterceptors},"get")});var bpt=nhe();Object.defineProperty(ar,"ServerCallContextController",{enumerable:!0,get:i(function(){return bpt.ServerCallContextController},"get")})});var Hh=I((hhr,Whe)=>{"use strict";var _ft="2.0.0",Dft=Number.MAX_SAFE_INTEGER||9007199254740991,kft=16,Lft=250,Oft=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Whe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:kft,MAX_SAFE_BUILD_LENGTH:Lft,MAX_SAFE_INTEGER:Dft,RELEASE_TYPES:Oft,SEMVER_SPEC_VERSION:_ft,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var OI=I((ghr,Yhe)=>{"use strict";var Mft=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Yhe.exports=Mft});var $h=I((Ec,Jhe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:x4,MAX_SAFE_BUILD_LENGTH:Fft,MAX_LENGTH:Uft}=Hh(),qft=OI();Ec=Jhe.exports={};var Gft=Ec.re=[],Hft=Ec.safeRe=[],W=Ec.src=[],$ft=Ec.safeSrc=[],Y=Ec.t={},zft=0,b4="[a-zA-Z0-9-]",Vft=[["\\s",1],["\\d",Uft],[b4,Fft]],Wft=i(t=>{for(let[e,r]of Vft)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),Oe=i((t,e,r)=>{let n=Wft(e),s=zft++;qft(t,s,e),Y[t]=s,W[s]=e,$ft[s]=n,Gft[s]=new RegExp(e,r?"g":void 0),Hft[s]=new RegExp(n,r?"g":void 0)},"createToken");Oe("NUMERICIDENTIFIER","0|[1-9]\\d*");Oe("NUMERICIDENTIFIERLOOSE","\\d+");Oe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${b4}*`);Oe("MAINVERSION",`(${W[Y.NUMERICIDENTIFIER]})\\.(${W[Y.NUMERICIDENTIFIER]})\\.(${W[Y.NUMERICIDENTIFIER]})`);Oe("MAINVERSIONLOOSE",`(${W[Y.NUMERICIDENTIFIERLOOSE]})\\.(${W[Y.NUMERICIDENTIFIERLOOSE]})\\.(${W[Y.NUMERICIDENTIFIERLOOSE]})`);Oe("PRERELEASEIDENTIFIER",`(?:${W[Y.NONNUMERICIDENTIFIER]}|${W[Y.NUMERICIDENTIFIER]})`);Oe("PRERELEASEIDENTIFIERLOOSE",`(?:${W[Y.NONNUMERICIDENTIFIER]}|${W[Y.NUMERICIDENTIFIERLOOSE]})`);Oe("PRERELEASE",`(?:-(${W[Y.PRERELEASEIDENTIFIER]}(?:\\.${W[Y.PRERELEASEIDENTIFIER]})*))`);Oe("PRERELEASELOOSE",`(?:-?(${W[Y.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${W[Y.PRERELEASEIDENTIFIERLOOSE]})*))`);Oe("BUILDIDENTIFIER",`${b4}+`);Oe("BUILD",`(?:\\+(${W[Y.BUILDIDENTIFIER]}(?:\\.${W[Y.BUILDIDENTIFIER]})*))`);Oe("FULLPLAIN",`v?${W[Y.MAINVERSION]}${W[Y.PRERELEASE]}?${W[Y.BUILD]}?`);Oe("FULL",`^${W[Y.FULLPLAIN]}$`);Oe("LOOSEPLAIN",`[v=\\s]*${W[Y.MAINVERSIONLOOSE]}${W[Y.PRERELEASELOOSE]}?${W[Y.BUILD]}?`);Oe("LOOSE",`^${W[Y.LOOSEPLAIN]}$`);Oe("GTLT","((?:<|>)?=?)");Oe("XRANGEIDENTIFIERLOOSE",`${W[Y.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Oe("XRANGEIDENTIFIER",`${W[Y.NUMERICIDENTIFIER]}|x|X|\\*`);Oe("XRANGEPLAIN",`[v=\\s]*(${W[Y.XRANGEIDENTIFIER]})(?:\\.(${W[Y.XRANGEIDENTIFIER]})(?:\\.(${W[Y.XRANGEIDENTIFIER]})(?:${W[Y.PRERELEASE]})?${W[Y.BUILD]}?)?)?`);Oe("XRANGEPLAINLOOSE",`[v=\\s]*(${W[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${W[Y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${W[Y.XRANGEIDENTIFIERLOOSE]})(?:${W[Y.PRERELEASELOOSE]})?${W[Y.BUILD]}?)?)?`);Oe("XRANGE",`^${W[Y.GTLT]}\\s*${W[Y.XRANGEPLAIN]}$`);Oe("XRANGELOOSE",`^${W[Y.GTLT]}\\s*${W[Y.XRANGEPLAINLOOSE]}$`);Oe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${x4}})(?:\\.(\\d{1,${x4}}))?(?:\\.(\\d{1,${x4}}))?`);Oe("COERCE",`${W[Y.COERCEPLAIN]}(?:$|[^\\d])`);Oe("COERCEFULL",W[Y.COERCEPLAIN]+`(?:${W[Y.PRERELEASE]})?(?:${W[Y.BUILD]})?(?:$|[^\\d])`);Oe("COERCERTL",W[Y.COERCE],!0);Oe("COERCERTLFULL",W[Y.COERCEFULL],!0);Oe("LONETILDE","(?:~>?)");Oe("TILDETRIM",`(\\s*)${W[Y.LONETILDE]}\\s+`,!0);Ec.tildeTrimReplace="$1~";Oe("TILDE",`^${W[Y.LONETILDE]}${W[Y.XRANGEPLAIN]}$`);Oe("TILDELOOSE",`^${W[Y.LONETILDE]}${W[Y.XRANGEPLAINLOOSE]}$`);Oe("LONECARET","(?:\\^)");Oe("CARETTRIM",`(\\s*)${W[Y.LONECARET]}\\s+`,!0);Ec.caretTrimReplace="$1^";Oe("CARET",`^${W[Y.LONECARET]}${W[Y.XRANGEPLAIN]}$`);Oe("CARETLOOSE",`^${W[Y.LONECARET]}${W[Y.XRANGEPLAINLOOSE]}$`);Oe("COMPARATORLOOSE",`^${W[Y.GTLT]}\\s*(${W[Y.LOOSEPLAIN]})$|^$`);Oe("COMPARATOR",`^${W[Y.GTLT]}\\s*(${W[Y.FULLPLAIN]})$|^$`);Oe("COMPARATORTRIM",`(\\s*)${W[Y.GTLT]}\\s*(${W[Y.LOOSEPLAIN]}|${W[Y.XRANGEPLAIN]})`,!0);Ec.comparatorTrimReplace="$1$2$3";Oe("HYPHENRANGE",`^\\s*(${W[Y.XRANGEPLAIN]})\\s+-\\s+(${W[Y.XRANGEPLAIN]})\\s*$`);Oe("HYPHENRANGELOOSE",`^\\s*(${W[Y.XRANGEPLAINLOOSE]})\\s+-\\s+(${W[Y.XRANGEPLAINLOOSE]})\\s*$`);Oe("STAR","(<|>)?=?\\s*\\*");Oe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Oe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ev=I((Ehr,jhe)=>{"use strict";var Yft=Object.freeze({loose:!0}),Jft=Object.freeze({}),jft=i(t=>t?typeof t!="object"?Yft:t:Jft,"parseOptions");jhe.exports=jft});var B4=I((Ihr,Zhe)=>{"use strict";var Khe=/^[0-9]+$/,Xhe=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:tXhe(e,t),"rcompareIdentifiers");Zhe.exports={compareIdentifiers:Xhe,rcompareIdentifiers:Kft}});var ln=I((Shr,tge)=>{"use strict";var tv=OI(),{MAX_LENGTH:ege,MAX_SAFE_INTEGER:rv}=Hh(),{safeRe:nv,t:sv}=$h(),Xft=ev(),{compareIdentifiers:R4}=B4(),Zft=i((t,e)=>{let r=e.split(".");if(r.length>t.length)return!1;for(let n=0;nege)throw new TypeError(`version is longer than ${ege} characters`);tv("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?nv[sv.LOOSE]:nv[sv.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>rv||this.major<0)throw new TypeError("Invalid major version");if(this.minor>rv||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>rv||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&oe.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],s=e.prerelease[r];if(tv("prerelease compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return R4(n,s)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],s=e.build[r];if(tv("build compare",r,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return R4(n,s)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=`-${r}`.match(this.options.loose?nv[sv.PRERELEASELOOSE]:nv[sv.PRERELEASE]);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];if(n===!1&&(o=[r]),Zft(this.prerelease,r)){let a=this.prerelease[r.split(".").length];isNaN(a)&&(this.prerelease=o)}else this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};tge.exports=N4});var md=I((bhr,nge)=>{"use strict";var rge=ln(),eAt=i((t,e,r=!1)=>{if(t instanceof rge)return t;try{return new rge(t,e)}catch(n){if(!r)return null;throw n}},"parse");nge.exports=eAt});var oge=I((Rhr,sge)=>{"use strict";var tAt=md(),rAt=i((t,e)=>{let r=tAt(t,e);return r?r.version:null},"valid");sge.exports=rAt});var age=I((Thr,ige)=>{"use strict";var nAt=md(),sAt=i((t,e)=>{let r=nAt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},"clean");ige.exports=sAt});var uge=I((Phr,lge)=>{"use strict";var cge=ln(),oAt=i((t,e,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new cge(t instanceof cge?t.version:t,r).inc(e,n,s).version}catch{return null}},"inc");lge.exports=oAt});var mge=I((_hr,pge)=>{"use strict";var dge=md(),iAt=i((t,e)=>{let r=dge(t,null,!0),n=dge(e,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,a=o?r:n,c=o?n:r,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"},"diff");pge.exports=iAt});var Age=I((khr,fge)=>{"use strict";var aAt=ln(),cAt=i((t,e)=>new aAt(t,e).major,"major");fge.exports=cAt});var gge=I((Ohr,hge)=>{"use strict";var lAt=ln(),uAt=i((t,e)=>new lAt(t,e).minor,"minor");hge.exports=uAt});var Ege=I((Fhr,yge)=>{"use strict";var dAt=ln(),pAt=i((t,e)=>new dAt(t,e).patch,"patch");yge.exports=pAt});var Ige=I((qhr,Cge)=>{"use strict";var mAt=md(),fAt=i((t,e)=>{let r=mAt(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");Cge.exports=fAt});var ri=I((Hhr,Sge)=>{"use strict";var wge=ln(),AAt=i((t,e,r)=>new wge(t,r).compare(new wge(e,r)),"compare");Sge.exports=AAt});var bge=I((zhr,xge)=>{"use strict";var hAt=ri(),gAt=i((t,e,r)=>hAt(e,t,r),"rcompare");xge.exports=gAt});var Rge=I((Whr,Bge)=>{"use strict";var yAt=ri(),EAt=i((t,e)=>yAt(t,e,!0),"compareLoose");Bge.exports=EAt});var ov=I((Jhr,Tge)=>{"use strict";var Nge=ln(),CAt=i((t,e,r)=>{let n=new Nge(t,r),s=new Nge(e,r);return n.compare(s)||n.compareBuild(s)},"compareBuild");Tge.exports=CAt});var Pge=I((Khr,vge)=>{"use strict";var IAt=ov(),wAt=i((t,e)=>t.sort((r,n)=>IAt(r,n,e)),"sort");vge.exports=wAt});var _ge=I((Zhr,Qge)=>{"use strict";var SAt=ov(),xAt=i((t,e)=>t.sort((r,n)=>SAt(n,r,e)),"rsort");Qge.exports=xAt});var MI=I((tgr,Dge)=>{"use strict";var bAt=ri(),BAt=i((t,e,r)=>bAt(t,e,r)>0,"gt");Dge.exports=BAt});var iv=I((ngr,kge)=>{"use strict";var RAt=ri(),NAt=i((t,e,r)=>RAt(t,e,r)<0,"lt");kge.exports=NAt});var T4=I((ogr,Lge)=>{"use strict";var TAt=ri(),vAt=i((t,e,r)=>TAt(t,e,r)===0,"eq");Lge.exports=vAt});var v4=I((agr,Oge)=>{"use strict";var PAt=ri(),QAt=i((t,e,r)=>PAt(t,e,r)!==0,"neq");Oge.exports=QAt});var av=I((lgr,Mge)=>{"use strict";var _At=ri(),DAt=i((t,e,r)=>_At(t,e,r)>=0,"gte");Mge.exports=DAt});var cv=I((dgr,Fge)=>{"use strict";var kAt=ri(),LAt=i((t,e,r)=>kAt(t,e,r)<=0,"lte");Fge.exports=LAt});var P4=I((mgr,Uge)=>{"use strict";var OAt=T4(),MAt=v4(),FAt=MI(),UAt=av(),qAt=iv(),GAt=cv(),HAt=i((t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return OAt(t,r,n);case"!=":return MAt(t,r,n);case">":return FAt(t,r,n);case">=":return UAt(t,r,n);case"<":return qAt(t,r,n);case"<=":return GAt(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");Uge.exports=HAt});var Gge=I((Agr,qge)=>{"use strict";var $At=ln(),zAt=md(),{safeRe:lv,t:uv}=$h(),VAt=i((t,e)=>{if(t instanceof $At)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?lv[uv.COERCEFULL]:lv[uv.COERCE]);else{let l=e.includePrerelease?lv[uv.COERCERTLFULL]:lv[uv.COERCERTL],u;for(;(u=l.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return zAt(`${n}.${s}.${o}${a}${c}`,e)},"coerce");qge.exports=VAt});var $ge=I((ggr,Hge)=>{"use strict";var WAt=md(),YAt=Hh(),JAt=ln(),jAt=i((t,e,r)=>{if(!YAt.RELEASE_TYPES.includes(e))return null;let n=KAt(t,r);return n&&XAt(n,e)},"truncate"),KAt=i((t,e)=>{let r=t instanceof JAt?t.version:t;return WAt(r,e)},"cloneInputVersion"),XAt=i((t,e)=>{if(ZAt(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},"doTruncation"),ZAt=i(t=>t.startsWith("pre"),"isPrerelease");Hge.exports=jAt});var Vge=I((Egr,zge)=>{"use strict";var Q4=class{static{i(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,r)}return this}};zge.exports=Q4});var ni=I((Igr,jge)=>{"use strict";var eht=/\s+/g,_4=class t{static{i(this,"Range")}constructor(e,r){if(r=rht(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof D4)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(eht," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Yge(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&dht(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(uht,"");let n=((this.options.includePrerelease&&cht)|(this.options.loose&&lht))+":"+e,s=Wge.get(n);if(s)return s;let o=this.options.loose,a=o?ns[un.HYPHENRANGELOOSE]:ns[un.HYPHENRANGE];e=e.replace(a,wht(this.options.includePrerelease)),Qt("hyphen replace",e),e=e.replace(ns[un.COMPARATORTRIM],oht),Qt("comparator trim",e),e=e.replace(ns[un.TILDETRIM],iht),Qt("tilde trim",e),e=e.replace(ns[un.CARETTRIM],aht),Qt("caret trim",e);let c=e.split(" ").map(p=>pht(p,this.options)).join(" ").split(/\s+/).map(p=>Iht(p,this.options));o&&(c=c.filter(p=>(Qt("loose invalid filter",p,this.options),!!p.match(ns[un.COMPARATORLOOSE])))),Qt("range list",c);let l=new Map,u=c.map(p=>new D4(p,this.options));for(let p of u){if(Yge(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return Wge.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Jge(n,r)&&e.set.some(s=>Jge(s,r)&&n.every(o=>s.every(a=>o.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new nht(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0","isNullSet"),dht=i(t=>t.value==="","isAny"),Jge=i((t,e)=>{let r=!0,n=t.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,e)),s=n.pop();return r},"isSatisfiable"),pht=i((t,e)=>(t=t.replace(ns[un.BUILD],""),Qt("comp",t,e),t=hht(t,e),Qt("caret",t),t=fht(t,e),Qt("tildes",t),t=yht(t,e),Qt("xrange",t),t=Cht(t,e),Qt("stars",t),t),"parseComparator"),qr=i(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),mht=i((t,e,r)=>qr(t)&&!qr(e)||qr(e)&&r&&!qr(r),"invalidXRangeOrder"),fht=i((t,e)=>t.trim().split(/\s+/).map(r=>Aht(r,e)).join(" "),"replaceTildes"),Aht=i((t,e)=>{let r=e.loose?ns[un.TILDELOOSE]:ns[un.TILDE],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{Qt("tilde",t,s,o,a,c,l);let u;return qr(o)?u="":qr(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:qr(c)?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:l?(Qt("replaceTilde pr",l),u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`):u=`>=${o}.${a}.${c} <${o}.${+a+1}.0-0`,Qt("tilde return",u),u})},"replaceTilde"),hht=i((t,e)=>t.trim().split(/\s+/).map(r=>ght(r,e)).join(" "),"replaceCarets"),ght=i((t,e)=>{Qt("caret",t,e);let r=e.loose?ns[un.CARETLOOSE]:ns[un.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(s,o,a,c,l)=>{Qt("caret",t,s,o,a,c,l);let u;return qr(o)?u="":qr(a)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:qr(c)?o==="0"?u=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:l?(Qt("replaceCaret pr",l),o==="0"?a==="0"?u=`>=${o}.${a}.${c}-${l} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c}-${l} <${+o+1}.0.0-0`):(Qt("no pr"),o==="0"?a==="0"?u=`>=${o}.${a}.${c} <${o}.${a}.${+c+1}-0`:u=`>=${o}.${a}.${c} <${o}.${+a+1}.0-0`:u=`>=${o}.${a}.${c} <${+o+1}.0.0-0`),Qt("caret return",u),u})},"replaceCaret"),yht=i((t,e)=>(Qt("replaceXRanges",t,e),t.split(/\s+/).map(r=>Eht(r,e)).join(" ")),"replaceXRanges"),Eht=i((t,e)=>{t=t.trim();let r=e.loose?ns[un.XRANGELOOSE]:ns[un.XRANGE];return t.replace(r,(n,s,o,a,c,l)=>{if(Qt("xRange",t,n,s,o,a,c,l),mht(o,a,c))return t;let u=qr(o),d=u||qr(a),p=d||qr(c),m=p;return s==="="&&m&&(s=""),l=e.includePrerelease?"-0":"",u?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(d&&(a=0),c=0,s===">"?(s=">=",d?(o=+o+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",d?o=+o+1:a=+a+1),s==="<"&&(l="-0"),n=`${s+o}.${a}.${c}${l}`):d?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),Qt("xRange return",n),n})},"replaceXRange"),Cht=i((t,e)=>(Qt("replaceStars",t,e),t.trim().replace(ns[un.STAR],"")),"replaceStars"),Iht=i((t,e)=>(Qt("replaceGTE0",t,e),t.trim().replace(ns[e.includePrerelease?un.GTE0PRE:un.GTE0],"")),"replaceGTE0"),wht=i(t=>(e,r,n,s,o,a,c,l,u,d,p,m)=>(qr(n)?r="":qr(s)?r=`>=${n}.0.0${t?"-0":""}`:qr(o)?r=`>=${n}.${s}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,qr(u)?l="":qr(d)?l=`<${+u+1}.0.0-0`:qr(p)?l=`<${u}.${+d+1}.0-0`:m?l=`<=${u}.${d}.${p}-${m}`:t?l=`<${u}.${d}.${+p+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),"hyphenReplace"),Sht=i((t,e,r)=>{for(let n=0;n0){let s=t[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0},"testSet")});var FI=I((Sgr,rye)=>{"use strict";var UI=Symbol("SemVer ANY"),O4=class t{static{i(this,"Comparator")}static get ANY(){return UI}constructor(e,r){if(r=Kge(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),L4("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===UI?this.value="":this.value=this.operator+this.semver.version,L4("comp",this)}parse(e){let r=this.options.loose?Xge[Zge.COMPARATORLOOSE]:Xge[Zge.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new eye(n[2],this.options.loose):this.semver=UI}toString(){return this.value}test(e){if(L4("Comparator.test",e,this.options.loose),this.semver===UI||e===UI)return!0;if(typeof e=="string")try{e=new eye(e,this.options)}catch{return!1}return k4(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new tye(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new tye(this.value,r).test(e.semver):(r=Kge(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||k4(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||k4(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};rye.exports=O4;var Kge=ev(),{safeRe:Xge,t:Zge}=$h(),k4=P4(),L4=OI(),eye=ln(),tye=ni()});var qI=I((bgr,nye)=>{"use strict";var xht=ni(),bht=i((t,e,r)=>{try{e=new xht(e,r)}catch{return!1}return e.test(t)},"satisfies");nye.exports=bht});var oye=I((Rgr,sye)=>{"use strict";var Bht=ni(),Rht=i((t,e)=>new Bht(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" ")),"toComparators");sye.exports=Rht});var aye=I((Tgr,iye)=>{"use strict";var Nht=ln(),Tht=ni(),vht=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Tht(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Nht(n,r))}),n},"maxSatisfying");iye.exports=vht});var lye=I((Pgr,cye)=>{"use strict";var Pht=ln(),Qht=ni(),_ht=i((t,e,r)=>{let n=null,s=null,o=null;try{o=new Qht(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new Pht(n,r))}),n},"minSatisfying");cye.exports=_ht});var pye=I((_gr,dye)=>{"use strict";var M4=ln(),Dht=ni(),uye=MI(),kht=i((t,e)=>{t=new Dht(t,e);let r=new M4("0.0.0");if(t.test(r)||(r=new M4("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let c=new M4(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||uye(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||uye(r,o))&&(r=o)}return r&&t.test(r)?r:null},"minVersion");dye.exports=kht});var fye=I((kgr,mye)=>{"use strict";var Lht=ni(),Oht=i((t,e)=>{try{return new Lht(t,e).range||"*"}catch{return null}},"validRange");mye.exports=Oht});var dv=I((Ogr,yye)=>{"use strict";var Mht=ln(),gye=FI(),{ANY:Fht}=gye,Uht=ni(),qht=qI(),Aye=MI(),hye=iv(),Ght=cv(),Hht=av(),$ht=i((t,e,r,n)=>{t=new Mht(t,n),e=new Uht(e,n);let s,o,a,c,l;switch(r){case">":s=Aye,o=Ght,a=hye,c=">",l=">=";break;case"<":s=hye,o=Hht,a=Aye,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(qht(t,e,n))return!1;for(let u=0;u{f.semver===Fht&&(f=new gye(">=0.0.0")),p=p||f,m=m||f,s(f.semver,p.semver,n)?p=f:a(f.semver,m.semver,n)&&(m=f)}),p.operator===c||p.operator===l||(!m.operator||m.operator===c)&&o(t,m.semver))return!1;if(m.operator===l&&a(t,m.semver))return!1}return!0},"outside");yye.exports=$ht});var Cye=I((Fgr,Eye)=>{"use strict";var zht=dv(),Vht=i((t,e,r)=>zht(t,e,">",r),"gtr");Eye.exports=Vht});var wye=I((qgr,Iye)=>{"use strict";var Wht=dv(),Yht=i((t,e,r)=>Wht(t,e,"<",r),"ltr");Iye.exports=Yht});var bye=I((Hgr,xye)=>{"use strict";var Sye=ni(),Jht=i((t,e,r)=>(t=new Sye(t,r),e=new Sye(e,r),t.intersects(e,r)),"intersects");xye.exports=Jht});var Rye=I((zgr,Bye)=>{"use strict";var jht=qI(),Kht=ri();Bye.exports=(t,e,r)=>{let n=[],s=null,o=null,a=t.sort((d,p)=>Kht(d,p,r));for(let d of a)jht(d,e,r)?(o=d,s||(s=d)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let c=[];for(let[d,p]of n)d===p?c.push(d):!p&&d===a[0]?c.push("*"):p?d===a[0]?c.push(`<=${p}`):c.push(`${d} - ${p}`):c.push(`>=${d}`);let l=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{"use strict";var Nye=ni(),q4=FI(),{ANY:F4}=q4,U4=qI(),G4=ri(),Xht=i((t,e,r={})=>{if(t===e)return!0;t=new Nye(t,r),e=new Nye(e,r);let n=!1;e:for(let s of t.set){for(let o of e.set){let a=egt(s,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},"subset"),Zht=[new q4(">=0.0.0-0")],Tye=[new q4(">=0.0.0")],egt=i((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===F4){if(e.length===1&&e[0].semver===F4)return!0;r.includePrerelease?t=Zht:t=Tye}if(e.length===1&&e[0].semver===F4){if(r.includePrerelease)return!0;e=Tye}let n=new Set,s,o;for(let f of t)f.operator===">"||f.operator===">="?s=vye(s,f,r):f.operator==="<"||f.operator==="<="?o=Pye(o,f,r):n.add(f.semver);if(n.size>1)return null;let a;if(s&&o){if(a=G4(s.semver,o.semver,r),a>0)return null;if(a===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let f of n){if(s&&!U4(f,String(s),r)||o&&!U4(f,String(o),r))return null;for(let A of e)if(!U4(f,String(A),r))return!1;return!0}let c,l,u,d,p=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,m=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(d=d||f.operator===">"||f.operator===">=",u=u||f.operator==="<"||f.operator==="<=",s){if(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(c=vye(s,f,r),c===f&&c!==s)return!1}else if(s.operator===">="&&!f.test(s.semver))return!1}if(o){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(l=Pye(o,f,r),l===f&&l!==o)return!1}else if(o.operator==="<="&&!f.test(o.semver))return!1}if(!f.operator&&(o||s)&&a!==0)return!1}return!(s&&u&&!o&&a!==0||o&&d&&!s&&a!==0||m||p)},"simpleSubset"),vye=i((t,e,r)=>{if(!t)return e;let n=G4(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),Pye=i((t,e,r)=>{if(!t)return e;let n=G4(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");Qye.exports=Xht});var Oye=I((Ygr,Lye)=>{"use strict";var H4=$h(),Dye=Hh(),tgt=ln(),kye=B4(),rgt=md(),ngt=oge(),sgt=age(),ogt=uge(),igt=mge(),agt=Age(),cgt=gge(),lgt=Ege(),ugt=Ige(),dgt=ri(),pgt=bge(),mgt=Rge(),fgt=ov(),Agt=Pge(),hgt=_ge(),ggt=MI(),ygt=iv(),Egt=T4(),Cgt=v4(),Igt=av(),wgt=cv(),Sgt=P4(),xgt=Gge(),bgt=$ge(),Bgt=FI(),Rgt=ni(),Ngt=qI(),Tgt=oye(),vgt=aye(),Pgt=lye(),Qgt=pye(),_gt=fye(),Dgt=dv(),kgt=Cye(),Lgt=wye(),Ogt=bye(),Mgt=Rye(),Fgt=_ye();Lye.exports={parse:rgt,valid:ngt,clean:sgt,inc:ogt,diff:igt,major:agt,minor:cgt,patch:lgt,prerelease:ugt,compare:dgt,rcompare:pgt,compareLoose:mgt,compareBuild:fgt,sort:Agt,rsort:hgt,gt:ggt,lt:ygt,eq:Egt,neq:Cgt,gte:Igt,lte:wgt,cmp:Sgt,coerce:xgt,truncate:bgt,Comparator:Bgt,Range:Rgt,satisfies:Ngt,toComparators:Tgt,maxSatisfying:vgt,minSatisfying:Pgt,minVersion:Qgt,validRange:_gt,outside:Dgt,gtr:kgt,ltr:Lgt,intersects:Ogt,simplifyRange:Mgt,subset:Fgt,SemVer:tgt,re:H4.re,src:H4.src,tokens:H4.t,SEMVER_SPEC_VERSION:Dye.SEMVER_SPEC_VERSION,RELEASE_TYPES:Dye.RELEASE_TYPES,compareIdentifiers:kye.compareIdentifiers,rcompareIdentifiers:kye.rcompareIdentifiers}});var tEe=I((Kgr,Wl)=>{var At=require("fs"),fv=require("os"),Gr=require("path"),Mye=require("crypto"),Cc={fs:At.constants,os:fv.constants},Fye="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Hye=/XXXXXX/,Ugt=3,$ye=(Cc.O_CREAT||Cc.fs.O_CREAT)|(Cc.O_EXCL||Cc.fs.O_EXCL)|(Cc.O_RDWR||Cc.fs.O_RDWR),qgt=fv.platform()==="win32",Ggt=Cc.EBADF||Cc.os.errno.EBADF,Hgt=Cc.ENOENT||Cc.os.errno.ENOENT,zye=448,Vye=384,$gt="exit",zh=[],Wye=At.rmdirSync.bind(At),Yye=!1;function zgt(t,e){return At.rm(t,{recursive:!0},e)}i(zgt,"rimraf");function Jye(t){return At.rmSync(t,{recursive:!0})}i(Jye,"FN_RIMRAF_SYNC");function W4(t,e){let r=Vh(t,e),n=r[0],s=r[1];tyt(n,function(o,a){if(o)return s(o);let c=a.tries;i((function l(){try{let u=Kye(a);At.stat(u,function(d){if(!d)return c-- >0?l():s(new Error("Could not get a unique tmp filename, max tries reached "+u));s(null,u)})}catch(u){s(u)}}),"_getUniqueName")()})}i(W4,"tmpName");function Y4(t){let e=Vh(t),r=e[0],n=ryt(r),s=n.tries;do{let o=Kye(n);try{At.statSync(o)}catch{return o}}while(s-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}i(Y4,"tmpNameSync");function Vgt(t,e){let r=Vh(t,e),n=r[0],s=r[1];W4(n,i(function(a,c){if(a)return s(a);At.open(c,$ye,n.mode||Vye,i(function(u,d){if(u)return s(u);if(n.discardDescriptor)return At.close(d,i(function(m){return s(m,c,void 0,z4(c,-1,n,!1))},"_discardCallback"));{let p=n.discardDescriptor||n.detachDescriptor;s(null,c,d,z4(c,p?-1:d,n,!1))}},"_fileCreated"))},"_tmpNameCreated"))}i(Vgt,"file");function Wgt(t){let e=Vh(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,s=Y4(r),o=At.openSync(s,$ye,r.mode||Vye);return r.discardDescriptor&&(At.closeSync(o),o=void 0),{name:s,fd:o,removeCallback:z4(s,n?-1:o,r,!0)}}i(Wgt,"fileSync");function Ygt(t,e){let r=Vh(t,e),n=r[0],s=r[1];W4(n,i(function(a,c){if(a)return s(a);At.mkdir(c,n.mode||zye,i(function(u){if(u)return s(u);s(null,c,jye(c,n,!1))},"_dirCreated"))},"_tmpNameCreated"))}i(Ygt,"dir");function Jgt(t){let e=Vh(t),r=e[0],n=Y4(r);return At.mkdirSync(n,r.mode||zye),{name:n,removeCallback:jye(n,r,!0)}}i(Jgt,"dirSync");function jgt(t,e){let r=i(function(n){if(n&&!V4(n))return e(n);e()},"_handler");0<=t[0]?At.close(t[0],function(){At.unlink(t[1],r)}):At.unlink(t[1],r)}i(jgt,"_removeFileAsync");function Kgt(t){let e=null;try{0<=t[0]&&At.closeSync(t[0])}catch(r){if(!nyt(r)&&!V4(r))throw r}finally{try{At.unlinkSync(t[1])}catch(r){V4(r)||(e=r)}}if(e!==null)throw e}i(Kgt,"_removeFileSync");function z4(t,e,r,n){let s=mv(Kgt,[e,t],n),o=mv(jgt,[e,t],n,s);return r.keep||zh.unshift(s),n?s:o}i(z4,"_prepareTmpFileRemoveCallback");function jye(t,e,r){let n=e.unsafeCleanup?zgt:At.rmdir.bind(At),s=e.unsafeCleanup?Jye:Wye,o=mv(s,t,r),a=mv(n,t,r,o);return e.keep||zh.unshift(o),r?o:a}i(jye,"_prepareTmpDirRemoveCallback");function mv(t,e,r,n){let s=!1;return i(function o(a){if(!s){let c=n||o,l=zh.indexOf(c);return l>=0&&zh.splice(l,1),s=!0,r||t===Wye||t===Jye?t(e):t(e,a||function(){})}},"_cleanupCallback")}i(mv,"_prepareRemoveCallback");function Xgt(){if(Yye)for(;zh.length;)try{zh[0]()}catch{}}i(Xgt,"_garbageCollector");function Uye(t){let e=[],r=null;try{r=Mye.randomBytes(t)}catch{r=Mye.pseudoRandomBytes(t)}for(let n=0;n"u"}i(Ds,"_isUndefined");function Vh(t,e){if(typeof t=="function")return[{},t];if(Ds(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}i(Vh,"_parseArguments");function Zgt(t,e,r){let n=Gr.isAbsolute(t)?t:Gr.join(e,t);At.stat(n,function(s){s?At.realpath(Gr.dirname(n),function(o,a){if(o)return r(o);r(null,Gr.join(a,Gr.basename(n)))}):At.realpath(n,r)})}i(Zgt,"_resolvePath");function eyt(t,e){let r=Gr.isAbsolute(t)?t:Gr.join(e,t);try{return At.statSync(r),At.realpathSync(r)}catch{let s=At.realpathSync(Gr.dirname(r));return Gr.join(s,Gr.basename(r))}}i(eyt,"_resolvePathSync");function Kye(t){let e=t.tmpdir;if(!Ds(t.name))return Gr.join(e,t.dir,t.name);if(!Ds(t.template))return Gr.join(e,t.dir,t.template).replace(Hye,Uye(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",Uye(12),t.postfix?"-"+t.postfix:""].join("");return Gr.join(e,t.dir,r)}i(Kye,"_generateTmpName");function $4(t,e){if(typeof e!="string")throw new Error(`${t} option must be a string, got "${typeof e}".`);if(e.includes(".."))throw new Error("Relative value not allowed");return e}i($4,"_assertPath");function Xye(t){if(!Ds(t.name)){let e=t.name;if(Gr.isAbsolute(e))throw new Error(`name option must not contain an absolute path, found "${e}".`);let r=Gr.basename(e);if(r===".."||r==="."||r!==e)throw new Error(`name option must not contain a path, found "${e}".`)}if(!Ds(t.template)){if(typeof t.template!="string")throw new Error(`template option must be a string, got "${typeof t.template}".`);if(!t.template.match(Hye))throw new Error(`Invalid template, found "${t.template}".`)}if(!Ds(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=Ds(t.name)?t.tries||Ugt:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.prefix=Ds(t.prefix)?"":$4("prefix",t.prefix),t.postfix=Ds(t.postfix)?"":$4("postfix",t.postfix),t.template=Ds(t.template)?void 0:$4("template",t.template)}i(Xye,"_assertOptionsBase");function qye(t,e,r,n){if(Ds(e))return n(null);Zgt(e,r,function(s,o){if(s)return n(s);let a=Gr.relative(r,o);if(a.startsWith("..")||Gr.isAbsolute(a))return n(new Error(`${t} option must be relative to "${r}", found "${a}".`));n(null,a)})}i(qye,"_getRelativePath");function Gye(t,e,r){if(Ds(e))return;let n=eyt(e,r),s=Gr.relative(r,n);if(s.startsWith("..")||Gr.isAbsolute(s))throw new Error(`${t} option must be relative to "${r}", found "${s}".`);return s}i(Gye,"_getRelativePathSync");function tyt(t,e){oyt(t,function(r,n){if(r)return e(r);t.tmpdir=n;try{Xye(t,n)}catch(s){return e(s)}qye("dir",t.dir,n,function(s,o){if(s)return e(s);t.dir=Ds(o)?"":o,qye("template",t.template,n,function(a,c){if(a)return e(a);t.template=c,e(null,t)})})})}i(tyt,"_assertAndSanitizeOptions");function ryt(t){let e=t.tmpdir=eEe(t);Xye(t,e);let r=Gye("dir",t.dir,e);return t.dir=Ds(r)?"":r,t.template=Gye("template",t.template,e),t}i(ryt,"_assertAndSanitizeOptionsSync");function nyt(t){return Zye(t,-Ggt,"EBADF")}i(nyt,"_isEBADF");function V4(t){return Zye(t,-Hgt,"ENOENT")}i(V4,"_isENOENT");function Zye(t,e,r){return qgt?t.code===r:t.code===r&&t.errno===e}i(Zye,"_isExpectedError");function syt(){Yye=!0}i(syt,"setGracefulCleanup");function oyt(t,e){return At.realpath(t&&t.tmpdir||fv.tmpdir(),e)}i(oyt,"_getTmpDir");function eEe(t){return At.realpathSync(t&&t.tmpdir||fv.tmpdir())}i(eEe,"_getTmpDirSync");process.addListener($gt,Xgt);Object.defineProperty(Wl.exports,"tmpdir",{enumerable:!0,configurable:!1,get:i(function(){return eEe()},"get")});Wl.exports.dir=Ygt;Wl.exports.dirSync=Jgt;Wl.exports.file=Vgt;Wl.exports.fileSync=Wgt;Wl.exports.tmpName=W4;Wl.exports.tmpNameSync=Y4;Wl.exports.setGracefulCleanup=syt});var ss=I(yo=>{"use strict";yo.__esModule=!0;yo.extend=oEe;yo.indexOf=uyt;yo.escapeExpression=dyt;yo.isEmpty=pyt;yo.createFrame=myt;yo.blockParams=fyt;yo.appendContextPath=Ayt;var iyt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},ayt=/[&<>"'`=]/g,cyt=/[&<>"'`=]/;function lyt(t){return iyt[t]}i(lyt,"escapeChar");function oEe(t){for(var e=1;e{"use strict";hv.__esModule=!0;var X4=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Z4(t,e){var r=e&&e.loc,n=void 0,s=void 0,o=void 0,a=void 0;r&&(n=r.start.line,s=r.end.line,o=r.start.column,a=r.end.column,t+=" - "+n+":"+o);for(var c=Error.prototype.constructor.call(this,t),l=0;l{"use strict";gv.__esModule=!0;var eW=ss();gv.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,s=r.fn;if(e===!0)return s(this);if(e===!1||e==null)return n(this);if(eW.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=eW.createFrame(r.data);o.contextPath=eW.appendContextPath(r.data.contextPath,r.name),r={data:o}}return s(e,r)})};cEe.exports=gv.default});var dEe=I((yv,uEe)=>{"use strict";yv.__esModule=!0;function hyt(t){return t&&t.__esModule?t:{default:t}}i(hyt,"_interopRequireDefault");var GI=ss(),gyt=Eo(),yyt=hyt(gyt);yv.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new yyt.default("Must pass iterator to #each");var n=r.fn,s=r.inverse,o=0,a="",c=void 0,l=void 0;r.data&&r.ids&&(l=GI.appendContextPath(r.data.contextPath,r.ids[0])+"."),GI.isFunction(e)&&(e=e.call(this)),r.data&&(c=GI.createFrame(r.data));function u(A,h,E){c&&(c.key=A,c.index=h,c.first=h===0,c.last=!!E,l&&(c.contextPath=l+A)),a=a+n(e[A],{data:c,blockParams:GI.blockParams([e[A],A],[l+A,null])})}if(i(u,"execIteration"),e&&typeof e=="object")if(GI.isArray(e))for(var d=e.length;o{"use strict";Ev.__esModule=!0;function Eyt(t){return t&&t.__esModule?t:{default:t}}i(Eyt,"_interopRequireDefault");var Cyt=Eo(),Iyt=Eyt(Cyt);Ev.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Iyt.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};pEe.exports=Ev.default});var gEe=I((Cv,hEe)=>{"use strict";Cv.__esModule=!0;function wyt(t){return t&&t.__esModule?t:{default:t}}i(wyt,"_interopRequireDefault");var fEe=ss(),Syt=Eo(),AEe=wyt(Syt);Cv.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new AEe.default("#if requires exactly one argument");return fEe.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||fEe.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new AEe.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};hEe.exports=Cv.default});var EEe=I((Iv,yEe)=>{"use strict";Iv.__esModule=!0;Iv.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n{"use strict";wv.__esModule=!0;wv.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};CEe.exports=wv.default});var SEe=I((Sv,wEe)=>{"use strict";Sv.__esModule=!0;function xyt(t){return t&&t.__esModule?t:{default:t}}i(xyt,"_interopRequireDefault");var HI=ss(),byt=Eo(),Byt=xyt(byt);Sv.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new Byt.default("#with requires exactly one argument");HI.isFunction(e)&&(e=e.call(this));var n=r.fn;if(HI.isEmpty(e))return r.inverse(this);var s=r.data;return r.data&&r.ids&&(s=HI.createFrame(r.data),s.contextPath=HI.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:s,blockParams:HI.blockParams([e],[s&&s.contextPath])})})};wEe.exports=Sv.default});var tW=I(xv=>{"use strict";xv.__esModule=!0;xv.registerDefaultHelpers=qyt;xv.moveHelperToHooks=Gyt;function km(t){return t&&t.__esModule?t:{default:t}}i(km,"_interopRequireDefault");var Ryt=lEe(),Nyt=km(Ryt),Tyt=dEe(),vyt=km(Tyt),Pyt=mEe(),Qyt=km(Pyt),_yt=gEe(),Dyt=km(_yt),kyt=EEe(),Lyt=km(kyt),Oyt=IEe(),Myt=km(Oyt),Fyt=SEe(),Uyt=km(Fyt);function qyt(t){Nyt.default(t),vyt.default(t),Qyt.default(t),Dyt.default(t),Lyt.default(t),Myt.default(t),Uyt.default(t)}i(qyt,"registerDefaultHelpers");function Gyt(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}i(Gyt,"moveHelperToHooks")});var bEe=I((bv,xEe)=>{"use strict";bv.__esModule=!0;var Hyt=ss();bv.default=function(t){t.registerDecorator("inline",function(e,r,n,s){var o=e;return r.partials||(r.partials={},o=i(function(a,c){var l=n.partials;n.partials=Hyt.extend({},l,r.partials);var u=e(a,c);return n.partials=l,u},"ret")),r.partials[s.args[0]]=s.fn,o})};xEe.exports=bv.default});var BEe=I(rW=>{"use strict";rW.__esModule=!0;rW.registerDefaultDecorators=Wyt;function $yt(t){return t&&t.__esModule?t:{default:t}}i($yt,"_interopRequireDefault");var zyt=bEe(),Vyt=$yt(zyt);function Wyt(t){Vyt.default(t)}i(Wyt,"registerDefaultDecorators")});var nW=I((Bv,REe)=>{"use strict";Bv.__esModule=!0;var Yyt=ss(),Wh={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:i(function(e){if(typeof e=="string"){var r=Yyt.indexOf(Wh.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},"lookupLevel"),log:i(function(e){if(e=Wh.lookupLevel(e),typeof console<"u"&&Wh.lookupLevel(Wh.level)<=e){var r=Wh.methodMap[e];console[r]||(r="log");for(var n=arguments.length,s=Array(n>1?n-1:0),o=1;o{"use strict";$I.__esModule=!0;$I.createProtoAccessControl=Xyt;$I.resultIsAllowed=Zyt;$I.resetLoggedProperties=tEt;function Jyt(t){return t&&t.__esModule?t:{default:t}}i(Jyt,"_interopRequireDefault");var NEe=ss(),jyt=nW(),Kyt=Jyt(jyt),Rv=Object.create(null);function Xyt(t){var e=Object.create(null);e.__proto__=!1,NEe.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,NEe.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}i(Xyt,"createProtoAccessControl");function Zyt(t,e,r){return TEe(typeof t=="function"?e.methods:e.properties,r)}i(Zyt,"resultIsAllowed");function TEe(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(eEt(e),!1)}i(TEe,"checkWhiteList");function eEt(t){Rv[t]!==!0&&(Rv[t]=!0,Kyt.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this warning: See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}i(eEt,"logUnexpecedPropertyAccessOnce");function tEt(){Object.keys(Rv).forEach(function(t){delete Rv[t]})}i(tEt,"resetLoggedProperties")});var Tv=I(Ic=>{"use strict";Ic.__esModule=!0;Ic.HandlebarsEnvironment=aW;function vEe(t){return t&&t.__esModule?t:{default:t}}i(vEe,"_interopRequireDefault");var Lm=ss(),rEt=Eo(),oW=vEe(rEt),nEt=tW(),sEt=BEe(),oEt=nW(),Nv=vEe(oEt),iEt=sW(),aEt="4.7.9";Ic.VERSION=aEt;var cEt=8;Ic.COMPILER_REVISION=cEt;var lEt=7;Ic.LAST_COMPATIBLE_COMPILER_REVISION=lEt;var uEt={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};Ic.REVISION_CHANGES=uEt;var iW="[object Object]";function aW(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},nEt.registerDefaultHelpers(this),sEt.registerDefaultDecorators(this)}i(aW,"HandlebarsEnvironment");aW.prototype={constructor:aW,logger:Nv.default,log:Nv.default.log,registerHelper:i(function(e,r){if(Lm.toString.call(e)===iW){if(r)throw new oW.default("Arg not supported with multiple helpers");Lm.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:i(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:i(function(e,r){if(Lm.toString.call(e)===iW)Lm.extend(this.partials,e);else{if(typeof r>"u")throw new oW.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:i(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:i(function(e,r){if(Lm.toString.call(e)===iW){if(r)throw new oW.default("Arg not supported with multiple decorators");Lm.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:i(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:i(function(){iEt.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var dEt=Nv.default.log;Ic.log=dEt;Ic.createFrame=Lm.createFrame;Ic.logger=Nv.default});var QEe=I((vv,PEe)=>{"use strict";vv.__esModule=!0;function cW(t){this.string=t}i(cW,"SafeString");cW.prototype.toString=cW.prototype.toHTML=function(){return""+this.string};vv.default=cW;PEe.exports=vv.default});var _Ee=I(lW=>{"use strict";lW.__esModule=!0;lW.wrapHelper=pEt;function pEt(t,e){if(typeof t!="function")return t;var r=i(function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)},"wrapper");return r}i(pEt,"wrapHelper")});var FEe=I(fd=>{"use strict";fd.__esModule=!0;fd.checkRevision=yEt;fd.template=EEt;fd.wrapProgram=Pv;fd.resolvePartial=CEt;fd.invokePartial=IEt;fd.noop=OEe;function mEt(t){return t&&t.__esModule?t:{default:t}}i(mEt,"_interopRequireDefault");function fEt(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i(fEt,"_interopRequireWildcard");var AEt=ss(),Yh=fEt(AEt),hEt=Eo(),Jl=mEt(hEt),jl=Tv(),DEe=tW(),gEt=_Ee(),kEe=sW();function yEt(t){var e=t&&t[0]||1,r=jl.COMPILER_REVISION;if(!(e>=jl.LAST_COMPATIBLE_COMPILER_REVISION&&e<=jl.COMPILER_REVISION))if(ethis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},"incrStack"),topStackName:i(function(){return"stack"+this.stackSlot},"topStackName"),flushInline:i(function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r{"use strict";jv.__esModule=!0;function tw(t){return t&&t.__esModule?t:{default:t}}i(tw,"_interopRequireDefault");var LCt=zEe(),OCt=tw(LCt),MCt=fW(),FCt=tw(MCt),UW=nCe(),qW=aCe(),UCt=UCe(),qCt=tw(UCt),GCt=Uv(),HCt=tw(GCt),$Ct=uW(),zCt=tw($Ct),VCt=OCt.default.create;function qCe(){var t=VCt();return t.compile=function(e,r){return qW.compile(e,r,t)},t.precompile=function(e,r){return qW.precompile(e,r,t)},t.AST=FCt.default,t.Compiler=qW.Compiler,t.JavaScriptCompiler=qCt.default,t.Parser=UW.parser,t.parse=UW.parse,t.parseWithoutProcessing=UW.parseWithoutProcessing,t}i(qCe,"create");var rg=qCe();rg.create=qCe;zCt.default(rg);rg.Visitor=HCt.default;rg.default=rg;jv.default=rg;GCe.exports=jv.default});var $Ce=I(Kv=>{"use strict";Kv.__esModule=!0;Kv.print=jCt;Kv.PrintVisitor=cr;function WCt(t){return t&&t.__esModule?t:{default:t}}i(WCt,"_interopRequireDefault");var YCt=Uv(),JCt=WCt(YCt);function jCt(t){return new cr().accept(t)}i(jCt,"print");function cr(){this.padding=0}i(cr,"PrintVisitor");cr.prototype=new JCt.default;cr.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r "+e+" }}")};cr.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};cr.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};cr.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};cr.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,s=0,o=e.length;s{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});nP.getProxyUrl=eIt;nP.checkBypass=oIe;function eIt(t){let e=t.protocol==="https:";if(oIe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new rP(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new rP(`http://${r}`)}else return}i(eIt,"getProxyUrl");function oIe(t){if(!t.hostname)return!1;let e=t.hostname;if(tIt(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let o of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(o==="*"||s.some(a=>a===o||a.endsWith(`.${o}`)||o.startsWith(".")&&a.endsWith(`${o}`)))return!0;return!1}i(oIe,"checkBypass");function tIt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(tIt,"isLoopbackAddress");var rP=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}});var cIe=I(Gt=>{"use strict";var rIt=Gt&&Gt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nIt=Gt&&Gt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aP=Gt&&Gt.__importStar||(function(){var t=i(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;swr(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return wr(this,void 0,void 0,function*(){return new Promise(e=>wr(this,void 0,void 0,function*(){let r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};Gt.HttpClientResponse=iP;function dIt(t){return new URL(t).protocol==="https:"}i(dIt,"isHttps");var YW=class{static{i(this,"HttpClient")}constructor(e,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,r){return wr(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return wr(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return wr(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{})})}post(e,r,n){return wr(this,void 0,void 0,function*(){return this.request("POST",e,r,n||{})})}patch(e,r,n){return wr(this,void 0,void 0,function*(){return this.request("PATCH",e,r,n||{})})}put(e,r,n){return wr(this,void 0,void 0,function*(){return this.request("PUT",e,r,n||{})})}head(e,r){return wr(this,void 0,void 0,function*(){return this.request("HEAD",e,null,r||{})})}sendStream(e,r,n,s){return wr(this,void 0,void 0,function*(){return this.request(e,r,n,s)})}getJson(e){return wr(this,arguments,void 0,function*(r,n={}){n[os.Accept]=this._getExistingOrDefaultHeader(n,os.Accept,Xl.ApplicationJson);let s=yield this.get(r,n);return this._processResponse(s,this.requestOptions)})}postJson(e,r){return wr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[os.Accept]=this._getExistingOrDefaultHeader(o,os.Accept,Xl.ApplicationJson),o[os.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Xl.ApplicationJson);let c=yield this.post(n,a,o);return this._processResponse(c,this.requestOptions)})}putJson(e,r){return wr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[os.Accept]=this._getExistingOrDefaultHeader(o,os.Accept,Xl.ApplicationJson),o[os.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Xl.ApplicationJson);let c=yield this.put(n,a,o);return this._processResponse(c,this.requestOptions)})}patchJson(e,r){return wr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[os.Accept]=this._getExistingOrDefaultHeader(o,os.Accept,Xl.ApplicationJson),o[os.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Xl.ApplicationJson);let c=yield this.patch(n,a,o);return this._processResponse(c,this.requestOptions)})}request(e,r,n,s){return wr(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let o=new URL(r),a=this._prepareRequest(e,o,s),c=this._allowRetries&&cIt.includes(e)?this._maxRetries+1:1,l=0,u;do{if(u=yield this.requestRaw(a,n),u&&u.message&&u.message.statusCode===ii.Unauthorized){let p;for(let m of this.handlers)if(m.canHandleAuthentication(u)){p=m;break}return p?p.handleAuthentication(this,a,n):u}let d=this._maxRedirects;for(;u.message.statusCode&&iIt.includes(u.message.statusCode)&&this._allowRedirects&&d>0;){let p=u.message.headers.location;if(!p)break;let m=new URL(p);if(o.protocol==="https:"&&o.protocol!==m.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield u.readBody(),m.hostname!==o.hostname)for(let f in s)f.toLowerCase()==="authorization"&&delete s[f];a=this._prepareRequest(e,m,s),u=yield this.requestRaw(a,n),d--}if(!u.message.statusCode||!aIt.includes(u.message.statusCode))return u;l+=1,l{function o(a,c){a?s(a):c?n(c):s(new Error("Unknown error"))}i(o,"callbackForResult"),this.requestRawWithCallback(e,r,o)})})}requestRawWithCallback(e,r,n){typeof r=="string"&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let s=!1;function o(l,u){s||(s=!0,n(l,u))}i(o,"handleResult");let a=e.httpModule.request(e.options,l=>{let u=new iP(l);o(void 0,u)}),c;a.on("socket",l=>{c=l}),a.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),o(new Error(`Request timeout: ${e.options.path}`))}),a.on("error",function(l){o(l)}),r&&typeof r=="string"&&a.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){a.end()}),r.pipe(a)):a.end()}getAgent(e){let r=new URL(e);return this._getAgent(r)}getAgentDispatcher(e){let r=new URL(e),n=WW.getProxyUrl(r);if(n&&n.hostname)return this._getProxyAgentDispatcher(r,n)}_prepareRequest(e,r,n){let s={};s.parsedUrl=r;let o=s.parsedUrl.protocol==="https:";s.httpModule=o?aIe:VW;let a=o?443:80;if(s.options={},s.options.host=s.parsedUrl.hostname,s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a,s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||""),s.options.method=e,s.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(s.options.headers["user-agent"]=this.userAgent),s.options.agent=this._getAgent(s.parsedUrl),this.handlers)for(let c of this.handlers)c.prepareRequest(s.options);return s}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},ow(this.requestOptions.headers),ow(e||{})):ow(e||{})}_getExistingOrDefaultHeader(e,r,n){let s;if(this.requestOptions&&this.requestOptions.headers){let a=ow(this.requestOptions.headers)[r];a&&(s=typeof a=="number"?a.toString():a)}let o=e[r];return o!==void 0?typeof o=="number"?o.toString():o:s!==void 0?s:n}_getExistingOrDefaultContentTypeHeader(e,r){let n;if(this.requestOptions&&this.requestOptions.headers){let o=ow(this.requestOptions.headers)[os.ContentType];o&&(typeof o=="number"?n=String(o):Array.isArray(o)?n=o.join(", "):n=o)}let s=e[os.ContentType];return s!==void 0?typeof s=="number"?String(s):Array.isArray(s)?s.join(", "):s:n!==void 0?n:r}_getAgent(e){let r,n=WW.getProxyUrl(e),s=n&&n.hostname;if(this._keepAlive&&s&&(r=this._proxyAgent),s||(r=this._agent),r)return r;let o=e.protocol==="https:",a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||VW.globalAgent.maxSockets),n&&n.hostname){let c={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},l,u=n.protocol==="https:";o?l=u?sP.httpsOverHttps:sP.httpsOverHttp:l=u?sP.httpOverHttps:sP.httpOverHttp,r=l(c),this._proxyAgent=r}if(!r){let c={keepAlive:this._keepAlive,maxSockets:a};r=o?new aIe.Agent(c):new VW.Agent(c),this._agent=r}return o&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_getProxyAgentDispatcher(e,r){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let s=e.protocol==="https:";return n=new sIt.ProxyAgent(Object.assign({uri:r.href,pipelining:this._keepAlive?1:0},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`})),this._proxyAgentDispatcher=n,s&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let r=e||"actions/http-client",n=process.env.ACTIONS_ORCHESTRATION_ID;if(n){let s=n.replace(/[^a-z0-9_.-]/gi,"_");return`${r} actions_orchestration_id/${s}`}return r}_performExponentialBackoff(e){return wr(this,void 0,void 0,function*(){e=Math.min(lIt,e);let r=uIt*Math.pow(2,e);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(e,r){return wr(this,void 0,void 0,function*(){return new Promise((n,s)=>wr(this,void 0,void 0,function*(){let o=e.message.statusCode||0,a={statusCode:o,result:null,headers:{}};o===ii.NotFound&&n(a);function c(d,p){if(typeof p=="string"){let m=new Date(p);if(!isNaN(m.valueOf()))return m}return p}i(c,"dateTimeDeserializer");let l,u;try{u=yield e.readBody(),u&&u.length>0&&(r&&r.deserializeDates?l=JSON.parse(u,c):l=JSON.parse(u),a.result=l),a.headers=e.message.headers}catch{}if(o>299){let d;l&&l.message?d=l.message:u&&u.length>0?d=u:d=`Failed request: (${o})`;let p=new oP(d,o);p.result=a.result,s(p)}else n(a)}))})}};Gt.HttpClient=YW;var ow=i(t=>Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}),"lowercaseKeys")});var vIe=I((SCr,aw)=>{"use strict";var dP=i(function(){},"NullObject");dP.prototype=Object.create(null);var lP=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,uP=/\\([\v\u0020-\u00ff])/gu,RIe=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,qm={type:"",parameters:new dP};Object.freeze(qm.parameters);Object.freeze(qm);function NIe(t){if(typeof t!="string")throw new TypeError("argument header is required and must be a string");let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(RIe.test(r)===!1)throw new TypeError("invalid media type");let n={type:r.toLowerCase(),parameters:new dP};if(e===-1)return n;let s,o,a;for(lP.lastIndex=e;o=lP.exec(t);){if(o.index!==e)throw new TypeError("invalid parameter format");e+=o[0].length,s=o[1].toLowerCase(),a=o[2],a[0]==='"'&&(a=a.slice(1,a.length-1),uP.test(a)&&(a=a.replace(uP,"$1"))),n.parameters[s]=a}if(e!==t.length)throw new TypeError("invalid parameter format");return n}i(NIe,"parse");function TIe(t){if(typeof t!="string")return qm;let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(RIe.test(r)===!1)return qm;let n={type:r.toLowerCase(),parameters:new dP};if(e===-1)return n;let s,o,a;for(lP.lastIndex=e;o=lP.exec(t);){if(o.index!==e)return qm;e+=o[0].length,s=o[1].toLowerCase(),a=o[2],a[0]==='"'&&(a=a.slice(1,a.length-1),uP.test(a)&&(a=a.replace(uP,"$1"))),n.parameters[s]=a}return e!==t.length?qm:n}i(TIe,"safeParse");aw.exports.default={parse:NIe,safeParse:TIe};aw.exports.parse=NIe;aw.exports.safeParse=TIe;aw.exports.defaultContentType=qm});var lw,Sc,swe=g(()=>{lw={warningEmitted:!1},Sc=i(t=>{if(t&&!lw.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){lw.warningEmitted=!0;return}let e=parseInt(t.substring(1,t.indexOf("."))),r=22;e "+e+" }}")};cr.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};cr.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};cr.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};cr.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,s=0,o=e.length;s{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});nP.getProxyUrl=eIt;nP.checkBypass=oIe;function eIt(t){let e=t.protocol==="https:";if(oIe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new rP(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new rP(`http://${r}`)}else return}i(eIt,"getProxyUrl");function oIe(t){if(!t.hostname)return!1;let e=t.hostname;if(tIt(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let o of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(o==="*"||s.some(a=>a===o||a.endsWith(`.${o}`)||o.startsWith(".")&&a.endsWith(`${o}`)))return!0;return!1}i(oIe,"checkBypass");function tIt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(tIt,"isLoopbackAddress");var rP=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}});var cIe=I(Gt=>{"use strict";var rIt=Gt&&Gt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nIt=Gt&&Gt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aP=Gt&&Gt.__importStar||(function(){var t=i(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;swr(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return wr(this,void 0,void 0,function*(){return new Promise(e=>wr(this,void 0,void 0,function*(){let r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};Gt.HttpClientResponse=iP;function dIt(t){return new URL(t).protocol==="https:"}i(dIt,"isHttps");var YW=class{static{i(this,"HttpClient")}constructor(e,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,r){return wr(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return wr(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return wr(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{})})}post(e,r,n){return wr(this,void 0,void 0,function*(){return this.request("POST",e,r,n||{})})}patch(e,r,n){return wr(this,void 0,void 0,function*(){return this.request("PATCH",e,r,n||{})})}put(e,r,n){return wr(this,void 0,void 0,function*(){return this.request("PUT",e,r,n||{})})}head(e,r){return wr(this,void 0,void 0,function*(){return this.request("HEAD",e,null,r||{})})}sendStream(e,r,n,s){return wr(this,void 0,void 0,function*(){return this.request(e,r,n,s)})}getJson(e){return wr(this,arguments,void 0,function*(r,n={}){n[os.Accept]=this._getExistingOrDefaultHeader(n,os.Accept,Xl.ApplicationJson);let s=yield this.get(r,n);return this._processResponse(s,this.requestOptions)})}postJson(e,r){return wr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[os.Accept]=this._getExistingOrDefaultHeader(o,os.Accept,Xl.ApplicationJson),o[os.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Xl.ApplicationJson);let c=yield this.post(n,a,o);return this._processResponse(c,this.requestOptions)})}putJson(e,r){return wr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[os.Accept]=this._getExistingOrDefaultHeader(o,os.Accept,Xl.ApplicationJson),o[os.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Xl.ApplicationJson);let c=yield this.put(n,a,o);return this._processResponse(c,this.requestOptions)})}patchJson(e,r){return wr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[os.Accept]=this._getExistingOrDefaultHeader(o,os.Accept,Xl.ApplicationJson),o[os.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Xl.ApplicationJson);let c=yield this.patch(n,a,o);return this._processResponse(c,this.requestOptions)})}request(e,r,n,s){return wr(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let o=new URL(r),a=this._prepareRequest(e,o,s),c=this._allowRetries&&cIt.includes(e)?this._maxRetries+1:1,l=0,u;do{if(u=yield this.requestRaw(a,n),u&&u.message&&u.message.statusCode===ii.Unauthorized){let p;for(let m of this.handlers)if(m.canHandleAuthentication(u)){p=m;break}return p?p.handleAuthentication(this,a,n):u}let d=this._maxRedirects;for(;u.message.statusCode&&iIt.includes(u.message.statusCode)&&this._allowRedirects&&d>0;){let p=u.message.headers.location;if(!p)break;let m=new URL(p);if(o.protocol==="https:"&&o.protocol!==m.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield u.readBody(),m.hostname!==o.hostname)for(let f in s)f.toLowerCase()==="authorization"&&delete s[f];a=this._prepareRequest(e,m,s),u=yield this.requestRaw(a,n),d--}if(!u.message.statusCode||!aIt.includes(u.message.statusCode))return u;l+=1,l{function o(a,c){a?s(a):c?n(c):s(new Error("Unknown error"))}i(o,"callbackForResult"),this.requestRawWithCallback(e,r,o)})})}requestRawWithCallback(e,r,n){typeof r=="string"&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let s=!1;function o(l,u){s||(s=!0,n(l,u))}i(o,"handleResult");let a=e.httpModule.request(e.options,l=>{let u=new iP(l);o(void 0,u)}),c;a.on("socket",l=>{c=l}),a.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),o(new Error(`Request timeout: ${e.options.path}`))}),a.on("error",function(l){o(l)}),r&&typeof r=="string"&&a.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){a.end()}),r.pipe(a)):a.end()}getAgent(e){let r=new URL(e);return this._getAgent(r)}getAgentDispatcher(e){let r=new URL(e),n=WW.getProxyUrl(r);if(n&&n.hostname)return this._getProxyAgentDispatcher(r,n)}_prepareRequest(e,r,n){let s={};s.parsedUrl=r;let o=s.parsedUrl.protocol==="https:";s.httpModule=o?aIe:VW;let a=o?443:80;if(s.options={},s.options.host=s.parsedUrl.hostname,s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a,s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||""),s.options.method=e,s.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(s.options.headers["user-agent"]=this.userAgent),s.options.agent=this._getAgent(s.parsedUrl),this.handlers)for(let c of this.handlers)c.prepareRequest(s.options);return s}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},ow(this.requestOptions.headers),ow(e||{})):ow(e||{})}_getExistingOrDefaultHeader(e,r,n){let s;if(this.requestOptions&&this.requestOptions.headers){let a=ow(this.requestOptions.headers)[r];a&&(s=typeof a=="number"?a.toString():a)}let o=e[r];return o!==void 0?typeof o=="number"?o.toString():o:s!==void 0?s:n}_getExistingOrDefaultContentTypeHeader(e,r){let n;if(this.requestOptions&&this.requestOptions.headers){let o=ow(this.requestOptions.headers)[os.ContentType];o&&(typeof o=="number"?n=String(o):Array.isArray(o)?n=o.join(", "):n=o)}let s=e[os.ContentType];return s!==void 0?typeof s=="number"?String(s):Array.isArray(s)?s.join(", "):s:n!==void 0?n:r}_getAgent(e){let r,n=WW.getProxyUrl(e),s=n&&n.hostname;if(this._keepAlive&&s&&(r=this._proxyAgent),s||(r=this._agent),r)return r;let o=e.protocol==="https:",a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||VW.globalAgent.maxSockets),n&&n.hostname){let c={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},l,u=n.protocol==="https:";o?l=u?sP.httpsOverHttps:sP.httpsOverHttp:l=u?sP.httpOverHttps:sP.httpOverHttp,r=l(c),this._proxyAgent=r}if(!r){let c={keepAlive:this._keepAlive,maxSockets:a};r=o?new aIe.Agent(c):new VW.Agent(c),this._agent=r}return o&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_getProxyAgentDispatcher(e,r){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let s=e.protocol==="https:";return n=new sIt.ProxyAgent(Object.assign({uri:r.href,pipelining:this._keepAlive?1:0},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`})),this._proxyAgentDispatcher=n,s&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let r=e||"actions/http-client",n=process.env.ACTIONS_ORCHESTRATION_ID;if(n){let s=n.replace(/[^a-z0-9_.-]/gi,"_");return`${r} actions_orchestration_id/${s}`}return r}_performExponentialBackoff(e){return wr(this,void 0,void 0,function*(){e=Math.min(lIt,e);let r=uIt*Math.pow(2,e);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(e,r){return wr(this,void 0,void 0,function*(){return new Promise((n,s)=>wr(this,void 0,void 0,function*(){let o=e.message.statusCode||0,a={statusCode:o,result:null,headers:{}};o===ii.NotFound&&n(a);function c(d,p){if(typeof p=="string"){let m=new Date(p);if(!isNaN(m.valueOf()))return m}return p}i(c,"dateTimeDeserializer");let l,u;try{u=yield e.readBody(),u&&u.length>0&&(r&&r.deserializeDates?l=JSON.parse(u,c):l=JSON.parse(u),a.result=l),a.headers=e.message.headers}catch{}if(o>299){let d;l&&l.message?d=l.message:u&&u.length>0?d=u:d=`Failed request: (${o})`;let p=new oP(d,o);p.result=a.result,s(p)}else n(a)}))})}};Gt.HttpClient=YW;var ow=i(t=>Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}),"lowercaseKeys")});var vIe=I((wCr,aw)=>{"use strict";var dP=i(function(){},"NullObject");dP.prototype=Object.create(null);var lP=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu,uP=/\\([\v\u0020-\u00ff])/gu,RIe=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u,qm={type:"",parameters:new dP};Object.freeze(qm.parameters);Object.freeze(qm);function NIe(t){if(typeof t!="string")throw new TypeError("argument header is required and must be a string");let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(RIe.test(r)===!1)throw new TypeError("invalid media type");let n={type:r.toLowerCase(),parameters:new dP};if(e===-1)return n;let s,o,a;for(lP.lastIndex=e;o=lP.exec(t);){if(o.index!==e)throw new TypeError("invalid parameter format");e+=o[0].length,s=o[1].toLowerCase(),a=o[2],a[0]==='"'&&(a=a.slice(1,a.length-1),uP.test(a)&&(a=a.replace(uP,"$1"))),n.parameters[s]=a}if(e!==t.length)throw new TypeError("invalid parameter format");return n}i(NIe,"parse");function TIe(t){if(typeof t!="string")return qm;let e=t.indexOf(";"),r=e!==-1?t.slice(0,e).trim():t.trim();if(RIe.test(r)===!1)return qm;let n={type:r.toLowerCase(),parameters:new dP};if(e===-1)return n;let s,o,a;for(lP.lastIndex=e;o=lP.exec(t);){if(o.index!==e)return qm;e+=o[0].length,s=o[1].toLowerCase(),a=o[2],a[0]==='"'&&(a=a.slice(1,a.length-1),uP.test(a)&&(a=a.replace(uP,"$1"))),n.parameters[s]=a}return e!==t.length?qm:n}i(TIe,"safeParse");aw.exports.default={parse:NIe,safeParse:TIe};aw.exports.parse=NIe;aw.exports.safeParse=TIe;aw.exports.defaultContentType=qm});var lw,Sc,swe=g(()=>{lw={warningEmitted:!1},Sc=i(t=>{if(t&&!lw.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){lw.warningEmitted=!0;return}let e=parseInt(t.substring(1,t.indexOf("."))),r=22;e=${r}. You are running node ${t}. @@ -96,7 +96,7 @@ More information can be found at: https://a.co/c895JFp`))}},"emitWarningIfUnsupp `+m}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(m):r.logger?.warn?.(m)}typeof p.$responseBodyText<"u"&&p.$response&&(p.$response.body=p.$responseBodyText);try{if(pn.isInstance(s)){let{headers:f={},statusCode:A}=s,h=Object.entries(f);p.$metadata={httpStatusCode:A,requestId:xY(/^x-[\w-]+-request-?id$/,h),extendedRequestId:xY(/^x-[\w-]+-id-2$/,h),cfId:xY(/^x-[\w-]+-cf-id$/,h)}}}catch{}}throw p}},"schemaDeserializationMiddleware"),xY=i((t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],"findHeader")});var Lwe,Owe=g(()=>{Et();yP();Lwe=i(t=>(e,r)=>async n=>{let{operationSchema:s}=Bt(r),[,o,a,c,l,u]=s??[],d=r.endpointV2?async()=>Io(r.endpointV2):t.endpoint,p=await t.protocol.serializeRequest(dg(o,a,c,l,u),n.input,{...t,...r,endpoint:d});return e({...n,request:p})},"schemaSerializationMiddleware")});function bc(t){return{applyToStack:i(e=>{e.add(Lwe(t),BY),e.add(Dwe(t),bY),t.protocol.setSerdeContext(t)},"applyToStack")}}var bY,BY,Mwe=g(()=>{kwe();Owe();bY={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},BY={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i(bc,"getSchemaSerdePlugin")});var lr,wd=g(()=>{lr=class{static{i(this,"Schema")}name;namespace;traits;static assign(e,r){return Object.assign(e,r)}static[Symbol.hasInstance](e){let r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}getName(){return this.namespace+"#"+this.name}}});var mw,Fwe,Uwe=g(()=>{wd();mw=class t extends lr{static{i(this,"ListSchema")}static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=t.symbol},Fwe=i((t,e,r,n)=>lr.assign(new mw,{name:e,namespace:t,traits:r,valueSchema:n}),"list")});var fw,qwe,Gwe=g(()=>{wd();fw=class t extends lr{static{i(this,"MapSchema")}static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=t.symbol},qwe=i((t,e,r,n,s)=>lr.assign(new fw,{name:e,namespace:t,traits:r,keySchema:n,valueSchema:s}),"map")});var Aw,Hwe,$we=g(()=>{wd();Aw=class t extends lr{static{i(this,"OperationSchema")}static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=t.symbol},Hwe=i((t,e,r,n,s)=>lr.assign(new Aw,{name:e,namespace:t,traits:r,input:n,output:s}),"op")});var Vm,zwe,RY=g(()=>{wd();Vm=class t extends lr{static{i(this,"StructureSchema")}static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=t.symbol},zwe=i((t,e,r,n,s)=>lr.assign(new Vm,{name:e,namespace:t,traits:r,memberNames:n,memberList:s}),"struct")});var hw,Vwe,Wwe=g(()=>{wd();RY();hw=class t extends Vm{static{i(this,"ErrorSchema")}static symbol=Symbol.for("@smithy/err");ctor;symbol=t.symbol},Vwe=i((t,e,r,n,s,o)=>lr.assign(new hw,{name:e,namespace:t,traits:r,memberNames:n,memberList:s,ctor:null}),"error")});function ji(t){if(typeof t=="object")return t;if(t=t|0,gw[t])return gw[t];let e={},r=0;for(let n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[n]=1);return gw[t]=e}var gw,NY=g(()=>{gw=[];i(ji,"translateTraits")});function Ew(t,e){if(t instanceof te)return Object.assign(t,{memberName:e,_isMemberSchema:!0});let r=te;return new r(t,e)}var yw,Cw,Iw,te,TY,vY,Ywe=g(()=>{SY();NY();yw={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},Cw=[],Iw={},te=class t{static{i(this,"NormalizedSchema")}ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=t.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;let n=[],s=e,o=e;for(this._isMemberSchema=!1;TY(s);)n.push(s[1]),s=s[0],o=ci(s),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let a=n.length-1;a>=0;--a){let c=n[a];Object.assign(this.memberTraits,ji(c))}}else this.memberTraits=0;if(o instanceof t){let a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=ci(o),vY(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){let r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}static of(e){let r=typeof e=="function"||typeof e=="object"&&e!==null;if(typeof e=="number"){if(Cw[e])return Cw[e]}else if(typeof e=="string"){if(Iw[e])return Iw[e]}else if(r&&e[yw.ns])return e[yw.ns];let n=ci(e);if(n instanceof t)return n;if(TY(n)){let[o,a]=n;if(o instanceof t)return Object.assign(o.getMergedTraits(),ji(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}let s=new t(n);return r?e[yw.ns]=s:typeof n=="string"?Iw[n]=s:typeof n=="number"?Cw[n]=s:s}getSchema(){let e=this.schema;return Array.isArray(e)&&e[0]===0?e[4]:e}getName(e=!1){let{name:r}=this;return!e&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){let e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){let e=this.getSchema();if(typeof e!="object")return!1;let r=e[0];return r===3||r===-3||r===4}isUnionSchema(){let e=this.getSchema();return typeof e!="object"?!1:e[0]===4}isBlobSchema(){let e=this.getSchema();return e===21||e===42}isTimestampSchema(){let e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){let{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ji(this.memberTraits)}getOwnTraits(){return ji(this.traits)}getKeySchema(){let[e,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let n=this.getSchema(),s=e?15:n[4]??0;return Ew([s,0],"key")}getValueSchema(){let e=this.getSchema(),[r,n,s]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],o=typeof e=="number"?63&e:e&&typeof e=="object"&&(n||s)?e[3+e[0]]:r?15:void 0;if(o!=null)return Ew([o,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){let r=this.getSchema();if(this.isStructSchema()&&r[4].includes(e)){let n=r[4].indexOf(e),s=r[5][n];return Ew(TY(s)?s:[s,0],e)}if(this.isDocumentSchema())return Ew([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){let e={};try{for(let[r,n]of this.structIterator())e[r]=n}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(let[e,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");let e=this.getSchema(),r=e[4].length,n=e[yw.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let s=0;sArray.isArray(t)&&t.length===2,"isMemberSchema"),vY=i(t=>Array.isArray(t)&&t.length>=5,"isStaticSchema")});var pg,Jwe,jwe,Kwe=g(()=>{wd();pg=class t extends lr{static{i(this,"SimpleSchema")}static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=t.symbol},Jwe=i((t,e,r,n)=>lr.assign(new pg,{name:e,namespace:t,traits:n,schemaRef:r}),"sim"),jwe=i((t,e,r,n)=>lr.assign(new pg,{name:e,namespace:t,traits:r,schemaRef:n}),"simAdapter")});var Xwe,Zwe=g(()=>{Xwe={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128}});var Ht,eSe=g(()=>{Ht=class t{static{i(this,"TypeRegistry")}namespace;schemas;exceptions;static registries=new Map;constructor(e,r=new Map,n=new Map){this.namespace=e,this.schemas=r,this.exceptions=n}static for(e){return t.registries.has(e)||t.registries.set(e,new t(e)),t.registries.get(e)}copyFrom(e){let{schemas:r,exceptions:n}=this;for(let[s,o]of e.schemas)r.has(s)||r.set(s,o);for(let[s,o]of e.exceptions)n.has(s)||n.set(s,o)}register(e,r){let n=this.normalizeShapeId(e);for(let s of[this,t.for(n.split("#")[0])])s.schemas.set(n,r)}getSchema(e){let r=this.normalizeShapeId(e);if(!this.schemas.has(r)){if(!e.includes("#")){let n="#"+e,s=[];for(let[o,a]of this.schemas.entries())o.endsWith(n)&&s.push(a);if(s.length===1)return s[0]}throw new Error(`@smithy/core/schema - schema not found for ${r}`)}return this.schemas.get(r)}registerError(e,r){let n=e,s=n[1];for(let o of[this,t.for(s)])o.schemas.set(s+"#"+n[2],n),o.exceptions.set(n,r)}getErrorCtor(e){let r=e;return this.exceptions.has(r)?this.exceptions.get(r):t.for(r[1]).exceptions.get(r)}getBaseException(){for(let e of this.exceptions.keys())if(Array.isArray(e)){let[,r,n]=e,s=r+"#"+n;if(s.startsWith("smithy.ts.sdk.synthetic.")&&s.endsWith("ServiceException"))return e}}find(e){for(let r of this.schemas.values())if(e(r))return r}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}});var PY={};Dr(PY,{ErrorSchema:()=>hw,ListSchema:()=>mw,MapSchema:()=>fw,NormalizedSchema:()=>te,OperationSchema:()=>Aw,SCHEMA:()=>Xwe,Schema:()=>lr,SimpleSchema:()=>pg,StructureSchema:()=>Vm,TypeRegistry:()=>Ht,deref:()=>ci,deserializerMiddlewareOption:()=>bY,error:()=>Vwe,getSchemaSerdePlugin:()=>bc,isStaticSchema:()=>vY,list:()=>Fwe,map:()=>qwe,op:()=>Hwe,operation:()=>dg,serializerMiddlewareOption:()=>BY,sim:()=>Jwe,simAdapter:()=>jwe,simpleSchemaCacheN:()=>Cw,simpleSchemaCacheS:()=>Iw,struct:()=>zwe,traitsCache:()=>gw,translateTraits:()=>ji});var st=g(()=>{SY();Mwe();Uwe();Gwe();$we();yP();Wwe();Ywe();wd();Kwe();RY();Zwe();NY();eSe()});function mg(t,e){if(e==null)return e;let r=te.of(t);if(r.getMergedTraits().sensitive)return QY;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return QY}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return QY}else if(r.isStructSchema()&&typeof e=="object"){let n=e,s={};for(let[o,a]of r.structIterator())n[o]!=null&&(s[o]=mg(a,n[o]));return s}return e}var QY,_Y=g(()=>{st();QY="***SensitiveInformation***";i(mg,"schemaLogFilter")});var tSe,is,DY,kY=g(()=>{tSe=R(xc());AP();_Y();is=class{static{i(this,"Command")}middlewareStack=Id();schema;static classBuilder(){return new DY}resolveMiddlewareWithContext(e,r,n,{middlewareFn:s,clientName:o,commandName:a,inputFilterSensitiveLog:c,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:d,CommandCtor:p}){for(let C of s.bind(this)(p,e,r,n))this.middlewareStack.use(C);let m=e.concat(this.middlewareStack),{logger:f}=r,A={logger:f,clientName:o,commandName:a,inputFilterSensitiveLog:c,outputFilterSensitiveLog:l,[tSe.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...d},{requestHandler:h}=r,E=n??{};return u.eventStream&&(E={isEventStream:!0,...E}),m.resolve(C=>h.handle(C.request,E),A)}},DY=class{static{i(this,"ClassBuilder")}_init=i(()=>{},"_init");_ep={};_middlewareFn=i(()=>[],"_middlewareFn");_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,r,n={}){return this._smithyContext={service:e,operation:r,...n},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=n=>n,r=n=>n){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){let e=this,r;return r=class extends is{static{i(this,"CommandRef")}input;static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.input=n??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,s,o){let a=e._operationSchema,c=a?.[4]??a?.input,l=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(n,s,o,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(a?mg.bind(null,c):u=>u),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(a?mg.bind(null,l):u=>u),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}});var rSe,nSe=g(()=>{rSe="***SensitiveInformation***"});var Bc,sSe=g(()=>{Bc=i((t,e,r)=>{for(let[o,a]of Object.entries(t)){let c=i(async function(u,d,p){let m=new a(u);if(typeof d=="function")this.send(m,d);else if(typeof p=="function"){if(typeof d!="object")throw new Error(`Expected http options but got ${typeof d}`);this.send(m,d||{},p)}else return this.send(m,d)},"methodImpl"),l=(o[0].toLowerCase()+o.slice(1)).replace(/Command$/,"");e.prototype[l]=c}let{paginators:n={},waiters:s={}}=r??{};for(let[o,a]of Object.entries(n))e.prototype[o]===void 0&&(e.prototype[o]=function(c={},l,...u){return a({...l,client:this},c,...u)});for(let[o,a]of Object.entries(s))e.prototype[o]===void 0&&(e.prototype[o]=async function(c={},l,...u){let d=l;return typeof l=="number"&&(d={maxWaitTime:l}),a({...d,client:this},c,...u)})},"createAggregatedClient")});var li,Wm,LY=g(()=>{li=class t extends Error{static{i(this,"ServiceException")}$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;let r=e;return t.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;let r=e;return this===t?t.isInstance(e):t.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}},Wm=i((t,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,s])=>{(t[n]==null||t[n]==="")&&(t[n]=s)});let r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},"decorateServiceException")});var OY,oSe,Rwt,iSe=g(()=>{LY();OY=i(({output:t,parsedBody:e,exceptionCtor:r,errorCode:n})=>{let s=Rwt(t),o=s.httpStatusCode?s.httpStatusCode+"":void 0,a=new r({name:e?.code||e?.Code||n||o||"UnknownError",$fault:"client",$metadata:s});throw Wm(a,e)},"throwDefaultError"),oSe=i(t=>({output:e,parsedBody:r,errorCode:n})=>{OY({output:e,parsedBody:r,exceptionCtor:t,errorCode:n})},"withBaseException"),Rwt=i(t=>({httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}),"deserializeMetadata")});var Rc,aSe=g(()=>{Rc=i(t=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},"loadConfigsForDefaultMode")});var cSe,Nc,lSe=g(()=>{cSe=!1,Nc=i(t=>{t&&!cSe&&parseInt(t.substring(1,t.indexOf(".")))<16&&(cSe=!0)},"emitWarningIfUnsupportedVersion")});var fg,uSe,EP,CP,MY=g(()=>{fg=R(xc()),uSe=Object.values(fg.AlgorithmId),EP=i(t=>{let e=[];for(let r in fg.AlgorithmId){let n=fg.AlgorithmId[r];t[n]!==void 0&&e.push({algorithmId:i(()=>n,"algorithmId"),checksumConstructor:i(()=>t[n],"checksumConstructor")})}for(let[r,n]of Object.entries(t.checksumAlgorithms??{}))e.push({algorithmId:i(()=>r,"algorithmId"),checksumConstructor:i(()=>n,"checksumConstructor")});return{addChecksumAlgorithm(r){t.checksumAlgorithms=t.checksumAlgorithms??{};let n=r.algorithmId(),s=r.checksumConstructor();uSe.includes(n)?t.checksumAlgorithms[n.toUpperCase()]=s:t.checksumAlgorithms[n]=s,e.push(r)},checksumAlgorithms(){return e}}},"getChecksumConfiguration"),CP=i(t=>{let e={};return t.checksumAlgorithms().forEach(r=>{let n=r.algorithmId();uSe.includes(n)&&(e[n]=r.checksumConstructor())}),e},"resolveChecksumRuntimeConfig")});var IP,wP,FY=g(()=>{IP=i(t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),"getRetryConfiguration"),wP=i(t=>{let e={};return e.retryStrategy=t.retryStrategy(),e},"resolveRetryRuntimeConfig")});var Ki,dSe,Tc,pSe=g(()=>{MY();FY();Ki=i(t=>Object.assign(EP(t),IP(t)),"getDefaultExtensionConfiguration"),dSe=Ki,Tc=i(t=>Object.assign(CP(t),wP(t)),"resolveDefaultRuntimeConfig")});var mSe,fSe=g(()=>{mSe=i(t=>Array.isArray(t)?t:[t],"getArrayIfSingleItem")});var Ym,ASe=g(()=>{Ym=i(t=>{let e="#text";for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r][e]!==void 0?t[r]=t[r][e]:typeof t[r]=="object"&&t[r]!==null&&(t[r]=Ym(t[r]));return t},"getValueFromTextNode")});var hSe,gSe=g(()=>{hSe=i(t=>t!=null,"isSerializableHeaderValue")});var Ls,ySe=g(()=>{Ls=class{static{i(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}}});function UY(t,e,r){let n,s,o;if(typeof e>"u"&&typeof r>"u")n={},o=t;else{if(n=t,typeof e=="function")return s=e,o=r,Nwt(n,s,o);o=e}for(let a of Object.keys(o)){if(!Array.isArray(o[a])){n[a]=o[a];continue}ISe(n,null,o,a)}return n}var ESe,CSe,Nwt,ISe,Twt,vwt,wSe=g(()=>{i(UY,"map");ESe=i(t=>{let e={};for(let[r,n]of Object.entries(t||{}))e[r]=[,n];return e},"convertMap"),CSe=i((t,e)=>{let r={};for(let n in e)ISe(r,t,e,n);return r},"take"),Nwt=i((t,e,r)=>UY(t,Object.entries(r).reduce((n,[s,o])=>(Array.isArray(o)?n[s]=o:typeof o=="function"?n[s]=[e,o()]:n[s]=[e,o],n),{})),"mapWithFilter"),ISe=i((t,e,r,n)=>{if(e!==null){let a=r[n];typeof a=="function"&&(a=[,a]);let[c=Twt,l=vwt,u=n]=a;(typeof c=="function"&&c(e[u])||typeof c!="function"&&c)&&(t[n]=l(e[u]));return}let[s,o]=r[n];if(typeof o=="function"){let a,c=s===void 0&&(a=o())!=null,l=typeof s=="function"&&!!s(void 0)||typeof s!="function"&&!!s;c?t[n]=a:l&&(t[n]=o())}else{let a=s===void 0&&o!=null,c=typeof s=="function"&&!!s(o)||typeof s!="function"&&!!s;(a||c)&&(t[n]=o)}},"applyInstruction"),Twt=i(t=>t!=null,"nonNullish"),vwt=i(t=>t,"pass")});var SSe,xSe,bSe=g(()=>{SSe=i(t=>{if(t!==t)return"NaN";switch(t){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return t}},"serializeFloat"),xSe=i(t=>t.toISOString().replace(".000Z","Z"),"serializeDateTime")});var SP,BSe=g(()=>{SP=i(t=>{if(t==null)return{};if(Array.isArray(t))return t.filter(e=>e!=null).map(SP);if(typeof t=="object"){let e={};for(let r of Object.keys(t))t[r]!=null&&(e[r]=SP(t[r]));return e}return t},"_json")});function vc(t,e,r,n){return i(function(o,a,c,l,u={}){let d=Object.assign({},t,o);return is.classBuilder().ep(d).m(function(p,m,f,A){let h=a.call(this,p,m,f,A);return h.unshift(n(f,p.getEndpointParameterInstructions())),h}).s(e,c,u).n(r,c.charAt(0).toUpperCase()+c.slice(1)+"Command").sc(l).build()},"makeCommand")}var RSe=g(()=>{kY();i(vc,"makeBuilder")});var Ag={};Dr(Ag,{AlgorithmId:()=>fg.AlgorithmId,Client:()=>vn,Command:()=>is,NoOpLogger:()=>Ls,SENSITIVE_STRING:()=>rSe,ServiceException:()=>li,WaiterState:()=>wo,_json:()=>SP,checkExceptions:()=>bwe,constructStack:()=>Id,convertMap:()=>ESe,createAggregatedClient:()=>Bc,createWaiter:()=>Pwe,decorateServiceException:()=>Wm,emitWarningIfUnsupportedVersion:()=>Nc,getArrayIfSingleItem:()=>mSe,getChecksumConfiguration:()=>EP,getDefaultClientConfiguration:()=>dSe,getDefaultExtensionConfiguration:()=>Ki,getRetryConfiguration:()=>IP,getSmithyContext:()=>Bt,getValueFromTextNode:()=>Ym,invalidFunction:()=>Ewe,invalidProvider:()=>Iwe,isSerializableHeaderValue:()=>hSe,loadConfigsForDefaultMode:()=>Rc,makeBuilder:()=>vc,map:()=>UY,normalizeProvider:()=>ht,resolveChecksumRuntimeConfig:()=>CP,resolveDefaultRuntimeConfig:()=>Tc,resolveRetryRuntimeConfig:()=>wP,schemaLogFilter:()=>mg,serializeDateTime:()=>xSe,serializeFloat:()=>SSe,take:()=>CSe,throwDefaultError:()=>OY,waiterServiceDefaults:()=>hP,withBaseException:()=>oSe});var we=g(()=>{AP();Et();Et();Cwe();wwe();Qwe();gP();_we();kY();nSe();sSe();iSe();aSe();lSe();LY();pSe();MY();FY();fSe();ASe();gSe();ySe();wSe();_Y();bSe();BSe();RSe()});var xP,qY=g(()=>{xP=i(t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]","isArrayBuffer")});var Xi,Sd,xd=g(()=>{qY();Xi=i((t,e=0,r=t.byteLength-e)=>{if(!xP(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return Buffer.from(t,e,r)},"fromArrayBuffer"),Sd=i((t,e)=>{if(typeof t!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?Buffer.from(t,e):Buffer.from(t)},"fromString")});var Pwt,Sr,NSe=g(()=>{xd();Pwt=/^[A-Za-z0-9+/]*={0,2}$/,Sr=i(t=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Pwt.exec(t))throw new TypeError("Invalid base64 string.");let e=Sd(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},"fromBase64")});var Hr,bP=g(()=>{xd();Hr=i(t=>{let e=Sd(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8")});var Jt,GY=g(()=>{xd();bP();Jt=i(t=>{let e;if(typeof t=="string"?e=Hr(t):e=t,typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Xi(e.buffer,e.byteOffset,e.byteLength).toString("base64")},"toBase64")});function TSe(t,e,r,n){return class BP extends Uint8Array{static{i(this,"Uint8ArrayBlobAdapter")}static fromString(o,a="utf-8"){if(typeof o=="string")return a==="base64"?BP.mutate(n(o)):BP.mutate(e(o));throw new Error(`Unsupported conversion from ${typeof o} to Uint8ArrayBlobAdapter.`)}static mutate(o){return Object.setPrototypeOf(o,BP.prototype),o}transformToString(o="utf-8"){return o==="base64"?r(this):t(this)}}}var vSe=g(()=>{i(TSe,"bindUint8ArrayBlobAdapter")});var xr,PSe=g(()=>{xd();xr=i(t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Xi(t.buffer,t.byteOffset,t.byteLength).toString("utf8")},"toUtf8")});function QSe(t){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?()=>crypto.randomUUID():()=>{let e=new Uint8Array(16);return t(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Pn[e[0]]+Pn[e[1]]+Pn[e[2]]+Pn[e[3]]+"-"+Pn[e[4]]+Pn[e[5]]+"-"+Pn[e[6]]+Pn[e[7]]+"-"+Pn[e[8]]+Pn[e[9]]+"-"+Pn[e[10]]+Pn[e[11]]+Pn[e[12]]+Pn[e[13]]+Pn[e[14]]+Pn[e[15]]}}var Pn,_Se=g(()=>{Pn=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));i(QSe,"bindV4")});var DSe,kSe=g(()=>{DSe=i((t,e,r=n=>n)=>t,"copyDocumentWithTransform")});var LSe,OSe,hg,Qwt,ww,gg,MSe,RP,NP,TP,HY,_wt,FSe,$Y,USe,PP,Sw,qSe,QP,Dwt,Eg,_P,GSe,HSe,$Se,zSe,zY,VSe,WSe,bd,DP,vP,yg,VY=g(()=>{LSe=i(t=>{switch(t){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${t}"`)}},"parseBoolean"),OSe=i(t=>{if(t!=null){if(typeof t=="number"){if((t===0||t===1)&&yg.warn(vP(`Expected boolean, got ${typeof t}: ${t}`)),t===0)return!1;if(t===1)return!0}if(typeof t=="string"){let e=t.toLowerCase();if((e==="false"||e==="true")&&yg.warn(vP(`Expected boolean, got ${typeof t}: ${t}`)),e==="false")return!1;if(e==="true")return!0}if(typeof t=="boolean")return t;throw new TypeError(`Expected boolean, got ${typeof t}: ${t}`)}},"expectBoolean"),hg=i(t=>{if(t!=null){if(typeof t=="string"){let e=parseFloat(t);if(!Number.isNaN(e))return String(e)!==String(t)&&yg.warn(vP(`Expected number but observed string: ${t}`)),e}if(typeof t=="number")return t;throw new TypeError(`Expected number, got ${typeof t}: ${t}`)}},"expectNumber"),Qwt=Math.ceil(2**127*(2-2**-23)),ww=i(t=>{let e=hg(t);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0&&Math.abs(e)>Qwt)throw new TypeError(`Expected 32-bit float, got ${t}`);return e},"expectFloat32"),gg=i(t=>{if(t!=null){if(Number.isInteger(t)&&!Number.isNaN(t))return t;throw new TypeError(`Expected integer, got ${typeof t}: ${t}`)}},"expectLong"),MSe=gg,RP=i(t=>HY(t,32),"expectInt32"),NP=i(t=>HY(t,16),"expectShort"),TP=i(t=>HY(t,8),"expectByte"),HY=i((t,e)=>{let r=gg(t);if(r!==void 0&&_wt(r,e)!==r)throw new TypeError(`Expected ${e}-bit integer, got ${t}`);return r},"expectSizedInt"),_wt=i((t,e)=>{switch(e){case 32:return Int32Array.of(t)[0];case 16:return Int16Array.of(t)[0];case 8:return Int8Array.of(t)[0]}},"castInt"),FSe=i((t,e)=>{if(t==null)throw e?new TypeError(`Expected a non-null value for ${e}`):new TypeError("Expected a non-null value");return t},"expectNonNull"),$Y=i(t=>{if(t==null)return;if(typeof t=="object"&&!Array.isArray(t))return t;let e=Array.isArray(t)?"array":typeof t;throw new TypeError(`Expected object, got ${e}: ${t}`)},"expectObject"),USe=i(t=>{if(t!=null){if(typeof t=="string")return t;if(["boolean","number","bigint"].includes(typeof t))return yg.warn(vP(`Expected string, got ${typeof t}: ${t}`)),String(t);throw new TypeError(`Expected string, got ${typeof t}: ${t}`)}},"expectString"),PP=i(t=>{if(t==null)return;let e=$Y(t),r=[];for(let n in e)e[n]!=null&&r.push(n);if(r.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(r.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${r} were not null.`);return e},"expectUnion"),Sw=i(t=>hg(typeof t=="string"?Eg(t):t),"strictParseDouble"),qSe=Sw,QP=i(t=>ww(typeof t=="string"?Eg(t):t),"strictParseFloat32"),Dwt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Eg=i(t=>{let e=t.match(Dwt);if(e===null||e[0].length!==t.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(t)},"parseNumber"),_P=i(t=>typeof t=="string"?zSe(t):hg(t),"limitedParseDouble"),GSe=_P,HSe=_P,$Se=i(t=>typeof t=="string"?zSe(t):ww(t),"limitedParseFloat32"),zSe=i(t=>{switch(t){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${t}`)}},"parseFloatString"),zY=i(t=>gg(typeof t=="string"?Eg(t):t),"strictParseLong"),VSe=zY,WSe=i(t=>RP(typeof t=="string"?Eg(t):t),"strictParseInt32"),bd=i(t=>NP(typeof t=="string"?Eg(t):t),"strictParseShort"),DP=i(t=>TP(typeof t=="string"?Eg(t):t),"strictParseByte"),vP=i(t=>String(new TypeError(t).stack||t).split(` `).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(` `),"stackTraceWarning"),yg={warn:console.warn}});function Zi(t){let e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),s=t.getUTCDate(),o=t.getUTCHours(),a=t.getUTCMinutes(),c=t.getUTCSeconds(),l=s<10?`0${s}`:`${s}`,u=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,p=c<10?`0${c}`:`${c}`;return`${kwt[n]}, ${l} ${YY[r]} ${e} ${u}:${d}:${p} GMT`}var kwt,YY,Lwt,YSe,Owt,kP,Mwt,Fwt,Uwt,Ig,LP,xw,qwt,Gwt,Hwt,WY,$wt,zwt,Vwt,Pc,Wwt,Ywt,Cg,JSe=g(()=>{VY();kwt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],YY=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];i(Zi,"dateToUtcString");Lwt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),YSe=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=Lwt.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,a,c,l,u]=e,d=bd(Cg(n)),p=Pc(s,"month",1,12),m=Pc(o,"day",1,31);return xw(d,p,m,{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u})},"parseRfc3339DateTime"),Owt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/),kP=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=Owt.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,a,c,l,u,d]=e,p=bd(Cg(n)),m=Pc(s,"month",1,12),f=Pc(o,"day",1,31),A=xw(p,m,f,{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&A.setTime(A.getTime()-Ywt(d)),A},"parseRfc3339DateTimeWithOffset"),Mwt=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Fwt=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Uwt=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Ig=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Mwt.exec(t);if(e){let[r,n,s,o,a,c,l,u]=e;return xw(bd(Cg(o)),WY(s),Pc(n,"day",1,31),{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u})}if(e=Fwt.exec(t),e){let[r,n,s,o,a,c,l,u]=e;return Hwt(xw(qwt(o),WY(s),Pc(n,"day",1,31),{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u}))}if(e=Uwt.exec(t),e){let[r,n,s,o,a,c,l,u]=e;return xw(bd(Cg(u)),WY(n),Pc(s.trimLeft(),"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),LP=i(t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=Sw(t);else if(typeof t=="object"&&t.tag===1)e=t.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))},"parseEpochTimestamp"),xw=i((t,e,r,n)=>{let s=e-1;return zwt(t,s,r),new Date(Date.UTC(t,s,r,Pc(n.hours,"hour",0,23),Pc(n.minutes,"minute",0,59),Pc(n.seconds,"seconds",0,60),Wwt(n.fractionalMilliseconds)))},"buildDate"),qwt=i(t=>{let e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+bd(Cg(t));return rt.getTime()-new Date().getTime()>Gwt?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,"adjustRfc850Year"),WY=i(t=>{let e=YY.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},"parseMonthByShortName"),$wt=[31,28,31,30,31,30,31,31,30,31,30,31],zwt=i((t,e,r)=>{let n=$wt[e];if(e===1&&Vwt(t)&&(n=29),r>n)throw new TypeError(`Invalid day for ${YY[e]} in ${t}: ${r}`)},"validateDayOfMonth"),Vwt=i(t=>t%4===0&&(t%100!==0||t%400===0),"isLeapYear"),Pc=i((t,e,r,n)=>{let s=DP(Cg(t));if(sn)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return s},"parseDateValue"),Wwt=i(t=>t==null?0:QP("0."+t)*1e3,"parseMilliseconds"),Ywt=i(t=>{let e=t[0],r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);let n=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(n*60+s)*60*1e3},"parseOffsetToMilliseconds"),Cg=i(t=>{let e=0;for(;e{Qn=i(function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})},"LazyJsonString");Qn.from=t=>t&&typeof t=="object"&&(t instanceof Qn||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.prototype?Qn(String(t)):Qn(JSON.stringify(t));Qn.fromObject=Qn.from});function OP(t){return(t.includes(",")||t.includes('"'))&&(t=`"${t.replace(/"/g,'\\"')}"`),t}var KSe=g(()=>{i(OP,"quoteHeader")});function Zl(t,e,r){let n=Number(t);if(nr)throw new Error(`Value ${n} out of range [${e}, ${r}]`)}var JY,jY,KY,XSe,ZSe,Jwt,jwt,Kwt,Xwt,Zwt,Jm,MP,FP,exe=g(()=>{JY="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",jY="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",KY="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",XSe="(\\d?\\d)",ZSe="(\\d{4})",Jwt=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),jwt=new RegExp(`^${JY}, ${XSe} ${jY} ${ZSe} ${KY} GMT$`),Kwt=new RegExp(`^${JY}, ${XSe}-${jY}-(\\d\\d) ${KY} GMT$`),Xwt=new RegExp(`^${JY} ${jY} ( [1-9]|\\d\\d) ${KY} ${ZSe}$`),Zwt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Jm=i(t=>{if(t==null)return;let e=NaN;if(typeof t=="number")e=t;else if(typeof t=="string"){if(!/^-?\d*\.?\d+$/.test(t))throw new TypeError("parseEpochTimestamp - numeric string invalid.");e=Number.parseFloat(t)}else typeof t=="object"&&t.tag===1&&(e=t.value);if(isNaN(e)||Math.abs(e)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(e*1e3))},"_parseEpochTimestamp"),MP=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC3339 timestamps must be strings");let e=Jwt.exec(t);if(!e)throw new TypeError(`Invalid RFC3339 timestamp format ${t}`);let[,r,n,s,o,a,c,,l,u]=e;Zl(n,1,12),Zl(s,1,31),Zl(o,0,23),Zl(a,0,59),Zl(c,0,60);let d=new Date(Date.UTC(Number(r),Number(n)-1,Number(s),Number(o),Number(a),Number(c),Number(l)?Math.round(parseFloat(`0.${l}`)*1e3):0));if(d.setUTCFullYear(Number(r)),u.toUpperCase()!="Z"){let[,p,m,f]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],A=p==="-"?1:-1;d.setTime(d.getTime()+A*(Number(m)*60*60*1e3+Number(f)*60*1e3))}return d},"_parseRfc3339DateTimeWithOffset"),FP=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC7231 timestamps must be strings.");let e,r,n,s,o,a,c,l;if((l=jwt.exec(t))?[,e,r,n,s,o,a,c]=l:(l=Kwt.exec(t))?([,e,r,n,s,o,a,c]=l,n=(Number(n)+1900).toString()):(l=Xwt.exec(t))&&([,r,e,s,o,a,c,n]=l),n&&a){let u=Date.UTC(Number(n),Zwt.indexOf(r),Number(e),Number(s),Number(o),Number(a),c?Math.round(parseFloat(`0.${c}`)*1e3):0);Zl(e,1,31),Zl(s,0,23),Zl(o,0,59),Zl(a,0,60);let d=new Date(u);return d.setUTCFullYear(Number(n)),d}throw new TypeError(`Invalid RFC7231 date-time value ${t}.`)},"_parseRfc7231DateTime");i(Zl,"range")});function UP(t,e,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");let n=t.split(e);if(r===1)return n;let s=[],o="";for(let a=0;a{i(UP,"splitEvery")});var wg,rxe=g(()=>{wg=i(t=>{let e=t.length,r=[],n=!1,s,o=0;for(let a=0;a{a=a.trim();let c=a.length;return c<2?a:(a[0]==='"'&&a[c-1]==='"'&&(a=a.slice(1,c-1)),a.replace(/\\"/g,'"'))})},"splitHeader")});function qP(t){return new Ct(String(t),"bigDecimal")}var nxe,Ct,sxe=g(()=>{nxe=/^-?\d*(\.\d+)?$/,Ct=class t{static{i(this,"NumericValue")}string;type;constructor(e,r){if(this.string=e,this.type=r,!nxe.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!="object")return!1;let r=e;return t.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&nxe.test(r.string)}};i(qP,"nv")});function GP(t){if(t.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let e=new Uint8Array(t.length/2);for(let r=0;r{oxe={},XY={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),oxe[t]=e,XY[e]=t}i(GP,"fromHex");i(ui,"toHex")});var Sg,Qc,ixe=g(()=>{Sg=require("node:fs"),Qc=i(t=>{if(!t)return 0;if(typeof t=="string")return Buffer.byteLength(t);if(typeof t.byteLength=="number")return t.byteLength;if(typeof t.size=="number")return t.size;if(typeof t.start=="number"&&typeof t.end=="number")return t.end+1-t.start;if(t instanceof Sg.ReadStream){if(t.path!=null)return(0,Sg.lstatSync)(t.path).size;if(typeof t.fd=="number")return(0,Sg.fstatSync)(t.fd).size}throw new Error(`Body Length computation failed for ${t}`)},"calculateBodyLength")});var as,eJ=g(()=>{bP();as=i(t=>t instanceof Uint8Array?t:typeof t=="string"?Hr(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),"toUint8Array")});function _c(t,e){if(e===void 0){e=0;for(let s of t)e+=s.byteLength}let r=new Uint8Array(e),n=0;for(let s of t)r.set(s,n),n+=s.byteLength;return r}var bw=g(()=>{i(_c,"concatBytes")});var HP,tJ,rJ=g(()=>{Et();HP=i((t,e)=>(r,n)=>async s=>{let{response:o}=await r(s);try{let a=await e(o,t);return{response:o,output:a}}catch(a){if(Object.defineProperty(a,"$response",{value:o,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in a)){let c="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{a.message+=` - `+c}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(c):n.logger?.warn?.(c)}typeof a.$responseBodyText<"u"&&a.$response&&(a.$response.body=a.$responseBodyText);try{if(pn.isInstance(o)){let{headers:l={}}=o,u=Object.entries(l);a.$metadata={httpStatusCode:o.statusCode,requestId:tJ(/^x-[\w-]+-request-?id$/,u),extendedRequestId:tJ(/^x-[\w-]+-id-2$/,u),cfId:tJ(/^x-[\w-]+-cf-id$/,u)}}}catch{}}throw a}},"deserializerMiddleware"),tJ=i((t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],"findHeader")});var So,Bw=g(()=>{So=class t extends Error{static{i(this,"ProviderError")}name="ProviderError";tryNextLink;constructor(e,r=!0){let n,s=!0;typeof r=="boolean"?(n=void 0,s=r):r!=null&&typeof r=="object"&&(n=r.logger,s=r.tryNextLink??!0),super(e),this.tryNextLink=s,Object.setPrototypeOf(this,t.prototype),n?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${e}`)}static from(e,r=!0){return Object.assign(new this(e.message,r),e)}}});var Bd,$P=g(()=>{Bw();Bd=class t extends So{static{i(this,"CredentialsProviderError")}name="CredentialsProviderError";constructor(e,r=!0){super(e,r),Object.setPrototypeOf(this,t.prototype)}}});var zP,axe=g(()=>{Bw();zP=class t extends So{static{i(this,"TokenProviderError")}name="TokenProviderError";constructor(e,r=!0){super(e,r),Object.setPrototypeOf(this,t.prototype)}}});var VP,nJ=g(()=>{Bw();VP=i((...t)=>async()=>{if(t.length===0)throw new So("No providers in chain");let e;for(let r of t)try{return await r()}catch(n){if(e=n,n?.tryNextLink)continue;throw n}throw e},"chain")});var WP,sJ=g(()=>{WP=i(t=>()=>Promise.resolve(t),"fromValue")});var xg,YP=g(()=>{xg=i((t,e,r)=>{let n,s,o,a=!1,c=i(async()=>{s||(s=t());try{n=await s,o=!0,a=!1}finally{s=void 0}return n},"coalesceProvider");return e===void 0?async l=>((!o||l?.forceRefresh)&&(n=await c()),n):async l=>((!o||l?.forceRefresh)&&(n=await c()),a?n:r&&!r(n)?(a=!0,n):(e(n)&&await c(),n))},"memoize")});var cs,JP=g(()=>{cs=i((t,e,r)=>{if(e in t){if(t[e]==="true")return!0;if(t[e]==="false")return!1;throw new Error(`Cannot load ${r} "${e}". Expected "true" or "false", got ${t[e]}.`)}},"booleanSelector")});var cxe,lxe=g(()=>{cxe=i((t,e,r)=>{if(!(e in t))return;let n=parseInt(t[e],10);if(Number.isNaN(n))throw new TypeError(`Cannot load ${r} '${e}'. Expected number, got '${t[e]}'.`);return n},"numberSelector")});var fn,jP=g(()=>{(function(t){t.ENV="env",t.CONFIG="shared config entry"})(fn||(fn={}))});var uxe,dxe,oJ,eSt,Dc,bg=g(()=>{uxe=require("node:os"),dxe=require("node:path"),oJ={},eSt=i(()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT","getHomeDirCacheKey"),Dc=i(()=>{let{HOME:t,USERPROFILE:e,HOMEPATH:r,HOMEDRIVE:n=`C:${dxe.sep}`}=process.env;if(t)return t;if(e)return e;if(r)return`${n}${r}`;let s=eSt();return oJ[s]||(oJ[s]=(0,uxe.homedir)()),oJ[s]},"getHomeDir")});var iJ,aJ,KP,cJ=g(()=>{iJ="AWS_PROFILE",aJ="default",KP=i(t=>t.profile||process.env[iJ]||aJ,"getProfileName")});var pxe,mxe,XP,lJ=g(()=>{pxe=require("node:crypto"),mxe=require("node:path");bg();XP=i(t=>{let r=(0,pxe.createHash)("sha1").update(t).digest("hex");return(0,mxe.join)(Dc(),".aws","sso","cache",`${r}.json`)},"getSSOTokenFilepath")});var fxe,Rw,Axe,uJ=g(()=>{fxe=require("node:fs/promises");lJ();Rw={},Axe=i(async t=>{if(Rw[t])return Rw[t];let e=XP(t),r=await(0,fxe.readFile)(e,"utf8");return JSON.parse(r)},"getSSOTokenFromFile")});var kc,hxe=g(()=>{kc="."});var dJ,gxe,yxe=g(()=>{dJ=R(xc()),gxe=i(t=>Object.entries(t).filter(([e])=>{let r=e.indexOf(".");return r===-1?!1:Object.values(dJ.IniSectionType).includes(e.substring(0,r))}).reduce((e,[r,n])=>{let s=r.indexOf("."),o=r.substring(0,s)===dJ.IniSectionType.PROFILE?r.substring(s+1):r;return e[o]=n,e},{...t.default&&{default:t.default}}),"getConfigData")});var Exe,tSt,ZP,pJ=g(()=>{Exe=require("node:path");bg();tSt="AWS_CONFIG_FILE",ZP=i(()=>process.env[tSt]||(0,Exe.join)(Dc(),".aws","config"),"getConfigFilepath")});var Cxe,rSt,Ixe,wxe=g(()=>{Cxe=require("node:path");bg();rSt="AWS_SHARED_CREDENTIALS_FILE",Ixe=i(()=>process.env[rSt]||(0,Cxe.join)(Dc(),".aws","credentials"),"getCredentialsFilepath")});var Sxe,nSt,sSt,Nw,mJ=g(()=>{Sxe=R(xc()),nSt=/^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/,sSt=["__proto__","profile __proto__"],Nw=i(t=>{let e={},r,n;for(let s of t.split(/\r?\n/)){let o=s.split(/(^|\s)[;#]/)[0].trim();if(o[0]==="["&&o[o.length-1]==="]"){r=void 0,n=void 0;let c=o.substring(1,o.length-1),l=nSt.exec(c);if(l){let[,u,,d]=l;Object.values(Sxe.IniSectionType).includes(u)&&(r=[u,d].join("."))}else r=c;if(sSt.includes(c))throw new Error(`Found invalid profile name "${c}"`)}else if(r){let c=o.indexOf("=");if(![0,-1].includes(c)){let[l,u]=[o.substring(0,c).trim(),o.substring(c+1).trim()];if(u==="")n=l;else{n&&s.trimStart()===s&&(n=void 0),e[r]=e[r]||{};let d=n?[n,l].join("."):l;e[r][d]=u}}}}return e},"parseIni")});var xxe,fJ,Tw,jm,vw=g(()=>{xxe=require("node:fs/promises"),fJ={},Tw={},jm=i((t,e)=>Tw[t]!==void 0?Tw[t]:((!fJ[t]||e?.ignoreCache)&&(fJ[t]=(0,xxe.readFile)(t,"utf8")),fJ[t]),"readFile")});var AJ,bxe,Bg,eQ=g(()=>{AJ=require("node:path");yxe();pJ();wxe();bg();mJ();vw();bxe=i(()=>({}),"swallowError"),Bg=i(async(t={})=>{let{filepath:e=Ixe(),configFilepath:r=ZP()}=t,n=Dc(),s="~/",o=e;e.startsWith(s)&&(o=(0,AJ.join)(n,e.slice(2)));let a=r;r.startsWith(s)&&(a=(0,AJ.join)(n,r.slice(2)));let c=await Promise.all([jm(a,{ignoreCache:t.ignoreCache}).then(Nw).then(gxe).catch(bxe),jm(o,{ignoreCache:t.ignoreCache}).then(Nw).catch(bxe)]);return{configFile:c[0],credentialsFile:c[1]}},"loadSharedConfigFiles")});var Bxe,Rxe,Nxe=g(()=>{Bxe=R(xc()),Rxe=i(t=>Object.entries(t).filter(([e])=>e.startsWith(Bxe.IniSectionType.SSO_SESSION+".")).reduce((e,[r,n])=>({...e,[r.substring(r.indexOf(".")+1)]:n}),{}),"getSsoSessionData")});var oSt,Txe,vxe=g(()=>{pJ();Nxe();mJ();vw();oSt=i(()=>({}),"swallowError"),Txe=i(async(t={})=>jm(t.configFilepath??ZP()).then(Nw).then(Rxe).catch(oSt),"loadSsoSessionData")});var Pxe,Qxe=g(()=>{Pxe=i((...t)=>{let e={};for(let r of t)for(let[n,s]of Object.entries(r))e[n]!==void 0?Object.assign(e[n],s):e[n]=s;return e},"mergeConfigFiles")});var _xe,Dxe=g(()=>{eQ();Qxe();_xe=i(async t=>{let e=await Bg(t);return Pxe(e.configFile,e.credentialsFile)},"parseKnownFiles")});var kxe,Lxe=g(()=>{uJ();vw();kxe={getFileRecord(){return Tw},interceptFile(t,e){Tw[t]=Promise.resolve(e)},getTokenRecord(){return Rw},interceptToken(t,e){Rw[t]=e}}});function tQ(t){try{let e=new Set(Array.from(t.match(/([A-Z_]){3,}/g)??[]));return e.delete("CONFIG"),e.delete("CONFIG_PREFIX_SEPARATOR"),e.delete("ENV"),[...e].join(", ")}catch{return t}}var hJ=g(()=>{i(tQ,"getSelectorName")});var Oxe,Mxe=g(()=>{$P();hJ();Oxe=i((t,e)=>async()=>{try{let r=t(process.env,e);if(r===void 0)throw new Error;return r}catch(r){throw new Bd(r.message||`Not found in ENV: ${tQ(t.toString())}`,{logger:e?.logger})}},"fromEnv")});var Fxe,Uxe=g(()=>{$P();cJ();eQ();hJ();Fxe=i((t,{preferredFile:e="config",...r}={})=>async()=>{let n=KP(r),{configFile:s,credentialsFile:o}=await Bg(r),a=o[n]||{},c=s[n]||{},l=e==="config"?{...a,...c}:{...c,...a};try{let d=t(l,e==="config"?s:o);if(d===void 0)throw new Error;return d}catch(u){throw new Bd(u.message||`Not found in config files w/ profile [${n}]: ${tQ(t.toString())}`,{logger:r.logger})}},"fromSharedConfigFiles")});var iSt,rQ,gJ=g(()=>{sJ();iSt=i(t=>typeof t=="function","isFunction"),rQ=i(t=>iSt(t)?async()=>await t():WP(t),"fromStatic")});var Me,yJ=g(()=>{nJ();YP();Mxe();Uxe();gJ();Me=i(({environmentVariableSelector:t,configFileSelector:e,default:r},n={})=>{let{signingName:s,logger:o}=n;return xg(VP(Oxe(t,{signingName:s,logger:o}),Fxe(e,n),rQ(r)))},"loadConfig")});var nQ,sQ,qxe,Lc,Gxe,Hxe=g(()=>{JP();jP();nQ="AWS_USE_DUALSTACK_ENDPOINT",sQ="use_dualstack_endpoint",qxe=!1,Lc={environmentVariableSelector:i(t=>cs(t,nQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,sQ,fn.CONFIG),"configFileSelector"),default:!1},Gxe={environmentVariableSelector:i(t=>cs(t,nQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,sQ,fn.CONFIG),"configFileSelector"),default:void 0}});var oQ,iQ,$xe,Oc,zxe,Vxe=g(()=>{JP();jP();oQ="AWS_USE_FIPS_ENDPOINT",iQ="use_fips_endpoint",$xe=!1,Oc={environmentVariableSelector:i(t=>cs(t,oQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,iQ,fn.CONFIG),"configFileSelector"),default:!1},zxe={environmentVariableSelector:i(t=>cs(t,oQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,iQ,fn.CONFIG),"configFileSelector"),default:void 0}});var Wxe,Yxe=g(()=>{we();Wxe=i(t=>{let{tls:e,endpoint:r,urlParser:n,useDualstackEndpoint:s}=t;return Object.assign(t,{tls:e??!0,endpoint:ht(typeof r=="string"?n(r):r),isCustomEndpoint:!0,useDualstackEndpoint:ht(s??!1)})},"resolveCustomEndpointsConfig")});var Jxe,jxe=g(()=>{Jxe=i(async t=>{let{tls:e=!0}=t,r=await t.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");let s=await t.useDualstackEndpoint(),o=await t.useFipsEndpoint(),{hostname:a}=await t.regionInfoProvider(r,{useDualstackEndpoint:s,useFipsEndpoint:o})??{};if(!a)throw new Error("Cannot resolve hostname from client config");return t.urlParser(`${e?"https:":"http:"}//${a}`)},"getEndpointFromRegion")});var Kxe,Xxe=g(()=>{we();jxe();Kxe=i(t=>{let e=ht(t.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:n,urlParser:s,tls:o}=t;return Object.assign(t,{tls:o??!0,endpoint:r?ht(typeof r=="string"?s(r):r):()=>Jxe({...t,useDualstackEndpoint:e,useFipsEndpoint:n}),isCustomEndpoint:!!r,useDualstackEndpoint:e})},"resolveEndpointsConfig")});var Zxe,EJ,CJ,ebe,tbe,rbe,nbe,sbe,obe,IJ=g(()=>{Zxe="AWS_EXECUTION_ENV",EJ="AWS_REGION",CJ="AWS_DEFAULT_REGION",ebe="AWS_EC2_METADATA_DISABLED",tbe=["in-region","cross-region","mobile","standard","legacy"],rbe="/latest/meta-data/placement/region",nbe="/latest/api/token",sbe="x-aws-ec2-metadata-token",obe="x-aws-ec2-metadata-token-ttl-seconds"});var ibe,aSt,lbe,aQ,abe,cSt,cbe,wJ=g(()=>{IJ();ibe=1e3,aSt=6e4,lbe=0,aQ=i(async()=>{if(!process.env[ebe]&&!(Date.now(){lbe=Date.now()+aSt},"cacheNegativeAndReturnUndefined"),cSt=i(()=>{let t=process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;if(t){let e=new URL(t);return{hostname:e.hostname.replace(/^\[(.+)]$/,"$1"),port:e.port?Number(e.port):void 0}}return process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE==="IPv6"?{hostname:"fd00:ec2::254"}:{hostname:"169.254.169.254"}},"resolveImdsEndpoint"),cbe=i(async t=>{let{request:e}=await import("node:http");return new Promise((r,n)=>{let s=e({hostname:t.hostname,port:t.port,path:t.path,method:t.method,headers:t.headers,timeout:ibe,signal:AbortSignal.timeout(ibe)});s.on("error",o=>{n(o),s.destroy()}),s.on("timeout",()=>{n(new Error("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",o=>{let{statusCode:a=400}=o;if(a<200||a>=300){n(Object.assign(new Error("Error response received from instance metadata service"),{statusCode:a})),s.destroy();return}let c=[];o.on("data",l=>c.push(l)),o.on("end",()=>{r(Buffer.concat(c)),s.destroy()})}),s.end()})},"imdsRequest")});var Rg,Ng,An,ls,SJ=g(()=>{wJ();Rg="AWS_REGION",Ng="region",An={environmentVariableSelector:i(t=>t[Rg],"environmentVariableSelector"),configFileSelector:i(t=>t[Ng],"configFileSelector"),default:i(async()=>{let t=await aQ();if(t)return t;throw new Error("Region is missing")},"default")},ls={preferredFile:"credentials"}});var ube,dbe,pbe=g(()=>{Et();ube=new Set,dbe=i((t,e=Ji)=>{if(!ube.has(t)&&!e(t))if(t==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${t}" is not a valid hostname component.`);else ube.add(t)},"checkRegion")});var cQ,xJ=g(()=>{cQ=i(t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),"isFipsRegion")});var mbe,fbe=g(()=>{xJ();mbe=i(t=>cQ(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,"getRealRegion")});var xo,Abe=g(()=>{pbe();fbe();xJ();xo=i(t=>{let{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return Object.assign(t,{region:i(async()=>{let n=typeof e=="function"?await e():e,s=mbe(n);return dbe(s),s},"region"),useFipsEndpoint:i(async()=>{let n=typeof e=="string"?e:await e();return cQ(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()},"useFipsEndpoint")})},"resolveRegionConfig")});var bJ,hbe=g(()=>{bJ=i((t=[],{useFipsEndpoint:e,useDualstackEndpoint:r})=>t.find(({tags:n})=>e===n.includes("fips")&&r===n.includes("dualstack"))?.hostname,"getHostnameFromVariants")});var gbe,ybe=g(()=>{gbe=i((t,{regionHostname:e,partitionHostname:r})=>e||(r?r.replace("{region}",t):void 0),"getResolvedHostname")});var Ebe,Cbe=g(()=>{Ebe=i((t,{partitionHash:e})=>Object.keys(e||{}).find(r=>e[r].regions.includes(t))??"aws","getResolvedPartition")});var Ibe,wbe=g(()=>{Ibe=i((t,{signingRegion:e,regionRegex:r,useFipsEndpoint:n})=>{if(e)return e;if(n){let s=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),o=t.match(s);if(o)return o[0].slice(1,-1)}},"getResolvedSigningRegion")});var Sbe,xbe=g(()=>{hbe();ybe();Cbe();wbe();Sbe=i((t,{useFipsEndpoint:e=!1,useDualstackEndpoint:r=!1,signingService:n,regionHash:s,partitionHash:o})=>{let a=Ebe(t,{partitionHash:o}),c=t in s?t:o[a]?.endpoint??t,l={useFipsEndpoint:e,useDualstackEndpoint:r},u=bJ(s[c]?.variants,l),d=bJ(o[a]?.variants,l),p=gbe(c,{regionHostname:u,partitionHostname:d});if(p===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:c,useFipsEndpoint:e,useDualstackEndpoint:r}}`);let m=Ibe(p,{signingRegion:s[c]?.signingRegion,regionRegex:o[a].regionRegex,useFipsEndpoint:e});return{partition:a,signingService:n,hostname:p,...m&&{signingRegion:m},...s[c]?.signingService&&{signingService:s[c].signingService}}},"getRegionInfo")});var lSt,uSt,bbe,Bbe=g(()=>{lSt="AWS_DEFAULTS_MODE",uSt="defaults_mode",bbe={environmentVariableSelector:i(t=>t[lSt],"environmentVariableSelector"),configFileSelector:i(t=>t[uSt],"configFileSelector"),default:"legacy"}});var Mc,dSt,pSt,Rbe=g(()=>{SJ();wJ();yJ();YP();IJ();Bbe();Mc=i(({region:t=Me(An),defaultsMode:e=Me(bbe)}={})=>xg(async()=>{let r=typeof e=="function"?await e():e;switch(r?.toLowerCase()){case"auto":return dSt(t);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${tbe.join(", ")}, got ${r}`)}}),"resolveDefaultsModeConfig"),dSt=i(async t=>{if(t){let e=typeof t=="function"?await t():t,r=await pSt();return r?e===r?"in-region":"cross-region":"standard"}return"standard"},"resolveNodeDefaultsModeAuto"),pSt=i(async()=>process.env[Zxe]&&(process.env[EJ]||process.env[CJ])?process.env[EJ]??process.env[CJ]:aQ(),"inferPhysicalRegion")});var bo={};Dr(bo,{CONFIG_PREFIX_SEPARATOR:()=>kc,CONFIG_USE_DUALSTACK_ENDPOINT:()=>sQ,CONFIG_USE_FIPS_ENDPOINT:()=>iQ,CredentialsProviderError:()=>Bd,DEFAULT_PROFILE:()=>aJ,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>qxe,DEFAULT_USE_FIPS_ENDPOINT:()=>$xe,ENV_PROFILE:()=>iJ,ENV_USE_DUALSTACK_ENDPOINT:()=>nQ,ENV_USE_FIPS_ENDPOINT:()=>oQ,NODE_REGION_CONFIG_FILE_OPTIONS:()=>ls,NODE_REGION_CONFIG_OPTIONS:()=>An,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>Lc,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>Oc,ProviderError:()=>So,REGION_ENV_NAME:()=>Rg,REGION_INI_NAME:()=>Ng,SelectorType:()=>fn,TokenProviderError:()=>zP,booleanSelector:()=>cs,chain:()=>VP,externalDataInterceptor:()=>kxe,fromStatic:()=>rQ,fromValue:()=>WP,getHomeDir:()=>Dc,getProfileName:()=>KP,getRegionInfo:()=>Sbe,getSSOTokenFilepath:()=>XP,getSSOTokenFromFile:()=>Axe,loadConfig:()=>Me,loadSharedConfigFiles:()=>Bg,loadSsoSessionData:()=>Txe,memoize:()=>xg,nodeDualstackConfigSelectors:()=>Gxe,nodeFipsConfigSelectors:()=>zxe,numberSelector:()=>cxe,parseKnownFiles:()=>_xe,readFile:()=>jm,resolveCustomEndpointsConfig:()=>Wxe,resolveDefaultsModeConfig:()=>Mc,resolveEndpointsConfig:()=>Kxe,resolveRegionConfig:()=>xo});var It=g(()=>{Bw();$P();axe();nJ();sJ();YP();JP();lxe();jP();bg();cJ();lJ();uJ();hxe();eQ();vxe();Dxe();Lxe();vw();yJ();gJ();Hxe();Vxe();Yxe();Xxe();SJ();Abe();xbe();Rbe()});var Nbe,Tbe,vbe,Pbe=g(()=>{Nbe="AWS_ENDPOINT_URL",Tbe="endpoint_url",vbe=i(t=>({environmentVariableSelector:i(e=>{let r=t.split(" ").map(o=>o.toUpperCase()),n=e[[Nbe,...r].join("_")];if(n)return n;let s=e[Nbe];if(s)return s},"environmentVariableSelector"),configFileSelector:i((e,r)=>{if(e.services){let s=["services",e.services].join(".");if(!r||!r[s])throw new Error(`The services section "${e.services}" specified in the profile is not present in the shared configuration file.`);let o=r[s],a=t.split(" ").map(l=>l.toLowerCase()),c=o[[a.join("_"),Tbe].join(".")];if(c)return c}let n=e[Tbe];if(n)return n},"configFileSelector"),default:void 0}),"getEndpointUrlConfig")});var mSt,fSt,Qbe,_be=g(()=>{It();mSt="AWS_IGNORE_CONFIGURED_ENDPOINT_URLS",fSt="ignore_configured_endpoint_urls",Qbe={environmentVariableSelector:i(t=>cs(t,mSt,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,fSt,fn.CONFIG),"configFileSelector"),default:!1}});var Pw,Dbe=g(()=>{It();Pbe();_be();Pw=i(async t=>{if(!await Me(Qbe)())return Me(vbe(t??""))()},"getEndpointFromConfig")});var BJ,ASt,hSt,gSt,kbe,Lbe,Obe=g(()=>{BJ=i(async t=>{let e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Lbe(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!kbe(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},"resolveParamsForS3"),ASt=/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/,hSt=/(\d+\.){3}\d+/,gSt=/\.\./,kbe=i(t=>ASt.test(t)&&!hSt.test(t)&&!gSt.test(t),"isDnsCompatibleBucketName"),Lbe=i(t=>{let[e,r,n,,,s]=t.split(":"),o=e==="arn"&&t.split(":").length>=6,a=!!(o&&r&&n&&s);if(o&&!a)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return a},"isArnBucketName")});var Mbe=g(()=>{Obe()});var Fbe,Ube=g(()=>{Fbe=i((t,e,r,n=!1)=>{let s=i(async()=>{let o;return n?o=r.clientContextParams?.[t]??r[t]??r[e]:o=r[t]??r[e],typeof o=="function"?o():o},"configProvider");return t==="credentialScope"||e==="CredentialScope"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:t==="accountId"||e==="AccountId"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:t==="endpoint"||e==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;let o=await s();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){let{protocol:a,hostname:c,port:l,path:u}=o;return`${a}//${c}${l?":"+l:""}${u}`}}return o}:s},"createConfigValueProvider")});var lQ=g(()=>{Et()});function uQ(t){return async(e,r,n,s)=>{if(!n.isCustomEndpoint&&!n.ignoreConfiguredEndpointUrls){let c;n.serviceConfiguredEndpoint?c=await n.serviceConfiguredEndpoint():c=await t(n.serviceId),c&&(n.endpoint=()=>Promise.resolve(Io(c)),n.isCustomEndpoint=!0,s?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${c}`))}let o=await Qw(e,r,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let a=n.endpointProvider(o,s);if(n.isCustomEndpoint&&n.endpoint){let c=await n.endpoint();if(c?.headers){a.headers??={};for(let[l,u]of Object.entries(c.headers))a.headers[l]=Array.isArray(u)?u:[u]}}return a}}var Qw,dQ=g(()=>{Mbe();Ube();lQ();i(uQ,"bindGetEndpointFromInstructions");Qw=i(async(t,e,r)=>{let n={},s=e?.getEndpointParameterInstructions?.()||{};for(let[o,a]of Object.entries(s))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=t[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await Fbe(a.name,o,r,a.type!=="builtInParams")();break;case"operationContextParams":n[o]=a.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await BJ(n),n},"resolveParams")});function ySt(t,e,r){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=r}function pQ(t){let e=uQ(t);return({config:r,instructions:n})=>(s,o)=>async a=>{r.isCustomEndpoint&&ySt(o,"ENDPOINT_OVERRIDE","N");let c=await e(a.input,{getEndpointParameterInstructions(){return n}},{...r},o);o.endpointV2=c,o.authSchemes=c.properties?.authSchemes;let l=o.authSchemes?.[0];if(l){o.signing_region=l.signingRegion,o.signing_service=l.signingName;let d=Bt(o)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:l.signingRegion,signingRegion:l.signingRegion,signing_service:l.signingName,signingName:l.signingName,signingRegionSet:l.signingRegionSet},l.properties))}return s({...a})}}var RJ=g(()=>{Et();dQ();i(ySt,"setFeature");i(pQ,"bindEndpointMiddleware")});function qbe(t){let e=pQ(t);return(r,n)=>({applyToStack:i(s=>{s.addRelativeTo(e({config:r,instructions:n}),NJ)},"applyToStack")})}var ESt,NJ,TJ=g(()=>{RJ();ESt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0},NJ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ESt.name};i(qbe,"bindGetEndpointPlugin")});function Gbe(t){return e=>{let r=e.tls??!0,{endpoint:n,useDualstackEndpoint:s,useFipsEndpoint:o}=e,a=n!=null?async()=>Io(await ht(n)()):void 0,l=Object.assign(e,{endpoint:a,tls:r,isCustomEndpoint:!!n,useDualstackEndpoint:ht(s??!1),useFipsEndpoint:ht(o??!1),ignoreConfiguredEndpointUrls:!!e.ignoreConfiguredEndpointUrls}),u;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!u&&(u=t(e.serviceId)),u),l}}var Hbe=g(()=>{Et();lQ();i(Gbe,"bindResolveEndpointConfig")});var di,$be=g(()=>{di=class t{static{i(this,"BinaryDecisionDiagram")}nodes;root;conditions;results;constructor(e,r,n,s){this.nodes=e,this.root=r,this.conditions=n,this.results=s}static from(e,r,n,s){return new t(e,r,n,s)}}});var pi,zbe=g(()=>{pi=class{static{i(this,"EndpointCache")}capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){let n=this.hash(e);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){let s=this.data.keys(),o=0;for(;;){let{value:a,done:c}=s.next();if(this.data.delete(a),c||++o>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(e){let r="",{parameters:n}=this;if(n.length===0)return!1;for(let s of n){let o=String(e[s]??"");if(o.includes("|;"))return!1;r+=o+"|;"}return r}}});var tt,Vbe=g(()=>{tt=class extends Error{static{i(this,"EndpointError")}constructor(e){super(e),this.name="EndpointError"}}});var Bo=g(()=>{Vbe()});var Fc,Wbe=g(()=>{Fc="endpoints"});function Ro(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Ro(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Ro).join(", ")})`:JSON.stringify(t,null,2)}var Ybe=g(()=>{i(Ro,"toDebugString")});var _w=g(()=>{Wbe();Ybe()});var Os,vJ=g(()=>{Os={}});var PJ,Jbe=g(()=>{PJ=i((t,e)=>t===e,"booleanEquals")});function QJ(...t){for(let e of t)if(e!=null)return e}var jbe=g(()=>{i(QJ,"coalesce")});var Kbe,Xbe=g(()=>{Bo();Kbe=i(t=>{let e=t.split("."),r=[];for(let n of e){let s=n.indexOf("[");if(s!==-1){if(n.indexOf("]")!==n.length-1)throw new tt(`Path: '${t}' does not end with ']'`);let o=n.slice(s+1,-1);if(Number.isNaN(parseInt(o)))throw new tt(`Invalid array index: '${o}' in path: '${t}'`);s!==0&&r.push(n.slice(0,s)),r.push(o)}else r.push(n)}return r},"getAttrPathList")});var Dw,Zbe=g(()=>{Bo();Xbe();Dw=i((t,e)=>Kbe(e).reduce((r,n)=>{if(typeof r!="object")throw new tt(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);if(Array.isArray(r)){let s=parseInt(n);return r[s<0?r.length+s:s]}return r[n]},t),"getAttr")});var _J,e0e=g(()=>{_J=i(t=>t!=null,"isSet")});function DJ(t,e,r){return t?e:r}var t0e=g(()=>{i(DJ,"ite")});var kJ,r0e=g(()=>{kJ=i(t=>!t,"not")});var CSt,eu,LJ=g(()=>{CSt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),eu=i(t=>CSt.test(t)||t.startsWith("[")&&t.endsWith("]"),"isIpAddress")});var mQ,OJ,MJ,n0e=g(()=>{mQ=R(xc());LJ();OJ={[mQ.EndpointURLScheme.HTTP]:80,[mQ.EndpointURLScheme.HTTPS]:443},MJ=i(t=>{let e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){let{hostname:m,port:f,protocol:A="",path:h="",query:E={}}=t,C=new URL(`${A}//${m}${f?`:${f}`:""}${h}`);return C.search=Object.entries(E).map(([w,x])=>`${w}=${x}`).join("&"),C}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;let r=e.href,{host:n,hostname:s,pathname:o,protocol:a,search:c}=e;if(c)return null;let l=a.slice(0,-1);if(!Object.values(mQ.EndpointURLScheme).includes(l))return null;let u=eu(s),d=r.includes(`${n}:${OJ[l]}`)||typeof t=="string"&&t.includes(`${n}:${OJ[l]}`),p=`${n}${d?`:${OJ[l]}`:""}`;return{scheme:l,authority:p,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},"parseURL")});function FJ(t,e,r){if(r===1)return[t];if(t==="")return[""];let n=t.split(e);return r===0?n:n.slice(0,r-1).concat(n.slice(1).join(e))}var s0e=g(()=>{i(FJ,"split")});var UJ,o0e=g(()=>{UJ=i((t,e)=>t===e,"stringEquals")});var qJ,i0e=g(()=>{qJ=i((t,e,r,n)=>t==null||e>=r||t.length{GJ=i(t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode")});var HJ=g(()=>{Jbe();jbe();Zbe();e0e();Et();t0e();r0e();n0e();s0e();o0e();i0e();a0e()});var c0e,l0e=g(()=>{HJ();c0e={booleanEquals:PJ,coalesce:QJ,getAttr:Dw,isSet:_J,isValidHostLabel:Ji,ite:DJ,not:kJ,parseURL:MJ,split:FJ,stringEquals:UJ,substring:qJ,uriEncode:GJ}});var fQ,$J=g(()=>{HJ();fQ=i((t,e)=>{let r=[],{referenceRecord:n,endpointParams:s}=e,o=0;for(;o{u0e=i(({ref:t},e)=>e.referenceRecord[t]??e.endpointParams[t],"getReferenceValue")});var tu,AQ,p0e,Tg=g(()=>{Bo();vJ();l0e();$J();d0e();tu=i((t,e,r)=>{if(typeof t=="string")return fQ(t,r);if(t.fn)return p0e.callFunction(t,r);if(t.ref)return u0e(t,r);throw new tt(`'${e}': ${String(t)} is not a string, function or reference.`)},"evaluateExpression"),AQ=i(({fn:t,argv:e},r)=>{let n=Array(e.length);for(let a=0;a{Tg()});var hQ,zJ=g(()=>{_w();Bo();m0e();hQ=i((t,e)=>{let{assign:r}=t;if(r&&r in e.referenceRecord)throw new tt(`'${r}' is already defined in Reference Record.`);let n=AQ(t,e);e.logger?.debug?.(`${Fc} evaluateCondition: ${Ro(t)} = ${Ro(n)}`);let s=n===""?!0:!!n;return r!=null?{result:s,toAssign:{name:r,value:n}}:{result:s}},"evaluateCondition")});var gQ,VJ=g(()=>{Bo();Tg();gQ=i((t,e)=>Object.entries(t??{}).reduce((r,[n,s])=>(r[n]=s.map(o=>{let a=tu(o,"Header value entry",e);if(typeof a!="string")throw new tt(`Header '${n}' value '${a}' is not a string`);return a}),r),{}),"getEndpointHeaders")});var kw,f0e,A0e,WJ=g(()=>{Bo();$J();kw=i((t,e)=>Object.entries(t).reduce((r,[n,s])=>(r[n]=A0e.getEndpointProperty(s,e),r),{}),"getEndpointProperties"),f0e=i((t,e)=>{if(Array.isArray(t))return t.map(r=>f0e(r,e));switch(typeof t){case"string":return fQ(t,e);case"object":if(t===null)throw new tt(`Unexpected endpoint property: ${t}`);return A0e.getEndpointProperties(t,e);case"boolean":return t;default:throw new tt(`Unexpected endpoint property type: ${typeof t}`)}},"getEndpointProperty"),A0e={getEndpointProperty:f0e,getEndpointProperties:kw}});var yQ,YJ=g(()=>{Bo();Tg();yQ=i((t,e)=>{let r=tu(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new tt(`Endpoint URL must be a string, got ${typeof r}`)},"getEndpointUrl")});var JJ,Uc,h0e=g(()=>{Bo();zJ();Tg();VJ();WJ();YJ();JJ=1e8,Uc=i((t,e)=>{let{nodes:r,root:n,results:s,conditions:o}=t,a=n,c={},l={referenceRecord:c,endpointParams:e.endpointParams,logger:e.logger};for(;a!==1&&a!==-1&&a=0===E.result?p:m}if(a>=JJ){let u=s[a-JJ];if(u[0]===-1){let[,f]=u;throw new tt(tu(f,"Error",l))}let[d,p,m]=u;return{url:yQ(d,l),properties:kw(p,l),headers:gQ(m??{},l)}}throw new tt("No matching endpoint.")},"decideEndpoint")});var vg,EQ=g(()=>{_w();zJ();vg=i((t=[],e)=>{let r={},n={...e,referenceRecord:{...e.referenceRecord}},s=!1;for(let o of t){let{result:a,toAssign:c}=hQ(o,n);if(!a)return{result:a};c&&(s=!0,r[c.name]=c.value,n.referenceRecord[c.name]=c.value,e.logger?.debug?.(`${Fc} assign: ${c.name} := ${Ro(c.value)}`))}return s?{result:!0,referenceRecord:r}:{result:!0}},"evaluateConditions")});var g0e,y0e=g(()=>{_w();EQ();VJ();WJ();YJ();g0e=i((t,e)=>{let{conditions:r,endpoint:n}=t,{result:s,referenceRecord:o}=vg(r,e);if(!s)return;let a=o?{...e,referenceRecord:{...e.referenceRecord,...o}}:e,{url:c,properties:l,headers:u}=n;e.logger?.debug?.(`${Fc} Resolving endpoint from template: ${Ro(n)}`);let d={url:yQ(c,a)};return u!=null&&(d.headers=gQ(u,a)),l!=null&&(d.properties=kw(l,a)),d},"evaluateEndpointRule")});var E0e,C0e=g(()=>{Bo();EQ();Tg();E0e=i((t,e)=>{let{conditions:r,error:n}=t,{result:s,referenceRecord:o}=vg(r,e);if(!s)return;let a=o?{...e,referenceRecord:{...e.referenceRecord,...o}}:e;throw new tt(tu(n,"Error",a))},"evaluateErrorRule")});var CQ,I0e,jJ,w0e=g(()=>{Bo();EQ();y0e();C0e();CQ=i((t,e)=>{for(let r of t)if(r.type==="endpoint"){let n=g0e(r,e);if(n)return n}else if(r.type==="error")E0e(r,e);else if(r.type==="tree"){let n=jJ.evaluateTreeRule(r,e);if(n)return n}else throw new tt(`Unknown endpoint rule: ${r}`);throw new tt("Rules evaluation failed")},"evaluateRules"),I0e=i((t,e)=>{let{conditions:r,rules:n}=t,{result:s,referenceRecord:o}=vg(r,e);if(!s)return;let a=o?{...e,referenceRecord:{...e.referenceRecord,...o}}:e;return jJ.evaluateRules(n,a)},"evaluateTreeRule"),jJ={evaluateRules:CQ,evaluateTreeRule:I0e}});var S0e=g(()=>{w0e()});var Lw,x0e=g(()=>{_w();Bo();S0e();Lw=i((t,e)=>{let{endpointParams:r,logger:n}=e,{parameters:s,rules:o}=t;e.logger?.debug?.(`${Fc} Initial EndpointParams: ${Ro(r)}`);for(let c in s){let l=s[c],u=r[c];if(u==null&&l.default!=null){r[c]=l.default;continue}if(l.required&&u==null)throw new tt(`Missing required parameter: '${c}'`)}let a=CQ(o,{endpointParams:r,logger:n,referenceRecord:{}});return e.logger?.debug?.(`${Fc} Resolved endpoint: ${Ro(a)}`),a},"resolveEndpoint")});var b0e,B0e=g(()=>{b0e=i(t=>{let{endpoint:e}=t;return e===void 0&&(t.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}),t},"resolveEndpointRequiredConfig")});var KJ={};Dr(KJ,{BinaryDecisionDiagram:()=>di,EndpointCache:()=>pi,EndpointError:()=>tt,customEndpointFunctions:()=>Os,decideEndpoint:()=>Uc,endpointMiddleware:()=>wSt,endpointMiddlewareOptions:()=>NJ,getEndpointFromInstructions:()=>ISt,getEndpointPlugin:()=>nu,isIpAddress:()=>eu,isValidHostLabel:()=>Ji,middlewareEndpointToEndpointV1:()=>Io,resolveEndpoint:()=>Lw,resolveEndpointConfig:()=>ru,resolveEndpointRequiredConfig:()=>b0e,resolveParams:()=>Qw,toEndpointV1:()=>Io});var ISt,ru,wSt,nu,Rt=g(()=>{Dbe();dQ();RJ();TJ();Hbe();Et();$be();zbe();h0e();LJ();Et();vJ();x0e();Bo();dQ();lQ();TJ();B0e();ISt=uQ(Pw),ru=Gbe(Pw),wSt=pQ(Pw),nu=qbe(Pw)});var IQ,XJ=g(()=>{Rt();IQ=i((t,e)=>(r,n)=>async s=>{let o=t,a=n.endpointV2?async()=>Io(n.endpointV2):o.endpoint;if(!a)throw new Error("No valid endpoint provider available.");let c=await e(s.input,{...t,endpoint:a});return r({...s,request:c})},"serializerMiddleware")});function R0e(t,e,r){return{applyToStack:i(n=>{n.add(HP(t,r),ZJ),n.add(IQ(t,e),e8)},"applyToStack")}}var ZJ,e8,N0e=g(()=>{rJ();XJ();ZJ={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},e8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i(R0e,"getSerdePlugin")});function T0e(t,e){return Buffer.isBuffer(t)?t:typeof t=="string"?Sd(t,e):ArrayBuffer.isView(t)?Xi(t.buffer,t.byteOffset,t.byteLength):Xi(t)}var SQ,wQ,v0e=g(()=>{SQ=require("node:crypto");xd();eJ();wQ=class{static{i(this,"Hash")}algorithmIdentifier;secret;hash;constructor(e,r){this.algorithmIdentifier=e,this.secret=r,this.reset()}update(e,r){this.hash.update(as(T0e(e,r)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?(0,SQ.createHmac)(this.algorithmIdentifier,T0e(this.secret)):(0,SQ.createHash)(this.algorithmIdentifier)}};i(T0e,"castSourceData")});var P0e,Pg,t8=g(()=>{P0e=require("node:stream");GY();Pg=class extends P0e.Readable{static{i(this,"ChecksumStream")}expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;constructor({expectedChecksum:e,checksum:r,source:n,checksumSourceLocation:s,base64Encoder:o}){if(super(),typeof n.pipe!="function")throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`);this.source=n,this.base64Encoder=o??Jt,this.expectedChecksum=e,this.checksum=r,this.checksumSourceLocation=s,this.source.on("data",this.onSourceData),this.source.on("end",this.onSourceEnd),this.source.on("error",this.onSourceError),this.source.on("close",this.onSourceClose),this.source.pause()}onSourceData=i(e=>{if(!this.destroyed){try{this.checksum.update(e)}catch(r){this.destroy(r);return}this.push(e)||this.source.pause()}},"onSourceData");onSourceEnd=i(async()=>{if(!this.destroyed){try{let e=await this.checksum.digest(),r=this.base64Encoder(e);if(this.expectedChecksum!==r){this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${r}" in response header "${this.checksumSourceLocation}".`));return}}catch(e){this.destroy(e);return}this.push(null)}},"onSourceEnd");onSourceError=i(e=>{this.destroy(e)},"onSourceError");onSourceClose=i(()=>{!this.destroyed&&!this.source.readableEnded&&this.destroy(new Error("Connection lost or stream closed before all data was received."))},"onSourceClose");_read(e){this.source.resume()}_destroy(e,r){this.source?.removeListener("data",this.onSourceData),this.source?.removeListener("end",this.onSourceEnd),this.source?.removeListener("error",this.onSourceError),this.source?.removeListener("close",this.onSourceClose),this.source?.destroy(),r(e)}}});var $r,Rd,ea=g(()=>{$r=i(t=>typeof ReadableStream=="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream),"isReadableStream"),Rd=i(t=>typeof Blob=="function"&&(t?.constructor?.name===Blob.name||t instanceof Blob),"isBlob")});var Q0e,_0e=g(()=>{Q0e=i(t=>new TextEncoder().encode(t),"fromUtf8")});var D0e,SQr,k0e,xQ,r8,L0e,O0e=g(()=>{D0e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",SQr=Object.entries(D0e).reduce((t,[e,r])=>(t[r]=Number(e),t),{}),k0e=D0e.split(""),xQ=6,r8=8,L0e=63});function bQ(t){let e;typeof t=="string"?e=Q0e(t):e=t;let r=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let o=0;o>d]}s+="==".slice(0,4-l)}return s}var n8=g(()=>{_0e();O0e();i(bQ,"toBase64")});var SSt,BQ,M0e=g(()=>{SSt=typeof ReadableStream=="function"?ReadableStream:function(){},BQ=class extends SSt{static{i(this,"ChecksumStream")}}});var F0e,U0e=g(()=>{n8();ea();M0e();F0e=i(({expectedChecksum:t,checksum:e,source:r,checksumSourceLocation:n,base64Encoder:s})=>{if(!$r(r))throw new Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);let o=s??bQ;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let a=new TransformStream({start(){},async transform(l,u){e.update(l),u.enqueue(l)},async flush(l){let u=await e.digest(),d=o(u);if(t!==d){let p=new Error(`Checksum mismatch: expected "${t}" but received "${d}" in response header "${n}".`);l.error(p)}else l.terminate()}});r.pipeThrough(a);let c=a.readable;return Object.setPrototypeOf(c,BQ.prototype),c},"createChecksumStream")});function q0e(t){return typeof ReadableStream=="function"&&$r(t.source)?F0e(t):new Pg(t)}var G0e=g(()=>{ea();t8();U0e();i(q0e,"createChecksumStream")});var Km,s8=g(()=>{Km=class{static{i(this,"ByteArrayCollector")}allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(this.byteArrays.length===1){let n=this.byteArrays[0];return this.reset(),n}let e=this.allocByteArray(this.byteLength),r=0;for(let n=0;nnew Uint8Array(u))],c=-1,l=i(async u=>{let{value:d,done:p}=await n.read(),m=d;if(p){if(c!==-1){let f=Xm(a,c);su(f)>0&&u.enqueue(f)}u.close()}else{let f=i8(m,!1);if(c!==f&&(c>=0&&u.enqueue(Xm(a,c)),c=f),c===-1){u.enqueue(m);return}let A=su(m);o+=A;let h=su(a[c]);if(A>=e&&h===0)u.enqueue(m);else{let E=o8(a,c,m);!s&&o>e*2&&(s=!0,r?.warn(`@smithy/util-stream - stream chunk size ${A} is below threshold of ${e}, automatically buffering.`)),E>=e?u.enqueue(Xm(a,c)):await l(u)}}},"pull");return new ReadableStream({pull:l})}function o8(t,e,r){switch(e){case 0:return t[0]+=r,su(t[0]);case 1:case 2:return t[e].push(r),su(t[e])}}function Xm(t,e){switch(e){case 0:let r=t[0];return t[0]="",r;case 1:case 2:return t[e].flush()}throw new Error(`@smithy/util-stream - invalid index ${e} given to flush()`)}function su(t){return t?.byteLength??t?.length??0}function i8(t,e=!0){return e&&typeof Buffer<"u"&&t instanceof Buffer?2:t instanceof Uint8Array?1:typeof t=="string"?0:-1}var $0e=g(()=>{s8();i(H0e,"createBufferedReadableStream");i(o8,"merge");i(Xm,"flush");i(su,"sizeOf");i(i8,"modeOf")});function V0e(t,e,r){if($r(t))return H0e(t,e,r);let n=new z0e.Readable({read(){}}),s=!1,o=0,a=["",new Km(l=>new Uint8Array(l)),new Km(l=>Buffer.from(new Uint8Array(l)))],c=-1;return t.on("data",l=>{let u=i8(l,!0);if(c!==u&&(c>=0&&n.push(Xm(a,c)),c=u),c===-1){n.push(l);return}let d=su(l);o+=d;let p=su(a[c]);if(d>=e&&p===0)n.push(l);else{let m=o8(a,c,l);!s&&o>e*2&&(s=!0,r?.warn(`@smithy/util-stream - stream chunk size ${d} is below threshold of ${e}, automatically buffering.`)),m>=e&&n.push(Xm(a,c))}}),t.on("end",()=>{if(c!==-1){let l=Xm(a,c);su(l)>0&&n.push(l)}n.push(null)}),n}var z0e,W0e=g(()=>{z0e=require("node:stream");s8();$0e();ea();i(V0e,"createBufferedReadable")});var Y0e,J0e=g(()=>{Y0e=i((t,e)=>{let{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:s,checksumLocationName:o,streamHasher:a}=e,c=r!==void 0&&n!==void 0&&s!==void 0&&o!==void 0&&a!==void 0,l=c?a(s,t):void 0,u=t.getReader();return new ReadableStream({async pull(d){let{value:p,done:m}=await u.read();if(m){if(d.enqueue(`0\r + `+c}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(c):n.logger?.warn?.(c)}typeof a.$responseBodyText<"u"&&a.$response&&(a.$response.body=a.$responseBodyText);try{if(pn.isInstance(o)){let{headers:l={}}=o,u=Object.entries(l);a.$metadata={httpStatusCode:o.statusCode,requestId:tJ(/^x-[\w-]+-request-?id$/,u),extendedRequestId:tJ(/^x-[\w-]+-id-2$/,u),cfId:tJ(/^x-[\w-]+-cf-id$/,u)}}}catch{}}throw a}},"deserializerMiddleware"),tJ=i((t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],"findHeader")});var So,Bw=g(()=>{So=class t extends Error{static{i(this,"ProviderError")}name="ProviderError";tryNextLink;constructor(e,r=!0){let n,s=!0;typeof r=="boolean"?(n=void 0,s=r):r!=null&&typeof r=="object"&&(n=r.logger,s=r.tryNextLink??!0),super(e),this.tryNextLink=s,Object.setPrototypeOf(this,t.prototype),n?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${e}`)}static from(e,r=!0){return Object.assign(new this(e.message,r),e)}}});var Bd,$P=g(()=>{Bw();Bd=class t extends So{static{i(this,"CredentialsProviderError")}name="CredentialsProviderError";constructor(e,r=!0){super(e,r),Object.setPrototypeOf(this,t.prototype)}}});var zP,axe=g(()=>{Bw();zP=class t extends So{static{i(this,"TokenProviderError")}name="TokenProviderError";constructor(e,r=!0){super(e,r),Object.setPrototypeOf(this,t.prototype)}}});var VP,nJ=g(()=>{Bw();VP=i((...t)=>async()=>{if(t.length===0)throw new So("No providers in chain");let e;for(let r of t)try{return await r()}catch(n){if(e=n,n?.tryNextLink)continue;throw n}throw e},"chain")});var WP,sJ=g(()=>{WP=i(t=>()=>Promise.resolve(t),"fromValue")});var xg,YP=g(()=>{xg=i((t,e,r)=>{let n,s,o,a=!1,c=i(async()=>{s||(s=t());try{n=await s,o=!0,a=!1}finally{s=void 0}return n},"coalesceProvider");return e===void 0?async l=>((!o||l?.forceRefresh)&&(n=await c()),n):async l=>((!o||l?.forceRefresh)&&(n=await c()),a?n:r&&!r(n)?(a=!0,n):(e(n)&&await c(),n))},"memoize")});var cs,JP=g(()=>{cs=i((t,e,r)=>{if(e in t){if(t[e]==="true")return!0;if(t[e]==="false")return!1;throw new Error(`Cannot load ${r} "${e}". Expected "true" or "false", got ${t[e]}.`)}},"booleanSelector")});var cxe,lxe=g(()=>{cxe=i((t,e,r)=>{if(!(e in t))return;let n=parseInt(t[e],10);if(Number.isNaN(n))throw new TypeError(`Cannot load ${r} '${e}'. Expected number, got '${t[e]}'.`);return n},"numberSelector")});var fn,jP=g(()=>{(function(t){t.ENV="env",t.CONFIG="shared config entry"})(fn||(fn={}))});var uxe,dxe,oJ,eSt,Dc,bg=g(()=>{uxe=require("node:os"),dxe=require("node:path"),oJ={},eSt=i(()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT","getHomeDirCacheKey"),Dc=i(()=>{let{HOME:t,USERPROFILE:e,HOMEPATH:r,HOMEDRIVE:n=`C:${dxe.sep}`}=process.env;if(t)return t;if(e)return e;if(r)return`${n}${r}`;let s=eSt();return oJ[s]||(oJ[s]=(0,uxe.homedir)()),oJ[s]},"getHomeDir")});var iJ,aJ,KP,cJ=g(()=>{iJ="AWS_PROFILE",aJ="default",KP=i(t=>t.profile||process.env[iJ]||aJ,"getProfileName")});var pxe,mxe,XP,lJ=g(()=>{pxe=require("node:crypto"),mxe=require("node:path");bg();XP=i(t=>{let r=(0,pxe.createHash)("sha1").update(t).digest("hex");return(0,mxe.join)(Dc(),".aws","sso","cache",`${r}.json`)},"getSSOTokenFilepath")});var fxe,Rw,Axe,uJ=g(()=>{fxe=require("node:fs/promises");lJ();Rw={},Axe=i(async t=>{if(Rw[t])return Rw[t];let e=XP(t),r=await(0,fxe.readFile)(e,"utf8");return JSON.parse(r)},"getSSOTokenFromFile")});var kc,hxe=g(()=>{kc="."});var dJ,gxe,yxe=g(()=>{dJ=R(xc()),gxe=i(t=>Object.entries(t).filter(([e])=>{let r=e.indexOf(".");return r===-1?!1:Object.values(dJ.IniSectionType).includes(e.substring(0,r))}).reduce((e,[r,n])=>{let s=r.indexOf("."),o=r.substring(0,s)===dJ.IniSectionType.PROFILE?r.substring(s+1):r;return e[o]=n,e},{...t.default&&{default:t.default}}),"getConfigData")});var Exe,tSt,ZP,pJ=g(()=>{Exe=require("node:path");bg();tSt="AWS_CONFIG_FILE",ZP=i(()=>process.env[tSt]||(0,Exe.join)(Dc(),".aws","config"),"getConfigFilepath")});var Cxe,rSt,Ixe,wxe=g(()=>{Cxe=require("node:path");bg();rSt="AWS_SHARED_CREDENTIALS_FILE",Ixe=i(()=>process.env[rSt]||(0,Cxe.join)(Dc(),".aws","credentials"),"getCredentialsFilepath")});var Sxe,nSt,sSt,Nw,mJ=g(()=>{Sxe=R(xc()),nSt=/^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/,sSt=["__proto__","profile __proto__"],Nw=i(t=>{let e={},r,n;for(let s of t.split(/\r?\n/)){let o=s.split(/(^|\s)[;#]/)[0].trim();if(o[0]==="["&&o[o.length-1]==="]"){r=void 0,n=void 0;let c=o.substring(1,o.length-1),l=nSt.exec(c);if(l){let[,u,,d]=l;Object.values(Sxe.IniSectionType).includes(u)&&(r=[u,d].join("."))}else r=c;if(sSt.includes(c))throw new Error(`Found invalid profile name "${c}"`)}else if(r){let c=o.indexOf("=");if(![0,-1].includes(c)){let[l,u]=[o.substring(0,c).trim(),o.substring(c+1).trim()];if(u==="")n=l;else{n&&s.trimStart()===s&&(n=void 0),e[r]=e[r]||{};let d=n?[n,l].join("."):l;e[r][d]=u}}}}return e},"parseIni")});var xxe,fJ,Tw,jm,vw=g(()=>{xxe=require("node:fs/promises"),fJ={},Tw={},jm=i((t,e)=>Tw[t]!==void 0?Tw[t]:((!fJ[t]||e?.ignoreCache)&&(fJ[t]=(0,xxe.readFile)(t,"utf8")),fJ[t]),"readFile")});var AJ,bxe,Bg,eQ=g(()=>{AJ=require("node:path");yxe();pJ();wxe();bg();mJ();vw();bxe=i(()=>({}),"swallowError"),Bg=i(async(t={})=>{let{filepath:e=Ixe(),configFilepath:r=ZP()}=t,n=Dc(),s="~/",o=e;e.startsWith(s)&&(o=(0,AJ.join)(n,e.slice(2)));let a=r;r.startsWith(s)&&(a=(0,AJ.join)(n,r.slice(2)));let c=await Promise.all([jm(a,{ignoreCache:t.ignoreCache}).then(Nw).then(gxe).catch(bxe),jm(o,{ignoreCache:t.ignoreCache}).then(Nw).catch(bxe)]);return{configFile:c[0],credentialsFile:c[1]}},"loadSharedConfigFiles")});var Bxe,Rxe,Nxe=g(()=>{Bxe=R(xc()),Rxe=i(t=>Object.entries(t).filter(([e])=>e.startsWith(Bxe.IniSectionType.SSO_SESSION+".")).reduce((e,[r,n])=>({...e,[r.substring(r.indexOf(".")+1)]:n}),{}),"getSsoSessionData")});var oSt,Txe,vxe=g(()=>{pJ();Nxe();mJ();vw();oSt=i(()=>({}),"swallowError"),Txe=i(async(t={})=>jm(t.configFilepath??ZP()).then(Nw).then(Rxe).catch(oSt),"loadSsoSessionData")});var Pxe,Qxe=g(()=>{Pxe=i((...t)=>{let e={};for(let r of t)for(let[n,s]of Object.entries(r))e[n]!==void 0?Object.assign(e[n],s):e[n]=s;return e},"mergeConfigFiles")});var _xe,Dxe=g(()=>{eQ();Qxe();_xe=i(async t=>{let e=await Bg(t);return Pxe(e.configFile,e.credentialsFile)},"parseKnownFiles")});var kxe,Lxe=g(()=>{uJ();vw();kxe={getFileRecord(){return Tw},interceptFile(t,e){Tw[t]=Promise.resolve(e)},getTokenRecord(){return Rw},interceptToken(t,e){Rw[t]=e}}});function tQ(t){try{let e=new Set(Array.from(t.match(/([A-Z_]){3,}/g)??[]));return e.delete("CONFIG"),e.delete("CONFIG_PREFIX_SEPARATOR"),e.delete("ENV"),[...e].join(", ")}catch{return t}}var hJ=g(()=>{i(tQ,"getSelectorName")});var Oxe,Mxe=g(()=>{$P();hJ();Oxe=i((t,e)=>async()=>{try{let r=t(process.env,e);if(r===void 0)throw new Error;return r}catch(r){throw new Bd(r.message||`Not found in ENV: ${tQ(t.toString())}`,{logger:e?.logger})}},"fromEnv")});var Fxe,Uxe=g(()=>{$P();cJ();eQ();hJ();Fxe=i((t,{preferredFile:e="config",...r}={})=>async()=>{let n=KP(r),{configFile:s,credentialsFile:o}=await Bg(r),a=o[n]||{},c=s[n]||{},l=e==="config"?{...a,...c}:{...c,...a};try{let d=t(l,e==="config"?s:o);if(d===void 0)throw new Error;return d}catch(u){throw new Bd(u.message||`Not found in config files w/ profile [${n}]: ${tQ(t.toString())}`,{logger:r.logger})}},"fromSharedConfigFiles")});var iSt,rQ,gJ=g(()=>{sJ();iSt=i(t=>typeof t=="function","isFunction"),rQ=i(t=>iSt(t)?async()=>await t():WP(t),"fromStatic")});var Me,yJ=g(()=>{nJ();YP();Mxe();Uxe();gJ();Me=i(({environmentVariableSelector:t,configFileSelector:e,default:r},n={})=>{let{signingName:s,logger:o}=n;return xg(VP(Oxe(t,{signingName:s,logger:o}),Fxe(e,n),rQ(r)))},"loadConfig")});var nQ,sQ,qxe,Lc,Gxe,Hxe=g(()=>{JP();jP();nQ="AWS_USE_DUALSTACK_ENDPOINT",sQ="use_dualstack_endpoint",qxe=!1,Lc={environmentVariableSelector:i(t=>cs(t,nQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,sQ,fn.CONFIG),"configFileSelector"),default:!1},Gxe={environmentVariableSelector:i(t=>cs(t,nQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,sQ,fn.CONFIG),"configFileSelector"),default:void 0}});var oQ,iQ,$xe,Oc,zxe,Vxe=g(()=>{JP();jP();oQ="AWS_USE_FIPS_ENDPOINT",iQ="use_fips_endpoint",$xe=!1,Oc={environmentVariableSelector:i(t=>cs(t,oQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,iQ,fn.CONFIG),"configFileSelector"),default:!1},zxe={environmentVariableSelector:i(t=>cs(t,oQ,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,iQ,fn.CONFIG),"configFileSelector"),default:void 0}});var Wxe,Yxe=g(()=>{we();Wxe=i(t=>{let{tls:e,endpoint:r,urlParser:n,useDualstackEndpoint:s}=t;return Object.assign(t,{tls:e??!0,endpoint:ht(typeof r=="string"?n(r):r),isCustomEndpoint:!0,useDualstackEndpoint:ht(s??!1)})},"resolveCustomEndpointsConfig")});var Jxe,jxe=g(()=>{Jxe=i(async t=>{let{tls:e=!0}=t,r=await t.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");let s=await t.useDualstackEndpoint(),o=await t.useFipsEndpoint(),{hostname:a}=await t.regionInfoProvider(r,{useDualstackEndpoint:s,useFipsEndpoint:o})??{};if(!a)throw new Error("Cannot resolve hostname from client config");return t.urlParser(`${e?"https:":"http:"}//${a}`)},"getEndpointFromRegion")});var Kxe,Xxe=g(()=>{we();jxe();Kxe=i(t=>{let e=ht(t.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:n,urlParser:s,tls:o}=t;return Object.assign(t,{tls:o??!0,endpoint:r?ht(typeof r=="string"?s(r):r):()=>Jxe({...t,useDualstackEndpoint:e,useFipsEndpoint:n}),isCustomEndpoint:!!r,useDualstackEndpoint:e})},"resolveEndpointsConfig")});var Zxe,EJ,CJ,ebe,tbe,rbe,nbe,sbe,obe,IJ=g(()=>{Zxe="AWS_EXECUTION_ENV",EJ="AWS_REGION",CJ="AWS_DEFAULT_REGION",ebe="AWS_EC2_METADATA_DISABLED",tbe=["in-region","cross-region","mobile","standard","legacy"],rbe="/latest/meta-data/placement/region",nbe="/latest/api/token",sbe="x-aws-ec2-metadata-token",obe="x-aws-ec2-metadata-token-ttl-seconds"});var ibe,aSt,lbe,aQ,abe,cSt,cbe,wJ=g(()=>{IJ();ibe=1e3,aSt=6e4,lbe=0,aQ=i(async()=>{if(!process.env[ebe]&&!(Date.now(){lbe=Date.now()+aSt},"cacheNegativeAndReturnUndefined"),cSt=i(()=>{let t=process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;if(t){let e=new URL(t);return{hostname:e.hostname.replace(/^\[(.+)]$/,"$1"),port:e.port?Number(e.port):void 0}}return process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE==="IPv6"?{hostname:"fd00:ec2::254"}:{hostname:"169.254.169.254"}},"resolveImdsEndpoint"),cbe=i(async t=>{let{request:e}=await import("node:http");return new Promise((r,n)=>{let s=e({hostname:t.hostname,port:t.port,path:t.path,method:t.method,headers:t.headers,timeout:ibe,signal:AbortSignal.timeout(ibe)});s.on("error",o=>{n(o),s.destroy()}),s.on("timeout",()=>{n(new Error("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",o=>{let{statusCode:a=400}=o;if(a<200||a>=300){n(Object.assign(new Error("Error response received from instance metadata service"),{statusCode:a})),s.destroy();return}let c=[];o.on("data",l=>c.push(l)),o.on("end",()=>{r(Buffer.concat(c)),s.destroy()})}),s.end()})},"imdsRequest")});var Rg,Ng,An,ls,SJ=g(()=>{wJ();Rg="AWS_REGION",Ng="region",An={environmentVariableSelector:i(t=>t[Rg],"environmentVariableSelector"),configFileSelector:i(t=>t[Ng],"configFileSelector"),default:i(async()=>{let t=await aQ();if(t)return t;throw new Error("Region is missing")},"default")},ls={preferredFile:"credentials"}});var ube,dbe,pbe=g(()=>{Et();ube=new Set,dbe=i((t,e=Ji)=>{if(!ube.has(t)&&!e(t))if(t==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${t}" is not a valid hostname component.`);else ube.add(t)},"checkRegion")});var cQ,xJ=g(()=>{cQ=i(t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),"isFipsRegion")});var mbe,fbe=g(()=>{xJ();mbe=i(t=>cQ(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,"getRealRegion")});var xo,Abe=g(()=>{pbe();fbe();xJ();xo=i(t=>{let{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return Object.assign(t,{region:i(async()=>{let n=typeof e=="function"?await e():e,s=mbe(n);return dbe(s),s},"region"),useFipsEndpoint:i(async()=>{let n=typeof e=="string"?e:await e();return cQ(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()},"useFipsEndpoint")})},"resolveRegionConfig")});var bJ,hbe=g(()=>{bJ=i((t=[],{useFipsEndpoint:e,useDualstackEndpoint:r})=>t.find(({tags:n})=>e===n.includes("fips")&&r===n.includes("dualstack"))?.hostname,"getHostnameFromVariants")});var gbe,ybe=g(()=>{gbe=i((t,{regionHostname:e,partitionHostname:r})=>e||(r?r.replace("{region}",t):void 0),"getResolvedHostname")});var Ebe,Cbe=g(()=>{Ebe=i((t,{partitionHash:e})=>Object.keys(e||{}).find(r=>e[r].regions.includes(t))??"aws","getResolvedPartition")});var Ibe,wbe=g(()=>{Ibe=i((t,{signingRegion:e,regionRegex:r,useFipsEndpoint:n})=>{if(e)return e;if(n){let s=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),o=t.match(s);if(o)return o[0].slice(1,-1)}},"getResolvedSigningRegion")});var Sbe,xbe=g(()=>{hbe();ybe();Cbe();wbe();Sbe=i((t,{useFipsEndpoint:e=!1,useDualstackEndpoint:r=!1,signingService:n,regionHash:s,partitionHash:o})=>{let a=Ebe(t,{partitionHash:o}),c=t in s?t:o[a]?.endpoint??t,l={useFipsEndpoint:e,useDualstackEndpoint:r},u=bJ(s[c]?.variants,l),d=bJ(o[a]?.variants,l),p=gbe(c,{regionHostname:u,partitionHostname:d});if(p===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:c,useFipsEndpoint:e,useDualstackEndpoint:r}}`);let m=Ibe(p,{signingRegion:s[c]?.signingRegion,regionRegex:o[a].regionRegex,useFipsEndpoint:e});return{partition:a,signingService:n,hostname:p,...m&&{signingRegion:m},...s[c]?.signingService&&{signingService:s[c].signingService}}},"getRegionInfo")});var lSt,uSt,bbe,Bbe=g(()=>{lSt="AWS_DEFAULTS_MODE",uSt="defaults_mode",bbe={environmentVariableSelector:i(t=>t[lSt],"environmentVariableSelector"),configFileSelector:i(t=>t[uSt],"configFileSelector"),default:"legacy"}});var Mc,dSt,pSt,Rbe=g(()=>{SJ();wJ();yJ();YP();IJ();Bbe();Mc=i(({region:t=Me(An),defaultsMode:e=Me(bbe)}={})=>xg(async()=>{let r=typeof e=="function"?await e():e;switch(r?.toLowerCase()){case"auto":return dSt(t);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${tbe.join(", ")}, got ${r}`)}}),"resolveDefaultsModeConfig"),dSt=i(async t=>{if(t){let e=typeof t=="function"?await t():t,r=await pSt();return r?e===r?"in-region":"cross-region":"standard"}return"standard"},"resolveNodeDefaultsModeAuto"),pSt=i(async()=>process.env[Zxe]&&(process.env[EJ]||process.env[CJ])?process.env[EJ]??process.env[CJ]:aQ(),"inferPhysicalRegion")});var bo={};Dr(bo,{CONFIG_PREFIX_SEPARATOR:()=>kc,CONFIG_USE_DUALSTACK_ENDPOINT:()=>sQ,CONFIG_USE_FIPS_ENDPOINT:()=>iQ,CredentialsProviderError:()=>Bd,DEFAULT_PROFILE:()=>aJ,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>qxe,DEFAULT_USE_FIPS_ENDPOINT:()=>$xe,ENV_PROFILE:()=>iJ,ENV_USE_DUALSTACK_ENDPOINT:()=>nQ,ENV_USE_FIPS_ENDPOINT:()=>oQ,NODE_REGION_CONFIG_FILE_OPTIONS:()=>ls,NODE_REGION_CONFIG_OPTIONS:()=>An,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>Lc,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>Oc,ProviderError:()=>So,REGION_ENV_NAME:()=>Rg,REGION_INI_NAME:()=>Ng,SelectorType:()=>fn,TokenProviderError:()=>zP,booleanSelector:()=>cs,chain:()=>VP,externalDataInterceptor:()=>kxe,fromStatic:()=>rQ,fromValue:()=>WP,getHomeDir:()=>Dc,getProfileName:()=>KP,getRegionInfo:()=>Sbe,getSSOTokenFilepath:()=>XP,getSSOTokenFromFile:()=>Axe,loadConfig:()=>Me,loadSharedConfigFiles:()=>Bg,loadSsoSessionData:()=>Txe,memoize:()=>xg,nodeDualstackConfigSelectors:()=>Gxe,nodeFipsConfigSelectors:()=>zxe,numberSelector:()=>cxe,parseKnownFiles:()=>_xe,readFile:()=>jm,resolveCustomEndpointsConfig:()=>Wxe,resolveDefaultsModeConfig:()=>Mc,resolveEndpointsConfig:()=>Kxe,resolveRegionConfig:()=>xo});var It=g(()=>{Bw();$P();axe();nJ();sJ();YP();JP();lxe();jP();bg();cJ();lJ();uJ();hxe();eQ();vxe();Dxe();Lxe();vw();yJ();gJ();Hxe();Vxe();Yxe();Xxe();SJ();Abe();xbe();Rbe()});var Nbe,Tbe,vbe,Pbe=g(()=>{Nbe="AWS_ENDPOINT_URL",Tbe="endpoint_url",vbe=i(t=>({environmentVariableSelector:i(e=>{let r=t.split(" ").map(o=>o.toUpperCase()),n=e[[Nbe,...r].join("_")];if(n)return n;let s=e[Nbe];if(s)return s},"environmentVariableSelector"),configFileSelector:i((e,r)=>{if(e.services){let s=["services",e.services].join(".");if(!r||!r[s])throw new Error(`The services section "${e.services}" specified in the profile is not present in the shared configuration file.`);let o=r[s],a=t.split(" ").map(l=>l.toLowerCase()),c=o[[a.join("_"),Tbe].join(".")];if(c)return c}let n=e[Tbe];if(n)return n},"configFileSelector"),default:void 0}),"getEndpointUrlConfig")});var mSt,fSt,Qbe,_be=g(()=>{It();mSt="AWS_IGNORE_CONFIGURED_ENDPOINT_URLS",fSt="ignore_configured_endpoint_urls",Qbe={environmentVariableSelector:i(t=>cs(t,mSt,fn.ENV),"environmentVariableSelector"),configFileSelector:i(t=>cs(t,fSt,fn.CONFIG),"configFileSelector"),default:!1}});var Pw,Dbe=g(()=>{It();Pbe();_be();Pw=i(async t=>{if(!await Me(Qbe)())return Me(vbe(t??""))()},"getEndpointFromConfig")});var BJ,ASt,hSt,gSt,kbe,Lbe,Obe=g(()=>{BJ=i(async t=>{let e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Lbe(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!kbe(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},"resolveParamsForS3"),ASt=/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/,hSt=/(\d+\.){3}\d+/,gSt=/\.\./,kbe=i(t=>ASt.test(t)&&!hSt.test(t)&&!gSt.test(t),"isDnsCompatibleBucketName"),Lbe=i(t=>{let[e,r,n,,,s]=t.split(":"),o=e==="arn"&&t.split(":").length>=6,a=!!(o&&r&&n&&s);if(o&&!a)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return a},"isArnBucketName")});var Mbe=g(()=>{Obe()});var Fbe,Ube=g(()=>{Fbe=i((t,e,r,n=!1)=>{let s=i(async()=>{let o;return n?o=r.clientContextParams?.[t]??r[t]??r[e]:o=r[t]??r[e],typeof o=="function"?o():o},"configProvider");return t==="credentialScope"||e==="CredentialScope"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:t==="accountId"||e==="AccountId"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:t==="endpoint"||e==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;let o=await s();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){let{protocol:a,hostname:c,port:l,path:u}=o;return`${a}//${c}${l?":"+l:""}${u}`}}return o}:s},"createConfigValueProvider")});var lQ=g(()=>{Et()});function uQ(t){return async(e,r,n,s)=>{if(!n.isCustomEndpoint&&!n.ignoreConfiguredEndpointUrls){let c;n.serviceConfiguredEndpoint?c=await n.serviceConfiguredEndpoint():c=await t(n.serviceId),c&&(n.endpoint=()=>Promise.resolve(Io(c)),n.isCustomEndpoint=!0,s?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${c}`))}let o=await Qw(e,r,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let a=n.endpointProvider(o,s);if(n.isCustomEndpoint&&n.endpoint){let c=await n.endpoint();if(c?.headers){a.headers??={};for(let[l,u]of Object.entries(c.headers))a.headers[l]=Array.isArray(u)?u:[u]}}return a}}var Qw,dQ=g(()=>{Mbe();Ube();lQ();i(uQ,"bindGetEndpointFromInstructions");Qw=i(async(t,e,r)=>{let n={},s=e?.getEndpointParameterInstructions?.()||{};for(let[o,a]of Object.entries(s))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=t[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await Fbe(a.name,o,r,a.type!=="builtInParams")();break;case"operationContextParams":n[o]=a.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await BJ(n),n},"resolveParams")});function ySt(t,e,r){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=r}function pQ(t){let e=uQ(t);return({config:r,instructions:n})=>(s,o)=>async a=>{r.isCustomEndpoint&&ySt(o,"ENDPOINT_OVERRIDE","N");let c=await e(a.input,{getEndpointParameterInstructions(){return n}},{...r},o);o.endpointV2=c,o.authSchemes=c.properties?.authSchemes;let l=o.authSchemes?.[0];if(l){o.signing_region=l.signingRegion,o.signing_service=l.signingName;let d=Bt(o)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:l.signingRegion,signingRegion:l.signingRegion,signing_service:l.signingName,signingName:l.signingName,signingRegionSet:l.signingRegionSet},l.properties))}return s({...a})}}var RJ=g(()=>{Et();dQ();i(ySt,"setFeature");i(pQ,"bindEndpointMiddleware")});function qbe(t){let e=pQ(t);return(r,n)=>({applyToStack:i(s=>{s.addRelativeTo(e({config:r,instructions:n}),NJ)},"applyToStack")})}var ESt,NJ,TJ=g(()=>{RJ();ESt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0},NJ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ESt.name};i(qbe,"bindGetEndpointPlugin")});function Gbe(t){return e=>{let r=e.tls??!0,{endpoint:n,useDualstackEndpoint:s,useFipsEndpoint:o}=e,a=n!=null?async()=>Io(await ht(n)()):void 0,l=Object.assign(e,{endpoint:a,tls:r,isCustomEndpoint:!!n,useDualstackEndpoint:ht(s??!1),useFipsEndpoint:ht(o??!1),ignoreConfiguredEndpointUrls:!!e.ignoreConfiguredEndpointUrls}),u;return l.serviceConfiguredEndpoint=async()=>(e.serviceId&&!u&&(u=t(e.serviceId)),u),l}}var Hbe=g(()=>{Et();lQ();i(Gbe,"bindResolveEndpointConfig")});var di,$be=g(()=>{di=class t{static{i(this,"BinaryDecisionDiagram")}nodes;root;conditions;results;constructor(e,r,n,s){this.nodes=e,this.root=r,this.conditions=n,this.results=s}static from(e,r,n,s){return new t(e,r,n,s)}}});var pi,zbe=g(()=>{pi=class{static{i(this,"EndpointCache")}capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){let n=this.hash(e);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){let s=this.data.keys(),o=0;for(;;){let{value:a,done:c}=s.next();if(this.data.delete(a),c||++o>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(e){let r="",{parameters:n}=this;if(n.length===0)return!1;for(let s of n){let o=String(e[s]??"");if(o.includes("|;"))return!1;r+=o+"|;"}return r}}});var tt,Vbe=g(()=>{tt=class extends Error{static{i(this,"EndpointError")}constructor(e){super(e),this.name="EndpointError"}}});var Bo=g(()=>{Vbe()});var Fc,Wbe=g(()=>{Fc="endpoints"});function Ro(t){return typeof t!="object"||t==null?t:"ref"in t?`$${Ro(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(Ro).join(", ")})`:JSON.stringify(t,null,2)}var Ybe=g(()=>{i(Ro,"toDebugString")});var _w=g(()=>{Wbe();Ybe()});var Os,vJ=g(()=>{Os={}});var PJ,Jbe=g(()=>{PJ=i((t,e)=>t===e,"booleanEquals")});function QJ(...t){for(let e of t)if(e!=null)return e}var jbe=g(()=>{i(QJ,"coalesce")});var Kbe,Xbe=g(()=>{Bo();Kbe=i(t=>{let e=t.split("."),r=[];for(let n of e){let s=n.indexOf("[");if(s!==-1){if(n.indexOf("]")!==n.length-1)throw new tt(`Path: '${t}' does not end with ']'`);let o=n.slice(s+1,-1);if(Number.isNaN(parseInt(o)))throw new tt(`Invalid array index: '${o}' in path: '${t}'`);s!==0&&r.push(n.slice(0,s)),r.push(o)}else r.push(n)}return r},"getAttrPathList")});var Dw,Zbe=g(()=>{Bo();Xbe();Dw=i((t,e)=>Kbe(e).reduce((r,n)=>{if(typeof r!="object")throw new tt(`Index '${n}' in '${e}' not found in '${JSON.stringify(t)}'`);if(Array.isArray(r)){let s=parseInt(n);return r[s<0?r.length+s:s]}return r[n]},t),"getAttr")});var _J,e0e=g(()=>{_J=i(t=>t!=null,"isSet")});function DJ(t,e,r){return t?e:r}var t0e=g(()=>{i(DJ,"ite")});var kJ,r0e=g(()=>{kJ=i(t=>!t,"not")});var CSt,eu,LJ=g(()=>{CSt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),eu=i(t=>CSt.test(t)||t.startsWith("[")&&t.endsWith("]"),"isIpAddress")});var mQ,OJ,MJ,n0e=g(()=>{mQ=R(xc());LJ();OJ={[mQ.EndpointURLScheme.HTTP]:80,[mQ.EndpointURLScheme.HTTPS]:443},MJ=i(t=>{let e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){let{hostname:m,port:f,protocol:A="",path:h="",query:E={}}=t,C=new URL(`${A}//${m}${f?`:${f}`:""}${h}`);return C.search=Object.entries(E).map(([w,x])=>`${w}=${x}`).join("&"),C}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;let r=e.href,{host:n,hostname:s,pathname:o,protocol:a,search:c}=e;if(c)return null;let l=a.slice(0,-1);if(!Object.values(mQ.EndpointURLScheme).includes(l))return null;let u=eu(s),d=r.includes(`${n}:${OJ[l]}`)||typeof t=="string"&&t.includes(`${n}:${OJ[l]}`),p=`${n}${d?`:${OJ[l]}`:""}`;return{scheme:l,authority:p,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},"parseURL")});function FJ(t,e,r){if(r===1)return[t];if(t==="")return[""];let n=t.split(e);return r===0?n:n.slice(0,r-1).concat(n.slice(1).join(e))}var s0e=g(()=>{i(FJ,"split")});var UJ,o0e=g(()=>{UJ=i((t,e)=>t===e,"stringEquals")});var qJ,i0e=g(()=>{qJ=i((t,e,r,n)=>t==null||e>=r||t.length{GJ=i(t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode")});var HJ=g(()=>{Jbe();jbe();Zbe();e0e();Et();t0e();r0e();n0e();s0e();o0e();i0e();a0e()});var c0e,l0e=g(()=>{HJ();c0e={booleanEquals:PJ,coalesce:QJ,getAttr:Dw,isSet:_J,isValidHostLabel:Ji,ite:DJ,not:kJ,parseURL:MJ,split:FJ,stringEquals:UJ,substring:qJ,uriEncode:GJ}});var fQ,$J=g(()=>{HJ();fQ=i((t,e)=>{let r=[],{referenceRecord:n,endpointParams:s}=e,o=0;for(;o{u0e=i(({ref:t},e)=>e.referenceRecord[t]??e.endpointParams[t],"getReferenceValue")});var tu,AQ,p0e,Tg=g(()=>{Bo();vJ();l0e();$J();d0e();tu=i((t,e,r)=>{if(typeof t=="string")return fQ(t,r);if(t.fn)return p0e.callFunction(t,r);if(t.ref)return u0e(t,r);throw new tt(`'${e}': ${String(t)} is not a string, function or reference.`)},"evaluateExpression"),AQ=i(({fn:t,argv:e},r)=>{let n=Array(e.length);for(let a=0;a{Tg()});var hQ,zJ=g(()=>{_w();Bo();m0e();hQ=i((t,e)=>{let{assign:r}=t;if(r&&r in e.referenceRecord)throw new tt(`'${r}' is already defined in Reference Record.`);let n=AQ(t,e);e.logger?.debug?.(`${Fc} evaluateCondition: ${Ro(t)} = ${Ro(n)}`);let s=n===""?!0:!!n;return r!=null?{result:s,toAssign:{name:r,value:n}}:{result:s}},"evaluateCondition")});var gQ,VJ=g(()=>{Bo();Tg();gQ=i((t,e)=>Object.entries(t??{}).reduce((r,[n,s])=>(r[n]=s.map(o=>{let a=tu(o,"Header value entry",e);if(typeof a!="string")throw new tt(`Header '${n}' value '${a}' is not a string`);return a}),r),{}),"getEndpointHeaders")});var kw,f0e,A0e,WJ=g(()=>{Bo();$J();kw=i((t,e)=>Object.entries(t).reduce((r,[n,s])=>(r[n]=A0e.getEndpointProperty(s,e),r),{}),"getEndpointProperties"),f0e=i((t,e)=>{if(Array.isArray(t))return t.map(r=>f0e(r,e));switch(typeof t){case"string":return fQ(t,e);case"object":if(t===null)throw new tt(`Unexpected endpoint property: ${t}`);return A0e.getEndpointProperties(t,e);case"boolean":return t;default:throw new tt(`Unexpected endpoint property type: ${typeof t}`)}},"getEndpointProperty"),A0e={getEndpointProperty:f0e,getEndpointProperties:kw}});var yQ,YJ=g(()=>{Bo();Tg();yQ=i((t,e)=>{let r=tu(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new tt(`Endpoint URL must be a string, got ${typeof r}`)},"getEndpointUrl")});var JJ,Uc,h0e=g(()=>{Bo();zJ();Tg();VJ();WJ();YJ();JJ=1e8,Uc=i((t,e)=>{let{nodes:r,root:n,results:s,conditions:o}=t,a=n,c={},l={referenceRecord:c,endpointParams:e.endpointParams,logger:e.logger};for(;a!==1&&a!==-1&&a=0===E.result?p:m}if(a>=JJ){let u=s[a-JJ];if(u[0]===-1){let[,f]=u;throw new tt(tu(f,"Error",l))}let[d,p,m]=u;return{url:yQ(d,l),properties:kw(p,l),headers:gQ(m??{},l)}}throw new tt("No matching endpoint.")},"decideEndpoint")});var vg,EQ=g(()=>{_w();zJ();vg=i((t=[],e)=>{let r={},n={...e,referenceRecord:{...e.referenceRecord}},s=!1;for(let o of t){let{result:a,toAssign:c}=hQ(o,n);if(!a)return{result:a};c&&(s=!0,r[c.name]=c.value,n.referenceRecord[c.name]=c.value,e.logger?.debug?.(`${Fc} assign: ${c.name} := ${Ro(c.value)}`))}return s?{result:!0,referenceRecord:r}:{result:!0}},"evaluateConditions")});var g0e,y0e=g(()=>{_w();EQ();VJ();WJ();YJ();g0e=i((t,e)=>{let{conditions:r,endpoint:n}=t,{result:s,referenceRecord:o}=vg(r,e);if(!s)return;let a=o?{...e,referenceRecord:{...e.referenceRecord,...o}}:e,{url:c,properties:l,headers:u}=n;e.logger?.debug?.(`${Fc} Resolving endpoint from template: ${Ro(n)}`);let d={url:yQ(c,a)};return u!=null&&(d.headers=gQ(u,a)),l!=null&&(d.properties=kw(l,a)),d},"evaluateEndpointRule")});var E0e,C0e=g(()=>{Bo();EQ();Tg();E0e=i((t,e)=>{let{conditions:r,error:n}=t,{result:s,referenceRecord:o}=vg(r,e);if(!s)return;let a=o?{...e,referenceRecord:{...e.referenceRecord,...o}}:e;throw new tt(tu(n,"Error",a))},"evaluateErrorRule")});var CQ,I0e,jJ,w0e=g(()=>{Bo();EQ();y0e();C0e();CQ=i((t,e)=>{for(let r of t)if(r.type==="endpoint"){let n=g0e(r,e);if(n)return n}else if(r.type==="error")E0e(r,e);else if(r.type==="tree"){let n=jJ.evaluateTreeRule(r,e);if(n)return n}else throw new tt(`Unknown endpoint rule: ${r}`);throw new tt("Rules evaluation failed")},"evaluateRules"),I0e=i((t,e)=>{let{conditions:r,rules:n}=t,{result:s,referenceRecord:o}=vg(r,e);if(!s)return;let a=o?{...e,referenceRecord:{...e.referenceRecord,...o}}:e;return jJ.evaluateRules(n,a)},"evaluateTreeRule"),jJ={evaluateRules:CQ,evaluateTreeRule:I0e}});var S0e=g(()=>{w0e()});var Lw,x0e=g(()=>{_w();Bo();S0e();Lw=i((t,e)=>{let{endpointParams:r,logger:n}=e,{parameters:s,rules:o}=t;e.logger?.debug?.(`${Fc} Initial EndpointParams: ${Ro(r)}`);for(let c in s){let l=s[c],u=r[c];if(u==null&&l.default!=null){r[c]=l.default;continue}if(l.required&&u==null)throw new tt(`Missing required parameter: '${c}'`)}let a=CQ(o,{endpointParams:r,logger:n,referenceRecord:{}});return e.logger?.debug?.(`${Fc} Resolved endpoint: ${Ro(a)}`),a},"resolveEndpoint")});var b0e,B0e=g(()=>{b0e=i(t=>{let{endpoint:e}=t;return e===void 0&&(t.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}),t},"resolveEndpointRequiredConfig")});var KJ={};Dr(KJ,{BinaryDecisionDiagram:()=>di,EndpointCache:()=>pi,EndpointError:()=>tt,customEndpointFunctions:()=>Os,decideEndpoint:()=>Uc,endpointMiddleware:()=>wSt,endpointMiddlewareOptions:()=>NJ,getEndpointFromInstructions:()=>ISt,getEndpointPlugin:()=>nu,isIpAddress:()=>eu,isValidHostLabel:()=>Ji,middlewareEndpointToEndpointV1:()=>Io,resolveEndpoint:()=>Lw,resolveEndpointConfig:()=>ru,resolveEndpointRequiredConfig:()=>b0e,resolveParams:()=>Qw,toEndpointV1:()=>Io});var ISt,ru,wSt,nu,Rt=g(()=>{Dbe();dQ();RJ();TJ();Hbe();Et();$be();zbe();h0e();LJ();Et();vJ();x0e();Bo();dQ();lQ();TJ();B0e();ISt=uQ(Pw),ru=Gbe(Pw),wSt=pQ(Pw),nu=qbe(Pw)});var IQ,XJ=g(()=>{Rt();IQ=i((t,e)=>(r,n)=>async s=>{let o=t,a=n.endpointV2?async()=>Io(n.endpointV2):o.endpoint;if(!a)throw new Error("No valid endpoint provider available.");let c=await e(s.input,{...t,endpoint:a});return r({...s,request:c})},"serializerMiddleware")});function R0e(t,e,r){return{applyToStack:i(n=>{n.add(HP(t,r),ZJ),n.add(IQ(t,e),e8)},"applyToStack")}}var ZJ,e8,N0e=g(()=>{rJ();XJ();ZJ={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},e8={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i(R0e,"getSerdePlugin")});function T0e(t,e){return Buffer.isBuffer(t)?t:typeof t=="string"?Sd(t,e):ArrayBuffer.isView(t)?Xi(t.buffer,t.byteOffset,t.byteLength):Xi(t)}var SQ,wQ,v0e=g(()=>{SQ=require("node:crypto");xd();eJ();wQ=class{static{i(this,"Hash")}algorithmIdentifier;secret;hash;constructor(e,r){this.algorithmIdentifier=e,this.secret=r,this.reset()}update(e,r){this.hash.update(as(T0e(e,r)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?(0,SQ.createHmac)(this.algorithmIdentifier,T0e(this.secret)):(0,SQ.createHash)(this.algorithmIdentifier)}};i(T0e,"castSourceData")});var P0e,Pg,t8=g(()=>{P0e=require("node:stream");GY();Pg=class extends P0e.Readable{static{i(this,"ChecksumStream")}expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;constructor({expectedChecksum:e,checksum:r,source:n,checksumSourceLocation:s,base64Encoder:o}){if(super(),typeof n.pipe!="function")throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`);this.source=n,this.base64Encoder=o??Jt,this.expectedChecksum=e,this.checksum=r,this.checksumSourceLocation=s,this.source.on("data",this.onSourceData),this.source.on("end",this.onSourceEnd),this.source.on("error",this.onSourceError),this.source.on("close",this.onSourceClose),this.source.pause()}onSourceData=i(e=>{if(!this.destroyed){try{this.checksum.update(e)}catch(r){this.destroy(r);return}this.push(e)||this.source.pause()}},"onSourceData");onSourceEnd=i(async()=>{if(!this.destroyed){try{let e=await this.checksum.digest(),r=this.base64Encoder(e);if(this.expectedChecksum!==r){this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${r}" in response header "${this.checksumSourceLocation}".`));return}}catch(e){this.destroy(e);return}this.push(null)}},"onSourceEnd");onSourceError=i(e=>{this.destroy(e)},"onSourceError");onSourceClose=i(()=>{!this.destroyed&&!this.source.readableEnded&&this.destroy(new Error("Connection lost or stream closed before all data was received."))},"onSourceClose");_read(e){this.source.resume()}_destroy(e,r){this.source?.removeListener("data",this.onSourceData),this.source?.removeListener("end",this.onSourceEnd),this.source?.removeListener("error",this.onSourceError),this.source?.removeListener("close",this.onSourceClose),this.source?.destroy(),r(e)}}});var $r,Rd,ea=g(()=>{$r=i(t=>typeof ReadableStream=="function"&&(t?.constructor?.name===ReadableStream.name||t instanceof ReadableStream),"isReadableStream"),Rd=i(t=>typeof Blob=="function"&&(t?.constructor?.name===Blob.name||t instanceof Blob),"isBlob")});var Q0e,_0e=g(()=>{Q0e=i(t=>new TextEncoder().encode(t),"fromUtf8")});var D0e,wQr,k0e,xQ,r8,L0e,O0e=g(()=>{D0e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wQr=Object.entries(D0e).reduce((t,[e,r])=>(t[r]=Number(e),t),{}),k0e=D0e.split(""),xQ=6,r8=8,L0e=63});function bQ(t){let e;typeof t=="string"?e=Q0e(t):e=t;let r=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let o=0;o>d]}s+="==".slice(0,4-l)}return s}var n8=g(()=>{_0e();O0e();i(bQ,"toBase64")});var SSt,BQ,M0e=g(()=>{SSt=typeof ReadableStream=="function"?ReadableStream:function(){},BQ=class extends SSt{static{i(this,"ChecksumStream")}}});var F0e,U0e=g(()=>{n8();ea();M0e();F0e=i(({expectedChecksum:t,checksum:e,source:r,checksumSourceLocation:n,base64Encoder:s})=>{if(!$r(r))throw new Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);let o=s??bQ;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let a=new TransformStream({start(){},async transform(l,u){e.update(l),u.enqueue(l)},async flush(l){let u=await e.digest(),d=o(u);if(t!==d){let p=new Error(`Checksum mismatch: expected "${t}" but received "${d}" in response header "${n}".`);l.error(p)}else l.terminate()}});r.pipeThrough(a);let c=a.readable;return Object.setPrototypeOf(c,BQ.prototype),c},"createChecksumStream")});function q0e(t){return typeof ReadableStream=="function"&&$r(t.source)?F0e(t):new Pg(t)}var G0e=g(()=>{ea();t8();U0e();i(q0e,"createChecksumStream")});var Km,s8=g(()=>{Km=class{static{i(this,"ByteArrayCollector")}allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(this.byteArrays.length===1){let n=this.byteArrays[0];return this.reset(),n}let e=this.allocByteArray(this.byteLength),r=0;for(let n=0;nnew Uint8Array(u))],c=-1,l=i(async u=>{let{value:d,done:p}=await n.read(),m=d;if(p){if(c!==-1){let f=Xm(a,c);su(f)>0&&u.enqueue(f)}u.close()}else{let f=i8(m,!1);if(c!==f&&(c>=0&&u.enqueue(Xm(a,c)),c=f),c===-1){u.enqueue(m);return}let A=su(m);o+=A;let h=su(a[c]);if(A>=e&&h===0)u.enqueue(m);else{let E=o8(a,c,m);!s&&o>e*2&&(s=!0,r?.warn(`@smithy/util-stream - stream chunk size ${A} is below threshold of ${e}, automatically buffering.`)),E>=e?u.enqueue(Xm(a,c)):await l(u)}}},"pull");return new ReadableStream({pull:l})}function o8(t,e,r){switch(e){case 0:return t[0]+=r,su(t[0]);case 1:case 2:return t[e].push(r),su(t[e])}}function Xm(t,e){switch(e){case 0:let r=t[0];return t[0]="",r;case 1:case 2:return t[e].flush()}throw new Error(`@smithy/util-stream - invalid index ${e} given to flush()`)}function su(t){return t?.byteLength??t?.length??0}function i8(t,e=!0){return e&&typeof Buffer<"u"&&t instanceof Buffer?2:t instanceof Uint8Array?1:typeof t=="string"?0:-1}var $0e=g(()=>{s8();i(H0e,"createBufferedReadableStream");i(o8,"merge");i(Xm,"flush");i(su,"sizeOf");i(i8,"modeOf")});function V0e(t,e,r){if($r(t))return H0e(t,e,r);let n=new z0e.Readable({read(){}}),s=!1,o=0,a=["",new Km(l=>new Uint8Array(l)),new Km(l=>Buffer.from(new Uint8Array(l)))],c=-1;return t.on("data",l=>{let u=i8(l,!0);if(c!==u&&(c>=0&&n.push(Xm(a,c)),c=u),c===-1){n.push(l);return}let d=su(l);o+=d;let p=su(a[c]);if(d>=e&&p===0)n.push(l);else{let m=o8(a,c,l);!s&&o>e*2&&(s=!0,r?.warn(`@smithy/util-stream - stream chunk size ${d} is below threshold of ${e}, automatically buffering.`)),m>=e&&n.push(Xm(a,c))}}),t.on("end",()=>{if(c!==-1){let l=Xm(a,c);su(l)>0&&n.push(l)}n.push(null)}),n}var z0e,W0e=g(()=>{z0e=require("node:stream");s8();$0e();ea();i(V0e,"createBufferedReadable")});var Y0e,J0e=g(()=>{Y0e=i((t,e)=>{let{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:s,checksumLocationName:o,streamHasher:a}=e,c=r!==void 0&&n!==void 0&&s!==void 0&&o!==void 0&&a!==void 0,l=c?a(s,t):void 0,u=t.getReader();return new ReadableStream({async pull(d){let{value:p,done:m}=await u.read();if(m){if(d.enqueue(`0\r `),c){let f=r(await l);d.enqueue(`${o}:${f}\r `),d.enqueue(`\r `)}d.close()}else d.enqueue(`${(n(p)||0).toString(16)}\r @@ -142,23 +142,23 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht However, a future version may change this behavior to prefer the ENV static credentials. Please ensure that your environment only sets either the AWS_PROFILE or the AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair. -`),ske=!0)),new JD("AWS_PROFILE is set, skipping fromEnv provider.",{logger:t.logger,tryNextLink:!0});return t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),NTt(t)()},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:a}=t;if(!r&&!n&&!s&&!o&&!a)throw new JD("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:t.logger});let{fromSSO:c}=h6();return c(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=rke();return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=o9();return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=a9();return r(t)(e)},async()=>(t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await PTt(t))()),async()=>{throw new JD("Could not load credentials from any providers",{tryNextLink:!1,logger:t.logger})}],oke),"defaultProvider"),kTt=i(t=>t?.expiration!==void 0,"credentialsWillNeedRefresh"),oke=i(t=>t?.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5,"credentialsTreatedAsExpired");jD.credentialsTreatedAsExpired=oke;jD.credentialsWillNeedRefresh=kTt;jD.defaultProvider=DTt});var tUe=I(y=>{var{awsEndpointFunctions:LTt,emitWarningIfUnsupportedVersion:OTt,createDefaultUserAgentProvider:MTt,NODE_APP_ID_CONFIG_OPTIONS:FTt,getAwsRegionExtensionConfiguration:UTt,resolveAwsRegionExtensionConfiguration:qTt,resolveUserAgentConfig:GTt,resolveHostHeaderConfig:HTt,getUserAgentPlugin:$Tt,getHostHeaderPlugin:zTt,getLoggerPlugin:VTt,getRecursionDetectionPlugin:WTt}=(pt(),ee(da)),{getHttpAuthSchemeEndpointRuleSetPlugin:YTt,DefaultIdentityProviderConfig:JTt,getHttpSigningPlugin:jTt,createPaginator:Rf}=(ds(),ee(E5)),{normalizeProvider:dke,getSmithyContext:KTt,ServiceException:XTt,NoOpLogger:ZTt,emitWarningIfUnsupportedVersion:evt,loadConfigsForDefaultMode:tvt,getDefaultExtensionConfiguration:rvt,resolveDefaultRuntimeConfig:nvt,Client:pke,makeBuilder:svt,createWaiter:$L,checkExceptions:mke,WaiterState:Ey,createAggregatedClient:ovt}=(we(),ee(Ag)),{Command:ivt}=(we(),ee(Ag));y.$Command=ivt;y.__Client=pke;var{resolveDefaultsModeConfig:avt,loadConfig:xf,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:cvt,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:lvt,NODE_REGION_CONFIG_OPTIONS:uvt,NODE_REGION_CONFIG_FILE_OPTIONS:dvt,resolveRegionConfig:pvt}=(It(),ee(bo)),{BinaryDecisionDiagram:mvt,EndpointCache:fvt,decideEndpoint:Avt,customEndpointFunctions:hvt,resolveEndpointConfig:gvt,getEndpointPlugin:yvt}=(Rt(),ee(KJ)),{parseUrl:Evt,getHttpHandlerExtensionConfiguration:Cvt,resolveHttpHandlerRuntimeConfig:Ivt,getContentLengthPlugin:wvt}=(Re(),ee(Od)),{DEFAULT_RETRY_MODE:Svt,NODE_RETRY_MODE_CONFIG_OPTIONS:xvt,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:bvt,resolveRetryConfig:Bvt,getRetryPlugin:Rvt}=(No(),ee(n5)),{TypeRegistry:fke,getSchemaSerdePlugin:Nvt}=(st(),ee(PY)),{resolveAwsSdkSigV4Config:Tvt,AwsSdkSigV4Signer:vvt,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:Pvt}=(kn(),ee(k_)),{defaultProvider:Qvt}=l9(),{toUtf8:_vt,fromUtf8:Dvt,toBase64:kvt,fromBase64:Lvt,calculateBodyLength:Ovt}=(Pe(),ee(_g)),{streamCollector:Mvt,NodeHttpHandler:Fvt}=lu(),{AwsJson1_1Protocol:Uvt}=(pf(),ee(Jj)),{Sha256:qvt}=(iu(),ee(w8)),Gvt=i(async(t,e,r)=>({operation:KTt(e).operation,region:await dke(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultECRHttpAuthSchemeParametersProvider");function Hvt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr",region:t.region},propertiesExtractor:i((e,r)=>({signingProperties:{config:e,context:r}}),"propertiesExtractor")}}i(Hvt,"createAwsAuthSigv4HttpAuthOption");var $vt=i(t=>{let e=[];switch(t.operation){default:e.push(Hvt(t))}return e},"defaultECRHttpAuthSchemeProvider"),zvt=i(t=>{let e=Tvt(t);return Object.assign(e,{authSchemePreference:dke(t.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig"),Vvt=i(t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"ecr"}),"resolveClientEndpointParameters"),Wvt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Yvt="3.1090.0",Jvt={version:Yvt},Cy="ref",bf=-1,KD=!0,ike="isSet",d9="PartitionResult",ip="stringEquals",XD="booleanEquals",u9="getAttr",ake={[Cy]:"Endpoint"},ap={fn:u9,argv:[{[Cy]:d9},"name"]},cke={[Cy]:d9},Bf={},lke=[{[Cy]:"Region"}],uke={conditions:[[ike,[ake]],[ike,lke],["aws.partition",lke,d9],[ip,[ap,"aws-eusc"]],[ip,[ap,"aws-iso-f"]],[ip,[ap,"aws-iso-e"]],[ip,[ap,"aws-iso-b"]],[ip,[ap,"aws-iso"]],[ip,[ap,"aws-cn"]],[ip,[ap,"aws-us-gov"]],[ip,[ap,"aws"]],[XD,[{[Cy]:"UseFIPS"},KD]],[XD,[{fn:u9,argv:[cke,"supportsFIPS"]},KD]],[XD,[{[Cy]:"UseDualStack"},KD]],[XD,[{fn:u9,argv:[cke,"supportsDualStack"]},KD]]],results:[[bf],[bf,"Invalid Configuration: FIPS and custom endpoint are not supported"],[bf,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[ake,Bf],["https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",Bf],["https://ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],["https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",Bf],["https://ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],["https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],[bf,"FIPS and DualStack are enabled, but this partition does not support one or both"],[bf,"FIPS is enabled but this partition does not support FIPS"],["https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],[bf,"DualStack is enabled but this partition does not support DualStack"],[bf,"Invalid Configuration: Missing Region"]]},jvt=2,In=1e8,Kvt=new Int32Array([-1,1,-1,0,23,3,1,4,In+13,2,5,In+13,3,20,6,4,20,7,5,20,8,6,20,9,7,20,10,8,20,11,9,20,12,10,20,13,11,16,14,13,15,In+4,14,In+11,In+12,12,18,17,13,In+9,In+10,13,19,In+6,14,In+8,In+9,11,22,21,13,In+5,In+4,13,In+7,In+6,11,In+1,24,13,In+2,In+3]),Xvt=mvt.from(Kvt,jvt,uke.conditions,uke.results),Zvt=new fvt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ePt=i((t,e={})=>Zvt.get(t,()=>Avt(Xvt,{endpointParams:t,logger:e.logger})),"defaultEndpointResolver");hvt.aws=LTt;var ge=class t extends XTt{static{i(this,"ECRServiceException")}constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}},ZD=class t extends ge{static{i(this,"InvalidParameterException")}name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ek=class t extends ge{static{i(this,"RepositoryNotFoundException")}name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},tk=class t extends ge{static{i(this,"ServerException")}name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e}),Object.setPrototypeOf(this,t.prototype)}},rk=class t extends ge{static{i(this,"LimitExceededException")}name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},nk=class t extends ge{static{i(this,"UnableToGetUpstreamImageException")}name="UnableToGetUpstreamImageException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamImageException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},sk=class t extends ge{static{i(this,"ValidationException")}name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ok=class t extends ge{static{i(this,"EmptyUploadException")}name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ik=class t extends ge{static{i(this,"InvalidLayerException")}name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ak=class t extends ge{static{i(this,"KmsException")}name="KmsException";$fault="client";kmsError;constructor(e){super({name:"KmsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype),this.kmsError=e.kmsError}},ck=class t extends ge{static{i(this,"LayerAlreadyExistsException")}name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},lk=class t extends ge{static{i(this,"LayerPartTooSmallException")}name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},uk=class t extends ge{static{i(this,"UploadNotFoundException")}name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},dk=class t extends ge{static{i(this,"PullThroughCacheRuleAlreadyExistsException")}name="PullThroughCacheRuleAlreadyExistsException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},pk=class t extends ge{static{i(this,"SecretNotFoundException")}name="SecretNotFoundException";$fault="client";constructor(e){super({name:"SecretNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},mk=class t extends ge{static{i(this,"UnableToAccessSecretException")}name="UnableToAccessSecretException";$fault="client";constructor(e){super({name:"UnableToAccessSecretException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},fk=class t extends ge{static{i(this,"UnableToDecryptSecretValueException")}name="UnableToDecryptSecretValueException";$fault="client";constructor(e){super({name:"UnableToDecryptSecretValueException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ak=class t extends ge{static{i(this,"UnsupportedUpstreamRegistryException")}name="UnsupportedUpstreamRegistryException";$fault="client";constructor(e){super({name:"UnsupportedUpstreamRegistryException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},hk=class t extends ge{static{i(this,"InvalidTagParameterException")}name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},gk=class t extends ge{static{i(this,"RepositoryAlreadyExistsException")}name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},yk=class t extends ge{static{i(this,"TooManyTagsException")}name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ek=class t extends ge{static{i(this,"TemplateAlreadyExistsException")}name="TemplateAlreadyExistsException";$fault="client";constructor(e){super({name:"TemplateAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ck=class t extends ge{static{i(this,"LifecyclePolicyNotFoundException")}name="LifecyclePolicyNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ik=class t extends ge{static{i(this,"PullThroughCacheRuleNotFoundException")}name="PullThroughCacheRuleNotFoundException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},wk=class t extends ge{static{i(this,"RegistryPolicyNotFoundException")}name="RegistryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RegistryPolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Sk=class t extends ge{static{i(this,"RepositoryNotEmptyException")}name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},xk=class t extends ge{static{i(this,"TemplateNotFoundException")}name="TemplateNotFoundException";$fault="client";constructor(e){super({name:"TemplateNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},bk=class t extends ge{static{i(this,"RepositoryPolicyNotFoundException")}name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Bk=class t extends ge{static{i(this,"SigningConfigurationNotFoundException")}name="SigningConfigurationNotFoundException";$fault="client";constructor(e){super({name:"SigningConfigurationNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Rk=class t extends ge{static{i(this,"ExclusionNotFoundException")}name="ExclusionNotFoundException";$fault="client";constructor(e){super({name:"ExclusionNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Nk=class t extends ge{static{i(this,"ImageNotFoundException")}name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Tk=class t extends ge{static{i(this,"ScanNotFoundException")}name="ScanNotFoundException";$fault="client";constructor(e){super({name:"ScanNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},vk=class t extends ge{static{i(this,"LayerInaccessibleException")}name="LayerInaccessibleException";$fault="client";constructor(e){super({name:"LayerInaccessibleException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Pk=class t extends ge{static{i(this,"LayersNotFoundException")}name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Qk=class t extends ge{static{i(this,"UnableToGetUpstreamLayerException")}name="UnableToGetUpstreamLayerException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamLayerException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},_k=class t extends ge{static{i(this,"LifecyclePolicyPreviewNotFoundException")}name="LifecyclePolicyPreviewNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Dk=class t extends ge{static{i(this,"UnableToListUpstreamImageReferrersException")}name="UnableToListUpstreamImageReferrersException";$fault="client";constructor(e){super({name:"UnableToListUpstreamImageReferrersException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},kk=class t extends ge{static{i(this,"ImageAlreadyExistsException")}name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Lk=class t extends ge{static{i(this,"ImageDigestDoesNotMatchException")}name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ok=class t extends ge{static{i(this,"ImageTagAlreadyExistsException")}name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Mk=class t extends ge{static{i(this,"ReferencedImagesNotFoundException")}name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Fk=class t extends ge{static{i(this,"BlockedByOrganizationPolicyException")}name="BlockedByOrganizationPolicyException";$fault="client";constructor(e){super({name:"BlockedByOrganizationPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Uk=class t extends ge{static{i(this,"ExclusionAlreadyExistsException")}name="ExclusionAlreadyExistsException";$fault="client";constructor(e){super({name:"ExclusionAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},qk=class t extends ge{static{i(this,"ImageArchivedException")}name="ImageArchivedException";$fault="client";constructor(e){super({name:"ImageArchivedException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Gk=class t extends ge{static{i(this,"UnsupportedImageTypeException")}name="UnsupportedImageTypeException";$fault="client";constructor(e){super({name:"UnsupportedImageTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Hk=class t extends ge{static{i(this,"LifecyclePolicyPreviewInProgressException")}name="LifecyclePolicyPreviewInProgressException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},$k=class t extends ge{static{i(this,"ImageStorageClassUpdateNotSupportedException")}name="ImageStorageClassUpdateNotSupportedException";$fault="client";constructor(e){super({name:"ImageStorageClassUpdateNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},zk=class t extends ge{static{i(this,"InvalidLayerPartException")}name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype),this.registryId=e.registryId,this.repositoryName=e.repositoryName,this.uploadId=e.uploadId,this.lastValidByteReceived=e.lastValidByteReceived}},tPt="Attribute",rPt="AuthorizationData",nPt="AuthorizationDataList",sPt="AwsEcrContainerImageDetails",oPt="AttributeList",iPt="BlockedByOrganizationPolicyException",aPt="BatchCheckLayerAvailability",cPt="BatchCheckLayerAvailabilityRequest",lPt="BatchCheckLayerAvailabilityResponse",uPt="BatchDeleteImage",dPt="BatchDeleteImageRequest",pPt="BatchDeleteImageResponse",mPt="BatchGetImage",fPt="BatchGetImageRequest",APt="BatchGetImageResponse",hPt="BatchGetRepositoryScanningConfiguration",gPt="BatchGetRepositoryScanningConfigurationRequest",yPt="BatchGetRepositoryScanningConfigurationResponse",EPt="CompleteLayerUpload",CPt="CompleteLayerUploadRequest",IPt="CompleteLayerUploadResponse",wPt="CreatePullThroughCacheRule",SPt="CreatePullThroughCacheRuleRequest",xPt="CreatePullThroughCacheRuleResponse",bPt="CreateRepository",BPt="CreateRepositoryCreationTemplate",RPt="CreateRepositoryCreationTemplateRequest",NPt="CreateRepositoryCreationTemplateResponse",TPt="CreateRepositoryRequest",vPt="CreateRepositoryResponse",PPt="CvssScore",QPt="CvssScoreAdjustment",_Pt="CvssScoreAdjustmentList",DPt="CvssScoreDetails",kPt="CvssScoreList",LPt="DescribeImages",OPt="DescribeImagesFilter",MPt="DescribeImagesRequest",FPt="DescribeImageReplicationStatus",UPt="DescribeImageReplicationStatusRequest",qPt="DescribeImageReplicationStatusResponse",GPt="DescribeImagesResponse",HPt="DescribeImageScanFindings",$Pt="DescribeImageScanFindingsRequest",zPt="DescribeImageScanFindingsResponse",VPt="DescribeImageSigningStatus",WPt="DescribeImageSigningStatusRequest",YPt="DescribeImageSigningStatusResponse",JPt="DeleteLifecyclePolicy",jPt="DeleteLifecyclePolicyRequest",KPt="DeleteLifecyclePolicyResponse",XPt="DeletePullThroughCacheRule",ZPt="DeletePullThroughCacheRuleRequest",eQt="DeletePullThroughCacheRuleResponse",tQt="DescribePullThroughCacheRulesRequest",rQt="DescribePullThroughCacheRulesResponse",nQt="DescribePullThroughCacheRules",sQt="DeregisterPullTimeUpdateExclusion",oQt="DeregisterPullTimeUpdateExclusionRequest",iQt="DeregisterPullTimeUpdateExclusionResponse",aQt="DeleteRepository",cQt="DeleteRepositoryCreationTemplate",lQt="DeleteRepositoryCreationTemplateRequest",uQt="DeleteRepositoryCreationTemplateResponse",dQt="DescribeRepositoryCreationTemplatesRequest",pQt="DescribeRepositoryCreationTemplatesResponse",mQt="DescribeRepositoryCreationTemplates",fQt="DeleteRegistryPolicy",AQt="DeleteRegistryPolicyRequest",hQt="DeleteRegistryPolicyResponse",gQt="DeleteRepositoryPolicyRequest",yQt="DeleteRepositoryPolicyResponse",EQt="DeleteRepositoryPolicy",CQt="DeleteRepositoryRequest",IQt="DeleteRepositoryResponse",wQt="DescribeRegistryRequest",SQt="DescribeRegistryResponse",xQt="DescribeRepositoriesRequest",bQt="DescribeRepositoriesResponse",BQt="DescribeRegistry",RQt="DescribeRepositories",NQt="DeleteSigningConfiguration",TQt="DeleteSigningConfigurationRequest",vQt="DeleteSigningConfigurationResponse",PQt="ExclusionAlreadyExistsException",QQt="EncryptionConfiguration",_Qt="EncryptionConfigurationForRepositoryCreationTemplate",DQt="EnhancedImageScanFinding",kQt="EnhancedImageScanFindingList",LQt="ExclusionNotFoundException",OQt="EmptyUploadException",MQt="GetAccountSetting",FQt="GetAccountSettingRequest",UQt="GetAccountSettingResponse",qQt="GetAuthorizationToken",GQt="GetAuthorizationTokenRequest",HQt="GetAuthorizationTokenResponse",$Qt="GetDownloadUrlForLayer",zQt="GetDownloadUrlForLayerRequest",VQt="GetDownloadUrlForLayerResponse",WQt="GetLifecyclePolicy",YQt="GetLifecyclePolicyPreview",JQt="GetLifecyclePolicyPreviewRequest",jQt="GetLifecyclePolicyPreviewResponse",KQt="GetLifecyclePolicyRequest",XQt="GetLifecyclePolicyResponse",ZQt="GetRegistryPolicy",e_t="GetRegistryPolicyRequest",t_t="GetRegistryPolicyResponse",r_t="GetRepositoryPolicyRequest",n_t="GetRepositoryPolicyResponse",s_t="GetRepositoryPolicy",o_t="GetRegistryScanningConfiguration",i_t="GetRegistryScanningConfigurationRequest",a_t="GetRegistryScanningConfigurationResponse",c_t="GetSigningConfiguration",l_t="GetSigningConfigurationRequest",u_t="GetSigningConfigurationResponse",d_t="Image",p_t="ImageArchivedException",m_t="ImageAlreadyExistsException",f_t="ImageDetail",A_t="ImageDigestDoesNotMatchException",h_t="ImageDetailList",g_t="ImageFailure",y_t="ImageFailureList",E_t="ImageIdentifier",C_t="ImageIdentifierList",I_t="ImageList",w_t="InvalidLayerException",S_t="InvalidLayerPartException",x_t="InitiateLayerUpload",b_t="InitiateLayerUploadRequest",B_t="InitiateLayerUploadResponse",R_t="ImageNotFoundException",N_t="InvalidParameterException",T_t="ImageReferrer",v_t="ImageReferrerList",P_t="ImageReplicationStatus",Q_t="ImageReplicationStatusList",__t="ImageScanningConfiguration",D_t="ImageStorageClassUpdateNotSupportedException",k_t="ImageScanFinding",L_t="ImageScanFindingList",O_t="ImageScanFindingsSummary",M_t="ImageScanFindings",F_t="ImageScanStatus",U_t="ImageSigningStatusList",q_t="ImageSigningStatus",G_t="ImageTagAlreadyExistsException",H_t="ImageTagMutabilityExclusionFilter",$_t="ImageTagMutabilityExclusionFilters",z_t="InvalidTagParameterException",V_t="Key",W_t="KmsException",Y_t="Layer",J_t="LayerAlreadyExistsException",j_t="LimitExceededException",K_t="LayerFailure",X_t="LayerFailureList",Z_t="ListImages",eDt="LayerInaccessibleException",tDt="ListImagesFilter",rDt="ListImagesRequest",nDt="ListImageReferrersFilter",sDt="ListImageReferrersRequest",oDt="ListImageReferrersResponse",iDt="ListImagesResponse",aDt="ListImageReferrers",cDt="LayerList",lDt="LayersNotFoundException",uDt="LifecyclePolicyNotFoundException",dDt="LifecyclePolicyPreviewFilter",pDt="LifecyclePolicyPreviewInProgressException",mDt="LifecyclePolicyPreviewNotFoundException",fDt="LifecyclePolicyPreviewResult",ADt="LifecyclePolicyPreviewResultList",hDt="LifecyclePolicyPreviewSummary",gDt="LifecyclePolicyRuleAction",yDt="LayerPartTooSmallException",EDt="ListPullTimeUpdateExclusions",CDt="ListPullTimeUpdateExclusionsRequest",IDt="ListPullTimeUpdateExclusionsResponse",wDt="ListTagsForResource",SDt="ListTagsForResourceRequest",xDt="ListTagsForResourceResponse",bDt="PutAccountSetting",BDt="PutAccountSettingRequest",RDt="PutAccountSettingResponse",NDt="PutImage",TDt="PutImageRequest",vDt="PutImageResponse",PDt="PutImageScanningConfiguration",QDt="PutImageScanningConfigurationRequest",_Dt="PutImageScanningConfigurationResponse",DDt="PutImageTagMutability",kDt="PutImageTagMutabilityRequest",LDt="PutImageTagMutabilityResponse",ODt="PutLifecyclePolicy",MDt="PutLifecyclePolicyRequest",FDt="PutLifecyclePolicyResponse",UDt="PutReplicationConfiguration",qDt="PutReplicationConfigurationRequest",GDt="PutReplicationConfigurationResponse",HDt="PutRegistryPolicy",$Dt="PutRegistryPolicyRequest",zDt="PutRegistryPolicyResponse",VDt="PutRegistryScanningConfiguration",WDt="PutRegistryScanningConfigurationRequest",YDt="PutRegistryScanningConfigurationResponse",JDt="PutSigningConfiguration",jDt="PutSigningConfigurationRequest",KDt="PutSigningConfigurationResponse",XDt="PullThroughCacheRule",ZDt="PullThroughCacheRuleAlreadyExistsException",ekt="PullThroughCacheRuleList",tkt="PullThroughCacheRuleNotFoundException",rkt="PackageVulnerabilityDetails",nkt="Recommendation",skt="RepositoryAlreadyExistsException",okt="ReplicationConfiguration",ikt="RepositoryCreationTemplate",akt="RepositoryCreationTemplateList",ckt="ReplicationDestination",lkt="ReplicationDestinationList",ukt="ResourceDetails",dkt="RepositoryFilter",pkt="RepositoryFilterList",mkt="ReferencedImagesNotFoundException",fkt="RepositoryList",Akt="ResourceList",hkt="RepositoryNotEmptyException",gkt="RepositoryNotFoundException",ykt="RegistryPolicyNotFoundException",Ekt="RepositoryPolicyNotFoundException",Ckt="RegisterPullTimeUpdateExclusion",Ikt="RegisterPullTimeUpdateExclusionRequest",wkt="RegisterPullTimeUpdateExclusionResponse",Skt="ReplicationRule",xkt="ReplicationRuleList",bkt="RegistryScanningConfiguration",Bkt="RepositoryScanningConfigurationFailure",Rkt="RepositoryScanningConfigurationFailureList",Nkt="RepositoryScanningConfigurationList",Tkt="RepositoryScanningConfiguration",vkt="RegistryScanningRule",Pkt="RegistryScanningRuleList",Qkt="Remediation",_kt="Repository",Dkt="Resource",kkt="SigningConfiguration",Lkt="SigningConfigurationNotFoundException",Okt="ScoreDetails",Mkt="ServerException",Fkt="SubjectIdentifier",Ukt="StartImageScan",qkt="StartImageScanRequest",Gkt="StartImageScanResponse",Hkt="StartLifecyclePolicyPreview",$kt="StartLifecyclePolicyPreviewRequest",zkt="StartLifecyclePolicyPreviewResponse",Vkt="ScanNotFoundException",Wkt="SecretNotFoundException",Ykt="SigningRule",Jkt="ScanningRepositoryFilter",jkt="ScanningRepositoryFilterList",Kkt="SigningRepositoryFilterList",Xkt="SigningRepositoryFilter",Zkt="SigningRuleList",eLt="SetRepositoryPolicy",tLt="SetRepositoryPolicyRequest",rLt="SetRepositoryPolicyResponse",nLt="Tag",sLt="TemplateAlreadyExistsException",oLt="TransitioningImageTotalCount",iLt="TransitioningImageTotalCounts",aLt="TagList",cLt="TooManyTagsException",lLt="TemplateNotFoundException",uLt="TagResource",dLt="TagResourceRequest",pLt="TagResourceResponse",mLt="UpdateImageStorageClass",fLt="UpdateImageStorageClassRequest",ALt="UpdateImageStorageClassResponse",hLt="UnsupportedImageTypeException",gLt="UploadLayerPart",yLt="UploadLayerPartRequest",ELt="UploadLayerPartResponse",CLt="UploadNotFoundException",ILt="UpdatePullThroughCacheRule",wLt="UpdatePullThroughCacheRuleRequest",SLt="UpdatePullThroughCacheRuleResponse",xLt="UntagResource",bLt="UpdateRepositoryCreationTemplate",BLt="UpdateRepositoryCreationTemplateRequest",RLt="UpdateRepositoryCreationTemplateResponse",NLt="UntagResourceRequest",TLt="UntagResourceResponse",vLt="UnableToAccessSecretException",PLt="UnableToDecryptSecretValueException",QLt="UnableToGetUpstreamImageException",_Lt="UnableToGetUpstreamLayerException",DLt="UnableToListUpstreamImageReferrersException",kLt="UnsupportedUpstreamRegistryException",LLt="Value",OLt="ValidationException",MLt="VulnerablePackage",FLt="VulnerablePackagesList",ULt="ValidatePullThroughCacheRule",qLt="ValidatePullThroughCacheRuleRequest",GLt="ValidatePullThroughCacheRuleResponse",HLt="architecture",$Lt="awsAccountId",zLt="authorizationData",VLt="awsEcrContainerImage",p9="appliedFor",WLt="acceptedMediaTypes",YLt="artifactMediaType",JLt="appliedRulePriority",Ake="artifactStatus",jLt="appliedScanFilters",KLt="authorizationToken",XLt="artifactType",ZLt="artifactTypes",eOt="action",tOt="adjustments",rOt="annotations",nOt="arch",sOt="attributes",oOt="author",iOt="baseScore",ve="client",Nf="credentialArn",Sy="createdAt",il="customRoleArn",hke="cvss",xy="description",aOt="downloadUrl",cOt="destinations",lOt="details",uOt="digest",Ne="error",dOt="expiresAt",pOt="exploitAvailable",gx="encryptionConfiguration",mOt="enhancedFindings",fOt="expiringImageTotalCount",fu="ecrRepositoryPrefix",AOt="ecrRepositoryPrefixes",gke="encryptionType",hOt="epoch",zL="failures",gOt="findingArn",yOt="fixAvailable",yx="failureCode",EOt="fixedInVersion",COt="firstObservedAt",IOt="filePath",VL="failureReason",yke="findingSeverityCounts",WL="filterType",wOt="failure",cp="filter",SOt="findings",Eke="force",xOt="httpError",bOt="images",BOt="imageDetails",Ex="imageDigest",ROt="imageHash",by="imageIds",wi="imageId",Cke="imageManifest",m9="imageManifestMediaType",Ike="imagePushedAt",YL="imageStatus",JL="imageScanningConfiguration",wke="imageScanCompletedAt",NOt="imageScanFindings",TOt="imageScanFindingsSummary",vOt="imageSizeInBytes",f9="imageScanStatus",A9="imageTags",POt="imageTotalCount",Tf="imageTagMutability",vf="imageTagMutabilityExclusionFilters",Ske="imageTag",QOt="inUseCount",_Ot="isValid",DOt="id",kOt="image",LOt="key",OOt="kmsError",xke="kmsKey",MOt="layers",FOt="layerAvailability",UOt="lastArchivedAt",qOt="lastActivatedAt",GOt="lastByteReceived",bke="layerDigests",Cx="layerDigest",Bke="lastEvaluatedAt",HOt="lastInUseAt",$Ot="lastObservedAt",h9="lifecyclePolicy",zOt="layerPartBlob",Pf="lifecyclePolicyText",VOt="lastRecordedPullTime",WOt="layerSize",YOt="lastValidByteReceived",Te="message",Au="maxResults",Rke="mediaType",JOt="metric",By="name",nn="nextToken",jOt="platform",KOt="pushedAt",jL="principalArn",XOt="proxyEndpoint",ZOt="partFirstByte",eMt="partLastByte",tMt="packageManager",rMt="previewResults",nMt="partSize",lp="policyText",sMt="pullThroughCacheRules",oMt="pullTimeUpdateExclusions",iMt="packageVulnerabilityDetails",KL="prefix",aMt="prefixes",cMt="registry",g9="resourceArn",Nke="repositoryArn",y9="replicationConfiguration",E9="repositoryCreationTemplate",lMt="repositoryCreationTemplates",C9="repositoryFilters",q="registryId",uMt="registryIds",he="repositoryName",Tke="repositoryNames",I9="repositoryPolicy",dMt="replicationStatuses",pMt="registryScanningConfiguration",w9="resourceTags",mMt="referenceUrls",fMt="repositoryUri",AMt="relatedVulnerabilities",vke="repository",hMt="reason",gMt="recommendation",yMt="referrers",Pke="region",EMt="release",CMt="remediation",IMt="repositories",wMt="resources",XL="rules",Qke="smithy.ts.sdk.synthetic.com.amazonaws.ecr",SMt="scanningConfigurations",xMt="scanningConfiguration",ZL="signingConfiguration",bMt="storageClass",BMt="scoreDetails",_ke="scanFrequency",RMt="subjectId",NMt="sourceLayerHash",TMt="subjectManifestDigest",Dke="scanOnPush",kke="signingProfileArn",vMt="scoreSource",PMt="signingStatuses",Lke="scanType",QMt="sourceUrl",Oke="scoringVector",Mke="score",_Mt="server",Fke="severity",DMt="size",Uke="source",Ry="status",kMt="summary",eO="tags",LMt="transitioningImageTotalCounts",OMt="tagKeys",S9="tagStatus",x9="targetStorageClass",MMt="text",FMt="title",b9="type",UMt="uri",tO="updatedAt",Ny="uploadId",B9="upstreamRegistry",Ty="upstreamRepositoryPrefix",Ix="upstreamRegistryUrl",qMt="url",rO="value",GMt="vendorCreatedAt",HMt="vulnerabilityId",$Mt="vulnerablePackages",zMt="vendorSeverity",qke="vulnerabilitySourceUpdatedAt",VMt="vendorUpdatedAt",R9="version",S="com.amazonaws.ecr",Gke=fke.for(Qke),Hke=[-3,Qke,"ECRServiceException",0,[],[]];Gke.registerError(Hke,ge);var Se=fke.for(S),$ke=[-3,S,iPt,{[Ne]:ve},[Te],[0]];Se.registerError($ke,Fk);var zke=[-3,S,OQt,{[Ne]:ve},[Te],[0]];Se.registerError(zke,ok);var Vke=[-3,S,PQt,{[Ne]:ve},[Te],[0]];Se.registerError(Vke,Uk);var Wke=[-3,S,LQt,{[Ne]:ve},[Te],[0]];Se.registerError(Wke,Rk);var Yke=[-3,S,m_t,{[Ne]:ve},[Te],[0]];Se.registerError(Yke,kk);var Jke=[-3,S,p_t,{[Ne]:ve},[Te],[0]];Se.registerError(Jke,qk);var jke=[-3,S,A_t,{[Ne]:ve},[Te],[0]];Se.registerError(jke,Lk);var Kke=[-3,S,R_t,{[Ne]:ve},[Te],[0]];Se.registerError(Kke,Nk);var Xke=[-3,S,D_t,{[Ne]:ve},[Te],[0]];Se.registerError(Xke,$k);var Zke=[-3,S,G_t,{[Ne]:ve},[Te],[0]];Se.registerError(Zke,Ok);var eLe=[-3,S,w_t,{[Ne]:ve},[Te],[0]];Se.registerError(eLe,ik);var tLe=[-3,S,S_t,{[Ne]:ve},[q,he,Ny,YOt,Te],[0,0,0,1,0]];Se.registerError(tLe,zk);var rLe=[-3,S,N_t,{[Ne]:ve},[Te],[0]];Se.registerError(rLe,ZD);var nLe=[-3,S,z_t,{[Ne]:ve},[Te],[0]];Se.registerError(nLe,hk);var sLe=[-3,S,W_t,{[Ne]:ve},[Te,OOt],[0,0]];Se.registerError(sLe,ak);var oLe=[-3,S,J_t,{[Ne]:ve},[Te],[0]];Se.registerError(oLe,ck);var iLe=[-3,S,eDt,{[Ne]:ve},[Te],[0]];Se.registerError(iLe,vk);var aLe=[-3,S,yDt,{[Ne]:ve},[Te],[0]];Se.registerError(aLe,lk);var cLe=[-3,S,lDt,{[Ne]:ve},[Te],[0]];Se.registerError(cLe,Pk);var lLe=[-3,S,uDt,{[Ne]:ve},[Te],[0]];Se.registerError(lLe,Ck);var uLe=[-3,S,pDt,{[Ne]:ve},[Te],[0]];Se.registerError(uLe,Hk);var dLe=[-3,S,mDt,{[Ne]:ve},[Te],[0]];Se.registerError(dLe,_k);var pLe=[-3,S,j_t,{[Ne]:ve},[Te],[0]];Se.registerError(pLe,rk);var mLe=[-3,S,ZDt,{[Ne]:ve},[Te],[0]];Se.registerError(mLe,dk);var fLe=[-3,S,tkt,{[Ne]:ve},[Te],[0]];Se.registerError(fLe,Ik);var ALe=[-3,S,mkt,{[Ne]:ve},[Te],[0]];Se.registerError(ALe,Mk);var hLe=[-3,S,ykt,{[Ne]:ve},[Te],[0]];Se.registerError(hLe,wk);var gLe=[-3,S,skt,{[Ne]:ve},[Te],[0]];Se.registerError(gLe,gk);var yLe=[-3,S,hkt,{[Ne]:ve},[Te],[0]];Se.registerError(yLe,Sk);var ELe=[-3,S,gkt,{[Ne]:ve},[Te],[0]];Se.registerError(ELe,ek);var CLe=[-3,S,Ekt,{[Ne]:ve},[Te],[0]];Se.registerError(CLe,bk);var ILe=[-3,S,Vkt,{[Ne]:ve},[Te],[0]];Se.registerError(ILe,Tk);var wLe=[-3,S,Wkt,{[Ne]:ve},[Te],[0]];Se.registerError(wLe,pk);var SLe=[-3,S,Mkt,{[Ne]:_Mt},[Te],[0]];Se.registerError(SLe,tk);var xLe=[-3,S,Lkt,{[Ne]:ve},[Te],[0]];Se.registerError(xLe,Bk);var bLe=[-3,S,sLt,{[Ne]:ve},[Te],[0]];Se.registerError(bLe,Ek);var BLe=[-3,S,lLt,{[Ne]:ve},[Te],[0]];Se.registerError(BLe,xk);var RLe=[-3,S,cLt,{[Ne]:ve},[Te],[0]];Se.registerError(RLe,yk);var NLe=[-3,S,vLt,{[Ne]:ve},[Te],[0]];Se.registerError(NLe,mk);var TLe=[-3,S,PLt,{[Ne]:ve},[Te],[0]];Se.registerError(TLe,fk);var vLe=[-3,S,QLt,{[Ne]:ve},[Te],[0]];Se.registerError(vLe,nk);var PLe=[-3,S,_Lt,{[Ne]:ve},[Te],[0]];Se.registerError(PLe,Qk);var QLe=[-3,S,DLt,{[Ne]:ve},[Te],[0]];Se.registerError(QLe,Dk);var _Le=[-3,S,hLt,{[Ne]:ve},[Te],[0]];Se.registerError(_Le,Gk);var DLe=[-3,S,kLt,{[Ne]:ve},[Te],[0]];Se.registerError(DLe,Ak);var kLe=[-3,S,CLt,{[Ne]:ve},[Te],[0]];Se.registerError(kLe,uk);var LLe=[-3,S,OLt,{[Ne]:ve,[xOt]:400},[Te],[0]];Se.registerError(LLe,sk);var OLe=[Gke,Se],MLe=[3,S,tPt,0,[LOt,rO],[0,0],1],FLe=[3,S,rPt,0,[KLt,dOt,XOt],[0,4,0]],ULe=[3,S,sPt,0,[HLt,oOt,ROt,A9,jOt,KOt,HOt,QOt,cMt,he],[0,0,0,64,0,4,4,1,0,0]],qLe=[3,S,cPt,0,[he,bke,q],[0,64,0],2],GLe=[3,S,lPt,0,[MOt,zL],[()=>oFt,()=>sFt]],HLe=[3,S,dPt,0,[he,by,q],[0,()=>vy,0],2],$Le=[3,S,pPt,0,[by,zL],[()=>vy,()=>OFe]],zLe=[3,S,fPt,0,[he,by,q,WLt],[0,()=>vy,0,64],2],VLe=[3,S,APt,0,[bOt,zL],[()=>ZMt,()=>OFe]],WLe=[3,S,gPt,0,[Tke],[64],1],YLe=[3,S,yPt,0,[SMt,zL],[()=>fFt,()=>mFt]],JLe=[3,S,CPt,0,[he,Ny,bke,q],[0,0,64,0],3],jLe=[3,S,IPt,0,[q,he,Ny,Cx],[0,0,0,0]],KLe=[3,S,SPt,0,[fu,Ix,q,B9,Nf,il,Ty],[0,0,0,0,0,0,0],2],XLe=[3,S,xPt,0,[fu,Ix,Sy,q,B9,Nf,il,Ty],[0,0,4,0,0,0,0,0]],ZLe=[3,S,RPt,0,[KL,p9,xy,gx,w9,Tf,vf,I9,h9,il],[0,64,0,()=>nO,()=>Py,0,()=>Qf,0,0,0],2],eOe=[3,S,NPt,0,[q,E9],[0,()=>Sx]],tOe=[3,S,TPt,0,[he,q,eO,Tf,vf,JL,gx],[0,0,()=>Py,0,()=>Qf,()=>wx,()=>N9],1],rOe=[3,S,vPt,0,[vke],[()=>iO]],nOe=[3,S,PPt,0,[iOt,Oke,Uke,R9],[1,0,0,0]],sOe=[3,S,QPt,0,[JOt,hMt],[0,0]],oOe=[3,S,DPt,0,[tOt,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KOe],h1e=[9,S,o_t,0,()=>XOe,()=>ZOe],g1e=[9,S,s_t,0,()=>eMe,()=>tMe],y1e=[9,S,c_t,0,()=>rMe,()=>nMe],E1e=[9,S,x_t,0,()=>mMe,()=>fMe],C1e=[9,S,aDt,0,()=>wMe,()=>SMe],I1e=[9,S,Z_t,0,()=>bMe,()=>BMe],w1e=[9,S,EDt,0,()=>RMe,()=>NMe],S1e=[9,S,wDt,0,()=>TMe,()=>vMe],x1e=[9,S,bDt,0,()=>_Me,()=>DMe],b1e=[9,S,NDt,0,()=>kMe,()=>LMe],B1e=[9,S,PDt,0,()=>OMe,()=>MMe],R1e=[9,S,DDt,0,()=>FMe,()=>UMe],N1e=[9,S,ODt,0,()=>qMe,()=>GMe],T1e=[9,S,HDt,0,()=>HMe,()=>$Me],v1e=[9,S,VDt,0,()=>zMe,()=>VMe],P1e=[9,S,UDt,0,()=>WMe,()=>YMe],Q1e=[9,S,JDt,0,()=>JMe,()=>jMe],_1e=[9,S,Ckt,0,()=>XMe,()=>ZMe],D1e=[9,S,eLt,0,()=>dFe,()=>pFe],k1e=[9,S,Ukt,0,()=>AFe,()=>hFe],L1e=[9,S,Hkt,0,()=>gFe,()=>yFe],O1e=[9,S,uLt,0,()=>IFe,()=>wFe],M1e=[9,S,xLt,0,()=>xFe,()=>bFe],F1e=[9,S,mLt,0,()=>BFe,()=>RFe],U1e=[9,S,ILt,0,()=>NFe,()=>TFe],q1e=[9,S,bLt,0,()=>vFe,()=>PFe],G1e=[9,S,gLt,0,()=>QFe,()=>_Fe],H1e=[9,S,ULt,0,()=>DFe,()=>kFe],CFt=i(t=>({apiVersion:"2015-09-21",base64Decoder:t?.base64Decoder??Lvt,base64Encoder:t?.base64Encoder??kvt,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??ePt,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??$vt,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(e=>e.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new vvt}],logger:t?.logger??new ZTt,protocol:t?.protocol??Uvt,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.ecr",errorTypeRegistries:OLe,xmlNamespace:"http://ecr.amazonaws.com/doc/2015-09-21/",version:"2015-09-21",serviceTarget:"AmazonEC2ContainerRegistry_V20150921"},serviceId:t?.serviceId??"ECR",sha256:t?.sha256??qvt,urlParser:t?.urlParser??Evt,utf8Decoder:t?.utf8Decoder??Dvt,utf8Encoder:t?.utf8Encoder??_vt}),"getRuntimeConfig$1"),IFt=i(t=>{evt(process.version);let e=avt(t),r=i(()=>e().then(tvt),"defaultConfigProvider"),n=CFt(t);OTt(process.version);let s={profile:t?.profile,logger:n.logger};return{...n,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??xf(Pvt,s),bodyLengthChecker:t?.bodyLengthChecker??Ovt,credentialDefaultProvider:t?.credentialDefaultProvider??Qvt,defaultUserAgentProvider:t?.defaultUserAgentProvider??MTt({serviceId:n.serviceId,clientVersion:Jvt.version}),maxAttempts:t?.maxAttempts??xf(bvt,t),region:t?.region??xf(uvt,{...dvt,...s}),requestHandler:Fvt.create(t?.requestHandler??r),retryMode:t?.retryMode??xf({...xvt,default:i(async()=>(await r()).retryMode||Svt,"default")},t),streamCollector:t?.streamCollector??Mvt,useDualstackEndpoint:t?.useDualstackEndpoint??xf(lvt,s),useFipsEndpoint:t?.useFipsEndpoint??xf(cvt,s),userAgentAppId:t?.userAgentAppId??xf(FTt,s)}},"getRuntimeConfig"),wFt=i(t=>{let e=t.httpAuthSchemes,r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){let o=e.findIndex(a=>a.schemeId===s.schemeId);o===-1?e.push(s):e.splice(o,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),SFt=i(t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),"resolveHttpAuthRuntimeConfig"),xFt=i((t,e)=>{let r=Object.assign(UTt(t),rvt(t),Cvt(t),wFt(t));return e.forEach(n=>n.configure(r)),Object.assign(t,qTt(r),nvt(r),Ivt(r),SFt(r))},"resolveRuntimeExtensions"),Ca=class extends pke{static{i(this,"ECRClient")}config;constructor(...[e]){let r=IFt(e||{});super(r),this.initConfig=r;let n=Vvt(r),s=GTt(n),o=Bvt(s),a=pvt(o),c=HTt(a),l=gvt(c),u=zvt(l),d=xFt(u,e?.extensions||[]);this.config=d,this.middlewareStack.use(Nvt(this.config)),this.middlewareStack.use($Tt(this.config)),this.middlewareStack.use(Rvt(this.config)),this.middlewareStack.use(wvt(this.config)),this.middlewareStack.use(zTt(this.config)),this.middlewareStack.use(VTt(this.config)),this.middlewareStack.use(WTt(this.config)),this.middlewareStack.use(YTt(this.config,{httpAuthSchemeParametersProvider:Gvt,identityProviderConfigProvider:i(async p=>new JTt({"aws.auth#sigv4":p.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(jTt(this.config))}destroy(){super.destroy()}},se=svt(Wvt,"AmazonEC2ContainerRegistry_V20150921","ECRClient",yvt),oe={},ie=i((t,e,r,n)=>[],"_mw0"),Vk=class extends se(oe,ie,"BatchCheckLayerAvailability",UFe){static{i(this,"BatchCheckLayerAvailabilityCommand")}},Wk=class extends se(oe,ie,"BatchDeleteImage",qFe){static{i(this,"BatchDeleteImageCommand")}},Yk=class extends se(oe,ie,"BatchGetImage",GFe){static{i(this,"BatchGetImageCommand")}},Jk=class extends se(oe,ie,"BatchGetRepositoryScanningConfiguration",HFe){static{i(this,"BatchGetRepositoryScanningConfigurationCommand")}},jk=class extends se(oe,ie,"CompleteLayerUpload",$Fe){static{i(this,"CompleteLayerUploadCommand")}},Kk=class extends se(oe,ie,"CreatePullThroughCacheRule",zFe){static{i(this,"CreatePullThroughCacheRuleCommand")}},Xk=class extends se(oe,ie,"CreateRepository",VFe){static{i(this,"CreateRepositoryCommand")}},Zk=class extends se(oe,ie,"CreateRepositoryCreationTemplate",WFe){static{i(this,"CreateRepositoryCreationTemplateCommand")}},eL=class extends se(oe,ie,"DeleteLifecyclePolicy",YFe){static{i(this,"DeleteLifecyclePolicyCommand")}},tL=class extends se(oe,ie,"DeletePullThroughCacheRule",JFe){static{i(this,"DeletePullThroughCacheRuleCommand")}},rL=class extends se(oe,ie,"DeleteRegistryPolicy",jFe){static{i(this,"DeleteRegistryPolicyCommand")}},nL=class extends se(oe,ie,"DeleteRepository",KFe){static{i(this,"DeleteRepositoryCommand")}},sL=class extends se(oe,ie,"DeleteRepositoryCreationTemplate",XFe){static{i(this,"DeleteRepositoryCreationTemplateCommand")}},oL=class extends se(oe,ie,"DeleteRepositoryPolicy",ZFe){static{i(this,"DeleteRepositoryPolicyCommand")}},iL=class extends se(oe,ie,"DeleteSigningConfiguration",e1e){static{i(this,"DeleteSigningConfigurationCommand")}},aL=class extends se(oe,ie,"DeregisterPullTimeUpdateExclusion",t1e){static{i(this,"DeregisterPullTimeUpdateExclusionCommand")}},cL=class extends se(oe,ie,"DescribeImageReplicationStatus",r1e){static{i(this,"DescribeImageReplicationStatusCommand")}},Iy=class extends se(oe,ie,"DescribeImageScanFindings",s1e){static{i(this,"DescribeImageScanFindingsCommand")}},px=class extends se(oe,ie,"DescribeImages",n1e){static{i(this,"DescribeImagesCommand")}},lL=class extends se(oe,ie,"DescribeImageSigningStatus",o1e){static{i(this,"DescribeImageSigningStatusCommand")}},mx=class extends se(oe,ie,"DescribePullThroughCacheRules",i1e){static{i(this,"DescribePullThroughCacheRulesCommand")}},uL=class extends se(oe,ie,"DescribeRegistry",a1e){static{i(this,"DescribeRegistryCommand")}},fx=class extends se(oe,ie,"DescribeRepositories",c1e){static{i(this,"DescribeRepositoriesCommand")}},Ax=class extends se(oe,ie,"DescribeRepositoryCreationTemplates",l1e){static{i(this,"DescribeRepositoryCreationTemplatesCommand")}},dL=class extends se(oe,ie,"GetAccountSetting",u1e){static{i(this,"GetAccountSettingCommand")}},pL=class extends se(oe,ie,"GetAuthorizationToken",d1e){static{i(this,"GetAuthorizationTokenCommand")}},mL=class extends se(oe,ie,"GetDownloadUrlForLayer",p1e){static{i(this,"GetDownloadUrlForLayerCommand")}},fL=class extends se(oe,ie,"GetLifecyclePolicy",m1e){static{i(this,"GetLifecyclePolicyCommand")}},wy=class extends se(oe,ie,"GetLifecyclePolicyPreview",f1e){static{i(this,"GetLifecyclePolicyPreviewCommand")}},AL=class extends se(oe,ie,"GetRegistryPolicy",A1e){static{i(this,"GetRegistryPolicyCommand")}},hL=class extends se(oe,ie,"GetRegistryScanningConfiguration",h1e){static{i(this,"GetRegistryScanningConfigurationCommand")}},gL=class extends se(oe,ie,"GetRepositoryPolicy",g1e){static{i(this,"GetRepositoryPolicyCommand")}},yL=class extends se(oe,ie,"GetSigningConfiguration",y1e){static{i(this,"GetSigningConfigurationCommand")}},EL=class extends se(oe,ie,"InitiateLayerUpload",E1e){static{i(this,"InitiateLayerUploadCommand")}},CL=class extends se(oe,ie,"ListImageReferrers",C1e){static{i(this,"ListImageReferrersCommand")}},hx=class extends se(oe,ie,"ListImages",I1e){static{i(this,"ListImagesCommand")}},IL=class extends se(oe,ie,"ListPullTimeUpdateExclusions",w1e){static{i(this,"ListPullTimeUpdateExclusionsCommand")}},wL=class extends se(oe,ie,"ListTagsForResource",S1e){static{i(this,"ListTagsForResourceCommand")}},SL=class extends se(oe,ie,"PutAccountSetting",x1e){static{i(this,"PutAccountSettingCommand")}},xL=class extends se(oe,ie,"PutImage",b1e){static{i(this,"PutImageCommand")}},bL=class extends se(oe,ie,"PutImageScanningConfiguration",B1e){static{i(this,"PutImageScanningConfigurationCommand")}},BL=class extends se(oe,ie,"PutImageTagMutability",R1e){static{i(this,"PutImageTagMutabilityCommand")}},RL=class extends se(oe,ie,"PutLifecyclePolicy",N1e){static{i(this,"PutLifecyclePolicyCommand")}},NL=class extends se(oe,ie,"PutRegistryPolicy",T1e){static{i(this,"PutRegistryPolicyCommand")}},TL=class extends se(oe,ie,"PutRegistryScanningConfiguration",v1e){static{i(this,"PutRegistryScanningConfigurationCommand")}},vL=class extends se(oe,ie,"PutReplicationConfiguration",P1e){static{i(this,"PutReplicationConfigurationCommand")}},PL=class extends se(oe,ie,"PutSigningConfiguration",Q1e){static{i(this,"PutSigningConfigurationCommand")}},QL=class extends se(oe,ie,"RegisterPullTimeUpdateExclusion",_1e){static{i(this,"RegisterPullTimeUpdateExclusionCommand")}},_L=class extends se(oe,ie,"SetRepositoryPolicy",D1e){static{i(this,"SetRepositoryPolicyCommand")}},DL=class extends se(oe,ie,"StartImageScan",k1e){static{i(this,"StartImageScanCommand")}},kL=class extends se(oe,ie,"StartLifecyclePolicyPreview",L1e){static{i(this,"StartLifecyclePolicyPreviewCommand")}},LL=class extends se(oe,ie,"TagResource",O1e){static{i(this,"TagResourceCommand")}},OL=class extends se(oe,ie,"UntagResource",M1e){static{i(this,"UntagResourceCommand")}},ML=class extends se(oe,ie,"UpdateImageStorageClass",F1e){static{i(this,"UpdateImageStorageClassCommand")}},FL=class extends se(oe,ie,"UpdatePullThroughCacheRule",U1e){static{i(this,"UpdatePullThroughCacheRuleCommand")}},UL=class extends se(oe,ie,"UpdateRepositoryCreationTemplate",q1e){static{i(this,"UpdateRepositoryCreationTemplateCommand")}},qL=class extends se(oe,ie,"UploadLayerPart",G1e){static{i(this,"UploadLayerPartCommand")}},GL=class extends se(oe,ie,"ValidatePullThroughCacheRule",H1e){static{i(this,"ValidatePullThroughCacheRuleCommand")}},$1e=Rf(Ca,Iy,"nextToken","nextToken","maxResults"),z1e=Rf(Ca,px,"nextToken","nextToken","maxResults"),V1e=Rf(Ca,mx,"nextToken","nextToken","maxResults"),W1e=Rf(Ca,fx,"nextToken","nextToken","maxResults"),Y1e=Rf(Ca,Ax,"nextToken","nextToken","maxResults"),J1e=Rf(Ca,wy,"nextToken","nextToken","maxResults"),j1e=Rf(Ca,hx,"nextToken","nextToken","maxResults"),K1e=i(async(t,e)=>{let r;try{let n=await t.send(new Iy(e));r=n;try{if(i(()=>n.imageScanStatus.status,"returnComparator")()==="COMPLETE")return{state:Ey.SUCCESS,reason:r}}catch{}try{if(i(()=>n.imageScanStatus.status,"returnComparator")()==="FAILED")return{state:Ey.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Ey.RETRY,reason:r}},"checkState$1"),bFt=i(async(t,e)=>$L({...{minDelay:5,maxDelay:120},...t},e,K1e),"waitForImageScanComplete"),X1e=i(async(t,e)=>{let n=await $L({...{minDelay:5,maxDelay:120},...t},e,K1e);return mke(n)},"waitUntilImageScanComplete"),Z1e=i(async(t,e)=>{let r;try{let n=await t.send(new wy(e));r=n;try{if(i(()=>n.status,"returnComparator")()==="COMPLETE")return{state:Ey.SUCCESS,reason:r}}catch{}try{if(i(()=>n.status,"returnComparator")()==="FAILED")return{state:Ey.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Ey.RETRY,reason:r}},"checkState"),BFt=i(async(t,e)=>$L({...{minDelay:5,maxDelay:120},...t},e,Z1e),"waitForLifecyclePolicyPreviewComplete"),eUe=i(async(t,e)=>{let n=await $L({...{minDelay:5,maxDelay:120},...t},e,Z1e);return mke(n)},"waitUntilLifecyclePolicyPreviewComplete"),RFt={BatchCheckLayerAvailabilityCommand:Vk,BatchDeleteImageCommand:Wk,BatchGetImageCommand:Yk,BatchGetRepositoryScanningConfigurationCommand:Jk,CompleteLayerUploadCommand:jk,CreatePullThroughCacheRuleCommand:Kk,CreateRepositoryCommand:Xk,CreateRepositoryCreationTemplateCommand:Zk,DeleteLifecyclePolicyCommand:eL,DeletePullThroughCacheRuleCommand:tL,DeleteRegistryPolicyCommand:rL,DeleteRepositoryCommand:nL,DeleteRepositoryCreationTemplateCommand:sL,DeleteRepositoryPolicyCommand:oL,DeleteSigningConfigurationCommand:iL,DeregisterPullTimeUpdateExclusionCommand:aL,DescribeImageReplicationStatusCommand:cL,DescribeImagesCommand:px,DescribeImageScanFindingsCommand:Iy,DescribeImageSigningStatusCommand:lL,DescribePullThroughCacheRulesCommand:mx,DescribeRegistryCommand:uL,DescribeRepositoriesCommand:fx,DescribeRepositoryCreationTemplatesCommand:Ax,GetAccountSettingCommand:dL,GetAuthorizationTokenCommand:pL,GetDownloadUrlForLayerCommand:mL,GetLifecyclePolicyCommand:fL,GetLifecyclePolicyPreviewCommand:wy,GetRegistryPolicyCommand:AL,GetRegistryScanningConfigurationCommand:hL,GetRepositoryPolicyCommand:gL,GetSigningConfigurationCommand:yL,InitiateLayerUploadCommand:EL,ListImageReferrersCommand:CL,ListImagesCommand:hx,ListPullTimeUpdateExclusionsCommand:IL,ListTagsForResourceCommand:wL,PutAccountSettingCommand:SL,PutImageCommand:xL,PutImageScanningConfigurationCommand:bL,PutImageTagMutabilityCommand:BL,PutLifecyclePolicyCommand:RL,PutRegistryPolicyCommand:NL,PutRegistryScanningConfigurationCommand:TL,PutReplicationConfigurationCommand:vL,PutSigningConfigurationCommand:PL,RegisterPullTimeUpdateExclusionCommand:QL,SetRepositoryPolicyCommand:_L,StartImageScanCommand:DL,StartLifecyclePolicyPreviewCommand:kL,TagResourceCommand:LL,UntagResourceCommand:OL,UpdateImageStorageClassCommand:ML,UpdatePullThroughCacheRuleCommand:FL,UpdateRepositoryCreationTemplateCommand:UL,UploadLayerPartCommand:qL,ValidatePullThroughCacheRuleCommand:GL},NFt={paginateDescribeImages:z1e,paginateDescribeImageScanFindings:$1e,paginateDescribePullThroughCacheRules:V1e,paginateDescribeRepositories:W1e,paginateDescribeRepositoryCreationTemplates:Y1e,paginateGetLifecyclePolicyPreview:J1e,paginateListImages:j1e},TFt={waitUntilImageScanComplete:X1e,waitUntilLifecyclePolicyPreviewComplete:eUe},HL=class extends Ca{static{i(this,"ECR")}};ovt(RFt,HL,{paginators:NFt,waiters:TFt});var vFt={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"},PFt={ARCHIVED:"ARCHIVED",AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"},QFt={ImageInaccessible:"ImageInaccessible",ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag",UpstreamAccessDenied:"UpstreamAccessDenied",UpstreamTooManyRequests:"UpstreamTooManyRequests",UpstreamUnavailable:"UpstreamUnavailable"},_Ft={REPOSITORY_NOT_FOUND:"REPOSITORY_NOT_FOUND"},DFt={WILDCARD:"WILDCARD"},kFt={CONTINUOUS_SCAN:"CONTINUOUS_SCAN",MANUAL:"MANUAL",SCAN_ON_PUSH:"SCAN_ON_PUSH"},LFt={AzureContainerRegistry:"azure-container-registry",Chainguard:"chainguard",DockerHub:"docker-hub",Ecr:"ecr",EcrPublic:"ecr-public",GitHubContainerRegistry:"github-container-registry",GitLabContainerRegistry:"gitlab-container-registry",K8s:"k8s",Quay:"quay"},OFt={AES256:"AES256",KMS:"KMS",KMS_DSSE:"KMS_DSSE"},MFt={IMMUTABLE:"IMMUTABLE",IMMUTABLE_WITH_EXCLUSION:"IMMUTABLE_WITH_EXCLUSION",MUTABLE:"MUTABLE",MUTABLE_WITH_EXCLUSION:"MUTABLE_WITH_EXCLUSION"},FFt={WILDCARD:"WILDCARD"},UFt={CREATE_ON_PUSH:"CREATE_ON_PUSH",PULL_THROUGH_CACHE:"PULL_THROUGH_CACHE",REPLICATION:"REPLICATION"},qFt={WILDCARD_MATCH:"WILDCARD_MATCH"},GFt={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},HFt={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"},$Ft={ANY:"ANY",TAGGED:"TAGGED",UNTAGGED:"UNTAGGED"},zFt={CRITICAL:"CRITICAL",HIGH:"HIGH",INFORMATIONAL:"INFORMATIONAL",LOW:"LOW",MEDIUM:"MEDIUM",UNDEFINED:"UNDEFINED"},VFt={ACTIVE:"ACTIVE",COMPLETE:"COMPLETE",FAILED:"FAILED",FINDINGS_UNAVAILABLE:"FINDINGS_UNAVAILABLE",IMAGE_ARCHIVED:"IMAGE_ARCHIVED",IN_PROGRESS:"IN_PROGRESS",LIMIT_EXCEEDED:"LIMIT_EXCEEDED",PENDING:"PENDING",SCAN_ELIGIBILITY_EXPIRED:"SCAN_ELIGIBILITY_EXPIRED",UNSUPPORTED_IMAGE:"UNSUPPORTED_IMAGE"},WFt={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"},YFt={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},JFt={PREFIX_MATCH:"PREFIX_MATCH"},jFt={ARCHIVE:"ARCHIVE"},KFt={EXPIRE:"EXPIRE",TRANSITION:"TRANSITION"},XFt={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"},ZFt={COMPLETE:"COMPLETE",EXPIRED:"EXPIRED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},e1t={BASIC:"BASIC",ENHANCED:"ENHANCED"},t1t={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"},r1t={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"},n1t={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"};y.ArtifactStatus=r1t;y.ArtifactStatusFilter=t1t;y.Attribute$=MLe;y.AuthorizationData$=FLe;y.AwsEcrContainerImageDetails$=ULe;y.BatchCheckLayerAvailability$=UFe;y.BatchCheckLayerAvailabilityCommand=Vk;y.BatchCheckLayerAvailabilityRequest$=qLe;y.BatchCheckLayerAvailabilityResponse$=GLe;y.BatchDeleteImage$=qFe;y.BatchDeleteImageCommand=Wk;y.BatchDeleteImageRequest$=HLe;y.BatchDeleteImageResponse$=$Le;y.BatchGetImage$=GFe;y.BatchGetImageCommand=Yk;y.BatchGetImageRequest$=zLe;y.BatchGetImageResponse$=VLe;y.BatchGetRepositoryScanningConfiguration$=HFe;y.BatchGetRepositoryScanningConfigurationCommand=Jk;y.BatchGetRepositoryScanningConfigurationRequest$=WLe;y.BatchGetRepositoryScanningConfigurationResponse$=YLe;y.BlockedByOrganizationPolicyException=Fk;y.BlockedByOrganizationPolicyException$=$ke;y.CompleteLayerUpload$=$Fe;y.CompleteLayerUploadCommand=jk;y.CompleteLayerUploadRequest$=JLe;y.CompleteLayerUploadResponse$=jLe;y.CreatePullThroughCacheRule$=zFe;y.CreatePullThroughCacheRuleCommand=Kk;y.CreatePullThroughCacheRuleRequest$=KLe;y.CreatePullThroughCacheRuleResponse$=XLe;y.CreateRepository$=VFe;y.CreateRepositoryCommand=Xk;y.CreateRepositoryCreationTemplate$=WFe;y.CreateRepositoryCreationTemplateCommand=Zk;y.CreateRepositoryCreationTemplateRequest$=ZLe;y.CreateRepositoryCreationTemplateResponse$=eOe;y.CreateRepositoryRequest$=tOe;y.CreateRepositoryResponse$=rOe;y.CvssScore$=nOe;y.CvssScoreAdjustment$=sOe;y.CvssScoreDetails$=oOe;y.DeleteLifecyclePolicy$=YFe;y.DeleteLifecyclePolicyCommand=eL;y.DeleteLifecyclePolicyRequest$=iOe;y.DeleteLifecyclePolicyResponse$=aOe;y.DeletePullThroughCacheRule$=JFe;y.DeletePullThroughCacheRuleCommand=tL;y.DeletePullThroughCacheRuleRequest$=cOe;y.DeletePullThroughCacheRuleResponse$=lOe;y.DeleteRegistryPolicy$=jFe;y.DeleteRegistryPolicyCommand=rL;y.DeleteRegistryPolicyRequest$=uOe;y.DeleteRegistryPolicyResponse$=dOe;y.DeleteRepository$=KFe;y.DeleteRepositoryCommand=nL;y.DeleteRepositoryCreationTemplate$=XFe;y.DeleteRepositoryCreationTemplateCommand=sL;y.DeleteRepositoryCreationTemplateRequest$=pOe;y.DeleteRepositoryCreationTemplateResponse$=mOe;y.DeleteRepositoryPolicy$=ZFe;y.DeleteRepositoryPolicyCommand=oL;y.DeleteRepositoryPolicyRequest$=fOe;y.DeleteRepositoryPolicyResponse$=AOe;y.DeleteRepositoryRequest$=hOe;y.DeleteRepositoryResponse$=gOe;y.DeleteSigningConfiguration$=e1e;y.DeleteSigningConfigurationCommand=iL;y.DeleteSigningConfigurationRequest$=yOe;y.DeleteSigningConfigurationResponse$=EOe;y.DeregisterPullTimeUpdateExclusion$=t1e;y.DeregisterPullTimeUpdateExclusionCommand=aL;y.DeregisterPullTimeUpdateExclusionRequest$=COe;y.DeregisterPullTimeUpdateExclusionResponse$=IOe;y.DescribeImageReplicationStatus$=r1e;y.DescribeImageReplicationStatusCommand=cL;y.DescribeImageReplicationStatusRequest$=wOe;y.DescribeImageReplicationStatusResponse$=SOe;y.DescribeImageScanFindings$=s1e;y.DescribeImageScanFindingsCommand=Iy;y.DescribeImageScanFindingsRequest$=xOe;y.DescribeImageScanFindingsResponse$=bOe;y.DescribeImageSigningStatus$=o1e;y.DescribeImageSigningStatusCommand=lL;y.DescribeImageSigningStatusRequest$=ROe;y.DescribeImageSigningStatusResponse$=NOe;y.DescribeImages$=n1e;y.DescribeImagesCommand=px;y.DescribeImagesFilter$=BOe;y.DescribeImagesRequest$=TOe;y.DescribeImagesResponse$=vOe;y.DescribePullThroughCacheRules$=i1e;y.DescribePullThroughCacheRulesCommand=mx;y.DescribePullThroughCacheRulesRequest$=POe;y.DescribePullThroughCacheRulesResponse$=QOe;y.DescribeRegistry$=a1e;y.DescribeRegistryCommand=uL;y.DescribeRegistryRequest$=_Oe;y.DescribeRegistryResponse$=DOe;y.DescribeRepositories$=c1e;y.DescribeRepositoriesCommand=fx;y.DescribeRepositoriesRequest$=kOe;y.DescribeRepositoriesResponse$=LOe;y.DescribeRepositoryCreationTemplates$=l1e;y.DescribeRepositoryCreationTemplatesCommand=Ax;y.DescribeRepositoryCreationTemplatesRequest$=OOe;y.DescribeRepositoryCreationTemplatesResponse$=MOe;y.ECR=HL;y.ECRClient=Ca;y.ECRServiceException=ge;y.ECRServiceException$=Hke;y.EmptyUploadException=ok;y.EmptyUploadException$=zke;y.EncryptionConfiguration$=N9;y.EncryptionConfigurationForRepositoryCreationTemplate$=nO;y.EncryptionType=OFt;y.EnhancedImageScanFinding$=FOe;y.ExclusionAlreadyExistsException=Uk;y.ExclusionAlreadyExistsException$=Vke;y.ExclusionNotFoundException=Rk;y.ExclusionNotFoundException$=Wke;y.FindingSeverity=zFt;y.GetAccountSetting$=u1e;y.GetAccountSettingCommand=dL;y.GetAccountSettingRequest$=UOe;y.GetAccountSettingResponse$=qOe;y.GetAuthorizationToken$=d1e;y.GetAuthorizationTokenCommand=pL;y.GetAuthorizationTokenRequest$=GOe;y.GetAuthorizationTokenResponse$=HOe;y.GetDownloadUrlForLayer$=p1e;y.GetDownloadUrlForLayerCommand=mL;y.GetDownloadUrlForLayerRequest$=$Oe;y.GetDownloadUrlForLayerResponse$=zOe;y.GetLifecyclePolicy$=m1e;y.GetLifecyclePolicyCommand=fL;y.GetLifecyclePolicyPreview$=f1e;y.GetLifecyclePolicyPreviewCommand=wy;y.GetLifecyclePolicyPreviewRequest$=VOe;y.GetLifecyclePolicyPreviewResponse$=WOe;y.GetLifecyclePolicyRequest$=YOe;y.GetLifecyclePolicyResponse$=JOe;y.GetRegistryPolicy$=A1e;y.GetRegistryPolicyCommand=AL;y.GetRegistryPolicyRequest$=jOe;y.GetRegistryPolicyResponse$=KOe;y.GetRegistryScanningConfiguration$=h1e;y.GetRegistryScanningConfigurationCommand=hL;y.GetRegistryScanningConfigurationRequest$=XOe;y.GetRegistryScanningConfigurationResponse$=ZOe;y.GetRepositoryPolicy$=g1e;y.GetRepositoryPolicyCommand=gL;y.GetRepositoryPolicyRequest$=eMe;y.GetRepositoryPolicyResponse$=tMe;y.GetSigningConfiguration$=y1e;y.GetSigningConfigurationCommand=yL;y.GetSigningConfigurationRequest$=rMe;y.GetSigningConfigurationResponse$=nMe;y.Image$=T9;y.ImageActionType=KFt;y.ImageAlreadyExistsException=kk;y.ImageAlreadyExistsException$=Yke;y.ImageArchivedException=qk;y.ImageArchivedException$=Jke;y.ImageDetail$=sMe;y.ImageDigestDoesNotMatchException=Lk;y.ImageDigestDoesNotMatchException$=jke;y.ImageFailure$=oMe;y.ImageFailureCode=QFt;y.ImageIdentifier$=Gs;y.ImageNotFoundException=Nk;y.ImageNotFoundException$=Kke;y.ImageReferrer$=iMe;y.ImageReplicationStatus$=aMe;y.ImageScanFinding$=cMe;y.ImageScanFindings$=lMe;y.ImageScanFindingsSummary$=uMe;y.ImageScanStatus$=sO;y.ImageScanningConfiguration$=wx;y.ImageSigningStatus$=dMe;y.ImageStatus=WFt;y.ImageStatusFilter=HFt;y.ImageStorageClassUpdateNotSupportedException=$k;y.ImageStorageClassUpdateNotSupportedException$=Xke;y.ImageTagAlreadyExistsException=Ok;y.ImageTagAlreadyExistsException$=Zke;y.ImageTagMutability=MFt;y.ImageTagMutabilityExclusionFilter$=pMe;y.ImageTagMutabilityExclusionFilterType=FFt;y.InitiateLayerUpload$=E1e;y.InitiateLayerUploadCommand=EL;y.InitiateLayerUploadRequest$=mMe;y.InitiateLayerUploadResponse$=fMe;y.InvalidLayerException=ik;y.InvalidLayerException$=eLe;y.InvalidLayerPartException=zk;y.InvalidLayerPartException$=tLe;y.InvalidParameterException=ZD;y.InvalidParameterException$=rLe;y.InvalidTagParameterException=hk;y.InvalidTagParameterException$=nLe;y.KmsException=ak;y.KmsException$=sLe;y.Layer$=AMe;y.LayerAlreadyExistsException=ck;y.LayerAlreadyExistsException$=oLe;y.LayerAvailability=PFt;y.LayerFailure$=hMe;y.LayerFailureCode=vFt;y.LayerInaccessibleException=vk;y.LayerInaccessibleException$=iLe;y.LayerPartTooSmallException=lk;y.LayerPartTooSmallException$=aLe;y.LayersNotFoundException=Pk;y.LayersNotFoundException$=cLe;y.LifecyclePolicyNotFoundException=Ck;y.LifecyclePolicyNotFoundException$=lLe;y.LifecyclePolicyPreviewFilter$=gMe;y.LifecyclePolicyPreviewInProgressException=Hk;y.LifecyclePolicyPreviewInProgressException$=uLe;y.LifecyclePolicyPreviewNotFoundException=_k;y.LifecyclePolicyPreviewNotFoundException$=dLe;y.LifecyclePolicyPreviewResult$=yMe;y.LifecyclePolicyPreviewStatus=ZFt;y.LifecyclePolicyPreviewSummary$=EMe;y.LifecyclePolicyRuleAction$=CMe;y.LifecyclePolicyStorageClass=XFt;y.LifecyclePolicyTargetStorageClass=jFt;y.LimitExceededException=rk;y.LimitExceededException$=pLe;y.ListImageReferrers$=C1e;y.ListImageReferrersCommand=CL;y.ListImageReferrersFilter$=IMe;y.ListImageReferrersRequest$=wMe;y.ListImageReferrersResponse$=SMe;y.ListImages$=I1e;y.ListImagesCommand=hx;y.ListImagesFilter$=xMe;y.ListImagesRequest$=bMe;y.ListImagesResponse$=BMe;y.ListPullTimeUpdateExclusions$=w1e;y.ListPullTimeUpdateExclusionsCommand=IL;y.ListPullTimeUpdateExclusionsRequest$=RMe;y.ListPullTimeUpdateExclusionsResponse$=NMe;y.ListTagsForResource$=S1e;y.ListTagsForResourceCommand=wL;y.ListTagsForResourceRequest$=TMe;y.ListTagsForResourceResponse$=vMe;y.PackageVulnerabilityDetails$=PMe;y.PullThroughCacheRule$=QMe;y.PullThroughCacheRuleAlreadyExistsException=dk;y.PullThroughCacheRuleAlreadyExistsException$=mLe;y.PullThroughCacheRuleNotFoundException=Ik;y.PullThroughCacheRuleNotFoundException$=fLe;y.PutAccountSetting$=x1e;y.PutAccountSettingCommand=SL;y.PutAccountSettingRequest$=_Me;y.PutAccountSettingResponse$=DMe;y.PutImage$=b1e;y.PutImageCommand=xL;y.PutImageRequest$=kMe;y.PutImageResponse$=LMe;y.PutImageScanningConfiguration$=B1e;y.PutImageScanningConfigurationCommand=bL;y.PutImageScanningConfigurationRequest$=OMe;y.PutImageScanningConfigurationResponse$=MMe;y.PutImageTagMutability$=R1e;y.PutImageTagMutabilityCommand=BL;y.PutImageTagMutabilityRequest$=FMe;y.PutImageTagMutabilityResponse$=UMe;y.PutLifecyclePolicy$=N1e;y.PutLifecyclePolicyCommand=RL;y.PutLifecyclePolicyRequest$=qMe;y.PutLifecyclePolicyResponse$=GMe;y.PutRegistryPolicy$=T1e;y.PutRegistryPolicyCommand=NL;y.PutRegistryPolicyRequest$=HMe;y.PutRegistryPolicyResponse$=$Me;y.PutRegistryScanningConfiguration$=v1e;y.PutRegistryScanningConfigurationCommand=TL;y.PutRegistryScanningConfigurationRequest$=zMe;y.PutRegistryScanningConfigurationResponse$=VMe;y.PutReplicationConfiguration$=P1e;y.PutReplicationConfigurationCommand=vL;y.PutReplicationConfigurationRequest$=WMe;y.PutReplicationConfigurationResponse$=YMe;y.PutSigningConfiguration$=Q1e;y.PutSigningConfigurationCommand=PL;y.PutSigningConfigurationRequest$=JMe;y.PutSigningConfigurationResponse$=jMe;y.RCTAppliedFor=UFt;y.Recommendation$=KMe;y.ReferencedImagesNotFoundException=Mk;y.ReferencedImagesNotFoundException$=ALe;y.RegisterPullTimeUpdateExclusion$=_1e;y.RegisterPullTimeUpdateExclusionCommand=QL;y.RegisterPullTimeUpdateExclusionRequest$=XMe;y.RegisterPullTimeUpdateExclusionResponse$=ZMe;y.RegistryPolicyNotFoundException=wk;y.RegistryPolicyNotFoundException$=hLe;y.RegistryScanningConfiguration$=v9;y.RegistryScanningRule$=eFe;y.Remediation$=tFe;y.ReplicationConfiguration$=oO;y.ReplicationDestination$=rFe;y.ReplicationRule$=nFe;y.ReplicationStatus=GFt;y.Repository$=iO;y.RepositoryAlreadyExistsException=gk;y.RepositoryAlreadyExistsException$=gLe;y.RepositoryCreationTemplate$=Sx;y.RepositoryFilter$=sFe;y.RepositoryFilterType=JFt;y.RepositoryNotEmptyException=Sk;y.RepositoryNotEmptyException$=yLe;y.RepositoryNotFoundException=ek;y.RepositoryNotFoundException$=ELe;y.RepositoryPolicyNotFoundException=bk;y.RepositoryPolicyNotFoundException$=CLe;y.RepositoryScanningConfiguration$=oFe;y.RepositoryScanningConfigurationFailure$=iFe;y.Resource$=aFe;y.ResourceDetails$=cFe;y.ScanFrequency=kFt;y.ScanNotFoundException=Tk;y.ScanNotFoundException$=ILe;y.ScanStatus=VFt;y.ScanType=e1t;y.ScanningConfigurationFailureCode=_Ft;y.ScanningRepositoryFilter$=lFe;y.ScanningRepositoryFilterType=DFt;y.ScoreDetails$=uFe;y.SecretNotFoundException=pk;y.SecretNotFoundException$=wLe;y.ServerException=tk;y.ServerException$=SLe;y.SetRepositoryPolicy$=D1e;y.SetRepositoryPolicyCommand=_L;y.SetRepositoryPolicyRequest$=dFe;y.SetRepositoryPolicyResponse$=pFe;y.SigningConfiguration$=xx;y.SigningConfigurationNotFoundException=Bk;y.SigningConfigurationNotFoundException$=xLe;y.SigningRepositoryFilter$=mFe;y.SigningRepositoryFilterType=qFt;y.SigningRule$=fFe;y.SigningStatus=YFt;y.StartImageScan$=k1e;y.StartImageScanCommand=DL;y.StartImageScanRequest$=AFe;y.StartImageScanResponse$=hFe;y.StartLifecyclePolicyPreview$=L1e;y.StartLifecyclePolicyPreviewCommand=kL;y.StartLifecyclePolicyPreviewRequest$=gFe;y.StartLifecyclePolicyPreviewResponse$=yFe;y.SubjectIdentifier$=EFe;y.Tag$=CFe;y.TagResource$=O1e;y.TagResourceCommand=LL;y.TagResourceRequest$=IFe;y.TagResourceResponse$=wFe;y.TagStatus=$Ft;y.TargetStorageClass=n1t;y.TemplateAlreadyExistsException=Ek;y.TemplateAlreadyExistsException$=bLe;y.TemplateNotFoundException=xk;y.TemplateNotFoundException$=BLe;y.TooManyTagsException=yk;y.TooManyTagsException$=RLe;y.TransitioningImageTotalCount$=SFe;y.UnableToAccessSecretException=mk;y.UnableToAccessSecretException$=NLe;y.UnableToDecryptSecretValueException=fk;y.UnableToDecryptSecretValueException$=TLe;y.UnableToGetUpstreamImageException=nk;y.UnableToGetUpstreamImageException$=vLe;y.UnableToGetUpstreamLayerException=Qk;y.UnableToGetUpstreamLayerException$=PLe;y.UnableToListUpstreamImageReferrersException=Dk;y.UnableToListUpstreamImageReferrersException$=QLe;y.UnsupportedImageTypeException=Gk;y.UnsupportedImageTypeException$=_Le;y.UnsupportedUpstreamRegistryException=Ak;y.UnsupportedUpstreamRegistryException$=DLe;y.UntagResource$=M1e;y.UntagResourceCommand=OL;y.UntagResourceRequest$=xFe;y.UntagResourceResponse$=bFe;y.UpdateImageStorageClass$=F1e;y.UpdateImageStorageClassCommand=ML;y.UpdateImageStorageClassRequest$=BFe;y.UpdateImageStorageClassResponse$=RFe;y.UpdatePullThroughCacheRule$=U1e;y.UpdatePullThroughCacheRuleCommand=FL;y.UpdatePullThroughCacheRuleRequest$=NFe;y.UpdatePullThroughCacheRuleResponse$=TFe;y.UpdateRepositoryCreationTemplate$=q1e;y.UpdateRepositoryCreationTemplateCommand=UL;y.UpdateRepositoryCreationTemplateRequest$=vFe;y.UpdateRepositoryCreationTemplateResponse$=PFe;y.UploadLayerPart$=G1e;y.UploadLayerPartCommand=qL;y.UploadLayerPartRequest$=QFe;y.UploadLayerPartResponse$=_Fe;y.UploadNotFoundException=uk;y.UploadNotFoundException$=kLe;y.UpstreamRegistry=LFt;y.ValidatePullThroughCacheRule$=H1e;y.ValidatePullThroughCacheRuleCommand=GL;y.ValidatePullThroughCacheRuleRequest$=DFe;y.ValidatePullThroughCacheRuleResponse$=kFe;y.ValidationException=sk;y.ValidationException$=LLe;y.VulnerablePackage$=LFe;y.errorTypeRegistries=OLe;y.paginateDescribeImageScanFindings=$1e;y.paginateDescribeImages=z1e;y.paginateDescribePullThroughCacheRules=V1e;y.paginateDescribeRepositories=W1e;y.paginateDescribeRepositoryCreationTemplates=Y1e;y.paginateGetLifecyclePolicyPreview=J1e;y.paginateListImages=j1e;y.waitForImageScanComplete=bFt;y.waitForLifecyclePolicyPreviewComplete=BFt;y.waitUntilImageScanComplete=X1e;y.waitUntilLifecyclePolicyPreviewComplete=eUe});var _qe=I(B=>{var{awsEndpointFunctions:s1t,emitWarningIfUnsupportedVersion:o1t,createDefaultUserAgentProvider:i1t,NODE_APP_ID_CONFIG_OPTIONS:a1t,getAwsRegionExtensionConfiguration:c1t,resolveAwsRegionExtensionConfiguration:l1t,resolveUserAgentConfig:u1t,resolveHostHeaderConfig:d1t,getUserAgentPlugin:p1t,getHostHeaderPlugin:m1t,getLoggerPlugin:f1t,getRecursionDetectionPlugin:A1t}=(pt(),ee(da)),{getHttpAuthSchemeEndpointRuleSetPlugin:h1t,DefaultIdentityProviderConfig:g1t,getHttpSigningPlugin:y1t,createPaginator:ZO}=(ds(),ee(E5)),{normalizeProvider:iUe,getSmithyContext:E1t,ServiceException:C1t,NoOpLogger:I1t,emitWarningIfUnsupportedVersion:w1t,loadConfigsForDefaultMode:S1t,getDefaultExtensionConfiguration:x1t,resolveDefaultRuntimeConfig:b1t,Client:aUe,makeBuilder:B1t,createAggregatedClient:R1t}=(we(),ee(Ag)),{Command:N1t}=(we(),ee(Ag));B.$Command=N1t;B.__Client=aUe;var{resolveDefaultsModeConfig:T1t,loadConfig:_f,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:v1t,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:P1t,NODE_REGION_CONFIG_OPTIONS:Q1t,NODE_REGION_CONFIG_FILE_OPTIONS:_1t,resolveRegionConfig:D1t}=(It(),ee(bo)),{BinaryDecisionDiagram:k1t,EndpointCache:L1t,decideEndpoint:O1t,customEndpointFunctions:M1t,resolveEndpointConfig:F1t,getEndpointPlugin:U1t}=(Rt(),ee(KJ)),{parseUrl:q1t,getHttpHandlerExtensionConfiguration:G1t,resolveHttpHandlerRuntimeConfig:H1t,getContentLengthPlugin:$1t}=(Re(),ee(Od)),{DEFAULT_RETRY_MODE:z1t,NODE_RETRY_MODE_CONFIG_OPTIONS:V1t,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:W1t,resolveRetryConfig:Y1t,getRetryPlugin:J1t}=(No(),ee(n5)),{TypeRegistry:cUe,getSchemaSerdePlugin:j1t}=(st(),ee(PY)),{resolveAwsSdkSigV4Config:K1t,AwsSdkSigV4Signer:X1t,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:Z1t}=(kn(),ee(k_)),{defaultProvider:eUt}=l9(),{toUtf8:tUt,fromUtf8:rUt,toBase64:nUt,fromBase64:sUt,calculateBodyLength:oUt}=(Pe(),ee(_g)),{streamCollector:iUt,NodeHttpHandler:aUt}=lu(),{AwsJson1_1Protocol:cUt}=(pf(),ee(Jj)),{Sha256:lUt}=(iu(),ee(w8)),uUt=i(async(t,e,r)=>({operation:E1t(e).operation,region:await iUe(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultECRPUBLICHttpAuthSchemeParametersProvider");function dUt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr-public",region:t.region},propertiesExtractor:i((e,r)=>({signingProperties:{config:e,context:r}}),"propertiesExtractor")}}i(dUt,"createAwsAuthSigv4HttpAuthOption");var pUt=i(t=>{let e=[];switch(t.operation){default:e.push(dUt(t))}return e},"defaultECRPUBLICHttpAuthSchemeProvider"),mUt=i(t=>{let e=K1t(t);return Object.assign(e,{authSchemePreference:iUe(t.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig"),fUt=i(t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"ecr-public"}),"resolveClientEndpointParameters"),AUt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},hUt="3.1090.0",gUt={version:hUt},bx="ref",Df=-1,aO=!0,rUe="isSet",lUe="PartitionResult",cO="booleanEquals",P9="getAttr",nUe={[bx]:"Endpoint"},Q9={[bx]:lUe},Qy={},sUe=[{[bx]:"Region"}],oUe={conditions:[[rUe,[nUe]],[rUe,sUe],["aws.partition",sUe,lUe],[cO,[{[bx]:"UseFIPS"},aO]],[cO,[{[bx]:"UseDualStack"},aO]],[cO,[{fn:P9,argv:[Q9,"supportsDualStack"]},aO]],[cO,[{fn:P9,argv:[Q9,"supportsFIPS"]},aO]],["stringEquals",[{fn:P9,argv:[Q9,"name"]},"aws"]]],results:[[Df],[Df,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Df,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[nUe,Qy],["https://api.ecr-public-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Qy],[Df,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://api.ecr-public-fips.{Region}.{PartitionResult#dnsSuffix}",Qy],[Df,"FIPS is enabled but this partition does not support FIPS"],["https://ecr-public.{Region}.api.aws",Qy],["https://api.ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}",Qy],[Df,"DualStack is enabled but this partition does not support DualStack"],["https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}",Qy],[Df,"Invalid Configuration: Missing Region"]]},yUt=2,Hs=1e8,EUt=new Int32Array([-1,1,-1,0,13,3,1,4,Hs+12,2,5,Hs+12,3,9,6,4,7,Hs+11,5,8,Hs+10,7,Hs+8,Hs+9,4,11,10,6,Hs+6,Hs+7,5,12,Hs+5,6,Hs+4,Hs+5,3,Hs+1,14,4,Hs+2,Hs+3]),CUt=k1t.from(EUt,yUt,oUe.conditions,oUe.results),IUt=new L1t({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),wUt=i((t,e={})=>IUt.get(t,()=>O1t(CUt,{endpointParams:t,logger:e.logger})),"defaultEndpointResolver");M1t.aws=s1t;var gt=class t extends C1t{static{i(this,"ECRPUBLICServiceException")}constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}},lO=class t extends gt{static{i(this,"InvalidParameterException")}name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},uO=class t extends gt{static{i(this,"RegistryNotFoundException")}name="RegistryNotFoundException";$fault="client";constructor(e){super({name:"RegistryNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},dO=class t extends gt{static{i(this,"RepositoryNotFoundException")}name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},pO=class t extends gt{static{i(this,"ServerException")}name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e}),Object.setPrototypeOf(this,t.prototype)}},mO=class t extends gt{static{i(this,"UnsupportedCommandException")}name="UnsupportedCommandException";$fault="client";constructor(e){super({name:"UnsupportedCommandException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},fO=class t extends gt{static{i(this,"EmptyUploadException")}name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},AO=class t extends gt{static{i(this,"InvalidLayerException")}name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},hO=class t extends gt{static{i(this,"LayerAlreadyExistsException")}name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},gO=class t extends gt{static{i(this,"LayerPartTooSmallException")}name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},yO=class t extends gt{static{i(this,"UploadNotFoundException")}name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},EO=class t extends gt{static{i(this,"InvalidTagParameterException")}name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},CO=class t extends gt{static{i(this,"LimitExceededException")}name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},IO=class t extends gt{static{i(this,"RepositoryAlreadyExistsException")}name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},wO=class t extends gt{static{i(this,"TooManyTagsException")}name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},SO=class t extends gt{static{i(this,"RepositoryNotEmptyException")}name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},xO=class t extends gt{static{i(this,"RepositoryPolicyNotFoundException")}name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},bO=class t extends gt{static{i(this,"ImageNotFoundException")}name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},BO=class t extends gt{static{i(this,"RepositoryCatalogDataNotFoundException")}name="RepositoryCatalogDataNotFoundException";$fault="client";constructor(e){super({name:"RepositoryCatalogDataNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},RO=class t extends gt{static{i(this,"ImageAlreadyExistsException")}name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},NO=class t extends gt{static{i(this,"ImageDigestDoesNotMatchException")}name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},TO=class t extends gt{static{i(this,"ImageTagAlreadyExistsException")}name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},vO=class t extends gt{static{i(this,"InvalidLayerPartException")}name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype),this.registryId=e.registryId,this.repositoryName=e.repositoryName,this.uploadId=e.uploadId,this.lastValidByteReceived=e.lastValidByteReceived}},PO=class t extends gt{static{i(this,"LayersNotFoundException")}name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},QO=class t extends gt{static{i(this,"ReferencedImagesNotFoundException")}name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},SUt="AuthorizationData",xUt="BatchCheckLayerAvailability",bUt="BatchCheckLayerAvailabilityRequest",BUt="BatchCheckLayerAvailabilityResponse",RUt="BatchDeleteImage",NUt="BatchDeleteImageRequest",TUt="BatchDeleteImageResponse",vUt="CompleteLayerUpload",PUt="CompleteLayerUploadRequest",QUt="CompleteLayerUploadResponse",_Ut="CreateRepository",DUt="CreateRepositoryRequest",kUt="CreateRepositoryResponse",LUt="DescribeImages",OUt="DescribeImagesRequest",MUt="DescribeImagesResponse",FUt="DescribeImageTags",UUt="DescribeImageTagsRequest",qUt="DescribeImageTagsResponse",GUt="DeleteRepository",HUt="DeleteRepositoryPolicy",$Ut="DeleteRepositoryPolicyRequest",zUt="DeleteRepositoryPolicyResponse",VUt="DeleteRepositoryRequest",WUt="DeleteRepositoryResponse",YUt="DescribeRegistriesRequest",JUt="DescribeRegistriesResponse",jUt="DescribeRepositoriesRequest",KUt="DescribeRepositoriesResponse",XUt="DescribeRegistries",ZUt="DescribeRepositories",e2t="EmptyUploadException",t2t="GetAuthorizationToken",r2t="GetAuthorizationTokenRequest",n2t="GetAuthorizationTokenResponse",s2t="GetRegistryCatalogData",o2t="GetRegistryCatalogDataRequest",i2t="GetRegistryCatalogDataResponse",a2t="GetRepositoryCatalogDataRequest",c2t="GetRepositoryCatalogDataResponse",l2t="GetRepositoryCatalogData",u2t="GetRepositoryPolicy",d2t="GetRepositoryPolicyRequest",p2t="GetRepositoryPolicyResponse",m2t="Image",f2t="ImageAlreadyExistsException",A2t="ImageDetail",h2t="ImageDigestDoesNotMatchException",g2t="ImageDetailList",y2t="ImageFailure",E2t="ImageFailureList",C2t="ImageIdentifier",I2t="ImageIdentifierList",w2t="InvalidLayerException",S2t="InvalidLayerPartException",x2t="InitiateLayerUpload",b2t="InitiateLayerUploadRequest",B2t="InitiateLayerUploadResponse",R2t="ImageNotFoundException",N2t="InvalidParameterException",T2t="ImageTagAlreadyExistsException",v2t="ImageTagDetail",P2t="ImageTagDetailList",Q2t="InvalidTagParameterException",_2t="Key",D2t="Layer",k2t="LayerAlreadyExistsException",L2t="LimitExceededException",O2t="LayerFailure",M2t="LayerFailureList",F2t="LayerList",U2t="LayersNotFoundException",q2t="LayerPartTooSmallException",G2t="ListTagsForResource",H2t="ListTagsForResourceRequest",$2t="ListTagsForResourceResponse",z2t="PutImage",V2t="PutImageRequest",W2t="PutImageResponse",Y2t="PutRegistryCatalogData",J2t="PutRegistryCatalogDataRequest",j2t="PutRegistryCatalogDataResponse",K2t="PutRepositoryCatalogDataRequest",X2t="PutRepositoryCatalogDataResponse",Z2t="PutRepositoryCatalogData",eqt="Registry",tqt="RegistryAlias",rqt="RepositoryAlreadyExistsException",nqt="RegistryAliasList",sqt="RegistryCatalogData",oqt="RepositoryCatalogDataInput",iqt="RepositoryCatalogDataNotFoundException",aqt="RepositoryCatalogData",cqt="ReferencedImageDetail",lqt="ReferencedImagesNotFoundException",uqt="RegistryList",dqt="RepositoryList",pqt="RepositoryNotEmptyException",mqt="RegistryNotFoundException",fqt="RepositoryNotFoundException",Aqt="RepositoryPolicyNotFoundException",hqt="Repository",gqt="ServerException",yqt="SetRepositoryPolicy",Eqt="SetRepositoryPolicyRequest",Cqt="SetRepositoryPolicyResponse",Iqt="Tag",wqt="TagList",Sqt="TooManyTagsException",xqt="TagResource",bqt="TagResourceRequest",Bqt="TagResourceResponse",Rqt="UnsupportedCommandException",Nqt="UploadLayerPart",Tqt="UploadLayerPartRequest",vqt="UploadLayerPartResponse",Pqt="UploadNotFoundException",Qqt="UntagResource",_qt="UntagResourceRequest",Dqt="UntagResourceResponse",kqt="Value",Lqt="aliases",Oqt="authorizationData",uUe="artifactMediaType",Mqt="authorizationToken",dUe="aboutText",pUe="architectures",jt="client",mUe="createdAt",vx="catalogData",fUe="description",AUe="displayName",Fqt="defaultRegistryAlias",zt="error",Uqt="expiresAt",hUe="failures",gUe="failureCode",yUe="failureReason",EUe="force",qqt="image",Gqt="imageDetails",eM="imageDigest",Hqt="imageDetail",_9="imageIds",CUe="imageId",IUe="imageManifest",tM="imageManifestMediaType",wUe="imagePushedAt",SUe="imageSizeInBytes",$qt="imageTags",zqt="imageTagDetails",D9="imageTag",Vqt="layers",Wqt="layerAvailability",Yqt="lastByteReceived",xUe="layerDigests",k9="layerDigest",Jqt="logoImageBlob",jqt="layerPartBlob",Kqt="layerSize",Xqt="logoUrl",Zqt="lastValidByteReceived",Vt="message",eGt="marketplaceCertified",rM="maxResults",tGt="mediaType",rGt="name",dp="nextToken",bUe="operatingSystems",nGt="partFirstByte",sGt="partLastByte",oGt="primaryRegistryAlias",iGt="partSize",nM="policyText",BUe="repository",L9="resourceArn",aGt="registryArn",cGt="repositoryArn",RUe="registryCatalogData",Dt="registryId",Wt="repositoryName",lGt="repositoryNames",uGt="registryUri",dGt="repositoryUri",pGt="registries",mGt="repositories",NUe="smithy.ts.sdk.synthetic.com.amazonaws.ecrpublic",fGt="server",AGt="status",O9="tags",hGt="tagKeys",_y="uploadId",TUe="usageText",gGt="verified",T="com.amazonaws.ecrpublic",vUe=cUe.for(NUe),PUe=[-3,NUe,"ECRPUBLICServiceException",0,[],[]];vUe.registerError(PUe,gt);var kt=cUe.for(T),QUe=[-3,T,e2t,{[zt]:jt},[Vt],[0]];kt.registerError(QUe,fO);var _Ue=[-3,T,f2t,{[zt]:jt},[Vt],[0]];kt.registerError(_Ue,RO);var DUe=[-3,T,h2t,{[zt]:jt},[Vt],[0]];kt.registerError(DUe,NO);var kUe=[-3,T,R2t,{[zt]:jt},[Vt],[0]];kt.registerError(kUe,bO);var LUe=[-3,T,T2t,{[zt]:jt},[Vt],[0]];kt.registerError(LUe,TO);var OUe=[-3,T,w2t,{[zt]:jt},[Vt],[0]];kt.registerError(OUe,AO);var MUe=[-3,T,S2t,{[zt]:jt},[Dt,Wt,_y,Zqt,Vt],[0,0,0,1,0]];kt.registerError(MUe,vO);var FUe=[-3,T,N2t,{[zt]:jt},[Vt],[0]];kt.registerError(FUe,lO);var UUe=[-3,T,Q2t,{[zt]:jt},[Vt],[0]];kt.registerError(UUe,EO);var qUe=[-3,T,k2t,{[zt]:jt},[Vt],[0]];kt.registerError(qUe,hO);var GUe=[-3,T,q2t,{[zt]:jt},[Vt],[0]];kt.registerError(GUe,gO);var HUe=[-3,T,U2t,{[zt]:jt},[Vt],[0]];kt.registerError(HUe,PO);var $Ue=[-3,T,L2t,{[zt]:jt},[Vt],[0]];kt.registerError($Ue,CO);var zUe=[-3,T,lqt,{[zt]:jt},[Vt],[0]];kt.registerError(zUe,QO);var VUe=[-3,T,mqt,{[zt]:jt},[Vt],[0]];kt.registerError(VUe,uO);var WUe=[-3,T,rqt,{[zt]:jt},[Vt],[0]];kt.registerError(WUe,IO);var YUe=[-3,T,iqt,{[zt]:jt},[Vt],[0]];kt.registerError(YUe,BO);var JUe=[-3,T,pqt,{[zt]:jt},[Vt],[0]];kt.registerError(JUe,SO);var jUe=[-3,T,fqt,{[zt]:jt},[Vt],[0]];kt.registerError(jUe,dO);var KUe=[-3,T,Aqt,{[zt]:jt},[Vt],[0]];kt.registerError(KUe,xO);var XUe=[-3,T,gqt,{[zt]:fGt},[Vt],[0]];kt.registerError(XUe,pO);var ZUe=[-3,T,Sqt,{[zt]:jt},[Vt],[0]];kt.registerError(ZUe,wO);var e2e=[-3,T,Rqt,{[zt]:jt},[Vt],[0]];kt.registerError(e2e,mO);var t2e=[-3,T,Pqt,{[zt]:jt},[Vt],[0]];kt.registerError(t2e,yO);var r2e=[vUe,kt],n2e=[3,T,SUt,0,[Mqt,Uqt],[0,4]],s2e=[3,T,bUt,0,[Wt,xUe,Dt],[0,64,0],2],o2e=[3,T,BUt,0,[Vqt,hUe],[()=>wGt,()=>IGt]],i2e=[3,T,NUt,0,[Wt,_9,Dt],[0,()=>U9,0],2],a2e=[3,T,TUt,0,[_9,hUe],[()=>U9,()=>EGt]],c2e=[3,T,PUt,0,[Wt,_y,xUe,Dt],[0,0,64,0],3],l2e=[3,T,QUt,0,[Dt,Wt,_y,k9],[0,0,0,0]],u2e=[3,T,DUt,0,[Wt,vx,O9],[0,()=>F9,()=>q9],1],d2e=[3,T,kUt,0,[BUe,vx],[()=>oM,()=>iM]],p2e=[3,T,$Ut,0,[Wt,Dt],[0,0],1],m2e=[3,T,zUt,0,[Dt,Wt,nM],[0,0,0]],f2e=[3,T,VUt,0,[Wt,Dt,EUe],[0,0,2],1],A2e=[3,T,WUt,0,[BUe],[()=>oM]],h2e=[3,T,OUt,0,[Wt,Dt,_9,dp,rM],[0,0,()=>U9,0,1],1],g2e=[3,T,MUt,0,[Gqt,dp],[()=>yGt,0]],y2e=[3,T,UUt,0,[Wt,Dt,dp,rM],[0,0,0,1],1],E2e=[3,T,qUt,0,[zqt,dp],[()=>CGt,0]],C2e=[3,T,YUt,0,[dp,rM],[0,1]],I2e=[3,T,JUt,0,[pGt,dp],[()=>xGt,0],1],w2e=[3,T,jUt,0,[Dt,lGt,dp,rM],[0,64,0,1]],S2e=[3,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gqe=[9,T,s2t,0,()=>B2e,()=>R2e],yqe=[9,T,l2t,0,()=>N2e,()=>T2e],Eqe=[9,T,u2t,0,()=>v2e,()=>P2e],Cqe=[9,T,x2t,0,()=>L2e,()=>O2e],Iqe=[9,T,G2t,0,()=>U2e,()=>q2e],wqe=[9,T,z2t,0,()=>G2e,()=>H2e],Sqe=[9,T,Y2t,0,()=>$2e,()=>z2e],xqe=[9,T,Z2t,0,()=>V2e,()=>W2e],bqe=[9,T,yqt,0,()=>K2e,()=>X2e],Bqe=[9,T,xqt,0,()=>eqe,()=>tqe],Rqe=[9,T,Qqt,0,()=>rqe,()=>nqe],Nqe=[9,T,Nqt,0,()=>sqe,()=>oqe],BGt=i(t=>({apiVersion:"2020-10-30",base64Decoder:t?.base64Decoder??sUt,base64Encoder:t?.base64Encoder??nUt,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??wUt,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??pUt,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(e=>e.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new X1t}],logger:t?.logger??new I1t,protocol:t?.protocol??cUt,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.ecrpublic",errorTypeRegistries:r2e,xmlNamespace:"http://ecr-public.amazonaws.com/doc/2020-12-02/",version:"2020-10-30",serviceTarget:"SpencerFrontendService"},serviceId:t?.serviceId??"ECR PUBLIC",sha256:t?.sha256??lUt,urlParser:t?.urlParser??q1t,utf8Decoder:t?.utf8Decoder??rUt,utf8Encoder:t?.utf8Encoder??tUt}),"getRuntimeConfig$1"),RGt=i(t=>{w1t(process.version);let e=T1t(t),r=i(()=>e().then(S1t),"defaultConfigProvider"),n=BGt(t);o1t(process.version);let s={profile:t?.profile,logger:n.logger};return{...n,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??_f(Z1t,s),bodyLengthChecker:t?.bodyLengthChecker??oUt,credentialDefaultProvider:t?.credentialDefaultProvider??eUt,defaultUserAgentProvider:t?.defaultUserAgentProvider??i1t({serviceId:n.serviceId,clientVersion:gUt.version}),maxAttempts:t?.maxAttempts??_f(W1t,t),region:t?.region??_f(Q1t,{..._1t,...s}),requestHandler:aUt.create(t?.requestHandler??r),retryMode:t?.retryMode??_f({...V1t,default:i(async()=>(await r()).retryMode||z1t,"default")},t),streamCollector:t?.streamCollector??iUt,useDualstackEndpoint:t?.useDualstackEndpoint??_f(P1t,s),useFipsEndpoint:t?.useFipsEndpoint??_f(v1t,s),userAgentAppId:t?.userAgentAppId??_f(a1t,s)}},"getRuntimeConfig"),NGt=i(t=>{let e=t.httpAuthSchemes,r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){let o=e.findIndex(a=>a.schemeId===s.schemeId);o===-1?e.push(s):e.splice(o,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),TGt=i(t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),"resolveHttpAuthRuntimeConfig"),vGt=i((t,e)=>{let r=Object.assign(c1t(t),x1t(t),G1t(t),NGt(t));return e.forEach(n=>n.configure(r)),Object.assign(t,l1t(r),b1t(r),H1t(r),TGt(r))},"resolveRuntimeExtensions"),up=class extends aUe{static{i(this,"ECRPUBLICClient")}config;constructor(...[e]){let r=RGt(e||{});super(r),this.initConfig=r;let n=fUt(r),s=u1t(n),o=Y1t(s),a=D1t(o),c=d1t(a),l=F1t(c),u=mUt(l),d=vGt(u,e?.extensions||[]);this.config=d,this.middlewareStack.use(j1t(this.config)),this.middlewareStack.use(p1t(this.config)),this.middlewareStack.use(J1t(this.config)),this.middlewareStack.use($1t(this.config)),this.middlewareStack.use(m1t(this.config)),this.middlewareStack.use(f1t(this.config)),this.middlewareStack.use(A1t(this.config)),this.middlewareStack.use(h1t(this.config,{httpAuthSchemeParametersProvider:uUt,identityProviderConfigProvider:i(async p=>new g1t({"aws.auth#sigv4":p.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(y1t(this.config))}destroy(){super.destroy()}},Kt=B1t(AUt,"SpencerFrontendService","ECRPUBLICClient",U1t),Xt={},Zt=i((t,e,r,n)=>[],"_mw0"),_O=class extends Kt(Xt,Zt,"BatchCheckLayerAvailability",iqe){static{i(this,"BatchCheckLayerAvailabilityCommand")}},DO=class extends Kt(Xt,Zt,"BatchDeleteImage",aqe){static{i(this,"BatchDeleteImageCommand")}},kO=class extends Kt(Xt,Zt,"CompleteLayerUpload",cqe){static{i(this,"CompleteLayerUploadCommand")}},LO=class extends Kt(Xt,Zt,"CreateRepository",lqe){static{i(this,"CreateRepositoryCommand")}},OO=class extends Kt(Xt,Zt,"DeleteRepository",uqe){static{i(this,"DeleteRepositoryCommand")}},MO=class extends Kt(Xt,Zt,"DeleteRepositoryPolicy",dqe){static{i(this,"DeleteRepositoryPolicyCommand")}},Bx=class extends Kt(Xt,Zt,"DescribeImages",pqe){static{i(this,"DescribeImagesCommand")}},Rx=class extends Kt(Xt,Zt,"DescribeImageTags",mqe){static{i(this,"DescribeImageTagsCommand")}},Nx=class extends Kt(Xt,Zt,"DescribeRegistries",fqe){static{i(this,"DescribeRegistriesCommand")}},Tx=class extends Kt(Xt,Zt,"DescribeRepositories",Aqe){static{i(this,"DescribeRepositoriesCommand")}},FO=class extends Kt(Xt,Zt,"GetAuthorizationToken",hqe){static{i(this,"GetAuthorizationTokenCommand")}},UO=class extends Kt(Xt,Zt,"GetRegistryCatalogData",gqe){static{i(this,"GetRegistryCatalogDataCommand")}},qO=class extends Kt(Xt,Zt,"GetRepositoryCatalogData",yqe){static{i(this,"GetRepositoryCatalogDataCommand")}},GO=class extends Kt(Xt,Zt,"GetRepositoryPolicy",Eqe){static{i(this,"GetRepositoryPolicyCommand")}},HO=class extends Kt(Xt,Zt,"InitiateLayerUpload",Cqe){static{i(this,"InitiateLayerUploadCommand")}},$O=class extends Kt(Xt,Zt,"ListTagsForResource",Iqe){static{i(this,"ListTagsForResourceCommand")}},zO=class extends Kt(Xt,Zt,"PutImage",wqe){static{i(this,"PutImageCommand")}},VO=class extends Kt(Xt,Zt,"PutRegistryCatalogData",Sqe){static{i(this,"PutRegistryCatalogDataCommand")}},WO=class extends Kt(Xt,Zt,"PutRepositoryCatalogData",xqe){static{i(this,"PutRepositoryCatalogDataCommand")}},YO=class extends Kt(Xt,Zt,"SetRepositoryPolicy",bqe){static{i(this,"SetRepositoryPolicyCommand")}},JO=class extends Kt(Xt,Zt,"TagResource",Bqe){static{i(this,"TagResourceCommand")}},jO=class extends Kt(Xt,Zt,"UntagResource",Rqe){static{i(this,"UntagResourceCommand")}},KO=class extends Kt(Xt,Zt,"UploadLayerPart",Nqe){static{i(this,"UploadLayerPartCommand")}},Tqe=ZO(up,Bx,"nextToken","nextToken","maxResults"),vqe=ZO(up,Rx,"nextToken","nextToken","maxResults"),Pqe=ZO(up,Nx,"nextToken","nextToken","maxResults"),Qqe=ZO(up,Tx,"nextToken","nextToken","maxResults"),PGt={BatchCheckLayerAvailabilityCommand:_O,BatchDeleteImageCommand:DO,CompleteLayerUploadCommand:kO,CreateRepositoryCommand:LO,DeleteRepositoryCommand:OO,DeleteRepositoryPolicyCommand:MO,DescribeImagesCommand:Bx,DescribeImageTagsCommand:Rx,DescribeRegistriesCommand:Nx,DescribeRepositoriesCommand:Tx,GetAuthorizationTokenCommand:FO,GetRegistryCatalogDataCommand:UO,GetRepositoryCatalogDataCommand:qO,GetRepositoryPolicyCommand:GO,InitiateLayerUploadCommand:HO,ListTagsForResourceCommand:$O,PutImageCommand:zO,PutRegistryCatalogDataCommand:VO,PutRepositoryCatalogDataCommand:WO,SetRepositoryPolicyCommand:YO,TagResourceCommand:JO,UntagResourceCommand:jO,UploadLayerPartCommand:KO},QGt={paginateDescribeImages:Tqe,paginateDescribeImageTags:vqe,paginateDescribeRegistries:Pqe,paginateDescribeRepositories:Qqe},XO=class extends up{static{i(this,"ECRPUBLIC")}};R1t(PGt,XO,{paginators:QGt});var _Gt={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"},DGt={AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"},kGt={ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag"},LGt={ACTIVE:"ACTIVE",PENDING:"PENDING",REJECTED:"REJECTED"};B.AuthorizationData$=n2e;B.BatchCheckLayerAvailability$=iqe;B.BatchCheckLayerAvailabilityCommand=_O;B.BatchCheckLayerAvailabilityRequest$=s2e;B.BatchCheckLayerAvailabilityResponse$=o2e;B.BatchDeleteImage$=aqe;B.BatchDeleteImageCommand=DO;B.BatchDeleteImageRequest$=i2e;B.BatchDeleteImageResponse$=a2e;B.CompleteLayerUpload$=cqe;B.CompleteLayerUploadCommand=kO;B.CompleteLayerUploadRequest$=c2e;B.CompleteLayerUploadResponse$=l2e;B.CreateRepository$=lqe;B.CreateRepositoryCommand=LO;B.CreateRepositoryRequest$=u2e;B.CreateRepositoryResponse$=d2e;B.DeleteRepository$=uqe;B.DeleteRepositoryCommand=OO;B.DeleteRepositoryPolicy$=dqe;B.DeleteRepositoryPolicyCommand=MO;B.DeleteRepositoryPolicyRequest$=p2e;B.DeleteRepositoryPolicyResponse$=m2e;B.DeleteRepositoryRequest$=f2e;B.DeleteRepositoryResponse$=A2e;B.DescribeImageTags$=mqe;B.DescribeImageTagsCommand=Rx;B.DescribeImageTagsRequest$=y2e;B.DescribeImageTagsResponse$=E2e;B.DescribeImages$=pqe;B.DescribeImagesCommand=Bx;B.DescribeImagesRequest$=h2e;B.DescribeImagesResponse$=g2e;B.DescribeRegistries$=fqe;B.DescribeRegistriesCommand=Nx;B.DescribeRegistriesRequest$=C2e;B.DescribeRegistriesResponse$=I2e;B.DescribeRepositories$=Aqe;B.DescribeRepositoriesCommand=Tx;B.DescribeRepositoriesRequest$=w2e;B.DescribeRepositoriesResponse$=S2e;B.ECRPUBLIC=XO;B.ECRPUBLICClient=up;B.ECRPUBLICServiceException=gt;B.ECRPUBLICServiceException$=PUe;B.EmptyUploadException=fO;B.EmptyUploadException$=QUe;B.GetAuthorizationToken$=hqe;B.GetAuthorizationTokenCommand=FO;B.GetAuthorizationTokenRequest$=x2e;B.GetAuthorizationTokenResponse$=b2e;B.GetRegistryCatalogData$=gqe;B.GetRegistryCatalogDataCommand=UO;B.GetRegistryCatalogDataRequest$=B2e;B.GetRegistryCatalogDataResponse$=R2e;B.GetRepositoryCatalogData$=yqe;B.GetRepositoryCatalogDataCommand=qO;B.GetRepositoryCatalogDataRequest$=N2e;B.GetRepositoryCatalogDataResponse$=T2e;B.GetRepositoryPolicy$=Eqe;B.GetRepositoryPolicyCommand=GO;B.GetRepositoryPolicyRequest$=v2e;B.GetRepositoryPolicyResponse$=P2e;B.Image$=Q2e;B.ImageAlreadyExistsException=RO;B.ImageAlreadyExistsException$=_Ue;B.ImageDetail$=_2e;B.ImageDigestDoesNotMatchException=NO;B.ImageDigestDoesNotMatchException$=DUe;B.ImageFailure$=D2e;B.ImageFailureCode=kGt;B.ImageIdentifier$=sM;B.ImageNotFoundException=bO;B.ImageNotFoundException$=kUe;B.ImageTagAlreadyExistsException=TO;B.ImageTagAlreadyExistsException$=LUe;B.ImageTagDetail$=k2e;B.InitiateLayerUpload$=Cqe;B.InitiateLayerUploadCommand=HO;B.InitiateLayerUploadRequest$=L2e;B.InitiateLayerUploadResponse$=O2e;B.InvalidLayerException=AO;B.InvalidLayerException$=OUe;B.InvalidLayerPartException=vO;B.InvalidLayerPartException$=MUe;B.InvalidParameterException=lO;B.InvalidParameterException$=FUe;B.InvalidTagParameterException=EO;B.InvalidTagParameterException$=UUe;B.Layer$=M2e;B.LayerAlreadyExistsException=hO;B.LayerAlreadyExistsException$=qUe;B.LayerAvailability=DGt;B.LayerFailure$=F2e;B.LayerFailureCode=_Gt;B.LayerPartTooSmallException=gO;B.LayerPartTooSmallException$=GUe;B.LayersNotFoundException=PO;B.LayersNotFoundException$=HUe;B.LimitExceededException=CO;B.LimitExceededException$=$Ue;B.ListTagsForResource$=Iqe;B.ListTagsForResourceCommand=$O;B.ListTagsForResourceRequest$=U2e;B.ListTagsForResourceResponse$=q2e;B.PutImage$=wqe;B.PutImageCommand=zO;B.PutImageRequest$=G2e;B.PutImageResponse$=H2e;B.PutRegistryCatalogData$=Sqe;B.PutRegistryCatalogDataCommand=VO;B.PutRegistryCatalogDataRequest$=$2e;B.PutRegistryCatalogDataResponse$=z2e;B.PutRepositoryCatalogData$=xqe;B.PutRepositoryCatalogDataCommand=WO;B.PutRepositoryCatalogDataRequest$=V2e;B.PutRepositoryCatalogDataResponse$=W2e;B.ReferencedImageDetail$=Y2e;B.ReferencedImagesNotFoundException=QO;B.ReferencedImagesNotFoundException$=zUe;B.Registry$=J2e;B.RegistryAlias$=j2e;B.RegistryAliasStatus=LGt;B.RegistryCatalogData$=M9;B.RegistryNotFoundException=uO;B.RegistryNotFoundException$=VUe;B.Repository$=oM;B.RepositoryAlreadyExistsException=IO;B.RepositoryAlreadyExistsException$=WUe;B.RepositoryCatalogData$=iM;B.RepositoryCatalogDataInput$=F9;B.RepositoryCatalogDataNotFoundException=BO;B.RepositoryCatalogDataNotFoundException$=YUe;B.RepositoryNotEmptyException=SO;B.RepositoryNotEmptyException$=JUe;B.RepositoryNotFoundException=dO;B.RepositoryNotFoundException$=jUe;B.RepositoryPolicyNotFoundException=xO;B.RepositoryPolicyNotFoundException$=KUe;B.ServerException=pO;B.ServerException$=XUe;B.SetRepositoryPolicy$=bqe;B.SetRepositoryPolicyCommand=YO;B.SetRepositoryPolicyRequest$=K2e;B.SetRepositoryPolicyResponse$=X2e;B.Tag$=Z2e;B.TagResource$=Bqe;B.TagResourceCommand=JO;B.TagResourceRequest$=eqe;B.TagResourceResponse$=tqe;B.TooManyTagsException=wO;B.TooManyTagsException$=ZUe;B.UnsupportedCommandException=mO;B.UnsupportedCommandException$=e2e;B.UntagResource$=Rqe;B.UntagResourceCommand=jO;B.UntagResourceRequest$=rqe;B.UntagResourceResponse$=nqe;B.UploadLayerPart$=Nqe;B.UploadLayerPartCommand=KO;B.UploadLayerPartRequest$=sqe;B.UploadLayerPartResponse$=oqe;B.UploadNotFoundException=yO;B.UploadNotFoundException$=t2e;B.errorTypeRegistries=r2e;B.paginateDescribeImageTags=vqe;B.paginateDescribeImages=Tqe;B.paginateDescribeRegistries=Pqe;B.paginateDescribeRepositories=Qqe});var nHt={};Dr(nHt,{main:()=>dGe});module.exports=ee(nHt);var X9=R(require("os"),1);function gu(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i(gu,"toCommandValue");function mM(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}i(mM,"toCommandProperties");function mp(t,e,r){let n=new fM(t,e,r);process.stdout.write(n.toString()+X9.EOL)}i(mp,"issueCommand");function AM(t,e=""){mp(t,{},e)}i(AM,"issue");var K9="::",fM=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=K9+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${yGe(s)}`)}}return e+=`${K9}${gGe(this.message)}`,e}};function gGe(t){return gu(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(gGe,"escapeData");function yGe(t){return gu(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(yGe,"escapeProperty");var Z9=R(require("crypto"),1),Lx=R(require("fs"),1),kx=R(require("os"),1);function eK(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!Lx.existsSync(r))throw new Error(`Missing file at path: ${r}`);Lx.appendFileSync(r,`${gu(e)}${kx.EOL}`,{encoding:"utf8"})}i(eK,"issueFileCommand");function tK(t,e){let r=`ghadelimiter_${Z9.randomUUID()}`,n=gu(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${kx.EOL}${n}${kx.EOL}${r}`}i(tK,"prepareKeyValueMessage");var toe=R(require("os"),1);var OE=R(require("http"),1),$U=R(require("https"),1);function hM(t){let e=t.protocol==="https:";if(EGe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Ox(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Ox(`http://${r}`)}else return}i(hM,"getProxyUrl");function EGe(t){if(!t.hostname)return!1;let e=t.hostname;if(CGe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let o of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(o==="*"||s.some(a=>a===o||a.endsWith(`.${o}`)||o.startsWith(".")&&a.endsWith(`${o}`)))return!0;return!1}i(EGe,"checkBypass");function CGe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(CGe,"isLoopbackAddress");var Ox=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var Lu=R(Of(),1),_se=R(Up(),1);var fr=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},Lo;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(Lo||(Lo={}));var Gn;(function(t){t.Accept="accept",t.ContentType="content-type"})(Gn||(Gn={}));var bl;(function(t){t.ApplicationJson="application/json"})(bl||(bl={}));var D6e=[Lo.MovedPermanently,Lo.ResourceMoved,Lo.SeeOther,Lo.TemporaryRedirect,Lo.PermanentRedirect],k6e=[Lo.BadGateway,Lo.ServiceUnavailable,Lo.GatewayTimeout],L6e=["OPTIONS","GET","DELETE","HEAD"],O6e=10,M6e=5,GU=class t extends Error{static{i(this,"HttpClientError")}constructor(e,r){super(e),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,t.prototype)}},HU=class{static{i(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return fr(this,void 0,void 0,function*(){return new Promise(e=>fr(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return fr(this,void 0,void 0,function*(){return new Promise(e=>fr(this,void 0,void 0,function*(){let r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};var Q0=class{static{i(this,"HttpClient")}constructor(e,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,r){return fr(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return fr(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return fr(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{})})}post(e,r,n){return fr(this,void 0,void 0,function*(){return this.request("POST",e,r,n||{})})}patch(e,r,n){return fr(this,void 0,void 0,function*(){return this.request("PATCH",e,r,n||{})})}put(e,r,n){return fr(this,void 0,void 0,function*(){return this.request("PUT",e,r,n||{})})}head(e,r){return fr(this,void 0,void 0,function*(){return this.request("HEAD",e,null,r||{})})}sendStream(e,r,n,s){return fr(this,void 0,void 0,function*(){return this.request(e,r,n,s)})}getJson(e){return fr(this,arguments,void 0,function*(r,n={}){n[Gn.Accept]=this._getExistingOrDefaultHeader(n,Gn.Accept,bl.ApplicationJson);let s=yield this.get(r,n);return this._processResponse(s,this.requestOptions)})}postJson(e,r){return fr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Gn.Accept]=this._getExistingOrDefaultHeader(o,Gn.Accept,bl.ApplicationJson),o[Gn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,bl.ApplicationJson);let c=yield this.post(n,a,o);return this._processResponse(c,this.requestOptions)})}putJson(e,r){return fr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Gn.Accept]=this._getExistingOrDefaultHeader(o,Gn.Accept,bl.ApplicationJson),o[Gn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,bl.ApplicationJson);let c=yield this.put(n,a,o);return this._processResponse(c,this.requestOptions)})}patchJson(e,r){return fr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Gn.Accept]=this._getExistingOrDefaultHeader(o,Gn.Accept,bl.ApplicationJson),o[Gn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,bl.ApplicationJson);let c=yield this.patch(n,a,o);return this._processResponse(c,this.requestOptions)})}request(e,r,n,s){return fr(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let o=new URL(r),a=this._prepareRequest(e,o,s),c=this._allowRetries&&L6e.includes(e)?this._maxRetries+1:1,l=0,u;do{if(u=yield this.requestRaw(a,n),u&&u.message&&u.message.statusCode===Lo.Unauthorized){let p;for(let m of this.handlers)if(m.canHandleAuthentication(u)){p=m;break}return p?p.handleAuthentication(this,a,n):u}let d=this._maxRedirects;for(;u.message.statusCode&&D6e.includes(u.message.statusCode)&&this._allowRedirects&&d>0;){let p=u.message.headers.location;if(!p)break;let m=new URL(p);if(o.protocol==="https:"&&o.protocol!==m.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield u.readBody(),m.hostname!==o.hostname)for(let f in s)f.toLowerCase()==="authorization"&&delete s[f];a=this._prepareRequest(e,m,s),u=yield this.requestRaw(a,n),d--}if(!u.message.statusCode||!k6e.includes(u.message.statusCode))return u;l+=1,l{function o(a,c){a?s(a):c?n(c):s(new Error("Unknown error"))}i(o,"callbackForResult"),this.requestRawWithCallback(e,r,o)})})}requestRawWithCallback(e,r,n){typeof r=="string"&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let s=!1;function o(l,u){s||(s=!0,n(l,u))}i(o,"handleResult");let a=e.httpModule.request(e.options,l=>{let u=new HU(l);o(void 0,u)}),c;a.on("socket",l=>{c=l}),a.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),o(new Error(`Request timeout: ${e.options.path}`))}),a.on("error",function(l){o(l)}),r&&typeof r=="string"&&a.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){a.end()}),r.pipe(a)):a.end()}getAgent(e){let r=new URL(e);return this._getAgent(r)}getAgentDispatcher(e){let r=new URL(e),n=hM(r);if(n&&n.hostname)return this._getProxyAgentDispatcher(r,n)}_prepareRequest(e,r,n){let s={};s.parsedUrl=r;let o=s.parsedUrl.protocol==="https:";s.httpModule=o?$U:OE;let a=o?443:80;if(s.options={},s.options.host=s.parsedUrl.hostname,s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a,s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||""),s.options.method=e,s.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(s.options.headers["user-agent"]=this.userAgent),s.options.agent=this._getAgent(s.parsedUrl),this.handlers)for(let c of this.handlers)c.prepareRequest(s.options);return s}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},LE(this.requestOptions.headers),LE(e||{})):LE(e||{})}_getExistingOrDefaultHeader(e,r,n){let s;if(this.requestOptions&&this.requestOptions.headers){let a=LE(this.requestOptions.headers)[r];a&&(s=typeof a=="number"?a.toString():a)}let o=e[r];return o!==void 0?typeof o=="number"?o.toString():o:s!==void 0?s:n}_getExistingOrDefaultContentTypeHeader(e,r){let n;if(this.requestOptions&&this.requestOptions.headers){let o=LE(this.requestOptions.headers)[Gn.ContentType];o&&(typeof o=="number"?n=String(o):Array.isArray(o)?n=o.join(", "):n=o)}let s=e[Gn.ContentType];return s!==void 0?typeof s=="number"?String(s):Array.isArray(s)?s.join(", "):s:n!==void 0?n:r}_getAgent(e){let r,n=hM(e),s=n&&n.hostname;if(this._keepAlive&&s&&(r=this._proxyAgent),s||(r=this._agent),r)return r;let o=e.protocol==="https:",a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||OE.globalAgent.maxSockets),n&&n.hostname){let c={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},l,u=n.protocol==="https:";o?l=u?Lu.httpsOverHttps:Lu.httpsOverHttp:l=u?Lu.httpOverHttps:Lu.httpOverHttp,r=l(c),this._proxyAgent=r}if(!r){let c={keepAlive:this._keepAlive,maxSockets:a};r=o?new $U.Agent(c):new OE.Agent(c),this._agent=r}return o&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_getProxyAgentDispatcher(e,r){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let s=e.protocol==="https:";return n=new _se.ProxyAgent(Object.assign({uri:r.href,pipelining:this._keepAlive?1:0},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`})),this._proxyAgentDispatcher=n,s&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let r=e||"actions/http-client",n=process.env.ACTIONS_ORCHESTRATION_ID;if(n){let s=n.replace(/[^a-z0-9_.-]/gi,"_");return`${r} actions_orchestration_id/${s}`}return r}_performExponentialBackoff(e){return fr(this,void 0,void 0,function*(){e=Math.min(O6e,e);let r=M6e*Math.pow(2,e);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(e,r){return fr(this,void 0,void 0,function*(){return new Promise((n,s)=>fr(this,void 0,void 0,function*(){let o=e.message.statusCode||0,a={statusCode:o,result:null,headers:{}};o===Lo.NotFound&&n(a);function c(d,p){if(typeof p=="string"){let m=new Date(p);if(!isNaN(m.valueOf()))return m}return p}i(c,"dateTimeDeserializer");let l,u;try{u=yield e.readBody(),u&&u.length>0&&(r&&r.deserializeDates?l=JSON.parse(u,c):l=JSON.parse(u),a.result=l),a.headers=e.message.headers}catch{}if(o>299){let d;l&&l.message?d=l.message:u&&u.length>0?d=u:d=`Failed request: (${o})`;let p=new GU(d,o);p.result=a.result,s(p)}else n(a)}))})}},LE=i(t=>Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}),"lowercaseKeys");var F6e=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};var _0=class{static{i(this,"BearerCredentialHandler")}constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return F6e(this,void 0,void 0,function*(){throw new Error("not implemented")})}};var Dse=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},D0=class t{static{i(this,"OidcClient")}static createHttpClient(e=!0,r=10){let n={allowRetries:e,maxRetries:r};return new Q0("actions/oidc-client",[new _0(t.getRequestToken())],n)}static getRequestToken(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return e}static getIDTokenUrl(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(e){return Dse(this,void 0,void 0,function*(){var r;let o=(r=(yield t.createHttpClient().getJson(e).catch(a=>{throw new Error(`Failed to get ID Token. +`),ske=!0)),new JD("AWS_PROFILE is set, skipping fromEnv provider.",{logger:t.logger,tryNextLink:!0});return t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),NTt(t)()},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:a}=t;if(!r&&!n&&!s&&!o&&!a)throw new JD("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:t.logger});let{fromSSO:c}=h6();return c(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=rke();return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=o9();return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=a9();return r(t)(e)},async()=>(t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await PTt(t))()),async()=>{throw new JD("Could not load credentials from any providers",{tryNextLink:!1,logger:t.logger})}],oke),"defaultProvider"),kTt=i(t=>t?.expiration!==void 0,"credentialsWillNeedRefresh"),oke=i(t=>t?.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5,"credentialsTreatedAsExpired");jD.credentialsTreatedAsExpired=oke;jD.credentialsWillNeedRefresh=kTt;jD.defaultProvider=DTt});var tUe=I(y=>{var{awsEndpointFunctions:LTt,emitWarningIfUnsupportedVersion:OTt,createDefaultUserAgentProvider:MTt,NODE_APP_ID_CONFIG_OPTIONS:FTt,getAwsRegionExtensionConfiguration:UTt,resolveAwsRegionExtensionConfiguration:qTt,resolveUserAgentConfig:GTt,resolveHostHeaderConfig:HTt,getUserAgentPlugin:$Tt,getHostHeaderPlugin:zTt,getLoggerPlugin:VTt,getRecursionDetectionPlugin:WTt}=(pt(),ee(da)),{getHttpAuthSchemeEndpointRuleSetPlugin:YTt,DefaultIdentityProviderConfig:JTt,getHttpSigningPlugin:jTt,createPaginator:Rf}=(ds(),ee(E5)),{normalizeProvider:dke,getSmithyContext:KTt,ServiceException:XTt,NoOpLogger:ZTt,emitWarningIfUnsupportedVersion:evt,loadConfigsForDefaultMode:tvt,getDefaultExtensionConfiguration:rvt,resolveDefaultRuntimeConfig:nvt,Client:pke,makeBuilder:svt,createWaiter:$L,checkExceptions:mke,WaiterState:Ey,createAggregatedClient:ovt}=(we(),ee(Ag)),{Command:ivt}=(we(),ee(Ag));y.$Command=ivt;y.__Client=pke;var{resolveDefaultsModeConfig:avt,loadConfig:xf,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:cvt,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:lvt,NODE_REGION_CONFIG_OPTIONS:uvt,NODE_REGION_CONFIG_FILE_OPTIONS:dvt,resolveRegionConfig:pvt}=(It(),ee(bo)),{BinaryDecisionDiagram:mvt,EndpointCache:fvt,decideEndpoint:Avt,customEndpointFunctions:hvt,resolveEndpointConfig:gvt,getEndpointPlugin:yvt}=(Rt(),ee(KJ)),{parseUrl:Evt,getHttpHandlerExtensionConfiguration:Cvt,resolveHttpHandlerRuntimeConfig:Ivt,getContentLengthPlugin:wvt}=(Re(),ee(Od)),{DEFAULT_RETRY_MODE:Svt,NODE_RETRY_MODE_CONFIG_OPTIONS:xvt,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:bvt,resolveRetryConfig:Bvt,getRetryPlugin:Rvt}=(No(),ee(n5)),{TypeRegistry:fke,getSchemaSerdePlugin:Nvt}=(st(),ee(PY)),{resolveAwsSdkSigV4Config:Tvt,AwsSdkSigV4Signer:vvt,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:Pvt}=(kn(),ee(k_)),{defaultProvider:Qvt}=l9(),{toUtf8:_vt,fromUtf8:Dvt,toBase64:kvt,fromBase64:Lvt,calculateBodyLength:Ovt}=(Pe(),ee(_g)),{streamCollector:Mvt,NodeHttpHandler:Fvt}=lu(),{AwsJson1_1Protocol:Uvt}=(pf(),ee(Jj)),{Sha256:qvt}=(iu(),ee(w8)),Gvt=i(async(t,e,r)=>({operation:KTt(e).operation,region:await dke(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultECRHttpAuthSchemeParametersProvider");function Hvt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr",region:t.region},propertiesExtractor:i((e,r)=>({signingProperties:{config:e,context:r}}),"propertiesExtractor")}}i(Hvt,"createAwsAuthSigv4HttpAuthOption");var $vt=i(t=>{let e=[];switch(t.operation){default:e.push(Hvt(t))}return e},"defaultECRHttpAuthSchemeProvider"),zvt=i(t=>{let e=Tvt(t);return Object.assign(e,{authSchemePreference:dke(t.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig"),Vvt=i(t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"ecr"}),"resolveClientEndpointParameters"),Wvt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Yvt="3.1090.0",Jvt={version:Yvt},Cy="ref",bf=-1,KD=!0,ike="isSet",d9="PartitionResult",ip="stringEquals",XD="booleanEquals",u9="getAttr",ake={[Cy]:"Endpoint"},ap={fn:u9,argv:[{[Cy]:d9},"name"]},cke={[Cy]:d9},Bf={},lke=[{[Cy]:"Region"}],uke={conditions:[[ike,[ake]],[ike,lke],["aws.partition",lke,d9],[ip,[ap,"aws-eusc"]],[ip,[ap,"aws-iso-f"]],[ip,[ap,"aws-iso-e"]],[ip,[ap,"aws-iso-b"]],[ip,[ap,"aws-iso"]],[ip,[ap,"aws-cn"]],[ip,[ap,"aws-us-gov"]],[ip,[ap,"aws"]],[XD,[{[Cy]:"UseFIPS"},KD]],[XD,[{fn:u9,argv:[cke,"supportsFIPS"]},KD]],[XD,[{[Cy]:"UseDualStack"},KD]],[XD,[{fn:u9,argv:[cke,"supportsDualStack"]},KD]]],results:[[bf],[bf,"Invalid Configuration: FIPS and custom endpoint are not supported"],[bf,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[ake,Bf],["https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",Bf],["https://ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],["https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",Bf],["https://ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],["https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],[bf,"FIPS and DualStack are enabled, but this partition does not support one or both"],[bf,"FIPS is enabled but this partition does not support FIPS"],["https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",Bf],[bf,"DualStack is enabled but this partition does not support DualStack"],[bf,"Invalid Configuration: Missing Region"]]},jvt=2,In=1e8,Kvt=new Int32Array([-1,1,-1,0,23,3,1,4,In+13,2,5,In+13,3,20,6,4,20,7,5,20,8,6,20,9,7,20,10,8,20,11,9,20,12,10,20,13,11,16,14,13,15,In+4,14,In+11,In+12,12,18,17,13,In+9,In+10,13,19,In+6,14,In+8,In+9,11,22,21,13,In+5,In+4,13,In+7,In+6,11,In+1,24,13,In+2,In+3]),Xvt=mvt.from(Kvt,jvt,uke.conditions,uke.results),Zvt=new fvt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ePt=i((t,e={})=>Zvt.get(t,()=>Avt(Xvt,{endpointParams:t,logger:e.logger})),"defaultEndpointResolver");hvt.aws=LTt;var ge=class t extends XTt{static{i(this,"ECRServiceException")}constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}},ZD=class t extends ge{static{i(this,"InvalidParameterException")}name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ek=class t extends ge{static{i(this,"RepositoryNotFoundException")}name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},tk=class t extends ge{static{i(this,"ServerException")}name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e}),Object.setPrototypeOf(this,t.prototype)}},rk=class t extends ge{static{i(this,"LimitExceededException")}name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},nk=class t extends ge{static{i(this,"UnableToGetUpstreamImageException")}name="UnableToGetUpstreamImageException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamImageException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},sk=class t extends ge{static{i(this,"ValidationException")}name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ok=class t extends ge{static{i(this,"EmptyUploadException")}name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ik=class t extends ge{static{i(this,"InvalidLayerException")}name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},ak=class t extends ge{static{i(this,"KmsException")}name="KmsException";$fault="client";kmsError;constructor(e){super({name:"KmsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype),this.kmsError=e.kmsError}},ck=class t extends ge{static{i(this,"LayerAlreadyExistsException")}name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},lk=class t extends ge{static{i(this,"LayerPartTooSmallException")}name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},uk=class t extends ge{static{i(this,"UploadNotFoundException")}name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},dk=class t extends ge{static{i(this,"PullThroughCacheRuleAlreadyExistsException")}name="PullThroughCacheRuleAlreadyExistsException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},pk=class t extends ge{static{i(this,"SecretNotFoundException")}name="SecretNotFoundException";$fault="client";constructor(e){super({name:"SecretNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},mk=class t extends ge{static{i(this,"UnableToAccessSecretException")}name="UnableToAccessSecretException";$fault="client";constructor(e){super({name:"UnableToAccessSecretException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},fk=class t extends ge{static{i(this,"UnableToDecryptSecretValueException")}name="UnableToDecryptSecretValueException";$fault="client";constructor(e){super({name:"UnableToDecryptSecretValueException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ak=class t extends ge{static{i(this,"UnsupportedUpstreamRegistryException")}name="UnsupportedUpstreamRegistryException";$fault="client";constructor(e){super({name:"UnsupportedUpstreamRegistryException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},hk=class t extends ge{static{i(this,"InvalidTagParameterException")}name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},gk=class t extends ge{static{i(this,"RepositoryAlreadyExistsException")}name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},yk=class t extends ge{static{i(this,"TooManyTagsException")}name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ek=class t extends ge{static{i(this,"TemplateAlreadyExistsException")}name="TemplateAlreadyExistsException";$fault="client";constructor(e){super({name:"TemplateAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ck=class t extends ge{static{i(this,"LifecyclePolicyNotFoundException")}name="LifecyclePolicyNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ik=class t extends ge{static{i(this,"PullThroughCacheRuleNotFoundException")}name="PullThroughCacheRuleNotFoundException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},wk=class t extends ge{static{i(this,"RegistryPolicyNotFoundException")}name="RegistryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RegistryPolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Sk=class t extends ge{static{i(this,"RepositoryNotEmptyException")}name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},xk=class t extends ge{static{i(this,"TemplateNotFoundException")}name="TemplateNotFoundException";$fault="client";constructor(e){super({name:"TemplateNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},bk=class t extends ge{static{i(this,"RepositoryPolicyNotFoundException")}name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Bk=class t extends ge{static{i(this,"SigningConfigurationNotFoundException")}name="SigningConfigurationNotFoundException";$fault="client";constructor(e){super({name:"SigningConfigurationNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Rk=class t extends ge{static{i(this,"ExclusionNotFoundException")}name="ExclusionNotFoundException";$fault="client";constructor(e){super({name:"ExclusionNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Nk=class t extends ge{static{i(this,"ImageNotFoundException")}name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Tk=class t extends ge{static{i(this,"ScanNotFoundException")}name="ScanNotFoundException";$fault="client";constructor(e){super({name:"ScanNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},vk=class t extends ge{static{i(this,"LayerInaccessibleException")}name="LayerInaccessibleException";$fault="client";constructor(e){super({name:"LayerInaccessibleException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Pk=class t extends ge{static{i(this,"LayersNotFoundException")}name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Qk=class t extends ge{static{i(this,"UnableToGetUpstreamLayerException")}name="UnableToGetUpstreamLayerException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamLayerException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},_k=class t extends ge{static{i(this,"LifecyclePolicyPreviewNotFoundException")}name="LifecyclePolicyPreviewNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Dk=class t extends ge{static{i(this,"UnableToListUpstreamImageReferrersException")}name="UnableToListUpstreamImageReferrersException";$fault="client";constructor(e){super({name:"UnableToListUpstreamImageReferrersException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},kk=class t extends ge{static{i(this,"ImageAlreadyExistsException")}name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Lk=class t extends ge{static{i(this,"ImageDigestDoesNotMatchException")}name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Ok=class t extends ge{static{i(this,"ImageTagAlreadyExistsException")}name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Mk=class t extends ge{static{i(this,"ReferencedImagesNotFoundException")}name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Fk=class t extends ge{static{i(this,"BlockedByOrganizationPolicyException")}name="BlockedByOrganizationPolicyException";$fault="client";constructor(e){super({name:"BlockedByOrganizationPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Uk=class t extends ge{static{i(this,"ExclusionAlreadyExistsException")}name="ExclusionAlreadyExistsException";$fault="client";constructor(e){super({name:"ExclusionAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},qk=class t extends ge{static{i(this,"ImageArchivedException")}name="ImageArchivedException";$fault="client";constructor(e){super({name:"ImageArchivedException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Gk=class t extends ge{static{i(this,"UnsupportedImageTypeException")}name="UnsupportedImageTypeException";$fault="client";constructor(e){super({name:"UnsupportedImageTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},Hk=class t extends ge{static{i(this,"LifecyclePolicyPreviewInProgressException")}name="LifecyclePolicyPreviewInProgressException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},$k=class t extends ge{static{i(this,"ImageStorageClassUpdateNotSupportedException")}name="ImageStorageClassUpdateNotSupportedException";$fault="client";constructor(e){super({name:"ImageStorageClassUpdateNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},zk=class t extends ge{static{i(this,"InvalidLayerPartException")}name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype),this.registryId=e.registryId,this.repositoryName=e.repositoryName,this.uploadId=e.uploadId,this.lastValidByteReceived=e.lastValidByteReceived}},tPt="Attribute",rPt="AuthorizationData",nPt="AuthorizationDataList",sPt="AwsEcrContainerImageDetails",oPt="AttributeList",iPt="BlockedByOrganizationPolicyException",aPt="BatchCheckLayerAvailability",cPt="BatchCheckLayerAvailabilityRequest",lPt="BatchCheckLayerAvailabilityResponse",uPt="BatchDeleteImage",dPt="BatchDeleteImageRequest",pPt="BatchDeleteImageResponse",mPt="BatchGetImage",fPt="BatchGetImageRequest",APt="BatchGetImageResponse",hPt="BatchGetRepositoryScanningConfiguration",gPt="BatchGetRepositoryScanningConfigurationRequest",yPt="BatchGetRepositoryScanningConfigurationResponse",EPt="CompleteLayerUpload",CPt="CompleteLayerUploadRequest",IPt="CompleteLayerUploadResponse",wPt="CreatePullThroughCacheRule",SPt="CreatePullThroughCacheRuleRequest",xPt="CreatePullThroughCacheRuleResponse",bPt="CreateRepository",BPt="CreateRepositoryCreationTemplate",RPt="CreateRepositoryCreationTemplateRequest",NPt="CreateRepositoryCreationTemplateResponse",TPt="CreateRepositoryRequest",vPt="CreateRepositoryResponse",PPt="CvssScore",QPt="CvssScoreAdjustment",_Pt="CvssScoreAdjustmentList",DPt="CvssScoreDetails",kPt="CvssScoreList",LPt="DescribeImages",OPt="DescribeImagesFilter",MPt="DescribeImagesRequest",FPt="DescribeImageReplicationStatus",UPt="DescribeImageReplicationStatusRequest",qPt="DescribeImageReplicationStatusResponse",GPt="DescribeImagesResponse",HPt="DescribeImageScanFindings",$Pt="DescribeImageScanFindingsRequest",zPt="DescribeImageScanFindingsResponse",VPt="DescribeImageSigningStatus",WPt="DescribeImageSigningStatusRequest",YPt="DescribeImageSigningStatusResponse",JPt="DeleteLifecyclePolicy",jPt="DeleteLifecyclePolicyRequest",KPt="DeleteLifecyclePolicyResponse",XPt="DeletePullThroughCacheRule",ZPt="DeletePullThroughCacheRuleRequest",eQt="DeletePullThroughCacheRuleResponse",tQt="DescribePullThroughCacheRulesRequest",rQt="DescribePullThroughCacheRulesResponse",nQt="DescribePullThroughCacheRules",sQt="DeregisterPullTimeUpdateExclusion",oQt="DeregisterPullTimeUpdateExclusionRequest",iQt="DeregisterPullTimeUpdateExclusionResponse",aQt="DeleteRepository",cQt="DeleteRepositoryCreationTemplate",lQt="DeleteRepositoryCreationTemplateRequest",uQt="DeleteRepositoryCreationTemplateResponse",dQt="DescribeRepositoryCreationTemplatesRequest",pQt="DescribeRepositoryCreationTemplatesResponse",mQt="DescribeRepositoryCreationTemplates",fQt="DeleteRegistryPolicy",AQt="DeleteRegistryPolicyRequest",hQt="DeleteRegistryPolicyResponse",gQt="DeleteRepositoryPolicyRequest",yQt="DeleteRepositoryPolicyResponse",EQt="DeleteRepositoryPolicy",CQt="DeleteRepositoryRequest",IQt="DeleteRepositoryResponse",wQt="DescribeRegistryRequest",SQt="DescribeRegistryResponse",xQt="DescribeRepositoriesRequest",bQt="DescribeRepositoriesResponse",BQt="DescribeRegistry",RQt="DescribeRepositories",NQt="DeleteSigningConfiguration",TQt="DeleteSigningConfigurationRequest",vQt="DeleteSigningConfigurationResponse",PQt="ExclusionAlreadyExistsException",QQt="EncryptionConfiguration",_Qt="EncryptionConfigurationForRepositoryCreationTemplate",DQt="EnhancedImageScanFinding",kQt="EnhancedImageScanFindingList",LQt="ExclusionNotFoundException",OQt="EmptyUploadException",MQt="GetAccountSetting",FQt="GetAccountSettingRequest",UQt="GetAccountSettingResponse",qQt="GetAuthorizationToken",GQt="GetAuthorizationTokenRequest",HQt="GetAuthorizationTokenResponse",$Qt="GetDownloadUrlForLayer",zQt="GetDownloadUrlForLayerRequest",VQt="GetDownloadUrlForLayerResponse",WQt="GetLifecyclePolicy",YQt="GetLifecyclePolicyPreview",JQt="GetLifecyclePolicyPreviewRequest",jQt="GetLifecyclePolicyPreviewResponse",KQt="GetLifecyclePolicyRequest",XQt="GetLifecyclePolicyResponse",ZQt="GetRegistryPolicy",e_t="GetRegistryPolicyRequest",t_t="GetRegistryPolicyResponse",r_t="GetRepositoryPolicyRequest",n_t="GetRepositoryPolicyResponse",s_t="GetRepositoryPolicy",o_t="GetRegistryScanningConfiguration",i_t="GetRegistryScanningConfigurationRequest",a_t="GetRegistryScanningConfigurationResponse",c_t="GetSigningConfiguration",l_t="GetSigningConfigurationRequest",u_t="GetSigningConfigurationResponse",d_t="Image",p_t="ImageArchivedException",m_t="ImageAlreadyExistsException",f_t="ImageDetail",A_t="ImageDigestDoesNotMatchException",h_t="ImageDetailList",g_t="ImageFailure",y_t="ImageFailureList",E_t="ImageIdentifier",C_t="ImageIdentifierList",I_t="ImageList",w_t="InvalidLayerException",S_t="InvalidLayerPartException",x_t="InitiateLayerUpload",b_t="InitiateLayerUploadRequest",B_t="InitiateLayerUploadResponse",R_t="ImageNotFoundException",N_t="InvalidParameterException",T_t="ImageReferrer",v_t="ImageReferrerList",P_t="ImageReplicationStatus",Q_t="ImageReplicationStatusList",__t="ImageScanningConfiguration",D_t="ImageStorageClassUpdateNotSupportedException",k_t="ImageScanFinding",L_t="ImageScanFindingList",O_t="ImageScanFindingsSummary",M_t="ImageScanFindings",F_t="ImageScanStatus",U_t="ImageSigningStatusList",q_t="ImageSigningStatus",G_t="ImageTagAlreadyExistsException",H_t="ImageTagMutabilityExclusionFilter",$_t="ImageTagMutabilityExclusionFilters",z_t="InvalidTagParameterException",V_t="Key",W_t="KmsException",Y_t="Layer",J_t="LayerAlreadyExistsException",j_t="LimitExceededException",K_t="LayerFailure",X_t="LayerFailureList",Z_t="ListImages",eDt="LayerInaccessibleException",tDt="ListImagesFilter",rDt="ListImagesRequest",nDt="ListImageReferrersFilter",sDt="ListImageReferrersRequest",oDt="ListImageReferrersResponse",iDt="ListImagesResponse",aDt="ListImageReferrers",cDt="LayerList",lDt="LayersNotFoundException",uDt="LifecyclePolicyNotFoundException",dDt="LifecyclePolicyPreviewFilter",pDt="LifecyclePolicyPreviewInProgressException",mDt="LifecyclePolicyPreviewNotFoundException",fDt="LifecyclePolicyPreviewResult",ADt="LifecyclePolicyPreviewResultList",hDt="LifecyclePolicyPreviewSummary",gDt="LifecyclePolicyRuleAction",yDt="LayerPartTooSmallException",EDt="ListPullTimeUpdateExclusions",CDt="ListPullTimeUpdateExclusionsRequest",IDt="ListPullTimeUpdateExclusionsResponse",wDt="ListTagsForResource",SDt="ListTagsForResourceRequest",xDt="ListTagsForResourceResponse",bDt="PutAccountSetting",BDt="PutAccountSettingRequest",RDt="PutAccountSettingResponse",NDt="PutImage",TDt="PutImageRequest",vDt="PutImageResponse",PDt="PutImageScanningConfiguration",QDt="PutImageScanningConfigurationRequest",_Dt="PutImageScanningConfigurationResponse",DDt="PutImageTagMutability",kDt="PutImageTagMutabilityRequest",LDt="PutImageTagMutabilityResponse",ODt="PutLifecyclePolicy",MDt="PutLifecyclePolicyRequest",FDt="PutLifecyclePolicyResponse",UDt="PutReplicationConfiguration",qDt="PutReplicationConfigurationRequest",GDt="PutReplicationConfigurationResponse",HDt="PutRegistryPolicy",$Dt="PutRegistryPolicyRequest",zDt="PutRegistryPolicyResponse",VDt="PutRegistryScanningConfiguration",WDt="PutRegistryScanningConfigurationRequest",YDt="PutRegistryScanningConfigurationResponse",JDt="PutSigningConfiguration",jDt="PutSigningConfigurationRequest",KDt="PutSigningConfigurationResponse",XDt="PullThroughCacheRule",ZDt="PullThroughCacheRuleAlreadyExistsException",ekt="PullThroughCacheRuleList",tkt="PullThroughCacheRuleNotFoundException",rkt="PackageVulnerabilityDetails",nkt="Recommendation",skt="RepositoryAlreadyExistsException",okt="ReplicationConfiguration",ikt="RepositoryCreationTemplate",akt="RepositoryCreationTemplateList",ckt="ReplicationDestination",lkt="ReplicationDestinationList",ukt="ResourceDetails",dkt="RepositoryFilter",pkt="RepositoryFilterList",mkt="ReferencedImagesNotFoundException",fkt="RepositoryList",Akt="ResourceList",hkt="RepositoryNotEmptyException",gkt="RepositoryNotFoundException",ykt="RegistryPolicyNotFoundException",Ekt="RepositoryPolicyNotFoundException",Ckt="RegisterPullTimeUpdateExclusion",Ikt="RegisterPullTimeUpdateExclusionRequest",wkt="RegisterPullTimeUpdateExclusionResponse",Skt="ReplicationRule",xkt="ReplicationRuleList",bkt="RegistryScanningConfiguration",Bkt="RepositoryScanningConfigurationFailure",Rkt="RepositoryScanningConfigurationFailureList",Nkt="RepositoryScanningConfigurationList",Tkt="RepositoryScanningConfiguration",vkt="RegistryScanningRule",Pkt="RegistryScanningRuleList",Qkt="Remediation",_kt="Repository",Dkt="Resource",kkt="SigningConfiguration",Lkt="SigningConfigurationNotFoundException",Okt="ScoreDetails",Mkt="ServerException",Fkt="SubjectIdentifier",Ukt="StartImageScan",qkt="StartImageScanRequest",Gkt="StartImageScanResponse",Hkt="StartLifecyclePolicyPreview",$kt="StartLifecyclePolicyPreviewRequest",zkt="StartLifecyclePolicyPreviewResponse",Vkt="ScanNotFoundException",Wkt="SecretNotFoundException",Ykt="SigningRule",Jkt="ScanningRepositoryFilter",jkt="ScanningRepositoryFilterList",Kkt="SigningRepositoryFilterList",Xkt="SigningRepositoryFilter",Zkt="SigningRuleList",eLt="SetRepositoryPolicy",tLt="SetRepositoryPolicyRequest",rLt="SetRepositoryPolicyResponse",nLt="Tag",sLt="TemplateAlreadyExistsException",oLt="TransitioningImageTotalCount",iLt="TransitioningImageTotalCounts",aLt="TagList",cLt="TooManyTagsException",lLt="TemplateNotFoundException",uLt="TagResource",dLt="TagResourceRequest",pLt="TagResourceResponse",mLt="UpdateImageStorageClass",fLt="UpdateImageStorageClassRequest",ALt="UpdateImageStorageClassResponse",hLt="UnsupportedImageTypeException",gLt="UploadLayerPart",yLt="UploadLayerPartRequest",ELt="UploadLayerPartResponse",CLt="UploadNotFoundException",ILt="UpdatePullThroughCacheRule",wLt="UpdatePullThroughCacheRuleRequest",SLt="UpdatePullThroughCacheRuleResponse",xLt="UntagResource",bLt="UpdateRepositoryCreationTemplate",BLt="UpdateRepositoryCreationTemplateRequest",RLt="UpdateRepositoryCreationTemplateResponse",NLt="UntagResourceRequest",TLt="UntagResourceResponse",vLt="UnableToAccessSecretException",PLt="UnableToDecryptSecretValueException",QLt="UnableToGetUpstreamImageException",_Lt="UnableToGetUpstreamLayerException",DLt="UnableToListUpstreamImageReferrersException",kLt="UnsupportedUpstreamRegistryException",LLt="Value",OLt="ValidationException",MLt="VulnerablePackage",FLt="VulnerablePackagesList",ULt="ValidatePullThroughCacheRule",qLt="ValidatePullThroughCacheRuleRequest",GLt="ValidatePullThroughCacheRuleResponse",HLt="architecture",$Lt="awsAccountId",zLt="authorizationData",VLt="awsEcrContainerImage",p9="appliedFor",WLt="acceptedMediaTypes",YLt="artifactMediaType",JLt="appliedRulePriority",Ake="artifactStatus",jLt="appliedScanFilters",KLt="authorizationToken",XLt="artifactType",ZLt="artifactTypes",eOt="action",tOt="adjustments",rOt="annotations",nOt="arch",sOt="attributes",oOt="author",iOt="baseScore",ve="client",Nf="credentialArn",Sy="createdAt",il="customRoleArn",hke="cvss",xy="description",aOt="downloadUrl",cOt="destinations",lOt="details",uOt="digest",Ne="error",dOt="expiresAt",pOt="exploitAvailable",gx="encryptionConfiguration",mOt="enhancedFindings",fOt="expiringImageTotalCount",fu="ecrRepositoryPrefix",AOt="ecrRepositoryPrefixes",gke="encryptionType",hOt="epoch",zL="failures",gOt="findingArn",yOt="fixAvailable",yx="failureCode",EOt="fixedInVersion",COt="firstObservedAt",IOt="filePath",VL="failureReason",yke="findingSeverityCounts",WL="filterType",wOt="failure",cp="filter",SOt="findings",Eke="force",xOt="httpError",bOt="images",BOt="imageDetails",Ex="imageDigest",ROt="imageHash",by="imageIds",wi="imageId",Cke="imageManifest",m9="imageManifestMediaType",Ike="imagePushedAt",YL="imageStatus",JL="imageScanningConfiguration",wke="imageScanCompletedAt",NOt="imageScanFindings",TOt="imageScanFindingsSummary",vOt="imageSizeInBytes",f9="imageScanStatus",A9="imageTags",POt="imageTotalCount",Tf="imageTagMutability",vf="imageTagMutabilityExclusionFilters",Ske="imageTag",QOt="inUseCount",_Ot="isValid",DOt="id",kOt="image",LOt="key",OOt="kmsError",xke="kmsKey",MOt="layers",FOt="layerAvailability",UOt="lastArchivedAt",qOt="lastActivatedAt",GOt="lastByteReceived",bke="layerDigests",Cx="layerDigest",Bke="lastEvaluatedAt",HOt="lastInUseAt",$Ot="lastObservedAt",h9="lifecyclePolicy",zOt="layerPartBlob",Pf="lifecyclePolicyText",VOt="lastRecordedPullTime",WOt="layerSize",YOt="lastValidByteReceived",Te="message",Au="maxResults",Rke="mediaType",JOt="metric",By="name",nn="nextToken",jOt="platform",KOt="pushedAt",jL="principalArn",XOt="proxyEndpoint",ZOt="partFirstByte",eMt="partLastByte",tMt="packageManager",rMt="previewResults",nMt="partSize",lp="policyText",sMt="pullThroughCacheRules",oMt="pullTimeUpdateExclusions",iMt="packageVulnerabilityDetails",KL="prefix",aMt="prefixes",cMt="registry",g9="resourceArn",Nke="repositoryArn",y9="replicationConfiguration",E9="repositoryCreationTemplate",lMt="repositoryCreationTemplates",C9="repositoryFilters",q="registryId",uMt="registryIds",he="repositoryName",Tke="repositoryNames",I9="repositoryPolicy",dMt="replicationStatuses",pMt="registryScanningConfiguration",w9="resourceTags",mMt="referenceUrls",fMt="repositoryUri",AMt="relatedVulnerabilities",vke="repository",hMt="reason",gMt="recommendation",yMt="referrers",Pke="region",EMt="release",CMt="remediation",IMt="repositories",wMt="resources",XL="rules",Qke="smithy.ts.sdk.synthetic.com.amazonaws.ecr",SMt="scanningConfigurations",xMt="scanningConfiguration",ZL="signingConfiguration",bMt="storageClass",BMt="scoreDetails",_ke="scanFrequency",RMt="subjectId",NMt="sourceLayerHash",TMt="subjectManifestDigest",Dke="scanOnPush",kke="signingProfileArn",vMt="scoreSource",PMt="signingStatuses",Lke="scanType",QMt="sourceUrl",Oke="scoringVector",Mke="score",_Mt="server",Fke="severity",DMt="size",Uke="source",Ry="status",kMt="summary",eO="tags",LMt="transitioningImageTotalCounts",OMt="tagKeys",S9="tagStatus",x9="targetStorageClass",MMt="text",FMt="title",b9="type",UMt="uri",tO="updatedAt",Ny="uploadId",B9="upstreamRegistry",Ty="upstreamRepositoryPrefix",Ix="upstreamRegistryUrl",qMt="url",rO="value",GMt="vendorCreatedAt",HMt="vulnerabilityId",$Mt="vulnerablePackages",zMt="vendorSeverity",qke="vulnerabilitySourceUpdatedAt",VMt="vendorUpdatedAt",R9="version",S="com.amazonaws.ecr",Gke=fke.for(Qke),Hke=[-3,Qke,"ECRServiceException",0,[],[]];Gke.registerError(Hke,ge);var Se=fke.for(S),$ke=[-3,S,iPt,{[Ne]:ve},[Te],[0]];Se.registerError($ke,Fk);var zke=[-3,S,OQt,{[Ne]:ve},[Te],[0]];Se.registerError(zke,ok);var Vke=[-3,S,PQt,{[Ne]:ve},[Te],[0]];Se.registerError(Vke,Uk);var Wke=[-3,S,LQt,{[Ne]:ve},[Te],[0]];Se.registerError(Wke,Rk);var Yke=[-3,S,m_t,{[Ne]:ve},[Te],[0]];Se.registerError(Yke,kk);var Jke=[-3,S,p_t,{[Ne]:ve},[Te],[0]];Se.registerError(Jke,qk);var jke=[-3,S,A_t,{[Ne]:ve},[Te],[0]];Se.registerError(jke,Lk);var Kke=[-3,S,R_t,{[Ne]:ve},[Te],[0]];Se.registerError(Kke,Nk);var Xke=[-3,S,D_t,{[Ne]:ve},[Te],[0]];Se.registerError(Xke,$k);var Zke=[-3,S,G_t,{[Ne]:ve},[Te],[0]];Se.registerError(Zke,Ok);var eLe=[-3,S,w_t,{[Ne]:ve},[Te],[0]];Se.registerError(eLe,ik);var tLe=[-3,S,S_t,{[Ne]:ve},[q,he,Ny,YOt,Te],[0,0,0,1,0]];Se.registerError(tLe,zk);var rLe=[-3,S,N_t,{[Ne]:ve},[Te],[0]];Se.registerError(rLe,ZD);var nLe=[-3,S,z_t,{[Ne]:ve},[Te],[0]];Se.registerError(nLe,hk);var sLe=[-3,S,W_t,{[Ne]:ve},[Te,OOt],[0,0]];Se.registerError(sLe,ak);var oLe=[-3,S,J_t,{[Ne]:ve},[Te],[0]];Se.registerError(oLe,ck);var iLe=[-3,S,eDt,{[Ne]:ve},[Te],[0]];Se.registerError(iLe,vk);var aLe=[-3,S,yDt,{[Ne]:ve},[Te],[0]];Se.registerError(aLe,lk);var cLe=[-3,S,lDt,{[Ne]:ve},[Te],[0]];Se.registerError(cLe,Pk);var lLe=[-3,S,uDt,{[Ne]:ve},[Te],[0]];Se.registerError(lLe,Ck);var uLe=[-3,S,pDt,{[Ne]:ve},[Te],[0]];Se.registerError(uLe,Hk);var dLe=[-3,S,mDt,{[Ne]:ve},[Te],[0]];Se.registerError(dLe,_k);var pLe=[-3,S,j_t,{[Ne]:ve},[Te],[0]];Se.registerError(pLe,rk);var mLe=[-3,S,ZDt,{[Ne]:ve},[Te],[0]];Se.registerError(mLe,dk);var fLe=[-3,S,tkt,{[Ne]:ve},[Te],[0]];Se.registerError(fLe,Ik);var ALe=[-3,S,mkt,{[Ne]:ve},[Te],[0]];Se.registerError(ALe,Mk);var hLe=[-3,S,ykt,{[Ne]:ve},[Te],[0]];Se.registerError(hLe,wk);var gLe=[-3,S,skt,{[Ne]:ve},[Te],[0]];Se.registerError(gLe,gk);var yLe=[-3,S,hkt,{[Ne]:ve},[Te],[0]];Se.registerError(yLe,Sk);var ELe=[-3,S,gkt,{[Ne]:ve},[Te],[0]];Se.registerError(ELe,ek);var CLe=[-3,S,Ekt,{[Ne]:ve},[Te],[0]];Se.registerError(CLe,bk);var ILe=[-3,S,Vkt,{[Ne]:ve},[Te],[0]];Se.registerError(ILe,Tk);var wLe=[-3,S,Wkt,{[Ne]:ve},[Te],[0]];Se.registerError(wLe,pk);var SLe=[-3,S,Mkt,{[Ne]:_Mt},[Te],[0]];Se.registerError(SLe,tk);var xLe=[-3,S,Lkt,{[Ne]:ve},[Te],[0]];Se.registerError(xLe,Bk);var bLe=[-3,S,sLt,{[Ne]:ve},[Te],[0]];Se.registerError(bLe,Ek);var BLe=[-3,S,lLt,{[Ne]:ve},[Te],[0]];Se.registerError(BLe,xk);var RLe=[-3,S,cLt,{[Ne]:ve},[Te],[0]];Se.registerError(RLe,yk);var NLe=[-3,S,vLt,{[Ne]:ve},[Te],[0]];Se.registerError(NLe,mk);var TLe=[-3,S,PLt,{[Ne]:ve},[Te],[0]];Se.registerError(TLe,fk);var vLe=[-3,S,QLt,{[Ne]:ve},[Te],[0]];Se.registerError(vLe,nk);var PLe=[-3,S,_Lt,{[Ne]:ve},[Te],[0]];Se.registerError(PLe,Qk);var QLe=[-3,S,DLt,{[Ne]:ve},[Te],[0]];Se.registerError(QLe,Dk);var _Le=[-3,S,hLt,{[Ne]:ve},[Te],[0]];Se.registerError(_Le,Gk);var DLe=[-3,S,kLt,{[Ne]:ve},[Te],[0]];Se.registerError(DLe,Ak);var kLe=[-3,S,CLt,{[Ne]:ve},[Te],[0]];Se.registerError(kLe,uk);var LLe=[-3,S,O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0,()=>eMe,()=>tMe],y1e=[9,S,c_t,0,()=>rMe,()=>nMe],E1e=[9,S,x_t,0,()=>mMe,()=>fMe],C1e=[9,S,aDt,0,()=>wMe,()=>SMe],I1e=[9,S,Z_t,0,()=>bMe,()=>BMe],w1e=[9,S,EDt,0,()=>RMe,()=>NMe],S1e=[9,S,wDt,0,()=>TMe,()=>vMe],x1e=[9,S,bDt,0,()=>_Me,()=>DMe],b1e=[9,S,NDt,0,()=>kMe,()=>LMe],B1e=[9,S,PDt,0,()=>OMe,()=>MMe],R1e=[9,S,DDt,0,()=>FMe,()=>UMe],N1e=[9,S,ODt,0,()=>qMe,()=>GMe],T1e=[9,S,HDt,0,()=>HMe,()=>$Me],v1e=[9,S,VDt,0,()=>zMe,()=>VMe],P1e=[9,S,UDt,0,()=>WMe,()=>YMe],Q1e=[9,S,JDt,0,()=>JMe,()=>jMe],_1e=[9,S,Ckt,0,()=>XMe,()=>ZMe],D1e=[9,S,eLt,0,()=>dFe,()=>pFe],k1e=[9,S,Ukt,0,()=>AFe,()=>hFe],L1e=[9,S,Hkt,0,()=>gFe,()=>yFe],O1e=[9,S,uLt,0,()=>IFe,()=>wFe],M1e=[9,S,xLt,0,()=>xFe,()=>bFe],F1e=[9,S,mLt,0,()=>BFe,()=>RFe],U1e=[9,S,ILt,0,()=>NFe,()=>TFe],q1e=[9,S,bLt,0,()=>vFe,()=>PFe],G1e=[9,S,gLt,0,()=>QFe,()=>_Fe],H1e=[9,S,ULt,0,()=>DFe,()=>kFe],CFt=i(t=>({apiVersion:"2015-09-21",base64Decoder:t?.base64Decoder??Lvt,base64Encoder:t?.base64Encoder??kvt,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??ePt,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??$vt,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(e=>e.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new vvt}],logger:t?.logger??new ZTt,protocol:t?.protocol??Uvt,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.ecr",errorTypeRegistries:OLe,xmlNamespace:"http://ecr.amazonaws.com/doc/2015-09-21/",version:"2015-09-21",serviceTarget:"AmazonEC2ContainerRegistry_V20150921"},serviceId:t?.serviceId??"ECR",sha256:t?.sha256??qvt,urlParser:t?.urlParser??Evt,utf8Decoder:t?.utf8Decoder??Dvt,utf8Encoder:t?.utf8Encoder??_vt}),"getRuntimeConfig$1"),IFt=i(t=>{evt(process.version);let e=avt(t),r=i(()=>e().then(tvt),"defaultConfigProvider"),n=CFt(t);OTt(process.version);let s={profile:t?.profile,logger:n.logger};return{...n,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??xf(Pvt,s),bodyLengthChecker:t?.bodyLengthChecker??Ovt,credentialDefaultProvider:t?.credentialDefaultProvider??Qvt,defaultUserAgentProvider:t?.defaultUserAgentProvider??MTt({serviceId:n.serviceId,clientVersion:Jvt.version}),maxAttempts:t?.maxAttempts??xf(bvt,t),region:t?.region??xf(uvt,{...dvt,...s}),requestHandler:Fvt.create(t?.requestHandler??r),retryMode:t?.retryMode??xf({...xvt,default:i(async()=>(await r()).retryMode||Svt,"default")},t),streamCollector:t?.streamCollector??Mvt,useDualstackEndpoint:t?.useDualstackEndpoint??xf(lvt,s),useFipsEndpoint:t?.useFipsEndpoint??xf(cvt,s),userAgentAppId:t?.userAgentAppId??xf(FTt,s)}},"getRuntimeConfig"),wFt=i(t=>{let e=t.httpAuthSchemes,r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){let o=e.findIndex(a=>a.schemeId===s.schemeId);o===-1?e.push(s):e.splice(o,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),SFt=i(t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),"resolveHttpAuthRuntimeConfig"),xFt=i((t,e)=>{let r=Object.assign(UTt(t),rvt(t),Cvt(t),wFt(t));return e.forEach(n=>n.configure(r)),Object.assign(t,qTt(r),nvt(r),Ivt(r),SFt(r))},"resolveRuntimeExtensions"),Ca=class extends pke{static{i(this,"ECRClient")}config;constructor(...[e]){let r=IFt(e||{});super(r),this.initConfig=r;let n=Vvt(r),s=GTt(n),o=Bvt(s),a=pvt(o),c=HTt(a),l=gvt(c),u=zvt(l),d=xFt(u,e?.extensions||[]);this.config=d,this.middlewareStack.use(Nvt(this.config)),this.middlewareStack.use($Tt(this.config)),this.middlewareStack.use(Rvt(this.config)),this.middlewareStack.use(wvt(this.config)),this.middlewareStack.use(zTt(this.config)),this.middlewareStack.use(VTt(this.config)),this.middlewareStack.use(WTt(this.config)),this.middlewareStack.use(YTt(this.config,{httpAuthSchemeParametersProvider:Gvt,identityProviderConfigProvider:i(async p=>new JTt({"aws.auth#sigv4":p.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(jTt(this.config))}destroy(){super.destroy()}},se=svt(Wvt,"AmazonEC2ContainerRegistry_V20150921","ECRClient",yvt),oe={},ie=i((t,e,r,n)=>[],"_mw0"),Vk=class extends se(oe,ie,"BatchCheckLayerAvailability",UFe){static{i(this,"BatchCheckLayerAvailabilityCommand")}},Wk=class extends se(oe,ie,"BatchDeleteImage",qFe){static{i(this,"BatchDeleteImageCommand")}},Yk=class extends se(oe,ie,"BatchGetImage",GFe){static{i(this,"BatchGetImageCommand")}},Jk=class extends se(oe,ie,"BatchGetRepositoryScanningConfiguration",HFe){static{i(this,"BatchGetRepositoryScanningConfigurationCommand")}},jk=class extends se(oe,ie,"CompleteLayerUpload",$Fe){static{i(this,"CompleteLayerUploadCommand")}},Kk=class extends se(oe,ie,"CreatePullThroughCacheRule",zFe){static{i(this,"CreatePullThroughCacheRuleCommand")}},Xk=class extends se(oe,ie,"CreateRepository",VFe){static{i(this,"CreateRepositoryCommand")}},Zk=class extends se(oe,ie,"CreateRepositoryCreationTemplate",WFe){static{i(this,"CreateRepositoryCreationTemplateCommand")}},eL=class extends se(oe,ie,"DeleteLifecyclePolicy",YFe){static{i(this,"DeleteLifecyclePolicyCommand")}},tL=class extends se(oe,ie,"DeletePullThroughCacheRule",JFe){static{i(this,"DeletePullThroughCacheRuleCommand")}},rL=class extends se(oe,ie,"DeleteRegistryPolicy",jFe){static{i(this,"DeleteRegistryPolicyCommand")}},nL=class extends se(oe,ie,"DeleteRepository",KFe){static{i(this,"DeleteRepositoryCommand")}},sL=class extends se(oe,ie,"DeleteRepositoryCreationTemplate",XFe){static{i(this,"DeleteRepositoryCreationTemplateCommand")}},oL=class extends se(oe,ie,"DeleteRepositoryPolicy",ZFe){static{i(this,"DeleteRepositoryPolicyCommand")}},iL=class extends se(oe,ie,"DeleteSigningConfiguration",e1e){static{i(this,"DeleteSigningConfigurationCommand")}},aL=class extends se(oe,ie,"DeregisterPullTimeUpdateExclusion",t1e){static{i(this,"DeregisterPullTimeUpdateExclusionCommand")}},cL=class extends se(oe,ie,"DescribeImageReplicationStatus",r1e){static{i(this,"DescribeImageReplicationStatusCommand")}},Iy=class extends se(oe,ie,"DescribeImageScanFindings",s1e){static{i(this,"DescribeImageScanFindingsCommand")}},px=class extends se(oe,ie,"DescribeImages",n1e){static{i(this,"DescribeImagesCommand")}},lL=class extends se(oe,ie,"DescribeImageSigningStatus",o1e){static{i(this,"DescribeImageSigningStatusCommand")}},mx=class extends se(oe,ie,"DescribePullThroughCacheRules",i1e){static{i(this,"DescribePullThroughCacheRulesCommand")}},uL=class extends se(oe,ie,"DescribeRegistry",a1e){static{i(this,"DescribeRegistryCommand")}},fx=class extends se(oe,ie,"DescribeRepositories",c1e){static{i(this,"DescribeRepositoriesCommand")}},Ax=class extends se(oe,ie,"DescribeRepositoryCreationTemplates",l1e){static{i(this,"DescribeRepositoryCreationTemplatesCommand")}},dL=class extends se(oe,ie,"GetAccountSetting",u1e){static{i(this,"GetAccountSettingCommand")}},pL=class extends se(oe,ie,"GetAuthorizationToken",d1e){static{i(this,"GetAuthorizationTokenCommand")}},mL=class extends se(oe,ie,"GetDownloadUrlForLayer",p1e){static{i(this,"GetDownloadUrlForLayerCommand")}},fL=class extends se(oe,ie,"GetLifecyclePolicy",m1e){static{i(this,"GetLifecyclePolicyCommand")}},wy=class extends se(oe,ie,"GetLifecyclePolicyPreview",f1e){static{i(this,"GetLifecyclePolicyPreviewCommand")}},AL=class extends se(oe,ie,"GetRegistryPolicy",A1e){static{i(this,"GetRegistryPolicyCommand")}},hL=class extends se(oe,ie,"GetRegistryScanningConfiguration",h1e){static{i(this,"GetRegistryScanningConfigurationCommand")}},gL=class extends se(oe,ie,"GetRepositoryPolicy",g1e){static{i(this,"GetRepositoryPolicyCommand")}},yL=class extends se(oe,ie,"GetSigningConfiguration",y1e){static{i(this,"GetSigningConfigurationCommand")}},EL=class extends se(oe,ie,"InitiateLayerUpload",E1e){static{i(this,"InitiateLayerUploadCommand")}},CL=class extends se(oe,ie,"ListImageReferrers",C1e){static{i(this,"ListImageReferrersCommand")}},hx=class extends se(oe,ie,"ListImages",I1e){static{i(this,"ListImagesCommand")}},IL=class extends se(oe,ie,"ListPullTimeUpdateExclusions",w1e){static{i(this,"ListPullTimeUpdateExclusionsCommand")}},wL=class extends se(oe,ie,"ListTagsForResource",S1e){static{i(this,"ListTagsForResourceCommand")}},SL=class extends se(oe,ie,"PutAccountSetting",x1e){static{i(this,"PutAccountSettingCommand")}},xL=class extends se(oe,ie,"PutImage",b1e){static{i(this,"PutImageCommand")}},bL=class extends se(oe,ie,"PutImageScanningConfiguration",B1e){static{i(this,"PutImageScanningConfigurationCommand")}},BL=class extends se(oe,ie,"PutImageTagMutability",R1e){static{i(this,"PutImageTagMutabilityCommand")}},RL=class extends se(oe,ie,"PutLifecyclePolicy",N1e){static{i(this,"PutLifecyclePolicyCommand")}},NL=class extends se(oe,ie,"PutRegistryPolicy",T1e){static{i(this,"PutRegistryPolicyCommand")}},TL=class extends se(oe,ie,"PutRegistryScanningConfiguration",v1e){static{i(this,"PutRegistryScanningConfigurationCommand")}},vL=class extends se(oe,ie,"PutReplicationConfiguration",P1e){static{i(this,"PutReplicationConfigurationCommand")}},PL=class extends se(oe,ie,"PutSigningConfiguration",Q1e){static{i(this,"PutSigningConfigurationCommand")}},QL=class extends se(oe,ie,"RegisterPullTimeUpdateExclusion",_1e){static{i(this,"RegisterPullTimeUpdateExclusionCommand")}},_L=class extends se(oe,ie,"SetRepositoryPolicy",D1e){static{i(this,"SetRepositoryPolicyCommand")}},DL=class extends se(oe,ie,"StartImageScan",k1e){static{i(this,"StartImageScanCommand")}},kL=class extends se(oe,ie,"StartLifecyclePolicyPreview",L1e){static{i(this,"StartLifecyclePolicyPreviewCommand")}},LL=class extends se(oe,ie,"TagResource",O1e){static{i(this,"TagResourceCommand")}},OL=class extends se(oe,ie,"UntagResource",M1e){static{i(this,"UntagResourceCommand")}},ML=class extends se(oe,ie,"UpdateImageStorageClass",F1e){static{i(this,"UpdateImageStorageClassCommand")}},FL=class extends se(oe,ie,"UpdatePullThroughCacheRule",U1e){static{i(this,"UpdatePullThroughCacheRuleCommand")}},UL=class extends se(oe,ie,"UpdateRepositoryCreationTemplate",q1e){static{i(this,"UpdateRepositoryCreationTemplateCommand")}},qL=class extends se(oe,ie,"UploadLayerPart",G1e){static{i(this,"UploadLayerPartCommand")}},GL=class extends se(oe,ie,"ValidatePullThroughCacheRule",H1e){static{i(this,"ValidatePullThroughCacheRuleCommand")}},$1e=Rf(Ca,Iy,"nextToken","nextToken","maxResults"),z1e=Rf(Ca,px,"nextToken","nextToken","maxResults"),V1e=Rf(Ca,mx,"nextToken","nextToken","maxResults"),W1e=Rf(Ca,fx,"nextToken","nextToken","maxResults"),Y1e=Rf(Ca,Ax,"nextToken","nextToken","maxResults"),J1e=Rf(Ca,wy,"nextToken","nextToken","maxResults"),j1e=Rf(Ca,hx,"nextToken","nextToken","maxResults"),K1e=i(async(t,e)=>{let r;try{let n=await t.send(new Iy(e));r=n;try{if(i(()=>n.imageScanStatus.status,"returnComparator")()==="COMPLETE")return{state:Ey.SUCCESS,reason:r}}catch{}try{if(i(()=>n.imageScanStatus.status,"returnComparator")()==="FAILED")return{state:Ey.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Ey.RETRY,reason:r}},"checkState$1"),bFt=i(async(t,e)=>$L({...{minDelay:5,maxDelay:120},...t},e,K1e),"waitForImageScanComplete"),X1e=i(async(t,e)=>{let n=await $L({...{minDelay:5,maxDelay:120},...t},e,K1e);return mke(n)},"waitUntilImageScanComplete"),Z1e=i(async(t,e)=>{let r;try{let n=await t.send(new wy(e));r=n;try{if(i(()=>n.status,"returnComparator")()==="COMPLETE")return{state:Ey.SUCCESS,reason:r}}catch{}try{if(i(()=>n.status,"returnComparator")()==="FAILED")return{state:Ey.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Ey.RETRY,reason:r}},"checkState"),BFt=i(async(t,e)=>$L({...{minDelay:5,maxDelay:120},...t},e,Z1e),"waitForLifecyclePolicyPreviewComplete"),eUe=i(async(t,e)=>{let n=await $L({...{minDelay:5,maxDelay:120},...t},e,Z1e);return mke(n)},"waitUntilLifecyclePolicyPreviewComplete"),RFt={BatchCheckLayerAvailabilityCommand:Vk,BatchDeleteImageCommand:Wk,BatchGetImageCommand:Yk,BatchGetRepositoryScanningConfigurationCommand:Jk,CompleteLayerUploadCommand:jk,CreatePullThroughCacheRuleCommand:Kk,CreateRepositoryCommand:Xk,CreateRepositoryCreationTemplateCommand:Zk,DeleteLifecyclePolicyCommand:eL,DeletePullThroughCacheRuleCommand:tL,DeleteRegistryPolicyCommand:rL,DeleteRepositoryCommand:nL,DeleteRepositoryCreationTemplateCommand:sL,DeleteRepositoryPolicyCommand:oL,DeleteSigningConfigurationCommand:iL,DeregisterPullTimeUpdateExclusionCommand:aL,DescribeImageReplicationStatusCommand:cL,DescribeImagesCommand:px,DescribeImageScanFindingsCommand:Iy,DescribeImageSigningStatusCommand:lL,DescribePullThroughCacheRulesCommand:mx,DescribeRegistryCommand:uL,DescribeRepositoriesCommand:fx,DescribeRepositoryCreationTemplatesCommand:Ax,GetAccountSettingCommand:dL,GetAuthorizationTokenCommand:pL,GetDownloadUrlForLayerCommand:mL,GetLifecyclePolicyCommand:fL,GetLifecyclePolicyPreviewCommand:wy,GetRegistryPolicyCommand:AL,GetRegistryScanningConfigurationCommand:hL,GetRepositoryPolicyCommand:gL,GetSigningConfigurationCommand:yL,InitiateLayerUploadCommand:EL,ListImageReferrersCommand:CL,ListImagesCommand:hx,ListPullTimeUpdateExclusionsCommand:IL,ListTagsForResourceCommand:wL,PutAccountSettingCommand:SL,PutImageCommand:xL,PutImageScanningConfigurationCommand:bL,PutImageTagMutabilityCommand:BL,PutLifecyclePolicyCommand:RL,PutRegistryPolicyCommand:NL,PutRegistryScanningConfigurationCommand:TL,PutReplicationConfigurationCommand:vL,PutSigningConfigurationCommand:PL,RegisterPullTimeUpdateExclusionCommand:QL,SetRepositoryPolicyCommand:_L,StartImageScanCommand:DL,StartLifecyclePolicyPreviewCommand:kL,TagResourceCommand:LL,UntagResourceCommand:OL,UpdateImageStorageClassCommand:ML,UpdatePullThroughCacheRuleCommand:FL,UpdateRepositoryCreationTemplateCommand:UL,UploadLayerPartCommand:qL,ValidatePullThroughCacheRuleCommand:GL},NFt={paginateDescribeImages:z1e,paginateDescribeImageScanFindings:$1e,paginateDescribePullThroughCacheRules:V1e,paginateDescribeRepositories:W1e,paginateDescribeRepositoryCreationTemplates:Y1e,paginateGetLifecyclePolicyPreview:J1e,paginateListImages:j1e},TFt={waitUntilImageScanComplete:X1e,waitUntilLifecyclePolicyPreviewComplete:eUe},HL=class extends Ca{static{i(this,"ECR")}};ovt(RFt,HL,{paginators:NFt,waiters:TFt});var vFt={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"},PFt={ARCHIVED:"ARCHIVED",AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"},QFt={ImageInaccessible:"ImageInaccessible",ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag",UpstreamAccessDenied:"UpstreamAccessDenied",UpstreamTooManyRequests:"UpstreamTooManyRequests",UpstreamUnavailable:"UpstreamUnavailable"},_Ft={REPOSITORY_NOT_FOUND:"REPOSITORY_NOT_FOUND"},DFt={WILDCARD:"WILDCARD"},kFt={CONTINUOUS_SCAN:"CONTINUOUS_SCAN",MANUAL:"MANUAL",SCAN_ON_PUSH:"SCAN_ON_PUSH"},LFt={AzureContainerRegistry:"azure-container-registry",Chainguard:"chainguard",DockerHub:"docker-hub",Ecr:"ecr",EcrPublic:"ecr-public",GitHubContainerRegistry:"github-container-registry",GitLabContainerRegistry:"gitlab-container-registry",K8s:"k8s",Quay:"quay"},OFt={AES256:"AES256",KMS:"KMS",KMS_DSSE:"KMS_DSSE"},MFt={IMMUTABLE:"IMMUTABLE",IMMUTABLE_WITH_EXCLUSION:"IMMUTABLE_WITH_EXCLUSION",MUTABLE:"MUTABLE",MUTABLE_WITH_EXCLUSION:"MUTABLE_WITH_EXCLUSION"},FFt={WILDCARD:"WILDCARD"},UFt={CREATE_ON_PUSH:"CREATE_ON_PUSH",PULL_THROUGH_CACHE:"PULL_THROUGH_CACHE",REPLICATION:"REPLICATION"},qFt={WILDCARD_MATCH:"WILDCARD_MATCH"},GFt={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},HFt={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"},$Ft={ANY:"ANY",TAGGED:"TAGGED",UNTAGGED:"UNTAGGED"},zFt={CRITICAL:"CRITICAL",HIGH:"HIGH",INFORMATIONAL:"INFORMATIONAL",LOW:"LOW",MEDIUM:"MEDIUM",UNDEFINED:"UNDEFINED"},VFt={ACTIVE:"ACTIVE",COMPLETE:"COMPLETE",FAILED:"FAILED",FINDINGS_UNAVAILABLE:"FINDINGS_UNAVAILABLE",IMAGE_ARCHIVED:"IMAGE_ARCHIVED",IN_PROGRESS:"IN_PROGRESS",LIMIT_EXCEEDED:"LIMIT_EXCEEDED",PENDING:"PENDING",SCAN_ELIGIBILITY_EXPIRED:"SCAN_ELIGIBILITY_EXPIRED",UNSUPPORTED_IMAGE:"UNSUPPORTED_IMAGE"},WFt={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"},YFt={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},JFt={PREFIX_MATCH:"PREFIX_MATCH"},jFt={ARCHIVE:"ARCHIVE"},KFt={EXPIRE:"EXPIRE",TRANSITION:"TRANSITION"},XFt={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"},ZFt={COMPLETE:"COMPLETE",EXPIRED:"EXPIRED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},e1t={BASIC:"BASIC",ENHANCED:"ENHANCED"},t1t={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"},r1t={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"},n1t={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"};y.ArtifactStatus=r1t;y.ArtifactStatusFilter=t1t;y.Attribute$=MLe;y.AuthorizationData$=FLe;y.AwsEcrContainerImageDetails$=ULe;y.BatchCheckLayerAvailability$=UFe;y.BatchCheckLayerAvailabilityCommand=Vk;y.BatchCheckLayerAvailabilityRequest$=qLe;y.BatchCheckLayerAvailabilityResponse$=GLe;y.BatchDeleteImage$=qFe;y.BatchDeleteImageCommand=Wk;y.BatchDeleteImageRequest$=HLe;y.BatchDeleteImageResponse$=$Le;y.BatchGetImage$=GFe;y.BatchGetImageCommand=Yk;y.BatchGetImageRequest$=zLe;y.BatchGetImageResponse$=VLe;y.BatchGetRepositoryScanningConfiguration$=HFe;y.BatchGetRepositoryScanningConfigurationCommand=Jk;y.BatchGetRepositoryScanningConfigurationRequest$=WLe;y.BatchGetRepositoryScanningConfigurationResponse$=YLe;y.BlockedByOrganizationPolicyException=Fk;y.BlockedByOrganizationPolicyException$=$ke;y.CompleteLayerUpload$=$Fe;y.CompleteLayerUploadCommand=jk;y.CompleteLayerUploadRequest$=JLe;y.CompleteLayerUploadResponse$=jLe;y.CreatePullThroughCacheRule$=zFe;y.CreatePullThroughCacheRuleCommand=Kk;y.CreatePullThroughCacheRuleRequest$=KLe;y.CreatePullThroughCacheRuleResponse$=XLe;y.CreateRepository$=VFe;y.CreateRepositoryCommand=Xk;y.CreateRepositoryCreationTemplate$=WFe;y.CreateRepositoryCreationTemplateCommand=Zk;y.CreateRepositoryCreationTemplateRequest$=ZLe;y.CreateRepositoryCreationTemplateResponse$=eOe;y.CreateRepositoryRequest$=tOe;y.CreateRepositoryResponse$=rOe;y.CvssScore$=nOe;y.CvssScoreAdjustment$=sOe;y.CvssScoreDetails$=oOe;y.DeleteLifecyclePolicy$=YFe;y.DeleteLifecyclePolicyCommand=eL;y.DeleteLifecyclePolicyRequest$=iOe;y.DeleteLifecyclePolicyResponse$=aOe;y.DeletePullThroughCacheRule$=JFe;y.DeletePullThroughCacheRuleCommand=tL;y.DeletePullThroughCacheRuleRequest$=cOe;y.DeletePullThroughCacheRuleResponse$=lOe;y.DeleteRegistryPolicy$=jFe;y.DeleteRegistryPolicyCommand=rL;y.DeleteRegistryPolicyRequest$=uOe;y.DeleteRegistryPolicyResponse$=dOe;y.DeleteRepository$=KFe;y.DeleteRepositoryCommand=nL;y.DeleteRepositoryCreationTemplate$=XFe;y.DeleteRepositoryCreationTemplateCommand=sL;y.DeleteRepositoryCreationTemplateRequest$=pOe;y.DeleteRepositoryCreationTemplateResponse$=mOe;y.DeleteRepositoryPolicy$=ZFe;y.DeleteRepositoryPolicyCommand=oL;y.DeleteRepositoryPolicyRequest$=fOe;y.DeleteRepositoryPolicyResponse$=AOe;y.DeleteRepositoryRequest$=hOe;y.DeleteRepositoryResponse$=gOe;y.DeleteSigningConfiguration$=e1e;y.DeleteSigningConfigurationCommand=iL;y.DeleteSigningConfigurationRequest$=yOe;y.DeleteSigningConfigurationResponse$=EOe;y.DeregisterPullTimeUpdateExclusion$=t1e;y.DeregisterPullTimeUpdateExclusionCommand=aL;y.DeregisterPullTimeUpdateExclusionRequest$=COe;y.DeregisterPullTimeUpdateExclusionResponse$=IOe;y.DescribeImageReplicationStatus$=r1e;y.DescribeImageReplicationStatusCommand=cL;y.DescribeImageReplicationStatusRequest$=wOe;y.DescribeImageReplicationStatusResponse$=SOe;y.DescribeImageScanFindings$=s1e;y.DescribeImageScanFindingsCommand=Iy;y.DescribeImageScanFindingsRequest$=xOe;y.DescribeImageScanFindingsResponse$=bOe;y.DescribeImageSigningStatus$=o1e;y.DescribeImageSigningStatusCommand=lL;y.DescribeImageSigningStatusRequest$=ROe;y.DescribeImageSigningStatusResponse$=NOe;y.DescribeImages$=n1e;y.DescribeImagesCommand=px;y.DescribeImagesFilter$=BOe;y.DescribeImagesRequest$=TOe;y.DescribeImagesResponse$=vOe;y.DescribePullThroughCacheRules$=i1e;y.DescribePullThroughCacheRulesCommand=mx;y.DescribePullThroughCacheRulesRequest$=POe;y.DescribePullThroughCacheRulesResponse$=QOe;y.DescribeRegistry$=a1e;y.DescribeRegistryCommand=uL;y.DescribeRegistryRequest$=_Oe;y.DescribeRegistryResponse$=DOe;y.DescribeRepositories$=c1e;y.DescribeRepositoriesCommand=fx;y.DescribeRepositoriesRequest$=kOe;y.DescribeRepositoriesResponse$=LOe;y.DescribeRepositoryCreationTemplates$=l1e;y.DescribeRepositoryCreationTemplatesCommand=Ax;y.DescribeRepositoryCreationTemplatesRequest$=OOe;y.DescribeRepositoryCreationTemplatesResponse$=MOe;y.ECR=HL;y.ECRClient=Ca;y.ECRServiceException=ge;y.ECRServiceException$=Hke;y.EmptyUploadException=ok;y.EmptyUploadException$=zke;y.EncryptionConfiguration$=N9;y.EncryptionConfigurationForRepositoryCreationTemplate$=nO;y.EncryptionType=OFt;y.EnhancedImageScanFinding$=FOe;y.ExclusionAlreadyExistsException=Uk;y.ExclusionAlreadyExistsException$=Vke;y.ExclusionNotFoundException=Rk;y.ExclusionNotFoundException$=Wke;y.FindingSeverity=zFt;y.GetAccountSetting$=u1e;y.GetAccountSettingCommand=dL;y.GetAccountSettingRequest$=UOe;y.GetAccountSettingResponse$=qOe;y.GetAuthorizationToken$=d1e;y.GetAuthorizationTokenCommand=pL;y.GetAuthorizationTokenRequest$=GOe;y.GetAuthorizationTokenResponse$=HOe;y.GetDownloadUrlForLayer$=p1e;y.GetDownloadUrlForLayerCommand=mL;y.GetDownloadUrlForLayerRequest$=$Oe;y.GetDownloadUrlForLayerResponse$=zOe;y.GetLifecyclePolicy$=m1e;y.GetLifecyclePolicyCommand=fL;y.GetLifecyclePolicyPreview$=f1e;y.GetLifecyclePolicyPreviewCommand=wy;y.GetLifecyclePolicyPreviewRequest$=VOe;y.GetLifecyclePolicyPreviewResponse$=WOe;y.GetLifecyclePolicyRequest$=YOe;y.GetLifecyclePolicyResponse$=JOe;y.GetRegistryPolicy$=A1e;y.GetRegistryPolicyCommand=AL;y.GetRegistryPolicyRequest$=jOe;y.GetRegistryPolicyResponse$=KOe;y.GetRegistryScanningConfiguration$=h1e;y.GetRegistryScanningConfigurationCommand=hL;y.GetRegistryScanningConfigurationRequest$=XOe;y.GetRegistryScanningConfigurationResponse$=ZOe;y.GetRepositoryPolicy$=g1e;y.GetRepositoryPolicyCommand=gL;y.GetRepositoryPolicyRequest$=eMe;y.GetRepositoryPolicyResponse$=tMe;y.GetSigningConfiguration$=y1e;y.GetSigningConfigurationCommand=yL;y.GetSigningConfigurationRequest$=rMe;y.GetSigningConfigurationResponse$=nMe;y.Image$=T9;y.ImageActionType=KFt;y.ImageAlreadyExistsException=kk;y.ImageAlreadyExistsException$=Yke;y.ImageArchivedException=qk;y.ImageArchivedException$=Jke;y.ImageDetail$=sMe;y.ImageDigestDoesNotMatchException=Lk;y.ImageDigestDoesNotMatchException$=jke;y.ImageFailure$=oMe;y.ImageFailureCode=QFt;y.ImageIdentifier$=Gs;y.ImageNotFoundException=Nk;y.ImageNotFoundException$=Kke;y.ImageReferrer$=iMe;y.ImageReplicationStatus$=aMe;y.ImageScanFinding$=cMe;y.ImageScanFindings$=lMe;y.ImageScanFindingsSummary$=uMe;y.ImageScanStatus$=sO;y.ImageScanningConfiguration$=wx;y.ImageSigningStatus$=dMe;y.ImageStatus=WFt;y.ImageStatusFilter=HFt;y.ImageStorageClassUpdateNotSupportedException=$k;y.ImageStorageClassUpdateNotSupportedException$=Xke;y.ImageTagAlreadyExistsException=Ok;y.ImageTagAlreadyExistsException$=Zke;y.ImageTagMutability=MFt;y.ImageTagMutabilityExclusionFilter$=pMe;y.ImageTagMutabilityExclusionFilterType=FFt;y.InitiateLayerUpload$=E1e;y.InitiateLayerUploadCommand=EL;y.InitiateLayerUploadRequest$=mMe;y.InitiateLayerUploadResponse$=fMe;y.InvalidLayerException=ik;y.InvalidLayerException$=eLe;y.InvalidLayerPartException=zk;y.InvalidLayerPartException$=tLe;y.InvalidParameterException=ZD;y.InvalidParameterException$=rLe;y.InvalidTagParameterException=hk;y.InvalidTagParameterException$=nLe;y.KmsException=ak;y.KmsException$=sLe;y.Layer$=AMe;y.LayerAlreadyExistsException=ck;y.LayerAlreadyExistsException$=oLe;y.LayerAvailability=PFt;y.LayerFailure$=hMe;y.LayerFailureCode=vFt;y.LayerInaccessibleException=vk;y.LayerInaccessibleException$=iLe;y.LayerPartTooSmallException=lk;y.LayerPartTooSmallException$=aLe;y.LayersNotFoundException=Pk;y.LayersNotFoundException$=cLe;y.LifecyclePolicyNotFoundException=Ck;y.LifecyclePolicyNotFoundException$=lLe;y.LifecyclePolicyPreviewFilter$=gMe;y.LifecyclePolicyPreviewInProgressException=Hk;y.LifecyclePolicyPreviewInProgressException$=uLe;y.LifecyclePolicyPreviewNotFoundException=_k;y.LifecyclePolicyPreviewNotFoundException$=dLe;y.LifecyclePolicyPreviewResult$=yMe;y.LifecyclePolicyPreviewStatus=ZFt;y.LifecyclePolicyPreviewSummary$=EMe;y.LifecyclePolicyRuleAction$=CMe;y.LifecyclePolicyStorageClass=XFt;y.LifecyclePolicyTargetStorageClass=jFt;y.LimitExceededException=rk;y.LimitExceededException$=pLe;y.ListImageReferrers$=C1e;y.ListImageReferrersCommand=CL;y.ListImageReferrersFilter$=IMe;y.ListImageReferrersRequest$=wMe;y.ListImageReferrersResponse$=SMe;y.ListImages$=I1e;y.ListImagesCommand=hx;y.ListImagesFilter$=xMe;y.ListImagesRequest$=bMe;y.ListImagesResponse$=BMe;y.ListPullTimeUpdateExclusions$=w1e;y.ListPullTimeUpdateExclusionsCommand=IL;y.ListPullTimeUpdateExclusionsRequest$=RMe;y.ListPullTimeUpdateExclusionsResponse$=NMe;y.ListTagsForResource$=S1e;y.ListTagsForResourceCommand=wL;y.ListTagsForResourceRequest$=TMe;y.ListTagsForResourceResponse$=vMe;y.PackageVulnerabilityDetails$=PMe;y.PullThroughCacheRule$=QMe;y.PullThroughCacheRuleAlreadyExistsException=dk;y.PullThroughCacheRuleAlreadyExistsException$=mLe;y.PullThroughCacheRuleNotFoundException=Ik;y.PullThroughCacheRuleNotFoundException$=fLe;y.PutAccountSetting$=x1e;y.PutAccountSettingCommand=SL;y.PutAccountSettingRequest$=_Me;y.PutAccountSettingResponse$=DMe;y.PutImage$=b1e;y.PutImageCommand=xL;y.PutImageRequest$=kMe;y.PutImageResponse$=LMe;y.PutImageScanningConfiguration$=B1e;y.PutImageScanningConfigurationCommand=bL;y.PutImageScanningConfigurationRequest$=OMe;y.PutImageScanningConfigurationResponse$=MMe;y.PutImageTagMutability$=R1e;y.PutImageTagMutabilityCommand=BL;y.PutImageTagMutabilityRequest$=FMe;y.PutImageTagMutabilityResponse$=UMe;y.PutLifecyclePolicy$=N1e;y.PutLifecyclePolicyCommand=RL;y.PutLifecyclePolicyRequest$=qMe;y.PutLifecyclePolicyResponse$=GMe;y.PutRegistryPolicy$=T1e;y.PutRegistryPolicyCommand=NL;y.PutRegistryPolicyRequest$=HMe;y.PutRegistryPolicyResponse$=$Me;y.PutRegistryScanningConfiguration$=v1e;y.PutRegistryScanningConfigurationCommand=TL;y.PutRegistryScanningConfigurationRequest$=zMe;y.PutRegistryScanningConfigurationResponse$=VMe;y.PutReplicationConfiguration$=P1e;y.PutReplicationConfigurationCommand=vL;y.PutReplicationConfigurationRequest$=WMe;y.PutReplicationConfigurationResponse$=YMe;y.PutSigningConfiguration$=Q1e;y.PutSigningConfigurationCommand=PL;y.PutSigningConfigurationRequest$=JMe;y.PutSigningConfigurationResponse$=jMe;y.RCTAppliedFor=UFt;y.Recommendation$=KMe;y.ReferencedImagesNotFoundException=Mk;y.ReferencedImagesNotFoundException$=ALe;y.RegisterPullTimeUpdateExclusion$=_1e;y.RegisterPullTimeUpdateExclusionCommand=QL;y.RegisterPullTimeUpdateExclusionRequest$=XMe;y.RegisterPullTimeUpdateExclusionResponse$=ZMe;y.RegistryPolicyNotFoundException=wk;y.RegistryPolicyNotFoundException$=hLe;y.RegistryScanningConfiguration$=v9;y.RegistryScanningRule$=eFe;y.Remediation$=tFe;y.ReplicationConfiguration$=oO;y.ReplicationDestination$=rFe;y.ReplicationRule$=nFe;y.ReplicationStatus=GFt;y.Repository$=iO;y.RepositoryAlreadyExistsException=gk;y.RepositoryAlreadyExistsException$=gLe;y.RepositoryCreationTemplate$=Sx;y.RepositoryFilter$=sFe;y.RepositoryFilterType=JFt;y.RepositoryNotEmptyException=Sk;y.RepositoryNotEmptyException$=yLe;y.RepositoryNotFoundException=ek;y.RepositoryNotFoundException$=ELe;y.RepositoryPolicyNotFoundException=bk;y.RepositoryPolicyNotFoundException$=CLe;y.RepositoryScanningConfiguration$=oFe;y.RepositoryScanningConfigurationFailure$=iFe;y.Resource$=aFe;y.ResourceDetails$=cFe;y.ScanFrequency=kFt;y.ScanNotFoundException=Tk;y.ScanNotFoundException$=ILe;y.ScanStatus=VFt;y.ScanType=e1t;y.ScanningConfigurationFailureCode=_Ft;y.ScanningRepositoryFilter$=lFe;y.ScanningRepositoryFilterType=DFt;y.ScoreDetails$=uFe;y.SecretNotFoundException=pk;y.SecretNotFoundException$=wLe;y.ServerException=tk;y.ServerException$=SLe;y.SetRepositoryPolicy$=D1e;y.SetRepositoryPolicyCommand=_L;y.SetRepositoryPolicyRequest$=dFe;y.SetRepositoryPolicyResponse$=pFe;y.SigningConfiguration$=xx;y.SigningConfigurationNotFoundException=Bk;y.SigningConfigurationNotFoundException$=xLe;y.SigningRepositoryFilter$=mFe;y.SigningRepositoryFilterType=qFt;y.SigningRule$=fFe;y.SigningStatus=YFt;y.StartImageScan$=k1e;y.StartImageScanCommand=DL;y.StartImageScanRequest$=AFe;y.StartImageScanResponse$=hFe;y.StartLifecyclePolicyPreview$=L1e;y.StartLifecyclePolicyPreviewCommand=kL;y.StartLifecyclePolicyPreviewRequest$=gFe;y.StartLifecyclePolicyPreviewResponse$=yFe;y.SubjectIdentifier$=EFe;y.Tag$=CFe;y.TagResource$=O1e;y.TagResourceCommand=LL;y.TagResourceRequest$=IFe;y.TagResourceResponse$=wFe;y.TagStatus=$Ft;y.TargetStorageClass=n1t;y.TemplateAlreadyExistsException=Ek;y.TemplateAlreadyExistsException$=bLe;y.TemplateNotFoundException=xk;y.TemplateNotFoundException$=BLe;y.TooManyTagsException=yk;y.TooManyTagsException$=RLe;y.TransitioningImageTotalCount$=SFe;y.UnableToAccessSecretException=mk;y.UnableToAccessSecretException$=NLe;y.UnableToDecryptSecretValueException=fk;y.UnableToDecryptSecretValueException$=TLe;y.UnableToGetUpstreamImageException=nk;y.UnableToGetUpstreamImageException$=vLe;y.UnableToGetUpstreamLayerException=Qk;y.UnableToGetUpstreamLayerException$=PLe;y.UnableToListUpstreamImageReferrersException=Dk;y.UnableToListUpstreamImageReferrersException$=QLe;y.UnsupportedImageTypeException=Gk;y.UnsupportedImageTypeException$=_Le;y.UnsupportedUpstreamRegistryException=Ak;y.UnsupportedUpstreamRegistryException$=DLe;y.UntagResource$=M1e;y.UntagResourceCommand=OL;y.UntagResourceRequest$=xFe;y.UntagResourceResponse$=bFe;y.UpdateImageStorageClass$=F1e;y.UpdateImageStorageClassCommand=ML;y.UpdateImageStorageClassRequest$=BFe;y.UpdateImageStorageClassResponse$=RFe;y.UpdatePullThroughCacheRule$=U1e;y.UpdatePullThroughCacheRuleCommand=FL;y.UpdatePullThroughCacheRuleRequest$=NFe;y.UpdatePullThroughCacheRuleResponse$=TFe;y.UpdateRepositoryCreationTemplate$=q1e;y.UpdateRepositoryCreationTemplateCommand=UL;y.UpdateRepositoryCreationTemplateRequest$=vFe;y.UpdateRepositoryCreationTemplateResponse$=PFe;y.UploadLayerPart$=G1e;y.UploadLayerPartCommand=qL;y.UploadLayerPartRequest$=QFe;y.UploadLayerPartResponse$=_Fe;y.UploadNotFoundException=uk;y.UploadNotFoundException$=kLe;y.UpstreamRegistry=LFt;y.ValidatePullThroughCacheRule$=H1e;y.ValidatePullThroughCacheRuleCommand=GL;y.ValidatePullThroughCacheRuleRequest$=DFe;y.ValidatePullThroughCacheRuleResponse$=kFe;y.ValidationException=sk;y.ValidationException$=LLe;y.VulnerablePackage$=LFe;y.errorTypeRegistries=OLe;y.paginateDescribeImageScanFindings=$1e;y.paginateDescribeImages=z1e;y.paginateDescribePullThroughCacheRules=V1e;y.paginateDescribeRepositories=W1e;y.paginateDescribeRepositoryCreationTemplates=Y1e;y.paginateGetLifecyclePolicyPreview=J1e;y.paginateListImages=j1e;y.waitForImageScanComplete=bFt;y.waitForLifecyclePolicyPreviewComplete=BFt;y.waitUntilImageScanComplete=X1e;y.waitUntilLifecyclePolicyPreviewComplete=eUe});var _qe=I(B=>{var{awsEndpointFunctions:s1t,emitWarningIfUnsupportedVersion:o1t,createDefaultUserAgentProvider:i1t,NODE_APP_ID_CONFIG_OPTIONS:a1t,getAwsRegionExtensionConfiguration:c1t,resolveAwsRegionExtensionConfiguration:l1t,resolveUserAgentConfig:u1t,resolveHostHeaderConfig:d1t,getUserAgentPlugin:p1t,getHostHeaderPlugin:m1t,getLoggerPlugin:f1t,getRecursionDetectionPlugin:A1t}=(pt(),ee(da)),{getHttpAuthSchemeEndpointRuleSetPlugin:h1t,DefaultIdentityProviderConfig:g1t,getHttpSigningPlugin:y1t,createPaginator:ZO}=(ds(),ee(E5)),{normalizeProvider:iUe,getSmithyContext:E1t,ServiceException:C1t,NoOpLogger:I1t,emitWarningIfUnsupportedVersion:w1t,loadConfigsForDefaultMode:S1t,getDefaultExtensionConfiguration:x1t,resolveDefaultRuntimeConfig:b1t,Client:aUe,makeBuilder:B1t,createAggregatedClient:R1t}=(we(),ee(Ag)),{Command:N1t}=(we(),ee(Ag));B.$Command=N1t;B.__Client=aUe;var{resolveDefaultsModeConfig:T1t,loadConfig:_f,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:v1t,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:P1t,NODE_REGION_CONFIG_OPTIONS:Q1t,NODE_REGION_CONFIG_FILE_OPTIONS:_1t,resolveRegionConfig:D1t}=(It(),ee(bo)),{BinaryDecisionDiagram:k1t,EndpointCache:L1t,decideEndpoint:O1t,customEndpointFunctions:M1t,resolveEndpointConfig:F1t,getEndpointPlugin:U1t}=(Rt(),ee(KJ)),{parseUrl:q1t,getHttpHandlerExtensionConfiguration:G1t,resolveHttpHandlerRuntimeConfig:H1t,getContentLengthPlugin:$1t}=(Re(),ee(Od)),{DEFAULT_RETRY_MODE:z1t,NODE_RETRY_MODE_CONFIG_OPTIONS:V1t,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:W1t,resolveRetryConfig:Y1t,getRetryPlugin:J1t}=(No(),ee(n5)),{TypeRegistry:cUe,getSchemaSerdePlugin:j1t}=(st(),ee(PY)),{resolveAwsSdkSigV4Config:K1t,AwsSdkSigV4Signer:X1t,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:Z1t}=(kn(),ee(k_)),{defaultProvider:eUt}=l9(),{toUtf8:tUt,fromUtf8:rUt,toBase64:nUt,fromBase64:sUt,calculateBodyLength:oUt}=(Pe(),ee(_g)),{streamCollector:iUt,NodeHttpHandler:aUt}=lu(),{AwsJson1_1Protocol:cUt}=(pf(),ee(Jj)),{Sha256:lUt}=(iu(),ee(w8)),uUt=i(async(t,e,r)=>({operation:E1t(e).operation,region:await iUe(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultECRPUBLICHttpAuthSchemeParametersProvider");function dUt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr-public",region:t.region},propertiesExtractor:i((e,r)=>({signingProperties:{config:e,context:r}}),"propertiesExtractor")}}i(dUt,"createAwsAuthSigv4HttpAuthOption");var pUt=i(t=>{let e=[];switch(t.operation){default:e.push(dUt(t))}return e},"defaultECRPUBLICHttpAuthSchemeProvider"),mUt=i(t=>{let e=K1t(t);return Object.assign(e,{authSchemePreference:iUe(t.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig"),fUt=i(t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"ecr-public"}),"resolveClientEndpointParameters"),AUt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},hUt="3.1090.0",gUt={version:hUt},bx="ref",Df=-1,aO=!0,rUe="isSet",lUe="PartitionResult",cO="booleanEquals",P9="getAttr",nUe={[bx]:"Endpoint"},Q9={[bx]:lUe},Qy={},sUe=[{[bx]:"Region"}],oUe={conditions:[[rUe,[nUe]],[rUe,sUe],["aws.partition",sUe,lUe],[cO,[{[bx]:"UseFIPS"},aO]],[cO,[{[bx]:"UseDualStack"},aO]],[cO,[{fn:P9,argv:[Q9,"supportsDualStack"]},aO]],[cO,[{fn:P9,argv:[Q9,"supportsFIPS"]},aO]],["stringEquals",[{fn:P9,argv:[Q9,"name"]},"aws"]]],results:[[Df],[Df,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Df,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[nUe,Qy],["https://api.ecr-public-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Qy],[Df,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://api.ecr-public-fips.{Region}.{PartitionResult#dnsSuffix}",Qy],[Df,"FIPS is enabled but this partition does not support FIPS"],["https://ecr-public.{Region}.api.aws",Qy],["https://api.ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}",Qy],[Df,"DualStack is enabled but this partition does not support DualStack"],["https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}",Qy],[Df,"Invalid Configuration: Missing Region"]]},yUt=2,Hs=1e8,EUt=new Int32Array([-1,1,-1,0,13,3,1,4,Hs+12,2,5,Hs+12,3,9,6,4,7,Hs+11,5,8,Hs+10,7,Hs+8,Hs+9,4,11,10,6,Hs+6,Hs+7,5,12,Hs+5,6,Hs+4,Hs+5,3,Hs+1,14,4,Hs+2,Hs+3]),CUt=k1t.from(EUt,yUt,oUe.conditions,oUe.results),IUt=new L1t({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),wUt=i((t,e={})=>IUt.get(t,()=>O1t(CUt,{endpointParams:t,logger:e.logger})),"defaultEndpointResolver");M1t.aws=s1t;var gt=class t extends C1t{static{i(this,"ECRPUBLICServiceException")}constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}},lO=class t extends gt{static{i(this,"InvalidParameterException")}name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},uO=class t extends gt{static{i(this,"RegistryNotFoundException")}name="RegistryNotFoundException";$fault="client";constructor(e){super({name:"RegistryNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},dO=class t extends gt{static{i(this,"RepositoryNotFoundException")}name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},pO=class t extends gt{static{i(this,"ServerException")}name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e}),Object.setPrototypeOf(this,t.prototype)}},mO=class t extends gt{static{i(this,"UnsupportedCommandException")}name="UnsupportedCommandException";$fault="client";constructor(e){super({name:"UnsupportedCommandException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},fO=class t extends gt{static{i(this,"EmptyUploadException")}name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},AO=class t extends gt{static{i(this,"InvalidLayerException")}name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},hO=class t extends gt{static{i(this,"LayerAlreadyExistsException")}name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},gO=class t extends gt{static{i(this,"LayerPartTooSmallException")}name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},yO=class t extends gt{static{i(this,"UploadNotFoundException")}name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},EO=class t extends gt{static{i(this,"InvalidTagParameterException")}name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},CO=class t extends gt{static{i(this,"LimitExceededException")}name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},IO=class t extends gt{static{i(this,"RepositoryAlreadyExistsException")}name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},wO=class t extends gt{static{i(this,"TooManyTagsException")}name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},SO=class t extends gt{static{i(this,"RepositoryNotEmptyException")}name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},xO=class t extends gt{static{i(this,"RepositoryPolicyNotFoundException")}name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},bO=class t extends gt{static{i(this,"ImageNotFoundException")}name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},BO=class t extends gt{static{i(this,"RepositoryCatalogDataNotFoundException")}name="RepositoryCatalogDataNotFoundException";$fault="client";constructor(e){super({name:"RepositoryCatalogDataNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},RO=class t extends gt{static{i(this,"ImageAlreadyExistsException")}name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},NO=class t extends gt{static{i(this,"ImageDigestDoesNotMatchException")}name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},TO=class t extends gt{static{i(this,"ImageTagAlreadyExistsException")}name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},vO=class t extends gt{static{i(this,"InvalidLayerPartException")}name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype),this.registryId=e.registryId,this.repositoryName=e.repositoryName,this.uploadId=e.uploadId,this.lastValidByteReceived=e.lastValidByteReceived}},PO=class t extends gt{static{i(this,"LayersNotFoundException")}name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},QO=class t extends gt{static{i(this,"ReferencedImagesNotFoundException")}name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},SUt="AuthorizationData",xUt="BatchCheckLayerAvailability",bUt="BatchCheckLayerAvailabilityRequest",BUt="BatchCheckLayerAvailabilityResponse",RUt="BatchDeleteImage",NUt="BatchDeleteImageRequest",TUt="BatchDeleteImageResponse",vUt="CompleteLayerUpload",PUt="CompleteLayerUploadRequest",QUt="CompleteLayerUploadResponse",_Ut="CreateRepository",DUt="CreateRepositoryRequest",kUt="CreateRepositoryResponse",LUt="DescribeImages",OUt="DescribeImagesRequest",MUt="DescribeImagesResponse",FUt="DescribeImageTags",UUt="DescribeImageTagsRequest",qUt="DescribeImageTagsResponse",GUt="DeleteRepository",HUt="DeleteRepositoryPolicy",$Ut="DeleteRepositoryPolicyRequest",zUt="DeleteRepositoryPolicyResponse",VUt="DeleteRepositoryRequest",WUt="DeleteRepositoryResponse",YUt="DescribeRegistriesRequest",JUt="DescribeRegistriesResponse",jUt="DescribeRepositoriesRequest",KUt="DescribeRepositoriesResponse",XUt="DescribeRegistries",ZUt="DescribeRepositories",e2t="EmptyUploadException",t2t="GetAuthorizationToken",r2t="GetAuthorizationTokenRequest",n2t="GetAuthorizationTokenResponse",s2t="GetRegistryCatalogData",o2t="GetRegistryCatalogDataRequest",i2t="GetRegistryCatalogDataResponse",a2t="GetRepositoryCatalogDataRequest",c2t="GetRepositoryCatalogDataResponse",l2t="GetRepositoryCatalogData",u2t="GetRepositoryPolicy",d2t="GetRepositoryPolicyRequest",p2t="GetRepositoryPolicyResponse",m2t="Image",f2t="ImageAlreadyExistsException",A2t="ImageDetail",h2t="ImageDigestDoesNotMatchException",g2t="ImageDetailList",y2t="ImageFailure",E2t="ImageFailureList",C2t="ImageIdentifier",I2t="ImageIdentifierList",w2t="InvalidLayerException",S2t="InvalidLayerPartException",x2t="InitiateLayerUpload",b2t="InitiateLayerUploadRequest",B2t="InitiateLayerUploadResponse",R2t="ImageNotFoundException",N2t="InvalidParameterException",T2t="ImageTagAlreadyExistsException",v2t="ImageTagDetail",P2t="ImageTagDetailList",Q2t="InvalidTagParameterException",_2t="Key",D2t="Layer",k2t="LayerAlreadyExistsException",L2t="LimitExceededException",O2t="LayerFailure",M2t="LayerFailureList",F2t="LayerList",U2t="LayersNotFoundException",q2t="LayerPartTooSmallException",G2t="ListTagsForResource",H2t="ListTagsForResourceRequest",$2t="ListTagsForResourceResponse",z2t="PutImage",V2t="PutImageRequest",W2t="PutImageResponse",Y2t="PutRegistryCatalogData",J2t="PutRegistryCatalogDataRequest",j2t="PutRegistryCatalogDataResponse",K2t="PutRepositoryCatalogDataRequest",X2t="PutRepositoryCatalogDataResponse",Z2t="PutRepositoryCatalogData",eqt="Registry",tqt="RegistryAlias",rqt="RepositoryAlreadyExistsException",nqt="RegistryAliasList",sqt="RegistryCatalogData",oqt="RepositoryCatalogDataInput",iqt="RepositoryCatalogDataNotFoundException",aqt="RepositoryCatalogData",cqt="ReferencedImageDetail",lqt="ReferencedImagesNotFoundException",uqt="RegistryList",dqt="RepositoryList",pqt="RepositoryNotEmptyException",mqt="RegistryNotFoundException",fqt="RepositoryNotFoundException",Aqt="RepositoryPolicyNotFoundException",hqt="Repository",gqt="ServerException",yqt="SetRepositoryPolicy",Eqt="SetRepositoryPolicyRequest",Cqt="SetRepositoryPolicyResponse",Iqt="Tag",wqt="TagList",Sqt="TooManyTagsException",xqt="TagResource",bqt="TagResourceRequest",Bqt="TagResourceResponse",Rqt="UnsupportedCommandException",Nqt="UploadLayerPart",Tqt="UploadLayerPartRequest",vqt="UploadLayerPartResponse",Pqt="UploadNotFoundException",Qqt="UntagResource",_qt="UntagResourceRequest",Dqt="UntagResourceResponse",kqt="Value",Lqt="aliases",Oqt="authorizationData",uUe="artifactMediaType",Mqt="authorizationToken",dUe="aboutText",pUe="architectures",jt="client",mUe="createdAt",vx="catalogData",fUe="description",AUe="displayName",Fqt="defaultRegistryAlias",zt="error",Uqt="expiresAt",hUe="failures",gUe="failureCode",yUe="failureReason",EUe="force",qqt="image",Gqt="imageDetails",eM="imageDigest",Hqt="imageDetail",_9="imageIds",CUe="imageId",IUe="imageManifest",tM="imageManifestMediaType",wUe="imagePushedAt",SUe="imageSizeInBytes",$qt="imageTags",zqt="imageTagDetails",D9="imageTag",Vqt="layers",Wqt="layerAvailability",Yqt="lastByteReceived",xUe="layerDigests",k9="layerDigest",Jqt="logoImageBlob",jqt="layerPartBlob",Kqt="layerSize",Xqt="logoUrl",Zqt="lastValidByteReceived",Vt="message",eGt="marketplaceCertified",rM="maxResults",tGt="mediaType",rGt="name",dp="nextToken",bUe="operatingSystems",nGt="partFirstByte",sGt="partLastByte",oGt="primaryRegistryAlias",iGt="partSize",nM="policyText",BUe="repository",L9="resourceArn",aGt="registryArn",cGt="repositoryArn",RUe="registryCatalogData",Dt="registryId",Wt="repositoryName",lGt="repositoryNames",uGt="registryUri",dGt="repositoryUri",pGt="registries",mGt="repositories",NUe="smithy.ts.sdk.synthetic.com.amazonaws.ecrpublic",fGt="server",AGt="status",O9="tags",hGt="tagKeys",_y="uploadId",TUe="usageText",gGt="verified",T="com.amazonaws.ecrpublic",vUe=cUe.for(NUe),PUe=[-3,NUe,"ECRPUBLICServiceException",0,[],[]];vUe.registerError(PUe,gt);var kt=cUe.for(T),QUe=[-3,T,e2t,{[zt]:jt},[Vt],[0]];kt.registerError(QUe,fO);var _Ue=[-3,T,f2t,{[zt]:jt},[Vt],[0]];kt.registerError(_Ue,RO);var DUe=[-3,T,h2t,{[zt]:jt},[Vt],[0]];kt.registerError(DUe,NO);var kUe=[-3,T,R2t,{[zt]:jt},[Vt],[0]];kt.registerError(kUe,bO);var LUe=[-3,T,T2t,{[zt]:jt},[Vt],[0]];kt.registerError(LUe,TO);var OUe=[-3,T,w2t,{[zt]:jt},[Vt],[0]];kt.registerError(OUe,AO);var MUe=[-3,T,S2t,{[zt]:jt},[Dt,Wt,_y,Zqt,Vt],[0,0,0,1,0]];kt.registerError(MUe,vO);var FUe=[-3,T,N2t,{[zt]:jt},[Vt],[0]];kt.registerError(FUe,lO);var UUe=[-3,T,Q2t,{[zt]:jt},[Vt],[0]];kt.registerError(UUe,EO);var qUe=[-3,T,k2t,{[zt]:jt},[Vt],[0]];kt.registerError(qUe,hO);var GUe=[-3,T,q2t,{[zt]:jt},[Vt],[0]];kt.registerError(GUe,gO);var HUe=[-3,T,U2t,{[zt]:jt},[Vt],[0]];kt.registerError(HUe,PO);var $Ue=[-3,T,L2t,{[zt]:jt},[Vt],[0]];kt.registerError($Ue,CO);var zUe=[-3,T,lqt,{[zt]:jt},[Vt],[0]];kt.registerError(zUe,QO);var VUe=[-3,T,mqt,{[zt]:jt},[Vt],[0]];kt.registerError(VUe,uO);var WUe=[-3,T,rqt,{[zt]:jt},[Vt],[0]];kt.registerError(WUe,IO);var YUe=[-3,T,iqt,{[zt]:jt},[Vt],[0]];kt.registerError(YUe,BO);var JUe=[-3,T,pqt,{[zt]:jt},[Vt],[0]];kt.registerError(JUe,SO);var jUe=[-3,T,fqt,{[zt]:jt},[Vt],[0]];kt.registerError(jUe,dO);var KUe=[-3,T,Aqt,{[zt]:jt},[Vt],[0]];kt.registerError(KUe,xO);var XUe=[-3,T,gqt,{[zt]:fGt},[Vt],[0]];kt.registerError(XUe,pO);var ZUe=[-3,T,Sqt,{[zt]:jt},[Vt],[0]];kt.registerError(ZUe,wO);var e2e=[-3,T,Rqt,{[zt]:jt},[Vt],[0]];kt.registerError(e2e,mO);var t2e=[-3,T,Pqt,{[zt]:jt},[Vt],[0]];kt.registerError(t2e,yO);var r2e=[vUe,kt],n2e=[3,T,SUt,0,[Mqt,Uqt],[0,4]],s2e=[3,T,bUt,0,[Wt,xUe,Dt],[0,64,0],2],o2e=[3,T,BUt,0,[Vqt,hUe],[()=>wGt,()=>IGt]],i2e=[3,T,NUt,0,[Wt,_9,Dt],[0,()=>U9,0],2],a2e=[3,T,TUt,0,[_9,hUe],[()=>U9,()=>EGt]],c2e=[3,T,PUt,0,[Wt,_y,xUe,Dt],[0,0,64,0],3],l2e=[3,T,QUt,0,[Dt,Wt,_y,k9],[0,0,0,0]],u2e=[3,T,DUt,0,[Wt,vx,O9],[0,()=>F9,()=>q9],1],d2e=[3,T,kUt,0,[BUe,vx],[()=>oM,()=>iM]],p2e=[3,T,$Ut,0,[Wt,Dt],[0,0],1],m2e=[3,T,zUt,0,[Dt,Wt,nM],[0,0,0]],f2e=[3,T,VUt,0,[Wt,Dt,EUe],[0,0,2],1],A2e=[3,T,WUt,0,[BUe],[()=>oM]],h2e=[3,T,OUt,0,[Wt,Dt,_9,dp,rM],[0,0,()=>U9,0,1],1],g2e=[3,T,MUt,0,[Gqt,dp],[()=>yGt,0]],y2e=[3,T,UUt,0,[Wt,Dt,dp,rM],[0,0,0,1],1],E2e=[3,T,qUt,0,[zqt,dp],[()=>CGt,0]],C2e=[3,T,YUt,0,[dp,rM],[0,1]],I2e=[3,T,JUt,0,[pGt,dp],[()=>xGt,0],1],w2e=[3,T,jUt,0,[Dt,lGt,dp,rM],[0,64,0,1]],S2e=[3,T,KUt,0,[mGt,dp],[()=>bGt,0]],x2e=[3,T,r2t,0,[],[]],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N2e,()=>T2e],Eqe=[9,T,u2t,0,()=>v2e,()=>P2e],Cqe=[9,T,x2t,0,()=>L2e,()=>O2e],Iqe=[9,T,G2t,0,()=>U2e,()=>q2e],wqe=[9,T,z2t,0,()=>G2e,()=>H2e],Sqe=[9,T,Y2t,0,()=>$2e,()=>z2e],xqe=[9,T,Z2t,0,()=>V2e,()=>W2e],bqe=[9,T,yqt,0,()=>K2e,()=>X2e],Bqe=[9,T,xqt,0,()=>eqe,()=>tqe],Rqe=[9,T,Qqt,0,()=>rqe,()=>nqe],Nqe=[9,T,Nqt,0,()=>sqe,()=>oqe],BGt=i(t=>({apiVersion:"2020-10-30",base64Decoder:t?.base64Decoder??sUt,base64Encoder:t?.base64Encoder??nUt,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??wUt,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??pUt,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i(e=>e.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new X1t}],logger:t?.logger??new I1t,protocol:t?.protocol??cUt,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.ecrpublic",errorTypeRegistries:r2e,xmlNamespace:"http://ecr-public.amazonaws.com/doc/2020-12-02/",version:"2020-10-30",serviceTarget:"SpencerFrontendService"},serviceId:t?.serviceId??"ECR PUBLIC",sha256:t?.sha256??lUt,urlParser:t?.urlParser??q1t,utf8Decoder:t?.utf8Decoder??rUt,utf8Encoder:t?.utf8Encoder??tUt}),"getRuntimeConfig$1"),RGt=i(t=>{w1t(process.version);let e=T1t(t),r=i(()=>e().then(S1t),"defaultConfigProvider"),n=BGt(t);o1t(process.version);let s={profile:t?.profile,logger:n.logger};return{...n,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??_f(Z1t,s),bodyLengthChecker:t?.bodyLengthChecker??oUt,credentialDefaultProvider:t?.credentialDefaultProvider??eUt,defaultUserAgentProvider:t?.defaultUserAgentProvider??i1t({serviceId:n.serviceId,clientVersion:gUt.version}),maxAttempts:t?.maxAttempts??_f(W1t,t),region:t?.region??_f(Q1t,{..._1t,...s}),requestHandler:aUt.create(t?.requestHandler??r),retryMode:t?.retryMode??_f({...V1t,default:i(async()=>(await r()).retryMode||z1t,"default")},t),streamCollector:t?.streamCollector??iUt,useDualstackEndpoint:t?.useDualstackEndpoint??_f(P1t,s),useFipsEndpoint:t?.useFipsEndpoint??_f(v1t,s),userAgentAppId:t?.userAgentAppId??_f(a1t,s)}},"getRuntimeConfig"),NGt=i(t=>{let e=t.httpAuthSchemes,r=t.httpAuthSchemeProvider,n=t.credentials;return{setHttpAuthScheme(s){let o=e.findIndex(a=>a.schemeId===s.schemeId);o===-1?e.push(s):e.splice(o,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){n=s},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),TGt=i(t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),"resolveHttpAuthRuntimeConfig"),vGt=i((t,e)=>{let r=Object.assign(c1t(t),x1t(t),G1t(t),NGt(t));return e.forEach(n=>n.configure(r)),Object.assign(t,l1t(r),b1t(r),H1t(r),TGt(r))},"resolveRuntimeExtensions"),up=class extends aUe{static{i(this,"ECRPUBLICClient")}config;constructor(...[e]){let r=RGt(e||{});super(r),this.initConfig=r;let n=fUt(r),s=u1t(n),o=Y1t(s),a=D1t(o),c=d1t(a),l=F1t(c),u=mUt(l),d=vGt(u,e?.extensions||[]);this.config=d,this.middlewareStack.use(j1t(this.config)),this.middlewareStack.use(p1t(this.config)),this.middlewareStack.use(J1t(this.config)),this.middlewareStack.use($1t(this.config)),this.middlewareStack.use(m1t(this.config)),this.middlewareStack.use(f1t(this.config)),this.middlewareStack.use(A1t(this.config)),this.middlewareStack.use(h1t(this.config,{httpAuthSchemeParametersProvider:uUt,identityProviderConfigProvider:i(async p=>new g1t({"aws.auth#sigv4":p.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(y1t(this.config))}destroy(){super.destroy()}},Kt=B1t(AUt,"SpencerFrontendService","ECRPUBLICClient",U1t),Xt={},Zt=i((t,e,r,n)=>[],"_mw0"),_O=class extends Kt(Xt,Zt,"BatchCheckLayerAvailability",iqe){static{i(this,"BatchCheckLayerAvailabilityCommand")}},DO=class extends Kt(Xt,Zt,"BatchDeleteImage",aqe){static{i(this,"BatchDeleteImageCommand")}},kO=class extends Kt(Xt,Zt,"CompleteLayerUpload",cqe){static{i(this,"CompleteLayerUploadCommand")}},LO=class extends Kt(Xt,Zt,"CreateRepository",lqe){static{i(this,"CreateRepositoryCommand")}},OO=class extends Kt(Xt,Zt,"DeleteRepository",uqe){static{i(this,"DeleteRepositoryCommand")}},MO=class extends Kt(Xt,Zt,"DeleteRepositoryPolicy",dqe){static{i(this,"DeleteRepositoryPolicyCommand")}},Bx=class extends Kt(Xt,Zt,"DescribeImages",pqe){static{i(this,"DescribeImagesCommand")}},Rx=class extends Kt(Xt,Zt,"DescribeImageTags",mqe){static{i(this,"DescribeImageTagsCommand")}},Nx=class extends Kt(Xt,Zt,"DescribeRegistries",fqe){static{i(this,"DescribeRegistriesCommand")}},Tx=class extends Kt(Xt,Zt,"DescribeRepositories",Aqe){static{i(this,"DescribeRepositoriesCommand")}},FO=class extends Kt(Xt,Zt,"GetAuthorizationToken",hqe){static{i(this,"GetAuthorizationTokenCommand")}},UO=class extends Kt(Xt,Zt,"GetRegistryCatalogData",gqe){static{i(this,"GetRegistryCatalogDataCommand")}},qO=class extends Kt(Xt,Zt,"GetRepositoryCatalogData",yqe){static{i(this,"GetRepositoryCatalogDataCommand")}},GO=class extends Kt(Xt,Zt,"GetRepositoryPolicy",Eqe){static{i(this,"GetRepositoryPolicyCommand")}},HO=class extends Kt(Xt,Zt,"InitiateLayerUpload",Cqe){static{i(this,"InitiateLayerUploadCommand")}},$O=class extends Kt(Xt,Zt,"ListTagsForResource",Iqe){static{i(this,"ListTagsForResourceCommand")}},zO=class extends Kt(Xt,Zt,"PutImage",wqe){static{i(this,"PutImageCommand")}},VO=class extends Kt(Xt,Zt,"PutRegistryCatalogData",Sqe){static{i(this,"PutRegistryCatalogDataCommand")}},WO=class extends Kt(Xt,Zt,"PutRepositoryCatalogData",xqe){static{i(this,"PutRepositoryCatalogDataCommand")}},YO=class extends Kt(Xt,Zt,"SetRepositoryPolicy",bqe){static{i(this,"SetRepositoryPolicyCommand")}},JO=class extends Kt(Xt,Zt,"TagResource",Bqe){static{i(this,"TagResourceCommand")}},jO=class extends Kt(Xt,Zt,"UntagResource",Rqe){static{i(this,"UntagResourceCommand")}},KO=class extends Kt(Xt,Zt,"UploadLayerPart",Nqe){static{i(this,"UploadLayerPartCommand")}},Tqe=ZO(up,Bx,"nextToken","nextToken","maxResults"),vqe=ZO(up,Rx,"nextToken","nextToken","maxResults"),Pqe=ZO(up,Nx,"nextToken","nextToken","maxResults"),Qqe=ZO(up,Tx,"nextToken","nextToken","maxResults"),PGt={BatchCheckLayerAvailabilityCommand:_O,BatchDeleteImageCommand:DO,CompleteLayerUploadCommand:kO,CreateRepositoryCommand:LO,DeleteRepositoryCommand:OO,DeleteRepositoryPolicyCommand:MO,DescribeImagesCommand:Bx,DescribeImageTagsCommand:Rx,DescribeRegistriesCommand:Nx,DescribeRepositoriesCommand:Tx,GetAuthorizationTokenCommand:FO,GetRegistryCatalogDataCommand:UO,GetRepositoryCatalogDataCommand:qO,GetRepositoryPolicyCommand:GO,InitiateLayerUploadCommand:HO,ListTagsForResourceCommand:$O,PutImageCommand:zO,PutRegistryCatalogDataCommand:VO,PutRepositoryCatalogDataCommand:WO,SetRepositoryPolicyCommand:YO,TagResourceCommand:JO,UntagResourceCommand:jO,UploadLayerPartCommand:KO},QGt={paginateDescribeImages:Tqe,paginateDescribeImageTags:vqe,paginateDescribeRegistries:Pqe,paginateDescribeRepositories:Qqe},XO=class extends up{static{i(this,"ECRPUBLIC")}};R1t(PGt,XO,{paginators:QGt});var _Gt={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"},DGt={AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"},kGt={ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag"},LGt={ACTIVE:"ACTIVE",PENDING:"PENDING",REJECTED:"REJECTED"};B.AuthorizationData$=n2e;B.BatchCheckLayerAvailability$=iqe;B.BatchCheckLayerAvailabilityCommand=_O;B.BatchCheckLayerAvailabilityRequest$=s2e;B.BatchCheckLayerAvailabilityResponse$=o2e;B.BatchDeleteImage$=aqe;B.BatchDeleteImageCommand=DO;B.BatchDeleteImageRequest$=i2e;B.BatchDeleteImageResponse$=a2e;B.CompleteLayerUpload$=cqe;B.CompleteLayerUploadCommand=kO;B.CompleteLayerUploadRequest$=c2e;B.CompleteLayerUploadResponse$=l2e;B.CreateRepository$=lqe;B.CreateRepositoryCommand=LO;B.CreateRepositoryRequest$=u2e;B.CreateRepositoryResponse$=d2e;B.DeleteRepository$=uqe;B.DeleteRepositoryCommand=OO;B.DeleteRepositoryPolicy$=dqe;B.DeleteRepositoryPolicyCommand=MO;B.DeleteRepositoryPolicyRequest$=p2e;B.DeleteRepositoryPolicyResponse$=m2e;B.DeleteRepositoryRequest$=f2e;B.DeleteRepositoryResponse$=A2e;B.DescribeImageTags$=mqe;B.DescribeImageTagsCommand=Rx;B.DescribeImageTagsRequest$=y2e;B.DescribeImageTagsResponse$=E2e;B.DescribeImages$=pqe;B.DescribeImagesCommand=Bx;B.DescribeImagesRequest$=h2e;B.DescribeImagesResponse$=g2e;B.DescribeRegistries$=fqe;B.DescribeRegistriesCommand=Nx;B.DescribeRegistriesRequest$=C2e;B.DescribeRegistriesResponse$=I2e;B.DescribeRepositories$=Aqe;B.DescribeRepositoriesCommand=Tx;B.DescribeRepositoriesRequest$=w2e;B.DescribeRepositoriesResponse$=S2e;B.ECRPUBLIC=XO;B.ECRPUBLICClient=up;B.ECRPUBLICServiceException=gt;B.ECRPUBLICServiceException$=PUe;B.EmptyUploadException=fO;B.EmptyUploadException$=QUe;B.GetAuthorizationToken$=hqe;B.GetAuthorizationTokenCommand=FO;B.GetAuthorizationTokenRequest$=x2e;B.GetAuthorizationTokenResponse$=b2e;B.GetRegistryCatalogData$=gqe;B.GetRegistryCatalogDataCommand=UO;B.GetRegistryCatalogDataRequest$=B2e;B.GetRegistryCatalogDataResponse$=R2e;B.GetRepositoryCatalogData$=yqe;B.GetRepositoryCatalogDataCommand=qO;B.GetRepositoryCatalogDataRequest$=N2e;B.GetRepositoryCatalogDataResponse$=T2e;B.GetRepositoryPolicy$=Eqe;B.GetRepositoryPolicyCommand=GO;B.GetRepositoryPolicyRequest$=v2e;B.GetRepositoryPolicyResponse$=P2e;B.Image$=Q2e;B.ImageAlreadyExistsException=RO;B.ImageAlreadyExistsException$=_Ue;B.ImageDetail$=_2e;B.ImageDigestDoesNotMatchException=NO;B.ImageDigestDoesNotMatchException$=DUe;B.ImageFailure$=D2e;B.ImageFailureCode=kGt;B.ImageIdentifier$=sM;B.ImageNotFoundException=bO;B.ImageNotFoundException$=kUe;B.ImageTagAlreadyExistsException=TO;B.ImageTagAlreadyExistsException$=LUe;B.ImageTagDetail$=k2e;B.InitiateLayerUpload$=Cqe;B.InitiateLayerUploadCommand=HO;B.InitiateLayerUploadRequest$=L2e;B.InitiateLayerUploadResponse$=O2e;B.InvalidLayerException=AO;B.InvalidLayerException$=OUe;B.InvalidLayerPartException=vO;B.InvalidLayerPartException$=MUe;B.InvalidParameterException=lO;B.InvalidParameterException$=FUe;B.InvalidTagParameterException=EO;B.InvalidTagParameterException$=UUe;B.Layer$=M2e;B.LayerAlreadyExistsException=hO;B.LayerAlreadyExistsException$=qUe;B.LayerAvailability=DGt;B.LayerFailure$=F2e;B.LayerFailureCode=_Gt;B.LayerPartTooSmallException=gO;B.LayerPartTooSmallException$=GUe;B.LayersNotFoundException=PO;B.LayersNotFoundException$=HUe;B.LimitExceededException=CO;B.LimitExceededException$=$Ue;B.ListTagsForResource$=Iqe;B.ListTagsForResourceCommand=$O;B.ListTagsForResourceRequest$=U2e;B.ListTagsForResourceResponse$=q2e;B.PutImage$=wqe;B.PutImageCommand=zO;B.PutImageRequest$=G2e;B.PutImageResponse$=H2e;B.PutRegistryCatalogData$=Sqe;B.PutRegistryCatalogDataCommand=VO;B.PutRegistryCatalogDataRequest$=$2e;B.PutRegistryCatalogDataResponse$=z2e;B.PutRepositoryCatalogData$=xqe;B.PutRepositoryCatalogDataCommand=WO;B.PutRepositoryCatalogDataRequest$=V2e;B.PutRepositoryCatalogDataResponse$=W2e;B.ReferencedImageDetail$=Y2e;B.ReferencedImagesNotFoundException=QO;B.ReferencedImagesNotFoundException$=zUe;B.Registry$=J2e;B.RegistryAlias$=j2e;B.RegistryAliasStatus=LGt;B.RegistryCatalogData$=M9;B.RegistryNotFoundException=uO;B.RegistryNotFoundException$=VUe;B.Repository$=oM;B.RepositoryAlreadyExistsException=IO;B.RepositoryAlreadyExistsException$=WUe;B.RepositoryCatalogData$=iM;B.RepositoryCatalogDataInput$=F9;B.RepositoryCatalogDataNotFoundException=BO;B.RepositoryCatalogDataNotFoundException$=YUe;B.RepositoryNotEmptyException=SO;B.RepositoryNotEmptyException$=JUe;B.RepositoryNotFoundException=dO;B.RepositoryNotFoundException$=jUe;B.RepositoryPolicyNotFoundException=xO;B.RepositoryPolicyNotFoundException$=KUe;B.ServerException=pO;B.ServerException$=XUe;B.SetRepositoryPolicy$=bqe;B.SetRepositoryPolicyCommand=YO;B.SetRepositoryPolicyRequest$=K2e;B.SetRepositoryPolicyResponse$=X2e;B.Tag$=Z2e;B.TagResource$=Bqe;B.TagResourceCommand=JO;B.TagResourceRequest$=eqe;B.TagResourceResponse$=tqe;B.TooManyTagsException=wO;B.TooManyTagsException$=ZUe;B.UnsupportedCommandException=mO;B.UnsupportedCommandException$=e2e;B.UntagResource$=Rqe;B.UntagResourceCommand=jO;B.UntagResourceRequest$=rqe;B.UntagResourceResponse$=nqe;B.UploadLayerPart$=Nqe;B.UploadLayerPartCommand=KO;B.UploadLayerPartRequest$=sqe;B.UploadLayerPartResponse$=oqe;B.UploadNotFoundException=yO;B.UploadNotFoundException$=t2e;B.errorTypeRegistries=r2e;B.paginateDescribeImageTags=vqe;B.paginateDescribeImages=Tqe;B.paginateDescribeRegistries=Pqe;B.paginateDescribeRepositories=Qqe});var rHt={};Dr(rHt,{main:()=>dGe});module.exports=ee(rHt);var X9=R(require("os"),1);function gu(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i(gu,"toCommandValue");function mM(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}i(mM,"toCommandProperties");function mp(t,e,r){let n=new fM(t,e,r);process.stdout.write(n.toString()+X9.EOL)}i(mp,"issueCommand");function AM(t,e=""){mp(t,{},e)}i(AM,"issue");var K9="::",fM=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=K9+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${yGe(s)}`)}}return e+=`${K9}${gGe(this.message)}`,e}};function gGe(t){return gu(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(gGe,"escapeData");function yGe(t){return gu(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(yGe,"escapeProperty");var Z9=R(require("crypto"),1),Lx=R(require("fs"),1),kx=R(require("os"),1);function eK(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!Lx.existsSync(r))throw new Error(`Missing file at path: ${r}`);Lx.appendFileSync(r,`${gu(e)}${kx.EOL}`,{encoding:"utf8"})}i(eK,"issueFileCommand");function tK(t,e){let r=`ghadelimiter_${Z9.randomUUID()}`,n=gu(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${kx.EOL}${n}${kx.EOL}${r}`}i(tK,"prepareKeyValueMessage");var toe=R(require("os"),1);var OE=R(require("http"),1),$U=R(require("https"),1);function hM(t){let e=t.protocol==="https:";if(EGe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Ox(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Ox(`http://${r}`)}else return}i(hM,"getProxyUrl");function EGe(t){if(!t.hostname)return!1;let e=t.hostname;if(CGe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let o of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(o==="*"||s.some(a=>a===o||a.endsWith(`.${o}`)||o.startsWith(".")&&a.endsWith(`${o}`)))return!0;return!1}i(EGe,"checkBypass");function CGe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(CGe,"isLoopbackAddress");var Ox=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var Lu=R(Of(),1),_se=R(Up(),1);var fr=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},Lo;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(Lo||(Lo={}));var Gn;(function(t){t.Accept="accept",t.ContentType="content-type"})(Gn||(Gn={}));var bl;(function(t){t.ApplicationJson="application/json"})(bl||(bl={}));var D6e=[Lo.MovedPermanently,Lo.ResourceMoved,Lo.SeeOther,Lo.TemporaryRedirect,Lo.PermanentRedirect],k6e=[Lo.BadGateway,Lo.ServiceUnavailable,Lo.GatewayTimeout],L6e=["OPTIONS","GET","DELETE","HEAD"],O6e=10,M6e=5,GU=class t extends Error{static{i(this,"HttpClientError")}constructor(e,r){super(e),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,t.prototype)}},HU=class{static{i(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return fr(this,void 0,void 0,function*(){return new Promise(e=>fr(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return fr(this,void 0,void 0,function*(){return new Promise(e=>fr(this,void 0,void 0,function*(){let r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};var Q0=class{static{i(this,"HttpClient")}constructor(e,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,r){return fr(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return fr(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return fr(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{})})}post(e,r,n){return fr(this,void 0,void 0,function*(){return this.request("POST",e,r,n||{})})}patch(e,r,n){return fr(this,void 0,void 0,function*(){return this.request("PATCH",e,r,n||{})})}put(e,r,n){return fr(this,void 0,void 0,function*(){return this.request("PUT",e,r,n||{})})}head(e,r){return fr(this,void 0,void 0,function*(){return this.request("HEAD",e,null,r||{})})}sendStream(e,r,n,s){return fr(this,void 0,void 0,function*(){return this.request(e,r,n,s)})}getJson(e){return fr(this,arguments,void 0,function*(r,n={}){n[Gn.Accept]=this._getExistingOrDefaultHeader(n,Gn.Accept,bl.ApplicationJson);let s=yield this.get(r,n);return this._processResponse(s,this.requestOptions)})}postJson(e,r){return fr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Gn.Accept]=this._getExistingOrDefaultHeader(o,Gn.Accept,bl.ApplicationJson),o[Gn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,bl.ApplicationJson);let c=yield this.post(n,a,o);return this._processResponse(c,this.requestOptions)})}putJson(e,r){return fr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Gn.Accept]=this._getExistingOrDefaultHeader(o,Gn.Accept,bl.ApplicationJson),o[Gn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,bl.ApplicationJson);let c=yield this.put(n,a,o);return this._processResponse(c,this.requestOptions)})}patchJson(e,r){return fr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Gn.Accept]=this._getExistingOrDefaultHeader(o,Gn.Accept,bl.ApplicationJson),o[Gn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,bl.ApplicationJson);let c=yield this.patch(n,a,o);return this._processResponse(c,this.requestOptions)})}request(e,r,n,s){return fr(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let o=new URL(r),a=this._prepareRequest(e,o,s),c=this._allowRetries&&L6e.includes(e)?this._maxRetries+1:1,l=0,u;do{if(u=yield this.requestRaw(a,n),u&&u.message&&u.message.statusCode===Lo.Unauthorized){let p;for(let m of this.handlers)if(m.canHandleAuthentication(u)){p=m;break}return p?p.handleAuthentication(this,a,n):u}let d=this._maxRedirects;for(;u.message.statusCode&&D6e.includes(u.message.statusCode)&&this._allowRedirects&&d>0;){let p=u.message.headers.location;if(!p)break;let m=new URL(p);if(o.protocol==="https:"&&o.protocol!==m.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield u.readBody(),m.hostname!==o.hostname)for(let f in s)f.toLowerCase()==="authorization"&&delete s[f];a=this._prepareRequest(e,m,s),u=yield this.requestRaw(a,n),d--}if(!u.message.statusCode||!k6e.includes(u.message.statusCode))return u;l+=1,l{function o(a,c){a?s(a):c?n(c):s(new Error("Unknown error"))}i(o,"callbackForResult"),this.requestRawWithCallback(e,r,o)})})}requestRawWithCallback(e,r,n){typeof r=="string"&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let s=!1;function o(l,u){s||(s=!0,n(l,u))}i(o,"handleResult");let a=e.httpModule.request(e.options,l=>{let u=new HU(l);o(void 0,u)}),c;a.on("socket",l=>{c=l}),a.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),o(new Error(`Request timeout: ${e.options.path}`))}),a.on("error",function(l){o(l)}),r&&typeof r=="string"&&a.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){a.end()}),r.pipe(a)):a.end()}getAgent(e){let r=new URL(e);return this._getAgent(r)}getAgentDispatcher(e){let r=new URL(e),n=hM(r);if(n&&n.hostname)return this._getProxyAgentDispatcher(r,n)}_prepareRequest(e,r,n){let s={};s.parsedUrl=r;let o=s.parsedUrl.protocol==="https:";s.httpModule=o?$U:OE;let a=o?443:80;if(s.options={},s.options.host=s.parsedUrl.hostname,s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a,s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||""),s.options.method=e,s.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(s.options.headers["user-agent"]=this.userAgent),s.options.agent=this._getAgent(s.parsedUrl),this.handlers)for(let c of this.handlers)c.prepareRequest(s.options);return s}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},LE(this.requestOptions.headers),LE(e||{})):LE(e||{})}_getExistingOrDefaultHeader(e,r,n){let s;if(this.requestOptions&&this.requestOptions.headers){let a=LE(this.requestOptions.headers)[r];a&&(s=typeof a=="number"?a.toString():a)}let o=e[r];return o!==void 0?typeof o=="number"?o.toString():o:s!==void 0?s:n}_getExistingOrDefaultContentTypeHeader(e,r){let n;if(this.requestOptions&&this.requestOptions.headers){let o=LE(this.requestOptions.headers)[Gn.ContentType];o&&(typeof o=="number"?n=String(o):Array.isArray(o)?n=o.join(", "):n=o)}let s=e[Gn.ContentType];return s!==void 0?typeof s=="number"?String(s):Array.isArray(s)?s.join(", "):s:n!==void 0?n:r}_getAgent(e){let r,n=hM(e),s=n&&n.hostname;if(this._keepAlive&&s&&(r=this._proxyAgent),s||(r=this._agent),r)return r;let o=e.protocol==="https:",a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||OE.globalAgent.maxSockets),n&&n.hostname){let c={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},l,u=n.protocol==="https:";o?l=u?Lu.httpsOverHttps:Lu.httpsOverHttp:l=u?Lu.httpOverHttps:Lu.httpOverHttp,r=l(c),this._proxyAgent=r}if(!r){let c={keepAlive:this._keepAlive,maxSockets:a};r=o?new $U.Agent(c):new OE.Agent(c),this._agent=r}return o&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_getProxyAgentDispatcher(e,r){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let s=e.protocol==="https:";return n=new _se.ProxyAgent(Object.assign({uri:r.href,pipelining:this._keepAlive?1:0},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`})),this._proxyAgentDispatcher=n,s&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let r=e||"actions/http-client",n=process.env.ACTIONS_ORCHESTRATION_ID;if(n){let s=n.replace(/[^a-z0-9_.-]/gi,"_");return`${r} actions_orchestration_id/${s}`}return r}_performExponentialBackoff(e){return fr(this,void 0,void 0,function*(){e=Math.min(O6e,e);let r=M6e*Math.pow(2,e);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(e,r){return fr(this,void 0,void 0,function*(){return new Promise((n,s)=>fr(this,void 0,void 0,function*(){let o=e.message.statusCode||0,a={statusCode:o,result:null,headers:{}};o===Lo.NotFound&&n(a);function c(d,p){if(typeof p=="string"){let m=new Date(p);if(!isNaN(m.valueOf()))return m}return p}i(c,"dateTimeDeserializer");let l,u;try{u=yield e.readBody(),u&&u.length>0&&(r&&r.deserializeDates?l=JSON.parse(u,c):l=JSON.parse(u),a.result=l),a.headers=e.message.headers}catch{}if(o>299){let d;l&&l.message?d=l.message:u&&u.length>0?d=u:d=`Failed request: (${o})`;let p=new GU(d,o);p.result=a.result,s(p)}else n(a)}))})}},LE=i(t=>Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}),"lowercaseKeys");var F6e=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};var _0=class{static{i(this,"BearerCredentialHandler")}constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return F6e(this,void 0,void 0,function*(){throw new Error("not implemented")})}};var Dse=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},D0=class t{static{i(this,"OidcClient")}static createHttpClient(e=!0,r=10){let n={allowRetries:e,maxRetries:r};return new Q0("actions/oidc-client",[new _0(t.getRequestToken())],n)}static getRequestToken(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return e}static getIDTokenUrl(){let e=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!e)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return e}static getCall(e){return Dse(this,void 0,void 0,function*(){var r;let o=(r=(yield t.createHttpClient().getJson(e).catch(a=>{throw new Error(`Failed to get ID Token. Error Code : ${a.statusCode} - Error Message: ${a.message}`)})).result)===null||r===void 0?void 0:r.value;if(!o)throw new Error("Response json body do not have ID Token field");return o})}static getIDToken(e){return Dse(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let s=encodeURIComponent(e);r=`${r}&audience=${s}`}v(`ID token url is ${r}`);let n=yield t.getCall(r);return xn(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};var Lse=require("os"),ME=require("fs");var zU=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:U6e,appendFile:q6e,writeFile:G6e}=ME.promises,kse="GITHUB_STEP_SUMMARY";var VU=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return zU(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[kse];if(!e)throw new Error(`Unable to find environment variable for $${kse}. Check if your runtime environment supports job summaries.`);try{yield U6e(e,ME.constants.R_OK|ME.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}`:`<${e}${s}>`}write(e){return zU(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?G6e:q6e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return zU(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(Lse.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),o=this.wrap(n,s);return this.addRaw(o).addEOL()}addTable(e){let r=e.map(s=>{let o=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,p=c?"th":"td",m=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(p,l,m)}).join("");return this.wrap("tr",o)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:o}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",o=this.wrap(s,e);return this.addRaw(o).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},Y3t=new VU;var r2=R(require("os"),1);var t2=require("string_decoder");var UE=R(require("os"),1),e2=R(require("events"),1),Jse=R(require("child_process"),1),jse=R(require("path"),1);var $se=require("assert"),to=R(require("path"),1);var FE=R(require("fs"),1),Ou=R(require("path"),1);var WU=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{chmod:YU,copyFile:Mse,lstat:k0,mkdir:Fse,open:Z3t,readdir:JU,rename:H6e,rm:Use,rmdir:eVt,stat:qp,symlink:qse,unlink:jU}=FE.promises,_a=process.platform==="win32";function Gse(t){return WU(this,void 0,void 0,function*(){let e=yield FE.promises.readlink(t);return _a&&!e.endsWith("\\")?`${e}\\`:e})}i(Gse,"readlink");var tVt=FE.constants.O_RDONLY;function _A(t){return WU(this,void 0,void 0,function*(){try{yield qp(t)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}i(_A,"exists");function L0(t){if(t=$6e(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return _a?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}i(L0,"isRooted");function KU(t,e){return WU(this,void 0,void 0,function*(){let r;try{r=yield qp(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(r&&r.isFile()){if(_a){let s=Ou.extname(t).toUpperCase();if(e.some(o=>o.toUpperCase()===s))return t}else if(Ose(r))return t}let n=t;for(let s of e){t=n+s,r=void 0;try{r=yield qp(t)}catch(o){o.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${o}`)}if(r&&r.isFile()){if(_a){try{let o=Ou.dirname(t),a=Ou.basename(t).toUpperCase();for(let c of yield JU(o))if(a===c.toUpperCase()){t=Ou.join(o,c);break}}catch(o){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${o}`)}return t}else if(Ose(r))return t}}return""})}i(KU,"tryGetExecutablePath");function $6e(t){return t=t||"",_a?(t=t.replace(/\//g,"\\"),t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}i($6e,"normalizeSeparators");function Ose(t){return(t.mode&1)>0||(t.mode&8)>0&&process.getgid!==void 0&&t.gid===process.getgid()||(t.mode&64)>0&&process.getuid!==void 0&&t.uid===process.getuid()}i(Ose,"isUnixExecutable");var Gp=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function zse(t,e){return Gp(this,arguments,void 0,function*(r,n,s={}){let{force:o,recursive:a,copySourceDirectory:c}=V6e(s),l=(yield _A(n))?yield qp(n):null;if(l&&l.isFile()&&!o)return;let u=l&&l.isDirectory()&&c?to.join(n,to.basename(r)):n;if(!(yield _A(r)))throw new Error(`no such file or directory: ${r}`);if((yield qp(r)).isDirectory())if(a)yield Vse(r,u,0,o);else throw new Error(`Failed to copy. ${r} is a directory, but tried to copy without recursive flag.`);else{if(to.relative(r,u)==="")throw new Error(`'${u}' and '${r}' are the same file`);yield Wse(r,u,o)}})}i(zse,"cp");function XU(t){return Gp(this,void 0,void 0,function*(){if(_a&&/[*"<>|]/.test(t))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Use(t,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}})}i(XU,"rmRF");function Hp(t){return Gp(this,void 0,void 0,function*(){(0,$se.ok)(t,"a path argument must be provided"),yield Fse(t,{recursive:!0})})}i(Hp,"mkdirP");function Es(t,e){return Gp(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");if(e){let n=yield Es(t,!1);if(!n)throw _a?new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return n}let r=yield z6e(t);return r&&r.length>0?r[0]:""})}i(Es,"which");function z6e(t){return Gp(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");let e=[];if(_a&&process.env.PATHEXT)for(let s of process.env.PATHEXT.split(to.delimiter))s&&e.push(s);if(L0(t)){let s=yield KU(t,e);return s?[s]:[]}if(t.includes(to.sep))return[];let r=[];if(process.env.PATH)for(let s of process.env.PATH.split(to.delimiter))s&&r.push(s);let n=[];for(let s of r){let o=yield KU(to.join(s,t),e);o&&n.push(o)}return n})}i(z6e,"findInPath");function V6e(t){let e=t.force==null?!0:t.force,r=!!t.recursive,n=t.copySourceDirectory==null?!0:!!t.copySourceDirectory;return{force:e,recursive:r,copySourceDirectory:n}}i(V6e,"readCopyOptions");function Vse(t,e,r,n){return Gp(this,void 0,void 0,function*(){if(r>=255)return;r++,yield Hp(e);let s=yield JU(t);for(let o of s){let a=`${t}/${o}`,c=`${e}/${o}`;(yield k0(a)).isDirectory()?yield Vse(a,c,r,n):yield Wse(a,c,n)}yield YU(e,(yield qp(t)).mode)})}i(Vse,"cpDirRecursive");function Wse(t,e,r){return Gp(this,void 0,void 0,function*(){if((yield k0(t)).isSymbolicLink()){try{yield k0(e),yield jU(e)}catch(s){s.code==="EPERM"&&(yield YU(e,"0666"),yield jU(e))}let n=yield Gse(t);yield qse(n,e,_a?"junction":null)}else(!(yield _A(e))||r)&&(yield Mse(t,e))})}i(Wse,"copyFile");var Kse=require("timers");var Yse=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},O0=process.platform==="win32",M0=class extends e2.EventEmitter{static{i(this,"ToolRunner")}constructor(e,r,n){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=r||[],this.options=n||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,r){let n=this._getSpawnFileName(),s=this._getSpawnArgs(e),o=r?"":"[command]";if(O0)if(this._isCmdFile()){o+=n;for(let a of s)o+=` ${a}`}else if(e.windowsVerbatimArguments){o+=`"${n}"`;for(let a of s)o+=` ${a}`}else{o+=this._windowsQuoteCmdArg(n);for(let a of s)o+=` ${this._windowsQuoteCmdArg(a)}`}else{o+=n;for(let a of s)o+=` ${a}`}return o}_processLineBuffer(e,r,n){try{let s=r+e.toString(),o=s.indexOf(UE.EOL);for(;o>-1;){let a=s.substring(0,o);n(a),s=s.substring(o+UE.EOL.length),o=s.indexOf(UE.EOL)}return s}catch(s){return this._debug(`error processing line. Failed with error ${s}`),""}}_getSpawnFileName(){return O0&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(O0&&this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let n of this.args)r+=" ",r+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return r+='"',[r]}return this.args}_endsWith(e,r){return e.endsWith(r)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let r=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],n=!1;for(let a of e)if(r.some(c=>c===a)){n=!0;break}if(!n)return e;let s='"',o=!0;for(let a=e.length;a>0;a--)s+=e[a-1],o&&e[a-1]==="\\"?s+="\\":e[a-1]==='"'?(o=!0,s+='"'):o=!1;return s+='"',s.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let r='"',n=!0;for(let s=e.length;s>0;s--)r+=e[s-1],n&&e[s-1]==="\\"?r+="\\":e[s-1]==='"'?(n=!0,r+="\\"):n=!1;return r+='"',r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let r={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return r.outStream=e.outStream||process.stdout,r.errStream=e.errStream||process.stderr,r}_getSpawnOptions(e,r){e=e||{};let n={};return n.cwd=e.cwd,n.env=e.env,n.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(n.argv0=`"${r}"`),n}exec(){return Yse(this,void 0,void 0,function*(){return!L0(this.toolPath)&&(this.toolPath.includes("/")||O0&&this.toolPath.includes("\\"))&&(this.toolPath=jse.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield Es(this.toolPath,!0),new Promise((e,r)=>Yse(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let u of this.args)this._debug(` ${u}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+UE.EOL);let s=new ZU(n,this.toolPath);if(s.on("debug",u=>{this._debug(u)}),this.options.cwd&&!(yield _A(this.options.cwd)))return r(new Error(`The cwd: ${this.options.cwd} does not exist!`));let o=this._getSpawnFileName(),a=Jse.spawn(o,this._getSpawnArgs(n),this._getSpawnOptions(this.options,o)),c="";a.stdout&&a.stdout.on("data",u=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(u),!n.silent&&n.outStream&&n.outStream.write(u),c=this._processLineBuffer(u,c,d=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(d)})});let l="";if(a.stderr&&a.stderr.on("data",u=>{s.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(u),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(u),l=this._processLineBuffer(u,l,d=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(d)})}),a.on("error",u=>{s.processError=u.message,s.processExited=!0,s.processClosed=!0,s.CheckComplete()}),a.on("exit",u=>{s.processExitCode=u,s.processExited=!0,this._debug(`Exit code ${u} received from tool '${this.toolPath}'`),s.CheckComplete()}),a.on("close",u=>{s.processExitCode=u,s.processExited=!0,s.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),s.CheckComplete()}),s.on("done",(u,d)=>{c.length>0&&this.emit("stdline",c),l.length>0&&this.emit("errline",l),a.removeAllListeners(),u?r(u):e(d)}),this.options.input){if(!a.stdin)throw new Error("child process missing stdin");a.stdin.end(this.options.input)}}))})}};function Xse(t){let e=[],r=!1,n=!1,s="";function o(a){n&&a!=='"'&&(s+="\\"),s+=a,n=!1}i(o,"append");for(let a=0;a0&&(e.push(s),s="");continue}o(c)}return s.length>0&&e.push(s.trim()),e}i(Xse,"argStringToArray");var ZU=class t extends e2.EventEmitter{static{i(this,"ExecState")}constructor(e,r){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!r)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=r,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=(0,Kse.setTimeout)(t.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let r=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(r)}e._setResult()}}};var Zse=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function Mu(t,e,r){return Zse(this,void 0,void 0,function*(){let n=Xse(t);if(n.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let s=n[0];return e=n.slice(1).concat(e||[]),new M0(s,e,r).exec()})}i(Mu,"exec");function qE(t,e,r){return Zse(this,void 0,void 0,function*(){var n,s;let o="",a="",c=new t2.StringDecoder("utf8"),l=new t2.StringDecoder("utf8"),u=(n=r?.listeners)===null||n===void 0?void 0:n.stdout,d=(s=r?.listeners)===null||s===void 0?void 0:s.stderr,p=i(h=>{a+=l.write(h),d&&d(h)},"stdErrListener"),m=i(h=>{o+=c.write(h),u&&u(h)},"stdOutListener"),f=Object.assign(Object.assign({},r?.listeners),{stdout:m,stderr:p}),A=yield Mu(t,e,Object.assign(Object.assign({},r),{listeners:f}));return o+=c.end(),a+=l.end(),{exitCode:A,stdout:o,stderr:a}})}i(qE,"getExecOutput");var aVt=r2.default.platform(),cVt=r2.default.arch();var eoe=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},n2;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(n2||(n2={}));function xn(t){mp("add-mask",{},t)}i(xn,"setSecret");function _i(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}i(_i,"getInput");function roe(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],s=_i(t,e);if(r.includes(s))return!0;if(n.includes(s))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}i(roe,"getBooleanInput");function noe(t){process.exitCode=n2.Failure,kA(t)}i(noe,"setFailed");function $p(){return process.env.RUNNER_DEBUG==="1"}i($p,"isDebug");function v(t){mp("debug",{},t)}i(v,"debug");function kA(t,e={}){mp("error",mM(e),t instanceof Error?t.toString():t)}i(kA,"error");function Ar(t,e={}){mp("warning",mM(e),t instanceof Error?t.toString():t)}i(Ar,"warning");function be(t){process.stdout.write(t+toe.EOL)}i(be,"info");function J6e(t){AM("group",t)}i(J6e,"startGroup");function j6e(){AM("endgroup")}i(j6e,"endGroup");function HE(t,e){return eoe(this,void 0,void 0,function*(){J6e(t);let r;try{r=yield e()}finally{j6e()}return r})}i(HE,"group");function zp(t,e){if(process.env.GITHUB_STATE||"")return eK("STATE",tK(t,e));mp("save-state",{name:t},gu(e))}i(zp,"saveState");function soe(t){return process.env[`STATE_${t}`]||""}i(soe,"getState");function ooe(t){return eoe(this,void 0,void 0,function*(){return yield D0.getIDToken(t)})}i(ooe,"getIDToken");var $T=R(require("fs"),1),i4=R(require("os"),1),a4=R(require("path"),1);var aoe=R(require("os"),1);function $E(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i($E,"toCommandValue");function coe(t,e,r){let n=new s2(t,e,r);process.stdout.write(n.toString()+aoe.EOL)}i(coe,"issueCommand");var ioe="::",s2=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=ioe+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${X6e(s)}`)}}return e+=`${ioe}${K6e(this.message)}`,e}};function K6e(t){return $E(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(K6e,"escapeData");function X6e(t){return $E(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(X6e,"escapeProperty");var F0=R(Of(),1),e9e=R(Up(),1);var Da;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(Da||(Da={}));var loe;(function(t){t.Accept="accept",t.ContentType="content-type"})(loe||(loe={}));var uoe;(function(t){t.ApplicationJson="application/json"})(uoe||(uoe={}));var _Vt=[Da.MovedPermanently,Da.ResourceMoved,Da.SeeOther,Da.TemporaryRedirect,Da.PermanentRedirect],DVt=[Da.BadGateway,Da.ServiceUnavailable,Da.GatewayTimeout];var poe=require("os"),zE=require("fs");var o2=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:n9e,appendFile:s9e,writeFile:o9e}=zE.promises,doe="GITHUB_STEP_SUMMARY";var i2=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return o2(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[doe];if(!e)throw new Error(`Unable to find environment variable for $${doe}. Check if your runtime environment supports job summaries.`);try{yield n9e(e,zE.constants.R_OK|zE.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}`:`<${e}${s}>`}write(e){return o2(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?o9e:s9e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return o2(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(poe.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),o=this.wrap(n,s);return this.addRaw(o).addEOL()}addTable(e){let r=e.map(s=>{let o=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,p=c?"th":"td",m=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(p,l,m)}).join("");return this.wrap("tr",o)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:o}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",o=this.wrap(s,e);return this.addRaw(o).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},zVt=new i2;var a2=R(require("os"),1);var jVt=a2.default.platform(),KVt=a2.default.arch();var moe;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(moe||(moe={}));function Hn(t){coe("debug",{},t)}i(Hn,"debug");var Cs=R(require("fs"),1);var r7e=R(R2(),1);var X0=R(require("os"),1),Fu=R(require("path"),1);var Fo=R(R2(),1);var sae=require("assert");var nae=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};var sYt=process.platform==="win32",oYt=process.platform==="darwin";function N2(t,e,r,n){return nae(this,void 0,void 0,function*(){if(r=Fo.clean(r)||r,n=n||X0.arch(),Hn(`Caching tool ${e} ${r} ${n}`),Hn(`source dir: ${t}`),!Cs.statSync(t).isDirectory())throw new Error("sourceDir is not a directory");let s=yield o7e(e,r,n);for(let o of Cs.readdirSync(t)){let a=Fu.join(t,o);yield zse(a,s,{recursive:!0})}return i7e(e,r,n),s})}i(N2,"cacheDir");function oae(t,e,r){if(!t)throw new Error("toolName parameter is required");if(!e)throw new Error("versionSpec parameter is required");if(r=r||X0.arch(),!iae(e)){let s=s7e(t,r);e=a7e(s,e)}let n="";if(e){e=Fo.clean(e)||"";let s=Fu.join(Z0(),t,e,r);Hn(`checking cache: ${s}`),Cs.existsSync(s)&&Cs.existsSync(`${s}.complete`)?(Hn(`Found tool in cache ${t} ${e} ${r}`),n=s):Hn("not found")}return n}i(oae,"find");function s7e(t,e){let r=[];e=e||X0.arch();let n=Fu.join(Z0(),t);if(Cs.existsSync(n)){let s=Cs.readdirSync(n);for(let o of s)if(iae(o)){let a=Fu.join(n,o,e||"");Cs.existsSync(a)&&Cs.existsSync(`${a}.complete`)&&r.push(o)}}return r}i(s7e,"findAllVersions");function o7e(t,e,r){return nae(this,void 0,void 0,function*(){let n=Fu.join(Z0(),t,Fo.clean(e)||e,r||"");Hn(`destination ${n}`);let s=`${n}.complete`;return yield XU(n),yield XU(s),yield Hp(n),n})}i(o7e,"_createToolPath");function i7e(t,e,r){let s=`${Fu.join(Z0(),t,Fo.clean(e)||e,r||"")}.complete`;Cs.writeFileSync(s,""),Hn("finished caching tool")}i(i7e,"_completeToolPath");function iae(t){let e=Fo.clean(t)||"";Hn(`isExplicit: ${e}`);let r=Fo.valid(e)!=null;return Hn(`explicit? ${r}`),r}i(iae,"isExplicitVersion");function a7e(t,e){let r="";Hn(`evaluating ${t.length} versions`),t=t.sort((n,s)=>Fo.gt(n,s)?1:-1);for(let n=t.length-1;n>=0;n--){let s=t[n];if(Fo.satisfies(s,e)){r=s;break}}return r?Hn(`matched: ${r}`):Hn("match not found"),r}i(a7e,"evaluateVersions");function Z0(){let t=process.env.RUNNER_TOOL_CACHE||"";return(0,sae.ok)(t,"Expected RUNNER_TOOL_CACHE to be defined"),t}i(Z0,"_getCacheDirectory");var DI=R(require("path"),1);var cae=R(require("os"),1);function ZE(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i(ZE,"toCommandValue");function lae(t,e,r){let n=new T2(t,e,r);process.stdout.write(n.toString()+cae.EOL)}i(lae,"issueCommand");var aae="::",T2=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=aae+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${u7e(s)}`)}}return e+=`${aae}${l7e(this.message)}`,e}};function l7e(t){return ZE(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(l7e,"escapeData");function u7e(t){return ZE(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(u7e,"escapeProperty");var eB=R(Of(),1),p7e=R(Up(),1);var La;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(La||(La={}));var uae;(function(t){t.Accept="accept",t.ContentType="content-type"})(uae||(uae={}));var dae;(function(t){t.ApplicationJson="application/json"})(dae||(dae={}));var gYt=[La.MovedPermanently,La.ResourceMoved,La.SeeOther,La.TemporaryRedirect,La.PermanentRedirect],yYt=[La.BadGateway,La.ServiceUnavailable,La.GatewayTimeout];var mae=require("os"),eC=require("fs");var v2=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:m7e,appendFile:f7e,writeFile:A7e}=eC.promises,pae="GITHUB_STEP_SUMMARY";var P2=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return v2(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[pae];if(!e)throw new Error(`Unable to find environment variable for $${pae}. Check if your runtime environment supports job summaries.`);try{yield m7e(e,eC.constants.R_OK|eC.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}`:`<${e}${s}>`}write(e){return v2(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?A7e:f7e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return v2(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(mae.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),o=this.wrap(n,s);return this.addRaw(o).addEOL()}addTable(e){let r=e.map(s=>{let o=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,p=c?"th":"td",m=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(p,l,m)}).join("");return this.wrap("tr",o)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:o}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",o=this.wrap(s,e);return this.addRaw(o).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},PYt=new P2;var Q2=R(require("os"),1);var LYt=Q2.default.platform(),OYt=Q2.default.arch();var fae;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(fae||(fae={}));function Uo(t){lae("debug",{},t)}i(Uo,"debug");var UA=R(require("fs"),1);function D2(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,Uo(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,Uo(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.matchDirectories=="boolean"&&(e.matchDirectories=t.matchDirectories,Uo(`matchDirectories '${e.matchDirectories}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,Uo(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`)),typeof t.excludeHiddenFiles=="boolean"&&(e.excludeHiddenFiles=t.excludeHiddenFiles,Uo(`excludeHiddenFiles '${e.excludeHiddenFiles}'`))),e}i(D2,"getOptions");var oB=R(require("path"),1);var OA=R(require("path"),1),Uu=R(require("assert"),1);var qu=process.platform==="win32";function Rl(t){if(t=Bl(t),qu&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=OA.dirname(t);return qu&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=Bl(e)),e}i(Rl,"dirname");function tB(t,e){if((0,Uu.default)(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),(0,Uu.default)(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),tC(e))return e;if(qu){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let r=process.cwd();return(0,Uu.default)(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),e[0].toUpperCase()===r[0].toUpperCase()?e.length===2?`${e[0]}:\\${r.substr(3)}`:(r.endsWith("\\")||(r+="\\"),`${e[0]}:\\${r.substr(3)}${e.substr(2)}`):`${e[0]}:\\${e.substr(2)}`}else if(Di(e).match(/^\\$|^\\[^\\]/)){let r=process.cwd();return(0,Uu.default)(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),`${r[0]}:\\${e.substr(1)}`}}return(0,Uu.default)(tC(t),"ensureAbsoluteRoot parameter 'root' must have an absolute root"),t.endsWith("/")||qu&&t.endsWith("\\")||(t+=OA.sep),t+e}i(tB,"ensureAbsoluteRoot");function tC(t){return(0,Uu.default)(t,"hasAbsoluteRoot parameter 'itemPath' must not be empty"),t=Di(t),qu?t.startsWith("\\\\")||/^[A-Z]:\\/i.test(t):t.startsWith("/")}i(tC,"hasAbsoluteRoot");function rC(t){return(0,Uu.default)(t,"isRooted parameter 'itemPath' must not be empty"),t=Di(t),qu?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}i(rC,"hasRoot");function Di(t){return t=t||"",qu?(t=t.replace(/\//g,"\\"),(/^\\\\+[^\\]/.test(t)?"\\":"")+t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}i(Di,"normalizeSeparators");function Bl(t){return t?(t=Di(t),!t.endsWith(OA.sep)||t===OA.sep||qu&&/^[A-Z]:\\$/i.test(t)?t:t.substr(0,t.length-1)):""}i(Bl,"safeTrimTrailingSeparator");var ki;(function(t){t[t.None=0]="None",t[t.Directory=1]="Directory",t[t.File=2]="File",t[t.All=3]="All"})(ki||(ki={}));var Aae=process.platform==="win32";function L2(t){t=t.filter(n=>!n.negate);let e={};for(let n of t){let s=Aae?n.searchPath.toUpperCase():n.searchPath;e[s]="candidate"}let r=[];for(let n of t){let s=Aae?n.searchPath.toUpperCase():n.searchPath;if(e[s]==="included")continue;let o=!1,a=s,c=Rl(a);for(;c!==a;){if(e[c]){o=!0;break}a=c,c=Rl(a)}o||(r.push(n.searchPath),e[s]="included")}return r}i(L2,"getSearchPaths");function hae(t,e){let r=ki.None;for(let n of t)n.negate?r&=~n.match(e):r|=n.match(e);return r}i(hae,"match");function gae(t,e){return t.some(r=>!r.negate&&r.partialMatch(e))}i(gae,"partialMatch");var Fae=R(require("os"),1),FA=R(require("path"),1);var Hu=R(require("assert"),1),Uae=R(Mae(),1);var Yp=R(require("path"),1);var MA=R(require("assert"),1);var U7e=process.platform==="win32",Jp=class{static{i(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if((0,MA.default)(e,"Parameter 'itemPath' must not be empty"),e=Bl(e),!rC(e))this.segments=e.split(Yp.sep);else{let r=e,n=Rl(r);for(;n!==r;){let s=Yp.basename(r);this.segments.unshift(s),r=n,n=Rl(r)}this.segments.unshift(r)}else{(0,MA.default)(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let r=0;rt.getLiteral(u)).filter(u=>!a&&!(a=u===""));this.searchPath=new Jp(c).toString(),this.rootRegExp=new RegExp(t.regExpEscape(c[0]),Nl?"i":""),this.isImplicitPattern=r;let l={dot:!0,nobrace:!0,nocase:Nl,nocomment:!0,noext:!0,nonegate:!0};o=Nl?o.replace(/\\/g,"/"):o,this.minimatch=new q7e(o,l)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Di(e),!e.endsWith(FA.sep)&&this.isImplicitPattern===!1&&(e=`${e}${FA.sep}`)):e=Bl(e),this.minimatch.match(e)?this.trailingSeparator?ki.Directory:ki.All:ki.None}partialMatch(e){return e=Bl(e),Rl(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(Nl?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(Nl?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,r){(0,Hu.default)(e,"pattern cannot be empty");let n=new Jp(e).segments.map(s=>t.getLiteral(s));if((0,Hu.default)(n.every((s,o)=>(s!=="."||o===0)&&s!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),(0,Hu.default)(!rC(e)||n[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=Di(e),e==="."||e.startsWith(`.${FA.sep}`))e=t.globEscape(process.cwd())+e.substr(1);else if(e==="~"||e.startsWith(`~${FA.sep}`))r=r||Fae.homedir(),(0,Hu.default)(r,"Unable to determine HOME directory"),(0,Hu.default)(tC(r),`Expected HOME directory to be a rooted path. Actual '${r}'`),e=t.globEscape(r)+e.substr(1);else if(Nl&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let s=tB("C:\\dummy-root",e.substr(0,2));e.length>2&&!s.endsWith("\\")&&(s+="\\"),e=t.globEscape(s)+e.substr(2)}else if(Nl&&(e==="\\"||e.match(/^\\[^\\]/))){let s=tB("C:\\dummy-root","\\");s.endsWith("\\")||(s+="\\"),e=t.globEscape(s)+e.substr(1)}else e=tB(t.globEscape(process.cwd()),e);return Di(e)}static getLiteral(e){let r="";for(let n=0;n=0){if(o.length>1)return"";if(o){r+=o,n=a;continue}}}}r+=s}return r}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}};var iC=class{static{i(this,"SearchState")}constructor(e,r){this.path=e,this.level=r}};var q2=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},G7e=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(a){return new Promise(function(c,l){a=t[o](a),s(c,l,a.done,a.value)})}}function s(o,a,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},a)}},$u=function(t){return this instanceof $u?(this.v=t,this):new $u(t)},H7e=function(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,o=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",a),s[Symbol.asyncIterator]=function(){return this},s;function a(f){return function(A){return Promise.resolve(A).then(f,p)}}function c(f,A){n[f]&&(s[f]=function(h){return new Promise(function(E,C){o.push([f,h,E,C])>1||l(f,h)})},A&&(s[f]=A(s[f])))}function l(f,A){try{u(n[f](A))}catch(h){m(o[0][3],h)}}function u(f){f.value instanceof $u?Promise.resolve(f.value.v).then(d,p):m(o[0][2],f)}function d(f){l("next",f)}function p(f){l("throw",f)}function m(f,A){f(A),o.shift(),o.length&&l(o[0][0],o[0][1])}},$7e=process.platform==="win32",sB=class t{static{i(this,"DefaultGlobber")}constructor(e){this.patterns=[],this.searchPaths=[],this.options=D2(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){return q2(this,void 0,void 0,function*(){var e,r,n,s;let o=[];try{for(var a=!0,c=G7e(this.globGenerator()),l;l=yield c.next(),e=l.done,!e;a=!0){s=l.value,a=!1;let u=s;o.push(u)}}catch(u){r={error:u}}finally{try{!a&&!e&&(n=c.return)&&(yield n.call(c))}finally{if(r)throw r.error}}return o})}globGenerator(){return H7e(this,arguments,i(function*(){let r=D2(this.options),n=[];for(let a of this.patterns)n.push(a),r.implicitDescendants&&(a.trailingSeparator||a.segments[a.segments.length-1]!=="**")&&n.push(new oC(a.negate,!0,a.segments.concat("**")));let s=[];for(let a of L2(n)){Uo(`Search path '${a}'`);try{yield $u(UA.promises.lstat(a))}catch(c){if(c.code==="ENOENT")continue;throw c}s.unshift(new iC(a,1))}let o=[];for(;s.length;){let a=s.pop(),c=hae(n,a.path),l=!!c||gae(n,a.path);if(!c&&!l)continue;let u=yield $u(t.stat(a,r,o));if(u&&!(r.excludeHiddenFiles&&oB.basename(a.path).match(/^\./)))if(u.isDirectory()){if(c&ki.Directory&&r.matchDirectories)yield yield $u(a.path);else if(!l)continue;let d=a.level+1,p=(yield $u(UA.promises.readdir(a.path))).map(m=>new iC(oB.join(a.path,m),d));s.push(...p.reverse())}else c&ki.File&&(yield yield $u(a.path))}},"globGenerator_1"))}static create(e,r){return q2(this,void 0,void 0,function*(){let n=new t(r);$7e&&(e=e.replace(/\r\n/g,` + Error Message: ${a.message}`)})).result)===null||r===void 0?void 0:r.value;if(!o)throw new Error("Response json body do not have ID Token field");return o})}static getIDToken(e){return Dse(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let s=encodeURIComponent(e);r=`${r}&audience=${s}`}v(`ID token url is ${r}`);let n=yield t.getCall(r);return xn(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};var Lse=require("os"),ME=require("fs");var zU=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:U6e,appendFile:q6e,writeFile:G6e}=ME.promises,kse="GITHUB_STEP_SUMMARY";var VU=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return zU(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[kse];if(!e)throw new Error(`Unable to find environment variable for $${kse}. Check if your runtime environment supports job summaries.`);try{yield U6e(e,ME.constants.R_OK|ME.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}`:`<${e}${s}>`}write(e){return zU(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?G6e:q6e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return zU(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(Lse.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),o=this.wrap(n,s);return this.addRaw(o).addEOL()}addTable(e){let r=e.map(s=>{let o=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,p=c?"th":"td",m=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(p,l,m)}).join("");return this.wrap("tr",o)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:o}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",o=this.wrap(s,e);return this.addRaw(o).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},W3t=new VU;var r2=R(require("os"),1);var t2=require("string_decoder");var UE=R(require("os"),1),e2=R(require("events"),1),Jse=R(require("child_process"),1),jse=R(require("path"),1);var $se=require("assert"),to=R(require("path"),1);var FE=R(require("fs"),1),Ou=R(require("path"),1);var WU=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{chmod:YU,copyFile:Mse,lstat:k0,mkdir:Fse,open:X3t,readdir:JU,rename:H6e,rm:Use,rmdir:Z3t,stat:qp,symlink:qse,unlink:jU}=FE.promises,_a=process.platform==="win32";function Gse(t){return WU(this,void 0,void 0,function*(){let e=yield FE.promises.readlink(t);return _a&&!e.endsWith("\\")?`${e}\\`:e})}i(Gse,"readlink");var eVt=FE.constants.O_RDONLY;function _A(t){return WU(this,void 0,void 0,function*(){try{yield qp(t)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}i(_A,"exists");function L0(t){if(t=$6e(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return _a?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}i(L0,"isRooted");function KU(t,e){return WU(this,void 0,void 0,function*(){let r;try{r=yield qp(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(r&&r.isFile()){if(_a){let s=Ou.extname(t).toUpperCase();if(e.some(o=>o.toUpperCase()===s))return t}else if(Ose(r))return t}let n=t;for(let s of e){t=n+s,r=void 0;try{r=yield qp(t)}catch(o){o.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${o}`)}if(r&&r.isFile()){if(_a){try{let o=Ou.dirname(t),a=Ou.basename(t).toUpperCase();for(let c of yield JU(o))if(a===c.toUpperCase()){t=Ou.join(o,c);break}}catch(o){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${o}`)}return t}else if(Ose(r))return t}}return""})}i(KU,"tryGetExecutablePath");function $6e(t){return t=t||"",_a?(t=t.replace(/\//g,"\\"),t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}i($6e,"normalizeSeparators");function Ose(t){return(t.mode&1)>0||(t.mode&8)>0&&process.getgid!==void 0&&t.gid===process.getgid()||(t.mode&64)>0&&process.getuid!==void 0&&t.uid===process.getuid()}i(Ose,"isUnixExecutable");var Gp=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function zse(t,e){return Gp(this,arguments,void 0,function*(r,n,s={}){let{force:o,recursive:a,copySourceDirectory:c}=V6e(s),l=(yield _A(n))?yield qp(n):null;if(l&&l.isFile()&&!o)return;let u=l&&l.isDirectory()&&c?to.join(n,to.basename(r)):n;if(!(yield _A(r)))throw new Error(`no such file or directory: ${r}`);if((yield qp(r)).isDirectory())if(a)yield Vse(r,u,0,o);else throw new Error(`Failed to copy. ${r} is a directory, but tried to copy without recursive flag.`);else{if(to.relative(r,u)==="")throw new Error(`'${u}' and '${r}' are the same file`);yield Wse(r,u,o)}})}i(zse,"cp");function XU(t){return Gp(this,void 0,void 0,function*(){if(_a&&/[*"<>|]/.test(t))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Use(t,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}})}i(XU,"rmRF");function Hp(t){return Gp(this,void 0,void 0,function*(){(0,$se.ok)(t,"a path argument must be provided"),yield Fse(t,{recursive:!0})})}i(Hp,"mkdirP");function Es(t,e){return Gp(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");if(e){let n=yield Es(t,!1);if(!n)throw _a?new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${t}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return n}let r=yield z6e(t);return r&&r.length>0?r[0]:""})}i(Es,"which");function z6e(t){return Gp(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'tool' is required");let e=[];if(_a&&process.env.PATHEXT)for(let s of process.env.PATHEXT.split(to.delimiter))s&&e.push(s);if(L0(t)){let s=yield KU(t,e);return s?[s]:[]}if(t.includes(to.sep))return[];let r=[];if(process.env.PATH)for(let s of process.env.PATH.split(to.delimiter))s&&r.push(s);let n=[];for(let s of r){let o=yield KU(to.join(s,t),e);o&&n.push(o)}return n})}i(z6e,"findInPath");function V6e(t){let e=t.force==null?!0:t.force,r=!!t.recursive,n=t.copySourceDirectory==null?!0:!!t.copySourceDirectory;return{force:e,recursive:r,copySourceDirectory:n}}i(V6e,"readCopyOptions");function Vse(t,e,r,n){return Gp(this,void 0,void 0,function*(){if(r>=255)return;r++,yield Hp(e);let s=yield JU(t);for(let o of s){let a=`${t}/${o}`,c=`${e}/${o}`;(yield k0(a)).isDirectory()?yield Vse(a,c,r,n):yield Wse(a,c,n)}yield YU(e,(yield qp(t)).mode)})}i(Vse,"cpDirRecursive");function Wse(t,e,r){return Gp(this,void 0,void 0,function*(){if((yield k0(t)).isSymbolicLink()){try{yield k0(e),yield jU(e)}catch(s){s.code==="EPERM"&&(yield YU(e,"0666"),yield jU(e))}let n=yield Gse(t);yield qse(n,e,_a?"junction":null)}else(!(yield _A(e))||r)&&(yield Mse(t,e))})}i(Wse,"copyFile");var Kse=require("timers");var Yse=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},O0=process.platform==="win32",M0=class extends e2.EventEmitter{static{i(this,"ToolRunner")}constructor(e,r,n){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=r||[],this.options=n||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,r){let n=this._getSpawnFileName(),s=this._getSpawnArgs(e),o=r?"":"[command]";if(O0)if(this._isCmdFile()){o+=n;for(let a of s)o+=` ${a}`}else if(e.windowsVerbatimArguments){o+=`"${n}"`;for(let a of s)o+=` ${a}`}else{o+=this._windowsQuoteCmdArg(n);for(let a of s)o+=` ${this._windowsQuoteCmdArg(a)}`}else{o+=n;for(let a of s)o+=` ${a}`}return o}_processLineBuffer(e,r,n){try{let s=r+e.toString(),o=s.indexOf(UE.EOL);for(;o>-1;){let a=s.substring(0,o);n(a),s=s.substring(o+UE.EOL.length),o=s.indexOf(UE.EOL)}return s}catch(s){return this._debug(`error processing line. Failed with error ${s}`),""}}_getSpawnFileName(){return O0&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(O0&&this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let n of this.args)r+=" ",r+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return r+='"',[r]}return this.args}_endsWith(e,r){return e.endsWith(r)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let r=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],n=!1;for(let a of e)if(r.some(c=>c===a)){n=!0;break}if(!n)return e;let s='"',o=!0;for(let a=e.length;a>0;a--)s+=e[a-1],o&&e[a-1]==="\\"?s+="\\":e[a-1]==='"'?(o=!0,s+='"'):o=!1;return s+='"',s.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let r='"',n=!0;for(let s=e.length;s>0;s--)r+=e[s-1],n&&e[s-1]==="\\"?r+="\\":e[s-1]==='"'?(n=!0,r+="\\"):n=!1;return r+='"',r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let r={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return r.outStream=e.outStream||process.stdout,r.errStream=e.errStream||process.stderr,r}_getSpawnOptions(e,r){e=e||{};let n={};return n.cwd=e.cwd,n.env=e.env,n.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(n.argv0=`"${r}"`),n}exec(){return Yse(this,void 0,void 0,function*(){return!L0(this.toolPath)&&(this.toolPath.includes("/")||O0&&this.toolPath.includes("\\"))&&(this.toolPath=jse.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield Es(this.toolPath,!0),new Promise((e,r)=>Yse(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let u of this.args)this._debug(` ${u}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+UE.EOL);let s=new ZU(n,this.toolPath);if(s.on("debug",u=>{this._debug(u)}),this.options.cwd&&!(yield _A(this.options.cwd)))return r(new Error(`The cwd: ${this.options.cwd} does not exist!`));let o=this._getSpawnFileName(),a=Jse.spawn(o,this._getSpawnArgs(n),this._getSpawnOptions(this.options,o)),c="";a.stdout&&a.stdout.on("data",u=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(u),!n.silent&&n.outStream&&n.outStream.write(u),c=this._processLineBuffer(u,c,d=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(d)})});let l="";if(a.stderr&&a.stderr.on("data",u=>{s.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(u),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(u),l=this._processLineBuffer(u,l,d=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(d)})}),a.on("error",u=>{s.processError=u.message,s.processExited=!0,s.processClosed=!0,s.CheckComplete()}),a.on("exit",u=>{s.processExitCode=u,s.processExited=!0,this._debug(`Exit code ${u} received from tool '${this.toolPath}'`),s.CheckComplete()}),a.on("close",u=>{s.processExitCode=u,s.processExited=!0,s.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),s.CheckComplete()}),s.on("done",(u,d)=>{c.length>0&&this.emit("stdline",c),l.length>0&&this.emit("errline",l),a.removeAllListeners(),u?r(u):e(d)}),this.options.input){if(!a.stdin)throw new Error("child process missing stdin");a.stdin.end(this.options.input)}}))})}};function Xse(t){let e=[],r=!1,n=!1,s="";function o(a){n&&a!=='"'&&(s+="\\"),s+=a,n=!1}i(o,"append");for(let a=0;a0&&(e.push(s),s="");continue}o(c)}return s.length>0&&e.push(s.trim()),e}i(Xse,"argStringToArray");var ZU=class t extends e2.EventEmitter{static{i(this,"ExecState")}constructor(e,r){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!r)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=r,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=(0,Kse.setTimeout)(t.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let r=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(r)}e._setResult()}}};var Zse=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function Mu(t,e,r){return Zse(this,void 0,void 0,function*(){let n=Xse(t);if(n.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let s=n[0];return e=n.slice(1).concat(e||[]),new M0(s,e,r).exec()})}i(Mu,"exec");function qE(t,e,r){return Zse(this,void 0,void 0,function*(){var n,s;let o="",a="",c=new t2.StringDecoder("utf8"),l=new t2.StringDecoder("utf8"),u=(n=r?.listeners)===null||n===void 0?void 0:n.stdout,d=(s=r?.listeners)===null||s===void 0?void 0:s.stderr,p=i(h=>{a+=l.write(h),d&&d(h)},"stdErrListener"),m=i(h=>{o+=c.write(h),u&&u(h)},"stdOutListener"),f=Object.assign(Object.assign({},r?.listeners),{stdout:m,stderr:p}),A=yield Mu(t,e,Object.assign(Object.assign({},r),{listeners:f}));return o+=c.end(),a+=l.end(),{exitCode:A,stdout:o,stderr:a}})}i(qE,"getExecOutput");var iVt=r2.default.platform(),aVt=r2.default.arch();var eoe=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},n2;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(n2||(n2={}));function xn(t){mp("add-mask",{},t)}i(xn,"setSecret");function _i(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}i(_i,"getInput");function roe(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],s=_i(t,e);if(r.includes(s))return!0;if(n.includes(s))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}i(roe,"getBooleanInput");function noe(t){process.exitCode=n2.Failure,kA(t)}i(noe,"setFailed");function $p(){return process.env.RUNNER_DEBUG==="1"}i($p,"isDebug");function v(t){mp("debug",{},t)}i(v,"debug");function kA(t,e={}){mp("error",mM(e),t instanceof Error?t.toString():t)}i(kA,"error");function Ar(t,e={}){mp("warning",mM(e),t instanceof Error?t.toString():t)}i(Ar,"warning");function be(t){process.stdout.write(t+toe.EOL)}i(be,"info");function J6e(t){AM("group",t)}i(J6e,"startGroup");function j6e(){AM("endgroup")}i(j6e,"endGroup");function HE(t,e){return eoe(this,void 0,void 0,function*(){J6e(t);let r;try{r=yield e()}finally{j6e()}return r})}i(HE,"group");function zp(t,e){if(process.env.GITHUB_STATE||"")return eK("STATE",tK(t,e));mp("save-state",{name:t},gu(e))}i(zp,"saveState");function soe(t){return process.env[`STATE_${t}`]||""}i(soe,"getState");function ooe(t){return eoe(this,void 0,void 0,function*(){return yield D0.getIDToken(t)})}i(ooe,"getIDToken");var $T=R(require("fs"),1),i4=R(require("os"),1),a4=R(require("path"),1);var aoe=R(require("os"),1);function $E(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i($E,"toCommandValue");function coe(t,e,r){let n=new s2(t,e,r);process.stdout.write(n.toString()+aoe.EOL)}i(coe,"issueCommand");var ioe="::",s2=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=ioe+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${X6e(s)}`)}}return e+=`${ioe}${K6e(this.message)}`,e}};function K6e(t){return $E(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(K6e,"escapeData");function X6e(t){return $E(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(X6e,"escapeProperty");var F0=R(Of(),1),e9e=R(Up(),1);var Da;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(Da||(Da={}));var loe;(function(t){t.Accept="accept",t.ContentType="content-type"})(loe||(loe={}));var uoe;(function(t){t.ApplicationJson="application/json"})(uoe||(uoe={}));var QVt=[Da.MovedPermanently,Da.ResourceMoved,Da.SeeOther,Da.TemporaryRedirect,Da.PermanentRedirect],_Vt=[Da.BadGateway,Da.ServiceUnavailable,Da.GatewayTimeout];var poe=require("os"),zE=require("fs");var o2=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:n9e,appendFile:s9e,writeFile:o9e}=zE.promises,doe="GITHUB_STEP_SUMMARY";var i2=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return o2(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[doe];if(!e)throw new Error(`Unable to find environment variable for $${doe}. Check if your runtime environment supports job summaries.`);try{yield n9e(e,zE.constants.R_OK|zE.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}`:`<${e}${s}>`}write(e){return o2(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?o9e:s9e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return o2(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(poe.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),o=this.wrap(n,s);return this.addRaw(o).addEOL()}addTable(e){let r=e.map(s=>{let o=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,p=c?"th":"td",m=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(p,l,m)}).join("");return this.wrap("tr",o)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:o}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",o=this.wrap(s,e);return this.addRaw(o).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},$Vt=new i2;var a2=R(require("os"),1);var JVt=a2.default.platform(),jVt=a2.default.arch();var moe;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(moe||(moe={}));function Hn(t){coe("debug",{},t)}i(Hn,"debug");var Cs=R(require("fs"),1);var r7e=R(R2(),1);var X0=R(require("os"),1),Fu=R(require("path"),1);var Fo=R(R2(),1);var sae=require("assert");var nae=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};var nYt=process.platform==="win32",sYt=process.platform==="darwin";function N2(t,e,r,n){return nae(this,void 0,void 0,function*(){if(r=Fo.clean(r)||r,n=n||X0.arch(),Hn(`Caching tool ${e} ${r} ${n}`),Hn(`source dir: ${t}`),!Cs.statSync(t).isDirectory())throw new Error("sourceDir is not a directory");let s=yield o7e(e,r,n);for(let o of Cs.readdirSync(t)){let a=Fu.join(t,o);yield zse(a,s,{recursive:!0})}return i7e(e,r,n),s})}i(N2,"cacheDir");function oae(t,e,r){if(!t)throw new Error("toolName parameter is required");if(!e)throw new Error("versionSpec parameter is required");if(r=r||X0.arch(),!iae(e)){let s=s7e(t,r);e=a7e(s,e)}let n="";if(e){e=Fo.clean(e)||"";let s=Fu.join(Z0(),t,e,r);Hn(`checking cache: ${s}`),Cs.existsSync(s)&&Cs.existsSync(`${s}.complete`)?(Hn(`Found tool in cache ${t} ${e} ${r}`),n=s):Hn("not found")}return n}i(oae,"find");function s7e(t,e){let r=[];e=e||X0.arch();let n=Fu.join(Z0(),t);if(Cs.existsSync(n)){let s=Cs.readdirSync(n);for(let o of s)if(iae(o)){let a=Fu.join(n,o,e||"");Cs.existsSync(a)&&Cs.existsSync(`${a}.complete`)&&r.push(o)}}return r}i(s7e,"findAllVersions");function o7e(t,e,r){return nae(this,void 0,void 0,function*(){let n=Fu.join(Z0(),t,Fo.clean(e)||e,r||"");Hn(`destination ${n}`);let s=`${n}.complete`;return yield XU(n),yield XU(s),yield Hp(n),n})}i(o7e,"_createToolPath");function i7e(t,e,r){let s=`${Fu.join(Z0(),t,Fo.clean(e)||e,r||"")}.complete`;Cs.writeFileSync(s,""),Hn("finished caching tool")}i(i7e,"_completeToolPath");function iae(t){let e=Fo.clean(t)||"";Hn(`isExplicit: ${e}`);let r=Fo.valid(e)!=null;return Hn(`explicit? ${r}`),r}i(iae,"isExplicitVersion");function a7e(t,e){let r="";Hn(`evaluating ${t.length} versions`),t=t.sort((n,s)=>Fo.gt(n,s)?1:-1);for(let n=t.length-1;n>=0;n--){let s=t[n];if(Fo.satisfies(s,e)){r=s;break}}return r?Hn(`matched: ${r}`):Hn("match not found"),r}i(a7e,"evaluateVersions");function Z0(){let t=process.env.RUNNER_TOOL_CACHE||"";return(0,sae.ok)(t,"Expected RUNNER_TOOL_CACHE to be defined"),t}i(Z0,"_getCacheDirectory");var DI=R(require("path"),1);var cae=R(require("os"),1);function ZE(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i(ZE,"toCommandValue");function lae(t,e,r){let n=new T2(t,e,r);process.stdout.write(n.toString()+cae.EOL)}i(lae,"issueCommand");var aae="::",T2=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=aae+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${u7e(s)}`)}}return e+=`${aae}${l7e(this.message)}`,e}};function l7e(t){return ZE(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(l7e,"escapeData");function u7e(t){return ZE(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(u7e,"escapeProperty");var eB=R(Of(),1),p7e=R(Up(),1);var La;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(La||(La={}));var uae;(function(t){t.Accept="accept",t.ContentType="content-type"})(uae||(uae={}));var dae;(function(t){t.ApplicationJson="application/json"})(dae||(dae={}));var hYt=[La.MovedPermanently,La.ResourceMoved,La.SeeOther,La.TemporaryRedirect,La.PermanentRedirect],gYt=[La.BadGateway,La.ServiceUnavailable,La.GatewayTimeout];var mae=require("os"),eC=require("fs");var v2=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:m7e,appendFile:f7e,writeFile:A7e}=eC.promises,pae="GITHUB_STEP_SUMMARY";var P2=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return v2(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[pae];if(!e)throw new Error(`Unable to find environment variable for $${pae}. Check if your runtime environment supports job summaries.`);try{yield m7e(e,eC.constants.R_OK|eC.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}`:`<${e}${s}>`}write(e){return v2(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?A7e:f7e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return v2(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(mae.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),o=this.wrap(n,s);return this.addRaw(o).addEOL()}addTable(e){let r=e.map(s=>{let o=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,p=c?"th":"td",m=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(p,l,m)}).join("");return this.wrap("tr",o)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:o}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",o=this.wrap(s,e);return this.addRaw(o).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},vYt=new P2;var Q2=R(require("os"),1);var kYt=Q2.default.platform(),LYt=Q2.default.arch();var fae;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(fae||(fae={}));function Uo(t){lae("debug",{},t)}i(Uo,"debug");var UA=R(require("fs"),1);function D2(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,Uo(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,Uo(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.matchDirectories=="boolean"&&(e.matchDirectories=t.matchDirectories,Uo(`matchDirectories '${e.matchDirectories}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,Uo(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`)),typeof t.excludeHiddenFiles=="boolean"&&(e.excludeHiddenFiles=t.excludeHiddenFiles,Uo(`excludeHiddenFiles '${e.excludeHiddenFiles}'`))),e}i(D2,"getOptions");var oB=R(require("path"),1);var OA=R(require("path"),1),Uu=R(require("assert"),1);var qu=process.platform==="win32";function Rl(t){if(t=Bl(t),qu&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=OA.dirname(t);return qu&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=Bl(e)),e}i(Rl,"dirname");function tB(t,e){if((0,Uu.default)(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),(0,Uu.default)(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),tC(e))return e;if(qu){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let r=process.cwd();return(0,Uu.default)(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),e[0].toUpperCase()===r[0].toUpperCase()?e.length===2?`${e[0]}:\\${r.substr(3)}`:(r.endsWith("\\")||(r+="\\"),`${e[0]}:\\${r.substr(3)}${e.substr(2)}`):`${e[0]}:\\${e.substr(2)}`}else if(Di(e).match(/^\\$|^\\[^\\]/)){let r=process.cwd();return(0,Uu.default)(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),`${r[0]}:\\${e.substr(1)}`}}return(0,Uu.default)(tC(t),"ensureAbsoluteRoot parameter 'root' must have an absolute root"),t.endsWith("/")||qu&&t.endsWith("\\")||(t+=OA.sep),t+e}i(tB,"ensureAbsoluteRoot");function tC(t){return(0,Uu.default)(t,"hasAbsoluteRoot parameter 'itemPath' must not be empty"),t=Di(t),qu?t.startsWith("\\\\")||/^[A-Z]:\\/i.test(t):t.startsWith("/")}i(tC,"hasAbsoluteRoot");function rC(t){return(0,Uu.default)(t,"isRooted parameter 'itemPath' must not be empty"),t=Di(t),qu?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}i(rC,"hasRoot");function Di(t){return t=t||"",qu?(t=t.replace(/\//g,"\\"),(/^\\\\+[^\\]/.test(t)?"\\":"")+t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}i(Di,"normalizeSeparators");function Bl(t){return t?(t=Di(t),!t.endsWith(OA.sep)||t===OA.sep||qu&&/^[A-Z]:\\$/i.test(t)?t:t.substr(0,t.length-1)):""}i(Bl,"safeTrimTrailingSeparator");var ki;(function(t){t[t.None=0]="None",t[t.Directory=1]="Directory",t[t.File=2]="File",t[t.All=3]="All"})(ki||(ki={}));var Aae=process.platform==="win32";function L2(t){t=t.filter(n=>!n.negate);let e={};for(let n of t){let s=Aae?n.searchPath.toUpperCase():n.searchPath;e[s]="candidate"}let r=[];for(let n of t){let s=Aae?n.searchPath.toUpperCase():n.searchPath;if(e[s]==="included")continue;let o=!1,a=s,c=Rl(a);for(;c!==a;){if(e[c]){o=!0;break}a=c,c=Rl(a)}o||(r.push(n.searchPath),e[s]="included")}return r}i(L2,"getSearchPaths");function hae(t,e){let r=ki.None;for(let n of t)n.negate?r&=~n.match(e):r|=n.match(e);return r}i(hae,"match");function gae(t,e){return t.some(r=>!r.negate&&r.partialMatch(e))}i(gae,"partialMatch");var Fae=R(require("os"),1),FA=R(require("path"),1);var Hu=R(require("assert"),1),Uae=R(Mae(),1);var Yp=R(require("path"),1);var MA=R(require("assert"),1);var U7e=process.platform==="win32",Jp=class{static{i(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if((0,MA.default)(e,"Parameter 'itemPath' must not be empty"),e=Bl(e),!rC(e))this.segments=e.split(Yp.sep);else{let r=e,n=Rl(r);for(;n!==r;){let s=Yp.basename(r);this.segments.unshift(s),r=n,n=Rl(r)}this.segments.unshift(r)}else{(0,MA.default)(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let r=0;rt.getLiteral(u)).filter(u=>!a&&!(a=u===""));this.searchPath=new Jp(c).toString(),this.rootRegExp=new RegExp(t.regExpEscape(c[0]),Nl?"i":""),this.isImplicitPattern=r;let l={dot:!0,nobrace:!0,nocase:Nl,nocomment:!0,noext:!0,nonegate:!0};o=Nl?o.replace(/\\/g,"/"):o,this.minimatch=new q7e(o,l)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Di(e),!e.endsWith(FA.sep)&&this.isImplicitPattern===!1&&(e=`${e}${FA.sep}`)):e=Bl(e),this.minimatch.match(e)?this.trailingSeparator?ki.Directory:ki.All:ki.None}partialMatch(e){return e=Bl(e),Rl(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(Nl?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(Nl?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,r){(0,Hu.default)(e,"pattern cannot be empty");let n=new Jp(e).segments.map(s=>t.getLiteral(s));if((0,Hu.default)(n.every((s,o)=>(s!=="."||o===0)&&s!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),(0,Hu.default)(!rC(e)||n[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=Di(e),e==="."||e.startsWith(`.${FA.sep}`))e=t.globEscape(process.cwd())+e.substr(1);else if(e==="~"||e.startsWith(`~${FA.sep}`))r=r||Fae.homedir(),(0,Hu.default)(r,"Unable to determine HOME directory"),(0,Hu.default)(tC(r),`Expected HOME directory to be a rooted path. Actual '${r}'`),e=t.globEscape(r)+e.substr(1);else if(Nl&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let s=tB("C:\\dummy-root",e.substr(0,2));e.length>2&&!s.endsWith("\\")&&(s+="\\"),e=t.globEscape(s)+e.substr(2)}else if(Nl&&(e==="\\"||e.match(/^\\[^\\]/))){let s=tB("C:\\dummy-root","\\");s.endsWith("\\")||(s+="\\"),e=t.globEscape(s)+e.substr(1)}else e=tB(t.globEscape(process.cwd()),e);return Di(e)}static getLiteral(e){let r="";for(let n=0;n=0){if(o.length>1)return"";if(o){r+=o,n=a;continue}}}}r+=s}return r}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}};var iC=class{static{i(this,"SearchState")}constructor(e,r){this.path=e,this.level=r}};var q2=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},G7e=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(a){return new Promise(function(c,l){a=t[o](a),s(c,l,a.done,a.value)})}}function s(o,a,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},a)}},$u=function(t){return this instanceof $u?(this.v=t,this):new $u(t)},H7e=function(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,o=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",a),s[Symbol.asyncIterator]=function(){return this},s;function a(f){return function(A){return Promise.resolve(A).then(f,p)}}function c(f,A){n[f]&&(s[f]=function(h){return new Promise(function(E,C){o.push([f,h,E,C])>1||l(f,h)})},A&&(s[f]=A(s[f])))}function l(f,A){try{u(n[f](A))}catch(h){m(o[0][3],h)}}function u(f){f.value instanceof $u?Promise.resolve(f.value.v).then(d,p):m(o[0][2],f)}function d(f){l("next",f)}function p(f){l("throw",f)}function m(f,A){f(A),o.shift(),o.length&&l(o[0][0],o[0][1])}},$7e=process.platform==="win32",sB=class t{static{i(this,"DefaultGlobber")}constructor(e){this.patterns=[],this.searchPaths=[],this.options=D2(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){return q2(this,void 0,void 0,function*(){var e,r,n,s;let o=[];try{for(var a=!0,c=G7e(this.globGenerator()),l;l=yield c.next(),e=l.done,!e;a=!0){s=l.value,a=!1;let u=s;o.push(u)}}catch(u){r={error:u}}finally{try{!a&&!e&&(n=c.return)&&(yield n.call(c))}finally{if(r)throw r.error}}return o})}globGenerator(){return H7e(this,arguments,i(function*(){let r=D2(this.options),n=[];for(let a of this.patterns)n.push(a),r.implicitDescendants&&(a.trailingSeparator||a.segments[a.segments.length-1]!=="**")&&n.push(new oC(a.negate,!0,a.segments.concat("**")));let s=[];for(let a of L2(n)){Uo(`Search path '${a}'`);try{yield $u(UA.promises.lstat(a))}catch(c){if(c.code==="ENOENT")continue;throw c}s.unshift(new iC(a,1))}let o=[];for(;s.length;){let a=s.pop(),c=hae(n,a.path),l=!!c||gae(n,a.path);if(!c&&!l)continue;let u=yield $u(t.stat(a,r,o));if(u&&!(r.excludeHiddenFiles&&oB.basename(a.path).match(/^\./)))if(u.isDirectory()){if(c&ki.Directory&&r.matchDirectories)yield yield $u(a.path);else if(!l)continue;let d=a.level+1,p=(yield $u(UA.promises.readdir(a.path))).map(m=>new iC(oB.join(a.path,m),d));s.push(...p.reverse())}else c&ki.File&&(yield yield $u(a.path))}},"globGenerator_1"))}static create(e,r){return q2(this,void 0,void 0,function*(){let n=new t(r);$7e&&(e=e.replace(/\r\n/g,` `),e=e.replace(/\r/g,` `));let s=e.split(` -`).map(o=>o.trim());for(let o of s)!o||o.startsWith("#")||n.patterns.push(new oC(o));return n.searchPaths.push(...L2(n.patterns)),n})}static stat(e,r,n){return q2(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield UA.promises.stat(e.path)}catch(o){if(o.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Uo(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw o}else s=yield UA.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let o=yield UA.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===o)){Uo(`Symlink cycle detected for path '${e.path}' and realpath '${o}'`);return}n.push(o)}return s})}};var z7e=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function qae(t,e){return z7e(this,void 0,void 0,function*(){return yield sB.create(t,e)})}i(qae,"create");var IB=R(require("crypto"),1),$A=R(require("fs"),1),jp=R(require("path"),1),Dle=R(Qle(),1),kle=R(require("util"),1);var pC;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(pC||(pC={}));var Yn;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Yn||(Yn={}));var no;(function(t){t.GNU="gnu",t.BSD="bsd"})(no||(no={}));var yB=2,EB=5e3,cq=5e3,lq=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,_le=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,mC="cache.tar",uq="manifest.txt",f5t=10*Math.pow(1024,3),CB="cache read denied:";var HA=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},ert=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(a){return new Promise(function(c,l){a=t[o](a),s(c,l,a.done,a.value)})}}function s(o,a,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},a)}},trt="1.0";function fC(){return HA(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=jp.join(n,"actions","temp")}let r=jp.join(e,IB.randomUUID());return yield Hp(r),r})}i(fC,"createTempDirectory");function Ma(t){return $A.statSync(t).size}i(Ma,"getArchiveFileSizeInBytes");function dq(t){return HA(this,void 0,void 0,function*(){var e,r,n,s,o;let a=[],c=(o=process.env.GITHUB_WORKSPACE)!==null&&o!==void 0?o:process.cwd(),l=yield qae(t.join(` +`).map(o=>o.trim());for(let o of s)!o||o.startsWith("#")||n.patterns.push(new oC(o));return n.searchPaths.push(...L2(n.patterns)),n})}static stat(e,r,n){return q2(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield UA.promises.stat(e.path)}catch(o){if(o.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Uo(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw o}else s=yield UA.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let o=yield UA.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===o)){Uo(`Symlink cycle detected for path '${e.path}' and realpath '${o}'`);return}n.push(o)}return s})}};var z7e=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function qae(t,e){return z7e(this,void 0,void 0,function*(){return yield sB.create(t,e)})}i(qae,"create");var IB=R(require("crypto"),1),$A=R(require("fs"),1),jp=R(require("path"),1),Dle=R(Qle(),1),kle=R(require("util"),1);var pC;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(pC||(pC={}));var Yn;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Yn||(Yn={}));var no;(function(t){t.GNU="gnu",t.BSD="bsd"})(no||(no={}));var yB=2,EB=5e3,cq=5e3,lq=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,_le=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,mC="cache.tar",uq="manifest.txt",m5t=10*Math.pow(1024,3),CB="cache read denied:";var HA=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},ert=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(a){return new Promise(function(c,l){a=t[o](a),s(c,l,a.done,a.value)})}}function s(o,a,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},a)}},trt="1.0";function fC(){return HA(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=jp.join(n,"actions","temp")}let r=jp.join(e,IB.randomUUID());return yield Hp(r),r})}i(fC,"createTempDirectory");function Ma(t){return $A.statSync(t).size}i(Ma,"getArchiveFileSizeInBytes");function dq(t){return HA(this,void 0,void 0,function*(){var e,r,n,s,o;let a=[],c=(o=process.env.GITHUB_WORKSPACE)!==null&&o!==void 0?o:process.cwd(),l=yield qae(t.join(` `),{implicitDescendants:!1});try{for(var u=!0,d=ert(l.globGenerator()),p;p=yield d.next(),e=p.done,!e;u=!0){s=p.value,u=!1;let f=jp.relative(c,s).replace(new RegExp(`\\${jp.sep}`,"g"),"/");v(`Matched: ${f}`),f===""?a.push("."):a.push(`${f}`)}}catch(m){r={error:m}}finally{try{!u&&!e&&(n=d.return)&&(yield n.call(d))}finally{if(r)throw r.error}}return a})}i(dq,"resolvePaths");function AC(t){return HA(this,void 0,void 0,function*(){return kle.promisify($A.unlink)(t)})}i(AC,"unlinkFile");function Lle(t){return HA(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),v(`Checking ${e} ${r.join(" ")}`);try{yield Mu(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i(s=>n+=s.toString(),"stdout"),stderr:i(s=>n+=s.toString(),"stderr")}})}catch(s){v(s.message)}return n=n.trim(),v(n),n})}i(Lle,"getVersion");function hC(){return HA(this,void 0,void 0,function*(){let t=yield Lle("zstd",["--quiet"]),e=Dle.clean(t);return v(`zstd version: ${e}`),t===""?Yn.Gzip:Yn.ZstdWithoutLong})}i(hC,"getCompressionMethod");function Vu(t){return t===Yn.Gzip?pC.Gzip:pC.Zstd}i(Vu,"getCacheFileName");function Ole(){return HA(this,void 0,void 0,function*(){return $A.existsSync(lq)?lq:(yield Lle("tar")).toLowerCase().includes("gnu tar")?Es("tar"):""})}i(Ole,"getGnuTarPathOnWindows");function pq(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}i(pq,"assertDefined");function zA(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(trt),IB.createHash("sha256").update(n.join("|")).digest("hex")}i(zA,"getCacheVersion");function Mle(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}i(Mle,"getRuntimeToken");var yC=R(require("http"),1),Aq=R(require("https"),1);function mq(t){let e=t.protocol==="https:";if(rrt(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new SB(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new SB(`http://${r}`)}else return}i(mq,"getProxyUrl");function rrt(t){if(!t.hostname)return!1;let e=t.hostname;if(nrt(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let o of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(o==="*"||s.some(a=>a===o||a.endsWith(`.${o}`)||o.startsWith(".")&&a.endsWith(`${o}`)))return!0;return!1}i(rrt,"checkBypass");function nrt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(nrt,"isLoopbackAddress");var SB=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var Wu=R(Of(),1),Fle=R(Up(),1);var hr=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},ft;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(ft||(ft={}));var Jn;(function(t){t.Accept="accept",t.ContentType="content-type"})(Jn||(Jn={}));var Tl;(function(t){t.ApplicationJson="application/json"})(Tl||(Tl={}));var ort=[ft.MovedPermanently,ft.ResourceMoved,ft.SeeOther,ft.TemporaryRedirect,ft.PermanentRedirect],irt=[ft.BadGateway,ft.ServiceUnavailable,ft.GatewayTimeout],art=["OPTIONS","GET","DELETE","HEAD"],crt=10,lrt=5,Fa=class t extends Error{static{i(this,"HttpClientError")}constructor(e,r){super(e),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,t.prototype)}},fq=class{static{i(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return hr(this,void 0,void 0,function*(){return new Promise(e=>hr(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n])}),this.message.on("end",()=>{e(r.toString())})}))})}readBodyBuffer(){return hr(this,void 0,void 0,function*(){return new Promise(e=>hr(this,void 0,void 0,function*(){let r=[];this.message.on("data",n=>{r.push(n)}),this.message.on("end",()=>{e(Buffer.concat(r))})}))})}};var so=class{static{i(this,"HttpClient")}constructor(e,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=this._getUserAgentWithOrchestrationId(e),this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries))}options(e,r){return hr(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,r||{})})}get(e,r){return hr(this,void 0,void 0,function*(){return this.request("GET",e,null,r||{})})}del(e,r){return hr(this,void 0,void 0,function*(){return this.request("DELETE",e,null,r||{})})}post(e,r,n){return hr(this,void 0,void 0,function*(){return this.request("POST",e,r,n||{})})}patch(e,r,n){return hr(this,void 0,void 0,function*(){return this.request("PATCH",e,r,n||{})})}put(e,r,n){return hr(this,void 0,void 0,function*(){return this.request("PUT",e,r,n||{})})}head(e,r){return hr(this,void 0,void 0,function*(){return this.request("HEAD",e,null,r||{})})}sendStream(e,r,n,s){return hr(this,void 0,void 0,function*(){return this.request(e,r,n,s)})}getJson(e){return hr(this,arguments,void 0,function*(r,n={}){n[Jn.Accept]=this._getExistingOrDefaultHeader(n,Jn.Accept,Tl.ApplicationJson);let s=yield this.get(r,n);return this._processResponse(s,this.requestOptions)})}postJson(e,r){return hr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Jn.Accept]=this._getExistingOrDefaultHeader(o,Jn.Accept,Tl.ApplicationJson),o[Jn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Tl.ApplicationJson);let c=yield this.post(n,a,o);return this._processResponse(c,this.requestOptions)})}putJson(e,r){return hr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Jn.Accept]=this._getExistingOrDefaultHeader(o,Jn.Accept,Tl.ApplicationJson),o[Jn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Tl.ApplicationJson);let c=yield this.put(n,a,o);return this._processResponse(c,this.requestOptions)})}patchJson(e,r){return hr(this,arguments,void 0,function*(n,s,o={}){let a=JSON.stringify(s,null,2);o[Jn.Accept]=this._getExistingOrDefaultHeader(o,Jn.Accept,Tl.ApplicationJson),o[Jn.ContentType]=this._getExistingOrDefaultContentTypeHeader(o,Tl.ApplicationJson);let c=yield this.patch(n,a,o);return this._processResponse(c,this.requestOptions)})}request(e,r,n,s){return hr(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let o=new URL(r),a=this._prepareRequest(e,o,s),c=this._allowRetries&&art.includes(e)?this._maxRetries+1:1,l=0,u;do{if(u=yield this.requestRaw(a,n),u&&u.message&&u.message.statusCode===ft.Unauthorized){let p;for(let m of this.handlers)if(m.canHandleAuthentication(u)){p=m;break}return p?p.handleAuthentication(this,a,n):u}let d=this._maxRedirects;for(;u.message.statusCode&&ort.includes(u.message.statusCode)&&this._allowRedirects&&d>0;){let p=u.message.headers.location;if(!p)break;let m=new URL(p);if(o.protocol==="https:"&&o.protocol!==m.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield u.readBody(),m.hostname!==o.hostname)for(let f in s)f.toLowerCase()==="authorization"&&delete s[f];a=this._prepareRequest(e,m,s),u=yield this.requestRaw(a,n),d--}if(!u.message.statusCode||!irt.includes(u.message.statusCode))return u;l+=1,l{function o(a,c){a?s(a):c?n(c):s(new Error("Unknown error"))}i(o,"callbackForResult"),this.requestRawWithCallback(e,r,o)})})}requestRawWithCallback(e,r,n){typeof r=="string"&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let s=!1;function o(l,u){s||(s=!0,n(l,u))}i(o,"handleResult");let a=e.httpModule.request(e.options,l=>{let u=new fq(l);o(void 0,u)}),c;a.on("socket",l=>{c=l}),a.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),o(new Error(`Request timeout: ${e.options.path}`))}),a.on("error",function(l){o(l)}),r&&typeof r=="string"&&a.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){a.end()}),r.pipe(a)):a.end()}getAgent(e){let r=new URL(e);return this._getAgent(r)}getAgentDispatcher(e){let r=new URL(e),n=mq(r);if(n&&n.hostname)return this._getProxyAgentDispatcher(r,n)}_prepareRequest(e,r,n){let s={};s.parsedUrl=r;let o=s.parsedUrl.protocol==="https:";s.httpModule=o?Aq:yC;let a=o?443:80;if(s.options={},s.options.host=s.parsedUrl.hostname,s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a,s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||""),s.options.method=e,s.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(s.options.headers["user-agent"]=this.userAgent),s.options.agent=this._getAgent(s.parsedUrl),this.handlers)for(let c of this.handlers)c.prepareRequest(s.options);return s}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},gC(this.requestOptions.headers),gC(e||{})):gC(e||{})}_getExistingOrDefaultHeader(e,r,n){let s;if(this.requestOptions&&this.requestOptions.headers){let a=gC(this.requestOptions.headers)[r];a&&(s=typeof a=="number"?a.toString():a)}let o=e[r];return o!==void 0?typeof o=="number"?o.toString():o:s!==void 0?s:n}_getExistingOrDefaultContentTypeHeader(e,r){let n;if(this.requestOptions&&this.requestOptions.headers){let o=gC(this.requestOptions.headers)[Jn.ContentType];o&&(typeof o=="number"?n=String(o):Array.isArray(o)?n=o.join(", "):n=o)}let s=e[Jn.ContentType];return s!==void 0?typeof s=="number"?String(s):Array.isArray(s)?s.join(", "):s:n!==void 0?n:r}_getAgent(e){let r,n=mq(e),s=n&&n.hostname;if(this._keepAlive&&s&&(r=this._proxyAgent),s||(r=this._agent),r)return r;let o=e.protocol==="https:",a=100;if(this.requestOptions&&(a=this.requestOptions.maxSockets||yC.globalAgent.maxSockets),n&&n.hostname){let c={maxSockets:a,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},l,u=n.protocol==="https:";o?l=u?Wu.httpsOverHttps:Wu.httpsOverHttp:l=u?Wu.httpOverHttps:Wu.httpOverHttp,r=l(c),this._proxyAgent=r}if(!r){let c={keepAlive:this._keepAlive,maxSockets:a};r=o?new Aq.Agent(c):new yC.Agent(c),this._agent=r}return o&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_getProxyAgentDispatcher(e,r){let n;if(this._keepAlive&&(n=this._proxyAgentDispatcher),n)return n;let s=e.protocol==="https:";return n=new Fle.ProxyAgent(Object.assign({uri:r.href,pipelining:this._keepAlive?1:0},(r.username||r.password)&&{token:`Basic ${Buffer.from(`${r.username}:${r.password}`).toString("base64")}`})),this._proxyAgentDispatcher=n,s&&this._ignoreSslError&&(n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:!1})),n}_getUserAgentWithOrchestrationId(e){let r=e||"actions/http-client",n=process.env.ACTIONS_ORCHESTRATION_ID;if(n){let s=n.replace(/[^a-z0-9_.-]/gi,"_");return`${r} actions_orchestration_id/${s}`}return r}_performExponentialBackoff(e){return hr(this,void 0,void 0,function*(){e=Math.min(crt,e);let r=lrt*Math.pow(2,e);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(e,r){return hr(this,void 0,void 0,function*(){return new Promise((n,s)=>hr(this,void 0,void 0,function*(){let o=e.message.statusCode||0,a={statusCode:o,result:null,headers:{}};o===ft.NotFound&&n(a);function c(d,p){if(typeof p=="string"){let m=new Date(p);if(!isNaN(m.valueOf()))return m}return p}i(c,"dateTimeDeserializer");let l,u;try{u=yield e.readBody(),u&&u.length>0&&(r&&r.deserializeDates?l=JSON.parse(u,c):l=JSON.parse(u),a.result=l),a.headers=e.message.headers}catch{}if(o>299){let d;l&&l.message?d=l.message:u&&u.length>0?d=u:d=`Failed request: (${o})`;let p=new Fa(d,o);p.result=a.result,s(p)}else n(a)}))})}},gC=i(t=>Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}),"lowercaseKeys");var urt=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};var VA=class{static{i(this,"BearerCredentialHandler")}constructor(e){this.token=e}prepareRequest(e){if(!e.headers)throw Error("The request has no headers");e.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return urt(this,void 0,void 0,function*(){throw new Error("not implemented")})}};var wh=R(require("fs"),1),hAe=require("url");var Ua=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};var qle=require("node:os"),Gle=R(require("node:util"),1),Hle=R(require("node:process"),1);function $le(t,...e){Hle.default.stderr.write(`${Gle.default.format(t,...e)}${qle.EOL}`)}i($le,"log");var zle=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Wle,hq=[],gq=[],xB=[];zle&&yq(zle);var Yle=Object.assign(t=>Jle(t),{enable:yq,enabled:Eq,disable:drt,log:$le});function yq(t){Wle=t,hq=[],gq=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?gq.push(r.substring(1)):hq.push(r);for(let r of xB)r.enabled=Eq(r.namespace)}i(yq,"enable");function Eq(t){if(t.endsWith("*"))return!0;for(let e of gq)if(Vle(t,e))return!1;for(let e of hq)if(Vle(t,e))return!0;return!1}i(Eq,"enabled");function Vle(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let m=[],f="";for(let A of e)A==="*"&&f==="*"||(f=A,m.push(A));r=m.join("")}let n=0,s=0,o=r.length,a=t.length,c=-1,l=-1;for(;n=0){if(s=c+1,n=l+1,n===a)return!1;for(;t[n]!==r[s];)if(n++,n===a)return!1;l=n,n++,s++;continue}else return!1;let u=n===t.length,d=s===r.length,p=s===r.length-1&&r[s]==="*";return u&&(d||p)}i(Vle,"namespaceMatches");function drt(){let t=Wle||"";return yq(""),t}i(drt,"disable");function Jle(t){let e=Object.assign(r,{enabled:Eq(t),destroy:prt,log:Yle.log,namespace:t,extend:mrt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return i(r,"debug"),xB.push(e),e}i(Jle,"createDebugger");function prt(){let t=xB.indexOf(this);return t>=0?(xB.splice(t,1),!0):!1}i(prt,"destroy");function mrt(t){let e=Jle(`${this.namespace}:${t}`);return e.log=this.log,e}i(mrt,"extend");var WA=Yle;var Cq=["verbose","info","warning","error"],jle={verbose:400,info:300,warning:200,error:100};function Kle(t,e){e.log=(...r)=>{t.log(...r)}}i(Kle,"patchLogMethod");function Xle(t){return Cq.includes(t)}i(Xle,"isTypeSpecRuntimeLogLevel");function bB(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,n,s=WA(t.namespace);s.log=(...d)=>{WA.log(...d)};function o(d){if(d&&!Xle(d))throw new Error(`Unknown log level '${d}'. Acceptable values: ${Cq.join(",")}`);n=d;let p=[];for(let m of e)a(m)&&p.push(m.namespace);WA.enable(p.join(","))}i(o,"contextSetLogLevel"),r&&(Xle(r)?o(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${Cq.join(", ")}.`));function a(d){return!!(n&&jle[d.level]<=jle[n])}i(a,"shouldEnable");function c(d,p){let m=Object.assign(d.extend(p),{level:p});if(Kle(d,m),a(m)){let f=WA.disable();WA.enable(f+","+m.namespace)}return e.add(m),m}i(c,"createLogger");function l(){return n}i(l,"contextGetLogLevel");function u(d){let p=s.extend(d);return Kle(s,p),{error:c(p,"error"),warning:c(p,"warning"),info:c(p,"info"),verbose:c(p,"verbose")}}return i(u,"contextCreateClientLogger"),{setLogLevel:o,getLogLevel:l,createClientLogger:u,logger:s}}i(bB,"createLoggerContext");var Zle=bB({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),frt=Zle.logger;function EC(t){return Zle.createClientLogger(t)}i(EC,"createClientLogger");function BB(t){return t.toLowerCase()}i(BB,"normalizeName");function*Art(t){for(let e of t.values())yield[e.name,e.value]}i(Art,"headerIterator");var Iq=class{static{i(this,"HttpHeadersImpl")}_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(BB(e),{name:e,value:String(r).trim()})}get(e){return this._headersMap.get(BB(e))?.value}has(e){return this._headersMap.has(BB(e))}delete(e){this._headersMap.delete(BB(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.values())r[n.name]=n.value;else for(let[n,s]of this._headersMap)r[n]=s.value;return r}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return Art(this._headersMap)}};function oo(t){return new Iq(t)}i(oo,"createHttpHeaders");function Kp(){return crypto.randomUUID()}i(Kp,"randomUUID");var wq=class{static{i(this,"PipelineRequestImpl")}url;method;headers;timeout;withCredentials;body;multipartBody;formData;streamResponseStatusCodes;enableBrowserStreams;proxySettings;disableKeepAlive;abortSignal;requestId;allowInsecureConnection;onUploadProgress;onDownloadProgress;requestOverrides;authSchemes;constructor(e){this.url=e.url,this.body=e.body,this.headers=e.headers??oo(),this.method=e.method??"GET",this.timeout=e.timeout??0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=e.disableKeepAlive??!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=e.withCredentials??!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Kp(),this.allowInsecureConnection=e.allowInsecureConnection??!1,this.enableBrowserStreams=e.enableBrowserStreams??!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}};function RB(t){return new wq(t)}i(RB,"createPipelineRequest");var eue=new Set(["Deserialize","Serialize","Retry","Sign"]),Sq=class t{static{i(this,"HttpPipeline")}_policies=[];_orderedPolicies;constructor(e){this._policies=e?.slice(0)??[],this._orderedPolicies=void 0}addPolicy(e,r={}){if(r.phase&&r.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(r.phase&&!eue.has(r.phase))throw new Error(`Invalid phase name: ${r.phase}`);if(r.afterPhase&&!eue.has(r.afterPhase))throw new Error(`Invalid afterPhase name: ${r.afterPhase}`);this._policies.push({policy:e,options:r}),this._orderedPolicies=void 0}removePolicy(e){let r=[];return this._policies=this._policies.filter(n=>e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase?(r.push(n.policy),!1):!0),this._orderedPolicies=void 0,r}sendRequest(e,r){return this.getOrderedPolicies().reduceRight((o,a)=>c=>a.sendRequest(c,o),o=>e.sendRequest(o))(r)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new t(this._policies)}static create(){return new t}orderPolicies(){let e=[],r=new Map;function n(A){return{name:A,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}i(n,"createPhase");let s=n("Serialize"),o=n("None"),a=n("Deserialize"),c=n("Retry"),l=n("Sign"),u=[s,o,a,c,l];function d(A){return A==="Retry"?c:A==="Serialize"?s:A==="Deserialize"?a:A==="Sign"?l:o}i(d,"getPhase");for(let A of this._policies){let h=A.policy,E=A.options,C=h.name;if(r.has(C))throw new Error("Duplicate policy names not allowed in pipeline");let w={policy:h,dependsOn:new Set,dependants:new Set};E.afterPhase&&(w.afterPhase=d(E.afterPhase),w.afterPhase.hasAfterPolicies=!0),r.set(C,w),d(E.phase).policies.add(w)}for(let A of this._policies){let{policy:h,options:E}=A,C=h.name,w=r.get(C);if(!w)throw new Error(`Missing node for policy ${C}`);if(E.afterPolicies)for(let x of E.afterPolicies){let b=r.get(x);b&&(w.dependsOn.add(b),b.dependants.add(w))}if(E.beforePolicies)for(let x of E.beforePolicies){let b=r.get(x);b&&(b.dependsOn.add(w),w.dependants.add(b))}}function p(A){A.hasRun=!0;for(let h of A.policies)if(!(h.afterPhase&&(!h.afterPhase.hasRun||h.afterPhase.policies.size))&&h.dependsOn.size===0){e.push(h.policy);for(let E of h.dependants)E.dependsOn.delete(h);r.delete(h.policy.name),A.policies.delete(h)}}i(p,"walkPhase");function m(){for(let A of u){if(p(A),A.policies.size>0&&A!==o){o.hasRun||p(o);return}A.hasAfterPolicies&&p(o)}}i(m,"walkPhases");let f=0;for(;r.size>0;){f++;let A=e.length;if(m(),e.length<=A&&f>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}};function NB(){return Sq.create()}i(NB,"createEmptyPipeline");function YA(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}i(YA,"isObject");function Xp(t){if(YA(t)){let e=typeof t.name=="string",r=typeof t.message=="string";return e&&r}return!1}i(Xp,"isError");var tue=require("node:util"),rue=tue.inspect.custom;var xq="REDACTED",hrt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],grt=["api-version"],Li=class{static{i(this,"Sanitizer")}allowedHeaderNames;allowedQueryParameters;constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:r=[]}={}){e=hrt.concat(e),r=grt.concat(r),this.allowedHeaderNames=new Set(e.map(n=>n.toLowerCase())),this.allowedQueryParameters=new Set(r.map(n=>n.toLowerCase()))}sanitize(e){let r=new Set;return JSON.stringify(e,(n,s)=>{if(s instanceof Error)return{...s,name:s.name,message:s.message};if(n==="headers")return this.sanitizeHeaders(s);if(n==="url")return this.sanitizeUrl(s);if(n==="query")return this.sanitizeQuery(s);if(n==="body")return;if(n==="response")return;if(n==="operationSpec")return;if(Array.isArray(s)||YA(s)){if(r.has(s))return"[Circular]";r.add(s)}return s},2)}sanitizeUrl(e){if(typeof e!="string"||e===null||e==="")return e;let r=new URL(e);if(!r.search)return e;for(let[n]of r.searchParams)this.allowedQueryParameters.has(n.toLowerCase())||r.searchParams.set(n,xq);return r.toString()}sanitizeHeaders(e){let r={};for(let n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?r[n]=e[n]:r[n]=xq;return r}sanitizeQuery(e){if(typeof e!="object"||e===null)return e;let r={};for(let n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?r[n]=e[n]:r[n]=xq;return r}};var yrt=new Li,jn=class t extends Error{static{i(this,"RestError")}static REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";static PARSE_ERROR="PARSE_ERROR";code;statusCode;request;response;details;constructor(e,r={}){super(e),this.name="RestError",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,"request",{value:r.request,enumerable:!1}),Object.defineProperty(this,"response",{value:r.response,enumerable:!1});let n=this.request?.agent?{maxFreeSockets:this.request.agent.maxFreeSockets,maxSockets:this.request.agent.maxSockets}:void 0;Object.defineProperty(this,rue,{value:i(()=>`RestError: ${this.message} - ${yrt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function TB(t){return t instanceof jn?!0:Xp(t)&&t.name==="RestError"}i(TB,"isRestError");function Is(t,e){return Buffer.from(t,e)}i(Is,"stringToUint8Array");var vB=R(require("node:http"),1),PB=R(require("node:https"),1),bq=R(require("node:zlib"),1),sue=require("node:stream");var Ho=EC("ts-http-runtime");var Ert={};function CC(t){return t&&typeof t.pipe=="function"}i(CC,"isReadableStream");function nue(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=i(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}i(nue,"isStreamComplete");function oue(t){return t&&typeof t.byteLength=="number"}i(oue,"isArrayBuffer");var QB=class extends sue.Transform{static{i(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},Bq=class{static{i(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ua("The operation was aborted. Request has already been canceled.");n=i(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let u=new Li;Ho.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let o=e.headers.get("Accept-Encoding"),a=o?.includes("gzip")||o?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=Srt(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let A=e.onUploadProgress,h=new QB(A);h.on("error",E=>{Ho.error("Error in upload progress",E)}),CC(c)?c.pipe(h):h.end(c),c=h}let u=await this.makeRequest(e,r,c);s!==void 0&&clearTimeout(s);let d=Crt(u),m={status:u.statusCode??0,headers:d,request:e};if(e.method==="HEAD")return u.resume(),m;l=a?Irt(u,d):u;let f=e.onDownloadProgress;if(f){let A=new QB(f);A.on("error",h=>{Ho.error("Error in download progress",h)}),l.pipe(A),l=A}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(m.status)?m.readableStreamBody=l:m.bodyAsText=await wrt(l),m}finally{if(e.abortSignal&&n){let u=Promise.resolve();CC(c)&&(u=nue(c));let d=Promise.resolve();CC(l)&&(d=nue(l)),Promise.all([u,d]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(p=>{Ho.warning("Error when cleaning up abortListener on httpRequest",p)})}}}makeRequest(e,r,n){let s=new URL(e.url),o=s.protocol!=="https:";if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,o),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let d=o?vB.default.request(c,l):PB.default.request(c,l);d.once("error",p=>{u(new jn(p.message,{code:p.code??jn.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let p=new Ua("The operation was aborted. Rejecting from abort signal callback while making request.");d.destroy(p),u(p)}),n&&CC(n)?n.pipe(d):n?typeof n=="string"||Buffer.isBuffer(n)?d.end(n):oue(n)?d.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Ho.error("Unrecognized body type",n),u(new jn("Unrecognized body type"))):d.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?vB.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new vB.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return PB.default.globalAgent;let s=e.tlsSettings??Ert,o=this.cachedHttpsAgents.get(s);return o&&o.options.keepAlive===!n||(Ho.info("No cached TLS Agent exist, creating a new Agent"),o=new PB.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,o)),o}}};function Crt(t){let e=oo();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}i(Crt,"getResponseHeaders");function Irt(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=bq.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=bq.default.createInflate();return t.pipe(n),n}return t}i(Irt,"getDecodedResponseStream");function wrt(t){return new Promise((e,r)=>{let n=[];t.on("data",s=>{Buffer.isBuffer(s)?n.push(s):n.push(Buffer.from(s))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",s=>{s&&s?.name==="AbortError"?r(s):r(new jn(`Error reading response as text: ${s.message}`,{code:jn.PARSE_ERROR}))})})}i(wrt,"streamToText");function Srt(t){return t?Buffer.isBuffer(t)?t.length:CC(t)?null:oue(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}i(Srt,"getBodyLength");function iue(){return new Bq}i(iue,"createNodeHttpClient");function _B(){return iue()}i(_B,"createDefaultHttpClient");var Rq="logPolicy";function DB(t={}){let e=t.logger??Ho.info,r=new Li({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:Rq,async sendRequest(n,s){if(!e.enabled)return s(n);e(`Request: ${r.sanitize(n)}`);let o=await s(n);return e(`Response status code: ${o.status}`),e(`Headers: ${r.sanitize(o.headers)}`),o}}}i(DB,"logPolicy");var kB="redirectPolicy",aue=["GET","HEAD"];function LB(t={}){let{maxRetries:e=20}=t;return{name:kB,async sendRequest(r,n){let s=await n(r);return cue(n,s,e)}}}i(LB,"redirectPolicy");async function cue(t,e,r,n=0){let{request:s,status:o,headers:a}=e,c=a.get("location");if(c&&(o===300||o===301&&aue.includes(s.method)||o===302&&aue.includes(s.method)||o===303&&s.method==="POST"||o===307)&&n{let o,a,c=i(()=>s(new Ua(r?.abortErrorMsg?r?.abortErrorMsg:xrt)),"rejectOnAbort"),l=i(()=>{r?.abortSignal&&a&&r.abortSignal.removeEventListener("abort",a)},"removeListeners");if(a=i(()=>(o&&clearTimeout(o),l(),c()),"onAborted"),r?.abortSignal&&r.abortSignal.aborted)return c();o=setTimeout(()=>{l(),n(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",a)})}i(due,"delay");function pue(t,e){let r=t.headers.get(e);if(!r)return;let n=Number(r);if(!Number.isNaN(n))return n}i(pue,"parseHeaderValueAsNumber");var Nq="Retry-After",brt=["retry-after-ms","x-ms-retry-after-ms",Nq];function mue(t){if(t&&[429,503].includes(t.status))try{for(let s of brt){let o=pue(t,s);if(o===0||o)return o*(s===Nq?1e3:1)}let e=t.headers.get(Nq);if(!e)return;let n=Date.parse(e)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}i(mue,"getRetryAfterInMs");function fue(t){return Number.isFinite(mue(t))}i(fue,"isThrottlingRetryResponse");function Tq(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=mue(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}i(Tq,"throttlingRetryStrategy");var Brt=1e3,Rrt=1e3*64;function UB(t={}){let e=t.retryDelayInMs??Brt,r=t.maxRetryDelayInMs??Rrt;return{name:"exponentialRetryStrategy",retry({retryCount:n,response:s,responseError:o}){let a=Trt(o),c=a&&t.ignoreSystemErrors,l=Nrt(s),u=l&&t.ignoreHttpStatusCodes;return s&&(fue(s)||!l)||u||c?{skipStrategy:!0}:o&&!a&&!l?{errorToThrow:o}:FB(n,{retryDelayInMs:e,maxRetryDelayInMs:r})}}}i(UB,"exponentialRetryStrategy");function Nrt(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}i(Nrt,"isExponentialRetryResponse");function Trt(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}i(Trt,"isSystemError");var vrt=EC("ts-http-runtime retryPolicy"),Prt="retryPolicy";function em(t,e={maxRetries:3}){let r=e.logger||vrt;return{name:Prt,async sendRequest(n,s){let o,a,c=-1;e:for(;;){c+=1,o=void 0,a=void 0;try{r.info(`Retry ${c}: Attempting to send request`,n.requestId),o=await s(n),r.info(`Retry ${c}: Received a response from request`,n.requestId)}catch(l){if(r.error(`Retry ${c}: Received an error from request`,n.requestId),a=l,!l||a.name!=="RestError")throw l;o=a.response}if(n.abortSignal?.aborted)throw r.error(`Retry ${c}: Request aborted.`),new Ua;if(c>=(e.maxRetries??3)){if(r.info(`Retry ${c}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),a)throw a;if(o)return o;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${c}: Processing ${t.length} retry strategies.`);t:for(let l of t){let u=l.logger||r;u.info(`Retry ${c}: Processing retry strategy ${l.name}.`);let d=l.retry({retryCount:c,response:o,responseError:a});if(d.skipStrategy){u.info(`Retry ${c}: Skipped.`);continue t}let{errorToThrow:p,retryAfterInMs:m,redirectTo:f}=d;if(p)throw u.error(`Retry ${c}: Retry strategy ${l.name} throws error:`,p),p;if(m||m===0){u.info(`Retry ${c}: Retry strategy ${l.name} retries after ${m}`),await due(m,void 0,{abortSignal:n.abortSignal});continue e}if(f){u.info(`Retry ${c}: Retry strategy ${l.name} redirects to ${f}`),n.url=f;continue e}}if(a)throw r.info("None of the retry strategies could work with the received error. Throwing it."),a;if(o)return r.info("None of the retry strategies could work with the received response. Returning it."),o}}}}i(em,"retryPolicy");var vq="defaultRetryPolicy";function qB(t={}){return{name:vq,sendRequest:em([Tq(),UB(t)],{maxRetries:t.maxRetries??3}).sendRequest}}i(qB,"defaultRetryPolicy");var Aue=typeof window<"u"&&typeof window.document<"u",hue=typeof self=="object"&&typeof self?.importScripts=="function"&&(self.constructor?.name==="DedicatedWorkerGlobalScope"||self.constructor?.name==="ServiceWorkerGlobalScope"||self.constructor?.name==="SharedWorkerGlobalScope"),gue=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",yue=typeof Bun<"u"&&typeof Bun.version<"u",tm=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!globalThis.process.versions?.node;var Eue=typeof navigator<"u"&&navigator?.product==="ReactNative";var Pq="formDataPolicy";function Qrt(t){let e={};for(let[r,n]of t.entries())e[r]??=[],e[r].push(n);return e}i(Qrt,"formDataToFormDataMap");function GB(){return{name:Pq,async sendRequest(t,e){if(tm&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=Qrt(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=_rt(t.formData):await Drt(t.formData,t),t.formData=void 0}return e(t)}}}i(GB,"formDataPolicy");function _rt(t){let e=new URLSearchParams;for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.append(r,s.toString());else e.append(r,n.toString());return e.toString()}i(_rt,"wwwFormUrlEncode");async function Drt(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let n=[];for(let[s,o]of Object.entries(t))for(let a of Array.isArray(o)?o:[o])if(typeof a=="string")n.push({headers:oo({"Content-Disposition":`form-data; name="${s}"`}),body:Is(a,"utf-8")});else{if(a==null||typeof a!="object")throw new Error(`Unexpected value for key ${s}: ${a}. Value should be serialized to string first.`);{let c=a.name||"blob",l=oo();l.set("Content-Disposition",`form-data; name="${s}"; filename="${c}"`),l.set("Content-Type",a.type||"application/octet-stream"),n.push({headers:l,body:a})}}e.multipartBody={parts:n}}i(Drt,"prepareFormData");var nde=R($ue(),1),sde=R(Zue(),1);var Gnt="HTTPS_PROXY",Hnt="HTTP_PROXY",$nt="ALL_PROXY",znt="NO_PROXY",Mq="proxyPolicy",ede=[],ode=!1,Vnt=new Map;function KB(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}i(KB,"getEnvironmentValue");function ide(){if(!process)return;let t=KB(Gnt),e=KB($nt),r=KB(Hnt);return t||e||r}i(ide,"loadEnvironmentProxyValue");function Wnt(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let s=!1;for(let o of e)o[0]==="."?(n.endsWith(o)||n.length===o.length-1&&n===o.slice(1))&&(s=!0):n===o&&(s=!0);return r?.set(n,s),s}i(Wnt,"isBypassed");function Ynt(){let t=KB(znt);return ode=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}i(Ynt,"loadNoProxy");function Fq(t){if(!t&&(t=ide(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}i(Fq,"getDefaultProxySettings");function Jnt(){let t=ide();return t?new URL(t):void 0}i(Jnt,"getDefaultProxySettingsInternal");function tde(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}i(tde,"getUrlFromProxySettings");function rde(t,e,r){if(t.agent)return;let s=new URL(t.url).protocol!=="https:";t.tlsSettings&&Ho.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let o=t.headers.toJSON();s?(e.httpProxyAgent||(e.httpProxyAgent=new sde.HttpProxyAgent(r,{headers:o})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new nde.HttpsProxyAgent(r,{headers:o})),t.agent=e.httpsProxyAgent)}i(rde,"setProxyAgentOnRequest");function XB(t,e){ode||ede.push(...Ynt());let r=t?tde(t):Jnt(),n={};return{name:Mq,async sendRequest(s,o){return!s.proxySettings&&r&&!Wnt(s.url,e?.customNoProxyList??ede,e?.customNoProxyList?void 0:Vnt)?rde(s,n,r):s.proxySettings&&rde(s,n,tde(s.proxySettings)),o(s)}}}i(XB,"proxyPolicy");var Uq="agentPolicy";function ZB(t){return{name:Uq,sendRequest:i(async(e,r)=>(e.agent||(e.agent=t),r(e)),"sendRequest")}}i(ZB,"agentPolicy");var qq="tlsPolicy";function eR(t){return{name:qq,sendRequest:i(async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e)),"sendRequest")}}i(eR,"tlsPolicy");function tR(t){return typeof t.stream=="function"}i(tR,"isBlob");var rR=require("stream");async function*ade(){let t=this.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)return;yield r}}finally{t.releaseLock()}}i(ade,"streamAsyncIterator");function jnt(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=ade.bind(t)),t.values||(t.values=ade.bind(t))}i(jnt,"makeAsyncIterable");function cde(t){return t instanceof ReadableStream?(jnt(t),rR.Readable.fromWeb(t)):t}i(cde,"ensureNodeStream");function Knt(t){return t instanceof Uint8Array?rR.Readable.from(Buffer.from(t)):tR(t)?cde(t.stream()):cde(t)}i(Knt,"toStream");async function lde(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(Knt);return rR.Readable.from((async function*(){for(let r of e)for await(let n of r)yield n})())}}i(lde,"concat");function Xnt(){return`----AzSDKFormBoundary${Kp()}`}i(Xnt,"generateBoundary");function Znt(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r + ${yrt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function TB(t){return t instanceof jn?!0:Xp(t)&&t.name==="RestError"}i(TB,"isRestError");function Is(t,e){return Buffer.from(t,e)}i(Is,"stringToUint8Array");var vB=R(require("node:http"),1),PB=R(require("node:https"),1),bq=R(require("node:zlib"),1),sue=require("node:stream");var Ho=EC("ts-http-runtime");var Ert={};function CC(t){return t&&typeof t.pipe=="function"}i(CC,"isReadableStream");function nue(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=i(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}i(nue,"isStreamComplete");function oue(t){return t&&typeof t.byteLength=="number"}i(oue,"isArrayBuffer");var QB=class extends sue.Transform{static{i(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},Bq=class{static{i(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ua("The operation was aborted. Request has already been canceled.");n=i(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let u=new Li;Ho.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let o=e.headers.get("Accept-Encoding"),a=o?.includes("gzip")||o?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=Srt(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let A=e.onUploadProgress,h=new QB(A);h.on("error",E=>{Ho.error("Error in upload progress",E)}),CC(c)?c.pipe(h):h.end(c),c=h}let u=await this.makeRequest(e,r,c);s!==void 0&&clearTimeout(s);let d=Crt(u),m={status:u.statusCode??0,headers:d,request:e};if(e.method==="HEAD")return u.resume(),m;l=a?Irt(u,d):u;let f=e.onDownloadProgress;if(f){let A=new QB(f);A.on("error",h=>{Ho.error("Error in download progress",h)}),l.pipe(A),l=A}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(m.status)?m.readableStreamBody=l:m.bodyAsText=await wrt(l),m}finally{if(e.abortSignal&&n){let u=Promise.resolve();CC(c)&&(u=nue(c));let d=Promise.resolve();CC(l)&&(d=nue(l)),Promise.all([u,d]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(p=>{Ho.warning("Error when cleaning up abortListener on httpRequest",p)})}}}makeRequest(e,r,n){let s=new URL(e.url),o=s.protocol!=="https:";if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,o),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let d=o?vB.default.request(c,l):PB.default.request(c,l);d.once("error",p=>{u(new jn(p.message,{code:p.code??jn.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let p=new Ua("The operation was aborted. Rejecting from abort signal callback while making request.");d.destroy(p),u(p)}),n&&CC(n)?n.pipe(d):n?typeof n=="string"||Buffer.isBuffer(n)?d.end(n):oue(n)?d.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Ho.error("Unrecognized body type",n),u(new jn("Unrecognized body type"))):d.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?vB.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new vB.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return PB.default.globalAgent;let s=e.tlsSettings??Ert,o=this.cachedHttpsAgents.get(s);return o&&o.options.keepAlive===!n||(Ho.info("No cached TLS Agent exist, creating a new Agent"),o=new PB.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,o)),o}}};function Crt(t){let e=oo();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}i(Crt,"getResponseHeaders");function Irt(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=bq.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=bq.default.createInflate();return t.pipe(n),n}return t}i(Irt,"getDecodedResponseStream");function wrt(t){return new Promise((e,r)=>{let n=[];t.on("data",s=>{Buffer.isBuffer(s)?n.push(s):n.push(Buffer.from(s))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",s=>{s&&s?.name==="AbortError"?r(s):r(new jn(`Error reading response as text: ${s.message}`,{code:jn.PARSE_ERROR}))})})}i(wrt,"streamToText");function Srt(t){return t?Buffer.isBuffer(t)?t.length:CC(t)?null:oue(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}i(Srt,"getBodyLength");function iue(){return new Bq}i(iue,"createNodeHttpClient");function _B(){return iue()}i(_B,"createDefaultHttpClient");var Rq="logPolicy";function DB(t={}){let e=t.logger??Ho.info,r=new Li({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:Rq,async sendRequest(n,s){if(!e.enabled)return s(n);e(`Request: ${r.sanitize(n)}`);let o=await s(n);return e(`Response status code: ${o.status}`),e(`Headers: ${r.sanitize(o.headers)}`),o}}}i(DB,"logPolicy");var kB="redirectPolicy",aue=["GET","HEAD"];function LB(t={}){let{maxRetries:e=20}=t;return{name:kB,async sendRequest(r,n){let s=await n(r);return cue(n,s,e)}}}i(LB,"redirectPolicy");async function cue(t,e,r,n=0){let{request:s,status:o,headers:a}=e,c=a.get("location");if(c&&(o===300||o===301&&aue.includes(s.method)||o===302&&aue.includes(s.method)||o===303&&s.method==="POST"||o===307)&&n{let o,a,c=i(()=>s(new Ua(r?.abortErrorMsg?r?.abortErrorMsg:xrt)),"rejectOnAbort"),l=i(()=>{r?.abortSignal&&a&&r.abortSignal.removeEventListener("abort",a)},"removeListeners");if(a=i(()=>(o&&clearTimeout(o),l(),c()),"onAborted"),r?.abortSignal&&r.abortSignal.aborted)return c();o=setTimeout(()=>{l(),n(e)},t),r?.abortSignal&&r.abortSignal.addEventListener("abort",a)})}i(due,"delay");function pue(t,e){let r=t.headers.get(e);if(!r)return;let n=Number(r);if(!Number.isNaN(n))return n}i(pue,"parseHeaderValueAsNumber");var Nq="Retry-After",brt=["retry-after-ms","x-ms-retry-after-ms",Nq];function mue(t){if(t&&[429,503].includes(t.status))try{for(let s of brt){let o=pue(t,s);if(o===0||o)return o*(s===Nq?1e3:1)}let e=t.headers.get(Nq);if(!e)return;let n=Date.parse(e)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch{return}}i(mue,"getRetryAfterInMs");function fue(t){return Number.isFinite(mue(t))}i(fue,"isThrottlingRetryResponse");function Tq(){return{name:"throttlingRetryStrategy",retry({response:t}){let e=mue(t);return Number.isFinite(e)?{retryAfterInMs:e}:{skipStrategy:!0}}}}i(Tq,"throttlingRetryStrategy");var Brt=1e3,Rrt=1e3*64;function UB(t={}){let e=t.retryDelayInMs??Brt,r=t.maxRetryDelayInMs??Rrt;return{name:"exponentialRetryStrategy",retry({retryCount:n,response:s,responseError:o}){let a=Trt(o),c=a&&t.ignoreSystemErrors,l=Nrt(s),u=l&&t.ignoreHttpStatusCodes;return s&&(fue(s)||!l)||u||c?{skipStrategy:!0}:o&&!a&&!l?{errorToThrow:o}:FB(n,{retryDelayInMs:e,maxRetryDelayInMs:r})}}}i(UB,"exponentialRetryStrategy");function Nrt(t){return!!(t&&t.status!==void 0&&(t.status>=500||t.status===408)&&t.status!==501&&t.status!==505)}i(Nrt,"isExponentialRetryResponse");function Trt(t){return t?t.code==="ETIMEDOUT"||t.code==="ESOCKETTIMEDOUT"||t.code==="ECONNREFUSED"||t.code==="ECONNRESET"||t.code==="ENOENT"||t.code==="ENOTFOUND":!1}i(Trt,"isSystemError");var vrt=EC("ts-http-runtime retryPolicy"),Prt="retryPolicy";function em(t,e={maxRetries:3}){let r=e.logger||vrt;return{name:Prt,async sendRequest(n,s){let o,a,c=-1;e:for(;;){c+=1,o=void 0,a=void 0;try{r.info(`Retry ${c}: Attempting to send request`,n.requestId),o=await s(n),r.info(`Retry ${c}: Received a response from request`,n.requestId)}catch(l){if(r.error(`Retry ${c}: Received an error from request`,n.requestId),a=l,!l||a.name!=="RestError")throw l;o=a.response}if(n.abortSignal?.aborted)throw r.error(`Retry ${c}: Request aborted.`),new Ua;if(c>=(e.maxRetries??3)){if(r.info(`Retry ${c}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),a)throw a;if(o)return o;throw new Error("Maximum retries reached with no response or error to throw")}r.info(`Retry ${c}: Processing ${t.length} retry strategies.`);t:for(let l of t){let u=l.logger||r;u.info(`Retry ${c}: Processing retry strategy ${l.name}.`);let d=l.retry({retryCount:c,response:o,responseError:a});if(d.skipStrategy){u.info(`Retry ${c}: Skipped.`);continue t}let{errorToThrow:p,retryAfterInMs:m,redirectTo:f}=d;if(p)throw u.error(`Retry ${c}: Retry strategy ${l.name} throws error:`,p),p;if(m||m===0){u.info(`Retry ${c}: Retry strategy ${l.name} retries after ${m}`),await due(m,void 0,{abortSignal:n.abortSignal});continue e}if(f){u.info(`Retry ${c}: Retry strategy ${l.name} redirects to ${f}`),n.url=f;continue e}}if(a)throw r.info("None of the retry strategies could work with the received error. Throwing it."),a;if(o)return r.info("None of the retry strategies could work with the received response. Returning it."),o}}}}i(em,"retryPolicy");var vq="defaultRetryPolicy";function qB(t={}){return{name:vq,sendRequest:em([Tq(),UB(t)],{maxRetries:t.maxRetries??3}).sendRequest}}i(qB,"defaultRetryPolicy");var Aue=typeof window<"u"&&typeof window.document<"u",hue=typeof self=="object"&&typeof self?.importScripts=="function"&&(self.constructor?.name==="DedicatedWorkerGlobalScope"||self.constructor?.name==="ServiceWorkerGlobalScope"||self.constructor?.name==="SharedWorkerGlobalScope"),gue=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",yue=typeof Bun<"u"&&typeof Bun.version<"u",tm=typeof globalThis.process<"u"&&!!globalThis.process.version&&!!globalThis.process.versions?.node;var Eue=typeof navigator<"u"&&navigator?.product==="ReactNative";var Pq="formDataPolicy";function Qrt(t){let e={};for(let[r,n]of t.entries())e[r]??=[],e[r].push(n);return e}i(Qrt,"formDataToFormDataMap");function GB(){return{name:Pq,async sendRequest(t,e){if(tm&&typeof FormData<"u"&&t.body instanceof FormData&&(t.formData=Qrt(t.body),t.body=void 0),t.formData){let r=t.headers.get("Content-Type");r&&r.indexOf("application/x-www-form-urlencoded")!==-1?t.body=_rt(t.formData):await Drt(t.formData,t),t.formData=void 0}return e(t)}}}i(GB,"formDataPolicy");function _rt(t){let e=new URLSearchParams;for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.append(r,s.toString());else e.append(r,n.toString());return e.toString()}i(_rt,"wwwFormUrlEncode");async function Drt(t,e){let r=e.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;e.headers.set("Content-Type",r??"multipart/form-data");let n=[];for(let[s,o]of Object.entries(t))for(let a of Array.isArray(o)?o:[o])if(typeof a=="string")n.push({headers:oo({"Content-Disposition":`form-data; name="${s}"`}),body:Is(a,"utf-8")});else{if(a==null||typeof a!="object")throw new Error(`Unexpected value for key ${s}: ${a}. Value should be serialized to string first.`);{let c=a.name||"blob",l=oo();l.set("Content-Disposition",`form-data; name="${s}"; filename="${c}"`),l.set("Content-Type",a.type||"application/octet-stream"),n.push({headers:l,body:a})}}e.multipartBody={parts:n}}i(Drt,"prepareFormData");var nde=R($ue(),1),sde=R(Zue(),1);var Gnt="HTTPS_PROXY",Hnt="HTTP_PROXY",$nt="ALL_PROXY",znt="NO_PROXY",Mq="proxyPolicy",ede=[],ode=!1,Vnt=new Map;function KB(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}i(KB,"getEnvironmentValue");function ide(){if(!process)return;let t=KB(Gnt),e=KB($nt),r=KB(Hnt);return t||e||r}i(ide,"loadEnvironmentProxyValue");function Wnt(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let s=!1;for(let o of e)o[0]==="."?(n.endsWith(o)||n.length===o.length-1&&n===o.slice(1))&&(s=!0):n===o&&(s=!0);return r?.set(n,s),s}i(Wnt,"isBypassed");function Ynt(){let t=KB(znt);return ode=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}i(Ynt,"loadNoProxy");function Fq(t){if(!t&&(t=ide(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}i(Fq,"getDefaultProxySettings");function Jnt(){let t=ide();return t?new URL(t):void 0}i(Jnt,"getDefaultProxySettingsInternal");function tde(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}i(tde,"getUrlFromProxySettings");function rde(t,e,r){if(t.agent)return;let s=new URL(t.url).protocol!=="https:";t.tlsSettings&&Ho.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let o=t.headers.toJSON();s?(e.httpProxyAgent||(e.httpProxyAgent=new sde.HttpProxyAgent(r,{headers:o})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new nde.HttpsProxyAgent(r,{headers:o})),t.agent=e.httpsProxyAgent)}i(rde,"setProxyAgentOnRequest");function XB(t,e){ode||ede.push(...Ynt());let r=t?tde(t):Jnt(),n={};return{name:Mq,async sendRequest(s,o){return!s.proxySettings&&r&&!Wnt(s.url,e?.customNoProxyList??ede,e?.customNoProxyList?void 0:Vnt)?rde(s,n,r):s.proxySettings&&rde(s,n,tde(s.proxySettings)),o(s)}}}i(XB,"proxyPolicy");var Uq="agentPolicy";function ZB(t){return{name:Uq,sendRequest:i(async(e,r)=>(e.agent||(e.agent=t),r(e)),"sendRequest")}}i(ZB,"agentPolicy");var qq="tlsPolicy";function eR(t){return{name:qq,sendRequest:i(async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e)),"sendRequest")}}i(eR,"tlsPolicy");function tR(t){return typeof t.stream=="function"}i(tR,"isBlob");var rR=require("stream");async function*ade(){let t=this.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)return;yield r}}finally{t.releaseLock()}}i(ade,"streamAsyncIterator");function jnt(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=ade.bind(t)),t.values||(t.values=ade.bind(t))}i(jnt,"makeAsyncIterable");function cde(t){return t instanceof ReadableStream?(jnt(t),rR.Readable.fromWeb(t)):t}i(cde,"ensureNodeStream");function Knt(t){return t instanceof Uint8Array?rR.Readable.from(Buffer.from(t)):tR(t)?cde(t.stream()):cde(t)}i(Knt,"toStream");async function lde(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(Knt);return rR.Readable.from((async function*(){for(let r of e)for await(let n of r)yield n})())}}i(lde,"concat");function Xnt(){return`----AzSDKFormBoundary${Kp()}`}i(Xnt,"generateBoundary");function Znt(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r `;return e}i(Znt,"encodeHeaders");function est(t){return t instanceof Uint8Array?t.byteLength:tR(t)?t.size===-1?void 0:t.size:void 0}i(est,"getLength");function tst(t){let e=0;for(let r of t){let n=est(r);if(n===void 0)return;e+=n}return e}i(tst,"getTotalLength");async function rst(t,e,r){let n=[Is(`--${r}`,"utf-8"),...e.flatMap(o=>[Is(`\r `,"utf-8"),Is(Znt(o.headers),"utf-8"),Is(`\r `,"utf-8"),o.body,Is(`\r --${r}`,"utf-8")]),Is(`--\r \r -`,"utf-8")],s=tst(n);s&&t.headers.set("Content-Length",s),t.body=await lde(n)}i(rst,"buildRequestBody");var SC="multipartPolicy",nst=70,sst=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function ost(t){if(t.length>nst)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!sst.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}i(ost,"assertValidBoundary");function nR(){return{name:SC,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,o,a]=s;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?ost(r):r=Xnt(),t.headers.set("Content-Type",`${o}; boundary=${r}`),await rst(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}i(nR,"multipartPolicy");function sR(){return NB()}i(sR,"createEmptyPipeline");var ude=bB({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),dXt=ude.logger;function Ha(t){return ude.createClientLogger(t)}i(Ha,"createClientLogger");var $a=Ha("core-rest-pipeline");function $q(t={}){return DB({logger:$a.info,...t})}i($q,"logPolicy");var zq=kB;function Vq(t={}){return LB(t)}i(Vq,"redirectPolicy");var oR=R(require("node:os"),1),iR=R(require("node:process"),1);function dde(){return"User-Agent"}i(dde,"getHeaderName");async function pde(t){if(iR.default&&iR.default.versions){let e=`${oR.default.type()} ${oR.default.release()}; ${oR.default.arch()}`,r=iR.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}i(pde,"setPlatformSpecificData");var aR="1.22.2";function mst(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}i(mst,"getUserAgentString");function mde(){return dde()}i(mde,"getUserAgentHeaderName");async function cR(t){let e=new Map;e.set("core-rest-pipeline",aR),await pde(e);let r=mst(e);return t?`${t} ${r}`:r}i(cR,"getUserAgentValue");var fde=mde(),Ade="userAgentPolicy";function Wq(t={}){let e=cR(t.userAgentPrefix);return{name:Ade,async sendRequest(r,n){return r.headers.has(fde)||r.headers.set(fde,await e),n(r)}}}i(Wq,"userAgentPolicy");var lo=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function Yq(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((o,a)=>{function c(){a(new lo(s??"The operation was aborted."))}i(c,"rejectOnAbort");function l(){n?.removeEventListener("abort",u)}i(l,"removeListeners");function u(){r?.(),l(),c()}if(i(u,"onAbort"),n?.aborted)return c();try{t(d=>{l(),o(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}i(Yq,"createAbortablePromise");var yst="The delay was aborted.";function xC(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return Yq(o=>{r=setTimeout(o,t)},{cleanupBeforeAbort:i(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??yst})}i(xC,"delay");function Ju(t){if(Xp(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}i(Ju,"getErrorMessage");function hde(t){return Xp(t)}i(hde,"isError");function eh(){return Kp()}i(eh,"randomUUID");var it=tm;var gde=Symbol("rawContent");function jq(t){return typeof t[gde]=="function"}i(jq,"hasRawContent");function yde(t){return jq(t)?t[gde]():t}i(yde,"getRawContent");var lR=SC;function Kq(){let t=nR();return{name:lR,sendRequest:i(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)jq(n.body)&&(n.body=yde(n.body));return t.sendRequest(e,r)},"sendRequest")}}i(Kq,"multipartPolicy");var Xq=OB;function Zq(){return MB()}i(Zq,"decompressResponsePolicy");function eG(t={}){return qB(t)}i(eG,"defaultRetryPolicy");function tG(){return GB()}i(tG,"formDataPolicy");function ju(t){return Fq(t)}i(ju,"getDefaultProxySettings");function rG(t,e){return XB(t,e)}i(rG,"proxyPolicy");var Ede="setClientRequestIdPolicy";function nG(t="x-ms-client-request-id"){return{name:Ede,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}i(nG,"setClientRequestIdPolicy");function sG(t){return ZB(t)}i(sG,"agentPolicy");function oG(t){return eR(t)}i(oG,"tlsPolicy");var th={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Cde(t={}){let e=new iG(t.parentContext);return t.span&&(e=e.setValue(th.span,t.span)),t.namespace&&(e=e.setValue(th.namespace,t.namespace)),e}i(Cde,"createTracingContext");var iG=class t{static{i(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};var wde=R(Ide(),1),dR=wde.state;function Est(){return{end:i(()=>{},"end"),isRecording:i(()=>!1,"isRecording"),recordException:i(()=>{},"recordException"),setAttribute:i(()=>{},"setAttribute"),setStatus:i(()=>{},"setStatus"),addEvent:i(()=>{},"addEvent")}}i(Est,"createDefaultTracingSpan");function Cst(){return{createRequestHeaders:i(()=>({}),"createRequestHeaders"),parseTraceparentHeader:i(()=>{},"parseTraceparentHeader"),startSpan:i((t,e)=>({span:Est(),tracingContext:Cde({parentContext:e.tracingContext})}),"startSpan"),withContext(t,e,...r){return e(...r)}}}i(Cst,"createDefaultInstrumenter");function bC(){return dR.instrumenterImplementation||(dR.instrumenterImplementation=Cst()),dR.instrumenterImplementation}i(bC,"getInstrumenter");function BC(t){let{namespace:e,packageName:r,packageVersion:n}=t;function s(u,d,p){let m=bC().startSpan(u,{...p,packageName:r,packageVersion:n,tracingContext:d?.tracingOptions?.tracingContext}),f=m.tracingContext,A=m.span;f.getValue(th.namespace)||(f=f.setValue(th.namespace,e)),A.setAttribute("az.namespace",f.getValue(th.namespace));let h=Object.assign({},d,{tracingOptions:{...d?.tracingOptions,tracingContext:f}});return{span:A,updatedOptions:h}}i(s,"startSpan");async function o(u,d,p,m){let{span:f,updatedOptions:A}=s(u,d,m);try{let h=await a(A.tracingOptions.tracingContext,()=>Promise.resolve(p(A,f)));return f.setStatus({status:"success"}),h}catch(h){throw f.setStatus({status:"error",error:h}),h}finally{f.end()}}i(o,"withSpan");function a(u,d,...p){return bC().withContext(u,d,...p)}i(a,"withContext");function c(u){return bC().parseTraceparentHeader(u)}i(c,"parseTraceparentHeader");function l(u){return bC().createRequestHeaders(u)}return i(l,"createRequestHeaders"),{startSpan:s,withSpan:o,withContext:a,parseTraceparentHeader:c,createRequestHeaders:l}}i(BC,"createTracingClient");var vl=jn;function sm(t){return TB(t)}i(sm,"isRestError");var Sde="tracingPolicy";function aG(t={}){let e=cR(t.userAgentPrefix),r=new Li({additionalAllowedQueryParameters:t.additionalAllowedQueryParameters}),n=Ist();return{name:Sde,async sendRequest(s,o){if(!n)return o(s);let a=await e,c={"http.url":r.sanitizeUrl(s.url),"http.method":s.method,"http.user_agent":a,requestId:s.requestId};a&&(c["http.user_agent"]=a);let{span:l,tracingContext:u}=wst(n,s,c)??{};if(!l||!u)return o(s);try{let d=await n.withContext(u,o,s);return xst(l,d),d}catch(d){throw Sst(l,d),d}}}}i(aG,"tracingPolicy");function Ist(){try{return BC({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:aR})}catch(t){$a.warning(`Error when creating the TracingClient: ${Ju(t)}`);return}}i(Ist,"tryCreateTracingClient");function wst(t,e,r){try{let{span:n,updatedOptions:s}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:r});if(!n.isRecording()){n.end();return}let o=t.createRequestHeaders(s.tracingOptions.tracingContext);for(let[a,c]of Object.entries(o))e.headers.set(a,c);return{span:n,tracingContext:s.tracingOptions.tracingContext}}catch(n){$a.warning(`Skipping creating a tracing span due to an error: ${Ju(n)}`);return}}i(wst,"tryCreateSpan");function Sst(t,e){try{t.setStatus({status:"error",error:hde(e)?e:void 0}),sm(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(r){$a.warning(`Skipping tracing span processing due to an error: ${Ju(r)}`)}}i(Sst,"tryProcessError");function xst(t,e){try{t.setAttribute("http.status_code",e.status);let r=e.headers.get("x-ms-request-id");r&&t.setAttribute("serviceRequestId",r),e.status>=400&&t.setStatus({status:"error"}),t.end()}catch(r){$a.warning(`Skipping tracing span processing due to an error: ${Ju(r)}`)}}i(xst,"tryProcessResponse");function pR(t){if(t instanceof AbortSignal)return{abortSignal:t};if(t.aborted)return{abortSignal:AbortSignal.abort(t.reason)};let e=new AbortController,r=!0;function n(){r&&(t.removeEventListener("abort",s),r=!1)}i(n,"cleanup");function s(){e.abort(t.reason),n()}return i(s,"listener"),t.addEventListener("abort",s),{abortSignal:e.signal,cleanup:n}}i(pR,"wrapAbortSignalLike");var bst="wrapAbortSignalLikePolicy";function xde(){return{name:bst,sendRequest:i(async(t,e)=>{if(!t.abortSignal)return e(t);let{abortSignal:r,cleanup:n}=pR(t.abortSignal);t.abortSignal=r;try{return await e(t)}finally{n?.()}},"sendRequest")}}i(xde,"wrapAbortSignalLikePolicy");function cG(t){let e=sR();return it&&(t.agent&&e.addPolicy(sG(t.agent)),t.tlsOptions&&e.addPolicy(oG(t.tlsOptions)),e.addPolicy(rG(t.proxyOptions)),e.addPolicy(Zq())),e.addPolicy(xde()),e.addPolicy(tG(),{beforePolicies:[lR]}),e.addPolicy(Wq(t.userAgentOptions)),e.addPolicy(nG(t.telemetryOptions?.clientRequestIdHeaderName)),e.addPolicy(Kq(),{afterPhase:"Deserialize"}),e.addPolicy(eG(t.retryOptions),{phase:"Retry"}),e.addPolicy(aG({...t.userAgentOptions,...t.loggingOptions}),{afterPhase:"Retry"}),it&&e.addPolicy(Vq(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy($q(t.loggingOptions),{afterPhase:"Sign"}),e}i(cG,"createPipelineFromOptions");function RC(){let t=_B();return{async sendRequest(e){let{abortSignal:r,cleanup:n}=e.abortSignal?pR(e.abortSignal):{};try{return e.abortSignal=r,await t.sendRequest(e)}finally{n?.()}}}}i(RC,"createDefaultHttpClient");function Pl(t){return oo(t)}i(Pl,"createHttpHeaders");function NC(t){return RB(t)}i(NC,"createPipelineRequest");var qer=Ha("core-rest-pipeline retryPolicy");var Bst={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function Rst(t,e,r){async function n(){if(Date.now()t.getToken(l,u),"tryGetAccessToken"),o.retryIntervalInMs,n?.expiresOnTimestamp??Date.now()).then(p=>(r=null,n=p,s=u.tenantId,n)).catch(p=>{throw r=null,n=null,s=void 0,p})),r}return i(c,"refresh"),async(l,u)=>{let d=!!u.claims,p=s!==u.tenantId;return d&&(n=null),p||d||a.mustRefresh?c(l,u):(a.shouldRefresh&&c(l,u),n)}}i(lG,"createTokenCycler");var Nde="bearerTokenAuthenticationPolicy";async function mR(t,e){try{return[await e(t),void 0]}catch(r){if(sm(r)&&r.response)return[r.response,r];throw r}}i(mR,"trySendRequest");async function Nst(t){let{scopes:e,getAccessToken:r,request:n}=t,s={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions,enableCae:!0},o=await r(e,s);o&&t.request.headers.set("Authorization",`Bearer ${o.token}`)}i(Nst,"defaultAuthorizeRequest");function bde(t){return t.status===401&&t.headers.has("WWW-Authenticate")}i(bde,"isChallengeResponse");async function Bde(t,e){let{scopes:r}=t,n=await t.getAccessToken(r,{enableCae:!0,claims:e});return n?(t.request.headers.set("Authorization",`${n.tokenType??"Bearer"} ${n.token}`),!0):!1}i(Bde,"authorizeRequestOnCaeChallenge");function rh(t){let{credential:e,scopes:r,challengeCallbacks:n}=t,s=t.logger||$a,o={authorizeRequest:n?.authorizeRequest?.bind(n)??Nst,authorizeRequestOnChallenge:n?.authorizeRequestOnChallenge?.bind(n)},a=e?lG(e):()=>Promise.resolve(null);return{name:Nde,async sendRequest(c,l){if(!c.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await o.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:c,getAccessToken:a,logger:s});let u,d,p;if([u,d]=await mR(c,l),bde(u)){let m=Rde(u.headers.get("WWW-Authenticate"));if(m){let f;try{f=atob(m)}catch{return s.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${m}`),u}p=await Bde({scopes:Array.isArray(r)?r:[r],response:u,request:c,getAccessToken:a,logger:s},f),p&&([u,d]=await mR(c,l))}else if(o.authorizeRequestOnChallenge&&(p=await o.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:c,response:u,getAccessToken:a,logger:s}),p&&([u,d]=await mR(c,l)),bde(u)&&(m=Rde(u.headers.get("WWW-Authenticate")),m))){let f;try{f=atob(m)}catch{return s.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${m}`),u}p=await Bde({scopes:Array.isArray(r)?r:[r],response:u,request:c,getAccessToken:a,logger:s},f),p&&([u,d]=await mR(c,l))}}if(d)throw d;return u}}}i(rh,"bearerTokenAuthenticationPolicy");function Tst(t){let e=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,r=/(\w+)="([^"]*)"/g,n=[],s;for(;(s=e.exec(t))!==null;){let o=s[1],a=s[2],c={},l;for(;(l=r.exec(a))!==null;)c[l[1]]=l[2];n.push({scheme:o,params:c})}return n}i(Tst,"parseChallenges");function Rde(t){return t?Tst(t).find(r=>r.scheme==="Bearer"&&r.params.claims&&r.params.error==="insufficient_claims")?.params.claims:void 0}i(Rde,"getCaeChallengeClaims");function uo(t){let e=t;return e&&typeof e.getToken=="function"&&(e.signRequest===void 0||e.getToken.length>0)}i(uo,"isTokenCredential");var uG="DisableKeepAlivePolicy";function Tde(){return{name:uG,async sendRequest(t,e){return t.disableKeepAlive=!0,e(t)}}}i(Tde,"createDisableKeepAlivePolicy");function vde(t){return t.getOrderedPolicies().some(e=>e.name===uG)}i(vde,"pipelineContainsDisableKeepAlivePolicy");function dG(t){return(t instanceof Buffer?t:Buffer.from(t.buffer)).toString("base64")}i(dG,"encodeByteArray");function pG(t){return Buffer.from(t,"base64")}i(pG,"decodeString");function Pst(t,e){return e!=="Composite"&&e!=="Dictionary"&&(typeof t=="string"||typeof t=="number"||typeof t=="boolean"||e?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||t===void 0||t===null)}i(Pst,"isPrimitiveBody");var Qst=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Pde(t){return Qst.test(t)}i(Pde,"isDuration");var _st=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Qde(t){return _st.test(t)}i(Qde,"isValidUuid");function Dst(t){let e={...t.headers,...t.body};return t.hasNullableType&&Object.getOwnPropertyNames(e).length===0?t.shouldWrapBody?{body:null}:null:t.shouldWrapBody?{...t.headers,body:t.body}:e}i(Dst,"handleNullableResponseAndWrappableBody");function mG(t,e){let r=t.parsedHeaders;if(t.request.method==="HEAD")return{...r,body:t.parsedBody};let n=e&&e.bodyMapper,s=!!n?.nullable,o=n?.type.name;if(o==="Stream")return{...r,blobBody:t.blobBody,readableStreamBody:t.readableStreamBody};let a=o==="Composite"&&n.type.modelProperties||{},c=Object.keys(a).some(l=>a[l].serializedName==="");if(o==="Sequence"||c){let l=t.parsedBody??[];for(let u of Object.keys(a))a[u].serializedName&&(l[u]=t.parsedBody?.[u]);if(r)for(let u of Object.keys(r))l[u]=r[u];return s&&!t.parsedBody&&!r&&Object.getOwnPropertyNames(a).length===0?null:l}return Dst({body:t.parsedBody,headers:r,hasNullableType:s,shouldWrapBody:Pst(t.parsedBody,o)})}i(mG,"flattenResponse");var fG=class{static{i(this,"SerializerImpl")}modelMappers;isXML;constructor(e={},r=!1){this.modelMappers=e,this.isXML=r}validateConstraints(e,r,n){let s=i((o,a)=>{throw new Error(`"${n}" with value "${r}" should satisfy the constraint "${o}": ${a}.`)},"failValidation");if(e.constraints&&r!==void 0&&r!==null){let{ExclusiveMaximum:o,ExclusiveMinimum:a,InclusiveMaximum:c,InclusiveMinimum:l,MaxItems:u,MaxLength:d,MinItems:p,MinLength:m,MultipleOf:f,Pattern:A,UniqueItems:h}=e.constraints;if(o!==void 0&&r>=o&&s("ExclusiveMaximum",o),a!==void 0&&r<=a&&s("ExclusiveMinimum",a),c!==void 0&&r>c&&s("InclusiveMaximum",c),l!==void 0&&ru&&s("MaxItems",u),d!==void 0&&r.length>d&&s("MaxLength",d),p!==void 0&&r.lengthw.indexOf(E)!==C)&&s("UniqueItems",h)}}serialize(e,r,n,s={xml:{}}){let o={xml:{rootName:s.xml.rootName??"",includeRoot:s.xml.includeRoot??!1,xmlCharKey:s.xml.xmlCharKey??"_"}},a={},c=e.type.name;n||(n=e.serializedName),c.match(/^Sequence$/i)!==null&&(a=[]),e.isConstant&&(r=e.defaultValue);let{required:l,nullable:u}=e;if(l&&u&&r===void 0)throw new Error(`${n} cannot be undefined.`);if(l&&!u&&r==null)throw new Error(`${n} cannot be null or undefined.`);if(!l&&u===!1&&r===null)throw new Error(`${n} cannot be null.`);return r==null||c.match(/^any$/i)!==null?a=r:c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null?a=Ust(c,n,r):c.match(/^Enum$/i)!==null?a=qst(n,e.type.allowedValues,r):c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null?a=$st(c,r,n):c.match(/^ByteArray$/i)!==null?a=Gst(n,r):c.match(/^Base64Url$/i)!==null?a=Hst(n,r):c.match(/^Sequence$/i)!==null?a=zst(this,e,r,n,!!this.isXML,o):c.match(/^Dictionary$/i)!==null?a=Vst(this,e,r,n,!!this.isXML,o):c.match(/^Composite$/i)!==null&&(a=Yst(this,e,r,n,!!this.isXML,o)),a}deserialize(e,r,n,s={xml:{}}){let o={xml:{rootName:s.xml.rootName??"",includeRoot:s.xml.includeRoot??!1,xmlCharKey:s.xml.xmlCharKey??"_"},ignoreUnknownProperties:s.ignoreUnknownProperties??!1};if(r==null)return this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped&&(r=[]),e.defaultValue!==void 0&&(r=e.defaultValue),r;let a,c=e.type.name;if(n||(n=e.serializedName),c.match(/^Composite$/i)!==null)a=jst(this,e,r,n,o);else{if(this.isXML){let l=o.xml.xmlCharKey;r["$"]!==void 0&&r[l]!==void 0&&(r=r[l])}c.match(/^Number$/i)!==null?(a=parseFloat(r),isNaN(a)&&(a=r)):c.match(/^Boolean$/i)!==null?r==="true"?a=!0:r==="false"?a=!1:a=r:c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null?a=r:c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null?a=new Date(r):c.match(/^UnixTime$/i)!==null?a=Fst(r):c.match(/^ByteArray$/i)!==null?a=pG(r):c.match(/^Base64Url$/i)!==null?a=Ost(r):c.match(/^Sequence$/i)!==null?a=Xst(this,e,r,n,o):c.match(/^Dictionary$/i)!==null&&(a=Kst(this,e,r,n,o))}return e.isConstant&&(a=e.defaultValue),a}};function po(t={},e=!1){return new fG(t,e)}i(po,"createSerializer");function kst(t,e){let r=t.length;for(;r-1>=0&&t[r-1]===e;)--r;return t.substr(0,r)}i(kst,"trimEnd");function Lst(t){if(!t)return;if(!(t instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");let e=dG(t);return kst(e,"=").replace(/\+/g,"-").replace(/\//g,"_")}i(Lst,"bufferToBase64Url");function Ost(t){if(t){if(t&&typeof t.valueOf()!="string")throw new Error("Please provide an input of type string for converting to Uint8Array");return t=t.replace(/-/g,"+").replace(/_/g,"/"),pG(t)}}i(Ost,"base64UrlToByteArray");function AG(t){let e=[],r="";if(t){let n=t.split(".");for(let s of n)s.charAt(s.length-1)==="\\"?r+=s.substr(0,s.length-1)+".":(r+=s,e.push(r),r="")}return e}i(AG,"splitSerializeName");function Mst(t){if(t)return typeof t.valueOf()=="string"&&(t=new Date(t)),Math.floor(t.getTime()/1e3)}i(Mst,"dateToUnixTime");function Fst(t){if(t)return new Date(t*1e3)}i(Fst,"unixTimeToDate");function Ust(t,e,r){if(r!=null){if(t.match(/^Number$/i)!==null){if(typeof r!="number")throw new Error(`${e} with value ${r} must be of type number.`)}else if(t.match(/^String$/i)!==null){if(typeof r.valueOf()!="string")throw new Error(`${e} with value "${r}" must be of type string.`)}else if(t.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()=="string"&&Qde(r)))throw new Error(`${e} with value "${r}" must be of type string and a valid uuid.`)}else if(t.match(/^Boolean$/i)!==null){if(typeof r!="boolean")throw new Error(`${e} with value ${r} must be of type boolean.`)}else if(t.match(/^Stream$/i)!==null){let n=typeof r;if(n!=="string"&&typeof r.pipe!="function"&&typeof r.tee!="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob=="function"||typeof Blob=="object")&&r instanceof Blob)&&n!=="function")throw new Error(`${e} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}}return r}i(Ust,"serializeBasicTypes");function qst(t,e,r){if(!e)throw new Error(`Please provide a set of allowedValues to validate ${t} as an Enum Type.`);if(!e.some(s=>typeof s.valueOf()=="string"?s.toLowerCase()===r.toLowerCase():s===r))throw new Error(`${r} is not a valid value for ${t}. The valid values are: ${JSON.stringify(e)}.`);return r}i(qst,"serializeEnumType");function Gst(t,e){if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);e=dG(e)}return e}i(Gst,"serializeByteArrayType");function Hst(t,e){if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);e=Lst(e)}return e}i(Hst,"serializeBase64UrlType");function $st(t,e,r){if(e!=null){if(t.match(/^Date$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString().substring(0,10):new Date(e).toISOString().substring(0,10)}else if(t.match(/^DateTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString():new Date(e).toISOString()}else if(t.match(/^DateTimeRfc1123$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`);e=e instanceof Date?e.toUTCString():new Date(e).toUTCString()}else if(t.match(/^UnixTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);e=Mst(e)}else if(t.match(/^TimeSpan$/i)!==null&&!Pde(e))throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${e}".`)}return e}i($st,"serializeDateTypes");function zst(t,e,r,n,s,o){if(!Array.isArray(r))throw new Error(`${n} must be of type Array.`);let a=e.type.element;if(!a||typeof a!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}.`);a.type.name==="Composite"&&a.type.className&&(a=t.modelMappers[a.type.className]??a);let c=[];for(let l=0;lm!==d)&&(a[d]=t.serialize(l,r[d],n+'["'+d+'"]',o))}return a}return r}i(Yst,"serializeCompositeType");function Lde(t,e,r,n){if(!r||!t.xmlNamespace)return e;let o={[t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns"]:t.xmlNamespace};if(["Composite"].includes(t.type.name)){if(e["$"])return e;{let c={...e};return c["$"]=o,c}}let a={};return a[n.xml.xmlCharKey]=e,a["$"]=o,a}i(Lde,"getXmlObjectValue");function Jst(t,e){return["$",e.xml.xmlCharKey].includes(t)}i(Jst,"isSpecialXmlProperty");function jst(t,e,r,n,s){let o=s.xml.xmlCharKey??"_";fR(t,e)&&(e=Ode(t,e,r,"serializedName"));let a=kde(t,e,n),c={},l=[];for(let d of Object.keys(a)){let p=a[d],m=AG(a[d].serializedName);l.push(m[0]);let{serializedName:f,xmlName:A,xmlElementName:h}=p,E=n;f!==""&&f!==void 0&&(E=n+"."+f);let C=p.headerCollectionPrefix;if(C){let w={};for(let x of Object.keys(r))x.startsWith(C)&&(w[x.substring(C.length)]=t.deserialize(p.type.value,r[x],E,s)),l.push(x);c[d]=w}else if(t.isXML)if(p.xmlIsAttribute&&r["$"])c[d]=t.deserialize(p,r["$"][A],E,s);else if(p.xmlIsMsText)r[o]!==void 0?c[d]=r[o]:typeof r=="string"&&(c[d]=r);else{let w=h||A||f;if(p.xmlIsWrapped){let b=r[A]?.[h]??[];c[d]=t.deserialize(p,b,E,s),l.push(A)}else{let x=r[w];c[d]=t.deserialize(p,x,E,s),l.push(w)}}else{let w,x=r,b=0;for(let _ of m){if(!x)break;b++,x=x[_]}x===null&&b{for(let m in a)if(AG(a[m].serializedName)[0]===p)return!1;return!0},"isAdditionalProperty");for(let p in r)d(p)&&(c[p]=t.deserialize(u,r[p],n+'["'+p+'"]',s))}else if(r&&!s.ignoreUnknownProperties)for(let d of Object.keys(r))c[d]===void 0&&!l.includes(d)&&!Jst(d,s)&&(c[d]=r[d]);return c}i(jst,"deserializeCompositeType");function Kst(t,e,r,n,s){let o=e.type.value;if(!o||typeof o!="object")throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${n}`);if(r){let a={};for(let c of Object.keys(r))a[c]=t.deserialize(o,r[c],n,s);return a}return r}i(Kst,"deserializeDictionaryType");function Xst(t,e,r,n,s){let o=e.type.element;if(!o||typeof o!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}`);if(r){Array.isArray(r)||(r=[r]),o.type.name==="Composite"&&o.type.className&&(o=t.modelMappers[o.type.className]??o);let a=[];for(let c=0;c0)if(s.isConstant)o=s.defaultValue;else{let a=Ude(t,n);!a.propertyFound&&r&&(a=Ude(r,n));let c=!1;a.propertyFound||(c=s.required||n[0]==="options"&&n.length===2),o=c?s.defaultValue:a.propertyValue}}else{s.required&&(o={});for(let a in n){let c=s.type.modelProperties[a],l=n[a],u=Xu(t,{parameterPath:l,mapper:c},r);u!==void 0&&(o||(o={}),o[a]=u)}}return o}i(Xu,"getOperationArgumentValueFromParameter");function Ude(t,e){let r={propertyFound:!1},n=0;for(;n=200&&r.status<300);l.headersMapper&&(o.parsedHeaders=c.serializer.deserialize(l.headersMapper,o.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return o}i(oot,"deserializeResponseBody");function iot(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}i(iot,"isOperationSpecEmpty");function aot(t,e,r,n){let s=200<=t.status&&t.status<300;if(iot(e)?s:!!r)if(r){if(!r.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let a=r??e.responses.default,c=t.request.streamResponseStatusCodes?.has(t.status)?`Unexpected status code: ${t.status}`:t.bodyAsText,l=new vl(c,{statusCode:t.status,request:t.request,response:t});if(!a&&!(t.parsedBody?.error?.code&&t.parsedBody?.error?.message))throw l;let u=a?.bodyMapper,d=a?.headersMapper;try{if(t.parsedBody){let p=t.parsedBody,m;if(u){let A=p;if(e.isXML&&u.type.name===za.Sequence){A=[];let h=u.xmlElementName;typeof p=="object"&&h&&(A=p[h])}m=e.serializer.deserialize(u,A,"error.response.parsedBody",n)}let f=p.error||m||p;l.code=f.code,f.message&&(l.message=f.message),u&&(l.response.parsedBody=m)}t.headers&&d&&(l.response.parsedHeaders=e.serializer.deserialize(d,t.headers.toJSON(),"operationRes.parsedHeaders"))}catch(p){l.message=`Error "${p.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}i(aot,"handleErrorResponse");async function cot(t,e,r,n,s){if(!r.request.streamResponseStatusCodes?.has(r.status)&&r.bodyAsText){let o=r.bodyAsText,a=r.headers.get("Content-Type")||"",c=a?a.split(";").map(l=>l.toLowerCase()):[];try{if(c.length===0||c.some(l=>t.indexOf(l)!==-1))return r.parsedBody=JSON.parse(o),r;if(c.some(l=>e.indexOf(l)!==-1)){if(!s)throw new Error("Parsing XML not supported.");let l=await s(o,n.xml);return r.parsedBody=l,r}}catch(l){let u=`Error "${l}" occurred while parsing the response body - ${r.bodyAsText}.`,d=l.code||vl.PARSE_ERROR;throw new vl(u,{code:d,statusCode:r.status,request:r.request,response:r})}}return r}i(cot,"parse");function Hde(t){let e=new Set;for(let r in t.responses){let n=t.responses[r];n.bodyMapper&&n.bodyMapper.type.name===za.Stream&&e.add(Number(r))}return e}i(Hde,"getStreamingResponseStatusCodes");function Va(t){let{parameterPath:e,mapper:r}=t,n;return typeof e=="string"?n=e:Array.isArray(e)?n=e.join("."):n=r.serializedName,n}i(Va,"getPathStringFromParameter");var $de="serializationPolicy";function hR(t={}){let e=t.stringifyXML;return{name:$de,async sendRequest(r,n){let s=Ql(r),o=s?.operationSpec,a=s?.operationArguments;return o&&a&&(lot(r,a,o),uot(r,a,o,e)),n(r)}}}i(hR,"serializationPolicy");function lot(t,e,r){if(r.headerParameters)for(let s of r.headerParameters){let o=Xu(e,s);if(o!=null||s.mapper.required){o=r.serializer.serialize(s.mapper,o,Va(s));let a=s.mapper.headerCollectionPrefix;if(a)for(let c of Object.keys(o))t.headers.set(a+c,o[c]);else t.headers.set(s.mapper.serializedName||Va(s),o)}}let n=e.options?.requestOptions?.customHeaders;if(n)for(let s of Object.keys(n))t.headers.set(s,n[s])}i(lot,"serializeHeaders");function uot(t,e,r,n=function(){throw new Error("XML serialization unsupported!")}){let s=e.options?.serializerOptions,o={xml:{rootName:s?.xml.rootName??"",includeRoot:s?.xml.includeRoot??!1,xmlCharKey:s?.xml.xmlCharKey??"_"}},a=o.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){t.body=Xu(e,r.requestBody);let c=r.requestBody.mapper,{required:l,serializedName:u,xmlName:d,xmlElementName:p,xmlNamespace:m,xmlNamespacePrefix:f,nullable:A}=c,h=c.type.name;try{if(t.body!==void 0&&t.body!==null||A&&t.body===null||l){let E=Va(r.requestBody);t.body=r.serializer.serialize(c,t.body,E,o);let C=h===za.Stream;if(r.isXML){let w=f?`xmlns:${f}`:"xmlns",x=dot(m,w,h,t.body,o);h===za.Sequence?t.body=n(pot(x,p||d||u,w,m),{rootName:d||u,xmlCharKey:a}):C||(t.body=n(x,{rootName:d||u,xmlCharKey:a}))}else{if(h===za.String&&(r.contentType?.match("text/plain")||r.mediaType==="text"))return;C||(t.body=JSON.stringify(t.body))}}}catch(E){throw new Error(`Error "${E.message}" occurred in serializing the payload - ${JSON.stringify(u,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){t.formData={};for(let c of r.formDataParameters){let l=Xu(e,c);if(l!=null){let u=c.mapper.serializedName||Va(c);t.formData[u]=r.serializer.serialize(c.mapper,l,Va(c),o)}}}}i(uot,"serializeRequestBody");function dot(t,e,r,n,s){if(t&&!["Composite","Sequence","Dictionary"].includes(r)){let o={};return o[s.xml.xmlCharKey]=n,o["$"]={[e]:t},o}return n}i(dot,"getXmlValueWithNamespace");function pot(t,e,r,n){if(Array.isArray(t)||(t=[t]),!r||!n)return{[e]:t};let s={[e]:t};return s["$"]={[r]:n},s}i(pot,"prepareXMLRootList");function TC(t={}){let e=cG(t??{});return t.credentialOptions&&e.addPolicy(rh({credential:t.credentialOptions.credential,scopes:t.credentialOptions.credentialScopes})),e.addPolicy(hR(t.serializationOptions),{phase:"Serialize"}),e.addPolicy(gG(t.deserializationOptions),{phase:"Deserialize"}),e}i(TC,"createClientPipeline");var yG;function zde(){return yG||(yG=RC()),yG}i(zde,"getCachedDefaultHttpClient");var mot={CSV:",",SSV:" ",Multi:"Multi",TSV:" ",Pipes:"|"};function Wde(t,e,r,n){let s=fot(e,r,n),o=!1,a=Vde(t,s);if(e.path){let u=Vde(e.path,s);e.path==="/{nextLink}"&&u.startsWith("/")&&(u=u.substring(1)),Aot(u)?(a=u,o=!0):a=hot(a,u)}let{queryParams:c,sequenceParams:l}=got(e,r,n);return a=Eot(a,c,l,o),a}i(Wde,"getRequestUrl");function Vde(t,e){let r=t;for(let[n,s]of e)r=r.split(n).join(s);return r}i(Vde,"replaceAll");function fot(t,e,r){let n=new Map;if(t.urlParameters?.length)for(let s of t.urlParameters){let o=Xu(e,s,r),a=Va(s);o=t.serializer.serialize(s.mapper,o,a),s.skipEncoding||(o=encodeURIComponent(o)),n.set(`{${s.mapper.serializedName||a}}`,o)}return n}i(fot,"calculateUrlReplacements");function Aot(t){return t.includes("://")}i(Aot,"isAbsoluteUrl");function hot(t,e){if(!e)return t;let r=new URL(t),n=r.pathname;n.endsWith("/")||(n=`${n}/`),e.startsWith("/")&&(e=e.substring(1));let s=e.indexOf("?");if(s!==-1){let o=e.substring(0,s),a=e.substring(s+1);n=n+o,a&&(r.search=r.search?`${r.search}&${a}`:a)}else n=n+e;return r.pathname=n,r.toString()}i(hot,"appendPath");function got(t,e,r){let n=new Map,s=new Set;if(t.queryParameters?.length)for(let o of t.queryParameters){o.mapper.type.name==="Sequence"&&o.mapper.serializedName&&s.add(o.mapper.serializedName);let a=Xu(e,o,r);if(a!=null||o.mapper.required){a=t.serializer.serialize(o.mapper,a,Va(o));let c=o.collectionFormat?mot[o.collectionFormat]:"";if(Array.isArray(a)&&(a=a.map(l=>l??"")),o.collectionFormat==="Multi"&&a.length===0)continue;Array.isArray(a)&&(o.collectionFormat==="SSV"||o.collectionFormat==="TSV")&&(a=a.join(c)),o.skipEncoding||(Array.isArray(a)?a=a.map(l=>encodeURIComponent(l)):a=encodeURIComponent(a)),Array.isArray(a)&&(o.collectionFormat==="CSV"||o.collectionFormat==="Pipes")&&(a=a.join(c)),n.set(o.mapper.serializedName||Va(o),a)}}return{queryParams:n,sequenceParams:s}}i(got,"calculateQueryParameters");function yot(t){let e=new Map;if(!t||t[0]!=="?")return e;t=t.slice(1);let r=t.split("&");for(let n of r){let[s,o]=n.split("=",2),a=e.get(s);a?Array.isArray(a)?a.push(o):e.set(s,[a,o]):e.set(s,o)}return e}i(yot,"simpleParseQueryParams");function Eot(t,e,r,n=!1){if(e.size===0)return t;let s=new URL(t),o=yot(s.search);for(let[c,l]of e){let u=o.get(c);if(Array.isArray(u))if(Array.isArray(l)){u.push(...l);let d=new Set(u);o.set(c,Array.from(d))}else u.push(l);else u?(Array.isArray(l)?l.unshift(u):r.has(c)&&o.set(c,[u,l]),n||o.set(c,l)):o.set(c,l)}let a=[];for(let[c,l]of o)if(typeof l=="string")a.push(`${c}=${l}`);else if(Array.isArray(l))for(let u of l)a.push(`${c}=${u}`);else a.push(`${c}=${l}`);return s.search=a.length?`?${a.join("&")}`:"",s.toString()}i(Eot,"appendQueryParams");var EG=Ha("core-client");var vC=class{static{i(this,"ServiceClient")}_endpoint;_requestContentType;_allowInsecureConnection;_httpClient;pipeline;constructor(e={}){if(this._requestContentType=e.requestContentType,this._endpoint=e.endpoint??e.baseUri,e.baseUri&&EG.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||zde(),this.pipeline=e.pipeline||Cot(e),e.additionalPolicies?.length)for(let{policy:r,position:n}of e.additionalPolicies){let s=n==="perRetry"?"Sign":void 0;this.pipeline.addPolicy(r,{afterPhase:s})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,r){let n=r.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");let s=Wde(n,r,e,this),o=NC({url:s});o.method=r.httpMethod;let a=Ql(o);a.operationSpec=r,a.operationArguments=e;let c=r.contentType||this._requestContentType;c&&r.requestBody&&o.headers.set("Content-Type",c);let l=e.options;if(l){let u=l.requestOptions;u&&(u.timeout&&(o.timeout=u.timeout),u.onUploadProgress&&(o.onUploadProgress=u.onUploadProgress),u.onDownloadProgress&&(o.onDownloadProgress=u.onDownloadProgress),u.shouldDeserialize!==void 0&&(a.shouldDeserialize=u.shouldDeserialize),u.allowInsecureConnection&&(o.allowInsecureConnection=!0)),l.abortSignal&&(o.abortSignal=l.abortSignal),l.tracingOptions&&(o.tracingOptions=l.tracingOptions)}this._allowInsecureConnection&&(o.allowInsecureConnection=!0),o.streamResponseStatusCodes===void 0&&(o.streamResponseStatusCodes=Hde(r));try{let u=await this.sendRequest(o),d=mG(u,r.responses[u.status]);return l?.onResponse&&l.onResponse(u,d),d}catch(u){if(typeof u=="object"&&u?.response){let d=u.response,p=mG(d,r.responses[u.statusCode]||r.responses.default);u.details=p,l?.onResponse&&l.onResponse(d,p,u)}throw u}}};function Cot(t){let e=Iot(t),r=t.credential&&e?{credentialScopes:e,credential:t.credential}:void 0;return TC({...t,credentialOptions:r})}i(Cot,"createDefaultPipeline");function Iot(t){if(t.credentialScopes)return t.credentialScopes;if(t.endpoint)return`${t.endpoint}/.default`;if(t.baseUri)return`${t.baseUri}/.default`;if(t.credential&&!t.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}i(Iot,"getCredentialScopes");var Yde={DefaultScope:"/.default",HeaderConstants:{AUTHORIZATION:"authorization"}};function wot(t){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(t)}i(wot,"isUuid");var gR=i(async t=>{let e=Rot(t.request),r=bot(t.response);if(r){let n=Bot(r),s=xot(t,n),o=Sot(n);if(!o)return!1;let a=await t.getAccessToken(s,{...e,tenantId:o});return a?(t.request.headers.set(Yde.HeaderConstants.AUTHORIZATION,`${a.tokenType??"Bearer"} ${a.token}`),!0):!1}return!1},"authorizeRequestOnTenantChallenge");function Sot(t){let n=new URL(t.authorization_uri).pathname.split("/")[1];if(n&&wot(n))return n}i(Sot,"extractTenantId");function xot(t,e){if(!e.resource_id)return t.scopes;let r=new URL(e.resource_id);r.pathname=Yde.DefaultScope;let n=r.toString();return n==="https://disk.azure.com/.default"&&(n="https://disk.azure.com//.default"),[n]}i(xot,"buildScopes");function bot(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}i(bot,"getChallenge");function Bot(t){return`${t.slice(7).trim()} `.split(" ").filter(s=>s).map(s=>(([o,a])=>({[o]:a}))(s.trim().split("="))).reduce((s,o)=>({...s,...o}),{})}i(Bot,"parseChallenge");function Rot(t){return{abortSignal:t.abortSignal,requestOptions:{timeout:t.timeout},tracingOptions:t.tracingOptions}}i(Rot,"requestToOptions");var Jde=Symbol("Original PipelineRequest"),Not=Symbol.for("@azure/core-client original request");function QC(t,e={}){let n=t[Jde],s=Pl(t.headers.toJson({preserveCase:!0}));if(n)return n.headers=s,n;{let o=NC({url:t.url,method:t.method,headers:s,withCredentials:t.withCredentials,timeout:t.timeout,requestId:t.requestId,abortSignal:t.abortSignal,body:t.body,formData:t.formData,disableKeepAlive:!!t.keepAlive,onDownloadProgress:t.onDownloadProgress,onUploadProgress:t.onUploadProgress,proxySettings:t.proxySettings,streamResponseStatusCodes:t.streamResponseStatusCodes,agent:t.agent,requestOverrides:t.requestOverrides});return e.originalRequest&&(o[Not]=e.originalRequest),o}}i(QC,"toPipelineRequest");function om(t,e){let r=e?.originalRequest??t,n={url:t.url,method:t.method,headers:_C(t.headers),withCredentials:t.withCredentials,timeout:t.timeout,requestId:t.headers.get("x-ms-client-request-id")||t.requestId,abortSignal:t.abortSignal,body:t.body,formData:t.formData,keepAlive:!!t.disableKeepAlive,onDownloadProgress:t.onDownloadProgress,onUploadProgress:t.onUploadProgress,proxySettings:t.proxySettings,streamResponseStatusCodes:t.streamResponseStatusCodes,agent:t.agent,requestOverrides:t.requestOverrides,clone(){throw new Error("Cannot clone a non-proxied WebResourceLike")},prepare(){throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat")},validateRequestProperties(){}};return e?.createProxy?new Proxy(n,{get(s,o,a){return o===Jde?t:o==="clone"?()=>om(QC(n,{originalRequest:r}),{createProxy:!0,originalRequest:r}):Reflect.get(s,o,a)},set(s,o,a,c){return o==="keepAlive"&&(t.disableKeepAlive=!a),typeof o=="string"&&["url","method","withCredentials","timeout","requestId","abortSignal","body","formData","onDownloadProgress","onUploadProgress","proxySettings","streamResponseStatusCodes","agent","requestOverrides"].includes(o)&&(t[o]=a),Reflect.set(s,o,a,c)}}):n}i(om,"toWebResourceLike");function _C(t){return new CG(t.toJSON({preserveCase:!0}))}i(_C,"toHttpHeadersLike");function PC(t){return t.toLowerCase()}i(PC,"getHeaderKey");var CG=class t{static{i(this,"HttpHeaders")}_headersMap;constructor(e){if(this._headersMap={},e)for(let r in e)this.set(r,e[r])}set(e,r){this._headersMap[PC(e)]={name:e,value:r.toString()}}get(e){let r=this._headersMap[PC(e)];return r?r.value:void 0}contains(e){return!!this._headersMap[PC(e)]}remove(e){let r=this.contains(e);return delete this._headersMap[PC(e)],r}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){let e=[];for(let r in this._headersMap)e.push(this._headersMap[r]);return e}headerNames(){let e=[],r=this.headersArray();for(let n=0;n{let r=await t.sendRequest(om(e,{createProxy:!0}));return ER(r)},"sendRequest")}}i(SG,"convertHttpClient");var Xde=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Pot=Xde+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Qot="["+Xde+"]["+Pot+"]*",_ot=new RegExp("^"+Qot+"$");function CR(t,e){let r=[],n=e.exec(t);for(;n;){let s=[];s.startIndex=e.lastIndex-n[0].length;let o=n.length;for(let a=0;a"u")},"isName");function Zde(t){return typeof t<"u"}i(Zde,"isExist");var kC=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],IR=["__proto__","constructor","prototype"];var Dot={allowBooleanAttributes:!1,unpairedTags:[]};function wR(t,e){e=Object.assign({},Dot,e);let r=[],n=!1,s=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let o=0;o"&&t[o]!==" "&&t[o]!==" "&&t[o]!==` +`,"utf-8")],s=tst(n);s&&t.headers.set("Content-Length",s),t.body=await lde(n)}i(rst,"buildRequestBody");var SC="multipartPolicy",nst=70,sst=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function ost(t){if(t.length>nst)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!sst.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}i(ost,"assertValidBoundary");function nR(){return{name:SC,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,o,a]=s;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?ost(r):r=Xnt(),t.headers.set("Content-Type",`${o}; boundary=${r}`),await rst(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}i(nR,"multipartPolicy");function sR(){return NB()}i(sR,"createEmptyPipeline");var ude=bB({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),uXt=ude.logger;function Ha(t){return ude.createClientLogger(t)}i(Ha,"createClientLogger");var $a=Ha("core-rest-pipeline");function $q(t={}){return DB({logger:$a.info,...t})}i($q,"logPolicy");var zq=kB;function Vq(t={}){return LB(t)}i(Vq,"redirectPolicy");var oR=R(require("node:os"),1),iR=R(require("node:process"),1);function dde(){return"User-Agent"}i(dde,"getHeaderName");async function pde(t){if(iR.default&&iR.default.versions){let e=`${oR.default.type()} ${oR.default.release()}; ${oR.default.arch()}`,r=iR.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}i(pde,"setPlatformSpecificData");var aR="1.22.2";function mst(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}i(mst,"getUserAgentString");function mde(){return dde()}i(mde,"getUserAgentHeaderName");async function cR(t){let e=new Map;e.set("core-rest-pipeline",aR),await pde(e);let r=mst(e);return t?`${t} ${r}`:r}i(cR,"getUserAgentValue");var fde=mde(),Ade="userAgentPolicy";function Wq(t={}){let e=cR(t.userAgentPrefix);return{name:Ade,async sendRequest(r,n){return r.headers.has(fde)||r.headers.set(fde,await e),n(r)}}}i(Wq,"userAgentPolicy");var lo=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function Yq(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((o,a)=>{function c(){a(new lo(s??"The operation was aborted."))}i(c,"rejectOnAbort");function l(){n?.removeEventListener("abort",u)}i(l,"removeListeners");function u(){r?.(),l(),c()}if(i(u,"onAbort"),n?.aborted)return c();try{t(d=>{l(),o(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}i(Yq,"createAbortablePromise");var yst="The delay was aborted.";function xC(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return Yq(o=>{r=setTimeout(o,t)},{cleanupBeforeAbort:i(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??yst})}i(xC,"delay");function Ju(t){if(Xp(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}i(Ju,"getErrorMessage");function hde(t){return Xp(t)}i(hde,"isError");function eh(){return Kp()}i(eh,"randomUUID");var it=tm;var gde=Symbol("rawContent");function jq(t){return typeof t[gde]=="function"}i(jq,"hasRawContent");function yde(t){return jq(t)?t[gde]():t}i(yde,"getRawContent");var lR=SC;function Kq(){let t=nR();return{name:lR,sendRequest:i(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)jq(n.body)&&(n.body=yde(n.body));return t.sendRequest(e,r)},"sendRequest")}}i(Kq,"multipartPolicy");var Xq=OB;function Zq(){return MB()}i(Zq,"decompressResponsePolicy");function eG(t={}){return qB(t)}i(eG,"defaultRetryPolicy");function tG(){return GB()}i(tG,"formDataPolicy");function ju(t){return Fq(t)}i(ju,"getDefaultProxySettings");function rG(t,e){return XB(t,e)}i(rG,"proxyPolicy");var Ede="setClientRequestIdPolicy";function nG(t="x-ms-client-request-id"){return{name:Ede,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}i(nG,"setClientRequestIdPolicy");function sG(t){return ZB(t)}i(sG,"agentPolicy");function oG(t){return eR(t)}i(oG,"tlsPolicy");var th={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Cde(t={}){let e=new iG(t.parentContext);return t.span&&(e=e.setValue(th.span,t.span)),t.namespace&&(e=e.setValue(th.namespace,t.namespace)),e}i(Cde,"createTracingContext");var iG=class t{static{i(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};var wde=R(Ide(),1),dR=wde.state;function Est(){return{end:i(()=>{},"end"),isRecording:i(()=>!1,"isRecording"),recordException:i(()=>{},"recordException"),setAttribute:i(()=>{},"setAttribute"),setStatus:i(()=>{},"setStatus"),addEvent:i(()=>{},"addEvent")}}i(Est,"createDefaultTracingSpan");function Cst(){return{createRequestHeaders:i(()=>({}),"createRequestHeaders"),parseTraceparentHeader:i(()=>{},"parseTraceparentHeader"),startSpan:i((t,e)=>({span:Est(),tracingContext:Cde({parentContext:e.tracingContext})}),"startSpan"),withContext(t,e,...r){return e(...r)}}}i(Cst,"createDefaultInstrumenter");function bC(){return dR.instrumenterImplementation||(dR.instrumenterImplementation=Cst()),dR.instrumenterImplementation}i(bC,"getInstrumenter");function BC(t){let{namespace:e,packageName:r,packageVersion:n}=t;function s(u,d,p){let m=bC().startSpan(u,{...p,packageName:r,packageVersion:n,tracingContext:d?.tracingOptions?.tracingContext}),f=m.tracingContext,A=m.span;f.getValue(th.namespace)||(f=f.setValue(th.namespace,e)),A.setAttribute("az.namespace",f.getValue(th.namespace));let h=Object.assign({},d,{tracingOptions:{...d?.tracingOptions,tracingContext:f}});return{span:A,updatedOptions:h}}i(s,"startSpan");async function o(u,d,p,m){let{span:f,updatedOptions:A}=s(u,d,m);try{let h=await a(A.tracingOptions.tracingContext,()=>Promise.resolve(p(A,f)));return f.setStatus({status:"success"}),h}catch(h){throw f.setStatus({status:"error",error:h}),h}finally{f.end()}}i(o,"withSpan");function a(u,d,...p){return bC().withContext(u,d,...p)}i(a,"withContext");function c(u){return bC().parseTraceparentHeader(u)}i(c,"parseTraceparentHeader");function l(u){return bC().createRequestHeaders(u)}return i(l,"createRequestHeaders"),{startSpan:s,withSpan:o,withContext:a,parseTraceparentHeader:c,createRequestHeaders:l}}i(BC,"createTracingClient");var vl=jn;function sm(t){return TB(t)}i(sm,"isRestError");var Sde="tracingPolicy";function aG(t={}){let e=cR(t.userAgentPrefix),r=new Li({additionalAllowedQueryParameters:t.additionalAllowedQueryParameters}),n=Ist();return{name:Sde,async sendRequest(s,o){if(!n)return o(s);let a=await e,c={"http.url":r.sanitizeUrl(s.url),"http.method":s.method,"http.user_agent":a,requestId:s.requestId};a&&(c["http.user_agent"]=a);let{span:l,tracingContext:u}=wst(n,s,c)??{};if(!l||!u)return o(s);try{let d=await n.withContext(u,o,s);return xst(l,d),d}catch(d){throw Sst(l,d),d}}}}i(aG,"tracingPolicy");function Ist(){try{return BC({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:aR})}catch(t){$a.warning(`Error when creating the TracingClient: ${Ju(t)}`);return}}i(Ist,"tryCreateTracingClient");function wst(t,e,r){try{let{span:n,updatedOptions:s}=t.startSpan(`HTTP ${e.method}`,{tracingOptions:e.tracingOptions},{spanKind:"client",spanAttributes:r});if(!n.isRecording()){n.end();return}let o=t.createRequestHeaders(s.tracingOptions.tracingContext);for(let[a,c]of Object.entries(o))e.headers.set(a,c);return{span:n,tracingContext:s.tracingOptions.tracingContext}}catch(n){$a.warning(`Skipping creating a tracing span due to an error: ${Ju(n)}`);return}}i(wst,"tryCreateSpan");function Sst(t,e){try{t.setStatus({status:"error",error:hde(e)?e:void 0}),sm(e)&&e.statusCode&&t.setAttribute("http.status_code",e.statusCode),t.end()}catch(r){$a.warning(`Skipping tracing span processing due to an error: ${Ju(r)}`)}}i(Sst,"tryProcessError");function xst(t,e){try{t.setAttribute("http.status_code",e.status);let r=e.headers.get("x-ms-request-id");r&&t.setAttribute("serviceRequestId",r),e.status>=400&&t.setStatus({status:"error"}),t.end()}catch(r){$a.warning(`Skipping tracing span processing due to an error: ${Ju(r)}`)}}i(xst,"tryProcessResponse");function pR(t){if(t instanceof AbortSignal)return{abortSignal:t};if(t.aborted)return{abortSignal:AbortSignal.abort(t.reason)};let e=new AbortController,r=!0;function n(){r&&(t.removeEventListener("abort",s),r=!1)}i(n,"cleanup");function s(){e.abort(t.reason),n()}return i(s,"listener"),t.addEventListener("abort",s),{abortSignal:e.signal,cleanup:n}}i(pR,"wrapAbortSignalLike");var bst="wrapAbortSignalLikePolicy";function xde(){return{name:bst,sendRequest:i(async(t,e)=>{if(!t.abortSignal)return e(t);let{abortSignal:r,cleanup:n}=pR(t.abortSignal);t.abortSignal=r;try{return await e(t)}finally{n?.()}},"sendRequest")}}i(xde,"wrapAbortSignalLikePolicy");function cG(t){let e=sR();return it&&(t.agent&&e.addPolicy(sG(t.agent)),t.tlsOptions&&e.addPolicy(oG(t.tlsOptions)),e.addPolicy(rG(t.proxyOptions)),e.addPolicy(Zq())),e.addPolicy(xde()),e.addPolicy(tG(),{beforePolicies:[lR]}),e.addPolicy(Wq(t.userAgentOptions)),e.addPolicy(nG(t.telemetryOptions?.clientRequestIdHeaderName)),e.addPolicy(Kq(),{afterPhase:"Deserialize"}),e.addPolicy(eG(t.retryOptions),{phase:"Retry"}),e.addPolicy(aG({...t.userAgentOptions,...t.loggingOptions}),{afterPhase:"Retry"}),it&&e.addPolicy(Vq(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy($q(t.loggingOptions),{afterPhase:"Sign"}),e}i(cG,"createPipelineFromOptions");function RC(){let t=_B();return{async sendRequest(e){let{abortSignal:r,cleanup:n}=e.abortSignal?pR(e.abortSignal):{};try{return e.abortSignal=r,await t.sendRequest(e)}finally{n?.()}}}}i(RC,"createDefaultHttpClient");function Pl(t){return oo(t)}i(Pl,"createHttpHeaders");function NC(t){return RB(t)}i(NC,"createPipelineRequest");var Uer=Ha("core-rest-pipeline retryPolicy");var Bst={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:1e3*60*2};async function Rst(t,e,r){async function n(){if(Date.now()t.getToken(l,u),"tryGetAccessToken"),o.retryIntervalInMs,n?.expiresOnTimestamp??Date.now()).then(p=>(r=null,n=p,s=u.tenantId,n)).catch(p=>{throw r=null,n=null,s=void 0,p})),r}return i(c,"refresh"),async(l,u)=>{let d=!!u.claims,p=s!==u.tenantId;return d&&(n=null),p||d||a.mustRefresh?c(l,u):(a.shouldRefresh&&c(l,u),n)}}i(lG,"createTokenCycler");var Nde="bearerTokenAuthenticationPolicy";async function mR(t,e){try{return[await e(t),void 0]}catch(r){if(sm(r)&&r.response)return[r.response,r];throw r}}i(mR,"trySendRequest");async function Nst(t){let{scopes:e,getAccessToken:r,request:n}=t,s={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions,enableCae:!0},o=await r(e,s);o&&t.request.headers.set("Authorization",`Bearer ${o.token}`)}i(Nst,"defaultAuthorizeRequest");function bde(t){return t.status===401&&t.headers.has("WWW-Authenticate")}i(bde,"isChallengeResponse");async function Bde(t,e){let{scopes:r}=t,n=await t.getAccessToken(r,{enableCae:!0,claims:e});return n?(t.request.headers.set("Authorization",`${n.tokenType??"Bearer"} ${n.token}`),!0):!1}i(Bde,"authorizeRequestOnCaeChallenge");function rh(t){let{credential:e,scopes:r,challengeCallbacks:n}=t,s=t.logger||$a,o={authorizeRequest:n?.authorizeRequest?.bind(n)??Nst,authorizeRequestOnChallenge:n?.authorizeRequestOnChallenge?.bind(n)},a=e?lG(e):()=>Promise.resolve(null);return{name:Nde,async sendRequest(c,l){if(!c.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");await o.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:c,getAccessToken:a,logger:s});let u,d,p;if([u,d]=await mR(c,l),bde(u)){let m=Rde(u.headers.get("WWW-Authenticate"));if(m){let f;try{f=atob(m)}catch{return s.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${m}`),u}p=await Bde({scopes:Array.isArray(r)?r:[r],response:u,request:c,getAccessToken:a,logger:s},f),p&&([u,d]=await mR(c,l))}else if(o.authorizeRequestOnChallenge&&(p=await o.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:c,response:u,getAccessToken:a,logger:s}),p&&([u,d]=await mR(c,l)),bde(u)&&(m=Rde(u.headers.get("WWW-Authenticate")),m))){let f;try{f=atob(m)}catch{return s.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${m}`),u}p=await Bde({scopes:Array.isArray(r)?r:[r],response:u,request:c,getAccessToken:a,logger:s},f),p&&([u,d]=await mR(c,l))}}if(d)throw d;return u}}}i(rh,"bearerTokenAuthenticationPolicy");function Tst(t){let e=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,r=/(\w+)="([^"]*)"/g,n=[],s;for(;(s=e.exec(t))!==null;){let o=s[1],a=s[2],c={},l;for(;(l=r.exec(a))!==null;)c[l[1]]=l[2];n.push({scheme:o,params:c})}return n}i(Tst,"parseChallenges");function Rde(t){return t?Tst(t).find(r=>r.scheme==="Bearer"&&r.params.claims&&r.params.error==="insufficient_claims")?.params.claims:void 0}i(Rde,"getCaeChallengeClaims");function uo(t){let e=t;return e&&typeof e.getToken=="function"&&(e.signRequest===void 0||e.getToken.length>0)}i(uo,"isTokenCredential");var uG="DisableKeepAlivePolicy";function Tde(){return{name:uG,async sendRequest(t,e){return t.disableKeepAlive=!0,e(t)}}}i(Tde,"createDisableKeepAlivePolicy");function vde(t){return t.getOrderedPolicies().some(e=>e.name===uG)}i(vde,"pipelineContainsDisableKeepAlivePolicy");function dG(t){return(t instanceof Buffer?t:Buffer.from(t.buffer)).toString("base64")}i(dG,"encodeByteArray");function pG(t){return Buffer.from(t,"base64")}i(pG,"decodeString");function Pst(t,e){return e!=="Composite"&&e!=="Dictionary"&&(typeof t=="string"||typeof t=="number"||typeof t=="boolean"||e?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||t===void 0||t===null)}i(Pst,"isPrimitiveBody");var Qst=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Pde(t){return Qst.test(t)}i(Pde,"isDuration");var _st=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Qde(t){return _st.test(t)}i(Qde,"isValidUuid");function Dst(t){let e={...t.headers,...t.body};return t.hasNullableType&&Object.getOwnPropertyNames(e).length===0?t.shouldWrapBody?{body:null}:null:t.shouldWrapBody?{...t.headers,body:t.body}:e}i(Dst,"handleNullableResponseAndWrappableBody");function mG(t,e){let r=t.parsedHeaders;if(t.request.method==="HEAD")return{...r,body:t.parsedBody};let n=e&&e.bodyMapper,s=!!n?.nullable,o=n?.type.name;if(o==="Stream")return{...r,blobBody:t.blobBody,readableStreamBody:t.readableStreamBody};let a=o==="Composite"&&n.type.modelProperties||{},c=Object.keys(a).some(l=>a[l].serializedName==="");if(o==="Sequence"||c){let l=t.parsedBody??[];for(let u of Object.keys(a))a[u].serializedName&&(l[u]=t.parsedBody?.[u]);if(r)for(let u of Object.keys(r))l[u]=r[u];return s&&!t.parsedBody&&!r&&Object.getOwnPropertyNames(a).length===0?null:l}return Dst({body:t.parsedBody,headers:r,hasNullableType:s,shouldWrapBody:Pst(t.parsedBody,o)})}i(mG,"flattenResponse");var fG=class{static{i(this,"SerializerImpl")}modelMappers;isXML;constructor(e={},r=!1){this.modelMappers=e,this.isXML=r}validateConstraints(e,r,n){let s=i((o,a)=>{throw new Error(`"${n}" with value "${r}" should satisfy the constraint "${o}": ${a}.`)},"failValidation");if(e.constraints&&r!==void 0&&r!==null){let{ExclusiveMaximum:o,ExclusiveMinimum:a,InclusiveMaximum:c,InclusiveMinimum:l,MaxItems:u,MaxLength:d,MinItems:p,MinLength:m,MultipleOf:f,Pattern:A,UniqueItems:h}=e.constraints;if(o!==void 0&&r>=o&&s("ExclusiveMaximum",o),a!==void 0&&r<=a&&s("ExclusiveMinimum",a),c!==void 0&&r>c&&s("InclusiveMaximum",c),l!==void 0&&ru&&s("MaxItems",u),d!==void 0&&r.length>d&&s("MaxLength",d),p!==void 0&&r.lengthw.indexOf(E)!==C)&&s("UniqueItems",h)}}serialize(e,r,n,s={xml:{}}){let o={xml:{rootName:s.xml.rootName??"",includeRoot:s.xml.includeRoot??!1,xmlCharKey:s.xml.xmlCharKey??"_"}},a={},c=e.type.name;n||(n=e.serializedName),c.match(/^Sequence$/i)!==null&&(a=[]),e.isConstant&&(r=e.defaultValue);let{required:l,nullable:u}=e;if(l&&u&&r===void 0)throw new Error(`${n} cannot be undefined.`);if(l&&!u&&r==null)throw new Error(`${n} cannot be null or undefined.`);if(!l&&u===!1&&r===null)throw new Error(`${n} cannot be null.`);return r==null||c.match(/^any$/i)!==null?a=r:c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null?a=Ust(c,n,r):c.match(/^Enum$/i)!==null?a=qst(n,e.type.allowedValues,r):c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null?a=$st(c,r,n):c.match(/^ByteArray$/i)!==null?a=Gst(n,r):c.match(/^Base64Url$/i)!==null?a=Hst(n,r):c.match(/^Sequence$/i)!==null?a=zst(this,e,r,n,!!this.isXML,o):c.match(/^Dictionary$/i)!==null?a=Vst(this,e,r,n,!!this.isXML,o):c.match(/^Composite$/i)!==null&&(a=Yst(this,e,r,n,!!this.isXML,o)),a}deserialize(e,r,n,s={xml:{}}){let o={xml:{rootName:s.xml.rootName??"",includeRoot:s.xml.includeRoot??!1,xmlCharKey:s.xml.xmlCharKey??"_"},ignoreUnknownProperties:s.ignoreUnknownProperties??!1};if(r==null)return this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped&&(r=[]),e.defaultValue!==void 0&&(r=e.defaultValue),r;let a,c=e.type.name;if(n||(n=e.serializedName),c.match(/^Composite$/i)!==null)a=jst(this,e,r,n,o);else{if(this.isXML){let l=o.xml.xmlCharKey;r["$"]!==void 0&&r[l]!==void 0&&(r=r[l])}c.match(/^Number$/i)!==null?(a=parseFloat(r),isNaN(a)&&(a=r)):c.match(/^Boolean$/i)!==null?r==="true"?a=!0:r==="false"?a=!1:a=r:c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null?a=r:c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null?a=new Date(r):c.match(/^UnixTime$/i)!==null?a=Fst(r):c.match(/^ByteArray$/i)!==null?a=pG(r):c.match(/^Base64Url$/i)!==null?a=Ost(r):c.match(/^Sequence$/i)!==null?a=Xst(this,e,r,n,o):c.match(/^Dictionary$/i)!==null&&(a=Kst(this,e,r,n,o))}return e.isConstant&&(a=e.defaultValue),a}};function po(t={},e=!1){return new fG(t,e)}i(po,"createSerializer");function kst(t,e){let r=t.length;for(;r-1>=0&&t[r-1]===e;)--r;return t.substr(0,r)}i(kst,"trimEnd");function Lst(t){if(!t)return;if(!(t instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");let e=dG(t);return kst(e,"=").replace(/\+/g,"-").replace(/\//g,"_")}i(Lst,"bufferToBase64Url");function Ost(t){if(t){if(t&&typeof t.valueOf()!="string")throw new Error("Please provide an input of type string for converting to Uint8Array");return t=t.replace(/-/g,"+").replace(/_/g,"/"),pG(t)}}i(Ost,"base64UrlToByteArray");function AG(t){let e=[],r="";if(t){let n=t.split(".");for(let s of n)s.charAt(s.length-1)==="\\"?r+=s.substr(0,s.length-1)+".":(r+=s,e.push(r),r="")}return e}i(AG,"splitSerializeName");function Mst(t){if(t)return typeof t.valueOf()=="string"&&(t=new Date(t)),Math.floor(t.getTime()/1e3)}i(Mst,"dateToUnixTime");function Fst(t){if(t)return new Date(t*1e3)}i(Fst,"unixTimeToDate");function Ust(t,e,r){if(r!=null){if(t.match(/^Number$/i)!==null){if(typeof r!="number")throw new Error(`${e} with value ${r} must be of type number.`)}else if(t.match(/^String$/i)!==null){if(typeof r.valueOf()!="string")throw new Error(`${e} with value "${r}" must be of type string.`)}else if(t.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()=="string"&&Qde(r)))throw new Error(`${e} with value "${r}" must be of type string and a valid uuid.`)}else if(t.match(/^Boolean$/i)!==null){if(typeof r!="boolean")throw new Error(`${e} with value ${r} must be of type boolean.`)}else if(t.match(/^Stream$/i)!==null){let n=typeof r;if(n!=="string"&&typeof r.pipe!="function"&&typeof r.tee!="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob=="function"||typeof Blob=="object")&&r instanceof Blob)&&n!=="function")throw new Error(`${e} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}}return r}i(Ust,"serializeBasicTypes");function qst(t,e,r){if(!e)throw new Error(`Please provide a set of allowedValues to validate ${t} as an Enum Type.`);if(!e.some(s=>typeof s.valueOf()=="string"?s.toLowerCase()===r.toLowerCase():s===r))throw new Error(`${r} is not a valid value for ${t}. The valid values are: ${JSON.stringify(e)}.`);return r}i(qst,"serializeEnumType");function Gst(t,e){if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);e=dG(e)}return e}i(Gst,"serializeByteArrayType");function Hst(t,e){if(e!=null){if(!(e instanceof Uint8Array))throw new Error(`${t} must be of type Uint8Array.`);e=Lst(e)}return e}i(Hst,"serializeBase64UrlType");function $st(t,e,r){if(e!=null){if(t.match(/^Date$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString().substring(0,10):new Date(e).toISOString().substring(0,10)}else if(t.match(/^DateTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);e=e instanceof Date?e.toISOString():new Date(e).toISOString()}else if(t.match(/^DateTimeRfc1123$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`);e=e instanceof Date?e.toUTCString():new Date(e).toUTCString()}else if(t.match(/^UnixTime$/i)!==null){if(!(e instanceof Date||typeof e.valueOf()=="string"&&!isNaN(Date.parse(e))))throw new Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);e=Mst(e)}else if(t.match(/^TimeSpan$/i)!==null&&!Pde(e))throw new Error(`${r} must be a string in ISO 8601 format. Instead was "${e}".`)}return e}i($st,"serializeDateTypes");function zst(t,e,r,n,s,o){if(!Array.isArray(r))throw new Error(`${n} must be of type Array.`);let a=e.type.element;if(!a||typeof a!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}.`);a.type.name==="Composite"&&a.type.className&&(a=t.modelMappers[a.type.className]??a);let c=[];for(let l=0;lm!==d)&&(a[d]=t.serialize(l,r[d],n+'["'+d+'"]',o))}return a}return r}i(Yst,"serializeCompositeType");function Lde(t,e,r,n){if(!r||!t.xmlNamespace)return e;let o={[t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns"]:t.xmlNamespace};if(["Composite"].includes(t.type.name)){if(e["$"])return e;{let c={...e};return c["$"]=o,c}}let a={};return a[n.xml.xmlCharKey]=e,a["$"]=o,a}i(Lde,"getXmlObjectValue");function Jst(t,e){return["$",e.xml.xmlCharKey].includes(t)}i(Jst,"isSpecialXmlProperty");function jst(t,e,r,n,s){let o=s.xml.xmlCharKey??"_";fR(t,e)&&(e=Ode(t,e,r,"serializedName"));let a=kde(t,e,n),c={},l=[];for(let d of Object.keys(a)){let p=a[d],m=AG(a[d].serializedName);l.push(m[0]);let{serializedName:f,xmlName:A,xmlElementName:h}=p,E=n;f!==""&&f!==void 0&&(E=n+"."+f);let C=p.headerCollectionPrefix;if(C){let w={};for(let x of Object.keys(r))x.startsWith(C)&&(w[x.substring(C.length)]=t.deserialize(p.type.value,r[x],E,s)),l.push(x);c[d]=w}else if(t.isXML)if(p.xmlIsAttribute&&r["$"])c[d]=t.deserialize(p,r["$"][A],E,s);else if(p.xmlIsMsText)r[o]!==void 0?c[d]=r[o]:typeof r=="string"&&(c[d]=r);else{let w=h||A||f;if(p.xmlIsWrapped){let b=r[A]?.[h]??[];c[d]=t.deserialize(p,b,E,s),l.push(A)}else{let x=r[w];c[d]=t.deserialize(p,x,E,s),l.push(w)}}else{let w,x=r,b=0;for(let _ of m){if(!x)break;b++,x=x[_]}x===null&&b{for(let m in a)if(AG(a[m].serializedName)[0]===p)return!1;return!0},"isAdditionalProperty");for(let p in r)d(p)&&(c[p]=t.deserialize(u,r[p],n+'["'+p+'"]',s))}else if(r&&!s.ignoreUnknownProperties)for(let d of Object.keys(r))c[d]===void 0&&!l.includes(d)&&!Jst(d,s)&&(c[d]=r[d]);return c}i(jst,"deserializeCompositeType");function Kst(t,e,r,n,s){let o=e.type.value;if(!o||typeof o!="object")throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${n}`);if(r){let a={};for(let c of Object.keys(r))a[c]=t.deserialize(o,r[c],n,s);return a}return r}i(Kst,"deserializeDictionaryType");function Xst(t,e,r,n,s){let o=e.type.element;if(!o||typeof o!="object")throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}`);if(r){Array.isArray(r)||(r=[r]),o.type.name==="Composite"&&o.type.className&&(o=t.modelMappers[o.type.className]??o);let a=[];for(let c=0;c0)if(s.isConstant)o=s.defaultValue;else{let a=Ude(t,n);!a.propertyFound&&r&&(a=Ude(r,n));let c=!1;a.propertyFound||(c=s.required||n[0]==="options"&&n.length===2),o=c?s.defaultValue:a.propertyValue}}else{s.required&&(o={});for(let a in n){let c=s.type.modelProperties[a],l=n[a],u=Xu(t,{parameterPath:l,mapper:c},r);u!==void 0&&(o||(o={}),o[a]=u)}}return o}i(Xu,"getOperationArgumentValueFromParameter");function Ude(t,e){let r={propertyFound:!1},n=0;for(;n=200&&r.status<300);l.headersMapper&&(o.parsedHeaders=c.serializer.deserialize(l.headersMapper,o.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return o}i(oot,"deserializeResponseBody");function iot(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}i(iot,"isOperationSpecEmpty");function aot(t,e,r,n){let s=200<=t.status&&t.status<300;if(iot(e)?s:!!r)if(r){if(!r.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let a=r??e.responses.default,c=t.request.streamResponseStatusCodes?.has(t.status)?`Unexpected status code: ${t.status}`:t.bodyAsText,l=new vl(c,{statusCode:t.status,request:t.request,response:t});if(!a&&!(t.parsedBody?.error?.code&&t.parsedBody?.error?.message))throw l;let u=a?.bodyMapper,d=a?.headersMapper;try{if(t.parsedBody){let p=t.parsedBody,m;if(u){let A=p;if(e.isXML&&u.type.name===za.Sequence){A=[];let h=u.xmlElementName;typeof p=="object"&&h&&(A=p[h])}m=e.serializer.deserialize(u,A,"error.response.parsedBody",n)}let f=p.error||m||p;l.code=f.code,f.message&&(l.message=f.message),u&&(l.response.parsedBody=m)}t.headers&&d&&(l.response.parsedHeaders=e.serializer.deserialize(d,t.headers.toJSON(),"operationRes.parsedHeaders"))}catch(p){l.message=`Error "${p.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}i(aot,"handleErrorResponse");async function cot(t,e,r,n,s){if(!r.request.streamResponseStatusCodes?.has(r.status)&&r.bodyAsText){let o=r.bodyAsText,a=r.headers.get("Content-Type")||"",c=a?a.split(";").map(l=>l.toLowerCase()):[];try{if(c.length===0||c.some(l=>t.indexOf(l)!==-1))return r.parsedBody=JSON.parse(o),r;if(c.some(l=>e.indexOf(l)!==-1)){if(!s)throw new Error("Parsing XML not supported.");let l=await s(o,n.xml);return r.parsedBody=l,r}}catch(l){let u=`Error "${l}" occurred while parsing the response body - ${r.bodyAsText}.`,d=l.code||vl.PARSE_ERROR;throw new vl(u,{code:d,statusCode:r.status,request:r.request,response:r})}}return r}i(cot,"parse");function Hde(t){let e=new Set;for(let r in t.responses){let n=t.responses[r];n.bodyMapper&&n.bodyMapper.type.name===za.Stream&&e.add(Number(r))}return e}i(Hde,"getStreamingResponseStatusCodes");function Va(t){let{parameterPath:e,mapper:r}=t,n;return typeof e=="string"?n=e:Array.isArray(e)?n=e.join("."):n=r.serializedName,n}i(Va,"getPathStringFromParameter");var $de="serializationPolicy";function hR(t={}){let e=t.stringifyXML;return{name:$de,async sendRequest(r,n){let s=Ql(r),o=s?.operationSpec,a=s?.operationArguments;return o&&a&&(lot(r,a,o),uot(r,a,o,e)),n(r)}}}i(hR,"serializationPolicy");function lot(t,e,r){if(r.headerParameters)for(let s of r.headerParameters){let o=Xu(e,s);if(o!=null||s.mapper.required){o=r.serializer.serialize(s.mapper,o,Va(s));let a=s.mapper.headerCollectionPrefix;if(a)for(let c of Object.keys(o))t.headers.set(a+c,o[c]);else t.headers.set(s.mapper.serializedName||Va(s),o)}}let n=e.options?.requestOptions?.customHeaders;if(n)for(let s of Object.keys(n))t.headers.set(s,n[s])}i(lot,"serializeHeaders");function uot(t,e,r,n=function(){throw new Error("XML serialization unsupported!")}){let s=e.options?.serializerOptions,o={xml:{rootName:s?.xml.rootName??"",includeRoot:s?.xml.includeRoot??!1,xmlCharKey:s?.xml.xmlCharKey??"_"}},a=o.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){t.body=Xu(e,r.requestBody);let c=r.requestBody.mapper,{required:l,serializedName:u,xmlName:d,xmlElementName:p,xmlNamespace:m,xmlNamespacePrefix:f,nullable:A}=c,h=c.type.name;try{if(t.body!==void 0&&t.body!==null||A&&t.body===null||l){let E=Va(r.requestBody);t.body=r.serializer.serialize(c,t.body,E,o);let C=h===za.Stream;if(r.isXML){let w=f?`xmlns:${f}`:"xmlns",x=dot(m,w,h,t.body,o);h===za.Sequence?t.body=n(pot(x,p||d||u,w,m),{rootName:d||u,xmlCharKey:a}):C||(t.body=n(x,{rootName:d||u,xmlCharKey:a}))}else{if(h===za.String&&(r.contentType?.match("text/plain")||r.mediaType==="text"))return;C||(t.body=JSON.stringify(t.body))}}}catch(E){throw new Error(`Error "${E.message}" occurred in serializing the payload - ${JSON.stringify(u,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){t.formData={};for(let c of r.formDataParameters){let l=Xu(e,c);if(l!=null){let u=c.mapper.serializedName||Va(c);t.formData[u]=r.serializer.serialize(c.mapper,l,Va(c),o)}}}}i(uot,"serializeRequestBody");function dot(t,e,r,n,s){if(t&&!["Composite","Sequence","Dictionary"].includes(r)){let o={};return o[s.xml.xmlCharKey]=n,o["$"]={[e]:t},o}return n}i(dot,"getXmlValueWithNamespace");function pot(t,e,r,n){if(Array.isArray(t)||(t=[t]),!r||!n)return{[e]:t};let s={[e]:t};return s["$"]={[r]:n},s}i(pot,"prepareXMLRootList");function TC(t={}){let e=cG(t??{});return t.credentialOptions&&e.addPolicy(rh({credential:t.credentialOptions.credential,scopes:t.credentialOptions.credentialScopes})),e.addPolicy(hR(t.serializationOptions),{phase:"Serialize"}),e.addPolicy(gG(t.deserializationOptions),{phase:"Deserialize"}),e}i(TC,"createClientPipeline");var yG;function zde(){return yG||(yG=RC()),yG}i(zde,"getCachedDefaultHttpClient");var mot={CSV:",",SSV:" ",Multi:"Multi",TSV:" ",Pipes:"|"};function Wde(t,e,r,n){let s=fot(e,r,n),o=!1,a=Vde(t,s);if(e.path){let u=Vde(e.path,s);e.path==="/{nextLink}"&&u.startsWith("/")&&(u=u.substring(1)),Aot(u)?(a=u,o=!0):a=hot(a,u)}let{queryParams:c,sequenceParams:l}=got(e,r,n);return a=Eot(a,c,l,o),a}i(Wde,"getRequestUrl");function Vde(t,e){let r=t;for(let[n,s]of e)r=r.split(n).join(s);return r}i(Vde,"replaceAll");function fot(t,e,r){let n=new Map;if(t.urlParameters?.length)for(let s of t.urlParameters){let o=Xu(e,s,r),a=Va(s);o=t.serializer.serialize(s.mapper,o,a),s.skipEncoding||(o=encodeURIComponent(o)),n.set(`{${s.mapper.serializedName||a}}`,o)}return n}i(fot,"calculateUrlReplacements");function Aot(t){return t.includes("://")}i(Aot,"isAbsoluteUrl");function hot(t,e){if(!e)return t;let r=new URL(t),n=r.pathname;n.endsWith("/")||(n=`${n}/`),e.startsWith("/")&&(e=e.substring(1));let s=e.indexOf("?");if(s!==-1){let o=e.substring(0,s),a=e.substring(s+1);n=n+o,a&&(r.search=r.search?`${r.search}&${a}`:a)}else n=n+e;return r.pathname=n,r.toString()}i(hot,"appendPath");function got(t,e,r){let n=new Map,s=new Set;if(t.queryParameters?.length)for(let o of t.queryParameters){o.mapper.type.name==="Sequence"&&o.mapper.serializedName&&s.add(o.mapper.serializedName);let a=Xu(e,o,r);if(a!=null||o.mapper.required){a=t.serializer.serialize(o.mapper,a,Va(o));let c=o.collectionFormat?mot[o.collectionFormat]:"";if(Array.isArray(a)&&(a=a.map(l=>l??"")),o.collectionFormat==="Multi"&&a.length===0)continue;Array.isArray(a)&&(o.collectionFormat==="SSV"||o.collectionFormat==="TSV")&&(a=a.join(c)),o.skipEncoding||(Array.isArray(a)?a=a.map(l=>encodeURIComponent(l)):a=encodeURIComponent(a)),Array.isArray(a)&&(o.collectionFormat==="CSV"||o.collectionFormat==="Pipes")&&(a=a.join(c)),n.set(o.mapper.serializedName||Va(o),a)}}return{queryParams:n,sequenceParams:s}}i(got,"calculateQueryParameters");function yot(t){let e=new Map;if(!t||t[0]!=="?")return e;t=t.slice(1);let r=t.split("&");for(let n of r){let[s,o]=n.split("=",2),a=e.get(s);a?Array.isArray(a)?a.push(o):e.set(s,[a,o]):e.set(s,o)}return e}i(yot,"simpleParseQueryParams");function Eot(t,e,r,n=!1){if(e.size===0)return t;let s=new URL(t),o=yot(s.search);for(let[c,l]of e){let u=o.get(c);if(Array.isArray(u))if(Array.isArray(l)){u.push(...l);let d=new Set(u);o.set(c,Array.from(d))}else u.push(l);else u?(Array.isArray(l)?l.unshift(u):r.has(c)&&o.set(c,[u,l]),n||o.set(c,l)):o.set(c,l)}let a=[];for(let[c,l]of o)if(typeof l=="string")a.push(`${c}=${l}`);else if(Array.isArray(l))for(let u of l)a.push(`${c}=${u}`);else a.push(`${c}=${l}`);return s.search=a.length?`?${a.join("&")}`:"",s.toString()}i(Eot,"appendQueryParams");var EG=Ha("core-client");var vC=class{static{i(this,"ServiceClient")}_endpoint;_requestContentType;_allowInsecureConnection;_httpClient;pipeline;constructor(e={}){if(this._requestContentType=e.requestContentType,this._endpoint=e.endpoint??e.baseUri,e.baseUri&&EG.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||zde(),this.pipeline=e.pipeline||Cot(e),e.additionalPolicies?.length)for(let{policy:r,position:n}of e.additionalPolicies){let s=n==="perRetry"?"Sign":void 0;this.pipeline.addPolicy(r,{afterPhase:s})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,r){let n=r.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");let s=Wde(n,r,e,this),o=NC({url:s});o.method=r.httpMethod;let a=Ql(o);a.operationSpec=r,a.operationArguments=e;let c=r.contentType||this._requestContentType;c&&r.requestBody&&o.headers.set("Content-Type",c);let l=e.options;if(l){let u=l.requestOptions;u&&(u.timeout&&(o.timeout=u.timeout),u.onUploadProgress&&(o.onUploadProgress=u.onUploadProgress),u.onDownloadProgress&&(o.onDownloadProgress=u.onDownloadProgress),u.shouldDeserialize!==void 0&&(a.shouldDeserialize=u.shouldDeserialize),u.allowInsecureConnection&&(o.allowInsecureConnection=!0)),l.abortSignal&&(o.abortSignal=l.abortSignal),l.tracingOptions&&(o.tracingOptions=l.tracingOptions)}this._allowInsecureConnection&&(o.allowInsecureConnection=!0),o.streamResponseStatusCodes===void 0&&(o.streamResponseStatusCodes=Hde(r));try{let u=await this.sendRequest(o),d=mG(u,r.responses[u.status]);return l?.onResponse&&l.onResponse(u,d),d}catch(u){if(typeof u=="object"&&u?.response){let d=u.response,p=mG(d,r.responses[u.statusCode]||r.responses.default);u.details=p,l?.onResponse&&l.onResponse(d,p,u)}throw u}}};function Cot(t){let e=Iot(t),r=t.credential&&e?{credentialScopes:e,credential:t.credential}:void 0;return TC({...t,credentialOptions:r})}i(Cot,"createDefaultPipeline");function Iot(t){if(t.credentialScopes)return t.credentialScopes;if(t.endpoint)return`${t.endpoint}/.default`;if(t.baseUri)return`${t.baseUri}/.default`;if(t.credential&&!t.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}i(Iot,"getCredentialScopes");var Yde={DefaultScope:"/.default",HeaderConstants:{AUTHORIZATION:"authorization"}};function wot(t){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(t)}i(wot,"isUuid");var gR=i(async t=>{let e=Rot(t.request),r=bot(t.response);if(r){let n=Bot(r),s=xot(t,n),o=Sot(n);if(!o)return!1;let a=await t.getAccessToken(s,{...e,tenantId:o});return a?(t.request.headers.set(Yde.HeaderConstants.AUTHORIZATION,`${a.tokenType??"Bearer"} ${a.token}`),!0):!1}return!1},"authorizeRequestOnTenantChallenge");function Sot(t){let n=new URL(t.authorization_uri).pathname.split("/")[1];if(n&&wot(n))return n}i(Sot,"extractTenantId");function xot(t,e){if(!e.resource_id)return t.scopes;let r=new URL(e.resource_id);r.pathname=Yde.DefaultScope;let n=r.toString();return n==="https://disk.azure.com/.default"&&(n="https://disk.azure.com//.default"),[n]}i(xot,"buildScopes");function bot(t){let e=t.headers.get("WWW-Authenticate");if(t.status===401&&e)return e}i(bot,"getChallenge");function Bot(t){return`${t.slice(7).trim()} `.split(" ").filter(s=>s).map(s=>(([o,a])=>({[o]:a}))(s.trim().split("="))).reduce((s,o)=>({...s,...o}),{})}i(Bot,"parseChallenge");function Rot(t){return{abortSignal:t.abortSignal,requestOptions:{timeout:t.timeout},tracingOptions:t.tracingOptions}}i(Rot,"requestToOptions");var Jde=Symbol("Original PipelineRequest"),Not=Symbol.for("@azure/core-client original request");function QC(t,e={}){let n=t[Jde],s=Pl(t.headers.toJson({preserveCase:!0}));if(n)return n.headers=s,n;{let o=NC({url:t.url,method:t.method,headers:s,withCredentials:t.withCredentials,timeout:t.timeout,requestId:t.requestId,abortSignal:t.abortSignal,body:t.body,formData:t.formData,disableKeepAlive:!!t.keepAlive,onDownloadProgress:t.onDownloadProgress,onUploadProgress:t.onUploadProgress,proxySettings:t.proxySettings,streamResponseStatusCodes:t.streamResponseStatusCodes,agent:t.agent,requestOverrides:t.requestOverrides});return e.originalRequest&&(o[Not]=e.originalRequest),o}}i(QC,"toPipelineRequest");function om(t,e){let r=e?.originalRequest??t,n={url:t.url,method:t.method,headers:_C(t.headers),withCredentials:t.withCredentials,timeout:t.timeout,requestId:t.headers.get("x-ms-client-request-id")||t.requestId,abortSignal:t.abortSignal,body:t.body,formData:t.formData,keepAlive:!!t.disableKeepAlive,onDownloadProgress:t.onDownloadProgress,onUploadProgress:t.onUploadProgress,proxySettings:t.proxySettings,streamResponseStatusCodes:t.streamResponseStatusCodes,agent:t.agent,requestOverrides:t.requestOverrides,clone(){throw new Error("Cannot clone a non-proxied WebResourceLike")},prepare(){throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat")},validateRequestProperties(){}};return e?.createProxy?new Proxy(n,{get(s,o,a){return o===Jde?t:o==="clone"?()=>om(QC(n,{originalRequest:r}),{createProxy:!0,originalRequest:r}):Reflect.get(s,o,a)},set(s,o,a,c){return o==="keepAlive"&&(t.disableKeepAlive=!a),typeof o=="string"&&["url","method","withCredentials","timeout","requestId","abortSignal","body","formData","onDownloadProgress","onUploadProgress","proxySettings","streamResponseStatusCodes","agent","requestOverrides"].includes(o)&&(t[o]=a),Reflect.set(s,o,a,c)}}):n}i(om,"toWebResourceLike");function _C(t){return new CG(t.toJSON({preserveCase:!0}))}i(_C,"toHttpHeadersLike");function PC(t){return t.toLowerCase()}i(PC,"getHeaderKey");var CG=class t{static{i(this,"HttpHeaders")}_headersMap;constructor(e){if(this._headersMap={},e)for(let r in e)this.set(r,e[r])}set(e,r){this._headersMap[PC(e)]={name:e,value:r.toString()}}get(e){let r=this._headersMap[PC(e)];return r?r.value:void 0}contains(e){return!!this._headersMap[PC(e)]}remove(e){let r=this.contains(e);return delete this._headersMap[PC(e)],r}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){let e=[];for(let r in this._headersMap)e.push(this._headersMap[r]);return e}headerNames(){let e=[],r=this.headersArray();for(let n=0;n{let r=await t.sendRequest(om(e,{createProxy:!0}));return ER(r)},"sendRequest")}}i(SG,"convertHttpClient");var Xde=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Pot=Xde+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Qot="["+Xde+"]["+Pot+"]*",_ot=new RegExp("^"+Qot+"$");function CR(t,e){let r=[],n=e.exec(t);for(;n;){let s=[];s.startIndex=e.lastIndex-n[0].length;let o=n.length;for(let a=0;a"u")},"isName");function Zde(t){return typeof t<"u"}i(Zde,"isExist");var kC=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],IR=["__proto__","constructor","prototype"];var Dot={allowBooleanAttributes:!1,unpairedTags:[]};function wR(t,e){e=Object.assign({},Dot,e);let r=[],n=!1,s=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let o=0;o"&&t[o]!==" "&&t[o]!==" "&&t[o]!==` `&&t[o]!=="\r";o++)l+=t[o];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),o--),!Got(l)){let p;return l.trim().length===0?p="Invalid space after '<'.":p="Tag '"+l+"' is an invalid name.",gr("InvalidTag",p,Kn(t,o))}let u=Oot(t,o);if(u===!1)return gr("InvalidAttr","Attributes for '"+l+"' have open quote.",Kn(t,o));let d=u.value;if(o=u.index,d[d.length-1]==="/"){let p=o-d.length;d=d.substring(0,d.length-1);let m=npe(d,e);if(m===!0)n=!0;else return gr(m.err.code,m.err.msg,Kn(t,p+m.err.line))}else if(c)if(u.tagClosed){if(d.trim().length>0)return gr("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Kn(t,a));if(r.length===0)return gr("InvalidTag","Closing tag '"+l+"' has not been opened.",Kn(t,a));{let p=r.pop();if(l!==p.tagName){let m=Kn(t,p.tagStartPos);return gr("InvalidTag","Expected closing tag '"+p.tagName+"' (opened in line "+m.line+", col "+m.col+") instead of closing tag '"+l+"'.",Kn(t,a))}r.length==0&&(s=!0)}}else return gr("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Kn(t,o));else{let p=npe(d,e);if(p!==!0)return gr(p.err.code,p.err.msg,Kn(t,o-d.length+p.err.line));if(s===!0)return gr("InvalidXml","Multiple possible root nodes found.",Kn(t,o));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),n=!0}for(o++;o0)return gr("InvalidXml","Invalid '"+JSON.stringify(r.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return gr("InvalidXml","Start tag expected.",1);return!0}i(wR,"validate");function epe(t){return t===" "||t===" "||t===` `||t==="\r"}i(epe,"isWhiteSpace");function tpe(t,e){let r=e;for(;e5&&n==="xml")return gr("InvalidXml","XML declaration allowed only at the start of the document.",Kn(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}i(tpe,"readPI");function rpe(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}i(rpe,"readCommentAndCDATA");var kot='"',Lot="'";function Oot(t,e){let r="",n="",s=!1;for(;e"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}i(Oot,"readAttributeStr");var Mot=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function npe(t,e){let r=CR(t,Mot),n={};for(let s=0;s",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},ope={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},ipe={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\u0125",Hstrok:"\u0126",hstrok:"\u0127",Itilde:"\u0128",itilde:"\u0129",Imacr:"\u012A",imacr:"\u012B",Iogon:"\u012E",iogon:"\u012F",Idot:"\u0130",IJlig:"\u0132",ijlig:"\u0133",Jcirc:"\u0134",jcirc:"\u0135",Kcedil:"\u0136",kcedil:"\u0137",kgreen:"\u0138",Lacute:"\u0139",lacute:"\u013A",Lcedil:"\u013B",lcedil:"\u013C",Lcaron:"\u013D",lcaron:"\u013E",Lmidot:"\u013F",lmidot:"\u0140",Lstrok:"\u0141",lstrok:"\u0142",Nacute:"\u0143",nacute:"\u0144",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ENG:"\u014A",eng:"\u014B",Omacr:"\u014C",omacr:"\u014D",Odblac:"\u0150",odblac:"\u0151",OElig:"\u0152",oelig:"\u0153",Racute:"\u0154",racute:"\u0155",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",Sacute:"\u015A",sacute:"\u015B",Scirc:"\u015C",scirc:"\u015D",Scedil:"\u015E",scedil:"\u015F",Scaron:"\u0160",scaron:"\u0161",Tcedil:"\u0162",tcedil:"\u0163",Tcaron:"\u0164",tcaron:"\u0165",Tstrok:"\u0166",tstrok:"\u0167",Utilde:"\u0168",utilde:"\u0169",Umacr:"\u016A",umacr:"\u016B",Ubreve:"\u016C",ubreve:"\u016D",Uring:"\u016E",uring:"\u016F",Udblac:"\u0170",udblac:"\u0171",Uogon:"\u0172",uogon:"\u0173",Wcirc:"\u0174",wcirc:"\u0175",Ycirc:"\u0176",ycirc:"\u0177",Zacute:"\u0179",zacute:"\u017A",Zdot:"\u017B",zdot:"\u017C",Zcaron:"\u017D",zcaron:"\u017E"},ape={Alpha:"\u0391",alpha:"\u03B1",Beta:"\u0392",beta:"\u03B2",Gamma:"\u0393",gamma:"\u03B3",Delta:"\u0394",delta:"\u03B4",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",varepsilon:"\u03F5",Zeta:"\u0396",zeta:"\u03B6",Eta:"\u0397",eta:"\u03B7",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",vartheta:"\u03D1",Iota:"\u0399",iota:"\u03B9",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",Lambda:"\u039B",lambda:"\u03BB",Mu:"\u039C",mu:"\u03BC",Nu:"\u039D",nu:"\u03BD",Xi:"\u039E",xi:"\u03BE",Omicron:"\u039F",omicron:"\u03BF",Pi:"\u03A0",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",Tau:"\u03A4",tau:"\u03C4",Upsilon:"\u03A5",upsilon:"\u03C5",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",varphi:"\u03D5",Chi:"\u03A7",chi:"\u03C7",Psi:"\u03A8",psi:"\u03C8",Omega:"\u03A9",omega:"\u03C9",ohm:"\u03A9",Gammad:"\u03DC",gammad:"\u03DD",digamma:"\u03DD"},cpe={Afr:"\u{1D504}",afr:"\u{1D51E}",Acy:"\u0410",acy:"\u0430",Bcy:"\u0411",bcy:"\u0431",Vcy:"\u0412",vcy:"\u0432",Gcy:"\u0413",gcy:"\u0433",Dcy:"\u0414",dcy:"\u0434",IEcy:"\u0415",iecy:"\u0435",IOcy:"\u0401",iocy:"\u0451",ZHcy:"\u0416",zhcy:"\u0436",Zcy:"\u0417",zcy:"\u0437",Icy:"\u0418",icy:"\u0438",Jcy:"\u0419",jcy:"\u0439",Kcy:"\u041A",kcy:"\u043A",Lcy:"\u041B",lcy:"\u043B",Mcy:"\u041C",mcy:"\u043C",Ncy:"\u041D",ncy:"\u043D",Ocy:"\u041E",ocy:"\u043E",Pcy:"\u041F",pcy:"\u043F",Rcy:"\u0420",rcy:"\u0440",Scy:"\u0421",scy:"\u0441",Tcy:"\u0422",tcy:"\u0442",Ucy:"\u0423",ucy:"\u0443",Fcy:"\u0424",fcy:"\u0444",KHcy:"\u0425",khcy:"\u0445",TScy:"\u0426",tscy:"\u0446",CHcy:"\u0427",chcy:"\u0447",SHcy:"\u0428",shcy:"\u0448",SHCHcy:"\u0429",shchcy:"\u0449",HARDcy:"\u042A",hardcy:"\u044A",Ycy:"\u042B",ycy:"\u044B",SOFTcy:"\u042C",softcy:"\u044C",Ecy:"\u042D",ecy:"\u044D",YUcy:"\u042E",yucy:"\u044E",YAcy:"\u042F",yacy:"\u044F",DJcy:"\u0402",djcy:"\u0452",GJcy:"\u0403",gjcy:"\u0453",Jukcy:"\u0404",jukcy:"\u0454",DScy:"\u0405",dscy:"\u0455",Iukcy:"\u0406",iukcy:"\u0456",YIcy:"\u0407",yicy:"\u0457",Jsercy:"\u0408",jsercy:"\u0458",LJcy:"\u0409",ljcy:"\u0459",NJcy:"\u040A",njcy:"\u045A",TSHcy:"\u040B",tshcy:"\u045B",KJcy:"\u040C",kjcy:"\u045C",Ubrcy:"\u040E",ubrcy:"\u045E",DZcy:"\u040F",dzcy:"\u045F"},lpe={plus:"+",minus:"\u2212",mnplus:"\u2213",mp:"\u2213",pm:"\xB1",times:"\xD7",div:"\xF7",divide:"\xF7",sdot:"\u22C5",star:"\u2606",starf:"\u2605",bigstar:"\u2605",lowast:"\u2217",ast:"*",midast:"*",compfn:"\u2218",smallcircle:"\u2218",bullet:"\u2022",bull:"\u2022",nbsp:"\xA0",hellip:"\u2026",mldr:"\u2026",prime:"\u2032",Prime:"\u2033",tprime:"\u2034",bprime:"\u2035",backprime:"\u2035",minus:"\u2212",minusd:"\u2238",dotminus:"\u2238",plusdo:"\u2214",dotplus:"\u2214",plusmn:"\xB1",minusplus:"\u2213",mnplus:"\u2213",mp:"\u2213",setminus:"\u2216",smallsetminus:"\u2216",Backslash:"\u2216",setmn:"\u2216",ssetmn:"\u2216",lowbar:"_",verbar:"|",vert:"|",VerticalLine:"|",colon:":",Colon:"\u2237",Proportion:"\u2237",ratio:"\u2236",equals:"=",ne:"\u2260",nequiv:"\u2262",equiv:"\u2261",Congruent:"\u2261",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",sime:"\u2243",simeq:"\u2243",TildeEqual:"\u2243",asymp:"\u2248",approx:"\u2248",thickapprox:"\u2248",thkap:"\u2248",TildeTilde:"\u2248",ncong:"\u2247",cong:"\u2245",TildeFullEqual:"\u2245",asympeq:"\u224D",CupCap:"\u224D",bump:"\u224E",Bumpeq:"\u224E",HumpDownHump:"\u224E",bumpe:"\u224F",bumpeq:"\u224F",HumpEqual:"\u224F",dotminus:"\u2238",minusd:"\u2238",plusdo:"\u2214",dotplus:"\u2214",le:"\u2264",LessEqual:"\u2264",ge:"\u2265",GreaterEqual:"\u2265",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",greater:">",less:"<"},upe={alefsym:"\u2135",aleph:"\u2135",beth:"\u2136",gimel:"\u2137",daleth:"\u2138",forall:"\u2200",ForAll:"\u2200",part:"\u2202",PartialD:"\u2202",exist:"\u2203",Exists:"\u2203",nexist:"\u2204",nexists:"\u2204",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",nabla:"\u2207",Del:"\u2207",isin:"\u2208",isinv:"\u2208",in:"\u2208",Element:"\u2208",notin:"\u2209",notinva:"\u2209",ni:"\u220B",niv:"\u220B",SuchThat:"\u220B",ReverseElement:"\u220B",notni:"\u220C",notniva:"\u220C",prod:"\u220F",Product:"\u220F",coprod:"\u2210",Coproduct:"\u2210",sum:"\u2211",Sum:"\u2211",minus:"\u2212",mp:"\u2213",plusdo:"\u2214",dotplus:"\u2214",setminus:"\u2216",lowast:"\u2217",radic:"\u221A",Sqrt:"\u221A",prop:"\u221D",propto:"\u221D",Proportional:"\u221D",varpropto:"\u221D",infin:"\u221E",infintie:"\u29DD",ang:"\u2220",angle:"\u2220",angmsd:"\u2221",measuredangle:"\u2221",angsph:"\u2222",mid:"\u2223",VerticalBar:"\u2223",nmid:"\u2224",nsmid:"\u2224",npar:"\u2226",parallel:"\u2225",spar:"\u2225",nparallel:"\u2226",nspar:"\u2226",and:"\u2227",wedge:"\u2227",or:"\u2228",vee:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",Integral:"\u222B",conint:"\u222E",ContourIntegral:"\u222E",Conint:"\u222F",DoubleContourIntegral:"\u222F",Cconint:"\u2230",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",becaus:"\u2235",because:"\u2235",Because:"\u2235",ratio:"\u2236",Proportion:"\u2237",minusd:"\u2238",dotminus:"\u2238",mDDot:"\u223A",homtht:"\u223B",sim:"\u223C",bsimg:"\u223D",backsim:"\u223D",ac:"\u223E",mstpos:"\u223E",acd:"\u223F",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",nsime:"\u2244",nsimeq:"\u2244",nsimeq:"\u2244",ncong:"\u2247",simne:"\u2246",ncongdot:"\u2A6D\u0338",ngsim:"\u2275",nsim:"\u2241",napprox:"\u2249",nap:"\u2249",ngeq:"\u2271",nge:"\u2271",nleq:"\u2270",nle:"\u2270",ngtr:"\u226F",ngt:"\u226F",nless:"\u226E",nlt:"\u226E",nprec:"\u2280",npr:"\u2280",nsucc:"\u2281",nsc:"\u2281"},dpe={larr:"\u2190",leftarrow:"\u2190",LeftArrow:"\u2190",uarr:"\u2191",uparrow:"\u2191",UpArrow:"\u2191",rarr:"\u2192",rightarrow:"\u2192",RightArrow:"\u2192",darr:"\u2193",downarrow:"\u2193",DownArrow:"\u2193",harr:"\u2194",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",varr:"\u2195",updownarrow:"\u2195",UpDownArrow:"\u2195",nwarr:"\u2196",nwarrow:"\u2196",UpperLeftArrow:"\u2196",nearr:"\u2197",nearrow:"\u2197",UpperRightArrow:"\u2197",searr:"\u2198",searrow:"\u2198",LowerRightArrow:"\u2198",swarr:"\u2199",swarrow:"\u2199",LowerLeftArrow:"\u2199",lArr:"\u21D0",Leftarrow:"\u21D0",uArr:"\u21D1",Uparrow:"\u21D1",rArr:"\u21D2",Rightarrow:"\u21D2",dArr:"\u21D3",Downarrow:"\u21D3",hArr:"\u21D4",Leftrightarrow:"\u21D4",iff:"\u21D4",vArr:"\u21D5",Updownarrow:"\u21D5",lAarr:"\u21DA",Lleftarrow:"\u21DA",rAarr:"\u21DB",Rrightarrow:"\u21DB",lrarr:"\u21C6",leftrightarrows:"\u21C6",rlarr:"\u21C4",rightleftarrows:"\u21C4",lrhar:"\u21CB",leftrightharpoons:"\u21CB",ReverseEquilibrium:"\u21CB",rlhar:"\u21CC",rightleftharpoons:"\u21CC",Equilibrium:"\u21CC",udarr:"\u21C5",UpArrowDownArrow:"\u21C5",duarr:"\u21F5",DownArrowUpArrow:"\u21F5",llarr:"\u21C7",leftleftarrows:"\u21C7",rrarr:"\u21C9",rightrightarrows:"\u21C9",ddarr:"\u21CA",downdownarrows:"\u21CA",har:"\u21BD",lhard:"\u21BD",leftharpoondown:"\u21BD",lharu:"\u21BC",leftharpoonup:"\u21BC",rhard:"\u21C1",rightharpoondown:"\u21C1",rharu:"\u21C0",rightharpoonup:"\u21C0",lsh:"\u21B0",Lsh:"\u21B0",rsh:"\u21B1",Rsh:"\u21B1",ldsh:"\u21B2",rdsh:"\u21B3",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",mapstoleft:"\u21A4",mapstoup:"\u21A5",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",crarr:"\u21B5",nwarrow:"\u2196",nearrow:"\u2197",searrow:"\u2198",swarrow:"\u2199",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nrightarrow:"\u219B",nrarr:"\u219B",larrtl:"\u21A2",rarrtl:"\u21A3",leftarrowtail:"\u21A2",rightarrowtail:"\u21A3",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Larr:"\u219E",Rarr:"\u21A0",larrhk:"\u21A9",rarrhk:"\u21AA",larrlp:"\u21AB",looparrowleft:"\u21AB",rarrlp:"\u21AC",looparrowright:"\u21AC",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",nrarrw:"\u219D\u0338",rarrw:"\u219D",rightsquigarrow:"\u219D",larrbfs:"\u291F",rarrbfs:"\u2920",nvHarr:"\u2904",nvlArr:"\u2902",nvrArr:"\u2903",larrfs:"\u291D",rarrfs:"\u291E",Map:"\u2905",larrsim:"\u2973",rarrsim:"\u2974",harrcir:"\u2948",Uarrocir:"\u2949",lurdshar:"\u294A",ldrdhar:"\u2967",ldrushar:"\u294B",rdldhar:"\u2969",lrhard:"\u296D",rlhar:"\u21CC",uharr:"\u21BE",uharl:"\u21BF",dharr:"\u21C2",dharl:"\u21C3",Uarr:"\u219F",Darr:"\u21A1",zigrarr:"\u21DD",nwArr:"\u21D6",neArr:"\u21D7",seArr:"\u21D8",swArr:"\u21D9",nharr:"\u21AE",nhArr:"\u21CE",nlarr:"\u219A",nlArr:"\u21CD",nrarr:"\u219B",nrArr:"\u21CF",larrb:"\u21E4",LeftArrowBar:"\u21E4",rarrb:"\u21E5",RightArrowBar:"\u21E5"},ppe={square:"\u25A1",Square:"\u25A1",squ:"\u25A1",squf:"\u25AA",squarf:"\u25AA",blacksquar:"\u25AA",blacksquare:"\u25AA",FilledVerySmallSquare:"\u25AA",blk34:"\u2593",blk12:"\u2592",blk14:"\u2591",block:"\u2588",srect:"\u25AD",rect:"\u25AD",sdot:"\u22C5",sdotb:"\u22A1",dotsquare:"\u22A1",triangle:"\u25B5",tri:"\u25B5",trine:"\u25B5",utri:"\u25B5",triangledown:"\u25BF",dtri:"\u25BF",tridown:"\u25BF",triangleleft:"\u25C3",ltri:"\u25C3",triangleright:"\u25B9",rtri:"\u25B9",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",loz:"\u25CA",lozenge:"\u25CA",blacklozenge:"\u29EB",lozf:"\u29EB",bigcirc:"\u25EF",xcirc:"\u25EF",circ:"\u02C6",Circle:"\u25CB",cir:"\u25CB",o:"\u25CB",bullet:"\u2022",bull:"\u2022",hellip:"\u2026",mldr:"\u2026",nldr:"\u2025",boxh:"\u2500",HorizontalLine:"\u2500",boxv:"\u2502",boxdr:"\u250C",boxdl:"\u2510",boxur:"\u2514",boxul:"\u2518",boxvr:"\u251C",boxvl:"\u2524",boxhd:"\u252C",boxhu:"\u2534",boxvh:"\u253C",boxH:"\u2550",boxV:"\u2551",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxDl:"\u2555",boxdL:"\u2556",boxDL:"\u2557",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxUl:"\u255C",boxuL:"\u255B",boxUL:"\u255D",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",boxVl:"\u2562",boxvL:"\u2561",boxVL:"\u2563",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C"},mpe={excl:"!",iexcl:"\xA1",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",nbsp:"\xA0",comma:",",period:".",colon:":",semi:";",vert:"|",Verbar:"\u2016",verbar:"|",dblac:"\u02DD",circ:"\u02C6",caron:"\u02C7",breve:"\u02D8",dot:"\u02D9",ring:"\u02DA",ogon:"\u02DB",tilde:"\u02DC",DiacriticalGrave:"`",DiacriticalAcute:"\xB4",DiacriticalTilde:"\u02DC",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",grave:"`",acute:"\xB4"},SR={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",euro:"\u20AC",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},fpe={frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044"},Ape={trade:"\u2122",TRADE:"\u2122",telrec:"\u2315",target:"\u2316",ulcorn:"\u231C",ulcorner:"\u231C",urcorn:"\u231D",urcorner:"\u231D",dlcorn:"\u231E",llcorner:"\u231E",drcorn:"\u231F",lrcorner:"\u231F",intercal:"\u22BA",intcal:"\u22BA",oplus:"\u2295",CirclePlus:"\u2295",ominus:"\u2296",CircleMinus:"\u2296",otimes:"\u2297",CircleTimes:"\u2297",osol:"\u2298",odot:"\u2299",CircleDot:"\u2299",oast:"\u229B",circledast:"\u229B",odash:"\u229D",circleddash:"\u229D",ocirc:"\u229A",circledcirc:"\u229A",boxplus:"\u229E",plusb:"\u229E",boxminus:"\u229F",minusb:"\u229F",boxtimes:"\u22A0",timesb:"\u22A0",boxdot:"\u22A1",sdotb:"\u22A1",veebar:"\u22BB",vee:"\u2228",barvee:"\u22BD",and:"\u2227",wedge:"\u2227",Cap:"\u22D2",Cup:"\u22D3",Fork:"\u22D4",pitchfork:"\u22D4",epar:"\u22D5",ltlarr:"\u2976",nvap:"\u224D\u20D2",nvsim:"\u223C\u20D2",nvge:"\u2265\u20D2",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvgt:">\u20D2",nvltrie:"\u22B4\u20D2",nvrtrie:"\u22B5\u20D2",Vdash:"\u22A9",dashv:"\u22A3",vDash:"\u22A8",Vdash:"\u22A9",Vvdash:"\u22AA",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF"},Hot={...spe,...ope,...ipe,...ape,...cpe,...lpe,...upe,...dpe,...ppe,...mpe,...SR,...fpe,...Ape},OC={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},bG={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"};var $ot=new Set("!?\\\\/[]$%{}^&*()<>|+");function hpe(t){if(t[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${t}"`);for(let e of t)if($ot.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${t}"`);return t}i(hpe,"validateEntityName");function BG(...t){let e=Object.create(null);for(let r of t)if(r)for(let n of Object.keys(r)){let s=r[n];if(typeof s=="string")e[n]=s;else if(s&&typeof s=="object"&&s.val!==void 0){let o=s.val;typeof o=="string"&&(e[n]=o)}}return e}i(BG,"mergeEntityMaps");var im="external",xR="base",RG="all";function zot(t){return!t||t===im?new Set([im]):t===RG?new Set([RG]):t===xR?new Set([xR]):Array.isArray(t)?new Set(t):new Set([im])}i(zot,"parseLimitTiers");var xs=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Vot=new Set([9,10,13]);function Wot(t){if(!t)return{xmlVersion:1,onLevel:xs.allow,nullLevel:xs.remove};let e=t.xmlVersion===1.1?1.1:1,r=xs[t.onNCR]??xs.allow,n=xs[t.nullNCR]??xs.remove,s=Math.max(n,xs.remove);return{xmlVersion:e,onLevel:r,nullLevel:s}}i(Wot,"parseNCRConfig");var sh=class{static{i(this,"EntityDecoder")}constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck=="function"?e.postCheck:n=>n,this._limitTiers=zot(this._limit.applyLimitsTo??im),this._numericAllowed=e.numericAllowed??!0,this._baseMap=BG(OC,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let r=Wot(e.ncr);this._ncrXmlVersion=r.xmlVersion,this._ncrOnLevel=r.onLevel,this._ncrNullLevel=r.nullLevel}setExternalEntities(e){if(e)for(let r of Object.keys(e))hpe(r);this._externalMap=BG(e)}addExternalEntity(e,r){hpe(e),typeof r=="string"&&r.indexOf("&")===-1&&(this._externalMap[e]=r)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=BG(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!="string"||e.length===0)return e;let r=e,n=[],s=e.length,o=0,a=0,c=this._maxTotalExpansions>0,l=this._maxExpandedLength>0,u=c||l;for(;a=s||e.charCodeAt(p)!==59){a++;continue}let m=e.slice(a+1,p);if(m.length===0){a++;continue}let f,A;if(this._removeSet.has(m))f="",A===void 0&&(A=im);else if(this._leaveSet.has(m)){a++;continue}else if(m.charCodeAt(0)===35){let h=this._resolveNCR(m);if(h===void 0){a++;continue}f=h,A=xR}else{let h=this._resolveName(m);f=h?.value,A=h?.tier}if(f===void 0){a++;continue}if(a>o&&n.push(e.slice(o,a)),n.push(f),o=p+1,a=o,u&&this._tierCounts(A)){if(c&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(l){let h=f.length-(m.length+2);if(h>0&&(this._expandedLength+=h,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}o=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!Vot.has(e)?xs.remove:-1}_applyNCRAction(e,r,n){switch(e){case xs.allow:return String.fromCodePoint(n);case xs.remove:return"";case xs.leave:return;case xs.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${r}; (U+${n.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let r=e.charCodeAt(1),n;if(r===120||r===88?n=parseInt(e.slice(2),16):n=parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let s=this._classifyNCR(n);if(!this._numericAllowed&&skC.includes(t)?"__"+t:t,"defaultOnDangerousProperty"),Yot={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:i(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:i(function(t,e){return e},"attributeValueProcessor"),stopNodes:[],alwaysCreateTextNode:!1,isArray:i(()=>!1,"isArray"),commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:i(function(t,e,r){return t},"updateTag"),captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:gpe};function Jot(t,e){if(typeof t!="string")return;let r=t.toLowerCase();if(kC.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(IR.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}i(Jot,"validatePropertyName");function ype(t,e){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??1e3),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null,appliesTo:t.appliesTo??"all"}:ype(!0)}i(ype,"normalizeProcessEntities");var Epe=i(function(t){let e=Object.assign({},Yot,t),r=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(let{value:n,name:s}of r)n&&Jot(n,s);return e.onDangerousProperty===null&&(e.onDangerousProperty=gpe),e.processEntities=ype(e.processEntities,e.htmlEntities),e.unpairedTagsSet=new Set(e.unpairedTags),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(n=>typeof n=="string"&&n.startsWith("*.")?".."+n.substring(2):n)),e},"buildOptions");var bR;typeof Symbol!="function"?bR="@@xmlMetadata":bR=Symbol("XML Node Metadata");var bs=class{static{i(this,"XmlNode")}constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][bR]={startIndex:r})}static getMetaDataSymbol(){return bR}};var Cpe=":A-Za-z_\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",jot=Cpe+"\\-\\.\\d\xB7\u0300-\u036F\u203F-\u2040",Ipe=":A-Za-z_\xC0-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",Kot=Ipe+"\\-\\.\\d\xB7\u0300-\u036F\u0487\u203F-\u2040",wpe=i((t,e,r="")=>{let n=t.replace(":",""),s=e.replace(":",""),o=`[${n}][${s}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,r),ncName:new RegExp(`^${o}$`,r),qName:new RegExp(`^${o}(?::${o})?$`,r),nmToken:new RegExp(`^[${e}]+$`,r),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,r)}},"buildRegexes"),Xot=wpe(Cpe,jot),Zot=wpe(Ipe,Kot,"u"),eit=i((t="1.0")=>t==="1.1"?Zot:Xot,"getRegexes");var am=i((t,{xmlVersion:e="1.0"}={})=>eit(e).qName.test(t),"qName");var FC=class{static{i(this,"DocTypeReader")}constructor(e,r){this.suppressValidationErr=!e,this.options=e,this.xmlVersion=r||1}setXmlVersion(e=1){this.xmlVersion=e}readDocType(e,r){let n=Object.create(null),s=0;if(e[r+3]==="O"&&e[r+4]==="C"&&e[r+5]==="T"&&e[r+6]==="Y"&&e[r+7]==="P"&&e[r+8]==="E"){r=r+9;let o=1,a=!1,c=!1,l="";for(;r=this.options.maxEntityCount)throw new Error(`Entity count (${s+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[u]=d,s++}}else if(a&&cm(e,"!ELEMENT",r)){r+=8;let{index:u}=this.readElementExp(e,r+1);r=u}else if(a&&cm(e,"!ATTLIST",r))r+=8;else if(a&&cm(e,"!NOTATION",r)){r+=9;let{index:u}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=u}else if(cm(e,"!--",r))c=!0;else throw new Error("Invalid DOCTYPE");o++,l=""}else if(e[r]===">"){if(c?e[r-1]==="-"&&e[r-2]==="-"&&(c=!1,o--):o--,o===0)break}else e[r]==="["?a=!0:l+=e[r];if(o!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:r}}readEntityExp(e,r){r=Bs(e,r);let n=r;for(;rthis.options.maxEntitySize)throw new Error(`Entity "${s}" size (${o.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return r--,[s,o,r]}readNotationExp(e,r){r=Bs(e,r);let n=r;for(;r{for(;e1||o.length===1&&!c))return t;{let l=Number(r),u=String(l);if(l===0)return l;if(u.search(/[eE]/)!==-1)return e.eNotation?l:t;if(r.indexOf(".")!==-1)return u==="0"||u===a||u===`${s}${a}`?l:t;let d=o?a:r;return o?d===u||s+d===u?l:t:d===u||d===s+u?l:t}}else return t}}else return lit(t,Number(r),e)}i(TG,"toNumber");var iit=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function ait(t,e,r){if(!r.eNotation)return t;let n=e.match(iit);if(n){let s=n[1]||"",o=n[3].indexOf("e")===-1?"E":"e",a=n[2],c=s?t[a.length+1]===o:t[a.length]===o;return a.length>1&&c?t:a.length===1&&(n[3].startsWith(`.${o}`)||n[3][0]===o)?Number(e):a.length>0?r.leadingZeros&&!c?(e=(n[1]||"")+n[3],Number(e)):t:Number(e)}else return t}i(ait,"resolveEnotation");function cit(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substring(0,t.length-1))),t}i(cit,"trimZeros");function NG(t,e){let r=t.trim();if((e===2||e===8)&&(t=r.substring(2)),parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}i(NG,"parse_int");function lit(t,e,r){let n=e===1/0;switch(r.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return t}}i(lit,"handleInfinity");function vG(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}i(vG,"getIgnoreAttributesFn");var mo=class{static{i(this,"Expression")}constructor(e,r={},n){this.pattern=e,this.separator=r.separator||".",this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(s=>s.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(s=>s.attrName!==void 0),this._hasPositionSelector=this.segments.some(s=>s.position!==void 0)}_parse(e){let r=[],n=0,s="";for(;n0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let r=this._matcher.path;if(r.length!==0)return r[r.length-1].values?.[e]}hasAttr(e){let r=this._matcher.path;if(r.length===0)return!1;let n=r[r.length-1];return n.values!==void 0&&e in n.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,r=!0){return this._matcher.toString(e,r)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},Wa=class{static{i(this,"Matcher")}constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new PG(this)}push(e,r=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let s=this.path.length;this.siblingStacks[s]||(this.siblingStacks[s]=new Map);let o=this.siblingStacks[s],a=n?`${n}:${e}`:e,c=o.get(a)||0,l=0;for(let d of o.values())l+=d;o.set(a,c+1);let u={tag:e,position:l,counter:c};n!=null&&(u.namespace=n),r!=null&&(u.values=r),this.path.push(u)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let r=this.path[this.path.length-1];e!=null&&(r.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let r=this.path[this.path.length-1];return r.values!==void 0&&e in r.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,r=!0){let n=e||this.separator;if(n===this.separator&&r===!0){if(this._pathStringCache!==null)return this._pathStringCache;let o=this.path.map(a=>a.namespace?`${a.namespace}:${a.tag}`:a.tag).join(n);return this._pathStringCache=o,o}return this.path.map(o=>r&&o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let r=e.segments;return r.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(r):this._matchSimple(r)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let r=0;r=0&&r>=0;){let s=e[n];if(s.type==="deep-wildcard"){if(n--,n<0)return!0;let o=e[n],a=!1;for(let c=r;c>=0;c--)if(this._matchSegment(o,this.path[c],c===this.path.length-1)){r=c-1,n--,a=!0;break}if(!a)return!1}else{if(!this._matchSegment(s,this.path[r],r===this.path.length-1))return!1;r--,n--}}return n<0}_matchSegment(e,r,n){if(e.tag!=="*"&&e.tag!==r.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==r.namespace||e.attrName!==void 0&&(!n||!r.values||!(e.attrName in r.values)||e.attrValue!==void 0&&String(r.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let s=r.counter??0;if(e.position==="first"&&s!==0)return!1;if(e.position==="odd"&&s%2!==1)return!1;if(e.position==="even"&&s%2!==0)return!1;if(e.position==="nth"&&s!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(r=>({...r})),this.siblingStacks=e.siblingStacks.map(r=>new Map(r))}readOnly(){return this._view}};function uit(t,e){if(!t)return{};let r=e.attributesGroupName?t[e.attributesGroupName]:t;if(!r)return{};let n={};for(let s in r)if(s.startsWith(e.attributeNamePrefix)){let o=s.substring(e.attributeNamePrefix.length);n[o]=r[s]}else n[s]=r[s];return n}i(uit,"extractRawAttributes");function dit(t){if(!t||typeof t!="string")return;let e=t.indexOf(":");if(e!==-1&&e>0){let r=t.substring(0,e);if(r!=="xmlns")return r}}i(dit,"extractNamespace");var UC=class{static{i(this,"OrderedObjParser")}constructor(e,r){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=hit,this.parseTextData=pit,this.resolveNameSpace=mit,this.buildAttributesMap=Ait,this.isItStopNode=Cit,this.replaceEntitiesValue=yit,this.readStopNodeData=Sit,this.saveTextToParentTag=Eit,this.addChild=git,this.ignoreAttributesFn=vG(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0;let n={...OC};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?n=this.options.htmlEntities:this.options.htmlEntities===!0&&(n={...bG,...SR}),this.entityDecoder=new sh({namedEntities:{...n,...r},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new Wa,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new oh;let s=this.options.stopNodes;if(s&&s.length>0){for(let o=0;o0)){a||(t=this.replaceEntitiesValue(t,e,r));let l=c.jPath?r.toString():r,u=c.tagValueProcessor(e,t,l,s,o);return u==null?t:typeof u!=typeof t||u!==t?u:c.trimValues||t.trim()===t?DG(t,c.parseTagValue,c.numberParseOptions):t}}i(pit,"parseTextData");function mit(t){if(this.options.removeNSPrefix){let e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}i(mit,"resolveNameSpace");var fit=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Ait(t,e,r,n=!1){let s=this.options;if(n===!0||s.ignoreAttributes!==!0&&typeof t=="string"){let o=CR(t,fit),a=o.length,c={},l=new Array(a),u=!1,d={};for(let f=0;f",c,"Closing Tag is not closed."),p=t.substring(c+2,d).trim();if(s.removeNSPrefix){let f=p.indexOf(":");f!==-1&&(p=p.substr(f+1))}p=QG(s.transformTagName,p,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let m=this.matcher.getCurrentTag();if(p&&s.unpairedTagsSet.has(p))throw new Error(`Unpaired tag can not be used as closing tag: `);m&&s.unpairedTagsSet.has(m)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=d}else if(u===63){let d=_G(t,c,!1,"?>");if(!d)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let p=this.buildAttributesMap(d.tagExp,this.matcher,d.tagName,!0);if(p){let m=p[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(m)||1),o.setXmlVersion(Number(m)||1)}if(!(s.ignoreDeclaration&&d.tagName==="?xml"||s.ignorePiTags)){let m=new bs(d.tagName);m.add(s.textNodeName,""),d.tagName!==d.tagExp&&d.attrExpPresent&&s.ignoreAttributes!==!0&&(m[":@"]=p),this.addChild(r,m,this.readonlyMatcher,c)}c=d.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let d=ih(t,"-->",c+4,"Comment is not closed.");if(s.commentPropName){let p=t.substring(c+4,d-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:p}])}c=d}else if(u===33&&t.charCodeAt(c+2)===68){let d=o.readDocType(t,c);this.entityDecoder.addInputEntities(d.entities),c=d.i}else if(u===33&&t.charCodeAt(c+2)===91){let d=ih(t,"]]>",c,"CDATA is not closed.")-2,p=t.substring(c+9,d);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let m=this.parseTextData(p,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);m==null&&(m=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:p}]):r.add(s.textNodeName,m),c=d+2}else{let d=_G(t,c,s.removeNSPrefix);if(!d){let P=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${P}"`)}let p=d.tagName,m=d.rawTagName,f=d.tagExp,A=d.attrExpPresent,h=d.closeIndex;if({tagName:p,tagExp:f}=QG(s.transformTagName,p,f,s),s.strictReservedNames&&(p===s.commentPropName||p===s.cdataPropName||p===s.textNodeName||p===s.attributesGroupName))throw new Error(`Invalid tag name: ${p}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let E=r;E&&s.unpairedTagsSet.has(E.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let C=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(C=!0,p[p.length-1]==="/"?(p=p.substr(0,p.length-1),f=p):f=f.substr(0,f.length-1),A=p!==f);let w=null,x={},b;b=dit(m),p!==e.tagname&&this.matcher.push(p,{},b),p!==f&&A&&(w=this.buildAttributesMap(f,this.matcher,p),w&&(x=uit(w,s))),p!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let P="";if(C)c=d.closeIndex;else if(s.unpairedTagsSet.has(p))c=d.closeIndex;else{let re=this.readStopNodeData(t,m,h+1);if(!re)throw new Error(`Unexpected end of ${m}`);c=re.i,P=re.tagContent}let _=new bs(p);w&&(_[":@"]=w),_.add(s.textNodeName,P),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,_,this.readonlyMatcher,N)}else{if(C){({tagName:p,tagExp:f}=QG(s.transformTagName,p,f,s));let P=new bs(p);w&&(P[":@"]=w),this.addChild(r,P,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(p)){let P=new bs(p);w&&(P[":@"]=w),this.addChild(r,P,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=d.closeIndex;continue}else{let P=new bs(p);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),w&&(P[":@"]=w),this.addChild(r,P,this.readonlyMatcher,N),r=P}n="",c=h}}}else n+=t[c];return e.child},"parseXml");function git(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.jPath?r.toString():r,o=this.options.updateTag(e.tagname,s,e[":@"]);o===!1||(typeof o=="string"&&(e.tagname=o),t.addChild(e,n))}i(git,"addChild");function yit(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let s=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return t}if(n.tagFilter){let s=this.options.jPath?r.toString():r;if(!n.tagFilter(e,s))return t}return this.entityDecoder.decode(t)}i(yit,"replaceEntitiesValue");function Eit(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}i(Eit,"saveTextToParentTag");function Cit(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}i(Cit,"isItStopNode");function Iit(t,e,r=">"){let n=0,s=t.length,o=r.charCodeAt(0),a=r.length>1?r.charCodeAt(1):-1,c="",l=e;for(let u=e;u",r,`${e} is not closed`);if(t.substring(r+2,c).trim()===e&&(s--,s===0))return{tagContent:t.substring(n,r),i:c};r=c}else if(a===63)r=ih(t,"?>",r+1,"StopNode is not closed.");else if(a===33&&t.charCodeAt(r+2)===45&&t.charCodeAt(r+3)===45)r=ih(t,"-->",r+3,"StopNode is not closed.");else if(a===33&&t.charCodeAt(r+2)===91)r=ih(t,"]]>",r,"StopNode is not closed.")-2;else{let c=_G(t,r,!1);c&&((c&&c.tagName)===e&&c.tagExp[c.tagExp.length-1]!=="/"&&s++,r=c.closeIndex)}}}i(Sit,"readStopNodeData");function DG(t,e,r){if(e&&typeof t=="string"){let n=t.trim();return n==="true"?!0:n==="false"?!1:TG(t,r)}else return Zde(t)?t:""}i(DG,"parseValue");function QG(t,e,r,n){if(t){let s=t(e);r===e&&(r=s),e=s}return e=Spe(e,n),{tagName:e,tagExp:r}}i(QG,"transformTagName");function Spe(t,e){if(IR.includes(t))throw new Error(`[SECURITY] Invalid name: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);return kC.includes(t)?e.onDangerousProperty(t):t}i(Spe,"sanitizeName");var kG=bs.getMetaDataSymbol();function xit(t,e){if(!t||typeof t!="object")return{};if(!e)return t;let r={};for(let n in t)if(n.startsWith(e)){let s=n.substring(e.length);r[s]=t[n]}else r[n]=t[n];return r}i(xit,"stripAttributePrefix");function LG(t,e,r,n){return xpe(t,e,r,n)}i(LG,"prettify");function xpe(t,e,r,n){let s,o={};for(let a=0;a0&&(o[e.textNodeName]=s):s!==void 0&&(o[e.textNodeName]=s),o}i(xpe,"compress");function bit(t){let e=Object.keys(t);for(let r=0;r/g,"]]]]>")}i(RR,"safeCdata");function Zu(t){return String(t).replace(/"/g,""").replace(/'/g,"'")}i(Zu,"escapeAttribute");var Nit=` @@ -183,8 +183,8 @@ ${p}:${decodeURIComponent(u[p])}`}return c}return i(s,"getCanonicalizedResourceS `),a=e.computeHMACSHA256(o);return{sasQueryParameters:new Gi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:o}}i(ilt,"generateBlobSASQueryParametersUDK20250705");function ym(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}i(ym,"getCanonicalName");function Em(t){let e=t.version?t.version:qR;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}i(Em,"SASSignatureValuesSanityCheckAndAutofill");var oI=class{static{i(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=eh()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Oi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Oi||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Z.withSpan("BlobLeaseClient-acquireLease",r,async n=>ue(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Oi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Oi||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Z.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=ue(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Oi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Oi||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Z.withSpan("BlobLeaseClient-releaseLease",e,async r=>ue(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Oi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Oi||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Z.withSpan("BlobLeaseClient-renewLease",e,async r=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions}))}async breakLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Oi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Oi||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Z.withSpan("BlobLeaseClient-breakLease",r,async n=>{let s={abortSignal:r.abortSignal,breakPeriod:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions};return ue(await this._containerOrBlobOperation.breakLease(s))})}};var Zme=require("node:stream");var RN=class extends Zme.Readable{static{i(this,"RetriableReadableStream")}start;offset;end;getter;source;retries=0;maxRetryRequests;onProgress;options;constructor(e,r,n,s,o={}){super({highWaterMark:o.highWaterMark}),this.getter=r,this.source=e,this.start=n,this.offset=n,this.end=n+s-1,this.maxRetryRequests=o.maxRetryRequests&&o.maxRetryRequests>=0?o.maxRetryRequests:0,this.onProgress=o.onProgress,this.options=o,this.setSourceEventHandlers()}_read(){this.source.resume()}setSourceEventHandlers(){this.source.on("data",this.sourceDataHandler),this.source.on("end",this.sourceErrorOrEndHandler),this.source.on("error",this.sourceErrorOrEndHandler),this.source.on("aborted",this.sourceAbortedHandler)}removeSourceEventHandlers(){this.source.removeListener("data",this.sourceDataHandler),this.source.removeListener("end",this.sourceErrorOrEndHandler),this.source.removeListener("error",this.sourceErrorOrEndHandler),this.source.removeListener("aborted",this.sourceAbortedHandler)}sourceDataHandler=i(e=>{if(this.options.doInjectErrorOnce){this.options.doInjectErrorOnce=void 0,this.source.pause(),this.sourceErrorOrEndHandler(),this.source.destroy();return}this.offset+=e.length,this.onProgress&&this.onProgress({loadedBytes:this.offset-this.start}),this.push(e)||this.source.pause()},"sourceDataHandler");sourceAbortedHandler=i(()=>{let e=new lo("The operation was aborted.");this.destroy(e)},"sourceAbortedHandler");sourceErrorOrEndHandler=i(e=>{if(e&&e.name==="AbortError"){this.destroy(e);return}this.removeSourceEventHandlers(),this.offset-1===this.end?this.push(null):this.offset<=this.end?this.retries{this.source=r,this.setSourceEventHandlers()}).catch(r=>{this.destroy(r)})):this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset-1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)):this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset-1}`))},"sourceErrorOrEndHandler");_destroy(e,r){this.removeSourceEventHandlers(),this.source.destroy(),r(e===null?void 0:e)}};var NN=class{static{i(this,"BlobDownloadResponse")}get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){return this.originalResponse.copyCompletedOn}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get tagCount(){return this.originalResponse.tagCount}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get lastAccessed(){return this.originalResponse.lastAccessed}get createdOn(){return this.originalResponse.createdOn}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get versionId(){return this.originalResponse.versionId}get isCurrentVersion(){return this.originalResponse.isCurrentVersion}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get objectReplicationDestinationPolicyId(){return this.originalResponse.objectReplicationDestinationPolicyId}get objectReplicationSourceProperties(){return this.originalResponse.objectReplicationSourceProperties}get isSealed(){return this.originalResponse.isSealed}get immutabilityPolicyExpiresOn(){return this.originalResponse.immutabilityPolicyExpiresOn}get immutabilityPolicyMode(){return this.originalResponse.immutabilityPolicyMode}get legalHold(){return this.originalResponse.legalHold}get contentAsBlob(){return this.originalResponse.blobBody}get readableStreamBody(){return it?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}originalResponse;blobDownloadStream;constructor(e,r,n,s,o={}){this.originalResponse=e,this.blobDownloadStream=new RN(this.originalResponse.readableStreamBody,r,n,s,o)}};var ofe=require("node:stream");var o3=new Uint8Array([79,98,106,1]),efe="avro.codec",tfe="avro.schema";var Yt=class t{static{i(this,"AvroParser")}static async readFixedBytes(e,r,n={}){let s=await e.read(r,{abortSignal:n.abortSignal});if(s.length!==r)throw new Error("Hit stream end.");return s}static async readByte(e,r={}){return(await t.readFixedBytes(e,1,r))[0]}static async readZigZagLong(e,r={}){let n=0,s=0,o,a,c;do o=await t.readByte(e,r),a=o&128,n|=(o&127)<Number.MAX_SAFE_INTEGER)throw new Error("Integer overflow.");return l}return n>>1^-(n&1)}static async readLong(e,r={}){return t.readZigZagLong(e,r)}static async readInt(e,r={}){return t.readZigZagLong(e,r)}static async readNull(){return null}static async readBoolean(e,r={}){let n=await t.readByte(e,r);if(n===1)return!0;if(n===0)return!1;throw new Error("Byte was not a boolean.")}static async readFloat(e,r={}){let n=await t.readFixedBytes(e,4,r);return new DataView(n.buffer,n.byteOffset,n.byteLength).getFloat32(0,!0)}static async readDouble(e,r={}){let n=await t.readFixedBytes(e,8,r);return new DataView(n.buffer,n.byteOffset,n.byteLength).getFloat64(0,!0)}static async readBytes(e,r={}){let n=await t.readLong(e,r);if(n<0)throw new Error("Bytes size was negative.");return e.read(n,{abortSignal:r.abortSignal})}static async readString(e,r={}){let n=await t.readBytes(e,r);return new TextDecoder().decode(n)}static async readMapPair(e,r,n={}){let s=await t.readString(e,n),o=await r(e,n);return{key:s,value:o}}static async readMap(e,r,n={}){let s=i((c,l={})=>t.readMapPair(c,r,l),"readPairMethod"),o=await t.readArray(e,s,n),a={};for(let c of o)a[c.key]=c.value;return a}static async readArray(e,r,n={}){let s=[];for(let o=await t.readLong(e,n);o!==0;o=await t.readLong(e,n))for(o<0&&(await t.readLong(e,n),o=-o);o--;){let a=await r(e,n);s.push(a)}return s}},Cm;(function(t){t.RECORD="record",t.ENUM="enum",t.ARRAY="array",t.MAP="map",t.UNION="union",t.FIXED="fixed"})(Cm||(Cm={}));var Kr;(function(t){t.NULL="null",t.BOOLEAN="boolean",t.INT="int",t.LONG="long",t.FLOAT="float",t.DOUBLE="double",t.BYTES="bytes",t.STRING="string"})(Kr||(Kr={}));var ql=class t{static{i(this,"AvroType")}static fromSchema(e){return typeof e=="string"?t.fromStringSchema(e):Array.isArray(e)?t.fromArraySchema(e):t.fromObjectSchema(e)}static fromStringSchema(e){switch(e){case Kr.NULL:case Kr.BOOLEAN:case Kr.INT:case Kr.LONG:case Kr.FLOAT:case Kr.DOUBLE:case Kr.BYTES:case Kr.STRING:return new i3(e);default:throw new Error(`Unexpected Avro type ${e}`)}}static fromArraySchema(e){return new c3(e.map(t.fromSchema))}static fromObjectSchema(e){let r=e.type;try{return t.fromStringSchema(r)}catch{}switch(r){case Cm.RECORD:if(e.aliases)throw new Error(`aliases currently is not supported, schema: ${e}`);if(!e.name)throw new Error(`Required attribute 'name' doesn't exist on schema: ${e}`);let n={};if(!e.fields)throw new Error(`Required attribute 'fields' doesn't exist on schema: ${e}`);for(let s of e.fields)n[s.name]=t.fromSchema(s.type);return new u3(n,e.name);case Cm.ENUM:if(e.aliases)throw new Error(`aliases currently is not supported, schema: ${e}`);if(!e.symbols)throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${e}`);return new a3(e.symbols);case Cm.MAP:if(!e.values)throw new Error(`Required attribute 'values' doesn't exist on schema: ${e}`);return new l3(t.fromSchema(e.values));case Cm.ARRAY:case Cm.FIXED:default:throw new Error(`Unexpected Avro type ${r} in ${e}`)}}},i3=class extends ql{static{i(this,"AvroPrimitiveType")}_primitive;constructor(e){super(),this._primitive=e}read(e,r={}){switch(this._primitive){case Kr.NULL:return Yt.readNull();case Kr.BOOLEAN:return Yt.readBoolean(e,r);case Kr.INT:return Yt.readInt(e,r);case Kr.LONG:return Yt.readLong(e,r);case Kr.FLOAT:return Yt.readFloat(e,r);case Kr.DOUBLE:return Yt.readDouble(e,r);case Kr.BYTES:return Yt.readBytes(e,r);case Kr.STRING:return Yt.readString(e,r);default:throw new Error("Unknown Avro Primitive")}}},a3=class extends ql{static{i(this,"AvroEnumType")}_symbols;constructor(e){super(),this._symbols=e}async read(e,r={}){let n=await Yt.readInt(e,r);return this._symbols[n]}},c3=class extends ql{static{i(this,"AvroUnionType")}_types;constructor(e){super(),this._types=e}async read(e,r={}){let n=await Yt.readInt(e,r);return this._types[n].read(e,r)}},l3=class extends ql{static{i(this,"AvroMapType")}_itemType;constructor(e){super(),this._itemType=e}read(e,r={}){let n=i((s,o)=>this._itemType.read(s,o),"readItemMethod");return Yt.readMap(e,n,r)}},u3=class extends ql{static{i(this,"AvroRecordType")}_name;_fields;constructor(e,r){super(),this._fields=e,this._name=r}async read(e,r={}){let n={};n.$schema=this._name;for(let s in this._fields)Object.prototype.hasOwnProperty.call(this._fields,s)&&(n[s]=await this._fields[s].read(e,r));return n}};function d3(t,e){if(t===e)return!0;if(t==null||e==null||t.length!==e.length)return!1;for(let r=0;r0)for(let o=0;o0}async*parseObjects(e={}){for(this._initialized||await this.initialize(e);this.hasNext();){let r=await this._itemType.read(this._dataStream,{abortSignal:e.abortSignal});if(this._itemsRemainingInBlock--,this._objectIndex++,this._itemsRemainingInBlock===0){let n=await Yt.readFixedBytes(this._dataStream,16,{abortSignal:e.abortSignal});if(this._blockOffset=this._initialBlockOffset+this._dataStream.position,this._objectIndex=0,!d3(this._syncMarker,n))throw new Error("Stream is not a valid Avro file.");try{this._itemsRemainingInBlock=await Yt.readLong(this._dataStream,{abortSignal:e.abortSignal})}catch{this._itemsRemainingInBlock=0}this._itemsRemainingInBlock>0&&await Yt.readLong(this._dataStream,{abortSignal:e.abortSignal})}yield r}}};var aI=class{static{i(this,"AvroReadable")}};var sfe=require("buffer");var nfe=new lo("Reading from the avro stream was aborted."),cI=class extends aI{static{i(this,"AvroReadableFromStream")}_position;_readable;toUint8Array(e){return typeof e=="string"?sfe.Buffer.from(e):e}constructor(e){super(),this._readable=e,this._position=0}get position(){return this._position}async read(e,r={}){if(r.abortSignal?.aborted)throw nfe;if(e<0)throw new Error(`size parameter should be positive: ${e}`);if(e===0)return new Uint8Array;if(!this._readable.readable)throw new Error("Stream no longer readable.");let n=this._readable.read(e);return n?(this._position+=n.length,this.toUint8Array(n)):new Promise((s,o)=>{let a=i(()=>{this._readable.removeListener("readable",c),this._readable.removeListener("error",l),this._readable.removeListener("end",l),this._readable.removeListener("close",l),r.abortSignal&&r.abortSignal.removeEventListener("abort",u)},"cleanUp"),c=i(()=>{let d=this._readable.read(e);d&&(this._position+=d.length,a(),s(this.toUint8Array(d)))},"readableCallback"),l=i(()=>{a(),o()},"rejectCallback"),u=i(()=>{a(),o(nfe)},"abortHandler");this._readable.on("readable",c),this._readable.once("error",l),this._readable.once("end",l),this._readable.once("close",l),r.abortSignal&&r.abortSignal.addEventListener("abort",u)})}};var TN=class extends ofe.Readable{static{i(this,"BlobQuickQueryStream")}source;avroReader;avroIter;avroPaused=!0;onProgress;onError;constructor(e,r={}){super(),this.source=e,this.onProgress=r.onProgress,this.onError=r.onError,this.avroReader=new iI(new cI(this.source)),this.avroIter=this.avroReader.parseObjects({abortSignal:r.abortSignal})}_read(){this.avroPaused&&this.readInternal().catch(e=>{this.emit("error",e)})}async readInternal(){this.avroPaused=!1;let e;do{if(e=await this.avroIter.next(),e.done)break;let r=e.value,n=r.$schema;if(typeof n!="string")throw Error("Missing schema in avro record.");switch(n){case"com.microsoft.azure.storage.queryBlobContents.resultData":{let s=r.data;if(!(s instanceof Uint8Array))throw Error("Invalid data in avro result record.");this.push(Buffer.from(s))||(this.avroPaused=!0)}break;case"com.microsoft.azure.storage.queryBlobContents.progress":{let s=r.bytesScanned;if(typeof s!="number")throw Error("Invalid bytesScanned in avro progress record.");this.onProgress&&this.onProgress({loadedBytes:s})}break;case"com.microsoft.azure.storage.queryBlobContents.end":if(this.onProgress){let s=r.totalBytes;if(typeof s!="number")throw Error("Invalid totalBytes in avro end record.");this.onProgress({loadedBytes:s})}this.push(null);break;case"com.microsoft.azure.storage.queryBlobContents.error":if(this.onError){let s=r.fatal;if(typeof s!="boolean")throw Error("Invalid fatal in avro error record.");let o=r.name;if(typeof o!="string")throw Error("Invalid name in avro error record.");let a=r.description;if(typeof a!="string")throw Error("Invalid description in avro error record.");let c=r.position;if(typeof c!="number")throw Error("Invalid position in avro error record.");this.onError({position:c,name:o,isFatal:s,description:a})}break;default:throw Error(`Unknown schema ${n} in avro progress record.`)}}while(!e.done&&!this.avroPaused)}};var vN=class{static{i(this,"BlobQueryResponse")}get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){}get readableStreamBody(){return it?this.blobDownloadStream:void 0}get _response(){return this.originalResponse._response}originalResponse;blobDownloadStream;constructor(e,r={}){this.originalResponse=e,this.blobDownloadStream=new TN(this.originalResponse.readableStreamBody,r)}};var p3;(function(t){t.Hot="Hot",t.Cool="Cool",t.Cold="Cold",t.Archive="Archive"})(p3||(p3={}));var m3;(function(t){t.P4="P4",t.P6="P6",t.P10="P10",t.P15="P15",t.P20="P20",t.P30="P30",t.P40="P40",t.P50="P50",t.P60="P60",t.P70="P70",t.P80="P80"})(m3||(m3={}));function od(t){if(t!==void 0)return t}i(od,"toAccessTier");function Mr(t,e){if(t&&!e)throw new RangeError("Customer-provided encryption key must be used over HTTPS.");t&&!t.encryptionAlgorithm&&(t.encryptionAlgorithm=Hpe)}i(Mr,"ensureCpkIfSpecified");var f3;(function(t){t.StorageOAuthScopes="https://storage.azure.com/.default",t.DiskComputeOAuthScopes="https://disk.compute.azure.com/.default"})(f3||(f3={}));function PN(t){let e=(t._response.parsedBody.pageRange||[]).map(n=>({offset:n.start,count:n.end-n.start})),r=(t._response.parsedBody.clearRange||[]).map(n=>({offset:n.start,count:n.end-n.start}));return{...t,pageRange:e,clearRange:r,_response:{...t._response,parsedBody:{pageRange:e,clearRange:r}}}}i(PN,"rangeResponseFromModel");var $fe=R(Hfe(),1);var qN=class extends $fe.Poller{static{i(this,"BlobBeginCopyFromUrlPoller")}intervalInMs;constructor(e){let{blobClient:r,copySource:n,intervalInMs:s=15e3,onProgress:o,resumeFrom:a,startCopyFromURLOptions:c}=e,l;a&&(l=JSON.parse(a).state);let u=pI({...l,blobClient:r,copySource:n,startCopyFromURLOptions:c});super(u),typeof o=="function"&&this.onProgress(o),this.intervalInMs=s}delay(){return xC(this.intervalInMs)}},$lt=i(async function(e={}){let r=this.state,{copyId:n}=r;return r.isCompleted?pI(r):n?(await r.blobClient.abortCopyFromURL(n,{abortSignal:e.abortSignal}),r.isCancelled=!0,pI(r)):(r.isCancelled=!0,pI(r))},"cancel"),zlt=i(async function(e={}){let r=this.state,{blobClient:n,copySource:s,startCopyFromURLOptions:o}=r;if(r.isStarted){if(!r.isCompleted)try{let a=await r.blobClient.getProperties({abortSignal:e.abortSignal}),{copyStatus:c,copyProgress:l}=a,u=r.copyProgress;l&&(r.copyProgress=l),c==="pending"&&l!==u&&typeof e.fireProgress=="function"?e.fireProgress(r):c==="success"?(r.result=a,r.isCompleted=!0):c==="failed"&&(r.error=new Error(`Blob copy failed with reason: "${a.copyStatusDescription||"unknown"}"`),r.isCompleted=!0)}catch(a){r.error=a,r.isCompleted=!0}}else{r.isStarted=!0;let a=await n.startCopyFromURL(s,o);r.copyId=a.copyId,a.copyStatus==="success"&&(r.result=a,r.isCompleted=!0)}return pI(r)},"update"),Vlt=i(function(){return JSON.stringify({state:this.state},(e,r)=>{if(e!=="blobClient")return r})},"toString");function pI(t){return{state:{...t},cancel:$lt,toString:Vlt,update:zlt}}i(pI,"makeBlobBeginCopyFromURLPollOperation");function Ns(t){if(t.offset<0)throw new RangeError("Range.offset cannot be smaller than 0.");if(t.count&&t.count<=0)throw new RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.");return t.count?`bytes=${t.offset}-${t.offset+t.count-1}`:`bytes=${t.offset}-`}i(Ns,"rangeToString");var zfe=require("events");var mI;(function(t){t[t.Good=0]="Good",t[t.Error=1]="Error"})(mI||(mI={}));var fI=class{static{i(this,"Batch")}concurrency;actives=0;completed=0;offset=0;operations=[];state=mI.Good;emitter;constructor(e=5){if(e<1)throw new RangeError("concurrency must be larger than 0");this.concurrency=e,this.emitter=new zfe.EventEmitter}addOperation(e){this.operations.push(async()=>{try{this.actives++,await e(),this.actives--,this.completed++,this.parallelExecute()}catch(r){this.emitter.emit("error",r)}})}async do(){return this.operations.length===0?Promise.resolve():(this.parallelExecute(),new Promise((e,r)=>{this.emitter.on("finish",e),this.emitter.on("error",n=>{this.state=mI.Error,r(n)})}))}nextOperation(){return this.offset=this.operations.length){this.emitter.emit("finish");return}for(;this.actives{let u=setTimeout(()=>l(new Error("The operation cannot be completed in timeout.")),1e5);t.on("readable",()=>{if(o>=a){clearTimeout(u),c();return}let d=t.read();if(!d)return;typeof d=="string"&&(d=Buffer.from(d,s));let p=o+d.length>a?a-o:d.length;e.fill(d.slice(0,p),r+o,r+o+p),o+=p}),t.on("end",()=>{clearTimeout(u),o{clearTimeout(u),l(d)})})}i(Wfe,"streamToBuffer");async function Yfe(t,e){return new Promise((r,n)=>{let s=GN.default.createWriteStream(e);t.on("error",o=>{n(o)}),s.on("error",o=>{n(o)}),s.on("close",r),t.pipe(s)})}i(Yfe,"readStreamToLocalFile");var Jfe=Vfe.default.promisify(GN.default.stat),jfe=GN.default.createReadStream;var Gl=class t extends hh{static{i(this,"BlobClient")}blobContext;_name;_containerName;_versionId;_snapshot;get name(){return this._name}get containerName(){return this._containerName}constructor(e,r,n,s){s=s||{};let o,a;if(kl(r))a=e,o=r;else if(it&&r instanceof rr||r instanceof Ft||uo(r))a=e,s=n,o=yr(r,s);else if(!r&&typeof r!="string")a=e,n&&typeof n!="string"&&(s=n),o=yr(new Ft,s);else if(r&&typeof r=="string"&&n&&typeof n=="string"){let c=r,l=n,u=gm(e);if(u.kind==="AccountConnString")if(it){let d=new rr(u.accountName,u.accountKey);a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l)),s.proxyOptions||(s.proxyOptions=ju(u.proxyUri)),o=yr(d,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(u.kind==="SASConnString")a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l))+"?"+u.accountSas,o=yr(new Ft,s);else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}else throw new Error("Expecting non-empty strings for containerName and blobName parameters");super(a,o),{blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl(),this.blobContext=this.storageClientContext.blob,this._snapshot=Zz(this.url,Dl.Parameters.SNAPSHOT),this._versionId=Zz(this.url,Dl.Parameters.VERSIONID)}withSnapshot(e){return new t(fh(this.url,Dl.Parameters.SNAPSHOT,e.length===0?void 0:e),this.pipeline)}withVersion(e){return new t(fh(this.url,Dl.Parameters.VERSIONID,e.length===0?void 0:e),this.pipeline)}getAppendBlobClient(){return new $N(this.url,this.pipeline)}getBlockBlobClient(){return new Eh(this.url,this.pipeline)}getPageBlobClient(){return new zN(this.url,this.pipeline)}async download(e=0,r,n={}){return n.conditions=n.conditions||{},n.conditions=n.conditions||{},Mr(n.customerProvidedKey,this.isHttps),Z.withSpan("BlobClient-download",n,async s=>{let o=ue(await this.blobContext.download({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onDownloadProgress:it?void 0:n.onProgress},range:e===0&&!r?void 0:Ns({offset:e,count:r}),rangeGetContentMD5:n.rangeGetContentMD5,rangeGetContentCRC64:n.rangeGetContentCrc64,snapshot:n.snapshot,cpkInfo:n.customerProvidedKey,tracingOptions:s.tracingOptions})),a={...o,_response:o._response,objectReplicationDestinationPolicyId:o.objectReplicationPolicyId,objectReplicationSourceProperties:BN(o.objectReplicationRules)};if(!it)return a;if((n.maxRetryRequests===void 0||n.maxRetryRequests<0)&&(n.maxRetryRequests=5),o.contentLength===void 0)throw new RangeError("File download response doesn't contain valid content length header");if(!o.etag)throw new RangeError("File download response doesn't contain valid etag header");return new NN(a,async c=>{let l={leaseAccessConditions:n.conditions,modifiedAccessConditions:{ifMatch:n.conditions.ifMatch||o.etag,ifModifiedSince:n.conditions.ifModifiedSince,ifNoneMatch:n.conditions.ifNoneMatch,ifUnmodifiedSince:n.conditions.ifUnmodifiedSince,ifTags:n.conditions?.tagConditions},range:Ns({count:e+o.contentLength-c,offset:c}),rangeGetContentMD5:n.rangeGetContentMD5,rangeGetContentCRC64:n.rangeGetContentCrc64,snapshot:n.snapshot,cpkInfo:n.customerProvidedKey};return(await this.blobContext.download({abortSignal:n.abortSignal,...l})).readableStreamBody},e,o.contentLength,{maxRetryRequests:n.maxRetryRequests,onProgress:n.onProgress})})}async exists(e={}){return Z.withSpan("BlobClient-exists",e,async r=>{try{return Mr(e.customerProvidedKey,this.isHttps),await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:r.tracingOptions}),!0}catch(n){if(n.statusCode===404)return!1;if(n.statusCode===409&&(n.details.errorCode===Wpe||n.details.errorCode===Ype))return!0;throw n}})}async getProperties(e={}){return e.conditions=e.conditions||{},Mr(e.customerProvidedKey,this.isHttps),Z.withSpan("BlobClient-getProperties",e,async r=>{let n=ue(await this.blobContext.getProperties({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,tracingOptions:r.tracingOptions}));return{...n,_response:n._response,objectReplicationDestinationPolicyId:n.objectReplicationPolicyId,objectReplicationSourceProperties:BN(n.objectReplicationRules)}})}async delete(e={}){return e.conditions=e.conditions||{},Z.withSpan("BlobClient-delete",e,async r=>ue(await this.blobContext.delete({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async deleteIfExists(e={}){return Z.withSpan("BlobClient-deleteIfExists",e,async r=>{try{let n=ue(await this.delete(r));return{succeeded:!0,...n,_response:n._response}}catch(n){if(n.details?.errorCode==="BlobNotFound")return{succeeded:!1,...n.response?.parsedHeaders,_response:n.response};throw n}})}async undelete(e={}){return Z.withSpan("BlobClient-undelete",e,async r=>ue(await this.blobContext.undelete({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async setHTTPHeaders(e,r={}){return r.conditions=r.conditions||{},Mr(r.customerProvidedKey,this.isHttps),Z.withSpan("BlobClient-setHTTPHeaders",r,async n=>ue(await this.blobContext.setHttpHeaders({abortSignal:r.abortSignal,blobHttpHeaders:e,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions})))}async setMetadata(e,r={}){return r.conditions=r.conditions||{},Mr(r.customerProvidedKey,this.isHttps),Z.withSpan("BlobClient-setMetadata",r,async n=>ue(await this.blobContext.setMetadata({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,metadata:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:n.tracingOptions})))}async setTags(e,r={}){return Z.withSpan("BlobClient-setTags",r,async n=>ue(await this.blobContext.setTags({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},blobModifiedAccessConditions:r.conditions,tracingOptions:n.tracingOptions,tags:Kme(e)})))}async getTags(e={}){return Z.withSpan("BlobClient-getTags",e,async r=>{let n=ue(await this.blobContext.getTags({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},blobModifiedAccessConditions:e.conditions,tracingOptions:r.tracingOptions}));return{...n,_response:n._response,tags:bN({blobTagSet:n.blobTagSet})||{}}})}getBlobLeaseClient(e){return new oI(this,e)}async createSnapshot(e={}){return e.conditions=e.conditions||{},Mr(e.customerProvidedKey,this.isHttps),Z.withSpan("BlobClient-createSnapshot",e,async r=>ue(await this.blobContext.createSnapshot({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,tracingOptions:r.tracingOptions})))}async beginCopyFromURL(e,r={}){let n={abortCopyFromURL:i((...o)=>this.abortCopyFromURL(...o),"abortCopyFromURL"),getProperties:i((...o)=>this.getProperties(...o),"getProperties"),startCopyFromURL:i((...o)=>this.startCopyFromURL(...o),"startCopyFromURL")},s=new qN({blobClient:n,copySource:e,intervalInMs:r.intervalInMs,onProgress:r.onProgress,resumeFrom:r.resumeFrom,startCopyFromURLOptions:r});return await s.poll(),s}async abortCopyFromURL(e,r={}){return Z.withSpan("BlobClient-abortCopyFromURL",r,async n=>ue(await this.blobContext.abortCopyFromURL(e,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,tracingOptions:n.tracingOptions})))}async syncCopyFromURL(e,r={}){return r.conditions=r.conditions||{},r.sourceConditions=r.sourceConditions||{},Z.withSpan("BlobClient-syncCopyFromURL",r,async n=>ue(await this.blobContext.copyFromURL(e,{abortSignal:r.abortSignal,metadata:r.metadata,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:r.sourceConditions?.ifMatch,sourceIfModifiedSince:r.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:r.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:r.sourceConditions?.ifUnmodifiedSince},sourceContentMD5:r.sourceContentMD5,copySourceAuthorization:Ah(r.sourceAuthorization),tier:od(r.tier),blobTagsString:sd(r.tags),immutabilityPolicyExpiry:r.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:r.immutabilityPolicy?.policyMode,legalHold:r.legalHold,encryptionScope:r.encryptionScope,copySourceTags:r.copySourceTags,fileRequestIntent:r.sourceShareTokenIntent,tracingOptions:n.tracingOptions})))}async setAccessTier(e,r={}){return Z.withSpan("BlobClient-setAccessTier",r,async n=>ue(await this.blobContext.setTier(od(e),{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},rehydratePriority:r.rehydratePriority,tracingOptions:n.tracingOptions})))}async downloadToBuffer(e,r,n,s={}){let o,a=0,c=0,l=s;e instanceof Buffer?(o=e,a=r||0,c=typeof n=="number"?n:0):(a=typeof e=="number"?e:0,c=typeof r=="number"?r:0,l=n||{});let u=l.blockSize??0;if(u<0)throw new RangeError("blockSize option must be >= 0");if(u===0&&(u=4194304),a<0)throw new RangeError("offset option must be >= 0");if(c&&c<=0)throw new RangeError("count option must be greater than 0");return l.conditions||(l.conditions={}),Z.withSpan("BlobClient-downloadToBuffer",l,async d=>{if(!c){let f=await this.getProperties({...l,tracingOptions:d.tracingOptions});if(c=f.contentLength-a,c<0)throw new RangeError(`offset ${a} shouldn't be larger than blob size ${f.contentLength}`)}if(!o)try{o=Buffer.alloc(c)}catch(f){throw new Error(`Unable to allocate the buffer of size: ${c}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${f.message}`)}if(o.length{let A=a+c;f+u{let a=await this.download(r,n,{...s,tracingOptions:o.tracingOptions});return a.readableStreamBody&&await Yfe(a.readableStreamBody,e),a.blobDownloadStream=void 0,a})}getBlobAndContainerNamesFromUrl(){let e,r;try{let n=new URL(this.url);if(n.host.split(".")[1]==="blob"){let s=n.pathname.match("/([^/]*)(/(.*))?");e=s[1],r=s[3]}else if(xN(n)){let s=n.pathname.match("/([^/]*)/([^/]*)(/(.*))?");e=s[2],r=s[4]}else{let s=n.pathname.match("/([^/]*)(/(.*))?");e=s[1],r=s[3]}if(e=decodeURIComponent(e),r=decodeURIComponent(r),r=r.replace(/\\/g,"/"),!e)throw new Error("Provided containerName is invalid.");return{blobName:r,containerName:e}}catch{throw new Error("Unable to extract blobName and containerName with provided information.")}}async startCopyFromURL(e,r={}){return Z.withSpan("BlobClient-startCopyFromURL",r,async n=>(r.conditions=r.conditions||{},r.sourceConditions=r.sourceConditions||{},ue(await this.blobContext.startCopyFromURL(e,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:r.sourceConditions.ifMatch,sourceIfModifiedSince:r.sourceConditions.ifModifiedSince,sourceIfNoneMatch:r.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:r.sourceConditions.ifUnmodifiedSince,sourceIfTags:r.sourceConditions.tagConditions},immutabilityPolicyExpiry:r.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:r.immutabilityPolicy?.policyMode,legalHold:r.legalHold,rehydratePriority:r.rehydratePriority,tier:od(r.tier),blobTagsString:sd(r.tags),sealBlob:r.sealBlob,tracingOptions:n.tracingOptions}))))}generateSasUrl(e){return new Promise(r=>{if(!(this.credential instanceof rr))throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");let n=nI({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},this.credential).toString();r(rI(this.url,n))})}generateSasStringToSign(e){if(!(this.credential instanceof rr))throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");return sI({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},this.credential).stringToSign}generateUserDelegationSasUrl(e,r){return new Promise(n=>{let s=nI({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},r,this.accountName).toString();n(rI(this.url,s))})}generateUserDelegationSasStringToSign(e,r){return sI({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId,...e},r,this.accountName).stringToSign}async deleteImmutabilityPolicy(e={}){return Z.withSpan("BlobClient-deleteImmutabilityPolicy",e,async r=>ue(await this.blobContext.deleteImmutabilityPolicy({tracingOptions:r.tracingOptions})))}async setImmutabilityPolicy(e,r={}){return Z.withSpan("BlobClient-setImmutabilityPolicy",r,async n=>ue(await this.blobContext.setImmutabilityPolicy({immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,tracingOptions:n.tracingOptions})))}async setLegalHold(e,r={}){return Z.withSpan("BlobClient-setLegalHold",r,async n=>ue(await this.blobContext.setLegalHold(e,{tracingOptions:n.tracingOptions})))}async getAccountInfo(e={}){return Z.withSpan("BlobClient-getAccountInfo",e,async r=>ue(await this.blobContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}},$N=class t extends Gl{static{i(this,"AppendBlobClient")}appendBlobContext;constructor(e,r,n,s){let o,a;if(s=s||{},kl(r))a=e,o=r;else if(it&&r instanceof rr||r instanceof Ft||uo(r))a=e,s=n,o=yr(r,s);else if(!r&&typeof r!="string")a=e,o=yr(new Ft,s);else if(r&&typeof r=="string"&&n&&typeof n=="string"){let c=r,l=n,u=gm(e);if(u.kind==="AccountConnString")if(it){let d=new rr(u.accountName,u.accountKey);a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l)),s.proxyOptions||(s.proxyOptions=ju(u.proxyUri)),o=yr(d,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(u.kind==="SASConnString")a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l))+"?"+u.accountSas,o=yr(new Ft,s);else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}else throw new Error("Expecting non-empty strings for containerName and blobName parameters");super(a,o),this.appendBlobContext=this.storageClientContext.appendBlob}withSnapshot(e){return new t(fh(this.url,Dl.Parameters.SNAPSHOT,e.length===0?void 0:e),this.pipeline)}async create(e={}){return e.conditions=e.conditions||{},Mr(e.customerProvidedKey,this.isHttps),Z.withSpan("AppendBlobClient-create",e,async r=>ue(await this.appendBlobContext.create(0,{abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:e.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:e.immutabilityPolicy?.policyMode,legalHold:e.legalHold,blobTagsString:sd(e.tags),tracingOptions:r.tracingOptions})))}async createIfNotExists(e={}){let r={ifNoneMatch:WG};return Z.withSpan("AppendBlobClient-createIfNotExists",e,async n=>{try{let s=ue(await this.create({...n,conditions:r}));return{succeeded:!0,...s,_response:s._response}}catch(s){if(s.details?.errorCode==="BlobAlreadyExists")return{succeeded:!1,...s.response?.parsedHeaders,_response:s.response};throw s}})}async seal(e={}){return e.conditions=e.conditions||{},Z.withSpan("AppendBlobClient-seal",e,async r=>ue(await this.appendBlobContext.seal({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async appendBlock(e,r,n={}){return n.conditions=n.conditions||{},Mr(n.customerProvidedKey,this.isHttps),Z.withSpan("AppendBlobClient-appendBlock",n,async s=>ue(await this.appendBlobContext.appendBlock(r,e,{abortSignal:n.abortSignal,appendPositionAccessConditions:n.conditions,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onUploadProgress:n.onProgress},transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,tracingOptions:s.tracingOptions})))}async appendBlockFromURL(e,r,n,s={}){return s.conditions=s.conditions||{},s.sourceConditions=s.sourceConditions||{},Mr(s.customerProvidedKey,this.isHttps),Z.withSpan("AppendBlobClient-appendBlockFromURL",s,async o=>ue(await this.appendBlobContext.appendBlockFromUrl(e,0,{abortSignal:s.abortSignal,sourceRange:Ns({offset:r,count:n}),sourceContentMD5:s.sourceContentMD5,sourceContentCrc64:s.sourceContentCrc64,leaseAccessConditions:s.conditions,appendPositionAccessConditions:s.conditions,modifiedAccessConditions:{...s.conditions,ifTags:s.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:s.sourceConditions?.ifMatch,sourceIfModifiedSince:s.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:s.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:s.sourceConditions?.ifUnmodifiedSince},copySourceAuthorization:Ah(s.sourceAuthorization),cpkInfo:s.customerProvidedKey,encryptionScope:s.encryptionScope,fileRequestIntent:s.sourceShareTokenIntent,tracingOptions:o.tracingOptions})))}},Eh=class t extends Gl{static{i(this,"BlockBlobClient")}_blobContext;blockBlobContext;constructor(e,r,n,s){let o,a;if(s=s||{},kl(r))a=e,o=r;else if(it&&r instanceof rr||r instanceof Ft||uo(r))a=e,s=n,o=yr(r,s);else if(!r&&typeof r!="string")a=e,n&&typeof n!="string"&&(s=n),o=yr(new Ft,s);else if(r&&typeof r=="string"&&n&&typeof n=="string"){let c=r,l=n,u=gm(e);if(u.kind==="AccountConnString")if(it){let d=new rr(u.accountName,u.accountKey);a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l)),s.proxyOptions||(s.proxyOptions=ju(u.proxyUri)),o=yr(d,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(u.kind==="SASConnString")a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l))+"?"+u.accountSas,o=yr(new Ft,s);else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}else throw new Error("Expecting non-empty strings for containerName and blobName parameters");super(a,o),this.blockBlobContext=this.storageClientContext.blockBlob,this._blobContext=this.storageClientContext.blob}withSnapshot(e){return new t(fh(this.url,Dl.Parameters.SNAPSHOT,e.length===0?void 0:e),this.pipeline)}async query(e,r={}){if(Mr(r.customerProvidedKey,this.isHttps),!it)throw new Error("This operation currently is only supported in Node.js.");return Z.withSpan("BlockBlobClient-query",r,async n=>{let s=ue(await this._blobContext.query({abortSignal:r.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:n3(r.inputTextConfiguration),outputSerialization:n3(r.outputTextConfiguration)},leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},cpkInfo:r.customerProvidedKey,tracingOptions:n.tracingOptions}));return new vN(s,{abortSignal:r.abortSignal,onProgress:r.onProgress,onError:r.onError})})}async upload(e,r,n={}){return n.conditions=n.conditions||{},Mr(n.customerProvidedKey,this.isHttps),Z.withSpan("BlockBlobClient-upload",n,async s=>ue(await this.blockBlobContext.upload(r,e,{abortSignal:n.abortSignal,blobHttpHeaders:n.blobHTTPHeaders,leaseAccessConditions:n.conditions,metadata:n.metadata,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},requestOptions:{onUploadProgress:n.onProgress},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,immutabilityPolicyExpiry:n.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:n.immutabilityPolicy?.policyMode,legalHold:n.legalHold,tier:od(n.tier),blobTagsString:sd(n.tags),tracingOptions:s.tracingOptions})))}async syncUploadFromURL(e,r={}){return r.conditions=r.conditions||{},Mr(r.customerProvidedKey,this.isHttps),Z.withSpan("BlockBlobClient-syncUploadFromURL",r,async n=>ue(await this.blockBlobContext.putBlobFromUrl(0,e,{...r,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:r.sourceConditions?.ifMatch,sourceIfModifiedSince:r.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:r.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:r.sourceConditions?.ifUnmodifiedSince,sourceIfTags:r.sourceConditions?.tagConditions},cpkInfo:r.customerProvidedKey,copySourceAuthorization:Ah(r.sourceAuthorization),tier:od(r.tier),blobTagsString:sd(r.tags),copySourceTags:r.copySourceTags,fileRequestIntent:r.sourceShareTokenIntent,tracingOptions:n.tracingOptions})))}async stageBlock(e,r,n,s={}){return Mr(s.customerProvidedKey,this.isHttps),Z.withSpan("BlockBlobClient-stageBlock",s,async o=>ue(await this.blockBlobContext.stageBlock(e,n,r,{abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,requestOptions:{onUploadProgress:s.onProgress},transactionalContentMD5:s.transactionalContentMD5,transactionalContentCrc64:s.transactionalContentCrc64,cpkInfo:s.customerProvidedKey,encryptionScope:s.encryptionScope,tracingOptions:o.tracingOptions})))}async stageBlockFromURL(e,r,n=0,s,o={}){return Mr(o.customerProvidedKey,this.isHttps),Z.withSpan("BlockBlobClient-stageBlockFromURL",o,async a=>ue(await this.blockBlobContext.stageBlockFromURL(e,0,r,{abortSignal:o.abortSignal,leaseAccessConditions:o.conditions,sourceContentMD5:o.sourceContentMD5,sourceContentCrc64:o.sourceContentCrc64,sourceRange:n===0&&!s?void 0:Ns({offset:n,count:s}),cpkInfo:o.customerProvidedKey,encryptionScope:o.encryptionScope,copySourceAuthorization:Ah(o.sourceAuthorization),fileRequestIntent:o.sourceShareTokenIntent,tracingOptions:a.tracingOptions})))}async commitBlockList(e,r={}){return r.conditions=r.conditions||{},Mr(r.customerProvidedKey,this.isHttps),Z.withSpan("BlockBlobClient-commitBlockList",r,async n=>ue(await this.blockBlobContext.commitBlockList({latest:e},{abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:r.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:r.immutabilityPolicy?.policyMode,legalHold:r.legalHold,tier:od(r.tier),blobTagsString:sd(r.tags),tracingOptions:n.tracingOptions})))}async getBlockList(e,r={}){return Z.withSpan("BlockBlobClient-getBlockList",r,async n=>{let s=ue(await this.blockBlobContext.getBlockList(e,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return s.committedBlocks||(s.committedBlocks=[]),s.uncommittedBlocks||(s.uncommittedBlocks=[]),s})}async uploadData(e,r={}){return Z.withSpan("BlockBlobClient-uploadData",r,async n=>{if(it){let s;return e instanceof Buffer?s=e:e instanceof ArrayBuffer?s=Buffer.from(e):(e=e,s=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),this.uploadSeekableInternal((o,a)=>s.slice(o,o+a),s.byteLength,n)}else{let s=new Blob([e]);return this.uploadSeekableInternal((o,a)=>s.slice(o,o+a),s.size,n)}})}async uploadBrowserData(e,r={}){return Z.withSpan("BlockBlobClient-uploadBrowserData",r,async n=>{let s=new Blob([e]);return this.uploadSeekableInternal((o,a)=>s.slice(o,o+a),s.size,n)})}async uploadSeekableInternal(e,r,n={}){let s=n.blockSize??0;if(s<0||s>4194304e3)throw new RangeError(`blockSize option must be >= 0 and <= ${4194304e3}`);let o=n.maxSingleShotSize??268435456;if(o<0||o>268435456)throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${268435456}`);if(s===0){if(r>4194304e3*5e4)throw new RangeError(`${r} is too larger to upload to a block blob.`);r>o&&(s=Math.ceil(r/5e4),s<4194304&&(s=4194304))}return n.blobHTTPHeaders||(n.blobHTTPHeaders={}),n.conditions||(n.conditions={}),Z.withSpan("BlockBlobClient-uploadSeekableInternal",n,async a=>{if(r<=o)return ue(await this.upload(e(0,r),r,a));let c=Math.floor((r-1)/s)+1;if(c>5e4)throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${5e4}`);let l=[],u=eh(),d=0,p=new fI(n.concurrency);for(let m=0;m{let f=e3(u,m),A=s*m,E=(m===c-1?r:A+s)-A;l.push(f),await this.stageBlock(f,e(A,E),E,{abortSignal:n.abortSignal,conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:a.tracingOptions}),d+=E,n.onProgress&&n.onProgress({loadedBytes:d})});return await p.do(),this.commitBlockList(l,a)})}async uploadFile(e,r={}){return Z.withSpan("BlockBlobClient-uploadFile",r,async n=>{let s=(await Jfe(e)).size;return this.uploadSeekableInternal((o,a)=>()=>jfe(e,{autoClose:!0,end:a?o+a-1:1/0,start:o}),s,{...r,tracingOptions:n.tracingOptions})})}async uploadStream(e,r=8388608,n=5,s={}){return s.blobHTTPHeaders||(s.blobHTTPHeaders={}),s.conditions||(s.conditions={}),Z.withSpan("BlockBlobClient-uploadStream",s,async o=>{let a=0,c=eh(),l=0,u=[];return await new _R(e,r,n,async(p,m)=>{let f=e3(c,a);u.push(f),a++,await this.stageBlock(f,p,m,{customerProvidedKey:s.customerProvidedKey,conditions:s.conditions,encryptionScope:s.encryptionScope,tracingOptions:o.tracingOptions}),l+=m,s.onProgress&&s.onProgress({loadedBytes:l})},Math.ceil(n/4*3)).do(),ue(await this.commitBlockList(u,{...s,tracingOptions:o.tracingOptions}))})}},zN=class t extends Gl{static{i(this,"PageBlobClient")}pageBlobContext;constructor(e,r,n,s){let o,a;if(s=s||{},kl(r))a=e,o=r;else if(it&&r instanceof rr||r instanceof Ft||uo(r))a=e,s=n,o=yr(r,s);else if(!r&&typeof r!="string")a=e,o=yr(new Ft,s);else if(r&&typeof r=="string"&&n&&typeof n=="string"){let c=r,l=n,u=gm(e);if(u.kind==="AccountConnString")if(it){let d=new rr(u.accountName,u.accountKey);a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l)),s.proxyOptions||(s.proxyOptions=ju(u.proxyUri)),o=yr(d,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(u.kind==="SASConnString")a=Or(Or(u.url,encodeURIComponent(c)),encodeURIComponent(l))+"?"+u.accountSas,o=yr(new Ft,s);else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}else throw new Error("Expecting non-empty strings for containerName and blobName parameters");super(a,o),this.pageBlobContext=this.storageClientContext.pageBlob}withSnapshot(e){return new t(fh(this.url,Dl.Parameters.SNAPSHOT,e.length===0?void 0:e),this.pipeline)}async create(e,r={}){return r.conditions=r.conditions||{},Mr(r.customerProvidedKey,this.isHttps),Z.withSpan("PageBlobClient-create",r,async n=>ue(await this.pageBlobContext.create(0,e,{abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,blobSequenceNumber:r.blobSequenceNumber,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:r.immutabilityPolicy?.expiriesOn,immutabilityPolicyMode:r.immutabilityPolicy?.policyMode,legalHold:r.legalHold,tier:od(r.tier),blobTagsString:sd(r.tags),tracingOptions:n.tracingOptions})))}async createIfNotExists(e,r={}){return Z.withSpan("PageBlobClient-createIfNotExists",r,async n=>{try{let s={ifNoneMatch:WG},o=ue(await this.create(e,{...r,conditions:s,tracingOptions:n.tracingOptions}));return{succeeded:!0,...o,_response:o._response}}catch(s){if(s.details?.errorCode==="BlobAlreadyExists")return{succeeded:!1,...s.response?.parsedHeaders,_response:s.response};throw s}})}async uploadPages(e,r,n,s={}){return s.conditions=s.conditions||{},Mr(s.customerProvidedKey,this.isHttps),Z.withSpan("PageBlobClient-uploadPages",s,async o=>ue(await this.pageBlobContext.uploadPages(n,e,{abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:{...s.conditions,ifTags:s.conditions?.tagConditions},requestOptions:{onUploadProgress:s.onProgress},range:Ns({offset:r,count:n}),sequenceNumberAccessConditions:s.conditions,transactionalContentMD5:s.transactionalContentMD5,transactionalContentCrc64:s.transactionalContentCrc64,cpkInfo:s.customerProvidedKey,encryptionScope:s.encryptionScope,tracingOptions:o.tracingOptions})))}async uploadPagesFromURL(e,r,n,s,o={}){return o.conditions=o.conditions||{},o.sourceConditions=o.sourceConditions||{},Mr(o.customerProvidedKey,this.isHttps),Z.withSpan("PageBlobClient-uploadPagesFromURL",o,async a=>ue(await this.pageBlobContext.uploadPagesFromURL(e,Ns({offset:r,count:s}),0,Ns({offset:n,count:s}),{abortSignal:o.abortSignal,sourceContentMD5:o.sourceContentMD5,sourceContentCrc64:o.sourceContentCrc64,leaseAccessConditions:o.conditions,sequenceNumberAccessConditions:o.conditions,modifiedAccessConditions:{...o.conditions,ifTags:o.conditions?.tagConditions},sourceModifiedAccessConditions:{sourceIfMatch:o.sourceConditions?.ifMatch,sourceIfModifiedSince:o.sourceConditions?.ifModifiedSince,sourceIfNoneMatch:o.sourceConditions?.ifNoneMatch,sourceIfUnmodifiedSince:o.sourceConditions?.ifUnmodifiedSince},cpkInfo:o.customerProvidedKey,encryptionScope:o.encryptionScope,copySourceAuthorization:Ah(o.sourceAuthorization),fileRequestIntent:o.sourceShareTokenIntent,tracingOptions:a.tracingOptions})))}async clearPages(e=0,r,n={}){return n.conditions=n.conditions||{},Z.withSpan("PageBlobClient-clearPages",n,async s=>ue(await this.pageBlobContext.clearPages(0,{abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},range:Ns({offset:e,count:r}),sequenceNumberAccessConditions:n.conditions,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,tracingOptions:s.tracingOptions})))}async getPageRanges(e=0,r,n={}){return n.conditions=n.conditions||{},Z.withSpan("PageBlobClient-getPageRanges",n,async s=>{let o=ue(await this.pageBlobContext.getPageRanges({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},range:Ns({offset:e,count:r}),tracingOptions:s.tracingOptions}));return PN(o)})}async listPageRangesSegment(e=0,r,n,s={}){return Z.withSpan("PageBlobClient-getPageRangesSegment",s,async o=>ue(await this.pageBlobContext.getPageRanges({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:{...s.conditions,ifTags:s.conditions?.tagConditions},range:Ns({offset:e,count:r}),marker:n,maxPageSize:s.maxPageSize,tracingOptions:o.tracingOptions})))}async*listPageRangeItemSegments(e=0,r,n,s={}){let o;if(n||n===void 0)do o=await this.listPageRangesSegment(e,r,n,s),n=o.continuationToken,yield await o;while(n)}async*listPageRangeItems(e=0,r,n={}){let s;for await(let o of this.listPageRangeItemSegments(e,r,s,n))yield*s3(o)}listPageRanges(e=0,r,n={}){n.conditions=n.conditions||{};let s=this.listPageRangeItems(e,r,n);return{next(){return s.next()},[Symbol.asyncIterator](){return this},byPage:i((o={})=>this.listPageRangeItemSegments(e,r,o.continuationToken,{maxPageSize:o.maxPageSize,...n}),"byPage")}}async getPageRangesDiff(e,r,n,s={}){return s.conditions=s.conditions||{},Z.withSpan("PageBlobClient-getPageRangesDiff",s,async o=>{let a=ue(await this.pageBlobContext.getPageRangesDiff({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:{...s.conditions,ifTags:s.conditions?.tagConditions},prevsnapshot:n,range:Ns({offset:e,count:r}),tracingOptions:o.tracingOptions}));return PN(a)})}async listPageRangesDiffSegment(e,r,n,s,o={}){return Z.withSpan("PageBlobClient-getPageRangesDiffSegment",o,async a=>ue(await this.pageBlobContext.getPageRangesDiff({abortSignal:o?.abortSignal,leaseAccessConditions:o?.conditions,modifiedAccessConditions:{...o?.conditions,ifTags:o?.conditions?.tagConditions},prevsnapshot:n,range:Ns({offset:e,count:r}),marker:s,maxPageSize:o?.maxPageSize,tracingOptions:a.tracingOptions})))}async*listPageRangeDiffItemSegments(e,r,n,s,o){let a;if(s||s===void 0)do a=await this.listPageRangesDiffSegment(e,r,n,s,o),s=a.continuationToken,yield await a;while(s)}async*listPageRangeDiffItems(e,r,n,s){let o;for await(let a of this.listPageRangeDiffItemSegments(e,r,n,o,s))yield*s3(a)}listPageRangesDiff(e,r,n,s={}){s.conditions=s.conditions||{};let o=this.listPageRangeDiffItems(e,r,n,{...s});return{next(){return o.next()},[Symbol.asyncIterator](){return this},byPage:i((a={})=>this.listPageRangeDiffItemSegments(e,r,n,a.continuationToken,{maxPageSize:a.maxPageSize,...s}),"byPage")}}async getPageRangesDiffForManagedDisks(e,r,n,s={}){return s.conditions=s.conditions||{},Z.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks",s,async o=>{let a=ue(await this.pageBlobContext.getPageRangesDiff({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:{...s.conditions,ifTags:s.conditions?.tagConditions},prevSnapshotUrl:n,range:Ns({offset:e,count:r}),tracingOptions:o.tracingOptions}));return PN(a)})}async resize(e,r={}){return r.conditions=r.conditions||{},Z.withSpan("PageBlobClient-resize",r,async n=>ue(await this.pageBlobContext.resize(e,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},encryptionScope:r.encryptionScope,tracingOptions:n.tracingOptions})))}async updateSequenceNumber(e,r,n={}){return n.conditions=n.conditions||{},Z.withSpan("PageBlobClient-updateSequenceNumber",n,async s=>ue(await this.pageBlobContext.updateSequenceNumber(e,{abortSignal:n.abortSignal,blobSequenceNumber:r,leaseAccessConditions:n.conditions,modifiedAccessConditions:{...n.conditions,ifTags:n.conditions?.tagConditions},tracingOptions:s.tracingOptions})))}async startCopyIncremental(e,r={}){return Z.withSpan("PageBlobClient-startCopyIncremental",r,async n=>ue(await this.pageBlobContext.copyIncremental(e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions})))}};var Kfe;(function(t){t[t.LOCKED=0]="LOCKED",t[t.UNLOCKED=1]="UNLOCKED"})(Kfe||(Kfe={}));var Xfe;(function(t){t.AES256="AES256"})(Xfe||(Xfe={}));var VN=class extends Error{static{i(this,"InvalidResponseError")}constructor(e){super(e),this.name="InvalidResponseError"}};var Ch=class extends Error{static{i(this,"NetworkError")}constructor(e){let r=`Unable to make request: ${e} If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Ch.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Sm=class extends Error{static{i(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Sm.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var AI=class extends Error{static{i(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var nut=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},k3=class{static{i(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);be(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=i(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Zfe(t,e,r){return nut(this,void 0,void 0,function*(){var n;let s=new Gl(t),o=s.getBlockBlobClient(),a=new k3((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),v(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let l=yield o.uploadFile(e,c);if(l._response.status>=400)throw new VN(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw Ar(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}i(Zfe,"uploadCacheArchiveSDK");var tAe=R(require("buffer"),1),mc=R(require("fs"),1),rAe=R(require("stream"),1),nAe=R(require("util"),1);var WN=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function YN(t){return t?t>=200&&t<300:!1}i(YN,"isSuccessStatusCode");function sut(t){return t?t>=500:!0}i(sut,"isServerErrorStatusCode");function out(t){return t?[ft.BadGateway,ft.ServiceUnavailable,ft.GatewayTimeout].includes(t):!1}i(out,"isRetryableStatusCode");function iut(t){return WN(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}i(iut,"sleep");function eAe(t,e,r){return WN(this,arguments,void 0,function*(n,s,o,a=yB,c=EB,l=void 0){let u="",d=1;for(;d<=a;){let p,m,f=!1;try{p=yield s()}catch(A){l&&(p=l(A)),f=!0,u=A.message}if(p&&(m=o(p),!sut(m)))return p;if(m&&(f=out(m),u=`Cache service responded with ${m}`),v(`${n} - Attempt ${d} of ${a} failed with error: ${u}`),!f){v(`${n} - Error is not retryable`);break}yield iut(c),d++}throw Error(`${n} failed: ${u}`)})}i(eAe,"retry");function hI(t,e){return WN(this,arguments,void 0,function*(r,n,s=yB,o=EB){return yield eAe(r,n,a=>a.statusCode,s,o,a=>{if(a instanceof Fa)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}i(hI,"retryTypedResponse");function Ih(t,e){return WN(this,arguments,void 0,function*(r,n,s=yB,o=EB){return yield eAe(r,n,a=>a.message.statusCode,s,o)})}i(Ih,"retryHttpClientResponse");var Xo=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function aut(t,e){return Xo(this,void 0,void 0,function*(){yield nAe.promisify(rAe.pipeline)(t.message,e)})}i(aut,"pipeResponseToStream");var JN=class{static{i(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,v(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.segmentOffset+this.receivedBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);be(`Received ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=i(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function jN(t,e){return Xo(this,void 0,void 0,function*(){let r=mc.createWriteStream(e),n=new so("actions/cache"),s=yield Ih("downloadCache",()=>Xo(this,void 0,void 0,function*(){return n.get(t)}));s.message.socket.setTimeout(cq,()=>{s.message.destroy(),v(`Aborting download, socket timed out after ${cq} ms`)}),yield aut(s,r);let o=s.message.headers["content-length"];if(o){let a=parseInt(o),c=Ma(e);if(c!==a)throw new Error(`Incomplete download. Expected file size: ${a}, actual file size: ${c}`)}else v("Unable to validate download, no Content-Length header")})}i(jN,"downloadCacheHttpClient");function sAe(t,e,r){return Xo(this,void 0,void 0,function*(){var n;let s=yield mc.promises.open(e,"w"),o=new so("actions/cache",void 0,{socketTimeout:r.timeoutInMs,keepAlive:!0});try{let c=(yield Ih("downloadCacheMetadata",()=>Xo(this,void 0,void 0,function*(){return yield o.request("HEAD",t,null,{})}))).message.headers["content-length"];if(c==null)throw new Error("Content-Length not found on blob response");let l=parseInt(c);if(Number.isNaN(l))throw new Error(`Could not interpret Content-Length: ${l}`);let u=[],d=4*1024*1024;for(let w=0;wXo(this,void 0,void 0,function*(){return yield cut(o,t,w,x)}),"promiseGetter")})}u.reverse();let p=0,m=0,f=new JN(l);f.startDisplayTimer();let A=f.onProgress(),h=[],E,C=i(()=>Xo(this,void 0,void 0,function*(){let w=yield Promise.race(Object.values(h));yield s.write(w.buffer,0,w.count,w.offset),p--,delete h[w.offset],m+=w.count,A({loadedBytes:m})}),"waitAndWrite");for(;E=u.pop();)h[E.offset]=E.promiseGetter(),p++,p>=((n=r.downloadConcurrency)!==null&&n!==void 0?n:10)&&(yield C());for(;p>0;)yield C()}finally{o.dispose(),yield s.close()}})}i(sAe,"downloadCacheHttpClientConcurrent");function cut(t,e,r,n){return Xo(this,void 0,void 0,function*(){let o=0;for(;;)try{let c=yield iAe(3e4,lut(t,e,r,n));if(typeof c=="string")throw new Error("downloadSegmentRetry failed due to timeout");return c}catch(a){if(o>=5)throw a;o++}})}i(cut,"downloadSegmentRetry");function lut(t,e,r,n){return Xo(this,void 0,void 0,function*(){let s=yield Ih("downloadCachePart",()=>Xo(this,void 0,void 0,function*(){return yield t.get(e,{Range:`bytes=${r}-${r+n-1}`})}));if(!s.readBodyBuffer)throw new Error("Expected HttpClientResponse to implement readBodyBuffer");return{offset:r,count:n,buffer:yield s.readBodyBuffer()}})}i(lut,"downloadSegment");function oAe(t,e,r){return Xo(this,void 0,void 0,function*(){var n;let s=new Eh(t,void 0,{retryOptions:{tryTimeoutInMs:r.timeoutInMs}}),a=(n=(yield s.getProperties()).contentLength)!==null&&n!==void 0?n:-1;if(a<0)v("Unable to determine content length, downloading file with http-client..."),yield jN(t,e);else{let c=Math.min(134217728,tAe.constants.MAX_LENGTH),l=new JN(a),u=mc.openSync(e,"w");try{l.startDisplayTimer();let d=new AbortController,p=d.signal;for(;!l.isDone();){let m=l.segmentOffset+l.segmentSize,f=Math.min(c,a-m);l.nextSegment(f);let A=yield iAe(r.segmentTimeoutInMs||36e5,s.downloadToBuffer(m,f,{abortSignal:p,concurrency:r.downloadConcurrency,onProgress:l.onProgress()}));if(A==="timeout")throw d.abort(),new Error("Aborting cache download as the download time exceeded the timeout.");Buffer.isBuffer(A)&&mc.writeFileSync(u,A)}}finally{l.stopDisplayTimer(),mc.closeSync(u)}}})}i(oAe,"downloadCacheStorageSDK");var iAe=i((t,e)=>Xo(void 0,void 0,void 0,function*(){let r,n=new Promise(s=>{r=setTimeout(()=>s("timeout"),t)});return Promise.race([e,n]).then(s=>(clearTimeout(r),s))}),"promiseWithTimeout");function L3(t){let e={useAzureSdk:!1,uploadConcurrency:4,uploadChunkSize:33554432};return t&&(typeof t.useAzureSdk=="boolean"&&(e.useAzureSdk=t.useAzureSdk),typeof t.uploadConcurrency=="number"&&(e.uploadConcurrency=t.uploadConcurrency),typeof t.uploadChunkSize=="number"&&(e.uploadChunkSize=t.uploadChunkSize)),e.uploadConcurrency=isNaN(Number(process.env.CACHE_UPLOAD_CONCURRENCY))?e.uploadConcurrency:Math.min(32,Number(process.env.CACHE_UPLOAD_CONCURRENCY)),e.uploadChunkSize=isNaN(Number(process.env.CACHE_UPLOAD_CHUNK_SIZE))?e.uploadChunkSize:Math.min(128*1024*1024,Number(process.env.CACHE_UPLOAD_CHUNK_SIZE)*1024*1024),v(`Use Azure SDK: ${e.useAzureSdk}`),v(`Upload concurrency: ${e.uploadConcurrency}`),v(`Upload chunk size: ${e.uploadChunkSize}`),e}i(L3,"getUploadOptions");function aAe(t){let e={useAzureSdk:!1,concurrentBlobDownloads:!0,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:!1};t&&(typeof t.useAzureSdk=="boolean"&&(e.useAzureSdk=t.useAzureSdk),typeof t.concurrentBlobDownloads=="boolean"&&(e.concurrentBlobDownloads=t.concurrentBlobDownloads),typeof t.downloadConcurrency=="number"&&(e.downloadConcurrency=t.downloadConcurrency),typeof t.timeoutInMs=="number"&&(e.timeoutInMs=t.timeoutInMs),typeof t.segmentTimeoutInMs=="number"&&(e.segmentTimeoutInMs=t.segmentTimeoutInMs),typeof t.lookupOnly=="boolean"&&(e.lookupOnly=t.lookupOnly));let r=process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS;return r&&!isNaN(Number(r))&&isFinite(Number(r))&&(e.segmentTimeoutInMs=Number(r)*60*1e3),v(`Use Azure SDK: ${e.useAzureSdk}`),v(`Download concurrency: ${e.downloadConcurrency}`),v(`Request timeout (ms): ${e.timeoutInMs}`),v(`Cache segment download timeout mins env var: ${process.env.SEGMENT_DOWNLOAD_TIMEOUT_MINS}`),v(`Segment download timeout (ms): ${e.segmentTimeoutInMs}`),v(`Lookup only: ${e.lookupOnly}`),e}i(aAe,"getDownloadOptions");function O3(){let e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),r=e==="GITHUB.COM",n=e.endsWith(".GHE.COM"),s=e.endsWith(".LOCALHOST");return!r&&!n&&!s}i(O3,"isGhes");function gI(){return O3()?"v1":process.env.ACTIONS_CACHE_SERVICE_V2?"v2":"v1"}i(gI,"getCacheServiceVersion");var cAe=["none","read","write","write-only"];function M3(){return(process.env.ACTIONS_CACHE_MODE||"").trim().toLowerCase()}i(M3,"getCacheMode");function lAe(t){return cAe.includes(t)?t==="read"||t==="write":!0}i(lAe,"isCacheReadable");function uAe(t){return cAe.includes(t)?t==="write"||t==="write-only":!0}i(uAe,"isCacheWritable");function KN(){let t=gI();switch(t){case"v1":return process.env.ACTIONS_CACHE_URL||process.env.ACTIONS_RESULTS_URL||"";case"v2":return process.env.ACTIONS_RESULTS_URL||"";default:throw new Error(`Unsupported cache service version: ${t}`)}}i(KN,"getCacheServiceURL");var fAe=R(mAe(),1);function XN(){return`@actions/cache-${fAe.version}`}i(XN,"getUserAgentString");var Ts=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function yI(t){let e=KN();if(!e)throw new Error("Cache Service Url not found, unable to restore cache.");let r=`${e}_apis/artifactcache/${t}`;return v(`Resource Url: ${r}`),r}i(yI,"getCacheApiUrl");function put(t,e){return`${t};api-version=${e}`}i(put,"createAcceptHeader");function mut(){return{headers:{Accept:put("application/json","6.0-preview.1")}}}i(mut,"getRequestOptions");function F3(){let t=process.env.ACTIONS_RUNTIME_TOKEN||"",e=new VA(t);return new so(XN(),[e],mut())}i(F3,"createHttpClient");function gAe(t,e,r){return Ts(this,void 0,void 0,function*(){var n;let s=F3(),o=zA(e,r?.compressionMethod,r?.enableCrossOsArchive),a=`cache?keys=${encodeURIComponent(t.join(","))}&version=${o}`,c=yield hI("getCacheEntry",()=>Ts(this,void 0,void 0,function*(){return s.getJson(yI(a))}));if(c.statusCode===204)return $p()&&(yield fut(t[0],s,o)),null;if(!YN(c.statusCode)){let d=(n=c.error)===null||n===void 0?void 0:n.message;throw d?.includes(CB)?new Error(d):new Error(`Cache service responded with ${c.statusCode}`)}let l=c.result,u=l?.archiveLocation;if(!u)throw new Error("Cache not found.");return xn(u),v("Cache Result:"),v(JSON.stringify(l)),l})}i(gAe,"getCacheEntry");function fut(t,e,r){return Ts(this,void 0,void 0,function*(){let n=`caches?key=${encodeURIComponent(t)}`,s=yield hI("listCache",()=>Ts(this,void 0,void 0,function*(){return e.getJson(yI(n))}));if(s.statusCode===200){let o=s.result,a=o?.totalCount;if(a&&a>0){v(`No matching cache found for cache key '${t}', version '${r} and scope ${process.env.GITHUB_REF}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key -Other caches with similar key:`);for(let c of o?.artifactCaches||[])v(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}i(fut,"printCachesListForDiagnostics");function U3(t,e,r){return Ts(this,void 0,void 0,function*(){let n=new hAe.URL(t),s=aAe(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield oAe(t,e,s):s.concurrentBlobDownloads?yield sAe(t,e,s):yield jN(t,e):yield jN(t,e)})}i(U3,"downloadCache");function yAe(t,e,r){return Ts(this,void 0,void 0,function*(){let n=F3(),s=zA(e,r?.compressionMethod,r?.enableCrossOsArchive),o={key:t,version:s,cacheSize:r?.cacheSize};return yield hI("reserveCache",()=>Ts(this,void 0,void 0,function*(){return n.postJson(yI("caches"),o)}))})}i(yAe,"reserveCache");function AAe(t,e){return`bytes ${t}-${e}/*`}i(AAe,"getContentRange");function Aut(t,e,r,n,s){return Ts(this,void 0,void 0,function*(){v(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${AAe(n,s)}`);let o={"Content-Type":"application/octet-stream","Content-Range":AAe(n,s)},a=yield Ih(`uploadChunk (start: ${n}, end: ${s})`,()=>Ts(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),o)}));if(!YN(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}i(Aut,"uploadChunk");function hut(t,e,r,n){return Ts(this,void 0,void 0,function*(){let s=Ma(r),o=yI(`caches/${e.toString()}`),a=wh.openSync(r,"r"),c=L3(n),l=pq("uploadConcurrency",c.uploadConcurrency),u=pq("uploadChunkSize",c.uploadChunkSize),d=[...new Array(l).keys()];v("Awaiting all uploads");let p=0;try{yield Promise.all(d.map(()=>Ts(this,void 0,void 0,function*(){for(;pwh.createReadStream(r,{fd:a,start:f,end:A,autoClose:!1}).on("error",h=>{throw new Error(`Cache upload failed because file read failed with ${h.message}`)}),f,A)}})))}finally{wh.closeSync(a)}})}i(hut,"uploadFile");function gut(t,e,r){return Ts(this,void 0,void 0,function*(){let n={size:r};return yield hI("commitCache",()=>Ts(this,void 0,void 0,function*(){return t.postJson(yI(`caches/${e.toString()}`),n)}))})}i(gut,"commitCache");function q3(t,e,r,n){return Ts(this,void 0,void 0,function*(){if(L3(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Zfe(r,e,n)}else{let o=F3();v("Upload cache"),yield hut(o,t,e,n),v("Commiting cache");let a=Ma(e);be(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield gut(o,t,a);if(!YN(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);be("Cache saved successfully")}})}i(q3,"saveCache");var phe=R(ohe(),1),Ir=R(Cr(),1),ho=R(Cr(),1),Nm=R(Cr(),1),Tm=R(Cr(),1),vm=R(Cr(),1);var kV=R(Cr(),1),LV=R(Cr(),1),lhe=R(Cr(),1),uhe=R(Cr(),1),dhe=R(Cr(),1);var QV=R(Cr(),1),_V=R(Cr(),1),ihe=R(Cr(),1),ahe=R(Cr(),1),che=R(Cr(),1);var DV=class extends che.MessageType{static{i(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,ahe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,ihe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posOT,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,uhe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,lhe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posyc,"T")},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9}])}create(e){let r={key:"",version:""};return globalThis.Object.defineProperty(r,Tm.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Nm.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posyc,"T")},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"size_bytes",kind:"scalar",T:3},{no:4,name:"version",kind:"scalar",T:9}])}create(e){let r={key:"",sizeBytes:"0",version:""};return globalThis.Object.defineProperty(r,Tm.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Nm.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posyc,"T")},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"restore_keys",kind:"scalar",repeat:2,T:9},{no:4,name:"version",kind:"scalar",T:9}])}create(e){let r={key:"",restoreKeys:[],version:""};return globalThis.Object.defineProperty(r,Tm.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Nm.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.poszV.fromJson(s,{ignoreUnknownFields:!0}))}FinalizeCacheEntryUpload(e){let r=VV.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.CacheService","FinalizeCacheEntryUpload","application/json",r).then(s=>WV.fromJson(s,{ignoreUnknownFields:!0}))}GetCacheEntryDownloadURL(e){let r=YV.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.CacheService","GetCacheEntryDownloadURL","application/json",r).then(s=>JV.fromJson(s,{ignoreUnknownFields:!0}))}};function mhe(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&(xn(r),xn(encodeURIComponent(r)))}catch(e){v(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}i(mhe,"maskSigUrl");function fhe(t){if(typeof t!="object"||t===null){v("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&mhe(t.signed_upload_url),"signed_download_url"in t&&typeof t.signed_download_url=="string"&&mhe(t.signed_download_url)}i(fhe,"maskSecretUrls");var FT=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},jV=class{static{i(this,"CacheServiceClient")}constructor(e,r,n,s){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let o=Mle();this.baseUrl=KN(),r&&(this.maxAttempts=r),n&&(this.baseRetryIntervalMilliseconds=n),s&&(this.retryMultiplier=s),this.httpClient=new so(e,[new VA(o)])}request(e,r,n,s){return FT(this,void 0,void 0,function*(){let o=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;v(`[Request] ${r} ${o}`);let a={"Content-Type":n};try{let{body:c}=yield this.retryableRequest(()=>FT(this,void 0,void 0,function*(){return this.httpClient.post(o,JSON.stringify(s),a)}));return c}catch(c){throw new Error(`Failed to ${r}: ${c.message}`)}})}retryableRequest(e){return FT(this,void 0,void 0,function*(){let r=0,n="",s="";for(;r0&&Ar(`You've hit a rate limit, your rate limit will reset in ${p} seconds`)}throw new AI(`Rate limited: ${n}`)}}catch(c){if(c instanceof SyntaxError&&v(`Raw Body: ${s}`),c instanceof Sm||c instanceof AI)throw c;if(Ch.isNetworkErrorCode(c?.code))throw new Ch(c?.code);o=!0,n=c.message}if(!o)throw new Error(`Received non-retryable error: ${n}`);if(r+1===this.maxAttempts)throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let a=this.getExponentialRetryTimeMilliseconds(r);be(`Attempt ${r+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${a} ms...`),yield this.sleep(a),r++}throw new Error("Request failed")})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[ft.BadGateway,ft.GatewayTimeout,ft.InternalServerError,ft.ServiceUnavailable].includes(e):!1}sleep(e){return FT(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),n=r*this.retryMultiplier;return Math.trunc(Math.random()*(n-r)+r)}};function KV(t){let e=new jV(XN(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new MT(e)}i(KV,"internalCacheTwirpClient");var UT=require("fs"),go=R(require("path"),1);var $l=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},ld=process.platform==="win32";function Rpt(){return $l(this,void 0,void 0,function*(){switch(process.platform){case"win32":{let t=yield Ole(),e=_le;if(t)return{path:t,type:no.GNU};if((0,UT.existsSync)(e))return{path:e,type:no.BSD};break}case"darwin":{let t=yield Es("gtar",!1);return t?{path:t,type:no.GNU}:{path:yield Es("tar",!0),type:no.BSD}}default:break}return{path:yield Es("tar",!0),type:no.GNU}})}i(Rpt,"getTarPath");function Npt(t,e,r){return $l(this,arguments,void 0,function*(n,s,o,a=""){let c=[`"${n.path}"`],l=Vu(s),u="cache.tar",d=Ahe(),p=n.type===no.BSD&&s!==Yn.Gzip&&ld;switch(o){case"create":c.push("--posix","-cf",p?u:l.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"--exclude",p?u:l.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"--files-from",uq);break;case"extract":c.push("-xf",p?u:a.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${go.sep}`,"g"),"/"));break;case"list":c.push("-tf",p?u:a.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"-P");break}if(n.type===no.GNU)switch(process.platform){case"win32":c.push("--force-local");break;case"darwin":c.push("--delay-directory-restore");break}return c})}i(Npt,"getTarArgs");function XV(t,e){return $l(this,arguments,void 0,function*(r,n,s=""){let o,a=yield Rpt(),c=yield Npt(a,r,n,s),l=n!=="create"?yield Tpt(a,r,s):yield vpt(a,r),u=a.type===no.BSD&&r!==Yn.Gzip&&ld;return u&&n!=="create"?o=[[...l].join(" "),[...c].join(" ")]:o=[[...c].join(" "),[...l].join(" ")],u?o:[o.join(" ")]})}i(XV,"getCommands");function Ahe(){var t;return(t=process.env.GITHUB_WORKSPACE)!==null&&t!==void 0?t:process.cwd()}i(Ahe,"getWorkingDirectory");function Tpt(t,e,r){return $l(this,void 0,void 0,function*(){let n=t.type===no.BSD&&e!==Yn.Gzip&&ld;switch(e){case Yn.Zstd:return n?["zstd -d --long=30 --force -o",mC,r.replace(new RegExp(`\\${go.sep}`,"g"),"/")]:["--use-compress-program",ld?'"zstd -d --long=30"':"unzstd --long=30"];case Yn.ZstdWithoutLong:return n?["zstd -d --force -o",mC,r.replace(new RegExp(`\\${go.sep}`,"g"),"/")]:["--use-compress-program",ld?'"zstd -d"':"unzstd"];default:return["-z"]}})}i(Tpt,"getDecompressionProgram");function vpt(t,e){return $l(this,void 0,void 0,function*(){let r=Vu(e),n=t.type===no.BSD&&e!==Yn.Gzip&&ld;switch(e){case Yn.Zstd:return n?["zstd -T0 --long=30 --force -o",r.replace(new RegExp(`\\${go.sep}`,"g"),"/"),mC]:["--use-compress-program",ld?'"zstd -T0 --long=30"':"zstdmt --long=30"];case Yn.ZstdWithoutLong:return n?["zstd -T0 --force -o",r.replace(new RegExp(`\\${go.sep}`,"g"),"/"),mC]:["--use-compress-program",ld?'"zstd -T0"':"zstdmt"];default:return["-z"]}})}i(vpt,"getCompressionProgram");function ZV(t,e){return $l(this,void 0,void 0,function*(){for(let r of t)try{yield Mu(r,void 0,{cwd:e,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(n){throw new Error(`${r.split(" ")[0]} failed with error: ${n?.message}`)}})}i(ZV,"execCommands");function _I(t,e){return $l(this,void 0,void 0,function*(){let r=yield XV(e,"list",t);yield ZV(r)})}i(_I,"listTar");function e4(t,e){return $l(this,void 0,void 0,function*(){let r=Ahe();yield Hp(r);let n=yield XV(e,"extract",t);yield ZV(n)})}i(e4,"extractTar");function t4(t,e,r){return $l(this,void 0,void 0,function*(){(0,UT.writeFileSync)(go.join(t,uq),e.join(` -`));let n=yield XV(r,"create");yield ZV(n,t)})}i(t4,"createTar");var Mh=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},zi=class t extends Error{static{i(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Pm=class t extends Error{static{i(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},r4="cache write denied:",qT=class t extends Pm{static{i(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},hhe=CB,GT=class t extends Error{static{i(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},HT=class t extends Error{static{i(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function ghe(t){if(!t||t.length===0)throw new zi("Path Validation Error: At least one directory or file path is required")}i(ghe,"checkPaths");function n4(t){if(t.length>512)throw new zi(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new zi(`Key Validation Error: ${t} cannot contain commas.`)}i(n4,"checkKey");function s4(){return gI()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}i(s4,"isFeatureAvailable");function yhe(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){let u=gI();v(`Cache service version: ${u}`),ghe(s);let d=M3();if(!lAe(d)){be(`Cache restore skipped: the effective cache-mode '${d}' does not permit reads.`),v(`Skipped restore for paths [${s.join(", ")}] with primary key '${o}'.`);return}return u==="v2"?yield Qpt(s,o,a,c,l):yield Ppt(s,o,a,c,l)})}i(yhe,"restoreCache");function Ppt(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){var u;a=a||[];let d=[o,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new zi("Key Validation Error: Keys are limited to a maximum of 10.");for(let f of d)n4(f);let p=yield hC(),m="";try{let f;try{f=yield gAe(d,s,{compressionMethod:p,enableCrossOsArchive:l})}catch(h){let E=(u=h?.message)!==null&&u!==void 0?u:"";throw E.includes(hhe)?new GT(E):h}if(!f?.archiveLocation)return;if(c?.lookupOnly)return be("Lookup only - skipping download"),f.cacheKey;m=DI.join(yield fC(),Vu(p)),v(`Archive Path: ${m}`),yield U3(f.archiveLocation,m,c),$p()&&(yield _I(m,p));let A=Ma(m);return be(`Cache Size: ~${Math.round(A/(1024*1024))} MB (${A} B)`),yield e4(m,p),be("Cache restored successfully"),f.cacheKey}catch(f){let A=f;if(A.name===zi.name)throw f;A instanceof Fa&&typeof A.statusCode=="number"&&A.statusCode>=500?kA(`Failed to restore: ${f.message}`):Ar(`Failed to restore: ${f.message}`)}finally{try{yield AC(m)}catch(f){v(`Failed to delete archive: ${f}`)}}})}i(Ppt,"restoreCacheV1");function Qpt(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){var u;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let d=[o,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new zi("Key Validation Error: Keys are limited to a maximum of 10.");for(let m of d)n4(m);let p="";try{let m=KV(),f=yield hC(),A={key:o,restoreKeys:a,version:zA(s,f,l)},h;try{h=yield m.GetCacheEntryDownloadURL(A)}catch(w){let x=(u=w?.message)!==null&&u!==void 0?u:"";throw x.includes(hhe)?new GT(x):w}if(!h.ok){v(`Cache not found for version ${A.version} of keys: ${d.join(", ")}`);return}if(A.key!==h.matchedKey?be(`Cache hit for restore-key: ${h.matchedKey}`):be(`Cache hit for: ${h.matchedKey}`),c?.lookupOnly)return be("Lookup only - skipping download"),h.matchedKey;p=DI.join(yield fC(),Vu(f)),v(`Archive path: ${p}`),v(`Starting download of archive to: ${p}`),yield U3(h.signedDownloadUrl,p,c);let C=Ma(p);return be(`Cache Size: ~${Math.round(C/(1024*1024))} MB (${C} B)`),$p()&&(yield _I(p,f)),yield e4(p,f),be("Cache restored successfully"),h.matchedKey}catch(m){let f=m;if(f.name===zi.name)throw m;f instanceof Fa&&typeof f.statusCode=="number"&&f.statusCode>=500?kA(`Failed to restore: ${m.message}`):Ar(`Failed to restore: ${m.message}`)}finally{try{p&&(yield AC(p))}catch(m){v(`Failed to delete archive: ${m}`)}}})}i(Qpt,"restoreCacheV2");function o4(t,e,r){return Mh(this,arguments,void 0,function*(n,s,o,a=!1){let c=gI();v(`Cache service version: ${c}`),ghe(n),n4(s);let l=M3();return uAe(l)?c==="v2"?yield Dpt(n,s,o,a):yield _pt(n,s,o,a):(be(`Cache save skipped: the effective cache-mode '${l}' does not permit writes.`),v(`Skipped save for paths [${n.join(", ")}] with key '${s}'.`),-1)})}i(o4,"saveCache");function _pt(t,e,r){return Mh(this,arguments,void 0,function*(n,s,o,a=!1){var c,l,u,d,p,m;let f=yield hC(),A=-1,h=yield dq(n);if(v("Cache Paths:"),v(`${JSON.stringify(h)}`),h.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let E=yield fC(),C=DI.join(E,Vu(f));v(`Archive Path: ${C}`);try{yield t4(E,h,f),$p()&&(yield _I(C,f));let w=10*1024*1024*1024,x=Ma(C);if(v(`File Size: ${x}`),x>w&&!O3())throw new Error(`Cache size of ~${Math.round(x/(1024*1024))} MB (${x} B) is over the 10GB limit, not saving cache.`);v("Reserving Cache");let b=yield yAe(s,n,{compressionMethod:f,enableCrossOsArchive:a,cacheSize:x});if(!((c=b?.result)===null||c===void 0)&&c.cacheId)A=(l=b?.result)===null||l===void 0?void 0:l.cacheId;else{if(b?.statusCode===400)throw new Error((d=(u=b?.error)===null||u===void 0?void 0:u.message)!==null&&d!==void 0?d:`Cache size of ~${Math.round(x/(1024*1024))} MB (${x} B) is over the data cap limit, not saving cache.`);{let N=(p=b?.error)===null||p===void 0?void 0:p.message;throw N?.startsWith(r4)?new qT(`Unable to reserve cache with key ${s}. More details: ${N}`):new Pm(`Unable to reserve cache with key ${s}, another job may be creating this cache. More details: ${(m=b?.error)===null||m===void 0?void 0:m.message}`)}}v(`Saving Cache (ID: ${A})`),yield q3(A,C,"",o)}catch(w){let x=w;if(x.name===zi.name)throw w;x.name===Pm.name?be(`Failed to save: ${x.message}`):x instanceof Fa&&typeof x.statusCode=="number"&&x.statusCode>=500?kA(`Failed to save: ${x.message}`):Ar(`Failed to save: ${x.message}`)}finally{try{yield AC(C)}catch(w){v(`Failed to delete archive: ${w}`)}}return A})}i(_pt,"saveCacheV1");function Dpt(t,e,r){return Mh(this,arguments,void 0,function*(n,s,o,a=!1){var c;o=Object.assign(Object.assign({},o),{uploadChunkSize:64*1024*1024,uploadConcurrency:8,useAzureSdk:!0});let l=yield hC(),u=KV(),d=-1,p=yield dq(n);if(v("Cache Paths:"),v(`${JSON.stringify(p)}`),p.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let m=yield fC(),f=DI.join(m,Vu(l));v(`Archive Path: ${f}`);try{yield t4(m,p,l),$p()&&(yield _I(f,l));let A=Ma(f);v(`File Size: ${A}`),o.archiveSizeBytes=A,v("Reserving Cache");let h=zA(n,l,a),E={key:s,version:h},C;try{let b=yield u.CreateCacheEntry(E);if(!b.ok)throw b.message&&!b.message.startsWith(r4)&&Ar(`Cache reservation failed: ${b.message}`),new Error(b.message||"Response was not ok");C=b.signedUploadUrl}catch(b){v(`Failed to reserve cache: ${b}`);let N=(c=b?.message)!==null&&c!==void 0?c:"";throw N.startsWith(r4)?new qT(`Unable to reserve cache with key ${s}. More details: ${N}`):new Pm(`Unable to reserve cache with key ${s}, another job may be creating this cache.`)}v(`Attempting to upload cache located at: ${f}`),yield q3(d,f,C,o);let w={key:s,version:h,sizeBytes:`${A}`},x=yield u.FinalizeCacheEntryUpload(w);if(v(`FinalizeCacheEntryUploadResponse: ${x.ok}`),!x.ok)throw x.message?new HT(x.message):new Error(`Unable to finalize cache with key ${s}, another job may be finalizing this cache.`);d=parseInt(x.entryId)}catch(A){let h=A;if(h.name===zi.name)throw A;h.name===Pm.name?be(`Failed to save: ${h.message}`):h.name===HT.name?Ar(h.message):h instanceof Fa&&typeof h.statusCode=="number"&&h.statusCode>=500?kA(`Failed to save: ${h.message}`):Ar(`Failed to save: ${h.message}`)}finally{try{yield AC(f)}catch(A){v(`Failed to delete archive: ${A}`)}}return d})}i(Dpt,"saveCacheV2");var Ehe=R(require("util"),1);var Fh=class t{static{i(this,"Cache")}opts;ghaCacheKey;ghaNoCache;cacheDir;cachePath;static POST_CACHE_KEY="postCache";constructor(e){this.opts=e,this.ghaCacheKey=Ehe.format("%s-%s-%s",this.opts.htcName,this.opts.htcVersion,this.platform()),this.ghaNoCache=this.opts.ghaNoCache,this.cacheDir=a4.default.join(this.opts.baseCacheDir,this.opts.htcVersion,this.platform()),this.cachePath=a4.default.join(this.cacheDir,this.opts.cacheFile),$T.default.existsSync(this.cacheDir)||$T.default.mkdirSync(this.cacheDir,{recursive:!0})}async save(e,r){v(`Cache.save ${e}`);let n=this.copyToCache(e),s=await N2(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform());if(v(`Cache.save cached to hosted tool cache ${s}`),!this.ghaNoCache&&s4())if(r)try{v(`Cache.save caching ${this.ghaCacheKey} to GitHub Actions cache`),await o4([this.cacheDir],this.ghaCacheKey)}catch(o){Ar(`Failed to save cache: ${o}`)}else v(`Cache.save sending ${this.ghaCacheKey} to post state`),zp(t.POST_CACHE_KEY,JSON.stringify({dir:this.cacheDir,key:this.ghaCacheKey}));return n}async find(){try{let e=oae(this.opts.htcName,this.opts.htcVersion,this.platform());if(e)return be(`Restored from hosted tool cache ${e}`),this.copyToCache(`${e}/${this.opts.cacheFile}`);if(!this.ghaNoCache&&s4()){if(v("GitHub Actions cache feature available"),await yhe([this.cacheDir],this.ghaCacheKey))return be(`Restored ${this.ghaCacheKey} from GitHub Actions cache`),e=await N2(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform()),be(`Cached to hosted tool cache ${e}`),this.copyToCache(`${e}/${this.opts.cacheFile}`)}else this.ghaNoCache?be("GitHub Actions cache disabled"):be("GitHub Actions cache feature not available")}catch(e){Ar(`Failed to restore cache: ${e}`)}return""}static async post(){let e=soe(t.POST_CACHE_KEY);if(!e)return be("State not set"),Promise.resolve(void 0);let r;try{r=JSON.parse(e)}catch(n){throw new Error(`Failed to parse cache post state: ${n}`)}if(!r.dir||!r.key)throw new Error(`Invalid cache post state: ${e}`);try{be(`Caching ${r.key} to GitHub Actions cache`),await o4([r.dir],r.key)}catch(n){Ar(`Failed to save cache: ${n}`)}return r}copyToCache(e){return be(`Copying ${e} to ${this.cachePath}`),$T.default.copyFileSync(e,this.cachePath),this.cachePath}platform(){let e=process.config.variables.arm_version;return`${i4.default.platform()}-${i4.default.arch()}${e?"v"+e:""}`}};var Che=!!process.env.STATE_isPost;Che||zp("isPost","true");async function Ihe(t,e){if(Che)e&&await e(),await HE("Post cache",async()=>{await Fh.post()});else try{await t()}catch(r){noe(r.message)}}i(Ihe,"run");var dY=R(require("path"),1);var nt=Symbol("NOT_RESOLVED"),y4=Symbol("MERGE_KEY");function Nn(t,e){return{tagName:t,nodeKind:"scalar",implicit:e.implicit??!1,matchByTagPrefix:e.matchByTagPrefix??!1,implicitFirstChars:e.implicitFirstChars??null,resolve:e.resolve,identify:e.identify??null,represent:e.represent??(r=>String(r)),representTagName:e.representTagName??null}}i(Nn,"defineScalarTag");function E4(t,e){let r=e.finalize===void 0;return{tagName:t,nodeKind:"sequence",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addItem:e.addItem,finalize:e.finalize??(n=>n),carrierIsResult:r,identify:e.identify??null,represent:e.represent??(n=>n),representTagName:e.representTagName??null}}i(E4,"defineSequenceTag");function jT(t,e){let r=e.finalize===void 0;return{tagName:t,nodeKind:"mapping",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addPair:e.addPair,has:e.has,keys:e.keys,get:e.get,finalize:e.finalize??(n=>n),carrierIsResult:r,identify:e.identify??null,represent:e.represent??(n=>n),representTagName:e.representTagName??null}}i(jT,"defineMappingTag");var Opt=Nn("tag:yaml.org,2002:str",{resolve:i(t=>t,"resolve"),identify:i(t=>typeof t=="string","identify")}),Mpt=["","~","null","Null","NULL"],Fpt=Nn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:i(t=>Mpt.indexOf(t)!==-1?null:nt,"resolve"),identify:i(t=>t===null,"identify"),represent:i(()=>"null","represent")}),Upt=Nn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:i((t,e)=>t==="null"||e&&t===""?null:nt,"resolve"),identify:i(t=>t===null,"identify"),represent:i(()=>"null","represent")}),qpt=["","~","null","Null","NULL"],Gpt=Nn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:i(t=>qpt.indexOf(t)!==-1?null:nt,"resolve"),identify:i(t=>t===null,"identify"),represent:i(()=>"null","represent")}),Hpt=["true","True","TRUE"],$pt=["false","False","FALSE"],zpt=Nn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:i(t=>Hpt.indexOf(t)!==-1?!0:$pt.indexOf(t)!==-1?!1:nt,"resolve"),identify:i(t=>Object.prototype.toString.call(t)==="[object Boolean]","identify"),represent:i(t=>t?"true":"false","represent")}),Vpt=["true"],Wpt=["false"],Ypt=Nn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:i(t=>Vpt.indexOf(t)!==-1?!0:Wpt.indexOf(t)!==-1?!1:nt,"resolve"),identify:i(t=>Object.prototype.toString.call(t)==="[object Boolean]","identify"),represent:i(t=>t?"true":"false","represent")}),Jpt=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],jpt=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],Kpt=Nn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:i(t=>Jpt.indexOf(t)!==-1?!0:jpt.indexOf(t)!==-1?!1:nt,"resolve"),identify:i(t=>Object.prototype.toString.call(t)==="[object Boolean]","identify"),represent:i(t=>t?"true":"false","represent")}),Xpt=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),Zpt=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function emt(t){let e=t,r=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b")?r*parseInt(e.slice(2),2):e.startsWith("0o")?r*parseInt(e.slice(2),8):e.startsWith("0x")?r*parseInt(e.slice(2),16):r*parseInt(e,10)}i(emt,"parseYamlInteger$2");function tmt(t,e){if(e){if(!Zpt.test(t))return nt}else if(!Xpt.test(t))return nt;let r=emt(t);return Number.isFinite(r)?r:nt}i(tmt,"resolveYamlInteger$2");var Qhe=Nn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:tmt,identify:i(t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,"identify"),represent:i(t=>t.toString(10),"represent")}),rmt=new RegExp("^-?(?:0|[1-9][0-9]*)$"),nmt=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function smt(t){let e=t,r=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b")?r*parseInt(e.slice(2),2):e.startsWith("0o")?r*parseInt(e.slice(2),8):e.startsWith("0x")?r*parseInt(e.slice(2),16):r*parseInt(e,10)}i(smt,"parseYamlInteger$1");function omt(t,e){if(e){if(!nmt.test(t))return nt}else if(!rmt.test(t))return nt;let r=smt(t);return Number.isFinite(r)?r:nt}i(omt,"resolveYamlInteger$1");var imt=Nn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:omt,identify:i(t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,"identify"),represent:i(t=>t.toString(10),"represent")}),amt=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function cmt(t){let e=t.replace(/_/g,""),r=1;if((e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b"))return r*parseInt(e.slice(2),2);if(e.startsWith("0x"))return r*parseInt(e.slice(2),16);if(e.includes(":")){let n=0;for(let s of e.split(":"))n=n*60+Number(s);return r*n}return e!=="0"&&e[0]==="0"?r*parseInt(e,8):r*parseInt(e,10)}i(cmt,"parseYamlInteger");function lmt(t){if(!amt.test(t))return nt;let e=cmt(t);return Number.isFinite(e)?e:nt}i(lmt,"resolveYamlInteger");var m4=Nn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:lmt,identify:i(t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,"identify"),represent:i(t=>t.toString(10),"represent")}),umt=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),dmt=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pmt(t){if(!umt.test(t))return nt;let e=t.toLowerCase(),r=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=r*parseFloat(e);return Number.isFinite(n)||dmt.test(t)?n:nt}i(pmt,"resolveYamlFloat$2");function mmt(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";let e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}i(mmt,"representYamlFloat$2");var _he=Nn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:pmt,identify:i(t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),"identify"),represent:mmt}),fmt=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Amt=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function hmt(t,e){if(e){if(!Amt.test(t))return nt;let n=t.toLowerCase(),s=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return s===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let o=s*parseFloat(n);return Number.isFinite(o)?o:nt}if(!fmt.test(t))return nt;let r=Number(t);return Number.isFinite(r)?r:nt}i(hmt,"resolveYamlFloat$1");function gmt(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";let e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}i(gmt,"representYamlFloat$1");var ymt=Nn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:hmt,identify:i(t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),"identify"),represent:gmt}),Emt=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Cmt=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Imt(t){if(!Emt.test(t))return nt;let e=t.toLowerCase().replace(/_/g,""),r=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=0;if(e.includes(":")){for(let s of e.split(":"))n=n*60+Number(s);n*=r}else n=r*parseFloat(e);return Number.isFinite(n)||Cmt.test(t)?n:nt}i(Imt,"resolveYamlFloat");function wmt(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";let e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}i(wmt,"representYamlFloat");var f4=Nn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Imt,identify:i(t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),"identify"),represent:wmt}),Smt=Nn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:i((t,e)=>t==="<<"||e&&t===""?y4:nt,"resolve")}),xmt=/^[A-Za-z0-9+/]*={0,2}$/;function bmt(t){let e=t.replace(/\s/g,"");if(e.length%4!==0||!xmt.test(e))return nt;let r=atob(e),n=new Uint8Array(r.length);for(let s=0;sObject.prototype.toString.call(t)==="[object Uint8Array]","identify"),represent:Bmt}),Nmt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Tmt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function vmt(t){let e=Nmt.exec(t);if(e===null&&(e=Tmt.exec(t)),e===null)return nt;let r=+e[1],n=+e[2]-1,s=+e[3];if(!e[4]){let d=new Date(Date.UTC(r,n,s));return d.getUTCFullYear()!==r||d.getUTCMonth()!==n||d.getUTCDate()!==s?nt:d}let o=+e[4],a=+e[5],c=+e[6],l=0;if(o>23||a>59||c>59)return nt;if(e[7]){let d=e[7].slice(0,3);for(;d.length<3;)d+="0";l=+d}let u=new Date(Date.UTC(r,n,s,o,a,c,l));if(u.getUTCFullYear()!==r||u.getUTCMonth()!==n||u.getUTCDate()!==s)return nt;if(e[9]){let d=+e[10],p=+(e[11]||0);if(d>23||p>59)return nt;let m=(d*60+p)*6e4;u.setTime(u.getTime()-(e[9]==="-"?-m:m))}return u}i(vmt,"resolveYamlTimestamp");var Pmt=Nn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:vmt,identify:i(t=>t instanceof Date,"identify"),represent:i(t=>t.toISOString(),"represent")}),Qmt=E4("tag:yaml.org,2002:seq",{create:i(()=>[],"create"),addItem:i((t,e)=>{t.push(e)},"addItem"),identify:Array.isArray});function KT(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}i(KT,"isPlainObject");function whe(t,e){let r={};for(let n of e)t[n]!==void 0&&(r[n]=t[n]);return r}i(whe,"pick");var _mt=E4("tag:yaml.org,2002:omap",{create:i(()=>({list:[],seen:new Set}),"create"),addItem:i((t,e)=>{let r;if(e instanceof Map){if(e.size!==1)return"cannot resolve an ordered map item";r=e.keys().next().value}else if(KT(e)){let n=Object.keys(e);if(n.length!==1)return"cannot resolve an ordered map item";r=n[0]}else return"cannot resolve an ordered map item";return t.seen.has(r)?"duplicate key in ordered map":(t.seen.add(r),t.list.push(e),"")},"addItem"),finalize:i(t=>t.list,"finalize")}),Dmt=E4("tag:yaml.org,2002:pairs",{create:i(()=>[],"create"),addItem:i((t,e)=>{if(e instanceof Map)return e.size!==1?"cannot resolve a pairs item":(t.push(e.entries().next().value),"");if(Object.prototype.toString.call(e)!=="[object Object]")return"cannot resolve a pairs item";let r=e,n=Object.keys(r);return n.length!==1?"cannot resolve a pairs item":(t.push([n[0],r[n[0]]]),"")},"addItem")}),kmt=jT("tag:yaml.org,2002:map",{create:i(()=>({}),"create"),identify:KT,represent:i(t=>{let e=new Map;for(let r of Object.keys(t))e.set(r,t[r]);return e},"represent"),addPair:i((t,e,r)=>{if(e!==null&&typeof e=="object")return"object-based map does not support complex keys";let n=String(e);return n==="__proto__"?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,""},"addPair"),has:i((t,e)=>e!==null&&typeof e=="object"?!1:Object.prototype.hasOwnProperty.call(t,String(e)),"has"),keys:i(t=>Object.keys(t),"keys"),get:i((t,e)=>t[String(e)],"get")}),Lmt=jT("tag:yaml.org,2002:set",{create:i(()=>new Set,"create"),identify:i(t=>t instanceof Set,"identify"),represent:i(t=>{let e=new Map;for(let r of t)e.set(r,null);return e},"represent"),addPair:i((t,e,r)=>r!==null?"cannot resolve a set item":(t.add(e),""),"addPair"),has:i((t,e)=>t.has(e),"has"),keys:i(t=>t.keys(),"keys"),get:i(()=>null,"get")});function Omt(){return{scalar:{},sequence:{},mapping:{}}}i(Omt,"createTagDefinitionMap");function Mmt(){return{scalar:[],sequence:[],mapping:[]}}i(Mmt,"createTagDefinitionListMap");function Fmt(t){let e=[];for(let r of t){let n=e.length;for(let s=0;sd.implicitFirstChars===null),c=new Set;for(let d of n)if(d.implicitFirstChars!==null)for(let p of d.implicitFirstChars)c.add(p);let l=new Map;for(let d of c)l.set(d,n.filter(p=>p.implicitFirstChars===null||p.implicitFirstChars.indexOf(d)!==-1));let u=s.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=r,this.implicitScalarTags=n,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=u,this.defaultSequenceTag=s.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=s.mapping["tag:yaml.org,2002:map"],this.exact=s,this.prefix=o}withTags(...e){let r=[];for(let n of e)r=r.concat(n);return new Dhe([...this.tags,...r])}},C4=new XT([Opt,Qmt,kmt]),dhr=new XT([...C4.tags,Upt,Ypt,imt,ymt]),Umt=new XT([...C4.tags,Fpt,zpt,Qhe,_he]),qmt=new XT([...C4.tags,Gpt,Kpt,m4,f4,Pmt,Smt,Rmt,_mt,Dmt,Lmt]),phr=jT("tag:yaml.org,2002:map",{create:i(()=>new Map,"create"),addPair:i((t,e,r)=>(t.set(e,r),""),"addPair"),has:i((t,e)=>t.has(e),"has"),keys:i(t=>t.keys(),"keys"),get:i((t,e)=>t.get(e),"get"),identify:i(t=>t instanceof Map||KT(t),"identify"),represent:i(t=>{if(t instanceof Map)return t;let e=new Map,r=t;for(let n of Object.keys(r))e.set(n,r[n]);return e},"represent")});function She(t){if(Array.isArray(t)){let e=Array.prototype.slice.call(t);for(let r=0;r({}),"create"),identify:KT,represent:i(t=>{let e=new Map;for(let r of Object.keys(t))e.set(r,t[r]);return e},"represent"),addPair:i((t,e,r)=>{let n=She(e);return n===null?"nested arrays are not supported inside keys":(n==="__proto__"?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,"")},"addPair"),has:i((t,e)=>{let r=She(e);return r!==null&&Object.prototype.hasOwnProperty.call(t,r)},"has"),keys:i(t=>Object.keys(t),"keys"),get:i((t,e)=>t[String(e)],"get")}),Gmt={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function c4(t,e,r,n,s){let o="",a="",c=Math.floor(s/2)-1;return n-e>c&&(o=" ... ",e=n-c+o.length),r-n>c&&(a=" ...",r=n+c-a.length),{str:o+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:n-e+o.length}}i(c4,"getLine");function l4(t,e){return" ".repeat(Math.max(e-t.length,0))+t}i(l4,"padStart");function Hmt(t,e){if(!t.buffer)return null;let r={...Gmt,...e},n=/\r?\n|\r|\0/g,s=[0],o=[],a,c=-1;for(;a=n.exec(t.buffer);)o.push(a.index),s.push(a.index+a[0].length),t.position<=a.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);let l="",u=Math.min(t.line+r.linesAfter,o.length).toString().length,d=r.maxLength-(r.indent+u+3);for(let m=1;m<=r.linesBefore&&!(c-m<0);m++){let f=c4(t.buffer,s[c-m],o[c-m],t.position-(s[c]-s[c-m]),d);l=`${" ".repeat(r.indent)}${l4((t.line-m+1).toString(),u)} | ${f.str} +Other caches with similar key:`);for(let c of o?.artifactCaches||[])v(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}i(fut,"printCachesListForDiagnostics");function U3(t,e,r){return Ts(this,void 0,void 0,function*(){let n=new hAe.URL(t),s=aAe(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield oAe(t,e,s):s.concurrentBlobDownloads?yield sAe(t,e,s):yield jN(t,e):yield jN(t,e)})}i(U3,"downloadCache");function yAe(t,e,r){return Ts(this,void 0,void 0,function*(){let n=F3(),s=zA(e,r?.compressionMethod,r?.enableCrossOsArchive),o={key:t,version:s,cacheSize:r?.cacheSize};return yield hI("reserveCache",()=>Ts(this,void 0,void 0,function*(){return n.postJson(yI("caches"),o)}))})}i(yAe,"reserveCache");function AAe(t,e){return`bytes ${t}-${e}/*`}i(AAe,"getContentRange");function Aut(t,e,r,n,s){return Ts(this,void 0,void 0,function*(){v(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${AAe(n,s)}`);let o={"Content-Type":"application/octet-stream","Content-Range":AAe(n,s)},a=yield Ih(`uploadChunk (start: ${n}, end: ${s})`,()=>Ts(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),o)}));if(!YN(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}i(Aut,"uploadChunk");function hut(t,e,r,n){return Ts(this,void 0,void 0,function*(){let s=Ma(r),o=yI(`caches/${e.toString()}`),a=wh.openSync(r,"r"),c=L3(n),l=pq("uploadConcurrency",c.uploadConcurrency),u=pq("uploadChunkSize",c.uploadChunkSize),d=[...new Array(l).keys()];v("Awaiting all uploads");let p=0;try{yield Promise.all(d.map(()=>Ts(this,void 0,void 0,function*(){for(;pwh.createReadStream(r,{fd:a,start:f,end:A,autoClose:!1}).on("error",h=>{throw new Error(`Cache upload failed because file read failed with ${h.message}`)}),f,A)}})))}finally{wh.closeSync(a)}})}i(hut,"uploadFile");function gut(t,e,r){return Ts(this,void 0,void 0,function*(){let n={size:r};return yield hI("commitCache",()=>Ts(this,void 0,void 0,function*(){return t.postJson(yI(`caches/${e.toString()}`),n)}))})}i(gut,"commitCache");function q3(t,e,r,n){return Ts(this,void 0,void 0,function*(){if(L3(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Zfe(r,e,n)}else{let o=F3();v("Upload cache"),yield hut(o,t,e,n),v("Commiting cache");let a=Ma(e);be(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield gut(o,t,a);if(!YN(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);be("Cache saved successfully")}})}i(q3,"saveCache");var phe=R(ohe(),1),Ir=R(Cr(),1),ho=R(Cr(),1),Nm=R(Cr(),1),Tm=R(Cr(),1),vm=R(Cr(),1);var kV=R(Cr(),1),LV=R(Cr(),1),lhe=R(Cr(),1),uhe=R(Cr(),1),dhe=R(Cr(),1);var QV=R(Cr(),1),_V=R(Cr(),1),ihe=R(Cr(),1),ahe=R(Cr(),1),che=R(Cr(),1);var DV=class extends che.MessageType{static{i(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,ahe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,ihe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posOT,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,uhe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,lhe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posyc,"T")},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9}])}create(e){let r={key:"",version:""};return globalThis.Object.defineProperty(r,Tm.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Nm.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posyc,"T")},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"size_bytes",kind:"scalar",T:3},{no:4,name:"version",kind:"scalar",T:9}])}create(e){let r={key:"",sizeBytes:"0",version:""};return globalThis.Object.defineProperty(r,Tm.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Nm.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.posyc,"T")},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"restore_keys",kind:"scalar",repeat:2,T:9},{no:4,name:"version",kind:"scalar",T:9}])}create(e){let r={key:"",restoreKeys:[],version:""};return globalThis.Object.defineProperty(r,Tm.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Nm.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.poszV.fromJson(s,{ignoreUnknownFields:!0}))}FinalizeCacheEntryUpload(e){let r=VV.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.CacheService","FinalizeCacheEntryUpload","application/json",r).then(s=>WV.fromJson(s,{ignoreUnknownFields:!0}))}GetCacheEntryDownloadURL(e){let r=YV.toJson(e,{useProtoFieldName:!0,emitDefaultValues:!1});return this.rpc.request("github.actions.results.api.v1.CacheService","GetCacheEntryDownloadURL","application/json",r).then(s=>JV.fromJson(s,{ignoreUnknownFields:!0}))}};function mhe(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&(xn(r),xn(encodeURIComponent(r)))}catch(e){v(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}i(mhe,"maskSigUrl");function fhe(t){if(typeof t!="object"||t===null){v("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&mhe(t.signed_upload_url),"signed_download_url"in t&&typeof t.signed_download_url=="string"&&mhe(t.signed_download_url)}i(fhe,"maskSecretUrls");var FT=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},jV=class{static{i(this,"CacheServiceClient")}constructor(e,r,n,s){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let o=Mle();this.baseUrl=KN(),r&&(this.maxAttempts=r),n&&(this.baseRetryIntervalMilliseconds=n),s&&(this.retryMultiplier=s),this.httpClient=new so(e,[new VA(o)])}request(e,r,n,s){return FT(this,void 0,void 0,function*(){let o=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;v(`[Request] ${r} ${o}`);let a={"Content-Type":n};try{let{body:c}=yield this.retryableRequest(()=>FT(this,void 0,void 0,function*(){return this.httpClient.post(o,JSON.stringify(s),a)}));return c}catch(c){throw new Error(`Failed to ${r}: ${c.message}`)}})}retryableRequest(e){return FT(this,void 0,void 0,function*(){let r=0,n="",s="";for(;r0&&Ar(`You've hit a rate limit, your rate limit will reset in ${p} seconds`)}throw new AI(`Rate limited: ${n}`)}}catch(c){if(c instanceof SyntaxError&&v(`Raw Body: ${s}`),c instanceof Sm||c instanceof AI)throw c;if(Ch.isNetworkErrorCode(c?.code))throw new Ch(c?.code);o=!0,n=c.message}if(!o)throw new Error(`Received non-retryable error: ${n}`);if(r+1===this.maxAttempts)throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let a=this.getExponentialRetryTimeMilliseconds(r);be(`Attempt ${r+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${a} ms...`),yield this.sleep(a),r++}throw new Error("Request failed")})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[ft.BadGateway,ft.GatewayTimeout,ft.InternalServerError,ft.ServiceUnavailable].includes(e):!1}sleep(e){return FT(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),n=r*this.retryMultiplier;return Math.trunc(Math.random()*(n-r)+r)}};function KV(t){let e=new jV(XN(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new MT(e)}i(KV,"internalCacheTwirpClient");var UT=require("fs"),go=R(require("path"),1);var $l=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},ld=process.platform==="win32";function Rpt(){return $l(this,void 0,void 0,function*(){switch(process.platform){case"win32":{let t=yield Ole(),e=_le;if(t)return{path:t,type:no.GNU};if((0,UT.existsSync)(e))return{path:e,type:no.BSD};break}case"darwin":{let t=yield Es("gtar",!1);return t?{path:t,type:no.GNU}:{path:yield Es("tar",!0),type:no.BSD}}default:break}return{path:yield Es("tar",!0),type:no.GNU}})}i(Rpt,"getTarPath");function Npt(t,e,r){return $l(this,arguments,void 0,function*(n,s,o,a=""){let c=[`"${n.path}"`],l=Vu(s),u="cache.tar",d=Ahe(),p=n.type===no.BSD&&s!==Yn.Gzip&&ld;switch(o){case"create":c.push("--posix","-cf",p?u:l.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"--exclude",p?u:l.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"--files-from",uq);break;case"extract":c.push("-xf",p?u:a.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${go.sep}`,"g"),"/"));break;case"list":c.push("-tf",p?u:a.replace(new RegExp(`\\${go.sep}`,"g"),"/"),"-P");break}if(n.type===no.GNU)switch(process.platform){case"win32":c.push("--force-local");break;case"darwin":c.push("--delay-directory-restore");break}return c})}i(Npt,"getTarArgs");function XV(t,e){return $l(this,arguments,void 0,function*(r,n,s=""){let o,a=yield Rpt(),c=yield Npt(a,r,n,s),l=n!=="create"?yield Tpt(a,r,s):yield vpt(a,r),u=a.type===no.BSD&&r!==Yn.Gzip&&ld;return u&&n!=="create"?o=[[...l].join(" "),[...c].join(" ")]:o=[[...c].join(" "),[...l].join(" ")],u?o:[o.join(" ")]})}i(XV,"getCommands");function Ahe(){var t;return(t=process.env.GITHUB_WORKSPACE)!==null&&t!==void 0?t:process.cwd()}i(Ahe,"getWorkingDirectory");function Tpt(t,e,r){return $l(this,void 0,void 0,function*(){let n=t.type===no.BSD&&e!==Yn.Gzip&&ld;switch(e){case Yn.Zstd:return n?["zstd -d --long=30 --force -o",mC,r.replace(new RegExp(`\\${go.sep}`,"g"),"/")]:["--use-compress-program",ld?'"zstd -d --long=30"':"unzstd --long=30"];case Yn.ZstdWithoutLong:return n?["zstd -d --force -o",mC,r.replace(new RegExp(`\\${go.sep}`,"g"),"/")]:["--use-compress-program",ld?'"zstd -d"':"unzstd"];default:return["-z"]}})}i(Tpt,"getDecompressionProgram");function vpt(t,e){return $l(this,void 0,void 0,function*(){let r=Vu(e),n=t.type===no.BSD&&e!==Yn.Gzip&&ld;switch(e){case Yn.Zstd:return n?["zstd -T0 --long=30 --force -o",r.replace(new RegExp(`\\${go.sep}`,"g"),"/"),mC]:["--use-compress-program",ld?'"zstd -T0 --long=30"':"zstdmt --long=30"];case Yn.ZstdWithoutLong:return n?["zstd -T0 --force -o",r.replace(new RegExp(`\\${go.sep}`,"g"),"/"),mC]:["--use-compress-program",ld?'"zstd -T0"':"zstdmt"];default:return["-z"]}})}i(vpt,"getCompressionProgram");function ZV(t,e){return $l(this,void 0,void 0,function*(){for(let r of t)try{yield Mu(r,void 0,{cwd:e,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(n){throw new Error(`${r.split(" ")[0]} failed with error: ${n?.message}`)}})}i(ZV,"execCommands");function _I(t,e){return $l(this,void 0,void 0,function*(){let r=yield XV(e,"list",t);yield ZV(r)})}i(_I,"listTar");function e4(t,e){return $l(this,void 0,void 0,function*(){let r=Ahe();yield Hp(r);let n=yield XV(e,"extract",t);yield ZV(n)})}i(e4,"extractTar");function t4(t,e,r){return $l(this,void 0,void 0,function*(){(0,UT.writeFileSync)(go.join(t,uq),e.join(` +`));let n=yield XV(r,"create");yield ZV(n,t)})}i(t4,"createTar");var Mh=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},zi=class t extends Error{static{i(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Pm=class t extends Error{static{i(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},r4="cache write denied:",qT=class t extends Pm{static{i(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},hhe=CB,GT=class t extends Error{static{i(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},HT=class t extends Error{static{i(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function ghe(t){if(!t||t.length===0)throw new zi("Path Validation Error: At least one directory or file path is required")}i(ghe,"checkPaths");function n4(t){if(t.length>512)throw new zi(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new zi(`Key Validation Error: ${t} cannot contain commas.`)}i(n4,"checkKey");function s4(){return gI()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}i(s4,"isFeatureAvailable");function yhe(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){let u=gI();v(`Cache service version: ${u}`),ghe(s);let d=M3();if(!lAe(d)){be(`Cache restore skipped: the effective cache-mode '${d}' does not permit reads.`),v(`Skipped restore for paths [${s.join(", ")}] with primary key '${o}'.`);return}return u==="v2"?yield Qpt(s,o,a,c,l):yield Ppt(s,o,a,c,l)})}i(yhe,"restoreCache");function Ppt(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){var u;a=a||[];let d=[o,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new zi("Key Validation Error: Keys are limited to a maximum of 10.");for(let f of d)n4(f);let p=yield hC(),m="";try{let f;try{f=yield gAe(d,s,{compressionMethod:p,enableCrossOsArchive:l})}catch(h){let E=(u=h?.message)!==null&&u!==void 0?u:"";throw E.includes(hhe)?new GT(E):h}if(!f?.archiveLocation)return;if(c?.lookupOnly)return be("Lookup only - skipping download"),f.cacheKey;m=DI.join(yield fC(),Vu(p)),v(`Archive Path: ${m}`),yield U3(f.archiveLocation,m,c),$p()&&(yield _I(m,p));let A=Ma(m);return be(`Cache Size: ~${Math.round(A/(1024*1024))} MB (${A} B)`),yield e4(m,p),be("Cache restored successfully"),f.cacheKey}catch(f){let A=f;if(A.name===zi.name)throw f;A instanceof Fa&&typeof A.statusCode=="number"&&A.statusCode>=500?kA(`Failed to restore: ${f.message}`):Ar(`Failed to restore: ${f.message}`)}finally{try{yield AC(m)}catch(f){v(`Failed to delete archive: ${f}`)}}})}i(Ppt,"restoreCacheV1");function Qpt(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){var u;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let d=[o,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new zi("Key Validation Error: Keys are limited to a maximum of 10.");for(let m of d)n4(m);let p="";try{let m=KV(),f=yield hC(),A={key:o,restoreKeys:a,version:zA(s,f,l)},h;try{h=yield m.GetCacheEntryDownloadURL(A)}catch(w){let x=(u=w?.message)!==null&&u!==void 0?u:"";throw x.includes(hhe)?new GT(x):w}if(!h.ok){v(`Cache not found for version ${A.version} of keys: ${d.join(", ")}`);return}if(A.key!==h.matchedKey?be(`Cache hit for restore-key: ${h.matchedKey}`):be(`Cache hit for: ${h.matchedKey}`),c?.lookupOnly)return be("Lookup only - skipping download"),h.matchedKey;p=DI.join(yield fC(),Vu(f)),v(`Archive path: ${p}`),v(`Starting download of archive to: ${p}`),yield U3(h.signedDownloadUrl,p,c);let C=Ma(p);return be(`Cache Size: ~${Math.round(C/(1024*1024))} MB (${C} B)`),$p()&&(yield _I(p,f)),yield e4(p,f),be("Cache restored successfully"),h.matchedKey}catch(m){let f=m;if(f.name===zi.name)throw m;f instanceof Fa&&typeof f.statusCode=="number"&&f.statusCode>=500?kA(`Failed to restore: ${m.message}`):Ar(`Failed to restore: ${m.message}`)}finally{try{p&&(yield AC(p))}catch(m){v(`Failed to delete archive: ${m}`)}}})}i(Qpt,"restoreCacheV2");function o4(t,e,r){return Mh(this,arguments,void 0,function*(n,s,o,a=!1){let c=gI();v(`Cache service version: ${c}`),ghe(n),n4(s);let l=M3();return uAe(l)?c==="v2"?yield Dpt(n,s,o,a):yield _pt(n,s,o,a):(be(`Cache save skipped: the effective cache-mode '${l}' does not permit writes.`),v(`Skipped save for paths [${n.join(", ")}] with key '${s}'.`),-1)})}i(o4,"saveCache");function _pt(t,e,r){return Mh(this,arguments,void 0,function*(n,s,o,a=!1){var c,l,u,d,p,m;let f=yield hC(),A=-1,h=yield dq(n);if(v("Cache Paths:"),v(`${JSON.stringify(h)}`),h.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let E=yield fC(),C=DI.join(E,Vu(f));v(`Archive Path: ${C}`);try{yield t4(E,h,f),$p()&&(yield _I(C,f));let w=10*1024*1024*1024,x=Ma(C);if(v(`File Size: ${x}`),x>w&&!O3())throw new Error(`Cache size of ~${Math.round(x/(1024*1024))} MB (${x} B) is over the 10GB limit, not saving cache.`);v("Reserving Cache");let b=yield yAe(s,n,{compressionMethod:f,enableCrossOsArchive:a,cacheSize:x});if(!((c=b?.result)===null||c===void 0)&&c.cacheId)A=(l=b?.result)===null||l===void 0?void 0:l.cacheId;else{if(b?.statusCode===400)throw new Error((d=(u=b?.error)===null||u===void 0?void 0:u.message)!==null&&d!==void 0?d:`Cache size of ~${Math.round(x/(1024*1024))} MB (${x} B) is over the data cap limit, not saving cache.`);{let N=(p=b?.error)===null||p===void 0?void 0:p.message;throw N?.startsWith(r4)?new qT(`Unable to reserve cache with key ${s}. More details: ${N}`):new Pm(`Unable to reserve cache with key ${s}, another job may be creating this cache. More details: ${(m=b?.error)===null||m===void 0?void 0:m.message}`)}}v(`Saving Cache (ID: ${A})`),yield q3(A,C,"",o)}catch(w){let x=w;if(x.name===zi.name)throw w;x.name===Pm.name?be(`Failed to save: ${x.message}`):x instanceof Fa&&typeof x.statusCode=="number"&&x.statusCode>=500?kA(`Failed to save: ${x.message}`):Ar(`Failed to save: ${x.message}`)}finally{try{yield AC(C)}catch(w){v(`Failed to delete archive: ${w}`)}}return A})}i(_pt,"saveCacheV1");function Dpt(t,e,r){return Mh(this,arguments,void 0,function*(n,s,o,a=!1){var c;o=Object.assign(Object.assign({},o),{uploadChunkSize:64*1024*1024,uploadConcurrency:8,useAzureSdk:!0});let l=yield hC(),u=KV(),d=-1,p=yield dq(n);if(v("Cache Paths:"),v(`${JSON.stringify(p)}`),p.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let m=yield fC(),f=DI.join(m,Vu(l));v(`Archive Path: ${f}`);try{yield t4(m,p,l),$p()&&(yield _I(f,l));let A=Ma(f);v(`File Size: ${A}`),o.archiveSizeBytes=A,v("Reserving Cache");let h=zA(n,l,a),E={key:s,version:h},C;try{let b=yield u.CreateCacheEntry(E);if(!b.ok)throw b.message&&!b.message.startsWith(r4)&&Ar(`Cache reservation failed: ${b.message}`),new Error(b.message||"Response was not ok");C=b.signedUploadUrl}catch(b){v(`Failed to reserve cache: ${b}`);let N=(c=b?.message)!==null&&c!==void 0?c:"";throw N.startsWith(r4)?new qT(`Unable to reserve cache with key ${s}. More details: ${N}`):new Pm(`Unable to reserve cache with key ${s}, another job may be creating this cache.`)}v(`Attempting to upload cache located at: ${f}`),yield q3(d,f,C,o);let w={key:s,version:h,sizeBytes:`${A}`},x=yield u.FinalizeCacheEntryUpload(w);if(v(`FinalizeCacheEntryUploadResponse: ${x.ok}`),!x.ok)throw x.message?new HT(x.message):new Error(`Unable to finalize cache with key ${s}, another job may be finalizing this cache.`);d=parseInt(x.entryId)}catch(A){let h=A;if(h.name===zi.name)throw A;h.name===Pm.name?be(`Failed to save: ${h.message}`):h.name===HT.name?Ar(h.message):h instanceof Fa&&typeof h.statusCode=="number"&&h.statusCode>=500?kA(`Failed to save: ${h.message}`):Ar(`Failed to save: ${h.message}`)}finally{try{yield AC(f)}catch(A){v(`Failed to delete archive: ${A}`)}}return d})}i(Dpt,"saveCacheV2");var Ehe=R(require("util"),1);var Fh=class t{static{i(this,"Cache")}opts;ghaCacheKey;ghaNoCache;cacheDir;cachePath;static POST_CACHE_KEY="postCache";constructor(e){this.opts=e,this.ghaCacheKey=Ehe.format("%s-%s-%s",this.opts.htcName,this.opts.htcVersion,this.platform()),this.ghaNoCache=this.opts.ghaNoCache,this.cacheDir=a4.default.join(this.opts.baseCacheDir,this.opts.htcVersion,this.platform()),this.cachePath=a4.default.join(this.cacheDir,this.opts.cacheFile),$T.default.existsSync(this.cacheDir)||$T.default.mkdirSync(this.cacheDir,{recursive:!0})}async save(e,r){v(`Cache.save ${e}`);let n=this.copyToCache(e),s=await N2(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform());if(v(`Cache.save cached to hosted tool cache ${s}`),!this.ghaNoCache&&s4())if(r)try{v(`Cache.save caching ${this.ghaCacheKey} to GitHub Actions cache`),await o4([this.cacheDir],this.ghaCacheKey)}catch(o){Ar(`Failed to save cache: ${o}`)}else v(`Cache.save sending ${this.ghaCacheKey} to post state`),zp(t.POST_CACHE_KEY,JSON.stringify({dir:this.cacheDir,key:this.ghaCacheKey}));return n}async find(){try{let e=oae(this.opts.htcName,this.opts.htcVersion,this.platform());if(e)return be(`Restored from hosted tool cache ${e}`),this.copyToCache(`${e}/${this.opts.cacheFile}`);if(!this.ghaNoCache&&s4()){if(v("GitHub Actions cache feature available"),await yhe([this.cacheDir],this.ghaCacheKey))return be(`Restored ${this.ghaCacheKey} from GitHub Actions cache`),e=await N2(this.cacheDir,this.opts.htcName,this.opts.htcVersion,this.platform()),be(`Cached to hosted tool cache ${e}`),this.copyToCache(`${e}/${this.opts.cacheFile}`)}else this.ghaNoCache?be("GitHub Actions cache disabled"):be("GitHub Actions cache feature not available")}catch(e){Ar(`Failed to restore cache: ${e}`)}return""}static async post(){let e=soe(t.POST_CACHE_KEY);if(!e)return be("State not set"),Promise.resolve(void 0);let r;try{r=JSON.parse(e)}catch(n){throw new Error(`Failed to parse cache post state: ${n}`)}if(!r.dir||!r.key)throw new Error(`Invalid cache post state: ${e}`);try{be(`Caching ${r.key} to GitHub Actions cache`),await o4([r.dir],r.key)}catch(n){Ar(`Failed to save cache: ${n}`)}return r}copyToCache(e){return be(`Copying ${e} to ${this.cachePath}`),$T.default.copyFileSync(e,this.cachePath),this.cachePath}platform(){let e=process.config.variables.arm_version;return`${i4.default.platform()}-${i4.default.arch()}${e?"v"+e:""}`}};var Che=!!process.env.STATE_isPost;Che||zp("isPost","true");async function Ihe(t,e){if(Che)e&&await e(),await HE("Post cache",async()=>{await Fh.post()});else try{await t()}catch(r){noe(r.message)}}i(Ihe,"run");var dY=R(require("path"),1);var nt=Symbol("NOT_RESOLVED"),y4=Symbol("MERGE_KEY");function Nn(t,e){return{tagName:t,nodeKind:"scalar",implicit:e.implicit??!1,matchByTagPrefix:e.matchByTagPrefix??!1,implicitFirstChars:e.implicitFirstChars??null,resolve:e.resolve,identify:e.identify??null,represent:e.represent??(r=>String(r)),representTagName:e.representTagName??null}}i(Nn,"defineScalarTag");function E4(t,e){let r=e.finalize===void 0;return{tagName:t,nodeKind:"sequence",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addItem:e.addItem,finalize:e.finalize??(n=>n),carrierIsResult:r,identify:e.identify??null,represent:e.represent??(n=>n),representTagName:e.representTagName??null}}i(E4,"defineSequenceTag");function jT(t,e){let r=e.finalize===void 0;return{tagName:t,nodeKind:"mapping",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addPair:e.addPair,has:e.has,keys:e.keys,get:e.get,finalize:e.finalize??(n=>n),carrierIsResult:r,identify:e.identify??null,represent:e.represent??(n=>n),representTagName:e.representTagName??null}}i(jT,"defineMappingTag");var Opt=Nn("tag:yaml.org,2002:str",{resolve:i(t=>t,"resolve"),identify:i(t=>typeof t=="string","identify")}),Mpt=["","~","null","Null","NULL"],Fpt=Nn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:i(t=>Mpt.indexOf(t)!==-1?null:nt,"resolve"),identify:i(t=>t===null,"identify"),represent:i(()=>"null","represent")}),Upt=Nn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:i((t,e)=>t==="null"||e&&t===""?null:nt,"resolve"),identify:i(t=>t===null,"identify"),represent:i(()=>"null","represent")}),qpt=["","~","null","Null","NULL"],Gpt=Nn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:i(t=>qpt.indexOf(t)!==-1?null:nt,"resolve"),identify:i(t=>t===null,"identify"),represent:i(()=>"null","represent")}),Hpt=["true","True","TRUE"],$pt=["false","False","FALSE"],zpt=Nn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:i(t=>Hpt.indexOf(t)!==-1?!0:$pt.indexOf(t)!==-1?!1:nt,"resolve"),identify:i(t=>Object.prototype.toString.call(t)==="[object Boolean]","identify"),represent:i(t=>t?"true":"false","represent")}),Vpt=["true"],Wpt=["false"],Ypt=Nn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:i(t=>Vpt.indexOf(t)!==-1?!0:Wpt.indexOf(t)!==-1?!1:nt,"resolve"),identify:i(t=>Object.prototype.toString.call(t)==="[object Boolean]","identify"),represent:i(t=>t?"true":"false","represent")}),Jpt=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],jpt=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],Kpt=Nn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:i(t=>Jpt.indexOf(t)!==-1?!0:jpt.indexOf(t)!==-1?!1:nt,"resolve"),identify:i(t=>Object.prototype.toString.call(t)==="[object Boolean]","identify"),represent:i(t=>t?"true":"false","represent")}),Xpt=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),Zpt=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function emt(t){let e=t,r=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b")?r*parseInt(e.slice(2),2):e.startsWith("0o")?r*parseInt(e.slice(2),8):e.startsWith("0x")?r*parseInt(e.slice(2),16):r*parseInt(e,10)}i(emt,"parseYamlInteger$2");function tmt(t,e){if(e){if(!Zpt.test(t))return nt}else if(!Xpt.test(t))return nt;let r=emt(t);return Number.isFinite(r)?r:nt}i(tmt,"resolveYamlInteger$2");var Qhe=Nn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:tmt,identify:i(t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,"identify"),represent:i(t=>t.toString(10),"represent")}),rmt=new RegExp("^-?(?:0|[1-9][0-9]*)$"),nmt=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function smt(t){let e=t,r=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b")?r*parseInt(e.slice(2),2):e.startsWith("0o")?r*parseInt(e.slice(2),8):e.startsWith("0x")?r*parseInt(e.slice(2),16):r*parseInt(e,10)}i(smt,"parseYamlInteger$1");function omt(t,e){if(e){if(!nmt.test(t))return nt}else if(!rmt.test(t))return nt;let r=smt(t);return Number.isFinite(r)?r:nt}i(omt,"resolveYamlInteger$1");var imt=Nn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:omt,identify:i(t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,"identify"),represent:i(t=>t.toString(10),"represent")}),amt=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function cmt(t){let e=t.replace(/_/g,""),r=1;if((e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b"))return r*parseInt(e.slice(2),2);if(e.startsWith("0x"))return r*parseInt(e.slice(2),16);if(e.includes(":")){let n=0;for(let s of e.split(":"))n=n*60+Number(s);return r*n}return e!=="0"&&e[0]==="0"?r*parseInt(e,8):r*parseInt(e,10)}i(cmt,"parseYamlInteger");function lmt(t){if(!amt.test(t))return nt;let e=cmt(t);return Number.isFinite(e)?e:nt}i(lmt,"resolveYamlInteger");var m4=Nn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:lmt,identify:i(t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,"identify"),represent:i(t=>t.toString(10),"represent")}),umt=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),dmt=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pmt(t){if(!umt.test(t))return nt;let e=t.toLowerCase(),r=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=r*parseFloat(e);return Number.isFinite(n)||dmt.test(t)?n:nt}i(pmt,"resolveYamlFloat$2");function mmt(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";let e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}i(mmt,"representYamlFloat$2");var _he=Nn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:pmt,identify:i(t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),"identify"),represent:mmt}),fmt=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Amt=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function hmt(t,e){if(e){if(!Amt.test(t))return nt;let n=t.toLowerCase(),s=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return s===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let o=s*parseFloat(n);return Number.isFinite(o)?o:nt}if(!fmt.test(t))return nt;let r=Number(t);return Number.isFinite(r)?r:nt}i(hmt,"resolveYamlFloat$1");function gmt(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";let e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}i(gmt,"representYamlFloat$1");var ymt=Nn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:hmt,identify:i(t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),"identify"),represent:gmt}),Emt=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Cmt=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Imt(t){if(!Emt.test(t))return nt;let e=t.toLowerCase().replace(/_/g,""),r=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let n=0;if(e.includes(":")){for(let s of e.split(":"))n=n*60+Number(s);n*=r}else n=r*parseFloat(e);return Number.isFinite(n)||Cmt.test(t)?n:nt}i(Imt,"resolveYamlFloat");function wmt(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";let e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}i(wmt,"representYamlFloat");var f4=Nn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Imt,identify:i(t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),"identify"),represent:wmt}),Smt=Nn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:i((t,e)=>t==="<<"||e&&t===""?y4:nt,"resolve")}),xmt=/^[A-Za-z0-9+/]*={0,2}$/;function bmt(t){let e=t.replace(/\s/g,"");if(e.length%4!==0||!xmt.test(e))return nt;let r=atob(e),n=new Uint8Array(r.length);for(let s=0;sObject.prototype.toString.call(t)==="[object Uint8Array]","identify"),represent:Bmt}),Nmt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Tmt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function vmt(t){let e=Nmt.exec(t);if(e===null&&(e=Tmt.exec(t)),e===null)return nt;let r=+e[1],n=+e[2]-1,s=+e[3];if(!e[4]){let d=new Date(Date.UTC(r,n,s));return d.getUTCFullYear()!==r||d.getUTCMonth()!==n||d.getUTCDate()!==s?nt:d}let o=+e[4],a=+e[5],c=+e[6],l=0;if(o>23||a>59||c>59)return nt;if(e[7]){let d=e[7].slice(0,3);for(;d.length<3;)d+="0";l=+d}let u=new Date(Date.UTC(r,n,s,o,a,c,l));if(u.getUTCFullYear()!==r||u.getUTCMonth()!==n||u.getUTCDate()!==s)return nt;if(e[9]){let d=+e[10],p=+(e[11]||0);if(d>23||p>59)return nt;let m=(d*60+p)*6e4;u.setTime(u.getTime()-(e[9]==="-"?-m:m))}return u}i(vmt,"resolveYamlTimestamp");var Pmt=Nn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:vmt,identify:i(t=>t instanceof Date,"identify"),represent:i(t=>t.toISOString(),"represent")}),Qmt=E4("tag:yaml.org,2002:seq",{create:i(()=>[],"create"),addItem:i((t,e)=>{t.push(e)},"addItem"),identify:Array.isArray});function KT(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}i(KT,"isPlainObject");function whe(t,e){let r={};for(let n of e)t[n]!==void 0&&(r[n]=t[n]);return r}i(whe,"pick");var _mt=E4("tag:yaml.org,2002:omap",{create:i(()=>({list:[],seen:new Set}),"create"),addItem:i((t,e)=>{let r;if(e instanceof Map){if(e.size!==1)return"cannot resolve an ordered map item";r=e.keys().next().value}else if(KT(e)){let n=Object.keys(e);if(n.length!==1)return"cannot resolve an ordered map item";r=n[0]}else return"cannot resolve an ordered map item";return t.seen.has(r)?"duplicate key in ordered map":(t.seen.add(r),t.list.push(e),"")},"addItem"),finalize:i(t=>t.list,"finalize")}),Dmt=E4("tag:yaml.org,2002:pairs",{create:i(()=>[],"create"),addItem:i((t,e)=>{if(e instanceof Map)return e.size!==1?"cannot resolve a pairs item":(t.push(e.entries().next().value),"");if(Object.prototype.toString.call(e)!=="[object Object]")return"cannot resolve a pairs item";let r=e,n=Object.keys(r);return n.length!==1?"cannot resolve a pairs item":(t.push([n[0],r[n[0]]]),"")},"addItem")}),kmt=jT("tag:yaml.org,2002:map",{create:i(()=>({}),"create"),identify:KT,represent:i(t=>{let e=new Map;for(let r of Object.keys(t))e.set(r,t[r]);return e},"represent"),addPair:i((t,e,r)=>{if(e!==null&&typeof e=="object")return"object-based map does not support complex keys";let n=String(e);return n==="__proto__"?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,""},"addPair"),has:i((t,e)=>e!==null&&typeof e=="object"?!1:Object.prototype.hasOwnProperty.call(t,String(e)),"has"),keys:i(t=>Object.keys(t),"keys"),get:i((t,e)=>t[String(e)],"get")}),Lmt=jT("tag:yaml.org,2002:set",{create:i(()=>new Set,"create"),identify:i(t=>t instanceof Set,"identify"),represent:i(t=>{let e=new Map;for(let r of t)e.set(r,null);return e},"represent"),addPair:i((t,e,r)=>r!==null?"cannot resolve a set item":(t.add(e),""),"addPair"),has:i((t,e)=>t.has(e),"has"),keys:i(t=>t.keys(),"keys"),get:i(()=>null,"get")});function Omt(){return{scalar:{},sequence:{},mapping:{}}}i(Omt,"createTagDefinitionMap");function Mmt(){return{scalar:[],sequence:[],mapping:[]}}i(Mmt,"createTagDefinitionListMap");function Fmt(t){let e=[];for(let r of t){let n=e.length;for(let s=0;sd.implicitFirstChars===null),c=new Set;for(let d of n)if(d.implicitFirstChars!==null)for(let p of d.implicitFirstChars)c.add(p);let l=new Map;for(let d of c)l.set(d,n.filter(p=>p.implicitFirstChars===null||p.implicitFirstChars.indexOf(d)!==-1));let u=s.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=r,this.implicitScalarTags=n,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=u,this.defaultSequenceTag=s.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=s.mapping["tag:yaml.org,2002:map"],this.exact=s,this.prefix=o}withTags(...e){let r=[];for(let n of e)r=r.concat(n);return new Dhe([...this.tags,...r])}},C4=new XT([Opt,Qmt,kmt]),uhr=new XT([...C4.tags,Upt,Ypt,imt,ymt]),Umt=new XT([...C4.tags,Fpt,zpt,Qhe,_he]),qmt=new XT([...C4.tags,Gpt,Kpt,m4,f4,Pmt,Smt,Rmt,_mt,Dmt,Lmt]),dhr=jT("tag:yaml.org,2002:map",{create:i(()=>new Map,"create"),addPair:i((t,e,r)=>(t.set(e,r),""),"addPair"),has:i((t,e)=>t.has(e),"has"),keys:i(t=>t.keys(),"keys"),get:i((t,e)=>t.get(e),"get"),identify:i(t=>t instanceof Map||KT(t),"identify"),represent:i(t=>{if(t instanceof Map)return t;let e=new Map,r=t;for(let n of Object.keys(r))e.set(n,r[n]);return e},"represent")});function She(t){if(Array.isArray(t)){let e=Array.prototype.slice.call(t);for(let r=0;r({}),"create"),identify:KT,represent:i(t=>{let e=new Map;for(let r of Object.keys(t))e.set(r,t[r]);return e},"represent"),addPair:i((t,e,r)=>{let n=She(e);return n===null?"nested arrays are not supported inside keys":(n==="__proto__"?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,"")},"addPair"),has:i((t,e)=>{let r=She(e);return r!==null&&Object.prototype.hasOwnProperty.call(t,r)},"has"),keys:i(t=>Object.keys(t),"keys"),get:i((t,e)=>t[String(e)],"get")}),Gmt={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function c4(t,e,r,n,s){let o="",a="",c=Math.floor(s/2)-1;return n-e>c&&(o=" ... ",e=n-c+o.length),r-n>c&&(a=" ...",r=n+c-a.length),{str:o+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:n-e+o.length}}i(c4,"getLine");function l4(t,e){return" ".repeat(Math.max(e-t.length,0))+t}i(l4,"padStart");function Hmt(t,e){if(!t.buffer)return null;let r={...Gmt,...e},n=/\r?\n|\r|\0/g,s=[0],o=[],a,c=-1;for(;a=n.exec(t.buffer);)o.push(a.index),s.push(a.index+a[0].length),t.position<=a.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);let l="",u=Math.min(t.line+r.linesAfter,o.length).toString().length,d=r.maxLength-(r.indent+u+3);for(let m=1;m<=r.linesBefore&&!(c-m<0);m++){let f=c4(t.buffer,s[c-m],o[c-m],t.position-(s[c]-s[c-m]),d);l=`${" ".repeat(r.indent)}${l4((t.line-m+1).toString(),u)} | ${f.str} ${l}`}let p=c4(t.buffer,s[c],o[c],t.position,d);l+=`${" ".repeat(r.indent)}${l4((t.line+1).toString(),u)} | ${p.str} `,l+=`${"-".repeat(r.indent+u+3+p.pos)}^ `;for(let m=1;m<=r.linesAfter&&!(c+m>=o.length);m++){let f=c4(t.buffer,s[c+m],o[c+m],t.position-(s[c]-s[c+m]),d);l+=`${" ".repeat(r.indent)}${l4((t.line+m+1).toString(),u)} | ${f.str} @@ -201,12 +201,12 @@ ${t.mark.snippet}`),`${t.reason} ${r}`):t.reason}i(xhe,"formatError");var VT=cla `.repeat(p):u+=` `.repeat(d?1+p:p),u+=h,d=!0,p=0}return s===3?u+=` `.repeat(d?1+p:p):s!==2&&d&&(u+=` -`),u}i(Bhe,"getBlockValue");function Kmt(t,e){if(e.valueStart===$mt)return"";let{valueStart:r,valueEnd:n}=e;if(e.fast)return t.slice(r,n);switch(e.style){case 2:return Jmt(t,r,n);case 3:return jmt(t,r,n);case 4:return Bhe(t,r,n,e.indent,e.chomping,!1);case 5:return Bhe(t,r,n,e.indent,e.chomping,!0);default:return Ymt(t,r,n)}}i(Kmt,"getScalarValue");var Xmt={"!":"!","!!":"tag:yaml.org,2002:"};function Ohe(t,e){if(t.startsWith("!<")&&t.endsWith(">"))return decodeURIComponent(t.slice(2,-1));let r=t.indexOf("!",1),n=r===-1?"!":t.slice(0,r+1),s=e?.[n]??Xmt[n]??n;return decodeURIComponent(s)+decodeURIComponent(t.slice(n.length))}i(Ohe,"tagNameFull");var Uh=-1,w4={filename:"",schema:Umt,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function Zmt(t){return"tagStart"in t&&t.tagStart!==Uh?t.tagStart:"anchorStart"in t&&t.anchorStart!==Uh?t.anchorStart:"valueStart"in t&&t.valueStart!==Uh?t.valueStart:"start"in t?t.start:0}i(Zmt,"eventPosition$1");function _s(t,e){ZT(t.source,t.position,e,t.filename)}i(_s,"throwError$1");function Mhe(t,e,r,n){try{return r.finalize(n)}catch(s){if(s instanceof VT)throw s;ZT(t.source,e,s instanceof Error?s.message:String(s),t.filename)}}i(Mhe,"finalizeCollection");function zT(t,e,r){let n=t[r];if(n)return n;for(let s of e)if(r.startsWith(s.tagName))return s}i(zT,"lookupTag");function eft(t,e,r,n,s){let o=zT(e,r,n);if(o)return o;_s(t,`unknown ${s} tag !<${n}>`)}i(eft,"findExplicitTag");function tft(t,e){let r=Kmt(t.source,e),n=e.tagStart===Uh?"":t.source.slice(e.tagStart,e.tagEnd),s=t.schema.defaultScalarTag;if(n!==""){if(n==="!")return{value:r,tag:s};let o=Ohe(n,t.tagHandlers),a=zT(t.schema.exact.scalar,t.schema.prefix.scalar,o);if(a){let l=a.resolve(r,!0,o);return l===nt&&_s(t,`cannot resolve a node with !<${o}> explicit tag`),{value:l,tag:a}}let c=zT(t.schema.exact.mapping,t.schema.prefix.mapping,o)??zT(t.schema.exact.sequence,t.schema.prefix.sequence,o);if(c){r!==""&&_s(t,`cannot resolve a node with !<${o}> explicit tag`);let l=c.create(o);return{value:c.carrierIsResult?l:Mhe(t,t.position,c,l),tag:c}}_s(t,`unknown scalar tag !<${o}>`)}if(e.style===1){let o=t.schema.implicitScalarByFirstChar.get(r.charAt(0))??t.schema.implicitScalarAnyFirstChar;for(let a of o){let c=a.resolve(r,!1,a.tagName);if(c!==nt)return{value:c,tag:a}}}return{value:s.resolve(r,!1,s.tagName),tag:s}}i(tft,"constructScalar");function Rhe(t,e,r,n,s,o){let a=e.tagStart===Uh?"":t.source.slice(e.tagStart,e.tagEnd),c=a===""||a==="!"?s:Ohe(a,t.tagHandlers);return{tagName:c,tag:eft(t,r,n,c,o)}}i(Rhe,"collectionTag");function Fhe(t){return t.nodeKind==="mapping"}i(Fhe,"isMappingTag");function Nhe(t,e,r,n){for(let s of n.keys(r)){if(t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&_s(t,`merge keys exceeded maxTotalMergeKeys (${t.maxTotalMergeKeys})`),e.tag.has(e.value,s))continue;let o=e.tag.addPair(e.value,s,n.get(r,s));o&&_s(t,o),(e.overridable??=new Set).add(s)}}i(Nhe,"mergeKeys");function rft(t,e,r,n){if(t.position=e.keyPosition,Fhe(n))Nhe(t,e,r,n);else if(n.nodeKind==="sequence"&&Array.isArray(r))for(let s of r)Nhe(t,e,s,e.tag);else _s(t,"cannot merge mappings; the provided source object is unacceptable")}i(rft,"mergeSource");function nft(t,e,r,n,s){if(t.position=e.keyPosition,r===y4){rft(t,e,n,s);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&_s(t,"duplicated mapping key");let o=e.tag.addPair(e.value,r,n);o&&_s(t,o),e.overridable?.delete(r)}i(nft,"addMappingValue");function u4(t,e,r){let n=t.frames[t.frames.length-1];if(n.kind==="document")n.value=e,n.hasValue=!0;else if(n.kind==="sequence"){n.merge&&(Fhe(r)||_s(t,"cannot merge mappings; the provided source object is unacceptable"));let s=n.tag.addItem(n.value,e,n.index++);s&&_s(t,s)}else if(n.hasKey){let s=n.key;n.key=void 0,n.hasKey=!1,nft(t,n,s,e,r)}else n.key=e,n.keyPosition=t.position,n.hasKey=!0}i(u4,"addValue");function d4(t,e,r,n,s){if(e.anchorStart!==Uh){let o={value:r,tag:n,isValueFinal:s};return t.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),o),o}return null}i(d4,"storeAnchor");function sft(t,e){let r={...w4,...e,events:t,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;r.eventIndexr.maxAliases&&_s(r,`aliases exceeded maxAliases (${r.maxAliases})`);let s=r.source.slice(n.anchorStart,n.anchorEnd),o=r.anchors.get(s);o||_s(r,`unidentified alias "${s}"`),o.isValueFinal||_s(r,`recursive alias "${s}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),u4(r,o.value,o.tag);break}case 6:{let s=r.frames.pop();if(s.kind==="document")r.documents.push(s.value);else{let o=s.tag.carrierIsResult?s.value:Mhe(r,s.position,s.tag,s.value);s.anchor&&(s.anchor.value=o,s.anchor.isValueFinal=!0),u4(r,o,s.tag)}break}}}return r.documents}i(sft,"constructFromEvents");var Je=-1,Uhe=Object.prototype.hasOwnProperty,ud=1,A4=2,qhe=3,YT=4,oft=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ift=/[,\[\]{}]/,Ghe=/^(?:!|!!|![0-9A-Za-z-]+!)$/,h4=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,Hhe=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,aft=new RegExp(`^(?:${h4})*$`),cft=new RegExp(`^(?:${Hhe})+$`),lft=new RegExp(`^(?:!(?:${h4})*|${Hhe}(?:${h4})*)$`),S4={filename:"",maxDepth:100};function uft(t,e,r){t.events.push({type:1,explicitStart:e,explicitEnd:r,directives:t.directives})}i(uft,"addDocumentEvent");function $he(t,e,r,n,s,o,a){t.events.push({type:2,start:e,anchorStart:r,anchorEnd:n,tagStart:s,tagEnd:o,style:a})}i($he,"addSequenceEvent");function kI(t,e,r,n,s,o,a){t.events.push({type:3,start:e,anchorStart:r,anchorEnd:n,tagStart:s,tagEnd:o,style:a})}i(kI,"addMappingEvent");function Gh(t,e,r,n,s,o,a,c,l=1,u=-1,d=!1){t.events.push({type:4,valueStart:e,valueEnd:r,anchorStart:n,anchorEnd:s,tagStart:o,tagEnd:a,style:c,chomping:l,indent:u,fast:d})}i(Gh,"addScalarEvent");function dft(t,e,r){t.events.push({type:5,anchorStart:e,anchorEnd:r})}i(dft,"addAliasEvent");function qh(t){t.events.push({type:6})}i(qh,"addPopEvent");function Qs(t){Gh(t,Je,Je,Je,Je,Je,Je,1)}i(Qs,"addEmptyScalarEvent");function The(){return{anchorStart:Je,anchorEnd:Je,tagStart:Je,tagEnd:Je}}i(The,"emptyProperties");function LI(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,eventsLength:t.events.length}}i(LI,"snapshotState");function dd(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.events.length=e.eventsLength}i(dd,"restoreState");function de(t,e){ZT(t.input.slice(0,t.length),t.position,e,t.filename)}i(de,"throwError");function Zr(t){return t===10||t===13}i(Zr,"isEol");function _m(t){return t===9||t===32}i(_m,"isWhiteSpace");function Vi(t){return _m(t)||Zr(t)}i(Vi,"isWsOrEol");function zl(t){return t===0||Vi(t)}i(zl,"isWsOrEolOrEnd");function Dm(t){return t===44||t===91||t===93||t===123||t===125}i(Dm,"isFlowIndicator");function pft(t){return t>=48&&t<=57?t-48:-1}i(pft,"fromDecimalCode");function mft(t){if(t>=48&&t<=57)return t-48;let e=t|32;return e>=97&&e<=102?e-97+10:-1}i(mft,"fromHexCode");function fft(t){return t===120?2:t===117?4:t===85?8:0}i(fft,"escapedHexLen");function Aft(t){return t===48||t===97||t===98||t===116||t===9||t===110||t===118||t===102||t===114||t===101||t===32||t===34||t===47||t===92||t===78||t===95||t===76||t===80}i(Aft,"isSimpleEscape");function JT(t){t.input.charCodeAt(t.position)===10?t.position++:(t.position++,t.input.charCodeAt(t.position)===10&&t.position++),t.line++,t.lineStart=t.position,t.lineIndent=0,t.firstTabInLine=-1}i(JT,"consumeLineBreak");function ts(t,e){let r=0,n=t.input.charCodeAt(t.position),s=t.position===t.lineStart||Vi(t.input.charCodeAt(t.position-1));for(;n!==0;){for(;_m(n);)s=!0,n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&s&&n===35)do n=t.input.charCodeAt(++t.position);while(!Zr(n)&&n!==0);if(!Zr(n))break;for(JT(t),r++,s=!0,n=t.input.charCodeAt(t.position);n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return r}i(ts,"skipSeparationSpace");function pd(t,e=t.position){let r=t.input.charCodeAt(e);if((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)){let n=t.input.charCodeAt(e+3);return n===0||Vi(n)}return!1}i(pd,"testDocumentSeparator");function vhe(t){let e=t.input.charCodeAt(t.position);for(;e!==0&&!Zr(e);)e=t.input.charCodeAt(++t.position)}i(vhe,"skipUntilLineEnd");function zhe(t,e,r){oft.test(t.input.slice(e,r))&&de(t,"the stream contains non-printable characters")}i(zhe,"checkPrintable");function hft(t,e,r){if(t.input.charCodeAt(t.position)!==33)return!1;e.tagStart!==Je&&de(t,"duplication of a tag property");let n=t.position,s=!1,o=!1,a="!",c=t.input.charCodeAt(++t.position);c===60?(s=!0,c=t.input.charCodeAt(++t.position)):c===33&&(o=!0,a="!!",c=t.input.charCodeAt(++t.position));let l=t.position,u;if(s){for(;c!==0&&c!==62;)c=t.input.charCodeAt(++t.position);c!==62&&de(t,"unexpected end of the stream within a verbatim tag"),u=t.input.slice(l,t.position),t.position++}else{for(;c!==0&&!Vi(c)&&!(r&&Dm(c));)c===33&&(o?de(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(l-1,t.position+1),Ghe.test(a)||de(t,"named tag handle cannot contain such characters"),o=!0,l=t.position+1)),c=t.input.charCodeAt(++t.position);u=t.input.slice(l,t.position),ift.test(u)&&de(t,"tag suffix cannot contain flow indicator characters")}return u&&!(s?aft.test(u):cft.test(u))&&de(t,`tag name cannot contain such characters: ${u}`),!s&&a!=="!"&&a!=="!!"&&!Uhe.call(t.tagHandlers,a)&&de(t,`undeclared tag handle "${a}"`),e.tagStart=n,e.tagEnd=t.position,!0}i(hft,"readTagProperty");function gft(t,e){if(t.input.charCodeAt(t.position)!==38)return!1;e.anchorStart!==Je&&de(t,"duplication of an anchor property"),t.position++;let r=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position))&&!Dm(t.input.charCodeAt(t.position));)t.position++;return t.position===r&&de(t,"name of an anchor node must contain at least one character"),e.anchorStart=r,e.anchorEnd=t.position,!0}i(gft,"readAnchorProperty");function yft(t,e){if(t.input.charCodeAt(t.position)!==42)return!1;(e.anchorStart!==Je||e.tagStart!==Je)&&de(t,"alias node should not have any properties"),t.position++;let r=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position))&&!Dm(t.input.charCodeAt(t.position));)t.position++;return t.position===r&&de(t,"name of an alias node must contain at least one character"),dft(t,r,t.position),!0}i(yft,"readAlias");function g4(t,e){ts(t,!1),t.lineIndent0;)t.position++,mft(t.input.charCodeAt(t.position))<0&&de(t,"expected hexadecimal character");t.position++}}else Zr(o)?(s=!1,g4(t,e)):t.position===t.lineStart&&pd(t)?de(t,"unexpected end of the document within a double quoted scalar"):o!==9&&o<32?de(t,"expected valid JSON character"):t.position++}de(t,"unexpected end of the stream within a double quoted scalar")}i(Cft,"readDoubleQuotedScalar");function Ift(t,e,r){let n=t.input.charCodeAt(t.position),s=1,o=-1,a=!1;if(n!==124&&n!==62)return!1;let c=n===124?4:5;for(t.position++;t.input.charCodeAt(t.position)!==0;){let f=t.input.charCodeAt(t.position),A=pft(f);if(f===43||f===45)s!==1&&de(t,"repeat of a chomping mode identifier"),s=f===43?3:2,t.position++;else if(A>=0)A===0&&de(t,"bad explicit indentation width of a block scalar; it cannot be less than one"),a&&de(t,"repeat of an indentation width identifier"),o=e+A-1,a=!0,t.position++;else break}let l=!1;for(;_m(t.input.charCodeAt(t.position));)l=!0,t.position++;l&&t.input.charCodeAt(t.position)===35&&vhe(t),Zr(t.input.charCodeAt(t.position))?JT(t):t.input.charCodeAt(t.position)!==0&&de(t,"a line break is expected");let u=a?o:-1,d=0,p=t.position,m=t.position;for(;t.input.charCodeAt(t.position)!==0;){let f=t.position,A=0;for(;t.input.charCodeAt(f+A)===32;)A++;let h=t.input.charCodeAt(f+A);if(h===0){u>=0?A>u&&(m=f+A):A>0&&(m=f+A);break}if(f===t.lineStart&&pd(t,f))break;if(!a&&u===-1&&Zr(h)&&(d=Math.max(d,A)),!a&&u===-1&&!Zr(h)&&(h===9&&A=e){l=!0,a=t.input.charCodeAt(t.position);continue}t.position=u,t.line=d,t.lineStart=p,t.lineIndent=m;break}}_m(a)||(o=t.position+1),a=t.input.charCodeAt(++t.position)}return o===s?!1:(zhe(t,s,o),Gh(t,s,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1,1,-1,!l),!0)}i(Sft,"readPlainScalar");function Qm(t,e){let r=t.line;ts(t,!0),(t.line>r&&t.lineIndent0;if(t.firstTabInLine!==-1&&t.input.charCodeAt(t.position)===45&&zl(t.input.charCodeAt(t.position+1))&&de(t,"bad indentation of a sequence entry"),s&&t.lineIndent<=e?Qs(t):Vl(t,e,qhe,!1,!0),ts(t,!0),t.lineIndent=t.length)break;t.lineIndent>e&&de(t,"bad indentation of a sequence entry"),t.line===n&&t.input.charCodeAt(t.position)===45&&zl(t.input.charCodeAt(t.position+1))&&de(t,"bad indentation of a sequence entry")}return qh(t),!0}i(Phe,"readBlockSequence");function p4(t,e,r,n){let s=!1,o=!1,a=!1,c=!1;if(t.firstTabInLine!==-1)return!1;let l=t.input.charCodeAt(t.position);for(;l!==0;){!s&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,de(t,"tab characters must not be used in indentation"));let u=t.input.charCodeAt(t.position+1),d=t.line;if((l===63||l===58)&&zl(u))a||(kI(t,t.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1),a=!0),l===63?(s&&Qs(t),o=!0,s=!0):(s||(Qs(t),o=!0),s=!1),t.position+=1,c=!0;else{s&&(Qs(t),s=!1);let p=LI(t);if(!Vl(t,r,A4,!1,!0))break;if(t.line===d){for(l=t.input.charCodeAt(t.position);_m(l);)l=t.input.charCodeAt(++t.position);if(l===58){if(l=t.input.charCodeAt(++t.position),zl(l)||de(t,"a whitespace character is expected after the key-value separator within a block mapping"),!a){for(dd(t,p),kI(t,p.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1),a=!0,Vl(t,r,A4,!1,!0),l=t.input.charCodeAt(t.position);_m(l);)l=t.input.charCodeAt(++t.position);t.position++}o=!0,s=!1,c=!1}else if(o)de(t,"expected ':' after a mapping key");else return n.anchorStart!==Je||n.tagStart!==Je?(dd(t,p),!1):!0}else if(o)de(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return n.anchorStart!==Je||n.tagStart!==Je?(dd(t,p),!1):!0}if(Vl(t,e,YT,!0,c)&&(c=!1),s||c&&(Qs(t),c=!1),ts(t,!0),l=t.input.charCodeAt(t.position),(t.line===d||t.lineIndent>e)&&l!==0)de(t,"bad indentation of a mapping entry");else if(t.lineIndent=t.maxDepth&&de(t,`nesting exceeded maxDepth (${t.maxDepth})`),t.depth++;let a=1,c=!1,l=!1,u=null,d=The(),p=r===YT||r===qhe,m=p,f=p;if(n&&ts(t,!0)&&(c=!0,t.lineIndent>e?a=1:t.lineIndent===e?a=0:a=-1),t.position===t.lineStart&&pd(t))return t.depth--,!1;if(a===1)for(;;){let A=t.input.charCodeAt(t.position),h=LI(t);if(c&&a!==1&&(A===33||A===38))break;if(c&&f&&(d.tagStart!==Je||d.anchorStart!==Je)&&(A===33||A===38)){let E=LI(t),C=e+1;if(p4(t,t.position-t.lineStart,C,d)&&t.events[E.eventsLength]?.type===3)return t.depth--,!0;dd(t,E)}if(c&&(A===33&&d.tagStart!==Je||A===38&&d.anchorStart!==Je)||!hft(t,d,r===ud)&&!gft(t,d))break;u===null&&(u=h),ts(t,!0)?(c=!0,m=f,t.lineIndent>e?a=1:t.lineIndent===e?a=0:a=-1):m=!1}if(m&&(m=c||s),a===1||r===YT){let A=r===ud||r===A4?e:e+1,h=t.position-t.lineStart;if(a===1)if(m&&(Phe(t,h,d)||p4(t,h,A,d))||xft(t,A,d))l=!0;else{let E=t.input.charCodeAt(t.position);if(u!==null&&o&&f&&!m&&E!==124&&E!==62){let C=LI(t),w=u.position-u.lineStart;dd(t,u),p4(t,w,A,The())&&t.events[C.eventsLength]?.type===3?l=!0:dd(t,C)}!l&&(p&&Ift(t,A,d)||Eft(t,A,d)||Cft(t,A,d)||yft(t,d)||Sft(t,A,r,d))&&(l=!0)}else a===0&&(l=m&&Phe(t,h,d))}return p=p&&!l,!l&&(d.anchorStart!==Je||d.tagStart!==Je||p)&&(Gh(t,Je,Je,d.anchorStart,d.anchorEnd,d.tagStart,d.tagEnd,1),l=!0),t.depth--,l||d.anchorStart!==Je||d.tagStart!==Je}i(Vl,"parseNode");function bft(t){if(t.lineIndent>0||t.input.charCodeAt(t.position)!==37)return!1;t.position++;let e=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position));)t.position++;let r=t.input.slice(e,t.position),n=[];for(r.length===0&&de(t,"directive name must not be less than one character in length");t.input.charCodeAt(t.position)!==0&&!Zr(t.input.charCodeAt(t.position));){for(;_m(t.input.charCodeAt(t.position));)t.position++;if(t.input.charCodeAt(t.position)===35||Zr(t.input.charCodeAt(t.position))||t.input.charCodeAt(t.position)===0)break;let s=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position));)t.position++;n.push(t.input.slice(s,t.position))}if(Zr(t.input.charCodeAt(t.position))&&JT(t),r==="YAML"){t.directives.some(o=>o.kind==="yaml")&&de(t,"duplication of %YAML directive"),n.length!==1&&de(t,"YAML directive accepts exactly one argument");let s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);s===null&&de(t,"ill-formed argument of the YAML directive"),parseInt(s[1],10)!==1&&de(t,"unacceptable YAML version of the document"),t.directives.push({kind:"yaml",version:n[0]})}else if(r==="TAG"){n.length!==2&&de(t,"TAG directive accepts exactly two arguments");let[s,o]=n;Ghe.test(s)||de(t,"ill-formed tag handle (first argument) of the TAG directive"),Uhe.call(t.tagHandlers,s)&&de(t,`there is a previously declared suffix for "${s}" tag handle`),lft.test(o)||de(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagHandlers[s]=o,t.directives.push({kind:"tag",handle:s,prefix:o})}return!0}i(bft,"readDirective");function Bft(t){t.directives=[],t.tagHandlers=Object.create(null);let e=!1;for(ts(t,!0);bft(t);)e=!0,ts(t,!0);let r=!1,n=!1,s=!0;if(t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45&&zl(t.input.charCodeAt(t.position+3))){r=!0;let c=t.line;t.position+=3,ts(t,!0),s=t.line>c}else e&&de(t,"directives end mark is expected");let o=t.events.length;if(!r&&t.position===t.lineStart&&t.input.charCodeAt(t.position)===46&&pd(t)){t.position+=3,ts(t,!0);return}if(uft(t,r,!1),Vl(t,t.lineIndent-1,YT,!1,s,s)||Qs(t),ts(t,!0),t.position===t.lineStart&&pd(t)&&(n=t.input.charCodeAt(t.position)===46,n)){let c=t.line;t.position+=3,ts(t,!0),t.line===c&&t.position=n.length));){let o=n.position;Bft(n),n.position===o&&de(n,"can not read a document")}return n.events}i(Rft,"parseEvents");var Nft={...S4,...w4};function Tft(t,e={}){let r={...Nft,...e},n=String(t),s=Object.keys(S4),o=Object.keys(w4);return sft(Rft(n,whe(r,s)),{...whe(r,o),source:n})}i(Tft,"loadDocuments");function Vhe(t,e){let r=Tft(t,e);if(r.length===0)throw new VT("expected a document, but the input is empty");if(r.length===1)return r[0];throw new VT("expected a single document in the stream, but found more")}i(Vhe,"load");var rs={};rs[0]="\\0";rs[7]="\\a";rs[8]="\\b";rs[9]="\\t";rs[10]="\\n";rs[11]="\\v";rs[12]="\\f";rs[13]="\\r";rs[27]="\\e";rs[34]='\\"';rs[92]="\\\\";rs[133]="\\N";rs[160]="\\_";rs[8232]="\\L";rs[8233]="\\P";var vft={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};var Pft=qmt.withTags({...m4,resolve:i((t,e,r)=>{let n=m4.resolve(t,e,r);return n===nt?Qhe.resolve(t,e,r):n},"resolve")},{...f4,resolve:i((t,e,r)=>{let n=f4.resolve(t,e,r);return n===nt?_he.resolve(t,e,r):n},"resolve")}),fhr={...vft,schema:Pft,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:i(()=>{},"transform")};var ai=R(require("fs"),1),ks=R(require("path"),1);var ewe=R(Oye(),1);var pv=class t{static{i(this,"Git")}static protoRegexp=new RegExp("^[a-zA-Z0-9]+://");static supportedProtos={http:{},https:{},ssh:{},git:{}};static parseURL(e){let r=e.match(t.protoRegexp);if(r&&r.length>0){let n=r[0].toLowerCase();if(n=n.slice(0,n.lastIndexOf("://")),!(n in t.supportedProtos))throw new Error(`Invalid protocol: ${n}`);return t.fromURL(new URL(e))}throw new Error("Unknown protocol")}static fromURL(e){let r=new URL(e.toString());r.hash="";let n;return(e.username||e.password)&&(n={username:e.username,password:e.password,passwordSet:e.password!==""}),{scheme:e.protocol.slice(0,-1),user:n,host:`${e.hostname}${e.port?":"+e.port:""}`,path:e.pathname,fragment:t.splitGitFragment(e.hash),remote:r.toString()}}static splitGitFragment(e){if(e==="")return;let[r,n]=e.slice(1).split(":");return{ref:r,subdir:n}}static parseRef(e){let r={},n;if(e.startsWith("./")||e.startsWith("../"))throw new Error("Invalid argument");if(e.startsWith("github.com/"))r.indistinguishableFromLocal=!0,n=t.fromURL(new URL("https://"+e));else if(n=t.parseURL(e),["http","git"].includes(n.scheme)&&(r.unencryptedTCP=!0),["http","https"].includes(n.scheme)&&!n.path.endsWith(".git"))throw new Error("Invalid argument");r.remote=n.remote,r.indistinguishableFromLocal&&(r.remote=r.remote.split("://")[1]),n.fragment&&(r.commit=n.fragment.ref,r.subDir=n.fragment.subdir);let s=r.remote.split("/");return r.shortName=s[s.length-1].replace(".git",""),r}};var zW=R(require("fs"),1),rIe=R(require("os"),1),sw=R(require("path"),1);var J4=R(require("fs"),1),rEe=R(require("os"),1),nEe=R(require("path"),1),sEe=R(tEe(),1);var Av=class t{static{i(this,"Context")}static _tmpDir=J4.default.mkdtempSync(nEe.default.join(t.ensureDirExists(process.env.RUNNER_TEMP||rEe.default.tmpdir()),"docker-actions-toolkit-"));static ensureDirExists(e){return J4.default.mkdirSync(e,{recursive:!0}),e}static tmpDir(){return t._tmpDir}static tmpName(e){return sEe.tmpNameSync(e)}};var Yl=class{static{i(this,"Exec")}static async exec(e,r,n){return v(`Exec.exec: ${e} ${r?.join(" ")}`),Mu(e,r,n)}static async getExecOutput(e,r,n){return v(`Exec.getExecOutput: ${e} ${r?.join(" ")}`),qE(e,r,n)}};var $W=R(require("crypto"),1),eIe=R(require("fs"),1),nw=R(require("path"),1),tIe=R(YCe(),1);var Ve=class t extends Error{static{i(this,"CsvError")}constructor(e,r,n,...s){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let o of s)for(let a in o){let c=o[a];this[a]=Buffer.isBuffer(c)?c.toString(n.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var rw=i(function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},"is_object");var Zv=i(function(t){let e=[];for(let r=0,n=t.length;r=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},HW=GW;var JCe=i(function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,s)=>{let o=Buffer.from(String.fromCharCode(s),t.encoding);return s!==63&&o.length===1&&o[0]===63||n.push(o),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new HW(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter?t.delimiter.map(n=>n.length):[],t.delimiter_auto?1:0,t.quote!==null?t.quote.length:0,...e.map(n=>n.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new HW(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(n=>n.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:r}},"init_state");var jCe=i(function(t){return t.replace(/([A-Z])/g,function(e,r){return"_"+r.toLowerCase()})},"underscore");var ng=i(function(t){let e={};for(let n in t)e[jCe(n)]=t[n];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new Ve("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new Ve("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new Ve("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(n){let s=Date.parse(n);return isNaN(s)?n:new Date(s)};else if(typeof e.cast_date!="function")throw new Ve("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=Zv(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new Ve("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new Ve("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new Ve("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new Ve("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new Ve("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!rw(e.delimiter_auto))throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!rw(e.delimiter_auto.preferred))throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(n,s)=>(n.total-n.std)*(s.preferred[n.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let r=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(n){if(typeof n=="string"&&(n=Buffer.from(n,e.encoding)),!Buffer.isBuffer(n)||n.length===0)throw new Ve("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${r}`],e);return n}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(t.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(t.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(t.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new Ve("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new Ve("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new Ve("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(n,s){if(typeof n!="string"&&!Buffer.isBuffer(n))throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${s},`,`got ${JSON.stringify(n)}`],e);if(n.length===0)throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${s},`,`got ${JSON.stringify(n)}`],e);return typeof n=="string"&&(n=Buffer.from(n,e.encoding)),n}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&t.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&t.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(t.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(t.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(t.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`);return e},"normalize_options");var KCe=i(function(t,e){e||({delimiter_auto:e}=ng({delimiter_auto:!0})),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)&&(t=(s=>{let o=[],a=eP({delimiter:[]}),c=i(d=>o.push(d),"push"),l=i(()=>{},"close"),u=a.parse(s,!0,c,l);if(u!==void 0)throw u;return o})(t));let r=Array(127).fill().map(()=>({lines:[]}));t.map(([s],o)=>{for(let a=0,c=s.length;a{s.char_code=o,s.std=KCt(s.lines),s.total=s.lines.reduce((a,c)=>a+c,0),s.preferred=!!e.preferred[o],s.score=e.score(s,e)});let n=r.reduce((s,o)=>s.score>o.score?s:o,{});return String.fromCharCode(n.char_code)},"delimiter_discover"),KCt=i(function(t){let e=t.length;if(e===0)return 0;let r=t.reduce((n,s)=>n+s)/e;return Math.sqrt(t.map(n=>Math.pow(n-r,2)).reduce((n,s)=>n+s)/e)},"std");var XCe=i(function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},"isRecordEmpty"),XCt=13,ZCt=10,sg={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},eP=i(function(t={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},r=ng(t);return{info:e,original_options:t,options:r,state:JCe(r),__needMoreData:i(function(n,s,o){if(o)return!1;let{encoding:a,escape:c,quote:l}=this.options,{quoting:u,needMoreDataSize:d,recordDelimiterMaxLength:p}=this.state,m=s-n-1,f=Math.max(d,p===0?Buffer.from(`\r +`),u}i(Bhe,"getBlockValue");function Kmt(t,e){if(e.valueStart===$mt)return"";let{valueStart:r,valueEnd:n}=e;if(e.fast)return t.slice(r,n);switch(e.style){case 2:return Jmt(t,r,n);case 3:return jmt(t,r,n);case 4:return Bhe(t,r,n,e.indent,e.chomping,!1);case 5:return Bhe(t,r,n,e.indent,e.chomping,!0);default:return Ymt(t,r,n)}}i(Kmt,"getScalarValue");var Xmt={"!":"!","!!":"tag:yaml.org,2002:"};function Ohe(t,e){if(t.startsWith("!<")&&t.endsWith(">"))return decodeURIComponent(t.slice(2,-1));let r=t.indexOf("!",1),n=r===-1?"!":t.slice(0,r+1),s=e?.[n]??Xmt[n]??n;return decodeURIComponent(s)+decodeURIComponent(t.slice(n.length))}i(Ohe,"tagNameFull");var Uh=-1,w4={filename:"",schema:Umt,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function Zmt(t){return"tagStart"in t&&t.tagStart!==Uh?t.tagStart:"anchorStart"in t&&t.anchorStart!==Uh?t.anchorStart:"valueStart"in t&&t.valueStart!==Uh?t.valueStart:"start"in t?t.start:0}i(Zmt,"eventPosition$1");function _s(t,e){ZT(t.source,t.position,e,t.filename)}i(_s,"throwError$1");function Mhe(t,e,r,n){try{return r.finalize(n)}catch(s){if(s instanceof VT)throw s;ZT(t.source,e,s instanceof Error?s.message:String(s),t.filename)}}i(Mhe,"finalizeCollection");function zT(t,e,r){let n=t[r];if(n)return n;for(let s of e)if(r.startsWith(s.tagName))return s}i(zT,"lookupTag");function eft(t,e,r,n,s){let o=zT(e,r,n);if(o)return o;_s(t,`unknown ${s} tag !<${n}>`)}i(eft,"findExplicitTag");function tft(t,e){let r=Kmt(t.source,e),n=e.tagStart===Uh?"":t.source.slice(e.tagStart,e.tagEnd),s=t.schema.defaultScalarTag;if(n!==""){if(n==="!")return{value:r,tag:s};let o=Ohe(n,t.tagHandlers),a=zT(t.schema.exact.scalar,t.schema.prefix.scalar,o);if(a){let l=a.resolve(r,!0,o);return l===nt&&_s(t,`cannot resolve a node with !<${o}> explicit tag`),{value:l,tag:a}}let c=zT(t.schema.exact.mapping,t.schema.prefix.mapping,o)??zT(t.schema.exact.sequence,t.schema.prefix.sequence,o);if(c){r!==""&&_s(t,`cannot resolve a node with !<${o}> explicit tag`);let l=c.create(o);return{value:c.carrierIsResult?l:Mhe(t,t.position,c,l),tag:c}}_s(t,`unknown scalar tag !<${o}>`)}if(e.style===1){let o=t.schema.implicitScalarByFirstChar.get(r.charAt(0))??t.schema.implicitScalarAnyFirstChar;for(let a of o){let c=a.resolve(r,!1,a.tagName);if(c!==nt)return{value:c,tag:a}}}return{value:s.resolve(r,!1,s.tagName),tag:s}}i(tft,"constructScalar");function Rhe(t,e,r,n,s,o){let a=e.tagStart===Uh?"":t.source.slice(e.tagStart,e.tagEnd),c=a===""||a==="!"?s:Ohe(a,t.tagHandlers);return{tagName:c,tag:eft(t,r,n,c,o)}}i(Rhe,"collectionTag");function Fhe(t){return t.nodeKind==="mapping"}i(Fhe,"isMappingTag");function Nhe(t,e,r,n){for(let s of n.keys(r)){if(t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&_s(t,`merge keys exceeded maxTotalMergeKeys (${t.maxTotalMergeKeys})`),e.tag.has(e.value,s))continue;let o=e.tag.addPair(e.value,s,n.get(r,s));o&&_s(t,o),(e.overridable??=new Set).add(s)}}i(Nhe,"mergeKeys");function rft(t,e,r,n){if(t.position=e.keyPosition,Fhe(n))Nhe(t,e,r,n);else if(n.nodeKind==="sequence"&&Array.isArray(r))for(let s of r)Nhe(t,e,s,e.tag);else _s(t,"cannot merge mappings; the provided source object is unacceptable")}i(rft,"mergeSource");function nft(t,e,r,n,s){if(t.position=e.keyPosition,r===y4){rft(t,e,n,s);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&_s(t,"duplicated mapping key");let o=e.tag.addPair(e.value,r,n);o&&_s(t,o),e.overridable?.delete(r)}i(nft,"addMappingValue");function u4(t,e,r){let n=t.frames[t.frames.length-1];if(n.kind==="document")n.value=e,n.hasValue=!0;else if(n.kind==="sequence"){n.merge&&(Fhe(r)||_s(t,"cannot merge mappings; the provided source object is unacceptable"));let s=n.tag.addItem(n.value,e,n.index++);s&&_s(t,s)}else if(n.hasKey){let s=n.key;n.key=void 0,n.hasKey=!1,nft(t,n,s,e,r)}else n.key=e,n.keyPosition=t.position,n.hasKey=!0}i(u4,"addValue");function d4(t,e,r,n,s){if(e.anchorStart!==Uh){let o={value:r,tag:n,isValueFinal:s};return t.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),o),o}return null}i(d4,"storeAnchor");function sft(t,e){let r={...w4,...e,events:t,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;r.eventIndexr.maxAliases&&_s(r,`aliases exceeded maxAliases (${r.maxAliases})`);let s=r.source.slice(n.anchorStart,n.anchorEnd),o=r.anchors.get(s);o||_s(r,`unidentified alias "${s}"`),o.isValueFinal||_s(r,`recursive alias "${s}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),u4(r,o.value,o.tag);break}case 6:{let s=r.frames.pop();if(s.kind==="document")r.documents.push(s.value);else{let o=s.tag.carrierIsResult?s.value:Mhe(r,s.position,s.tag,s.value);s.anchor&&(s.anchor.value=o,s.anchor.isValueFinal=!0),u4(r,o,s.tag)}break}}}return r.documents}i(sft,"constructFromEvents");var Je=-1,Uhe=Object.prototype.hasOwnProperty,ud=1,A4=2,qhe=3,YT=4,oft=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ift=/[,\[\]{}]/,Ghe=/^(?:!|!!|![0-9A-Za-z-]+!)$/,h4=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,Hhe=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,aft=new RegExp(`^(?:${h4})*$`),cft=new RegExp(`^(?:${Hhe})+$`),lft=new RegExp(`^(?:!(?:${h4})*|${Hhe}(?:${h4})*)$`),S4={filename:"",maxDepth:100};function uft(t,e,r){t.events.push({type:1,explicitStart:e,explicitEnd:r,directives:t.directives})}i(uft,"addDocumentEvent");function $he(t,e,r,n,s,o,a){t.events.push({type:2,start:e,anchorStart:r,anchorEnd:n,tagStart:s,tagEnd:o,style:a})}i($he,"addSequenceEvent");function kI(t,e,r,n,s,o,a){t.events.push({type:3,start:e,anchorStart:r,anchorEnd:n,tagStart:s,tagEnd:o,style:a})}i(kI,"addMappingEvent");function Gh(t,e,r,n,s,o,a,c,l=1,u=-1,d=!1){t.events.push({type:4,valueStart:e,valueEnd:r,anchorStart:n,anchorEnd:s,tagStart:o,tagEnd:a,style:c,chomping:l,indent:u,fast:d})}i(Gh,"addScalarEvent");function dft(t,e,r){t.events.push({type:5,anchorStart:e,anchorEnd:r})}i(dft,"addAliasEvent");function qh(t){t.events.push({type:6})}i(qh,"addPopEvent");function Qs(t){Gh(t,Je,Je,Je,Je,Je,Je,1)}i(Qs,"addEmptyScalarEvent");function The(){return{anchorStart:Je,anchorEnd:Je,tagStart:Je,tagEnd:Je}}i(The,"emptyProperties");function LI(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,eventsLength:t.events.length}}i(LI,"snapshotState");function dd(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.events.length=e.eventsLength}i(dd,"restoreState");function de(t,e){ZT(t.input.slice(0,t.length),t.position,e,t.filename)}i(de,"throwError");function Zr(t){return t===10||t===13}i(Zr,"isEol");function _m(t){return t===9||t===32}i(_m,"isWhiteSpace");function Vi(t){return _m(t)||Zr(t)}i(Vi,"isWsOrEol");function zl(t){return t===0||Vi(t)}i(zl,"isWsOrEolOrEnd");function Dm(t){return t===44||t===91||t===93||t===123||t===125}i(Dm,"isFlowIndicator");function pft(t){return t>=48&&t<=57?t-48:-1}i(pft,"fromDecimalCode");function mft(t){if(t>=48&&t<=57)return t-48;let e=t|32;return e>=97&&e<=102?e-97+10:-1}i(mft,"fromHexCode");function fft(t){return t===120?2:t===117?4:t===85?8:0}i(fft,"escapedHexLen");function Aft(t){return t===48||t===97||t===98||t===116||t===9||t===110||t===118||t===102||t===114||t===101||t===32||t===34||t===47||t===92||t===78||t===95||t===76||t===80}i(Aft,"isSimpleEscape");function JT(t){t.input.charCodeAt(t.position)===10?t.position++:(t.position++,t.input.charCodeAt(t.position)===10&&t.position++),t.line++,t.lineStart=t.position,t.lineIndent=0,t.firstTabInLine=-1}i(JT,"consumeLineBreak");function ts(t,e){let r=0,n=t.input.charCodeAt(t.position),s=t.position===t.lineStart||Vi(t.input.charCodeAt(t.position-1));for(;n!==0;){for(;_m(n);)s=!0,n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&s&&n===35)do n=t.input.charCodeAt(++t.position);while(!Zr(n)&&n!==0);if(!Zr(n))break;for(JT(t),r++,s=!0,n=t.input.charCodeAt(t.position);n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return r}i(ts,"skipSeparationSpace");function pd(t,e=t.position){let r=t.input.charCodeAt(e);if((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)){let n=t.input.charCodeAt(e+3);return n===0||Vi(n)}return!1}i(pd,"testDocumentSeparator");function vhe(t){let e=t.input.charCodeAt(t.position);for(;e!==0&&!Zr(e);)e=t.input.charCodeAt(++t.position)}i(vhe,"skipUntilLineEnd");function zhe(t,e,r){oft.test(t.input.slice(e,r))&&de(t,"the stream contains non-printable characters")}i(zhe,"checkPrintable");function hft(t,e,r){if(t.input.charCodeAt(t.position)!==33)return!1;e.tagStart!==Je&&de(t,"duplication of a tag property");let n=t.position,s=!1,o=!1,a="!",c=t.input.charCodeAt(++t.position);c===60?(s=!0,c=t.input.charCodeAt(++t.position)):c===33&&(o=!0,a="!!",c=t.input.charCodeAt(++t.position));let l=t.position,u;if(s){for(;c!==0&&c!==62;)c=t.input.charCodeAt(++t.position);c!==62&&de(t,"unexpected end of the stream within a verbatim tag"),u=t.input.slice(l,t.position),t.position++}else{for(;c!==0&&!Vi(c)&&!(r&&Dm(c));)c===33&&(o?de(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(l-1,t.position+1),Ghe.test(a)||de(t,"named tag handle cannot contain such characters"),o=!0,l=t.position+1)),c=t.input.charCodeAt(++t.position);u=t.input.slice(l,t.position),ift.test(u)&&de(t,"tag suffix cannot contain flow indicator characters")}return u&&!(s?aft.test(u):cft.test(u))&&de(t,`tag name cannot contain such characters: ${u}`),!s&&a!=="!"&&a!=="!!"&&!Uhe.call(t.tagHandlers,a)&&de(t,`undeclared tag handle "${a}"`),e.tagStart=n,e.tagEnd=t.position,!0}i(hft,"readTagProperty");function gft(t,e){if(t.input.charCodeAt(t.position)!==38)return!1;e.anchorStart!==Je&&de(t,"duplication of an anchor property"),t.position++;let r=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position))&&!Dm(t.input.charCodeAt(t.position));)t.position++;return t.position===r&&de(t,"name of an anchor node must contain at least one character"),e.anchorStart=r,e.anchorEnd=t.position,!0}i(gft,"readAnchorProperty");function yft(t,e){if(t.input.charCodeAt(t.position)!==42)return!1;(e.anchorStart!==Je||e.tagStart!==Je)&&de(t,"alias node should not have any properties"),t.position++;let r=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position))&&!Dm(t.input.charCodeAt(t.position));)t.position++;return t.position===r&&de(t,"name of an alias node must contain at least one character"),dft(t,r,t.position),!0}i(yft,"readAlias");function g4(t,e){ts(t,!1),t.lineIndent0;)t.position++,mft(t.input.charCodeAt(t.position))<0&&de(t,"expected hexadecimal character");t.position++}}else Zr(o)?(s=!1,g4(t,e)):t.position===t.lineStart&&pd(t)?de(t,"unexpected end of the document within a double quoted scalar"):o!==9&&o<32?de(t,"expected valid JSON character"):t.position++}de(t,"unexpected end of the stream within a double quoted scalar")}i(Cft,"readDoubleQuotedScalar");function Ift(t,e,r){let n=t.input.charCodeAt(t.position),s=1,o=-1,a=!1;if(n!==124&&n!==62)return!1;let c=n===124?4:5;for(t.position++;t.input.charCodeAt(t.position)!==0;){let f=t.input.charCodeAt(t.position),A=pft(f);if(f===43||f===45)s!==1&&de(t,"repeat of a chomping mode identifier"),s=f===43?3:2,t.position++;else if(A>=0)A===0&&de(t,"bad explicit indentation width of a block scalar; it cannot be less than one"),a&&de(t,"repeat of an indentation width identifier"),o=e+A-1,a=!0,t.position++;else break}let l=!1;for(;_m(t.input.charCodeAt(t.position));)l=!0,t.position++;l&&t.input.charCodeAt(t.position)===35&&vhe(t),Zr(t.input.charCodeAt(t.position))?JT(t):t.input.charCodeAt(t.position)!==0&&de(t,"a line break is expected");let u=a?o:-1,d=0,p=t.position,m=t.position;for(;t.input.charCodeAt(t.position)!==0;){let f=t.position,A=0;for(;t.input.charCodeAt(f+A)===32;)A++;let h=t.input.charCodeAt(f+A);if(h===0){u>=0?A>u&&(m=f+A):A>0&&(m=f+A);break}if(f===t.lineStart&&pd(t,f))break;if(!a&&u===-1&&Zr(h)&&(d=Math.max(d,A)),!a&&u===-1&&!Zr(h)&&(h===9&&A=e){l=!0,a=t.input.charCodeAt(t.position);continue}t.position=u,t.line=d,t.lineStart=p,t.lineIndent=m;break}}_m(a)||(o=t.position+1),a=t.input.charCodeAt(++t.position)}return o===s?!1:(zhe(t,s,o),Gh(t,s,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1,1,-1,!l),!0)}i(Sft,"readPlainScalar");function Qm(t,e){let r=t.line;ts(t,!0),(t.line>r&&t.lineIndent0;if(t.firstTabInLine!==-1&&t.input.charCodeAt(t.position)===45&&zl(t.input.charCodeAt(t.position+1))&&de(t,"bad indentation of a sequence entry"),s&&t.lineIndent<=e?Qs(t):Vl(t,e,qhe,!1,!0),ts(t,!0),t.lineIndent=t.length)break;t.lineIndent>e&&de(t,"bad indentation of a sequence entry"),t.line===n&&t.input.charCodeAt(t.position)===45&&zl(t.input.charCodeAt(t.position+1))&&de(t,"bad indentation of a sequence entry")}return qh(t),!0}i(Phe,"readBlockSequence");function p4(t,e,r,n){let s=!1,o=!1,a=!1,c=!1;if(t.firstTabInLine!==-1)return!1;let l=t.input.charCodeAt(t.position);for(;l!==0;){!s&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,de(t,"tab characters must not be used in indentation"));let u=t.input.charCodeAt(t.position+1),d=t.line;if((l===63||l===58)&&zl(u))a||(kI(t,t.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1),a=!0),l===63?(s&&Qs(t),o=!0,s=!0):(s||(Qs(t),o=!0),s=!1),t.position+=1,c=!0;else{s&&(Qs(t),s=!1);let p=LI(t);if(!Vl(t,r,A4,!1,!0))break;if(t.line===d){for(l=t.input.charCodeAt(t.position);_m(l);)l=t.input.charCodeAt(++t.position);if(l===58){if(l=t.input.charCodeAt(++t.position),zl(l)||de(t,"a whitespace character is expected after the key-value separator within a block mapping"),!a){for(dd(t,p),kI(t,p.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1),a=!0,Vl(t,r,A4,!1,!0),l=t.input.charCodeAt(t.position);_m(l);)l=t.input.charCodeAt(++t.position);t.position++}o=!0,s=!1,c=!1}else if(o)de(t,"expected ':' after a mapping key");else return n.anchorStart!==Je||n.tagStart!==Je?(dd(t,p),!1):!0}else if(o)de(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return n.anchorStart!==Je||n.tagStart!==Je?(dd(t,p),!1):!0}if(Vl(t,e,YT,!0,c)&&(c=!1),s||c&&(Qs(t),c=!1),ts(t,!0),l=t.input.charCodeAt(t.position),(t.line===d||t.lineIndent>e)&&l!==0)de(t,"bad indentation of a mapping entry");else if(t.lineIndent=t.maxDepth&&de(t,`nesting exceeded maxDepth (${t.maxDepth})`),t.depth++;let a=1,c=!1,l=!1,u=null,d=The(),p=r===YT||r===qhe,m=p,f=p;if(n&&ts(t,!0)&&(c=!0,t.lineIndent>e?a=1:t.lineIndent===e?a=0:a=-1),t.position===t.lineStart&&pd(t))return t.depth--,!1;if(a===1)for(;;){let A=t.input.charCodeAt(t.position),h=LI(t);if(c&&a!==1&&(A===33||A===38))break;if(c&&f&&(d.tagStart!==Je||d.anchorStart!==Je)&&(A===33||A===38)){let E=LI(t),C=e+1;if(p4(t,t.position-t.lineStart,C,d)&&t.events[E.eventsLength]?.type===3)return t.depth--,!0;dd(t,E)}if(c&&(A===33&&d.tagStart!==Je||A===38&&d.anchorStart!==Je)||!hft(t,d,r===ud)&&!gft(t,d))break;u===null&&(u=h),ts(t,!0)?(c=!0,m=f,t.lineIndent>e?a=1:t.lineIndent===e?a=0:a=-1):m=!1}if(m&&(m=c||s),a===1||r===YT){let A=r===ud||r===A4?e:e+1,h=t.position-t.lineStart;if(a===1)if(m&&(Phe(t,h,d)||p4(t,h,A,d))||xft(t,A,d))l=!0;else{let E=t.input.charCodeAt(t.position);if(u!==null&&o&&f&&!m&&E!==124&&E!==62){let C=LI(t),w=u.position-u.lineStart;dd(t,u),p4(t,w,A,The())&&t.events[C.eventsLength]?.type===3?l=!0:dd(t,C)}!l&&(p&&Ift(t,A,d)||Eft(t,A,d)||Cft(t,A,d)||yft(t,d)||Sft(t,A,r,d))&&(l=!0)}else a===0&&(l=m&&Phe(t,h,d))}return p=p&&!l,!l&&(d.anchorStart!==Je||d.tagStart!==Je||p)&&(Gh(t,Je,Je,d.anchorStart,d.anchorEnd,d.tagStart,d.tagEnd,1),l=!0),t.depth--,l||d.anchorStart!==Je||d.tagStart!==Je}i(Vl,"parseNode");function bft(t){if(t.lineIndent>0||t.input.charCodeAt(t.position)!==37)return!1;t.position++;let e=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position));)t.position++;let r=t.input.slice(e,t.position),n=[];for(r.length===0&&de(t,"directive name must not be less than one character in length");t.input.charCodeAt(t.position)!==0&&!Zr(t.input.charCodeAt(t.position));){for(;_m(t.input.charCodeAt(t.position));)t.position++;if(t.input.charCodeAt(t.position)===35||Zr(t.input.charCodeAt(t.position))||t.input.charCodeAt(t.position)===0)break;let s=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Vi(t.input.charCodeAt(t.position));)t.position++;n.push(t.input.slice(s,t.position))}if(Zr(t.input.charCodeAt(t.position))&&JT(t),r==="YAML"){t.directives.some(o=>o.kind==="yaml")&&de(t,"duplication of %YAML directive"),n.length!==1&&de(t,"YAML directive accepts exactly one argument");let s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);s===null&&de(t,"ill-formed argument of the YAML directive"),parseInt(s[1],10)!==1&&de(t,"unacceptable YAML version of the document"),t.directives.push({kind:"yaml",version:n[0]})}else if(r==="TAG"){n.length!==2&&de(t,"TAG directive accepts exactly two arguments");let[s,o]=n;Ghe.test(s)||de(t,"ill-formed tag handle (first argument) of the TAG directive"),Uhe.call(t.tagHandlers,s)&&de(t,`there is a previously declared suffix for "${s}" tag handle`),lft.test(o)||de(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagHandlers[s]=o,t.directives.push({kind:"tag",handle:s,prefix:o})}return!0}i(bft,"readDirective");function Bft(t){t.directives=[],t.tagHandlers=Object.create(null);let e=!1;for(ts(t,!0);bft(t);)e=!0,ts(t,!0);let r=!1,n=!1,s=!0;if(t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45&&zl(t.input.charCodeAt(t.position+3))){r=!0;let c=t.line;t.position+=3,ts(t,!0),s=t.line>c}else e&&de(t,"directives end mark is expected");let o=t.events.length;if(!r&&t.position===t.lineStart&&t.input.charCodeAt(t.position)===46&&pd(t)){t.position+=3,ts(t,!0);return}if(uft(t,r,!1),Vl(t,t.lineIndent-1,YT,!1,s,s)||Qs(t),ts(t,!0),t.position===t.lineStart&&pd(t)&&(n=t.input.charCodeAt(t.position)===46,n)){let c=t.line;t.position+=3,ts(t,!0),t.line===c&&t.position=n.length));){let o=n.position;Bft(n),n.position===o&&de(n,"can not read a document")}return n.events}i(Rft,"parseEvents");var Nft={...S4,...w4};function Tft(t,e={}){let r={...Nft,...e},n=String(t),s=Object.keys(S4),o=Object.keys(w4);return sft(Rft(n,whe(r,s)),{...whe(r,o),source:n})}i(Tft,"loadDocuments");function Vhe(t,e){let r=Tft(t,e);if(r.length===0)throw new VT("expected a document, but the input is empty");if(r.length===1)return r[0];throw new VT("expected a single document in the stream, but found more")}i(Vhe,"load");var rs={};rs[0]="\\0";rs[7]="\\a";rs[8]="\\b";rs[9]="\\t";rs[10]="\\n";rs[11]="\\v";rs[12]="\\f";rs[13]="\\r";rs[27]="\\e";rs[34]='\\"';rs[92]="\\\\";rs[133]="\\N";rs[160]="\\_";rs[8232]="\\L";rs[8233]="\\P";var vft={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};var Pft=qmt.withTags({...m4,resolve:i((t,e,r)=>{let n=m4.resolve(t,e,r);return n===nt?Qhe.resolve(t,e,r):n},"resolve")},{...f4,resolve:i((t,e,r)=>{let n=f4.resolve(t,e,r);return n===nt?_he.resolve(t,e,r):n},"resolve")}),mhr={...vft,schema:Pft,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:i(()=>{},"transform")};var ai=R(require("fs"),1),ks=R(require("path"),1);var ewe=R(Oye(),1);var pv=class t{static{i(this,"Git")}static protoRegexp=new RegExp("^[a-zA-Z0-9]+://");static supportedProtos={http:{},https:{},ssh:{},git:{}};static parseURL(e){let r=e.match(t.protoRegexp);if(r&&r.length>0){let n=r[0].toLowerCase();if(n=n.slice(0,n.lastIndexOf("://")),!(n in t.supportedProtos))throw new Error(`Invalid protocol: ${n}`);return t.fromURL(new URL(e))}throw new Error("Unknown protocol")}static fromURL(e){let r=new URL(e.toString());r.hash="";let n;return(e.username||e.password)&&(n={username:e.username,password:e.password,passwordSet:e.password!==""}),{scheme:e.protocol.slice(0,-1),user:n,host:`${e.hostname}${e.port?":"+e.port:""}`,path:e.pathname,fragment:t.splitGitFragment(e.hash),remote:r.toString()}}static splitGitFragment(e){if(e==="")return;let[r,n]=e.slice(1).split(":");return{ref:r,subdir:n}}static parseRef(e){let r={},n;if(e.startsWith("./")||e.startsWith("../"))throw new Error("Invalid argument");if(e.startsWith("github.com/"))r.indistinguishableFromLocal=!0,n=t.fromURL(new URL("https://"+e));else if(n=t.parseURL(e),["http","git"].includes(n.scheme)&&(r.unencryptedTCP=!0),["http","https"].includes(n.scheme)&&!n.path.endsWith(".git"))throw new Error("Invalid argument");r.remote=n.remote,r.indistinguishableFromLocal&&(r.remote=r.remote.split("://")[1]),n.fragment&&(r.commit=n.fragment.ref,r.subDir=n.fragment.subdir);let s=r.remote.split("/");return r.shortName=s[s.length-1].replace(".git",""),r}};var zW=R(require("fs"),1),rIe=R(require("os"),1),sw=R(require("path"),1);var J4=R(require("fs"),1),rEe=R(require("os"),1),nEe=R(require("path"),1),sEe=R(tEe(),1);var Av=class t{static{i(this,"Context")}static _tmpDir=J4.default.mkdtempSync(nEe.default.join(t.ensureDirExists(process.env.RUNNER_TEMP||rEe.default.tmpdir()),"docker-actions-toolkit-"));static ensureDirExists(e){return J4.default.mkdirSync(e,{recursive:!0}),e}static tmpDir(){return t._tmpDir}static tmpName(e){return sEe.tmpNameSync(e)}};var Yl=class{static{i(this,"Exec")}static async exec(e,r,n){return v(`Exec.exec: ${e} ${r?.join(" ")}`),Mu(e,r,n)}static async getExecOutput(e,r,n){return v(`Exec.getExecOutput: ${e} ${r?.join(" ")}`),qE(e,r,n)}};var $W=R(require("crypto"),1),eIe=R(require("fs"),1),nw=R(require("path"),1),tIe=R(YCe(),1);var Ve=class t extends Error{static{i(this,"CsvError")}constructor(e,r,n,...s){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let o of s)for(let a in o){let c=o[a];this[a]=Buffer.isBuffer(c)?c.toString(n.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var rw=i(function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},"is_object");var Zv=i(function(t){let e=[];for(let r=0,n=t.length;r=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},HW=GW;var JCe=i(function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,s)=>{let o=Buffer.from(String.fromCharCode(s),t.encoding);return s!==63&&o.length===1&&o[0]===63||n.push(o),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new HW(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter?t.delimiter.map(n=>n.length):[],t.delimiter_auto?1:0,t.quote!==null?t.quote.length:0,...e.map(n=>n.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new HW(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(n=>n.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:r}},"init_state");var jCe=i(function(t){return t.replace(/([A-Z])/g,function(e,r){return"_"+r.toLowerCase()})},"underscore");var ng=i(function(t){let e={};for(let n in t)e[jCe(n)]=t[n];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new Ve("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new Ve("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new Ve("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(n){let s=Date.parse(n);return isNaN(s)?n:new Date(s)};else if(typeof e.cast_date!="function")throw new Ve("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=Zv(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new Ve("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new Ve("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new Ve("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new Ve("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new Ve("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!rw(e.delimiter_auto))throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!rw(e.delimiter_auto.preferred))throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(n,s)=>(n.total-n.std)*(s.preferred[n.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new Ve("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let r=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(n){if(typeof n=="string"&&(n=Buffer.from(n,e.encoding)),!Buffer.isBuffer(n)||n.length===0)throw new Ve("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${r}`],e);return n}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(t.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(t.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(t.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new Ve("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new Ve("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new Ve("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(n,s){if(typeof n!="string"&&!Buffer.isBuffer(n))throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${s},`,`got ${JSON.stringify(n)}`],e);if(n.length===0)throw new Ve("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${s},`,`got ${JSON.stringify(n)}`],e);return typeof n=="string"&&(n=Buffer.from(n,e.encoding)),n}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&t.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&t.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(t.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(t.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(t.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`);return e},"normalize_options");var KCe=i(function(t,e){e||({delimiter_auto:e}=ng({delimiter_auto:!0})),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)&&(t=(s=>{let o=[],a=eP({delimiter:[]}),c=i(d=>o.push(d),"push"),l=i(()=>{},"close"),u=a.parse(s,!0,c,l);if(u!==void 0)throw u;return o})(t));let r=Array(127).fill().map(()=>({lines:[]}));t.map(([s],o)=>{for(let a=0,c=s.length;a{s.char_code=o,s.std=KCt(s.lines),s.total=s.lines.reduce((a,c)=>a+c,0),s.preferred=!!e.preferred[o],s.score=e.score(s,e)});let n=r.reduce((s,o)=>s.score>o.score?s:o,{});return String.fromCharCode(n.char_code)},"delimiter_discover"),KCt=i(function(t){let e=t.length;if(e===0)return 0;let r=t.reduce((n,s)=>n+s)/e;return Math.sqrt(t.map(n=>Math.pow(n-r,2)).reduce((n,s)=>n+s)/e)},"std");var XCe=i(function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},"isRecordEmpty"),XCt=13,ZCt=10,sg={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},eP=i(function(t={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},r=ng(t);return{info:e,original_options:t,options:r,state:JCe(r),__needMoreData:i(function(n,s,o){if(o)return!1;let{encoding:a,escape:c,quote:l}=this.options,{quoting:u,needMoreDataSize:d,recordDelimiterMaxLength:p}=this.state,m=s-n-1,f=Math.max(d,p===0?Buffer.from(`\r `,a).length:p,u?(c===null?0:c.length)+l.length:0,u?l.length+p:0);return mu.size)this.options.delimiter=[Buffer.from(KCe(lt,this.options.delimiter_auto))],this.state.previousBuf=lt,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=lt;return}}let{previousBuf:K}=this.state,U;if(K===void 0)if(n===void 0){a();return}else U=n;else K!==void 0&&n===void 0?U=K:U=Buffer.concat([K,n]);if(re===!1)if(c===!1)this.state.bomSkipped=!0;else if(U.length<3){if(s===!1){this.state.previousBuf=U;return}}else{for(let lt in sg)if(sg[lt].compare(U,0,sg[lt].length)===0){let Ia=sg[lt].length;this.state.bufBytesStart+=Ia,U=U.slice(Ia);let hu=ng({...this.original_options,encoding:lt});for(let er in hu)this.options[er]=hu[er];({comment:b,escape:N,quote:P}=this.options);break}this.state.bomSkipped=!0}let wt=U.length,X;for(X=0;Xx){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(U,X)&&(_=this.options.record_delimiter);let lt=U[X];if(A===!0&&qe.append(lt),(lt===XCt||lt===ZCt)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(U,X,lt)&&X+N.lengthsg[pp].equals(this.state.field.toString())?pp:!1).filter(Boolean)[0],$s=this.__error(new Ve("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(er.column)} at line ${er.lines}, value is ${JSON.stringify(this.state.field.toString(d))}`,wa?`(${wa} bom)`:void 0],this.options,er,{field:this.state.field}));if($s!==void 0)return $s}}else{this.state.quoting=!0,X+=P.length-1;continue}if(this.state.quoting===!1){let er=this.__isRecordDelimiter(lt,U,X);if(er!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=p){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),X+=er-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,X+=er-1;continue}this.info.bytes=this.state.bufBytesStart+X;let pp=this.__onField();if(pp!==void 0)return pp;this.info.bytes=this.state.bufBytesStart+X+er;let Dx=this.__onRecord(o);if(Dx!==void 0)return Dx;if(w!==-1&&this.info.records>=w){this.state.stop=!0,a();return}}this.state.commenting=!1,X+=er-1;continue}if(this.state.commenting)continue;if(b!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(b,U,X,lt)!==0){this.state.commenting=!0;continue}let wa=this.__isDelimiter(U,X,lt);if(wa!==0){this.info.bytes=this.state.bufBytesStart+X;let $s=this.__onField();if($s!==void 0)return $s;X+=wa-1;continue}}}if(this.state.commenting===!1&&f!==0&&this.state.record_length+this.state.field.length>f)return this.__error(new Ve("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${f}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Ia=m===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(U,X),hu=E===!1||this.state.wasQuoting===!1;if(Ia===!0&&hu===!0)this.state.field.append(lt);else{if(E===!0&&!this.__isCharTrimable(U,X))return this.__error(new Ve("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));Ia===!1&&(X+=this.__isCharTrimable(U,X)-1);continue}}if(s===!0)if(this.state.quoting===!0){let lt=this.__error(new Ve("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(lt!==void 0)return lt}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+X;let lt=this.__onField();if(lt!==void 0)return lt;let Ia=this.__onRecord(o);if(Ia!==void 0)return Ia}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=X,this.state.previousBuf=U.slice(X);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},"parse"),__onRecord:i(function(n){let{columns:s,group_columns_by_name:o,encoding:a,info:c,from:l,relax_column_count:u,relax_column_count_less:d,relax_column_count_more:p,raw:m,skip_records_with_empty_values:f}=this.options,{enabled:A,record:h}=this.state;if(A===!1)return this.__resetRecord();let E=h.length;if(s===!0){if(f===!0&&XCe(h)){this.__resetRecord();return}return this.__firstLineToColumns(h)}if(s===!1&&this.info.records===0&&(this.state.expectedRecordLength=E),E!==this.state.expectedRecordLength){let C=s===!1?new Ve("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:h}):new Ve("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${s.length},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:h});if(u===!0||d===!0&&Ethis.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=C;else{let w=this.__error(C);if(w)return w}}if(f===!0&&XCe(h)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,l===1||this.info.records>=l){let{objname:C}=this.options;if(s!==!1){let w={};for(let x=0,b=h.length;x=0},"__isFloat"),__isQuote:i(function(n,s){let{quote:o}=this.options;if(o===null)return!1;let a=o.length;for(let c=0;cthis.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var ZCe=i(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=eP(e),s=i(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),o=i(()=>{},"close"),a=n.parse(t,!0,s,o);if(a!==void 0)throw a;return r},"parse");var hd=class t{static{i(this,"Util")}static getInputList(e,r){return this.getList(_i(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let s=ZCe(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let o of s)o.length==1?r?.ignoreComma?n.push(o[0]):n.push(...o[0].split(",")):r?.ignoreComma?n.push(o.join(",")):n.push(...o);return n.filter(o=>o).map(o=>r?.trimWhitespace===!1?o:o.trim())}static getInputNumber(e){let r=_i(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let n=0;nsetTimeout(r,e*1e3))}static hash(e){return $W.default.createHash("sha256").update(e).digest("hex")}static parseBool(e){if(e===void 0)return!1;switch(e){case"1":case"t":case"T":case"true":case"TRUE":case"True":return!0;case"0":case"f":case"F":case"false":case"FALSE":case"False":return!1;default:throw new Error(`parseBool syntax error: ${e}`)}}static parseBoolOrDefault(e,r=!1){try{return this.parseBool(e)}catch{return r}}static formatFileSize(e){if(e===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,s)).toFixed(2))+" "+n[s]}static generateRandomString(e=10){return $W.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return tIe.default.compile(e,r)(n)}static stringToUnicodeEntities(e){return Array.from(e).map(r=>`&#x${r.charCodeAt(0).toString(16)};`).join("")}static countLines(e){return e.split(/\r\n|\r|\n/).length}static isPathRelativeTo(e,r){let n=nw.default.resolve(e);return nw.default.resolve(r).startsWith(n.endsWith(nw.default.sep)?n:`${n}${nw.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),n=Math.floor(r/3600),s=Math.floor(r%3600/60),o=r%60,a=[];return n&&a.push(`${n}h`),s&&a.push(`${s}m`),(o||a.length===0)&&a.push(`${o}s`),a.join("")}};var gd=class t{static{i(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||sw.default.join(rIe.default.homedir(),".docker")}static configFile(){let e=sw.default.join(t.configDir,"config.json");if(zW.default.existsSync(e))return JSON.parse(zW.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await Es("docker",!0).then(e=>(v(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(v(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}catch{return!1}}static async exec(e,r){return Yl.exec("docker",e,t.execOptions(r))}static async getExecOutput(e,r){return Yl.getExecOutput("docker",e,t.execOptions(r))}static execOptions(e){return e||(e={}),e.env?e.env.DOCKER_CONTENT_TRUST="false":e.env=Object.assign({},process.env,{DOCKER_CONTENT_TRUST:"false"}),e}static async context(e){let r=["context","inspect","--format","{{.Name}}"];return e&&r.push(e),await t.getExecOutput(r,{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr);return n.stdout.trim()})}static async contextInspect(e){let r=["context","inspect","--format=json"];return e&&r.push(e),await t.getExecOutput(r,{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr.trim());return JSON.parse(n.stdout.trim())[0]})}static async printVersion(){await t.exec(["version"])}static async printInfo(){await t.exec(["info"])}static parseRepoTag(e){let r,n=e.indexOf("@"),s=e.lastIndexOf(":");if(n>=0)r=n;else if(s>=0)r=s;else return{repository:e,tag:"latest"};let o=e.slice(r+1);return o.indexOf("/")===-1?{repository:e.slice(0,r),tag:o}:{repository:e,tag:"latest"}}static async pull(e,r){let n=t.parseRepoTag(e),s=n.repository.replace(/[^a-zA-Z0-9.]+/g,"--"),o=n.tag.replace(/[^a-zA-Z0-9.]+/g,"--"),a=new Fh({htcName:s,htcVersion:o,baseCacheDir:sw.default.join(t.configDir,".cache","images",s),cacheFile:"image.tar"}),c;r&&(c=await a.find(),c&&(be(`Image found from cache in ${c}`),await t.getExecOutput(["load","-i",c],{ignoreReturnCode:!0}).then(u=>{u.stderr.length>0&&u.exitCode!=0&&Ar(`Failed to load image from cache: ${u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`)})));let l=!0;if(await t.getExecOutput(["pull",e],{ignoreReturnCode:!0}).then(u=>{if(u.stderr.length>0&&u.exitCode!=0){l=!1;let d=u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error";if(c)Ar(`Failed to pull image, using one from cache: ${d}`);else throw new Error(d)}}),r&&l){let u=sw.default.join(Av.tmpDir(),`${hd.hash(e)}.tar`);await t.getExecOutput(["save","-o",u,e],{ignoreReturnCode:!0}).then(async d=>{if(d.stderr.length>0&&d.exitCode!=0)Ar(`Failed to save image: ${d.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);else{let p=await a.save(u);be(`Image cached to ${p}`)}})}}};var tP=require("fs"),nIe=require("os");var og=class{static{i(this,"Context")}constructor(){var e,r,n;if(this.payload={},process.env.GITHUB_EVENT_PATH)if((0,tP.existsSync)(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse((0,tP.readFileSync)(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let s=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${s} does not exist${nIe.EOL}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(n=process.env.GITHUB_GRAPHQL_URL)!==null&&n!==void 0?n:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,r]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:r}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};var JW=R(cIe(),1),lIe=R(Up(),1);var pIt=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function uIe(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}i(uIe,"getAuthString");function dIe(t){return new JW.HttpClient().getAgent(t)}i(dIe,"getProxyAgent");function mIt(t){return new JW.HttpClient().getAgentDispatcher(t)}i(mIt,"getProxyAgentDispatcher");function pIe(t){let e=mIt(t);return i((n,s)=>pIt(this,void 0,void 0,function*(){return(0,lIe.fetch)(n,Object.assign(Object.assign({},s),{dispatcher:e}))}),"proxyFetch")}i(pIe,"getProxyFetch");function mIe(){return process.env.GITHUB_API_URL||"https://api.github.com"}i(mIe,"getApiBaseUrl");function jW(t){var e;let r=(e=process.env.ACTIONS_ORCHESTRATION_ID)===null||e===void 0?void 0:e.trim();if(r){let s=`actions_orchestration_id/${r.replace(/[^a-z0-9_.-]/gi,"_")}`;return t?.includes(s)?t:`${t?`${t} `:""}${s}`}return t}i(jW,"getUserAgentWithOrchestrationId");function yd(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:""}i(yd,"getUserAgent");function cP(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce((s,o)=>cP.bind(null,t,o,s,n),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((s,o)=>o.hook.bind(null,s,n),r)():r(n))}i(cP,"register");function fIe(t,e,r,n){let s=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=i((o,a)=>Promise.resolve().then(s.bind(null,a)).then(o.bind(null,a)),"hook")),e==="after"&&(n=i((o,a)=>{let c;return Promise.resolve().then(o.bind(null,a)).then(l=>(c=l,s(c,a))).then(()=>c)},"hook")),e==="error"&&(n=i((o,a)=>Promise.resolve().then(o.bind(null,a)).catch(c=>s(c,a)),"hook")),t.registry[r].push({hook:n,orig:s})}i(fIe,"addHook");function AIe(t,e,r){if(!t.registry[e])return;let n=t.registry[e].map(s=>s.orig).indexOf(r);n!==-1&&t.registry[e].splice(n,1)}i(AIe,"removeHook");var hIe=Function.bind,gIe=hIe.bind(hIe);function yIe(t,e,r){let n=gIe(AIe,null).apply(null,r?[e,r]:[e]);t.api={remove:n},t.remove=n,["before","error","after","wrap"].forEach(s=>{let o=r?[e,s,r]:[e,s];t[s]=t.api[s]=gIe(fIe,null).apply(null,o)})}i(yIe,"bindApi");function AIt(){let t=Symbol("Singular"),e={registry:{}},r=cP.bind(null,e,t);return yIe(r,e,t),r}i(AIt,"Singular");function hIt(){let t={registry:{}},e=cP.bind(null,t);return yIe(e,t),e}i(hIt,"Collection");var EIe={Singular:AIt,Collection:hIt};var gIt="0.0.0-development",yIt=`octokit-endpoint.js/${gIt} ${yd()}`,EIt={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":yIt},mediaType:{format:""}};function CIt(t){return t?Object.keys(t).reduce((e,r)=>(e[r.toLowerCase()]=t[r],e),{}):{}}i(CIt,"lowercaseKeys");function IIt(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);if(e===null)return!0;let r=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Function.prototype.call(r)===Function.prototype.call(t)}i(IIt,"isPlainObject");function wIe(t,e){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{IIt(e[n])?n in t?r[n]=wIe(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}i(wIe,"mergeDeep");function CIe(t){for(let e in t)t[e]===void 0&&delete t[e];return t}i(CIe,"removeUndefinedProperties");function XW(t,e,r){if(typeof e=="string"){let[s,o]=e.split(" ");r=Object.assign(o?{method:s,url:o}:{url:s},r)}else r=Object.assign({},e);r.headers=CIt(r.headers),CIe(r),CIe(r.headers);let n=wIe(t||{},r);return r.url==="/graphql"&&(t&&t.mediaType.previews?.length&&(n.mediaType.previews=t.mediaType.previews.filter(s=>!n.mediaType.previews.includes(s)).concat(n.mediaType.previews)),n.mediaType.previews=(n.mediaType.previews||[]).map(s=>s.replace(/-preview/,""))),n}i(XW,"merge");function wIt(t,e){let r=/\?/.test(t)?"&":"?",n=Object.keys(e);return n.length===0?t:t+r+n.map(s=>s==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${s}=${encodeURIComponent(e[s])}`).join("&")}i(wIt,"addQueryParameters");var SIt=/\{[^{}}]+\}/g;function xIt(t){return t.replace(/(?:^\W+)|(?:(?r.concat(n),[]):[]}i(bIt,"extractUrlVariableNames");function IIe(t,e){let r={__proto__:null};for(let n of Object.keys(t))e.indexOf(n)===-1&&(r[n]=t[n]);return r}i(IIe,"omit");function SIe(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}i(SIe,"encodeReserved");function ag(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}i(ag,"encodeUnreserved");function iw(t,e,r){return e=t==="+"||t==="#"?SIe(e):ag(e),r?ag(r)+"="+e:e}i(iw,"encodeValue");function ig(t){return t!=null}i(ig,"isDefined");function KW(t){return t===";"||t==="&"||t==="?"}i(KW,"isKeyOperator");function BIt(t,e,r,n){var s=t[r],o=[];if(ig(s)&&s!=="")if(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||typeof s=="boolean")s=s.toString(),n&&n!=="*"&&(s=s.substring(0,parseInt(n,10))),o.push(iw(e,s,KW(e)?r:""));else if(n==="*")Array.isArray(s)?s.filter(ig).forEach(function(a){o.push(iw(e,a,KW(e)?r:""))}):Object.keys(s).forEach(function(a){ig(s[a])&&o.push(iw(e,s[a],a))});else{let a=[];Array.isArray(s)?s.filter(ig).forEach(function(c){a.push(iw(e,c))}):Object.keys(s).forEach(function(c){ig(s[c])&&(a.push(ag(c)),a.push(iw(e,s[c].toString())))}),KW(e)?o.push(ag(r)+"="+a.join(",")):a.length!==0&&o.push(a.join(","))}else e===";"?ig(s)&&o.push(ag(r)):s===""&&(e==="&"||e==="?")?o.push(ag(r)+"="):s===""&&o.push("");return o}i(BIt,"getValues");function RIt(t){return{expand:NIt.bind(null,t)}}i(RIt,"parseUrl");function NIt(t,e){var r=["+","#",".","/",";","?","&"];return t=t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(n,s,o){if(s){let c="",l=[];if(r.indexOf(s.charAt(0))!==-1&&(c=s.charAt(0),s=s.substr(1)),s.split(/,/g).forEach(function(u){var d=/([^:\*]*)(?::(\d+)|(\*))?/.exec(u);l.push(BIt(e,c,d[1],d[2]||d[3]))}),c&&c!=="+"){var a=",";return c==="?"?a="&":c!=="#"&&(a=c),(l.length!==0?c:"")+l.join(a)}else return l.join(",")}else return SIe(o)}),t==="/"?t:t.replace(/\/$/,"")}i(NIt,"expand");function xIe(t){let e=t.method.toUpperCase(),r=(t.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),n=Object.assign({},t.headers),s,o=IIe(t,["method","baseUrl","url","headers","request","mediaType"]),a=bIt(r);r=RIt(r).expand(o),/^http/.test(r)||(r=t.baseUrl+r);let c=Object.keys(t).filter(d=>a.includes(d)).concat("baseUrl"),l=IIe(o,c);if(!/application\/octet-stream/i.test(n.accept)&&(t.mediaType.format&&(n.accept=n.accept.split(/,/).map(d=>d.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${t.mediaType.format}`)).join(",")),r.endsWith("/graphql")&&t.mediaType.previews?.length)){let d=n.accept.match(/(?{let m=t.mediaType.format?`.${t.mediaType.format}`:"+json";return`application/vnd.github.${p}-preview${m}`}).join(",")}return["GET","HEAD"].includes(e)?r=wIt(r,l):"data"in l?s=l.data:Object.keys(l).length&&(s=l),!n["content-type"]&&typeof s<"u"&&(n["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof s>"u"&&(s=""),Object.assign({method:e,url:r,headers:n},typeof s<"u"?{body:s}:null,t.request?{request:t.request}:null)}i(xIe,"parse");function TIt(t,e,r){return xIe(XW(t,e,r))}i(TIt,"endpointWithDefaults");function bIe(t,e){let r=XW(t,e),n=TIt.bind(null,r);return Object.assign(n,{DEFAULTS:r,defaults:bIe.bind(null,r),merge:XW.bind(null,r),parse:xIe})}i(bIe,"withDefaults");var BIe=bIe(null,EIt);var FIe=R(vIe(),1);var vIt=/^-?\d+$/,_Ie=/^-?\d+n+$/,ZW=JSON.stringify,PIe=JSON.parse,PIt=/^-?\d+n$/,QIt=/([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,_It=/([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g,DIe=i((t,e,r)=>"rawJSON"in JSON?ZW(t,(a,c)=>typeof c=="bigint"?JSON.rawJSON(c.toString()):typeof e=="function"?e(a,c):(Array.isArray(e)&&e.includes(a),c),r):t?ZW(t,(a,c)=>typeof c=="string"&&!!c.match(_Ie)||typeof c=="bigint"?c.toString()+"n":typeof e=="function"?e(a,c):(Array.isArray(e)&&e.includes(a),c),r).replace(QIt,"$1$2$3").replace(_It,"$1$2$3"):ZW(t,e,r),"JSONStringify"),DIt=i(()=>JSON.parse("1",(t,e,r)=>!!r&&r.source==="1"),"isContextSourceSupported"),kIt=i((t,e,r,n)=>typeof e=="string"&&e.match(PIt)?BigInt(e.slice(0,-1)):typeof e=="string"&&e.match(_Ie)?e.slice(0,-1):typeof n!="function"?e:n(t,e,r),"convertMarkedBigIntsReviver"),LIt=i((t,e)=>JSON.parse(t,(r,n,s)=>{let o=typeof n=="number"&&(n>Number.MAX_SAFE_INTEGER||n{if(!t)return PIe(t,e);if(DIt())return LIt(t,e);let r=t.replace(OIt,(n,s,o,a)=>{let c=n[0]==='"';if(c&&!!n.match(MIt))return n.substring(0,n.length-1)+'n"';let u=o||a,d=s&&(s.lengthkIt(n,s,o,e))},"JSONParse");var Gm=class extends Error{static{i(this,"RequestError")}name;status;request;response;constructor(e,r,n){super(e,{cause:n.cause}),this.name="HttpError",this.status=Number.parseInt(r),Number.isNaN(this.status)&&(this.status=0);"response"in n&&(this.response=n.response);let s=Object.assign({},n.request);n.request.headers.authorization&&(s.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/(?"","noop");async function MIe(t){let e=t.request?.fetch||globalThis.fetch;if(!e)throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing");let r=t.request?.log||console,n=t.request?.parseSuccessResponseBody!==!1,s=qIt(t.body)||Array.isArray(t.body)?DIe(t.body):t.body,o=Object.fromEntries(Object.entries(t.headers).map(([p,m])=>[p,String(m)])),a;try{a=await e(t.url,{method:t.method,body:s,redirect:t.request?.redirect,headers:o,signal:t.request?.signal,...t.body&&{duplex:"half"}})}catch(p){let m="Unknown Error";if(p instanceof Error){if(p.name==="AbortError")throw p.status=500,p;m=p.message,p.name==="TypeError"&&"cause"in p&&(p.cause instanceof Error?m=p.cause.message:typeof p.cause=="string"&&(m=p.cause))}let f=new Gm(m,500,{request:t});throw f.cause=p,f}let c=a.status,l=a.url,u={};for(let[p,m]of a.headers)u[p]=m;let d={url:l,status:c,headers:u,data:""};if("deprecation"in u){let p=u.link&&u.link.match(/<([^<>]+)>; rel="deprecation"/),m=p&&p.pop();r.warn(`[@octokit/request] "${t.method} ${t.url}" is deprecated. It is scheduled to be removed on ${u.sunset}${m?`. See ${m}`:""}`)}if(c===204||c===205)return d;if(t.method==="HEAD"){if(c<400)return d;throw new Gm(a.statusText,c,{response:d,request:t})}if(c===304)throw d.data=await eY(a),new Gm("Not modified",c,{response:d,request:t});if(c>=400)throw d.data=await eY(a),new Gm(HIt(d.data),c,{response:d,request:t});return d.data=n?await eY(a):a.body,d}i(MIe,"fetchWrapper");async function eY(t){let e=t.headers.get("content-type");if(!e)return t.text().catch(OIe);let r=(0,FIe.safeParse)(e);if(GIt(r)){let n="";try{return n=await t.text(),LIe(n)}catch{return n}}else return r.type.startsWith("text/")||r.parameters.charset?.toLowerCase()==="utf-8"?t.text().catch(OIe):t.arrayBuffer().catch(()=>new ArrayBuffer(0))}i(eY,"getResponseData");function GIt(t){return t.type==="application/json"||t.type==="application/scim+json"}i(GIt,"isJSONResponse");function HIt(t){if(typeof t=="string")return t;if(t instanceof ArrayBuffer)return"Unknown error";if("message"in t){let e="documentation_url"in t?` - ${t.documentation_url}`:"";return Array.isArray(t.errors)?`${t.message}: ${t.errors.map(r=>JSON.stringify(r)).join(", ")}${e}`:`${t.message}${e}`}return`Unknown error: ${JSON.stringify(t)}`}i(HIt,"toErrorMessage");function tY(t,e){let r=t.defaults(e);return Object.assign(i(function(s,o){let a=r.merge(s,o);if(!a.request||!a.request.hook)return MIe(r.parse(a));let c=i((l,u)=>MIe(r.parse(r.merge(l,u))),"request2");return Object.assign(c,{endpoint:r,defaults:tY.bind(null,r)}),a.request.hook(c,a)},"newApi"),{endpoint:r,defaults:tY.bind(null,r)})}i(tY,"withDefaults");var cw=tY(BIe,UIt);var $It="0.0.0-development";function zIt(t){return`Request failed due to following response errors: `+t.errors.map(e=>` - ${e.message}`).join(` -`)}i(zIt,"_buildMessageForResponseErrors");var VIt=class extends Error{static{i(this,"GraphqlResponseError")}constructor(t,e,r){super(zIt(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},WIt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],YIt=["query","method","url"],UIe=/\/api\/v3\/?$/;function JIt(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(YIt.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((a,c)=>WIt.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),o=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return UIe.test(o)&&(s.url=o.replace(UIe,"/api/graphql")),t(s).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new VIt(s,c,a.data)}return a.data.data})}i(JIt,"graphql");function rY(t,e){let r=t.defaults(e);return Object.assign(i((s,o)=>JIt(r,s,o),"newApi"),{defaults:rY.bind(null,r),endpoint:r.endpoint})}i(rY,"withDefaults");var OCr=rY(cw,{headers:{"user-agent":`octokit-graphql.js/${$It} ${yd()}`},method:"POST",url:"/graphql"});function qIe(t){return rY(t,{method:"POST",url:"/graphql"})}i(qIe,"withCustomRequest");var nY="(?:[a-zA-Z0-9_-]+)",GIe="\\.",HIe=new RegExp(`^${nY}${GIe}${nY}${GIe}${nY}$`),jIt=HIe.test.bind(HIe);async function KIt(t){let e=jIt(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}i(KIt,"auth");function XIt(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}i(XIt,"withAuthorizationPrefix");async function ZIt(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=XIt(t),e(s)}i(ZIt,"hook");var $Ie=i(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(KIt.bind(null,e),{hook:ZIt.bind(null,e)})},"createTokenAuth2");var sY="7.0.6";var zIe=i(()=>{},"noop"),ewt=console.warn.bind(console),twt=console.error.bind(console);function rwt(t={}){return typeof t.debug!="function"&&(t.debug=zIe),typeof t.info!="function"&&(t.info=zIe),typeof t.warn!="function"&&(t.warn=ewt),typeof t.error!="function"&&(t.error=twt),t}i(rwt,"createLogger");var VIe=`octokit-core.js/${sY} ${yd()}`,pP=class{static{i(this,"Octokit")}static VERSION=sY;static defaults(e){return class extends this{static{i(this,"OctokitWithDefaults")}constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{i(this,"NewOctokit")}static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new EIe.Collection,n={baseUrl:cw.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${VIe}`:VIe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=cw.defaults(n),this.graphql=qIe(this.request).defaults(n),this.log=rwt(e.log),this.hook=r,e.authStrategy){let{authStrategy:o,...a}=e,c=o(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let o=$Ie(e.auth);r.wrap("request",o.hook),this.auth=o}let s=this.constructor;for(let o=0;o({async next(){if(!c)return{done:!0};try{let l=await s({method:o,url:c,headers:a}),u=cwt(l);if(c=((u.headers.link||"").match(/<([^<>]+)>;\s*rel="next"/)||[])[1],!c&&"total_commits"in u.data){let d=new URL(u.url),p=d.searchParams,m=parseInt(p.get("page")||"1",10),f=parseInt(p.get("per_page")||"250",10);m*f{if(s.done)return e;let o=!1;function a(){o=!0}return i(a,"done"),e=e.concat(n?n(s.value,a):s.value.data),o?e:JIe(t,e,r,n)})}i(JIe,"gather");var lIr=Object.assign(YIe,{iterator:cY});function lY(t){return{paginate:Object.assign(YIe.bind(null,t),{iterator:cY.bind(null,t)})}}i(lY,"paginateRest");lY.VERSION=awt;var AIr=new og,uY=mIe(),lwt={baseUrl:uY,request:{agent:dIe(uY),fetch:pIe(uY)}},jIe=pP.plugin(aY,lY).defaults(lwt);function KIe(t,e){let r=Object.assign({},e||{}),n=uIe(t,r);n&&(r.auth=n);let s=jW(r.userAgent);return s&&(r.userAgent=s),r}i(KIe,"getOctokitOptions");var cg=new og;function XIe(t,e,...r){let n=jIe.plugin(...r);return new n(KIe(t,e))}i(XIe,"getOctokit");var $m=class extends Error{static{i(this,"InvalidTokenError")}};$m.prototype.name="InvalidTokenError";function dwt(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}i(dwt,"b64DecodeUnicode");function pwt(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return dwt(e)}catch{return atob(e)}}i(pwt,"base64UrlDecode");function ZIe(t,e){if(typeof t!="string")throw new $m("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new $m(`Invalid token specified: missing part #${r+1}`);let s;try{s=pwt(n)}catch(o){throw new $m(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(s)}catch(o){throw new $m(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}i(ZIe,"jwtDecode");var lg=class t{static{i(this,"GitHub")}githubToken;octokit;constructor(e){this.githubToken=e?.token||process.env.GITHUB_TOKEN,this.octokit=XIe(`${this.githubToken}`)}repoData(){return this.octokit.rest.repos.get({...cg.repo}).then(e=>e.data)}async releases(e,r){let n;try{n=await this.releasesRaw(e,r)}catch(s){if(!this.githubToken)throw s;n=await this.releasesRaw(e,r,this.githubToken)}return n}async releasesRaw(e,r,n){let s=`https://raw.githubusercontent.com/${r.owner}/${r.repo}/${r.ref}/${r.path}`,a=await new so("docker-actions-toolkit").get(s,n?{Authorization:`token ${n}`}:void 0),c=await a.readBody(),l=a.message.statusCode||500;if(l>=400)throw new Error(`Failed to get ${e} releases from ${s} with status code ${l}: ${c}`);return JSON.parse(c)}static get context(){return cg}static get serverURL(){return process.env.GITHUB_SERVER_URL||"https://github.com"}static get apiURL(){return process.env.GITHUB_API_URL||"https://api.github.com"}static get isGHES(){let r=new URL(t.serverURL).hostname.trimEnd().toUpperCase(),n=r==="GITHUB.COM",s=r.endsWith(".GHE.COM"),o=r.endsWith(".LOCALHOST");return!n&&!s&&!o}static get repository(){return`${cg.repo.owner}/${cg.repo.repo}`}static get workspace(){return process.env.GITHUB_WORKSPACE||process.cwd()}static get runId(){return process.env.GITHUB_RUN_ID?+process.env.GITHUB_RUN_ID:cg.runId}static get runAttempt(){return process.env.GITHUB_RUN_ATTEMPT?+process.env.GITHUB_RUN_ATTEMPT:1}static workflowRunURL(e){return`${t.serverURL}/${t.repository}/actions/runs/${t.runId}${e?`/attempts/${t.runAttempt}`:""}`}static get actionsRuntimeToken(){let e=process.env.ACTIONS_RUNTIME_TOKEN||"";return e?ZIe(e):void 0}static async printActionsRuntimeTokenACs(){let e;try{e=t.actionsRuntimeToken}catch(r){throw new Error(`Cannot parse GitHub Actions Runtime Token: ${r.message}`)}if(!e)throw new Error("ACTIONS_RUNTIME_TOKEN not set");try{JSON.parse(`${e.ac}`).forEach(r=>{let n;switch(r.Permission){case 1:n="read";break;case 2:n="write";break;case 3:n="read/write";break;default:n=`unimplemented (${r.Permission})`}be(`${r.Scope}: ${n}`)})}catch(r){throw new Error(`Cannot parse GitHub Actions Runtime Token ACs: ${r.message}`)}}};var mP=class t{static{i(this,"Buildx")}_version;_versionOnce;_standalone;static containerNamePrefix="buildx_buildkit_";constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}static get configDir(){return process.env.BUILDX_CONFIG||ks.default.join(gd.configDir,"buildx")}static get refsDir(){return ks.default.join(t.configDir,"refs")}static get refsGroupDir(){return ks.default.join(t.refsDir,"__group__")}static get certsDir(){return ks.default.join(t.configDir,"certs")}async isStandalone(){let e=this._standalone??!await gd.isAvailable();return v(`Buildx.isStandalone: ${e}`),e}async getCommand(e){let r=await this.isStandalone();return{command:r?"buildx":"docker",args:r?e:["buildx",...e]}}async isAvailable(){let e=await this.getCommand([]),r=await Yl.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(v(`Buildx.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(v(`Buildx.isAvailable error: ${n}`),!1));return v(`Buildx.isAvailable: ${r}`),r}async version(){if(this._versionOnce)return this._version;this._versionOnce=!0;let e=await this.getCommand(["version"]);return this._version=await Yl.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr.trim());return t.parseVersion(r.stdout.trim())}),this._version}async printVersion(){let e=await this.getCommand(["version"]);await Yl.exec(e.command,e.args,{failOnStdErr:!1})}static parseVersion(e){let r=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!r)throw new Error("Cannot parse buildx version");return r[1]}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return v("Buildx.versionSatisfies false: undefined version"),!1;let s=ewe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return v(`Buildx.versionSatisfies ${n} statisfies ${e}: ${s}`),s}static resolveCertsDriverOpts(e,r,n){let s;try{s=new URL(r)}catch{return[]}if(s.protocol!="tcp:")return[];let o=[];if(Object.keys(n).length==0)return o;let a=s.hostname;if(s.port.length>0&&(a+=`-${s.port}`),n.cacert!==void 0){let c=ks.default.join(t.certsDir,`cacert_${a}.pem`);ai.default.writeFileSync(c,n.cacert),o.push(`cacert=${c}`)}if(n.cert!==void 0){let c=ks.default.join(t.certsDir,`cert_${a}.pem`);ai.default.writeFileSync(c,n.cert),o.push(`cert=${c}`)}if(n.key!==void 0){let c=ks.default.join(t.certsDir,`key_${a}.pem`);ai.default.writeFileSync(c,n.key),o.push(`key=${c}`)}return e!="remote"?[]:o}static localState(e,r){let[n,s,o]=e.split("/");if(!n||!s||!o)throw new Error(`Invalid build reference: ${e}`);let a=ks.default.join(r||t.refsDir,n,s,o);if(!ai.default.existsSync(a))throw new Error(`Local state not found in ${a}`);return t.fixLocalState(JSON.parse(ai.default.readFileSync(a,"utf8")))}static fixLocalState(e){let r=i(function(a){let c=a.match(/(.*)(https?:\/{1,2}\S+|ssh:\/{1,2}\S+|git:\/{1,2}\S+)/i);if(c&&c.length==3){let l=c[1],u=c[2];return u.startsWith("https:/")&&!u.startsWith("https://")&&(u=u.replace("https:/","https://")),u.startsWith("http:/")&&!u.startsWith("http://")&&(u=u.replace("http:/","http://")),u.startsWith("ssh:/")&&!u.startsWith("ssh://")&&(u=u.replace("ssh:/","ssh://")),u.startsWith("git:/")&&!u.startsWith("git://")&&(u=u.replace("git:/","git://")),[u,l,!0]}return[a,"",!1]},"fnTrimToValidContext"),[n,s,o]=r(e.LocalPath);return o&&(e.LocalPath=n,e.DockerfilePath.indexOf(s)===0&&(e.DockerfilePath=e.DockerfilePath.substring(s.length))),e.LocalPath=e.LocalPath.endsWith("/-")?"-":e.LocalPath,e.DockerfilePath=e.DockerfilePath.endsWith("/-")?"-":e.DockerfilePath,e}static refs(e,r={}){let{dir:n,builderName:s,nodeName:o,since:a}=e,c=ks.default.resolve(n);if(e.builderName&&(c=ks.default.join(c,e.builderName)),e.nodeName&&(c=ks.default.join(c,e.nodeName)),!ai.default.existsSync(c))return r;let l=ai.default.readdirSync(c);for(let u of l){let d=ks.default.join(c,u),p=ai.default.statSync(d);if(p.isDirectory()){let m={...e};if(s)o||(m.nodeName=u);else{if(u==="__group__")continue;m.builderName=u}t.refs(m,r)}else{if(a&&p.mtimeatob(h)).join(" "),m=atob(l.short).replace(/\s\(line \d+\)$/,"");l.url&&(m+=` +`)}i(zIt,"_buildMessageForResponseErrors");var VIt=class extends Error{static{i(this,"GraphqlResponseError")}constructor(t,e,r){super(zIt(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},WIt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],YIt=["query","method","url"],UIe=/\/api\/v3\/?$/;function JIt(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(YIt.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((a,c)=>WIt.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),o=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return UIe.test(o)&&(s.url=o.replace(UIe,"/api/graphql")),t(s).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new VIt(s,c,a.data)}return a.data.data})}i(JIt,"graphql");function rY(t,e){let r=t.defaults(e);return Object.assign(i((s,o)=>JIt(r,s,o),"newApi"),{defaults:rY.bind(null,r),endpoint:r.endpoint})}i(rY,"withDefaults");var LCr=rY(cw,{headers:{"user-agent":`octokit-graphql.js/${$It} ${yd()}`},method:"POST",url:"/graphql"});function qIe(t){return rY(t,{method:"POST",url:"/graphql"})}i(qIe,"withCustomRequest");var nY="(?:[a-zA-Z0-9_-]+)",GIe="\\.",HIe=new RegExp(`^${nY}${GIe}${nY}${GIe}${nY}$`),jIt=HIe.test.bind(HIe);async function KIt(t){let e=jIt(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}i(KIt,"auth");function XIt(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}i(XIt,"withAuthorizationPrefix");async function ZIt(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=XIt(t),e(s)}i(ZIt,"hook");var $Ie=i(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(KIt.bind(null,e),{hook:ZIt.bind(null,e)})},"createTokenAuth2");var sY="7.0.6";var zIe=i(()=>{},"noop"),ewt=console.warn.bind(console),twt=console.error.bind(console);function rwt(t={}){return typeof t.debug!="function"&&(t.debug=zIe),typeof t.info!="function"&&(t.info=zIe),typeof t.warn!="function"&&(t.warn=ewt),typeof t.error!="function"&&(t.error=twt),t}i(rwt,"createLogger");var VIe=`octokit-core.js/${sY} ${yd()}`,pP=class{static{i(this,"Octokit")}static VERSION=sY;static defaults(e){return class extends this{static{i(this,"OctokitWithDefaults")}constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{i(this,"NewOctokit")}static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new EIe.Collection,n={baseUrl:cw.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${VIe}`:VIe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=cw.defaults(n),this.graphql=qIe(this.request).defaults(n),this.log=rwt(e.log),this.hook=r,e.authStrategy){let{authStrategy:o,...a}=e,c=o(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let o=$Ie(e.auth);r.wrap("request",o.hook),this.auth=o}let s=this.constructor;for(let o=0;o({async next(){if(!c)return{done:!0};try{let l=await s({method:o,url:c,headers:a}),u=cwt(l);if(c=((u.headers.link||"").match(/<([^<>]+)>;\s*rel="next"/)||[])[1],!c&&"total_commits"in u.data){let d=new URL(u.url),p=d.searchParams,m=parseInt(p.get("page")||"1",10),f=parseInt(p.get("per_page")||"250",10);m*f{if(s.done)return e;let o=!1;function a(){o=!0}return i(a,"done"),e=e.concat(n?n(s.value,a):s.value.data),o?e:JIe(t,e,r,n)})}i(JIe,"gather");var cIr=Object.assign(YIe,{iterator:cY});function lY(t){return{paginate:Object.assign(YIe.bind(null,t),{iterator:cY.bind(null,t)})}}i(lY,"paginateRest");lY.VERSION=awt;var fIr=new og,uY=mIe(),lwt={baseUrl:uY,request:{agent:dIe(uY),fetch:pIe(uY)}},jIe=pP.plugin(aY,lY).defaults(lwt);function KIe(t,e){let r=Object.assign({},e||{}),n=uIe(t,r);n&&(r.auth=n);let s=jW(r.userAgent);return s&&(r.userAgent=s),r}i(KIe,"getOctokitOptions");var cg=new og;function XIe(t,e,...r){let n=jIe.plugin(...r);return new n(KIe(t,e))}i(XIe,"getOctokit");var $m=class extends Error{static{i(this,"InvalidTokenError")}};$m.prototype.name="InvalidTokenError";function dwt(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}i(dwt,"b64DecodeUnicode");function pwt(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return dwt(e)}catch{return atob(e)}}i(pwt,"base64UrlDecode");function ZIe(t,e){if(typeof t!="string")throw new $m("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new $m(`Invalid token specified: missing part #${r+1}`);let s;try{s=pwt(n)}catch(o){throw new $m(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(s)}catch(o){throw new $m(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}i(ZIe,"jwtDecode");var lg=class t{static{i(this,"GitHub")}githubToken;octokit;constructor(e){this.githubToken=e?.token||process.env.GITHUB_TOKEN,this.octokit=XIe(`${this.githubToken}`)}repoData(){return this.octokit.rest.repos.get({...cg.repo}).then(e=>e.data)}async releases(e,r){let n;try{n=await this.releasesRaw(e,r)}catch(s){if(!this.githubToken)throw s;n=await this.releasesRaw(e,r,this.githubToken)}return n}async releasesRaw(e,r,n){let s=`https://raw.githubusercontent.com/${r.owner}/${r.repo}/${r.ref}/${r.path}`,a=await new so("docker-actions-toolkit").get(s,n?{Authorization:`token ${n}`}:void 0),c=await a.readBody(),l=a.message.statusCode||500;if(l>=400)throw new Error(`Failed to get ${e} releases from ${s} with status code ${l}: ${c}`);return JSON.parse(c)}static get context(){return cg}static get serverURL(){return process.env.GITHUB_SERVER_URL||"https://github.com"}static get apiURL(){return process.env.GITHUB_API_URL||"https://api.github.com"}static get isGHES(){let r=new URL(t.serverURL).hostname.trimEnd().toUpperCase(),n=r==="GITHUB.COM",s=r.endsWith(".GHE.COM"),o=r.endsWith(".LOCALHOST");return!n&&!s&&!o}static get repository(){return`${cg.repo.owner}/${cg.repo.repo}`}static get workspace(){return process.env.GITHUB_WORKSPACE||process.cwd()}static get runId(){return process.env.GITHUB_RUN_ID?+process.env.GITHUB_RUN_ID:cg.runId}static get runAttempt(){return process.env.GITHUB_RUN_ATTEMPT?+process.env.GITHUB_RUN_ATTEMPT:1}static workflowRunURL(e){return`${t.serverURL}/${t.repository}/actions/runs/${t.runId}${e?`/attempts/${t.runAttempt}`:""}`}static get actionsRuntimeToken(){let e=process.env.ACTIONS_RUNTIME_TOKEN||"";return e?ZIe(e):void 0}static async printActionsRuntimeTokenACs(){let e;try{e=t.actionsRuntimeToken}catch(r){throw new Error(`Cannot parse GitHub Actions Runtime Token: ${r.message}`)}if(!e)throw new Error("ACTIONS_RUNTIME_TOKEN not set");try{JSON.parse(`${e.ac}`).forEach(r=>{let n;switch(r.Permission){case 1:n="read";break;case 2:n="write";break;case 3:n="read/write";break;default:n=`unimplemented (${r.Permission})`}be(`${r.Scope}: ${n}`)})}catch(r){throw new Error(`Cannot parse GitHub Actions Runtime Token ACs: ${r.message}`)}}};var mP=class t{static{i(this,"Buildx")}_version;_versionOnce;_standalone;static containerNamePrefix="buildx_buildkit_";constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}static get configDir(){return process.env.BUILDX_CONFIG||ks.default.join(gd.configDir,"buildx")}static get refsDir(){return ks.default.join(t.configDir,"refs")}static get refsGroupDir(){return ks.default.join(t.refsDir,"__group__")}static get certsDir(){return ks.default.join(t.configDir,"certs")}async isStandalone(){let e=this._standalone??!await gd.isAvailable();return v(`Buildx.isStandalone: ${e}`),e}async getCommand(e){let r=await this.isStandalone();return{command:r?"buildx":"docker",args:r?e:["buildx",...e]}}async isAvailable(){let e=await this.getCommand([]),r=await Yl.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(v(`Buildx.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(v(`Buildx.isAvailable error: ${n}`),!1));return v(`Buildx.isAvailable: ${r}`),r}async version(){if(this._versionOnce)return this._version;this._versionOnce=!0;let e=await this.getCommand(["version"]);return this._version=await Yl.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr.trim());return t.parseVersion(r.stdout.trim())}),this._version}async printVersion(){let e=await this.getCommand(["version"]);await Yl.exec(e.command,e.args,{failOnStdErr:!1})}static parseVersion(e){let r=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!r)throw new Error("Cannot parse buildx version");return r[1]}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return v("Buildx.versionSatisfies false: undefined version"),!1;let s=ewe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return v(`Buildx.versionSatisfies ${n} statisfies ${e}: ${s}`),s}static resolveCertsDriverOpts(e,r,n){let s;try{s=new URL(r)}catch{return[]}if(s.protocol!="tcp:")return[];let o=[];if(Object.keys(n).length==0)return o;let a=s.hostname;if(s.port.length>0&&(a+=`-${s.port}`),n.cacert!==void 0){let c=ks.default.join(t.certsDir,`cacert_${a}.pem`);ai.default.writeFileSync(c,n.cacert),o.push(`cacert=${c}`)}if(n.cert!==void 0){let c=ks.default.join(t.certsDir,`cert_${a}.pem`);ai.default.writeFileSync(c,n.cert),o.push(`cert=${c}`)}if(n.key!==void 0){let c=ks.default.join(t.certsDir,`key_${a}.pem`);ai.default.writeFileSync(c,n.key),o.push(`key=${c}`)}return e!="remote"?[]:o}static localState(e,r){let[n,s,o]=e.split("/");if(!n||!s||!o)throw new Error(`Invalid build reference: ${e}`);let a=ks.default.join(r||t.refsDir,n,s,o);if(!ai.default.existsSync(a))throw new Error(`Local state not found in ${a}`);return t.fixLocalState(JSON.parse(ai.default.readFileSync(a,"utf8")))}static fixLocalState(e){let r=i(function(a){let c=a.match(/(.*)(https?:\/{1,2}\S+|ssh:\/{1,2}\S+|git:\/{1,2}\S+)/i);if(c&&c.length==3){let l=c[1],u=c[2];return u.startsWith("https:/")&&!u.startsWith("https://")&&(u=u.replace("https:/","https://")),u.startsWith("http:/")&&!u.startsWith("http://")&&(u=u.replace("http:/","http://")),u.startsWith("ssh:/")&&!u.startsWith("ssh://")&&(u=u.replace("ssh:/","ssh://")),u.startsWith("git:/")&&!u.startsWith("git://")&&(u=u.replace("git:/","git://")),[u,l,!0]}return[a,"",!1]},"fnTrimToValidContext"),[n,s,o]=r(e.LocalPath);return o&&(e.LocalPath=n,e.DockerfilePath.indexOf(s)===0&&(e.DockerfilePath=e.DockerfilePath.substring(s.length))),e.LocalPath=e.LocalPath.endsWith("/-")?"-":e.LocalPath,e.DockerfilePath=e.DockerfilePath.endsWith("/-")?"-":e.DockerfilePath,e}static refs(e,r={}){let{dir:n,builderName:s,nodeName:o,since:a}=e,c=ks.default.resolve(n);if(e.builderName&&(c=ks.default.join(c,e.builderName)),e.nodeName&&(c=ks.default.join(c,e.nodeName)),!ai.default.existsSync(c))return r;let l=ai.default.readdirSync(c);for(let u of l){let d=ks.default.join(c,u),p=ai.default.statSync(d);if(p.isDirectory()){let m={...e};if(s)o||(m.nodeName=u);else{if(u==="__group__")continue;m.builderName=u}t.refs(m,r)}else{if(a&&p.mtimeatob(h)).join(" "),m=atob(l.short).replace(/\s\(line \d+\)$/,"");l.url&&(m+=` More info: ${l.url}`);let f=l.range&&l.range.length>0?l.range[0]?.start.line:void 0,A=!1;for(let h of a)if(h.remote||h.path.endsWith(u)&&h.content===d){c.push({title:p,message:m,file:h.path,startLine:f}),A=!0;break}A||v(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${p}`)}return c}};function twe(){return{registry:_i("registry"),username:_i("username"),password:_i("password"),scope:_i("scope"),ecr:_i("ecr"),logout:roe("logout"),registryAuth:_i("registry-auth")}}i(twe,"getInputs");function rwe(t){if(t.registryAuth&&(t.registry||t.username||t.password||t.scope||t.ecr))throw new Error("Cannot use registry-auth with other inputs");let e=[];if(t.registryAuth)e=Vhe(t.registryAuth).map(r=>{r.password&&xn(r.password);let n=r.registry||"docker.io";return{registry:n,username:r.username,password:r.password,scope:r.scope,ecr:r.ecr||"auto",configDir:fP(n,r.scope)}});else{let r=t.registry||"docker.io";e.push({registry:r,username:t.username,password:t.password,scope:t.scope,ecr:t.ecr||"auto",configDir:fP(r,t.scope)})}if(e.length==0)throw new Error("No registry to login");return e}i(rwe,"getAuthList");function fP(t,e){if(mwt()||!e||e==="")return"";let r=dY.default.join(mP.configDir,"config",t==="docker.io"?"registry-1.docker.io":t);return e.startsWith("@")?r+=e:r=dY.default.join(r,e),r}i(fP,"scopeToConfigDir");function mwt(){return process.env.DOCKER_LOGIN_SCOPE_DISABLED?hd.parseBool(process.env.DOCKER_LOGIN_SCOPE_DISABLED):!1}i(mwt,"scopeDisabled");var Jqe=R(tUe(),1),jqe=R(_qe(),1),z9=R(lu(),1);var Oqe=R(require("net"),1),Mqe=R(require("tls"),1),Fqe=R(nm(),1),Uqe=require("events");var Dqe=R(require("net"),1),kqe=R(require("http"),1),Lqe=require("https");var al=Symbol("AgentBaseInternalState"),aM=class extends kqe.Agent{static{i(this,"Agent")}constructor(e){super(e),this[al]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(` `).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Dqe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Lqe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),a=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(o,a),typeof c.addRequest=="function")try{return c.addRequest(e,s)}catch(l){return n(l)}this[al].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(o,a),n(c)})}createConnection(){let e=this[al].currentSocket;if(this[al].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[al].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[al]&&(this[al].defaultPort=e)}get protocol(){return this[al].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[al]&&(this[al].protocol=e)}};var G9=require("url");function cM(){return async({response:t,scheme:e})=>{if(e.toLowerCase()!=="negotiate")throw new Error(`Expected Negotiate scheme but got "${e}"`);let r;try{r=await import("kerberos")}catch{throw new Error('The "kerberos" package is required for Negotiate proxy authentication. Install it with: npm install kerberos')}let n=t.headers["proxy-authenticate"]||"",s=Array.isArray(n)?n[0]:n,o=typeof s=="string"&&s.includes(" ")?s.split(" ").slice(1).join(" "):void 0,c=await(await r.initializeClient("HTTP@proxy",{mechOID:r.GSS_MECH_OID_SPNEGO})).step(o||"");if(!c)throw new Error("Kerberos client.step() returned no token");return{headers:{"Proxy-Authorization":`Negotiate ${c}`}}}}i(cM,"createNegotiateAuth");var Dy=(0,Fqe.default)("http-proxy-agent"),Px=class extends aM{static{i(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new G9.URL(e):e,this.proxyHeaders=r?.headers??{},Dy("Creating new HttpProxyAgent instance: %o",this.proxy.href),r?.negotiate?this.onProxyAuth=cM():r?.onProxyAuth&&(this.onProxyAuth=r.onProxyAuth);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?OGt(r,"headers","onProxyAuth","negotiate"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",o=e.getHeader("host")||"localhost",a=`${s}//${o}`,c=new G9.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let u=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(l)){let d=l[u];d&&e.setHeader(u,d)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;Dy("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Dy("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r \r @@ -220,7 +220,7 @@ More info: ${l.url}`);let f=l.range&&l.range.length>0?l.range[0]?.start.line:voi `);let{connect:u,buffered:d}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),e.emit("proxy",{proxy:this.proxy.href,socket:s}),u.statusCode===200)return e.once("socket",zqe),r.secureEndpoint?(kf("Upgrading socket connection to TLS"),Qx.connect({...$9(dM(r),"host","path","port"),socket:s})):s;if(u.statusCode===407&&this.onProxyAuth){kf("Got 407 response, invoking onProxyAuth callback"),s.destroy();let m=u.headers["proxy-authenticate"]||"",f=Array.isArray(m)?m[0].split(/\s/)[0]:m.split(/\s/)[0],A=await this.onProxyAuth({response:u,scheme:f});return this._connectWithAuth(e,r,A.headers)}s.destroy();let p=new ll.Socket({writable:!1});return p.readable=!0,e.once("socket",m=>{kf("Replaying proxy buffer for failed request"),(0,Vqe.default)(m.listenerCount("data")>0),m.push(d),m.push(null)}),p}async _connectWithAuth(e,r,n){let{proxy:s}=this,o;s.protocol==="https:"?o=Qx.connect(dM(this.connectOpts)):o=ll.connect(this.connectOpts);let a=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},c=ll.isIPv6(r.host)?`[${r.host}]`:r.host,l=`CONNECT ${c}:${r.port} HTTP/1.1\r `;if(s.username||s.password){let p=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;a["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}Object.assign(a,n),a.Host=`${c}:${r.port}`,a["Proxy-Connection"]||(a["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(a))l+=`${p}: ${a[p]}\r `;let u=H9(o);o.write(`${l}\r -`);let{connect:d}=await u;if(e.emit("proxyConnect",d),this.emit("proxyConnect",d,e),d.statusCode===200)return e.once("socket",zqe),r.secureEndpoint?(kf("Upgrading socket connection to TLS"),Qx.connect({...$9(dM(r),"host","path","port"),socket:o})):o;throw o.destroy(),new Error(`Proxy authentication failed with status ${d.statusCode} after retry`)}};_x.protocols=["http","https"];function zqe(t){setImmediate(()=>{t.resume()})}i(zqe,"resume");function $9(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i($9,"omit");var V9=/^(([0-9]{12})\.(dkr\.ecr|dkr-ecr)\.(.+)\.(on\.aws|amazonaws\.(com(.cn)?|eu)))(\/([^:]+)(:.+)?)?$/,MGt=/public\.ecr\.aws|ecr-public\.aws\.com/,Kqe=i(t=>V9.test(t)||pM(t),"isECR"),pM=i(t=>MGt.test(t),"isPubECR"),FGt=i(t=>{if(pM(t))return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1";let e=t.match(V9);return e?e[4]:""},"getRegion"),UGt=i(t=>{if(pM(t))return[];let e=t.match(V9);if(!e)return[];let r=[e[2]];return process.env.AWS_ACCOUNT_IDS&&r.push(...process.env.AWS_ACCOUNT_IDS.split(",")),r.filter((n,s)=>r.indexOf(n)===s)},"getAccountIDs"),Xqe=i(async(t,e,r)=>{let n=FGt(t),s=UGt(t),o={};s.length>0&&(v(`Requesting AWS ECR auth token for ${s.join(", ")}`),o.registryIds=s);let a,c=process.env.http_proxy||process.env.HTTP_PROXY||"";c&&(v(`Using http proxy ${c}`),a=new Px(c));let l,u=process.env.https_proxy||process.env.HTTPS_PROXY||"";u&&(v(`Using https proxy ${u}`),l=new _x(u));let d=e&&r?{accessKeyId:e,secretAccessKey:r}:void 0;if(pM(t)){be(`AWS Public ECR detected with ${n} region`);let m=await new jqe.ECRPUBLIC({customUserAgent:"docker-login-action",credentials:d,region:n,requestHandler:new z9.NodeHttpHandler({httpAgent:a,httpsAgent:l})}).getAuthorizationToken(o);if(!m.authorizationData||!m.authorizationData.authorizationToken)throw new Error("Could not retrieve an authorization token from AWS Public ECR");let A=Buffer.from(m.authorizationData.authorizationToken,"base64").toString("utf-8").split(":",2);return xn(A[0]),xn(A[1]),[{registry:"public.ecr.aws",username:A[0],password:A[1]}]}else{be(`AWS ECR detected with ${n} region`);let m=await new Jqe.ECR({customUserAgent:"docker-login-action",credentials:d,region:n,requestHandler:new z9.NodeHttpHandler({httpAgent:a,httpsAgent:l})}).getAuthorizationToken(o);if(!Array.isArray(m.authorizationData)||!m.authorizationData.length)throw new Error("Could not retrieve an authorization token from AWS ECR");let f=[];for(let A of m.authorizationData){let E=Buffer.from(A.authorizationToken||"","base64").toString("utf-8").split(":",2);xn(E[0]),xn(E[1]),f.push({registry:A.proxyEndpoint||"",username:E[0],password:E[1]})}return f}},"getRegistriesData");var Zqe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function GGt(t){return typeof t=="string"&&Zqe.test(t)}i(GGt,"validate");var W9=GGt;var HGt=new Set(["","docker.io","registry-1.docker.io","registry-1-stage.docker.io","dhi.io"]),$Gt=300,eGe=300,tGe=3600,rGe=5,nGe=i((t,e)=>process.env.DOCKERHUB_OIDC_CONNECTIONID!==void 0&&!e&&HGt.has(t),"isDockerHubOIDC"),sGe=i(async(t,e)=>{let r=process.env.DOCKERHUB_OIDC_CONNECTIONID?.trim();if(!r)throw new Error("DOCKERHUB_OIDC_CONNECTIONID is required for Docker Hub OIDC login");if(!W9(r))throw new Error("Invalid DOCKERHUB_OIDC_CONNECTIONID. Must be a valid UUID.");let n=zGt(),s=t==="registry-1-stage.docker.io"?"identity-stage.docker.com":"identity.docker.com",o=`https://${s}`,a=await ooe(o),c=new so("github.com/docker/login-action",[],{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),l=new URLSearchParams;l.set("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),l.set("subject_token_type","urn:ietf:params:oauth:token-type:id_token"),l.set("subject_token",a),l.set("connection_id",r),l.set("expires_in",n.toString());let u=await VGt(c,`https://${s}/oauth/token`,l.toString()),d=JSON.parse(await YGt(u));return xn(d.access_token),{username:e,token:d.access_token}},"getOIDCToken"),zGt=i(()=>{let t=process.env.DOCKERHUB_OIDC_EXPIREIN?.trim()||$Gt.toString(),e=Number(t);if(isNaN(e)||etGe)throw new Error(`Invalid DOCKERHUB_OIDC_EXPIREIN: ${t}. Must be between ${eGe} and ${tGe}`);return e},"getExpiresIn"),VGt=i(async(t,e,r)=>{let n=await t.post(e,r);for(let s=0;(n.message.statusCode||ft.InternalServerError)===ft.TooManyRequests&&ssetTimeout(a,o)),n=await t.post(e,r)}return n},"postWithRetry"),WGt=i(t=>{if(t===void 0)return null;Array.isArray(t)&&(t=t[0]);let e=Number(t);return isNaN(e)?null:Math.max(0,e*1e3)},"parseRetryAfter"),YGt=i(async t=>{let e=await t.readBody(),r=t.message.statusCode||ft.InternalServerError;if(r=ft.MultipleChoices)throw JGt(r,e);return e},"handleResponse"),JGt=i((t,e)=>{if(t===401)throw new Error("Docker Hub API: operation not permitted");if(e){let r=jGt(e);for(let n of["description","message","detail","error"])if(r[n])throw new Error(`Docker Hub API: bad status code ${t}: ${r[n]}`)}throw new Error(`Docker Hub API: bad status code ${t}`)},"parseError"),jGt=i(t=>{try{return JSON.parse(t)}catch{return{}}},"parseErrorBody");async function Y9(t){if(/true/i.test(t.ecr)||t.ecr=="auto"&&Kqe(t.registry))await ZGt(t.registry,t.username,t.password,t.scope);else{let e=t.username,r=t.password;if(nGe(t.registry,r)){let n=await sGe(t.registry,e);e=n.username,r=n.token}await XGt(t.registry,e,r,t.scope)}}i(Y9,"login");async function oGe(t,e){let r;e!==""&&(r=Object.assign({},process.env,{DOCKER_CONFIG:e}),be(`Alternative config dir: ${e}`)),await gd.getExecOutput(["logout",t],{ignoreReturnCode:!0,env:r}).then(n=>{n.stderr.length>0&&n.exitCode!=0&&Ar(n.stderr.trim())})}i(oGe,"logout");async function XGt(t,e,r,n){if(!e&&!r)throw new Error("Username and password required");if(!e)throw new Error("Username required");if(!r)throw new Error("Password required");await iGe(t,e,r,n)}i(XGt,"loginStandard");async function ZGt(t,e,r,n){be("Retrieving registries data through AWS SDK...");let s=await Xqe(t,e,r);for(let o of s)await iGe(o.registry,o.username,o.password,n)}i(ZGt,"loginECR");async function iGe(t,e,r,n){let s,o=fP(t,n);o!==""?(s=Object.assign({},process.env,{DOCKER_CONFIG:o}),be(`Logging into ${t} (scope ${n})...`)):be(`Logging into ${t}...`),await gd.getExecOutput(["login","--password-stdin","--username",e,t],{ignoreReturnCode:!0,silent:!0,input:Buffer.from(r),env:s}).then(a=>{if(a.stderr.length>0&&a.exitCode!=0)throw new Error(a.stderr.trim());be("Login Succeeded!")})}i(iGe,"loginExec");var aGe=process.env.STATE_registries?JSON.parse(process.env.STATE_registries):[],cGe=/true/i.test(process.env.STATE_logout||"");function lGe(t){zp("registries",JSON.stringify(t))}i(lGe,"setRegistries");function uGe(t){zp("logout",t)}i(uGe,"setLogout");async function dGe(){let t=twe();uGe(t.logout);let e=rwe(t);if(lGe(Array.from(new Map(e.map(r=>[`${r.registry}|${r.configDir}`,{registry:r.registry,configDir:r.configDir}])).values())),e.length===1){await Y9(e[0]);return}for(let r of e)await HE(`Login to ${r.registry}`,async()=>{await Y9(r)})}i(dGe,"main");async function rHt(){if(cGe)for(let t of aGe)await HE(`Logout from ${t.registry}`,async()=>{await oGe(t.registry,t.configDir)})}i(rHt,"post");Ihe(dGe,rHt);0&&(module.exports={main}); +`);let{connect:d}=await u;if(e.emit("proxyConnect",d),this.emit("proxyConnect",d,e),d.statusCode===200)return e.once("socket",zqe),r.secureEndpoint?(kf("Upgrading socket connection to TLS"),Qx.connect({...$9(dM(r),"host","path","port"),socket:o})):o;throw o.destroy(),new Error(`Proxy authentication failed with status ${d.statusCode} after retry`)}};_x.protocols=["http","https"];function zqe(t){setImmediate(()=>{t.resume()})}i(zqe,"resume");function $9(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i($9,"omit");var V9=/^(([0-9]{12})\.(dkr\.ecr|dkr-ecr)\.(.+)\.(on\.aws|amazonaws\.(com(.cn)?|eu)))(\/([^:]+)(:.+)?)?$/,MGt=/public\.ecr\.aws|ecr-public\.aws\.com/,Kqe=i(t=>V9.test(t)||pM(t),"isECR"),pM=i(t=>MGt.test(t),"isPubECR"),FGt=i(t=>{if(pM(t))return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1";let e=t.match(V9);return e?e[4]:""},"getRegion"),UGt=i(t=>{if(pM(t))return[];let e=t.match(V9);if(!e)return[];let r=[e[2]];return process.env.AWS_ACCOUNT_IDS&&r.push(...process.env.AWS_ACCOUNT_IDS.split(",")),r.filter((n,s)=>r.indexOf(n)===s)},"getAccountIDs"),Xqe=i(async(t,e,r)=>{let n=FGt(t),s=UGt(t),o={};s.length>0&&(v(`Requesting AWS ECR auth token for ${s.join(", ")}`),o.registryIds=s);let a,c=process.env.http_proxy||process.env.HTTP_PROXY||"";c&&(v(`Using http proxy ${c}`),a=new Px(c));let l,u=process.env.https_proxy||process.env.HTTPS_PROXY||"";u&&(v(`Using https proxy ${u}`),l=new _x(u));let d=e&&r?{accessKeyId:e,secretAccessKey:r}:void 0;if(pM(t)){be(`AWS Public ECR detected with ${n} region`);let m=await new jqe.ECRPUBLIC({customUserAgent:"docker-login-action",credentials:d,region:n,requestHandler:new z9.NodeHttpHandler({httpAgent:a,httpsAgent:l})}).getAuthorizationToken(o);if(!m.authorizationData||!m.authorizationData.authorizationToken)throw new Error("Could not retrieve an authorization token from AWS Public ECR");let A=Buffer.from(m.authorizationData.authorizationToken,"base64").toString("utf-8").split(":",2);return xn(A[0]),xn(A[1]),[{registry:"public.ecr.aws",username:A[0],password:A[1]}]}else{be(`AWS ECR detected with ${n} region`);let m=await new Jqe.ECR({customUserAgent:"docker-login-action",credentials:d,region:n,requestHandler:new z9.NodeHttpHandler({httpAgent:a,httpsAgent:l})}).getAuthorizationToken(o);if(!Array.isArray(m.authorizationData)||!m.authorizationData.length)throw new Error("Could not retrieve an authorization token from AWS ECR");let f=[];for(let A of m.authorizationData){let E=Buffer.from(A.authorizationToken||"","base64").toString("utf-8").split(":",2);xn(E[0]),xn(E[1]),f.push({registry:A.proxyEndpoint||"",username:E[0],password:E[1]})}return f}},"getRegistriesData");var Zqe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function GGt(t){return typeof t=="string"&&Zqe.test(t)}i(GGt,"validate");var W9=GGt;var HGt=new Set(["","docker.io","registry-1.docker.io","registry-1-stage.docker.io","dhi.io"]),$Gt=300,eGe=300,tGe=3600,rGe=5,nGe=i((t,e)=>process.env.DOCKERHUB_OIDC_CONNECTIONID!==void 0&&!e&&HGt.has(t),"isDockerHubOIDC"),sGe=i(async(t,e)=>{let r=process.env.DOCKERHUB_OIDC_CONNECTIONID?.trim();if(!r)throw new Error("DOCKERHUB_OIDC_CONNECTIONID is required for Docker Hub OIDC login");if(!W9(r))throw new Error("Invalid DOCKERHUB_OIDC_CONNECTIONID. Must be a valid UUID.");let n=zGt(),s=t==="registry-1-stage.docker.io"?"identity-stage.docker.com":"identity.docker.com",o=`https://${s}`,a=await ooe(o),c=new so("github.com/docker/login-action",[],{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),l=new URLSearchParams;l.set("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),l.set("subject_token_type","urn:ietf:params:oauth:token-type:id_token"),l.set("subject_token",a),l.set("connection_id",r),l.set("expires_in",n.toString());let u=await VGt(c,`https://${s}/oauth/token`,l.toString()),d=JSON.parse(await YGt(u));return xn(d.access_token),{username:e,token:d.access_token}},"getOIDCToken"),zGt=i(()=>{let t=process.env.DOCKERHUB_OIDC_EXPIREIN?.trim()||$Gt.toString(),e=Number(t);if(isNaN(e)||etGe)throw new Error(`Invalid DOCKERHUB_OIDC_EXPIREIN: ${t}. Must be between ${eGe} and ${tGe}`);return e},"getExpiresIn"),VGt=i(async(t,e,r)=>{let n=await t.post(e,r);for(let s=0;(n.message.statusCode||ft.InternalServerError)===ft.TooManyRequests&&ssetTimeout(a,o)),n=await t.post(e,r)}return n},"postWithRetry"),WGt=i(t=>{if(t===void 0)return null;Array.isArray(t)&&(t=t[0]);let e=Number(t);return isNaN(e)?null:Math.max(0,e*1e3)},"parseRetryAfter"),YGt=i(async t=>{let e=await t.readBody(),r=t.message.statusCode||ft.InternalServerError;if(r=ft.MultipleChoices)throw JGt(r,e);return e},"handleResponse"),JGt=i((t,e)=>{if(e){let r;try{r=JSON.parse(e)}catch{r=void 0}if(r!==void 0)throw new Error(`Docker Hub API: bad status code ${t}: ${JSON.stringify(r)}`)}throw t===401?new Error("Docker Hub API: operation not permitted"):new Error(`Docker Hub API: bad status code ${t}`)},"parseError");async function Y9(t){if(/true/i.test(t.ecr)||t.ecr=="auto"&&Kqe(t.registry))await XGt(t.registry,t.username,t.password,t.scope);else{let e=t.username,r=t.password;if(nGe(t.registry,r)){let n=await sGe(t.registry,e);e=n.username,r=n.token}await KGt(t.registry,e,r,t.scope)}}i(Y9,"login");async function oGe(t,e){let r;e!==""&&(r=Object.assign({},process.env,{DOCKER_CONFIG:e}),be(`Alternative config dir: ${e}`)),await gd.getExecOutput(["logout",t],{ignoreReturnCode:!0,env:r}).then(n=>{n.stderr.length>0&&n.exitCode!=0&&Ar(n.stderr.trim())})}i(oGe,"logout");async function KGt(t,e,r,n){if(!e&&!r)throw new Error("Username and password required");if(!e)throw new Error("Username required");if(!r)throw new Error("Password required");await iGe(t,e,r,n)}i(KGt,"loginStandard");async function XGt(t,e,r,n){be("Retrieving registries data through AWS SDK...");let s=await Xqe(t,e,r);for(let o of s)await iGe(o.registry,o.username,o.password,n)}i(XGt,"loginECR");async function iGe(t,e,r,n){let s,o=fP(t,n);o!==""?(s=Object.assign({},process.env,{DOCKER_CONFIG:o}),be(`Logging into ${t} (scope ${n})...`)):be(`Logging into ${t}...`),await gd.getExecOutput(["login","--password-stdin","--username",e,t],{ignoreReturnCode:!0,silent:!0,input:Buffer.from(r),env:s}).then(a=>{if(a.stderr.length>0&&a.exitCode!=0)throw new Error(a.stderr.trim());be("Login Succeeded!")})}i(iGe,"loginExec");var aGe=process.env.STATE_registries?JSON.parse(process.env.STATE_registries):[],cGe=/true/i.test(process.env.STATE_logout||"");function lGe(t){zp("registries",JSON.stringify(t))}i(lGe,"setRegistries");function uGe(t){zp("logout",t)}i(uGe,"setLogout");async function dGe(){let t=twe();uGe(t.logout);let e=rwe(t);if(lGe(Array.from(new Map(e.map(r=>[`${r.registry}|${r.configDir}`,{registry:r.registry,configDir:r.configDir}])).values())),e.length===1){await Y9(e[0]);return}for(let r of e)await HE(`Login to ${r.registry}`,async()=>{await Y9(r)})}i(dGe,"main");async function tHt(){if(cGe)for(let t of aGe)await HE(`Logout from ${t.registry}`,async()=>{await oGe(t.registry,t.configDir)})}i(tHt,"post");Ihe(dGe,tHt);0&&(module.exports={main}); /*! Bundled license information: undici/lib/web/fetch/body.js: diff --git a/dist/index.cjs.map b/dist/index.cjs.map index 4b55228..7932eb5 100644 --- a/dist/index.cjs.map +++ b/dist/index.cjs.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/undici/lib/core/symbols.js", "../node_modules/undici/lib/core/errors.js", "../node_modules/undici/lib/core/constants.js", "../node_modules/undici/lib/core/tree.js", "../node_modules/undici/lib/core/util.js", "../node_modules/undici/lib/core/diagnostics.js", "../node_modules/undici/lib/core/request.js", "../node_modules/undici/lib/dispatcher/dispatcher.js", "../node_modules/undici/lib/dispatcher/dispatcher-base.js", "../node_modules/undici/lib/util/timers.js", "../node_modules/undici/lib/core/connect.js", "../node_modules/undici/lib/llhttp/utils.js", "../node_modules/undici/lib/llhttp/constants.js", "../node_modules/undici/lib/llhttp/llhttp-wasm.js", "../node_modules/undici/lib/llhttp/llhttp_simd-wasm.js", "../node_modules/undici/lib/web/fetch/constants.js", "../node_modules/undici/lib/web/fetch/global.js", "../node_modules/undici/lib/web/fetch/data-url.js", "../node_modules/undici/lib/web/fetch/webidl.js", "../node_modules/undici/lib/web/fetch/util.js", "../node_modules/undici/lib/web/fetch/symbols.js", "../node_modules/undici/lib/web/fetch/file.js", "../node_modules/undici/lib/web/fetch/formdata.js", "../node_modules/undici/lib/web/fetch/formdata-parser.js", "../node_modules/undici/lib/web/fetch/body.js", "../node_modules/undici/lib/dispatcher/client-h1.js", "../node_modules/undici/lib/dispatcher/client-h2.js", "../node_modules/undici/lib/handler/redirect-handler.js", "../node_modules/undici/lib/interceptor/redirect-interceptor.js", "../node_modules/undici/lib/dispatcher/client.js", "../node_modules/undici/lib/dispatcher/fixed-queue.js", "../node_modules/undici/lib/dispatcher/pool-stats.js", "../node_modules/undici/lib/dispatcher/pool-base.js", "../node_modules/undici/lib/dispatcher/pool.js", "../node_modules/undici/lib/dispatcher/balanced-pool.js", "../node_modules/undici/lib/dispatcher/agent.js", "../node_modules/undici/lib/dispatcher/proxy-agent.js", "../node_modules/undici/lib/dispatcher/env-http-proxy-agent.js", "../node_modules/undici/lib/handler/retry-handler.js", "../node_modules/undici/lib/dispatcher/retry-agent.js", "../node_modules/undici/lib/api/readable.js", "../node_modules/undici/lib/api/util.js", "../node_modules/undici/lib/api/api-request.js", "../node_modules/undici/lib/api/abort-signal.js", "../node_modules/undici/lib/api/api-stream.js", "../node_modules/undici/lib/api/api-pipeline.js", "../node_modules/undici/lib/api/api-upgrade.js", "../node_modules/undici/lib/api/api-connect.js", "../node_modules/undici/lib/api/index.js", "../node_modules/undici/lib/mock/mock-errors.js", "../node_modules/undici/lib/mock/mock-symbols.js", "../node_modules/undici/lib/mock/mock-utils.js", "../node_modules/undici/lib/mock/mock-interceptor.js", "../node_modules/undici/lib/mock/mock-client.js", "../node_modules/undici/lib/mock/mock-pool.js", "../node_modules/undici/lib/mock/pluralizer.js", "../node_modules/undici/lib/mock/pending-interceptors-formatter.js", "../node_modules/undici/lib/mock/mock-agent.js", "../node_modules/undici/lib/global.js", "../node_modules/undici/lib/handler/decorator-handler.js", "../node_modules/undici/lib/interceptor/redirect.js", "../node_modules/undici/lib/interceptor/retry.js", "../node_modules/undici/lib/interceptor/dump.js", "../node_modules/undici/lib/interceptor/dns.js", "../node_modules/undici/lib/web/fetch/headers.js", "../node_modules/undici/lib/web/fetch/response.js", "../node_modules/undici/lib/web/fetch/dispatcher-weakref.js", "../node_modules/undici/lib/web/fetch/request.js", "../node_modules/undici/lib/web/fetch/index.js", "../node_modules/undici/lib/web/fileapi/symbols.js", "../node_modules/undici/lib/web/fileapi/progressevent.js", "../node_modules/undici/lib/web/fileapi/encoding.js", "../node_modules/undici/lib/web/fileapi/util.js", "../node_modules/undici/lib/web/fileapi/filereader.js", "../node_modules/undici/lib/web/cache/symbols.js", "../node_modules/undici/lib/web/cache/util.js", "../node_modules/undici/lib/web/cache/cache.js", "../node_modules/undici/lib/web/cache/cachestorage.js", "../node_modules/undici/lib/web/cookies/constants.js", "../node_modules/undici/lib/web/cookies/util.js", "../node_modules/undici/lib/web/cookies/parse.js", "../node_modules/undici/lib/web/cookies/index.js", "../node_modules/undici/lib/web/websocket/events.js", "../node_modules/undici/lib/web/websocket/constants.js", "../node_modules/undici/lib/web/websocket/symbols.js", "../node_modules/undici/lib/web/websocket/util.js", "../node_modules/undici/lib/web/websocket/frame.js", "../node_modules/undici/lib/web/websocket/connection.js", "../node_modules/undici/lib/web/websocket/permessage-deflate.js", "../node_modules/undici/lib/web/websocket/receiver.js", "../node_modules/undici/lib/web/websocket/sender.js", "../node_modules/undici/lib/web/websocket/websocket.js", "../node_modules/undici/lib/web/eventsource/util.js", "../node_modules/undici/lib/web/eventsource/eventsource-stream.js", "../node_modules/undici/lib/web/eventsource/eventsource.js", "../node_modules/undici/index.js", "../node_modules/@actions/tool-cache/node_modules/semver/internal/constants.js", "../node_modules/@actions/tool-cache/node_modules/semver/internal/debug.js", "../node_modules/@actions/tool-cache/node_modules/semver/internal/re.js", "../node_modules/@actions/tool-cache/node_modules/semver/internal/parse-options.js", "../node_modules/@actions/tool-cache/node_modules/semver/internal/identifiers.js", "../node_modules/@actions/tool-cache/node_modules/semver/classes/semver.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/parse.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/valid.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/clean.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/inc.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/diff.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/major.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/minor.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/patch.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/prerelease.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/compare.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/rcompare.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/compare-loose.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/compare-build.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/sort.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/rsort.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/gt.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/lt.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/eq.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/neq.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/gte.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/lte.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/cmp.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/coerce.js", "../node_modules/@actions/tool-cache/node_modules/semver/internal/lrucache.js", "../node_modules/@actions/tool-cache/node_modules/semver/classes/range.js", "../node_modules/@actions/tool-cache/node_modules/semver/classes/comparator.js", "../node_modules/@actions/tool-cache/node_modules/semver/functions/satisfies.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/to-comparators.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/max-satisfying.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/min-satisfying.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/min-version.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/valid.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/outside.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/gtr.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/ltr.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/intersects.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/simplify.js", "../node_modules/@actions/tool-cache/node_modules/semver/ranges/subset.js", "../node_modules/@actions/tool-cache/node_modules/semver/index.js", "../node_modules/concat-map/index.js", "../node_modules/balanced-match/index.js", "../node_modules/minimatch/node_modules/brace-expansion/index.js", "../node_modules/minimatch/minimatch.js", "../node_modules/@actions/cache/node_modules/semver/internal/constants.js", "../node_modules/@actions/cache/node_modules/semver/internal/debug.js", "../node_modules/@actions/cache/node_modules/semver/internal/re.js", "../node_modules/@actions/cache/node_modules/semver/internal/parse-options.js", "../node_modules/@actions/cache/node_modules/semver/internal/identifiers.js", "../node_modules/@actions/cache/node_modules/semver/classes/semver.js", "../node_modules/@actions/cache/node_modules/semver/functions/parse.js", "../node_modules/@actions/cache/node_modules/semver/functions/valid.js", "../node_modules/@actions/cache/node_modules/semver/functions/clean.js", "../node_modules/@actions/cache/node_modules/semver/functions/inc.js", "../node_modules/@actions/cache/node_modules/semver/functions/diff.js", "../node_modules/@actions/cache/node_modules/semver/functions/major.js", "../node_modules/@actions/cache/node_modules/semver/functions/minor.js", "../node_modules/@actions/cache/node_modules/semver/functions/patch.js", "../node_modules/@actions/cache/node_modules/semver/functions/prerelease.js", "../node_modules/@actions/cache/node_modules/semver/functions/compare.js", "../node_modules/@actions/cache/node_modules/semver/functions/rcompare.js", "../node_modules/@actions/cache/node_modules/semver/functions/compare-loose.js", "../node_modules/@actions/cache/node_modules/semver/functions/compare-build.js", "../node_modules/@actions/cache/node_modules/semver/functions/sort.js", "../node_modules/@actions/cache/node_modules/semver/functions/rsort.js", "../node_modules/@actions/cache/node_modules/semver/functions/gt.js", "../node_modules/@actions/cache/node_modules/semver/functions/lt.js", "../node_modules/@actions/cache/node_modules/semver/functions/eq.js", "../node_modules/@actions/cache/node_modules/semver/functions/neq.js", "../node_modules/@actions/cache/node_modules/semver/functions/gte.js", "../node_modules/@actions/cache/node_modules/semver/functions/lte.js", "../node_modules/@actions/cache/node_modules/semver/functions/cmp.js", "../node_modules/@actions/cache/node_modules/semver/functions/coerce.js", "../node_modules/@actions/cache/node_modules/semver/functions/truncate.js", "../node_modules/@actions/cache/node_modules/semver/internal/lrucache.js", "../node_modules/@actions/cache/node_modules/semver/classes/range.js", "../node_modules/@actions/cache/node_modules/semver/classes/comparator.js", "../node_modules/@actions/cache/node_modules/semver/functions/satisfies.js", "../node_modules/@actions/cache/node_modules/semver/ranges/to-comparators.js", "../node_modules/@actions/cache/node_modules/semver/ranges/max-satisfying.js", "../node_modules/@actions/cache/node_modules/semver/ranges/min-satisfying.js", "../node_modules/@actions/cache/node_modules/semver/ranges/min-version.js", "../node_modules/@actions/cache/node_modules/semver/ranges/valid.js", "../node_modules/@actions/cache/node_modules/semver/ranges/outside.js", "../node_modules/@actions/cache/node_modules/semver/ranges/gtr.js", "../node_modules/@actions/cache/node_modules/semver/ranges/ltr.js", "../node_modules/@actions/cache/node_modules/semver/ranges/intersects.js", "../node_modules/@actions/cache/node_modules/semver/ranges/simplify.js", "../node_modules/@actions/cache/node_modules/semver/ranges/subset.js", "../node_modules/@actions/cache/node_modules/semver/index.js", "../node_modules/ms/index.js", "../node_modules/debug/src/common.js", "../node_modules/debug/src/browser.js", "../node_modules/has-flag/index.js", "../node_modules/supports-color/index.js", "../node_modules/debug/src/node.js", "../node_modules/debug/src/index.js", "../node_modules/@typespec/ts-http-runtime/node_modules/https-proxy-agent/node_modules/agent-base/src/helpers.ts", "../node_modules/@typespec/ts-http-runtime/node_modules/https-proxy-agent/node_modules/agent-base/src/index.ts", "../node_modules/@typespec/ts-http-runtime/node_modules/https-proxy-agent/src/parse-proxy-response.ts", "../node_modules/@typespec/ts-http-runtime/node_modules/https-proxy-agent/src/index.ts", "../node_modules/agent-base/src/helpers.ts", "../node_modules/agent-base/src/index.ts", "../node_modules/@typespec/ts-http-runtime/node_modules/http-proxy-agent/src/index.ts", "../node_modules/@azure/core-tracing/src/state-cjs.cts", "../node_modules/@azure/core-client/src/state-cjs.cts", "../node_modules/@azure/core-lro/node_modules/@azure/logger/src/log.ts", "../node_modules/@azure/core-lro/node_modules/@azure/logger/src/debug.ts", "../node_modules/@azure/core-lro/node_modules/@azure/logger/src/index.ts", "../node_modules/@azure/core-lro/node_modules/@azure/abort-controller/src/AbortSignal.ts", "../node_modules/@azure/core-lro/node_modules/@azure/abort-controller/src/AbortController.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/isNode.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/createAbortablePromise.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/delay.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/random.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/object.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/error.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/sha256.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/typeGuards.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/uuidUtils.native.ts", "../node_modules/@azure/core-lro/node_modules/@azure/core-util/src/uuidUtils.ts", "../node_modules/@azure/core-lro/src/logger.ts", "../node_modules/@azure/core-lro/src/poller/constants.ts", "../node_modules/@azure/core-lro/src/poller/operation.ts", "../node_modules/@azure/core-lro/src/http/operation.ts", "../node_modules/@azure/core-lro/src/poller/poller.ts", "../node_modules/@azure/core-lro/src/http/poller.ts", "../node_modules/@azure/core-lro/src/legacy/lroEngine/operation.ts", "../node_modules/@azure/core-lro/src/legacy/poller.ts", "../node_modules/@azure/core-lro/src/legacy/lroEngine/lroEngine.ts", "../node_modules/@actions/cache/package.json", "../node_modules/@actions/cache/lib/internal/shared/package-version.cjs", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/json-typings.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/base64.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/protobufjs-utf8.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/binary-format-contract.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/goog-varint.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/pb-long.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/binary-reader.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/assert.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/binary-writer.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/json-format-contract.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/message-type-contract.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/lower-camel-case.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-info.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/oneof.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-type-check.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-long-convert.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-reader.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-json-writer.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-reader.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-binary-writer.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-create.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-merge-partial.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-equals.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/message-type.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/reflection-contains-message-type.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/enum-object.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime/build/commonjs/index.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/reflection-info.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/service-type.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-error.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-options.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/deferred.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-output-stream.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/rpc-interceptor.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-call-context.js", "../node_modules/@actions/cache/node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/internal/constants.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/internal/debug.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/internal/re.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/internal/parse-options.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/internal/identifiers.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/classes/semver.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/parse.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/valid.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/clean.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/inc.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/diff.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/major.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/minor.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/patch.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/prerelease.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/compare.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/rcompare.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/compare-loose.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/compare-build.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/sort.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/rsort.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/gt.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/lt.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/eq.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/neq.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/gte.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/lte.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/cmp.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/coerce.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/truncate.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/internal/lrucache.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/classes/range.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/classes/comparator.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/functions/satisfies.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/to-comparators.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/max-satisfying.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/min-satisfying.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/min-version.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/valid.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/outside.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/gtr.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/ltr.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/intersects.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/simplify.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/ranges/subset.js", "../node_modules/@docker/actions-toolkit/node_modules/semver/index.js", "../node_modules/tmp/lib/tmp.js", "../node_modules/handlebars/lib/handlebars/utils.js", "../node_modules/handlebars/lib/handlebars/exception.js", "../node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js", "../node_modules/handlebars/lib/handlebars/helpers/each.js", "../node_modules/handlebars/lib/handlebars/helpers/helper-missing.js", "../node_modules/handlebars/lib/handlebars/helpers/if.js", "../node_modules/handlebars/lib/handlebars/helpers/log.js", "../node_modules/handlebars/lib/handlebars/helpers/lookup.js", "../node_modules/handlebars/lib/handlebars/helpers/with.js", "../node_modules/handlebars/lib/handlebars/helpers.js", "../node_modules/handlebars/lib/handlebars/decorators/inline.js", "../node_modules/handlebars/lib/handlebars/decorators.js", "../node_modules/handlebars/lib/handlebars/logger.js", "../node_modules/handlebars/lib/handlebars/internal/proto-access.js", "../node_modules/handlebars/lib/handlebars/base.js", "../node_modules/handlebars/lib/handlebars/safe-string.js", "../node_modules/handlebars/lib/handlebars/internal/wrapHelper.js", "../node_modules/handlebars/lib/handlebars/runtime.js", "../node_modules/handlebars/lib/handlebars/no-conflict.js", "../node_modules/handlebars/lib/handlebars.runtime.js", "../node_modules/handlebars/lib/handlebars/compiler/ast.js", "../node_modules/handlebars/lib/handlebars/compiler/parser.js", "../node_modules/handlebars/lib/handlebars/compiler/visitor.js", "../node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js", "../node_modules/handlebars/lib/handlebars/compiler/helpers.js", "../node_modules/handlebars/lib/handlebars/compiler/base.js", "../node_modules/handlebars/lib/handlebars/compiler/compiler.js", "../node_modules/source-map/lib/base64.js", "../node_modules/source-map/lib/base64-vlq.js", "../node_modules/source-map/lib/util.js", "../node_modules/source-map/lib/array-set.js", "../node_modules/source-map/lib/mapping-list.js", "../node_modules/source-map/lib/source-map-generator.js", "../node_modules/source-map/lib/binary-search.js", "../node_modules/source-map/lib/quick-sort.js", "../node_modules/source-map/lib/source-map-consumer.js", "../node_modules/source-map/lib/source-node.js", "../node_modules/source-map/source-map.js", "../node_modules/handlebars/lib/handlebars/compiler/code-gen.js", "../node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js", "../node_modules/handlebars/lib/handlebars.js", "../node_modules/handlebars/lib/handlebars/compiler/printer.js", "../node_modules/handlebars/lib/index.js", "../node_modules/@docker/actions-toolkit/node_modules/@actions/github/node_modules/@actions/http-client/src/proxy.ts", "../node_modules/@docker/actions-toolkit/node_modules/@actions/github/node_modules/@actions/http-client/src/index.ts", "../node_modules/fast-content-type-parse/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/isStreamingPayload/isStreamingPayload.js", "../node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js", "../node_modules/@smithy/types/dist-cjs/index.js", "../node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js", "../node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js", "../node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js", "../node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js", "../node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js", "../node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js", "../node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js", "../node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js", "../node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js", "../node_modules/@smithy/core/dist-es/submodules/transport/index.js", "../node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js", "../node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidProvider.js", "../node_modules/@smithy/core/dist-es/submodules/client/util-waiter/circularReplacer.js", "../node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js", "../node_modules/@smithy/core/dist-es/submodules/client/util-waiter/waiter.js", "../node_modules/@smithy/core/dist-es/submodules/client/util-waiter/poller.js", "../node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/validate.js", "../node_modules/@smithy/core/dist-es/submodules/client/util-waiter/createWaiter.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client.js", "../node_modules/@smithy/core/dist-es/submodules/schema/deref.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js", "../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js", "../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js", "../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js", "../node_modules/@smithy/core/dist-es/submodules/schema/index.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js", "../node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client-command-builder.js", "../node_modules/@smithy/core/dist-es/submodules/client/index.js", "../node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js", "../node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js", "../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js", "../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js", "../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js", "../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js", "../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js", "../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js", "../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js", "../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js", "../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js", "../node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js", "../node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/config/property-provider/ProviderError.js", "../node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js", "../node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js", "../node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js", "../node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js", "../node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js", "../node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js", "../node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js", "../node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js", "../node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/externalDataInterceptor.js", "../node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js", "../node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js", "../node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js", "../node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js", "../node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveCustomEndpointsConfig.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/utils/getEndpointFromRegion.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.js", "../node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getHostnameFromVariants.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedHostname.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedPartition.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js", "../node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getRegionInfo.js", "../node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js", "../node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js", "../node_modules/@smithy/core/dist-es/submodules/config/index.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getIgnoreConfiguredEndpointUrls.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/s3.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/index.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/createConfigValueProvider.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/bdd/BinaryDecisionDiagram.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/debugId.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/toDebugString.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/index.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/customEndpointFunctions.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/booleanEquals.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/coalesce.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isSet.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/not.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isIpAddress.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/split.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/stringEquals.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/substring.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/uriEncode.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/endpointFunctions.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateTemplate.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getReferenceValue.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateExpression.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/callFunction.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateCondition.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointHeaders.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointUrl.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/decideEndpoint.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateConditions.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateEndpointRule.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateErrorRule.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateRules.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/index.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointRequiredConfig.js", "../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js", "../node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serializerMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js", "../node_modules/@smithy/core/dist-es/submodules/serde/hash-node/hash-node.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/ByteArrayCollector.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.browser.js", "../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.js", "../node_modules/@smithy/core/dist-es/submodules/serde/index.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/chunked-blob-reader/chunked-blob-reader.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/hash-blob-browser/blobHasher.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/HashCalculator.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/readableStreamHasher.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js", "../node_modules/@smithy/core/dist-es/submodules/checksum/index.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js", "../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Fields.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/util-uri-escape/escape-uri.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/util-uri-escape/escape-uri-path.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/querystring-builder/buildQueryString.js", "../node_modules/@smithy/core/dist-es/submodules/protocols/index.js", "../node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js", "../node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/constants.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/retries-2026-config.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryBackoffStrategy.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/config.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/AdaptiveRetryStrategy.js", "../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/defaultRetryQuota.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/delayDecider.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/retryDecider.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/AdaptiveRetryStrategy.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js", "../node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/omitRetryHeadersMiddleware.js", "../node_modules/@smithy/core/dist-es/submodules/retry/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-logger/loggerMiddleware.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/configuration.js", "../node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/index.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/index.js", "../node_modules/@smithy/core/dist-es/normalizeProvider.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/pagination/createPaginator.js", "../node_modules/@smithy/core/dist-es/setFeature.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js", "../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/index.js", "../node_modules/@smithy/core/dist-es/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/configurations.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partitions.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partition.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/check-features.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/constants.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/encode-features.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/user-agent-middleware.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/crt-availability.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/is-crt-available.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/defaultUserAgent.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.js", "../node_modules/bowser/es5.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/isIpAddress.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/aws.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/resolveEndpoint.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/types/EndpointError.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/awsRegionConfig.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/stsRegionDefaultResolver.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/extensions.js", "../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js", "../node_modules/@smithy/signature-v4/dist-cjs/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js", "../node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js", "../node_modules/@smithy/credential-provider-imds/dist-cjs/index.js", "../node_modules/@smithy/node-http-handler/dist-cjs/index.js", "../node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js", "../node_modules/@aws-sdk/nested-clients/package.json", "../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-types.js", "../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js", "../node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js", "../node_modules/@smithy/core/dist-es/submodules/cbor/cbor.js", "../node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js", "../node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js", "../node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js", "../node_modules/@smithy/core/dist-es/submodules/cbor/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js", "../node_modules/@aws-sdk/xml-builder/dist-cjs/index.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js", "../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commandBuilder.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/enums.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js", "../node_modules/@aws-sdk/token-providers/dist-cjs/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/EndpointParameters.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commandBuilder.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/models_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/index.js", "../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js", "../node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js", "../node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commandBuilder.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/EndpointParameters.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthExtensionConfiguration.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commandBuilder.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/index.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/models_0.js", "../node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/index.js", "../node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js", "../node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js", "../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js", "../node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js", "../node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js", "../node_modules/@aws-sdk/client-ecr/dist-cjs/index.js", "../node_modules/@aws-sdk/client-ecr-public/dist-cjs/index.js", "../src/main.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/@actions/core/node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/core/node_modules/@actions/http-client/src/proxy.ts", "../node_modules/@actions/core/node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/platform.ts", "../node_modules/@actions/exec/src/exec.ts", "../node_modules/@actions/exec/src/toolrunner.ts", "../node_modules/@actions/io/src/io.ts", "../node_modules/@actions/io/src/io-util.ts", "../node_modules/@docker/actions-toolkit/src/cache.ts", "../node_modules/@actions/tool-cache/node_modules/@actions/core/src/command.ts", "../node_modules/@actions/tool-cache/node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/tool-cache/node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/tool-cache/node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/tool-cache/node_modules/@actions/core/src/platform.ts", "../node_modules/@actions/tool-cache/node_modules/@actions/core/src/core.ts", "../node_modules/@actions/tool-cache/src/tool-cache.ts", "../node_modules/@actions/tool-cache/src/manifest.ts", "../node_modules/@actions/cache/src/cache.ts", "../node_modules/@actions/glob/node_modules/@actions/core/src/command.ts", "../node_modules/@actions/glob/node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/glob/node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/glob/node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/glob/node_modules/@actions/core/src/platform.ts", "../node_modules/@actions/glob/node_modules/@actions/core/src/core.ts", "../node_modules/@actions/glob/src/internal-globber.ts", "../node_modules/@actions/glob/src/internal-glob-options-helper.ts", "../node_modules/@actions/glob/src/internal-path-helper.ts", "../node_modules/@actions/glob/src/internal-match-kind.ts", "../node_modules/@actions/glob/src/internal-pattern-helper.ts", "../node_modules/@actions/glob/src/internal-pattern.ts", "../node_modules/@actions/glob/src/internal-path.ts", "../node_modules/@actions/glob/src/internal-search-state.ts", "../node_modules/@actions/glob/src/glob.ts", "../node_modules/@actions/cache/src/internal/cacheUtils.ts", "../node_modules/@actions/cache/src/internal/constants.ts", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/cache/src/internal/cacheHttpClient.ts", "../node_modules/@typespec/ts-http-runtime/src/abort-controller/AbortError.ts", "../node_modules/@typespec/ts-http-runtime/src/logger/log.ts", "../node_modules/@typespec/ts-http-runtime/src/logger/debug.ts", "../node_modules/@typespec/ts-http-runtime/src/logger/logger.ts", "../node_modules/@typespec/ts-http-runtime/src/httpHeaders.ts", "../node_modules/@typespec/ts-http-runtime/src/util/uuidUtils.ts", "../node_modules/@typespec/ts-http-runtime/src/pipelineRequest.ts", "../node_modules/@typespec/ts-http-runtime/src/pipeline.ts", "../node_modules/@typespec/ts-http-runtime/src/util/object.ts", "../node_modules/@typespec/ts-http-runtime/src/util/error.ts", "../node_modules/@typespec/ts-http-runtime/src/util/inspect.ts", "../node_modules/@typespec/ts-http-runtime/src/util/sanitizer.ts", "../node_modules/@typespec/ts-http-runtime/src/restError.ts", "../node_modules/@typespec/ts-http-runtime/src/util/bytesEncoding.ts", "../node_modules/@typespec/ts-http-runtime/src/nodeHttpClient.ts", "../node_modules/@typespec/ts-http-runtime/src/log.ts", "../node_modules/@typespec/ts-http-runtime/src/defaultHttpClient.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/logPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/redirectPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/util/userAgentPlatform.ts", "../node_modules/@typespec/ts-http-runtime/src/util/userAgent.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/userAgentPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/decompressResponsePolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/util/random.ts", "../node_modules/@typespec/ts-http-runtime/src/util/delay.ts", "../node_modules/@typespec/ts-http-runtime/src/util/helpers.ts", "../node_modules/@typespec/ts-http-runtime/src/retryStrategies/throttlingRetryStrategy.ts", "../node_modules/@typespec/ts-http-runtime/src/retryStrategies/exponentialRetryStrategy.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/retryPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/defaultRetryPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/util/checkEnvironment.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/formDataPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/proxyPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/agentPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/tlsPolicy.ts", "../node_modules/@typespec/ts-http-runtime/src/util/typeGuards.ts", "../node_modules/@typespec/ts-http-runtime/src/util/concat.ts", "../node_modules/@typespec/ts-http-runtime/src/policies/multipartPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/pipeline.ts", "../node_modules/@azure/logger/src/index.ts", "../node_modules/@azure/core-rest-pipeline/src/log.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/logPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/redirectPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/util/userAgentPlatform.ts", "../node_modules/@azure/core-rest-pipeline/src/constants.ts", "../node_modules/@azure/core-rest-pipeline/src/util/userAgent.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/userAgentPolicy.ts", "../node_modules/@azure/abort-controller/src/AbortError.ts", "../node_modules/@azure/core-util/src/createAbortablePromise.ts", "../node_modules/@azure/core-util/src/delay.ts", "../node_modules/@azure/core-util/src/error.ts", "../node_modules/@azure/core-util/src/index.ts", "../node_modules/@azure/core-rest-pipeline/src/util/file.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/multipartPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/decompressResponsePolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/defaultRetryPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/formDataPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/proxyPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/setClientRequestIdPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/agentPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/tlsPolicy.ts", "../node_modules/@azure/core-tracing/src/tracingContext.ts", "../node_modules/@azure/core-tracing/src/state.ts", "../node_modules/@azure/core-tracing/src/instrumenter.ts", "../node_modules/@azure/core-tracing/src/tracingClient.ts", "../node_modules/@azure/core-rest-pipeline/src/restError.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/tracingPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/util/wrapAbortSignal.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/wrapAbortSignalLikePolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/createPipelineFromOptions.ts", "../node_modules/@azure/core-rest-pipeline/src/defaultHttpClient.ts", "../node_modules/@azure/core-rest-pipeline/src/httpHeaders.ts", "../node_modules/@azure/core-rest-pipeline/src/pipelineRequest.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/retryPolicy.ts", "../node_modules/@azure/core-rest-pipeline/src/util/tokenCycler.ts", "../node_modules/@azure/core-rest-pipeline/src/policies/bearerTokenAuthenticationPolicy.ts", "../node_modules/@azure/core-auth/src/tokenCredential.ts", "../node_modules/@azure/core-http-compat/src/policies/disableKeepAlivePolicy.ts", "../node_modules/@azure/core-client/src/base64.ts", "../node_modules/@azure/core-client/src/utils.ts", "../node_modules/@azure/core-client/src/serializer.ts", "../node_modules/@azure/core-client/src/state.ts", "../node_modules/@azure/core-client/src/operationHelpers.ts", "../node_modules/@azure/core-client/src/deserializationPolicy.ts", "../node_modules/@azure/core-client/src/interfaceHelpers.ts", "../node_modules/@azure/core-client/src/serializationPolicy.ts", "../node_modules/@azure/core-client/src/pipeline.ts", "../node_modules/@azure/core-client/src/httpClientCache.ts", "../node_modules/@azure/core-client/src/urlHelpers.ts", "../node_modules/@azure/core-client/src/log.ts", "../node_modules/@azure/core-client/src/serviceClient.ts", "../node_modules/@azure/core-client/src/authorizeRequestOnTenantChallenge.ts", "../node_modules/@azure/core-http-compat/src/util.ts", "../node_modules/@azure/core-http-compat/src/response.ts", "../node_modules/@azure/core-http-compat/src/extendedClient.ts", "../node_modules/@azure/core-http-compat/src/policies/requestPolicyFactoryPolicy.ts", "../node_modules/@azure/core-http-compat/src/httpClientAdapter.ts", "../node_modules/fast-xml-parser/src/util.js", "../node_modules/fast-xml-parser/src/validator.js", "../node_modules/@nodable/entities/src/entities.js", "../node_modules/@nodable/entities/src/EntityDecoder.js", "../node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js", "../node_modules/fast-xml-parser/src/xmlparser/xmlNode.js", "../node_modules/xml-naming/src/index.js", "../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js", "../node_modules/strnum/strnum.js", "../node_modules/fast-xml-parser/src/ignoreAttributes.js", "../node_modules/path-expression-matcher/src/Expression.js", "../node_modules/path-expression-matcher/src/ExpressionSet.js", "../node_modules/path-expression-matcher/src/Matcher.js", "../node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js", "../node_modules/fast-xml-parser/src/xmlparser/node2json.js", "../node_modules/fast-xml-parser/src/xmlparser/XMLParser.js", "../node_modules/fast-xml-builder/src/util.js", "../node_modules/fast-xml-builder/src/orderedJs2Xml.js", "../node_modules/fast-xml-builder/src/ignoreAttributes.js", "../node_modules/fast-xml-builder/src/fxb.js", "../node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js", "../node_modules/fast-xml-parser/src/fxp.js", "../node_modules/@azure/core-xml/src/xml.ts", "../node_modules/@azure/storage-blob/src/log.ts", "../node_modules/@azure/storage-common/src/BufferScheduler.ts", "../node_modules/@azure/storage-common/src/BuffersStream.ts", "../node_modules/@azure/storage-common/src/PooledBuffer.ts", "../node_modules/@azure/storage-common/src/cache.ts", "../node_modules/@azure/storage-common/src/policies/RequestPolicy.ts", "../node_modules/@azure/storage-common/src/utils/constants.ts", "../node_modules/@azure/storage-common/src/utils/utils.common.ts", "../node_modules/@azure/storage-common/src/policies/StorageBrowserPolicy.ts", "../node_modules/@azure/storage-common/src/StorageBrowserPolicyFactory.ts", "../node_modules/@azure/storage-common/src/policies/CredentialPolicy.ts", "../node_modules/@azure/storage-common/src/policies/AnonymousCredentialPolicy.ts", "../node_modules/@azure/storage-common/src/credentials/Credential.ts", "../node_modules/@azure/storage-common/src/credentials/AnonymousCredential.ts", "../node_modules/@azure/storage-common/src/credentials/StorageSharedKeyCredential.ts", "../node_modules/@azure/storage-common/src/utils/SharedKeyComparator.ts", "../node_modules/@azure/storage-common/src/policies/StorageSharedKeyCredentialPolicy.ts", "../node_modules/@azure/storage-common/src/log.ts", "../node_modules/@azure/storage-common/src/policies/StorageRetryPolicyType.ts", "../node_modules/@azure/storage-common/src/policies/StorageRetryPolicy.ts", "../node_modules/@azure/storage-common/src/StorageRetryPolicyFactory.ts", "../node_modules/@azure/storage-common/src/policies/StorageBrowserPolicyV2.ts", "../node_modules/@azure/storage-common/src/policies/StorageCorrectContentLengthPolicy.ts", "../node_modules/@azure/storage-common/src/policies/StorageRetryPolicyV2.ts", "../node_modules/@azure/storage-common/src/policies/StorageSharedKeyCredentialPolicyV2.ts", "../node_modules/@azure/storage-common/src/policies/StorageRequestFailureDetailsParserPolicy.ts", "../node_modules/@azure/storage-common/src/credentials/UserDelegationKeyCredential.ts", "../node_modules/@azure/storage-blob/src/utils/constants.ts", "../node_modules/@azure/storage-blob/src/Pipeline.ts", "../node_modules/@azure/storage-blob/src/generated/src/models/index.ts", "../node_modules/@azure/storage-blob/src/generated/src/models/mappers.ts", "../node_modules/@azure/storage-blob/src/generated/src/models/parameters.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/service.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/container.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/blob.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/pageBlob.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/appendBlob.ts", "../node_modules/@azure/storage-blob/src/generated/src/operations/blockBlob.ts", "../node_modules/@azure/storage-blob/src/generated/src/storageClient.ts", "../node_modules/@azure/storage-blob/src/StorageContextClient.ts", "../node_modules/@azure/storage-blob/src/utils/utils.common.ts", "../node_modules/@azure/storage-blob/src/StorageClient.ts", "../node_modules/@azure/storage-blob/src/utils/tracing.ts", "../node_modules/@azure/storage-blob/src/sas/BlobSASPermissions.ts", "../node_modules/@azure/storage-blob/src/sas/ContainerSASPermissions.ts", "../node_modules/@azure/storage-blob/src/sas/SasIPRange.ts", "../node_modules/@azure/storage-blob/src/sas/SASQueryParameters.ts", "../node_modules/@azure/storage-blob/src/sas/BlobSASSignatureValues.ts", "../node_modules/@azure/storage-blob/src/BlobLeaseClient.ts", "../node_modules/@azure/storage-blob/src/utils/RetriableReadableStream.ts", "../node_modules/@azure/storage-blob/src/BlobDownloadResponse.ts", "../node_modules/@azure/storage-blob/src/utils/BlobQuickQueryStream.ts", "../node_modules/@azure/storage-blob/src/internal-avro/AvroConstants.ts", "../node_modules/@azure/storage-blob/src/internal-avro/AvroParser.ts", "../node_modules/@azure/storage-blob/src/internal-avro/utils/utils.common.ts", "../node_modules/@azure/storage-blob/src/internal-avro/AvroReader.ts", "../node_modules/@azure/storage-blob/src/internal-avro/AvroReadable.ts", "../node_modules/@azure/storage-blob/src/internal-avro/AvroReadableFromStream.ts", "../node_modules/@azure/storage-blob/src/BlobQueryResponse.ts", "../node_modules/@azure/storage-blob/src/models.ts", "../node_modules/@azure/storage-blob/src/PageBlobRangeResponse.ts", "../node_modules/@azure/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.ts", "../node_modules/@azure/storage-blob/src/Range.ts", "../node_modules/@azure/storage-blob/src/utils/Batch.ts", "../node_modules/@azure/storage-blob/src/utils/utils.ts", "../node_modules/@azure/storage-blob/src/Clients.ts", "../node_modules/@azure/storage-blob/src/utils/Mutex.ts", "../node_modules/@azure/storage-blob/src/generatedModels.ts", "../node_modules/@actions/cache/src/internal/shared/errors.ts", "../node_modules/@actions/cache/src/internal/uploadUtils.ts", "../node_modules/@actions/cache/src/internal/downloadUtils.ts", "../node_modules/@actions/cache/src/internal/requestUtils.ts", "../node_modules/@actions/cache/src/options.ts", "../node_modules/@actions/cache/src/internal/config.ts", "../node_modules/@actions/cache/src/internal/shared/user-agent.ts", "../node_modules/@actions/cache/src/generated/results/api/v1/cache.ts", "../node_modules/@actions/cache/src/generated/results/entities/v1/cachemetadata.ts", "../node_modules/@actions/cache/src/generated/results/entities/v1/cachescope.ts", "../node_modules/@actions/cache/src/generated/results/api/v1/cache.twirp-client.ts", "../node_modules/@actions/cache/src/internal/shared/util.ts", "../node_modules/@actions/cache/src/internal/shared/cacheTwirpClient.ts", "../node_modules/@actions/cache/src/internal/tar.ts", "../node_modules/@docker/actions-toolkit/src/index.ts", "../src/context.ts", "../node_modules/js-yaml/src/tag.ts", "../node_modules/js-yaml/src/tag/scalar/str.ts", "../node_modules/js-yaml/src/tag/scalar/null_core.ts", "../node_modules/js-yaml/src/tag/scalar/null_json.ts", "../node_modules/js-yaml/src/tag/scalar/null_yaml11.ts", "../node_modules/js-yaml/src/tag/scalar/bool_core.ts", "../node_modules/js-yaml/src/tag/scalar/bool_json.ts", "../node_modules/js-yaml/src/tag/scalar/bool_yaml11.ts", "../node_modules/js-yaml/src/tag/scalar/int_core.ts", "../node_modules/js-yaml/src/tag/scalar/int_json.ts", "../node_modules/js-yaml/src/tag/scalar/int_yaml11.ts", "../node_modules/js-yaml/src/tag/scalar/float_core.ts", "../node_modules/js-yaml/src/tag/scalar/float_json.ts", "../node_modules/js-yaml/src/tag/scalar/float_yaml11.ts", "../node_modules/js-yaml/src/tag/scalar/merge.ts", "../node_modules/js-yaml/src/tag/scalar/binary.ts", "../node_modules/js-yaml/src/tag/scalar/timestamp.ts", "../node_modules/js-yaml/src/tag/sequence/seq.ts", "../node_modules/js-yaml/src/common/object.ts", "../node_modules/js-yaml/src/tag/sequence/omap.ts", "../node_modules/js-yaml/src/tag/sequence/pairs.ts", "../node_modules/js-yaml/src/tag/mapping/map.ts", "../node_modules/js-yaml/src/tag/mapping/set.ts", "../node_modules/js-yaml/src/schema.ts", "../node_modules/js-yaml/src/tag/mapping/real_map.ts", "../node_modules/js-yaml/src/tag/mapping/legacy_map.ts", "../node_modules/js-yaml/src/common/snippet.ts", "../node_modules/js-yaml/src/common/exception.ts", "../node_modules/js-yaml/src/parser/events.ts", "../node_modules/js-yaml/src/parser/parser_scalar.ts", "../node_modules/js-yaml/src/common/tagname.ts", "../node_modules/js-yaml/src/parser/constructor.ts", "../node_modules/js-yaml/src/parser/parser.ts", "../node_modules/js-yaml/src/load.ts", "../node_modules/js-yaml/src/ast/nodes.ts", "../node_modules/js-yaml/src/ast/from_js.ts", "../node_modules/js-yaml/src/ast/visit.ts", "../node_modules/js-yaml/src/ast/presenter.ts", "../node_modules/js-yaml/src/dump.ts", "../node_modules/js-yaml/src/ast/from_events.ts", "../node_modules/@docker/actions-toolkit/src/buildx/buildx.ts", "../node_modules/@docker/actions-toolkit/src/buildkit/git.ts", "../node_modules/@docker/actions-toolkit/src/docker/docker.ts", "../node_modules/@docker/actions-toolkit/src/context.ts", "../node_modules/@docker/actions-toolkit/src/exec.ts", "../node_modules/@docker/actions-toolkit/src/util.ts", "../node_modules/csv-parse/lib/api/CsvError.js", "../node_modules/csv-parse/lib/utils/is_object.js", "../node_modules/csv-parse/lib/api/normalize_columns_array.js", "../node_modules/csv-parse/lib/utils/ResizeableBuffer.js", "../node_modules/csv-parse/lib/api/init_state.js", "../node_modules/csv-parse/lib/utils/underscore.js", "../node_modules/csv-parse/lib/api/normalize_options.js", "../node_modules/csv-parse/lib/utils/delimiter_discover.js", "../node_modules/csv-parse/lib/api/index.js", "../node_modules/csv-parse/lib/sync.js", "../node_modules/@docker/actions-toolkit/node_modules/@actions/github/src/context.ts", "../node_modules/@docker/actions-toolkit/node_modules/@actions/github/src/internal/utils.ts", "../node_modules/universal-user-agent/index.js", "../node_modules/before-after-hook/lib/register.js", "../node_modules/before-after-hook/lib/add.js", "../node_modules/before-after-hook/lib/remove.js", "../node_modules/before-after-hook/index.js", "../node_modules/@octokit/endpoint/dist-bundle/index.js", "../node_modules/@octokit/request/dist-bundle/index.js", "../node_modules/json-with-bigint/json-with-bigint.js", "../node_modules/@octokit/request-error/dist-src/index.js", "../node_modules/@octokit/graphql/dist-bundle/index.js", "../node_modules/@octokit/auth-token/dist-bundle/index.js", "../node_modules/@octokit/core/dist-src/version.js", "../node_modules/@octokit/core/dist-src/index.js", "../node_modules/@octokit/src/version.ts", "../node_modules/@octokit/src/generated/endpoints.ts", "../node_modules/@octokit/src/endpoints-to-methods.ts", "../node_modules/@octokit/src/index.ts", "../node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js", "../node_modules/@docker/actions-toolkit/node_modules/@actions/github/src/utils.ts", "../node_modules/@docker/actions-toolkit/node_modules/@actions/github/src/github.ts", "../node_modules/jwt-decode/build/esm/index.js", "../node_modules/@docker/actions-toolkit/src/github/github.ts", "../src/aws.ts", "../node_modules/http-proxy-agent/src/index.ts", "../node_modules/http-proxy-agent/node_modules/agent-base/src/index.ts", "../node_modules/proxy-agent-negotiate/src/index.ts", "../node_modules/https-proxy-agent/src/index.ts", "../node_modules/https-proxy-agent/node_modules/agent-base/src/index.ts", "../node_modules/https-proxy-agent/src/parse-proxy-response.ts", "../node_modules/uuid/dist-node/regex.js", "../node_modules/uuid/dist-node/validate.js", "../src/dockerhub.ts", "../src/docker.ts", "../src/state-helper.ts"], - "sourcesContent": ["'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", "module.exports = {\n kClose: Symbol('close'),\n kDestroy: Symbol('destroy'),\n kDispatch: Symbol('dispatch'),\n kUrl: Symbol('url'),\n kWriting: Symbol('writing'),\n kResuming: Symbol('resuming'),\n kQueue: Symbol('queue'),\n kConnect: Symbol('connect'),\n kConnecting: Symbol('connecting'),\n kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),\n kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),\n kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),\n kKeepAliveTimeoutValue: Symbol('keep alive timeout'),\n kKeepAlive: Symbol('keep alive'),\n kHeadersTimeout: Symbol('headers timeout'),\n kBodyTimeout: Symbol('body timeout'),\n kServerName: Symbol('server name'),\n kLocalAddress: Symbol('local address'),\n kHost: Symbol('host'),\n kNoRef: Symbol('no ref'),\n kBodyUsed: Symbol('used'),\n kBody: Symbol('abstracted request body'),\n kRunning: Symbol('running'),\n kBlocking: Symbol('blocking'),\n kPending: Symbol('pending'),\n kSize: Symbol('size'),\n kBusy: Symbol('busy'),\n kQueued: Symbol('queued'),\n kFree: Symbol('free'),\n kConnected: Symbol('connected'),\n kClosed: Symbol('closed'),\n kNeedDrain: Symbol('need drain'),\n kReset: Symbol('reset'),\n kDestroyed: Symbol.for('nodejs.stream.destroyed'),\n kResume: Symbol('resume'),\n kOnError: Symbol('on error'),\n kMaxHeadersSize: Symbol('max headers size'),\n kRunningIdx: Symbol('running index'),\n kPendingIdx: Symbol('pending index'),\n kError: Symbol('error'),\n kClients: Symbol('clients'),\n kClient: Symbol('client'),\n kParser: Symbol('parser'),\n kOnDestroyed: Symbol('destroy callbacks'),\n kPipelining: Symbol('pipelining'),\n kSocket: Symbol('socket'),\n kHostHeader: Symbol('host header'),\n kConnector: Symbol('connector'),\n kStrictContentLength: Symbol('strict content length'),\n kMaxRedirections: Symbol('maxRedirections'),\n kMaxRequests: Symbol('maxRequestsPerClient'),\n kProxy: Symbol('proxy agent options'),\n kCounter: Symbol('socket request counter'),\n kInterceptors: Symbol('dispatch interceptors'),\n kMaxResponseSize: Symbol('max response size'),\n kHTTP2Session: Symbol('http2Session'),\n kHTTP2SessionState: Symbol('http2Session state'),\n kRetryHandlerDefaultRetry: Symbol('retry agent default retry'),\n kConstruct: Symbol('constructable'),\n kListeners: Symbol('listeners'),\n kHTTPContext: Symbol('http context'),\n kMaxConcurrentStreams: Symbol('max concurrent streams'),\n kNoProxyAgent: Symbol('no proxy agent'),\n kHttpProxyAgent: Symbol('http proxy agent'),\n kHttpsProxyAgent: Symbol('https proxy agent')\n}\n", "'use strict'\n\nconst kUndiciError = Symbol.for('undici.error.UND_ERR')\nclass UndiciError extends Error {\n constructor (message) {\n super(message)\n this.name = 'UndiciError'\n this.code = 'UND_ERR'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kUndiciError] === true\n }\n\n [kUndiciError] = true\n}\n\nconst kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT')\nclass ConnectTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ConnectTimeoutError'\n this.message = message || 'Connect Timeout Error'\n this.code = 'UND_ERR_CONNECT_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kConnectTimeoutError] === true\n }\n\n [kConnectTimeoutError] = true\n}\n\nconst kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT')\nclass HeadersTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'HeadersTimeoutError'\n this.message = message || 'Headers Timeout Error'\n this.code = 'UND_ERR_HEADERS_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHeadersTimeoutError] === true\n }\n\n [kHeadersTimeoutError] = true\n}\n\nconst kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW')\nclass HeadersOverflowError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'HeadersOverflowError'\n this.message = message || 'Headers Overflow Error'\n this.code = 'UND_ERR_HEADERS_OVERFLOW'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHeadersOverflowError] === true\n }\n\n [kHeadersOverflowError] = true\n}\n\nconst kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT')\nclass BodyTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'BodyTimeoutError'\n this.message = message || 'Body Timeout Error'\n this.code = 'UND_ERR_BODY_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kBodyTimeoutError] === true\n }\n\n [kBodyTimeoutError] = true\n}\n\nconst kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE')\nclass ResponseStatusCodeError extends UndiciError {\n constructor (message, statusCode, headers, body) {\n super(message)\n this.name = 'ResponseStatusCodeError'\n this.message = message || 'Response Status Code Error'\n this.code = 'UND_ERR_RESPONSE_STATUS_CODE'\n this.body = body\n this.status = statusCode\n this.statusCode = statusCode\n this.headers = headers\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseStatusCodeError] === true\n }\n\n [kResponseStatusCodeError] = true\n}\n\nconst kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG')\nclass InvalidArgumentError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InvalidArgumentError'\n this.message = message || 'Invalid Argument Error'\n this.code = 'UND_ERR_INVALID_ARG'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInvalidArgumentError] === true\n }\n\n [kInvalidArgumentError] = true\n}\n\nconst kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE')\nclass InvalidReturnValueError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InvalidReturnValueError'\n this.message = message || 'Invalid Return Value Error'\n this.code = 'UND_ERR_INVALID_RETURN_VALUE'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInvalidReturnValueError] === true\n }\n\n [kInvalidReturnValueError] = true\n}\n\nconst kAbortError = Symbol.for('undici.error.UND_ERR_ABORT')\nclass AbortError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'AbortError'\n this.message = message || 'The operation was aborted'\n this.code = 'UND_ERR_ABORT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kAbortError] === true\n }\n\n [kAbortError] = true\n}\n\nconst kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED')\nclass RequestAbortedError extends AbortError {\n constructor (message) {\n super(message)\n this.name = 'AbortError'\n this.message = message || 'Request aborted'\n this.code = 'UND_ERR_ABORTED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestAbortedError] === true\n }\n\n [kRequestAbortedError] = true\n}\n\nconst kInformationalError = Symbol.for('undici.error.UND_ERR_INFO')\nclass InformationalError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InformationalError'\n this.message = message || 'Request information'\n this.code = 'UND_ERR_INFO'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInformationalError] === true\n }\n\n [kInformationalError] = true\n}\n\nconst kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH')\nclass RequestContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'RequestContentLengthMismatchError'\n this.message = message || 'Request body length does not match content-length header'\n this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestContentLengthMismatchError] === true\n }\n\n [kRequestContentLengthMismatchError] = true\n}\n\nconst kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH')\nclass ResponseContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ResponseContentLengthMismatchError'\n this.message = message || 'Response body length does not match content-length header'\n this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseContentLengthMismatchError] === true\n }\n\n [kResponseContentLengthMismatchError] = true\n}\n\nconst kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED')\nclass ClientDestroyedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ClientDestroyedError'\n this.message = message || 'The client is destroyed'\n this.code = 'UND_ERR_DESTROYED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kClientDestroyedError] === true\n }\n\n [kClientDestroyedError] = true\n}\n\nconst kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED')\nclass ClientClosedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ClientClosedError'\n this.message = message || 'The client is closed'\n this.code = 'UND_ERR_CLOSED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kClientClosedError] === true\n }\n\n [kClientClosedError] = true\n}\n\nconst kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET')\nclass SocketError extends UndiciError {\n constructor (message, socket) {\n super(message)\n this.name = 'SocketError'\n this.message = message || 'Socket error'\n this.code = 'UND_ERR_SOCKET'\n this.socket = socket\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kSocketError] === true\n }\n\n [kSocketError] = true\n}\n\nconst kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED')\nclass NotSupportedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'NotSupportedError'\n this.message = message || 'Not supported error'\n this.code = 'UND_ERR_NOT_SUPPORTED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kNotSupportedError] === true\n }\n\n [kNotSupportedError] = true\n}\n\nconst kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM')\nclass BalancedPoolMissingUpstreamError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MissingUpstreamError'\n this.message = message || 'No upstream has been added to the BalancedPool'\n this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kBalancedPoolMissingUpstreamError] === true\n }\n\n [kBalancedPoolMissingUpstreamError] = true\n}\n\nconst kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER')\nclass HTTPParserError extends Error {\n constructor (message, code, data) {\n super(message)\n this.name = 'HTTPParserError'\n this.code = code ? `HPE_${code}` : undefined\n this.data = data ? data.toString() : undefined\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHTTPParserError] === true\n }\n\n [kHTTPParserError] = true\n}\n\nconst kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE')\nclass ResponseExceededMaxSizeError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ResponseExceededMaxSizeError'\n this.message = message || 'Response content exceeded max size'\n this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseExceededMaxSizeError] === true\n }\n\n [kResponseExceededMaxSizeError] = true\n}\n\nconst kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY')\nclass RequestRetryError extends UndiciError {\n constructor (message, code, { headers, data }) {\n super(message)\n this.name = 'RequestRetryError'\n this.message = message || 'Request retry error'\n this.code = 'UND_ERR_REQ_RETRY'\n this.statusCode = code\n this.data = data\n this.headers = headers\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestRetryError] === true\n }\n\n [kRequestRetryError] = true\n}\n\nconst kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE')\nclass ResponseError extends UndiciError {\n constructor (message, code, { headers, data }) {\n super(message)\n this.name = 'ResponseError'\n this.message = message || 'Response error'\n this.code = 'UND_ERR_RESPONSE'\n this.statusCode = code\n this.data = data\n this.headers = headers\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseError] === true\n }\n\n [kResponseError] = true\n}\n\nconst kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS')\nclass SecureProxyConnectionError extends UndiciError {\n constructor (cause, message, options) {\n super(message, { cause, ...(options ?? {}) })\n this.name = 'SecureProxyConnectionError'\n this.message = message || 'Secure Proxy Connection failed'\n this.code = 'UND_ERR_PRX_TLS'\n this.cause = cause\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kSecureProxyConnectionError] === true\n }\n\n [kSecureProxyConnectionError] = true\n}\n\nconst kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED')\nclass MessageSizeExceededError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MessageSizeExceededError'\n this.message = message || 'Max decompressed message size exceeded'\n this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMessageSizeExceededError] === true\n }\n\n get [kMessageSizeExceededError] () {\n return true\n }\n}\n\nmodule.exports = {\n AbortError,\n HTTPParserError,\n UndiciError,\n HeadersTimeoutError,\n HeadersOverflowError,\n BodyTimeoutError,\n RequestContentLengthMismatchError,\n ConnectTimeoutError,\n ResponseStatusCodeError,\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError,\n ClientDestroyedError,\n ClientClosedError,\n InformationalError,\n SocketError,\n NotSupportedError,\n ResponseContentLengthMismatchError,\n BalancedPoolMissingUpstreamError,\n ResponseExceededMaxSizeError,\n RequestRetryError,\n ResponseError,\n SecureProxyConnectionError,\n MessageSizeExceededError\n}\n", "'use strict'\n\n/** @type {Record} */\nconst headerNameLowerCasedRecord = {}\n\n// https://developer.mozilla.org/docs/Web/HTTP/Headers\nconst wellknownHeaderNames = [\n 'Accept',\n 'Accept-Encoding',\n 'Accept-Language',\n 'Accept-Ranges',\n 'Access-Control-Allow-Credentials',\n 'Access-Control-Allow-Headers',\n 'Access-Control-Allow-Methods',\n 'Access-Control-Allow-Origin',\n 'Access-Control-Expose-Headers',\n 'Access-Control-Max-Age',\n 'Access-Control-Request-Headers',\n 'Access-Control-Request-Method',\n 'Age',\n 'Allow',\n 'Alt-Svc',\n 'Alt-Used',\n 'Authorization',\n 'Cache-Control',\n 'Clear-Site-Data',\n 'Connection',\n 'Content-Disposition',\n 'Content-Encoding',\n 'Content-Language',\n 'Content-Length',\n 'Content-Location',\n 'Content-Range',\n 'Content-Security-Policy',\n 'Content-Security-Policy-Report-Only',\n 'Content-Type',\n 'Cookie',\n 'Cross-Origin-Embedder-Policy',\n 'Cross-Origin-Opener-Policy',\n 'Cross-Origin-Resource-Policy',\n 'Date',\n 'Device-Memory',\n 'Downlink',\n 'ECT',\n 'ETag',\n 'Expect',\n 'Expect-CT',\n 'Expires',\n 'Forwarded',\n 'From',\n 'Host',\n 'If-Match',\n 'If-Modified-Since',\n 'If-None-Match',\n 'If-Range',\n 'If-Unmodified-Since',\n 'Keep-Alive',\n 'Last-Modified',\n 'Link',\n 'Location',\n 'Max-Forwards',\n 'Origin',\n 'Permissions-Policy',\n 'Pragma',\n 'Proxy-Authenticate',\n 'Proxy-Authorization',\n 'RTT',\n 'Range',\n 'Referer',\n 'Referrer-Policy',\n 'Refresh',\n 'Retry-After',\n 'Sec-WebSocket-Accept',\n 'Sec-WebSocket-Extensions',\n 'Sec-WebSocket-Key',\n 'Sec-WebSocket-Protocol',\n 'Sec-WebSocket-Version',\n 'Server',\n 'Server-Timing',\n 'Service-Worker-Allowed',\n 'Service-Worker-Navigation-Preload',\n 'Set-Cookie',\n 'SourceMap',\n 'Strict-Transport-Security',\n 'Supports-Loading-Mode',\n 'TE',\n 'Timing-Allow-Origin',\n 'Trailer',\n 'Transfer-Encoding',\n 'Upgrade',\n 'Upgrade-Insecure-Requests',\n 'User-Agent',\n 'Vary',\n 'Via',\n 'WWW-Authenticate',\n 'X-Content-Type-Options',\n 'X-DNS-Prefetch-Control',\n 'X-Frame-Options',\n 'X-Permitted-Cross-Domain-Policies',\n 'X-Powered-By',\n 'X-Requested-With',\n 'X-XSS-Protection'\n]\n\nfor (let i = 0; i < wellknownHeaderNames.length; ++i) {\n const key = wellknownHeaderNames[i]\n const lowerCasedKey = key.toLowerCase()\n headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] =\n lowerCasedKey\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(headerNameLowerCasedRecord, null)\n\nmodule.exports = {\n wellknownHeaderNames,\n headerNameLowerCasedRecord\n}\n", "'use strict'\n\nconst {\n wellknownHeaderNames,\n headerNameLowerCasedRecord\n} = require('./constants')\n\nclass TstNode {\n /** @type {any} */\n value = null\n /** @type {null | TstNode} */\n left = null\n /** @type {null | TstNode} */\n middle = null\n /** @type {null | TstNode} */\n right = null\n /** @type {number} */\n code\n /**\n * @param {string} key\n * @param {any} value\n * @param {number} index\n */\n constructor (key, value, index) {\n if (index === undefined || index >= key.length) {\n throw new TypeError('Unreachable')\n }\n const code = this.code = key.charCodeAt(index)\n // check code is ascii string\n if (code > 0x7F) {\n throw new TypeError('key must be ascii string')\n }\n if (key.length !== ++index) {\n this.middle = new TstNode(key, value, index)\n } else {\n this.value = value\n }\n }\n\n /**\n * @param {string} key\n * @param {any} value\n */\n add (key, value) {\n const length = key.length\n if (length === 0) {\n throw new TypeError('Unreachable')\n }\n let index = 0\n let node = this\n while (true) {\n const code = key.charCodeAt(index)\n // check code is ascii string\n if (code > 0x7F) {\n throw new TypeError('key must be ascii string')\n }\n if (node.code === code) {\n if (length === ++index) {\n node.value = value\n break\n } else if (node.middle !== null) {\n node = node.middle\n } else {\n node.middle = new TstNode(key, value, index)\n break\n }\n } else if (node.code < code) {\n if (node.left !== null) {\n node = node.left\n } else {\n node.left = new TstNode(key, value, index)\n break\n }\n } else if (node.right !== null) {\n node = node.right\n } else {\n node.right = new TstNode(key, value, index)\n break\n }\n }\n }\n\n /**\n * @param {Uint8Array} key\n * @return {TstNode | null}\n */\n search (key) {\n const keylength = key.length\n let index = 0\n let node = this\n while (node !== null && index < keylength) {\n let code = key[index]\n // A-Z\n // First check if it is bigger than 0x5a.\n // Lowercase letters have higher char codes than uppercase ones.\n // Also we assume that headers will mostly contain lowercase characters.\n if (code <= 0x5a && code >= 0x41) {\n // Lowercase for uppercase.\n code |= 32\n }\n while (node !== null) {\n if (code === node.code) {\n if (keylength === ++index) {\n // Returns Node since it is the last key.\n return node\n }\n node = node.middle\n break\n }\n node = node.code < code ? node.left : node.right\n }\n }\n return null\n }\n}\n\nclass TernarySearchTree {\n /** @type {TstNode | null} */\n node = null\n\n /**\n * @param {string} key\n * @param {any} value\n * */\n insert (key, value) {\n if (this.node === null) {\n this.node = new TstNode(key, value, 0)\n } else {\n this.node.add(key, value)\n }\n }\n\n /**\n * @param {Uint8Array} key\n * @return {any}\n */\n lookup (key) {\n return this.node?.search(key)?.value ?? null\n }\n}\n\nconst tree = new TernarySearchTree()\n\nfor (let i = 0; i < wellknownHeaderNames.length; ++i) {\n const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]\n tree.insert(key, key)\n}\n\nmodule.exports = {\n TernarySearchTree,\n tree\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { kDestroyed, kBodyUsed, kListeners, kBody } = require('./symbols')\nconst { IncomingMessage } = require('node:http')\nconst stream = require('node:stream')\nconst net = require('node:net')\nconst { Blob } = require('node:buffer')\nconst nodeUtil = require('node:util')\nconst { stringify } = require('node:querystring')\nconst { EventEmitter: EE } = require('node:events')\nconst { InvalidArgumentError } = require('./errors')\nconst { headerNameLowerCasedRecord } = require('./constants')\nconst { tree } = require('./tree')\n\nconst [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nfunction wrapRequestBody (body) {\n if (isStream(body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (bodyLength(body) === 0) {\n body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof body.readableDidRead !== 'boolean') {\n body[kBodyUsed] = false\n EE.prototype.on.call(body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n\n return body\n } else if (body && typeof body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n return new BodyAsyncIterable(body)\n } else if (\n body &&\n typeof body !== 'string' &&\n !ArrayBuffer.isView(body) &&\n isIterable(body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n return new BodyAsyncIterable(body)\n } else {\n return body\n }\n}\n\nfunction nop () {}\n\nfunction isStream (obj) {\n return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'\n}\n\n// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License)\nfunction isBlobLike (object) {\n if (object === null) {\n return false\n } else if (object instanceof Blob) {\n return true\n } else if (typeof object !== 'object') {\n return false\n } else {\n const sTag = object[Symbol.toStringTag]\n\n return (sTag === 'Blob' || sTag === 'File') && (\n ('stream' in object && typeof object.stream === 'function') ||\n ('arrayBuffer' in object && typeof object.arrayBuffer === 'function')\n )\n }\n}\n\nfunction buildURL (url, queryParams) {\n if (url.includes('?') || url.includes('#')) {\n throw new Error('Query params cannot be passed when url already contains \"?\" or \"#\".')\n }\n\n const stringified = stringify(queryParams)\n\n if (stringified) {\n url += '?' + stringified\n }\n\n return url\n}\n\nfunction isValidPort (port) {\n const value = parseInt(port, 10)\n return (\n value === Number(port) &&\n value >= 0 &&\n value <= 65535\n )\n}\n\nfunction isHttpOrHttpsPrefixed (value) {\n return (\n value != null &&\n value[0] === 'h' &&\n value[1] === 't' &&\n value[2] === 't' &&\n value[3] === 'p' &&\n (\n value[4] === ':' ||\n (\n value[4] === 's' &&\n value[5] === ':'\n )\n )\n )\n}\n\nfunction parseURL (url) {\n if (typeof url === 'string') {\n url = new URL(url)\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n }\n\n if (!url || typeof url !== 'object') {\n throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.')\n }\n\n if (!(url instanceof URL)) {\n if (url.port != null && url.port !== '' && isValidPort(url.port) === false) {\n throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.')\n }\n\n if (url.path != null && typeof url.path !== 'string') {\n throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.')\n }\n\n if (url.pathname != null && typeof url.pathname !== 'string') {\n throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.')\n }\n\n if (url.hostname != null && typeof url.hostname !== 'string') {\n throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.')\n }\n\n if (url.origin != null && typeof url.origin !== 'string') {\n throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.')\n }\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n const port = url.port != null\n ? url.port\n : (url.protocol === 'https:' ? 443 : 80)\n let origin = url.origin != null\n ? url.origin\n : `${url.protocol || ''}//${url.hostname || ''}:${port}`\n let path = url.path != null\n ? url.path\n : `${url.pathname || ''}${url.search || ''}`\n\n if (origin[origin.length - 1] === '/') {\n origin = origin.slice(0, origin.length - 1)\n }\n\n if (path && path[0] !== '/') {\n path = `/${path}`\n }\n // new URL(path, origin) is unsafe when `path` contains an absolute URL\n // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL:\n // If first parameter is a relative URL, second param is required, and will be used as the base URL.\n // If first parameter is an absolute URL, a given second param will be ignored.\n return new URL(`${origin}${path}`)\n }\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n}\n\nfunction parseOrigin (url) {\n url = parseURL(url)\n\n if (url.pathname !== '/' || url.search || url.hash) {\n throw new InvalidArgumentError('invalid url')\n }\n\n return url\n}\n\nfunction getHostname (host) {\n if (host[0] === '[') {\n const idx = host.indexOf(']')\n\n assert(idx !== -1)\n return host.substring(1, idx)\n }\n\n const idx = host.indexOf(':')\n if (idx === -1) return host\n\n return host.substring(0, idx)\n}\n\n// IP addresses are not valid server names per RFC6066\n// > Currently, the only server names supported are DNS hostnames\nfunction getServerName (host) {\n if (!host) {\n return null\n }\n\n assert(typeof host === 'string')\n\n const servername = getHostname(host)\n if (net.isIP(servername)) {\n return ''\n }\n\n return servername\n}\n\nfunction deepClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction isAsyncIterable (obj) {\n return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function')\n}\n\nfunction isIterable (obj) {\n return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))\n}\n\nfunction bodyLength (body) {\n if (body == null) {\n return 0\n } else if (isStream(body)) {\n const state = body._readableState\n return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length)\n ? state.length\n : null\n } else if (isBlobLike(body)) {\n return body.size != null ? body.size : null\n } else if (isBuffer(body)) {\n return body.byteLength\n }\n\n return null\n}\n\nfunction isDestroyed (body) {\n return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body)))\n}\n\nfunction destroy (stream, err) {\n if (stream == null || !isStream(stream) || isDestroyed(stream)) {\n return\n }\n\n if (typeof stream.destroy === 'function') {\n if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {\n // See: https://github.com/nodejs/node/pull/38505/files\n stream.socket = null\n }\n\n stream.destroy(err)\n } else if (err) {\n queueMicrotask(() => {\n stream.emit('error', err)\n })\n }\n\n if (stream.destroyed !== true) {\n stream[kDestroyed] = true\n }\n}\n\nconst KEEPALIVE_TIMEOUT_EXPR = /timeout=(\\d+)/\nfunction parseKeepAliveTimeout (val) {\n const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR)\n return m ? parseInt(m[1], 10) * 1000 : null\n}\n\n/**\n * Retrieves a header name and returns its lowercase value.\n * @param {string | Buffer} value Header name\n * @returns {string}\n */\nfunction headerNameToString (value) {\n return typeof value === 'string'\n ? headerNameLowerCasedRecord[value] ?? value.toLowerCase()\n : tree.lookup(value) ?? value.toString('latin1').toLowerCase()\n}\n\n/**\n * Receive the buffer as a string and return its lowercase value.\n * @param {Buffer} value Header name\n * @returns {string}\n */\nfunction bufferToLowerCasedHeaderName (value) {\n return tree.lookup(value) ?? value.toString('latin1').toLowerCase()\n}\n\n/**\n * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers\n * @param {Record} [obj]\n * @returns {Record}\n */\nfunction parseHeaders (headers, obj) {\n if (obj === undefined) obj = {}\n for (let i = 0; i < headers.length; i += 2) {\n const key = headerNameToString(headers[i])\n let val = obj[key]\n\n if (val) {\n if (typeof val === 'string') {\n val = [val]\n obj[key] = val\n }\n val.push(headers[i + 1].toString('utf8'))\n } else {\n const headersValue = headers[i + 1]\n if (typeof headersValue === 'string') {\n obj[key] = headersValue\n } else {\n obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8')\n }\n }\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if ('content-length' in obj && 'content-disposition' in obj) {\n obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1')\n }\n\n return obj\n}\n\nfunction parseRawHeaders (headers) {\n const len = headers.length\n const ret = new Array(len)\n\n let hasContentLength = false\n let contentDispositionIdx = -1\n let key\n let val\n let kLen = 0\n\n for (let n = 0; n < headers.length; n += 2) {\n key = headers[n]\n val = headers[n + 1]\n\n typeof key !== 'string' && (key = key.toString())\n typeof val !== 'string' && (val = val.toString('utf8'))\n\n kLen = key.length\n if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) {\n hasContentLength = true\n } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) {\n contentDispositionIdx = n + 1\n }\n ret[n] = key\n ret[n + 1] = val\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if (hasContentLength && contentDispositionIdx !== -1) {\n ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1')\n }\n\n return ret\n}\n\nfunction isBuffer (buffer) {\n // See, https://github.com/mcollina/undici/pull/319\n return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)\n}\n\nfunction validateHandler (handler, method, upgrade) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n if (typeof handler.onConnect !== 'function') {\n throw new InvalidArgumentError('invalid onConnect method')\n }\n\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) {\n throw new InvalidArgumentError('invalid onBodySent method')\n }\n\n if (upgrade || method === 'CONNECT') {\n if (typeof handler.onUpgrade !== 'function') {\n throw new InvalidArgumentError('invalid onUpgrade method')\n }\n } else {\n if (typeof handler.onHeaders !== 'function') {\n throw new InvalidArgumentError('invalid onHeaders method')\n }\n\n if (typeof handler.onData !== 'function') {\n throw new InvalidArgumentError('invalid onData method')\n }\n\n if (typeof handler.onComplete !== 'function') {\n throw new InvalidArgumentError('invalid onComplete method')\n }\n }\n}\n\n// A body is disturbed if it has been read from and it cannot\n// be re-used without losing state or data.\nfunction isDisturbed (body) {\n // TODO (fix): Why is body[kBodyUsed] needed?\n return !!(body && (stream.isDisturbed(body) || body[kBodyUsed]))\n}\n\nfunction isErrored (body) {\n return !!(body && stream.isErrored(body))\n}\n\nfunction isReadable (body) {\n return !!(body && stream.isReadable(body))\n}\n\nfunction getSocketInfo (socket) {\n return {\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort,\n remoteFamily: socket.remoteFamily,\n timeout: socket.timeout,\n bytesWritten: socket.bytesWritten,\n bytesRead: socket.bytesRead\n }\n}\n\n/** @type {globalThis['ReadableStream']} */\nfunction ReadableStreamFrom (iterable) {\n // We cannot use ReadableStream.from here because it does not return a byte stream.\n\n let iterator\n return new ReadableStream(\n {\n async start () {\n iterator = iterable[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { done, value } = await iterator.next()\n if (done) {\n queueMicrotask(() => {\n controller.close()\n controller.byobRequest?.respond(0)\n })\n } else {\n const buf = Buffer.isBuffer(value) ? value : Buffer.from(value)\n if (buf.byteLength) {\n controller.enqueue(new Uint8Array(buf))\n }\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n },\n type: 'bytes'\n }\n )\n}\n\n// The chunk should be a FormData instance and contains\n// all the required methods.\nfunction isFormDataLike (object) {\n return (\n object &&\n typeof object === 'object' &&\n typeof object.append === 'function' &&\n typeof object.delete === 'function' &&\n typeof object.get === 'function' &&\n typeof object.getAll === 'function' &&\n typeof object.has === 'function' &&\n typeof object.set === 'function' &&\n object[Symbol.toStringTag] === 'FormData'\n )\n}\n\nfunction addAbortListener (signal, listener) {\n if ('addEventListener' in signal) {\n signal.addEventListener('abort', listener, { once: true })\n return () => signal.removeEventListener('abort', listener)\n }\n signal.addListener('abort', listener)\n return () => signal.removeListener('abort', listener)\n}\n\nconst hasToWellFormed = typeof String.prototype.toWellFormed === 'function'\nconst hasIsWellFormed = typeof String.prototype.isWellFormed === 'function'\n\n/**\n * @param {string} val\n */\nfunction toUSVString (val) {\n return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val)\n}\n\n/**\n * @param {string} val\n */\n// TODO: move this to webidl\nfunction isUSVString (val) {\n return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`\n}\n\n/**\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n * @param {number} c\n */\nfunction isTokenCharCode (c) {\n switch (c) {\n case 0x22:\n case 0x28:\n case 0x29:\n case 0x2c:\n case 0x2f:\n case 0x3a:\n case 0x3b:\n case 0x3c:\n case 0x3d:\n case 0x3e:\n case 0x3f:\n case 0x40:\n case 0x5b:\n case 0x5c:\n case 0x5d:\n case 0x7b:\n case 0x7d:\n // DQUOTE and \"(),/:;<=>?@[\\]{}\"\n return false\n default:\n // VCHAR %x21-7E\n return c >= 0x21 && c <= 0x7e\n }\n}\n\n/**\n * @param {string} characters\n */\nfunction isValidHTTPToken (characters) {\n if (characters.length === 0) {\n return false\n }\n for (let i = 0; i < characters.length; ++i) {\n if (!isTokenCharCode(characters.charCodeAt(i))) {\n return false\n }\n }\n return true\n}\n\n// headerCharRegex have been lifted from\n// https://github.com/nodejs/node/blob/main/lib/_http_common.js\n\n/**\n * Matches if val contains an invalid field-vchar\n * field-value = *( field-content / obs-fold )\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n */\nconst headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/\n\n/**\n * @param {string} characters\n */\nfunction isValidHeaderValue (characters) {\n return !headerCharRegex.test(characters)\n}\n\n// Parsed accordingly to RFC 9110\n// https://www.rfc-editor.org/rfc/rfc9110#field.content-range\nfunction parseRangeHeader (range) {\n if (range == null || range === '') return { start: 0, end: null, size: null }\n\n const m = range ? range.match(/^bytes (\\d+)-(\\d+)\\/(\\d+)?$/) : null\n return m\n ? {\n start: parseInt(m[1]),\n end: m[2] ? parseInt(m[2]) : null,\n size: m[3] ? parseInt(m[3]) : null\n }\n : null\n}\n\nfunction addListener (obj, name, listener) {\n const listeners = (obj[kListeners] ??= [])\n listeners.push([name, listener])\n obj.on(name, listener)\n return obj\n}\n\nfunction removeAllListeners (obj) {\n for (const [name, listener] of obj[kListeners] ?? []) {\n obj.removeListener(name, listener)\n }\n obj[kListeners] = null\n}\n\nfunction errorRequest (client, request, err) {\n try {\n request.onError(err)\n assert(request.aborted)\n } catch (err) {\n client.emit('error', err)\n }\n}\n\nconst kEnumerableProperty = Object.create(null)\nkEnumerableProperty.enumerable = true\n\nconst normalizedMethodRecordsBase = {\n delete: 'DELETE',\n DELETE: 'DELETE',\n get: 'GET',\n GET: 'GET',\n head: 'HEAD',\n HEAD: 'HEAD',\n options: 'OPTIONS',\n OPTIONS: 'OPTIONS',\n post: 'POST',\n POST: 'POST',\n put: 'PUT',\n PUT: 'PUT'\n}\n\nconst normalizedMethodRecords = {\n ...normalizedMethodRecordsBase,\n patch: 'patch',\n PATCH: 'PATCH'\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(normalizedMethodRecordsBase, null)\nObject.setPrototypeOf(normalizedMethodRecords, null)\n\nmodule.exports = {\n kEnumerableProperty,\n nop,\n isDisturbed,\n isErrored,\n isReadable,\n toUSVString,\n isUSVString,\n isBlobLike,\n parseOrigin,\n parseURL,\n getServerName,\n isStream,\n isIterable,\n isAsyncIterable,\n isDestroyed,\n headerNameToString,\n bufferToLowerCasedHeaderName,\n addListener,\n removeAllListeners,\n errorRequest,\n parseRawHeaders,\n parseHeaders,\n parseKeepAliveTimeout,\n destroy,\n bodyLength,\n deepClone,\n ReadableStreamFrom,\n isBuffer,\n validateHandler,\n getSocketInfo,\n isFormDataLike,\n buildURL,\n addAbortListener,\n isValidHTTPToken,\n isValidHeaderValue,\n isTokenCharCode,\n parseRangeHeader,\n normalizedMethodRecordsBase,\n normalizedMethodRecords,\n isValidPort,\n isHttpOrHttpsPrefixed,\n nodeMajor,\n nodeMinor,\n safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'],\n wrapRequestBody\n}\n", "'use strict'\nconst diagnosticsChannel = require('node:diagnostics_channel')\nconst util = require('node:util')\n\nconst undiciDebugLog = util.debuglog('undici')\nconst fetchDebuglog = util.debuglog('fetch')\nconst websocketDebuglog = util.debuglog('websocket')\nlet isClientSet = false\nconst channels = {\n // Client\n beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'),\n connected: diagnosticsChannel.channel('undici:client:connected'),\n connectError: diagnosticsChannel.channel('undici:client:connectError'),\n sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'),\n // Request\n create: diagnosticsChannel.channel('undici:request:create'),\n bodySent: diagnosticsChannel.channel('undici:request:bodySent'),\n headers: diagnosticsChannel.channel('undici:request:headers'),\n trailers: diagnosticsChannel.channel('undici:request:trailers'),\n error: diagnosticsChannel.channel('undici:request:error'),\n // WebSocket\n open: diagnosticsChannel.channel('undici:websocket:open'),\n close: diagnosticsChannel.channel('undici:websocket:close'),\n socketError: diagnosticsChannel.channel('undici:websocket:socket_error'),\n ping: diagnosticsChannel.channel('undici:websocket:ping'),\n pong: diagnosticsChannel.channel('undici:websocket:pong')\n}\n\nif (undiciDebugLog.enabled || fetchDebuglog.enabled) {\n const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog\n\n // Track all Client events\n diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debuglog(\n 'connecting to %s using %s%s',\n `${host}${port ? `:${port}` : ''}`,\n protocol,\n version\n )\n })\n\n diagnosticsChannel.channel('undici:client:connected').subscribe(evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debuglog(\n 'connected to %s using %s%s',\n `${host}${port ? `:${port}` : ''}`,\n protocol,\n version\n )\n })\n\n diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => {\n const {\n connectParams: { version, protocol, port, host },\n error\n } = evt\n debuglog(\n 'connection to %s using %s%s errored - %s',\n `${host}${port ? `:${port}` : ''}`,\n protocol,\n version,\n error.message\n )\n })\n\n diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => {\n const {\n request: { method, path, origin }\n } = evt\n debuglog('sending request to %s %s/%s', method, origin, path)\n })\n\n // Track Request events\n diagnosticsChannel.channel('undici:request:headers').subscribe(evt => {\n const {\n request: { method, path, origin },\n response: { statusCode }\n } = evt\n debuglog(\n 'received response to %s %s/%s - HTTP %d',\n method,\n origin,\n path,\n statusCode\n )\n })\n\n diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => {\n const {\n request: { method, path, origin }\n } = evt\n debuglog('trailers received from %s %s/%s', method, origin, path)\n })\n\n diagnosticsChannel.channel('undici:request:error').subscribe(evt => {\n const {\n request: { method, path, origin },\n error\n } = evt\n debuglog(\n 'request to %s %s/%s errored - %s',\n method,\n origin,\n path,\n error.message\n )\n })\n\n isClientSet = true\n}\n\nif (websocketDebuglog.enabled) {\n if (!isClientSet) {\n const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog\n diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debuglog(\n 'connecting to %s%s using %s%s',\n host,\n port ? `:${port}` : '',\n protocol,\n version\n )\n })\n\n diagnosticsChannel.channel('undici:client:connected').subscribe(evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debuglog(\n 'connected to %s%s using %s%s',\n host,\n port ? `:${port}` : '',\n protocol,\n version\n )\n })\n\n diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => {\n const {\n connectParams: { version, protocol, port, host },\n error\n } = evt\n debuglog(\n 'connection to %s%s using %s%s errored - %s',\n host,\n port ? `:${port}` : '',\n protocol,\n version,\n error.message\n )\n })\n\n diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => {\n const {\n request: { method, path, origin }\n } = evt\n debuglog('sending request to %s %s/%s', method, origin, path)\n })\n }\n\n // Track all WebSocket events\n diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => {\n const {\n address: { address, port }\n } = evt\n websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '')\n })\n\n diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => {\n const { websocket, code, reason } = evt\n websocketDebuglog(\n 'closed connection to %s - %s %s',\n websocket.url,\n code,\n reason\n )\n })\n\n diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => {\n websocketDebuglog('connection errored - %s', err.message)\n })\n\n diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => {\n websocketDebuglog('ping received')\n })\n\n diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => {\n websocketDebuglog('pong received')\n })\n}\n\nmodule.exports = {\n channels\n}\n", "'use strict'\n\nconst {\n InvalidArgumentError,\n NotSupportedError\n} = require('./errors')\nconst assert = require('node:assert')\nconst {\n isValidHTTPToken,\n isValidHeaderValue,\n isStream,\n destroy,\n isBuffer,\n isFormDataLike,\n isIterable,\n isBlobLike,\n buildURL,\n validateHandler,\n getServerName,\n normalizedMethodRecords\n} = require('./util')\nconst { channels } = require('./diagnostics.js')\nconst { headerNameLowerCasedRecord } = require('./constants')\n\n// Verifies that a given path is valid does not contain control chars \\x00 to \\x20\nconst invalidPathRegex = /[^\\u0021-\\u00ff]/\n\nconst kHandler = Symbol('handler')\n\nclass Request {\n constructor (origin, {\n path,\n method,\n body,\n headers,\n query,\n idempotent,\n blocking,\n upgrade,\n headersTimeout,\n bodyTimeout,\n reset,\n throwOnError,\n expectContinue,\n servername\n }, handler) {\n if (typeof path !== 'string') {\n throw new InvalidArgumentError('path must be a string')\n } else if (\n path[0] !== '/' &&\n !(path.startsWith('http://') || path.startsWith('https://')) &&\n method !== 'CONNECT'\n ) {\n throw new InvalidArgumentError('path must be an absolute URL or start with a slash')\n } else if (invalidPathRegex.test(path)) {\n throw new InvalidArgumentError('invalid request path')\n }\n\n if (typeof method !== 'string') {\n throw new InvalidArgumentError('method must be a string')\n } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) {\n throw new InvalidArgumentError('invalid request method')\n }\n\n if (upgrade && typeof upgrade !== 'string') {\n throw new InvalidArgumentError('upgrade must be a string')\n }\n\n if (upgrade && !isValidHeaderValue(upgrade)) {\n throw new InvalidArgumentError('invalid upgrade header')\n }\n\n if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('invalid headersTimeout')\n }\n\n if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('invalid bodyTimeout')\n }\n\n if (reset != null && typeof reset !== 'boolean') {\n throw new InvalidArgumentError('invalid reset')\n }\n\n if (expectContinue != null && typeof expectContinue !== 'boolean') {\n throw new InvalidArgumentError('invalid expectContinue')\n }\n\n this.headersTimeout = headersTimeout\n\n this.bodyTimeout = bodyTimeout\n\n this.throwOnError = throwOnError === true\n\n this.method = method\n\n this.abort = null\n\n if (body == null) {\n this.body = null\n } else if (isStream(body)) {\n this.body = body\n\n const rState = this.body._readableState\n if (!rState || !rState.autoDestroy) {\n this.endHandler = function autoDestroy () {\n destroy(this)\n }\n this.body.on('end', this.endHandler)\n }\n\n this.errorHandler = err => {\n if (this.abort) {\n this.abort(err)\n } else {\n this.error = err\n }\n }\n this.body.on('error', this.errorHandler)\n } else if (isBuffer(body)) {\n this.body = body.byteLength ? body : null\n } else if (ArrayBuffer.isView(body)) {\n this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null\n } else if (body instanceof ArrayBuffer) {\n this.body = body.byteLength ? Buffer.from(body) : null\n } else if (typeof body === 'string') {\n this.body = body.length ? Buffer.from(body) : null\n } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) {\n this.body = body\n } else {\n throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')\n }\n\n this.completed = false\n\n this.aborted = false\n\n this.upgrade = upgrade || null\n\n this.path = query ? buildURL(path, query) : path\n\n this.origin = origin\n\n this.idempotent = idempotent == null\n ? method === 'HEAD' || method === 'GET'\n : idempotent\n\n this.blocking = blocking == null ? false : blocking\n\n this.reset = reset == null ? null : reset\n\n this.host = null\n\n this.contentLength = null\n\n this.contentType = null\n\n this.headers = []\n\n // Only for H2\n this.expectContinue = expectContinue != null ? expectContinue : false\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(this, headers[i], headers[i + 1])\n }\n } else if (headers && typeof headers === 'object') {\n if (headers[Symbol.iterator]) {\n for (const header of headers) {\n if (!Array.isArray(header) || header.length !== 2) {\n throw new InvalidArgumentError('headers must be in key-value pair format')\n }\n processHeader(this, header[0], header[1])\n }\n } else {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; ++i) {\n processHeader(this, keys[i], headers[keys[i]])\n }\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n validateHandler(handler, method, upgrade)\n\n this.servername = servername || getServerName(this.host)\n\n this[kHandler] = handler\n\n if (channels.create.hasSubscribers) {\n channels.create.publish({ request: this })\n }\n }\n\n onBodySent (chunk) {\n if (this[kHandler].onBodySent) {\n try {\n return this[kHandler].onBodySent(chunk)\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onRequestSent () {\n if (channels.bodySent.hasSubscribers) {\n channels.bodySent.publish({ request: this })\n }\n\n if (this[kHandler].onRequestSent) {\n try {\n return this[kHandler].onRequestSent()\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onConnect (abort) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (this.error) {\n abort(this.error)\n } else {\n this.abort = abort\n return this[kHandler].onConnect(abort)\n }\n }\n\n onResponseStarted () {\n return this[kHandler].onResponseStarted?.()\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.headers.hasSubscribers) {\n channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })\n }\n\n try {\n return this[kHandler].onHeaders(statusCode, headers, resume, statusText)\n } catch (err) {\n this.abort(err)\n }\n }\n\n onData (chunk) {\n assert(!this.aborted)\n assert(!this.completed)\n\n try {\n return this[kHandler].onData(chunk)\n } catch (err) {\n this.abort(err)\n return false\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n assert(!this.aborted)\n assert(!this.completed)\n\n return this[kHandler].onUpgrade(statusCode, headers, socket)\n }\n\n onComplete (trailers) {\n this.onFinally()\n\n assert(!this.aborted)\n\n this.completed = true\n if (channels.trailers.hasSubscribers) {\n channels.trailers.publish({ request: this, trailers })\n }\n\n try {\n return this[kHandler].onComplete(trailers)\n } catch (err) {\n // TODO (fix): This might be a bad idea?\n this.onError(err)\n }\n }\n\n onError (error) {\n this.onFinally()\n\n if (channels.error.hasSubscribers) {\n channels.error.publish({ request: this, error })\n }\n\n if (this.aborted) {\n return\n }\n this.aborted = true\n\n return this[kHandler].onError(error)\n }\n\n onFinally () {\n if (this.errorHandler) {\n this.body.off('error', this.errorHandler)\n this.errorHandler = null\n }\n\n if (this.endHandler) {\n this.body.off('end', this.endHandler)\n this.endHandler = null\n }\n }\n\n addHeader (key, value) {\n processHeader(this, key, value)\n return this\n }\n}\n\nfunction processHeader (request, key, val) {\n if (val && (typeof val === 'object' && !Array.isArray(val))) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else if (val === undefined) {\n return\n }\n\n let headerName = headerNameLowerCasedRecord[key]\n\n if (headerName === undefined) {\n headerName = key.toLowerCase()\n if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) {\n throw new InvalidArgumentError('invalid header key')\n }\n }\n\n if (Array.isArray(val)) {\n const arr = []\n for (let i = 0; i < val.length; i++) {\n if (typeof val[i] === 'string') {\n if (!isValidHeaderValue(val[i])) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n arr.push(val[i])\n } else if (val[i] === null) {\n arr.push('')\n } else if (typeof val[i] === 'object') {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else {\n arr.push(`${val[i]}`)\n }\n }\n val = arr\n } else if (typeof val === 'string') {\n if (!isValidHeaderValue(val)) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n } else if (val === null) {\n val = ''\n } else {\n val = `${val}`\n }\n\n if (headerName === 'host') {\n if (request.host !== null) {\n throw new InvalidArgumentError('duplicate host header')\n }\n if (typeof val !== 'string') {\n throw new InvalidArgumentError('invalid host header')\n }\n // Consumed by Client\n request.host = val\n } else if (headerName === 'content-length') {\n if (request.contentLength !== null) {\n throw new InvalidArgumentError('duplicate content-length header')\n }\n request.contentLength = parseInt(val, 10)\n if (!Number.isFinite(request.contentLength)) {\n throw new InvalidArgumentError('invalid content-length header')\n }\n } else if (request.contentType === null && headerName === 'content-type') {\n request.contentType = val\n request.headers.push(key, val)\n } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') {\n throw new InvalidArgumentError(`invalid ${headerName} header`)\n } else if (headerName === 'connection') {\n const value = typeof val === 'string' ? val.toLowerCase() : null\n if (value !== 'close' && value !== 'keep-alive') {\n throw new InvalidArgumentError('invalid connection header')\n }\n\n if (value === 'close') {\n request.reset = true\n }\n } else if (headerName === 'expect') {\n throw new NotSupportedError('expect header not supported')\n } else {\n request.headers.push(key, val)\n }\n}\n\nmodule.exports = Request\n", "'use strict'\nconst EventEmitter = require('node:events')\n\nclass Dispatcher extends EventEmitter {\n dispatch () {\n throw new Error('not implemented')\n }\n\n close () {\n throw new Error('not implemented')\n }\n\n destroy () {\n throw new Error('not implemented')\n }\n\n compose (...args) {\n // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ...\n const interceptors = Array.isArray(args[0]) ? args[0] : args\n let dispatch = this.dispatch.bind(this)\n\n for (const interceptor of interceptors) {\n if (interceptor == null) {\n continue\n }\n\n if (typeof interceptor !== 'function') {\n throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`)\n }\n\n dispatch = interceptor(dispatch)\n\n if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) {\n throw new TypeError('invalid interceptor')\n }\n }\n\n return new ComposedDispatcher(this, dispatch)\n }\n}\n\nclass ComposedDispatcher extends Dispatcher {\n #dispatcher = null\n #dispatch = null\n\n constructor (dispatcher, dispatch) {\n super()\n this.#dispatcher = dispatcher\n this.#dispatch = dispatch\n }\n\n dispatch (...args) {\n this.#dispatch(...args)\n }\n\n close (...args) {\n return this.#dispatcher.close(...args)\n }\n\n destroy (...args) {\n return this.#dispatcher.destroy(...args)\n }\n}\n\nmodule.exports = Dispatcher\n", "'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst {\n ClientDestroyedError,\n ClientClosedError,\n InvalidArgumentError\n} = require('../core/errors')\nconst { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require('../core/symbols')\n\nconst kOnDestroyed = Symbol('onDestroyed')\nconst kOnClosed = Symbol('onClosed')\nconst kInterceptedDispatch = Symbol('Intercepted Dispatch')\nconst kWebSocketOptions = Symbol('webSocketOptions')\n\nclass DispatcherBase extends Dispatcher {\n constructor (opts) {\n super()\n\n this[kDestroyed] = false\n this[kOnDestroyed] = null\n this[kClosed] = false\n this[kOnClosed] = []\n this[kWebSocketOptions] = opts?.webSocket ?? {}\n }\n\n get webSocketOptions () {\n return {\n maxFragments: this[kWebSocketOptions].maxFragments ?? 131072,\n maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024\n }\n }\n\n get destroyed () {\n return this[kDestroyed]\n }\n\n get closed () {\n return this[kClosed]\n }\n\n get interceptors () {\n return this[kInterceptors]\n }\n\n set interceptors (newInterceptors) {\n if (newInterceptors) {\n for (let i = newInterceptors.length - 1; i >= 0; i--) {\n const interceptor = this[kInterceptors][i]\n if (typeof interceptor !== 'function') {\n throw new InvalidArgumentError('interceptor must be an function')\n }\n }\n }\n\n this[kInterceptors] = newInterceptors\n }\n\n close (callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.close((err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n queueMicrotask(() => callback(new ClientDestroyedError(), null))\n return\n }\n\n if (this[kClosed]) {\n if (this[kOnClosed]) {\n this[kOnClosed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n this[kClosed] = true\n this[kOnClosed].push(callback)\n\n const onClosed = () => {\n const callbacks = this[kOnClosed]\n this[kOnClosed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kClose]()\n .then(() => this.destroy())\n .then(() => {\n queueMicrotask(onClosed)\n })\n }\n\n destroy (err, callback) {\n if (typeof err === 'function') {\n callback = err\n err = null\n }\n\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.destroy(err, (err, data) => {\n return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n if (this[kOnDestroyed]) {\n this[kOnDestroyed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n if (!err) {\n err = new ClientDestroyedError()\n }\n\n this[kDestroyed] = true\n this[kOnDestroyed] = this[kOnDestroyed] || []\n this[kOnDestroyed].push(callback)\n\n const onDestroyed = () => {\n const callbacks = this[kOnDestroyed]\n this[kOnDestroyed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kDestroy](err).then(() => {\n queueMicrotask(onDestroyed)\n })\n }\n\n [kInterceptedDispatch] (opts, handler) {\n if (!this[kInterceptors] || this[kInterceptors].length === 0) {\n this[kInterceptedDispatch] = this[kDispatch]\n return this[kDispatch](opts, handler)\n }\n\n let dispatch = this[kDispatch].bind(this)\n for (let i = this[kInterceptors].length - 1; i >= 0; i--) {\n dispatch = this[kInterceptors][i](dispatch)\n }\n this[kInterceptedDispatch] = dispatch\n return dispatch(opts, handler)\n }\n\n dispatch (opts, handler) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n try {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object.')\n }\n\n if (this[kDestroyed] || this[kOnDestroyed]) {\n throw new ClientDestroyedError()\n }\n\n if (this[kClosed]) {\n throw new ClientClosedError()\n }\n\n return this[kInterceptedDispatch](opts, handler)\n } catch (err) {\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n handler.onError(err)\n\n return false\n }\n }\n}\n\nmodule.exports = DispatcherBase\n", "'use strict'\n\n/**\n * This module offers an optimized timer implementation designed for scenarios\n * where high precision is not critical.\n *\n * The timer achieves faster performance by using a low-resolution approach,\n * with an accuracy target of within 500ms. This makes it particularly useful\n * for timers with delays of 1 second or more, where exact timing is less\n * crucial.\n *\n * It's important to note that Node.js timers are inherently imprecise, as\n * delays can occur due to the event loop being blocked by other operations.\n * Consequently, timers may trigger later than their scheduled time.\n */\n\n/**\n * The fastNow variable contains the internal fast timer clock value.\n *\n * @type {number}\n */\nlet fastNow = 0\n\n/**\n * RESOLUTION_MS represents the target resolution time in milliseconds.\n *\n * @type {number}\n * @default 1000\n */\nconst RESOLUTION_MS = 1e3\n\n/**\n * TICK_MS defines the desired interval in milliseconds between each tick.\n * The target value is set to half the resolution time, minus 1 ms, to account\n * for potential event loop overhead.\n *\n * @type {number}\n * @default 499\n */\nconst TICK_MS = (RESOLUTION_MS >> 1) - 1\n\n/**\n * fastNowTimeout is a Node.js timer used to manage and process\n * the FastTimers stored in the `fastTimers` array.\n *\n * @type {NodeJS.Timeout}\n */\nlet fastNowTimeout\n\n/**\n * The kFastTimer symbol is used to identify FastTimer instances.\n *\n * @type {Symbol}\n */\nconst kFastTimer = Symbol('kFastTimer')\n\n/**\n * The fastTimers array contains all active FastTimers.\n *\n * @type {FastTimer[]}\n */\nconst fastTimers = []\n\n/**\n * These constants represent the various states of a FastTimer.\n */\n\n/**\n * The `NOT_IN_LIST` constant indicates that the FastTimer is not included\n * in the `fastTimers` array. Timers with this status will not be processed\n * during the next tick by the `onTick` function.\n *\n * A FastTimer can be re-added to the `fastTimers` array by invoking the\n * `refresh` method on the FastTimer instance.\n *\n * @type {-2}\n */\nconst NOT_IN_LIST = -2\n\n/**\n * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled\n * for removal from the `fastTimers` array. A FastTimer in this state will\n * be removed in the next tick by the `onTick` function and will no longer\n * be processed.\n *\n * This status is also set when the `clear` method is called on the FastTimer instance.\n *\n * @type {-1}\n */\nconst TO_BE_CLEARED = -1\n\n/**\n * The `PENDING` constant signifies that the FastTimer is awaiting processing\n * in the next tick by the `onTick` function. Timers with this status will have\n * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick.\n *\n * @type {0}\n */\nconst PENDING = 0\n\n/**\n * The `ACTIVE` constant indicates that the FastTimer is active and waiting\n * for its timer to expire. During the next tick, the `onTick` function will\n * check if the timer has expired, and if so, it will execute the associated callback.\n *\n * @type {1}\n */\nconst ACTIVE = 1\n\n/**\n * The onTick function processes the fastTimers array.\n *\n * @returns {void}\n */\nfunction onTick () {\n /**\n * Increment the fastNow value by the TICK_MS value, despite the actual time\n * that has passed since the last tick. This approach ensures independence\n * from the system clock and delays caused by a blocked event loop.\n *\n * @type {number}\n */\n fastNow += TICK_MS\n\n /**\n * The `idx` variable is used to iterate over the `fastTimers` array.\n * Expired timers are removed by replacing them with the last element in the array.\n * Consequently, `idx` is only incremented when the current element is not removed.\n *\n * @type {number}\n */\n let idx = 0\n\n /**\n * The len variable will contain the length of the fastTimers array\n * and will be decremented when a FastTimer should be removed from the\n * fastTimers array.\n *\n * @type {number}\n */\n let len = fastTimers.length\n\n while (idx < len) {\n /**\n * @type {FastTimer}\n */\n const timer = fastTimers[idx]\n\n // If the timer is in the ACTIVE state and the timer has expired, it will\n // be processed in the next tick.\n if (timer._state === PENDING) {\n // Set the _idleStart value to the fastNow value minus the TICK_MS value\n // to account for the time the timer was in the PENDING state.\n timer._idleStart = fastNow - TICK_MS\n timer._state = ACTIVE\n } else if (\n timer._state === ACTIVE &&\n fastNow >= timer._idleStart + timer._idleTimeout\n ) {\n timer._state = TO_BE_CLEARED\n timer._idleStart = -1\n timer._onTimeout(timer._timerArg)\n }\n\n if (timer._state === TO_BE_CLEARED) {\n timer._state = NOT_IN_LIST\n\n // Move the last element to the current index and decrement len if it is\n // not the only element in the array.\n if (--len !== 0) {\n fastTimers[idx] = fastTimers[len]\n }\n } else {\n ++idx\n }\n }\n\n // Set the length of the fastTimers array to the new length and thus\n // removing the excess FastTimers elements from the array.\n fastTimers.length = len\n\n // If there are still active FastTimers in the array, refresh the Timer.\n // If there are no active FastTimers, the timer will be refreshed again\n // when a new FastTimer is instantiated.\n if (fastTimers.length !== 0) {\n refreshTimeout()\n }\n}\n\nfunction refreshTimeout () {\n // If the fastNowTimeout is already set, refresh it.\n if (fastNowTimeout) {\n fastNowTimeout.refresh()\n // fastNowTimeout is not instantiated yet, create a new Timer.\n } else {\n clearTimeout(fastNowTimeout)\n fastNowTimeout = setTimeout(onTick, TICK_MS)\n\n // If the Timer has an unref method, call it to allow the process to exit if\n // there are no other active handles.\n if (fastNowTimeout.unref) {\n fastNowTimeout.unref()\n }\n }\n}\n\n/**\n * The `FastTimer` class is a data structure designed to store and manage\n * timer information.\n */\nclass FastTimer {\n [kFastTimer] = true\n\n /**\n * The state of the timer, which can be one of the following:\n * - NOT_IN_LIST (-2)\n * - TO_BE_CLEARED (-1)\n * - PENDING (0)\n * - ACTIVE (1)\n *\n * @type {-2|-1|0|1}\n * @private\n */\n _state = NOT_IN_LIST\n\n /**\n * The number of milliseconds to wait before calling the callback.\n *\n * @type {number}\n * @private\n */\n _idleTimeout = -1\n\n /**\n * The time in milliseconds when the timer was started. This value is used to\n * calculate when the timer should expire.\n *\n * @type {number}\n * @default -1\n * @private\n */\n _idleStart = -1\n\n /**\n * The function to be executed when the timer expires.\n * @type {Function}\n * @private\n */\n _onTimeout\n\n /**\n * The argument to be passed to the callback when the timer expires.\n *\n * @type {*}\n * @private\n */\n _timerArg\n\n /**\n * @constructor\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should wait\n * before the specified function or code is executed.\n * @param {*} arg\n */\n constructor (callback, delay, arg) {\n this._onTimeout = callback\n this._idleTimeout = delay\n this._timerArg = arg\n\n this.refresh()\n }\n\n /**\n * Sets the timer's start time to the current time, and reschedules the timer\n * to call its callback at the previously specified duration adjusted to the\n * current time.\n * Using this on a timer that has already called its callback will reactivate\n * the timer.\n *\n * @returns {void}\n */\n refresh () {\n // In the special case that the timer is not in the list of active timers,\n // add it back to the array to be processed in the next tick by the onTick\n // function.\n if (this._state === NOT_IN_LIST) {\n fastTimers.push(this)\n }\n\n // If the timer is the only active timer, refresh the fastNowTimeout for\n // better resolution.\n if (!fastNowTimeout || fastTimers.length === 1) {\n refreshTimeout()\n }\n\n // Setting the state to PENDING will cause the timer to be reset in the\n // next tick by the onTick function.\n this._state = PENDING\n }\n\n /**\n * The `clear` method cancels the timer, preventing it from executing.\n *\n * @returns {void}\n * @private\n */\n clear () {\n // Set the state to TO_BE_CLEARED to mark the timer for removal in the next\n // tick by the onTick function.\n this._state = TO_BE_CLEARED\n\n // Reset the _idleStart value to -1 to indicate that the timer is no longer\n // active.\n this._idleStart = -1\n }\n}\n\n/**\n * This module exports a setTimeout and clearTimeout function that can be\n * used as a drop-in replacement for the native functions.\n */\nmodule.exports = {\n /**\n * The setTimeout() method sets a timer which executes a function once the\n * timer expires.\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should\n * wait before the specified function or code is executed.\n * @param {*} [arg] An optional argument to be passed to the callback function\n * when the timer expires.\n * @returns {NodeJS.Timeout|FastTimer}\n */\n setTimeout (callback, delay, arg) {\n // If the delay is less than or equal to the RESOLUTION_MS value return a\n // native Node.js Timer instance.\n return delay <= RESOLUTION_MS\n ? setTimeout(callback, delay, arg)\n : new FastTimer(callback, delay, arg)\n },\n /**\n * The clearTimeout method cancels an instantiated Timer previously created\n * by calling setTimeout.\n *\n * @param {NodeJS.Timeout|FastTimer} timeout\n */\n clearTimeout (timeout) {\n // If the timeout is a FastTimer, call its own clear method.\n if (timeout[kFastTimer]) {\n /**\n * @type {FastTimer}\n */\n timeout.clear()\n // Otherwise it is an instance of a native NodeJS.Timeout, so call the\n // Node.js native clearTimeout function.\n } else {\n clearTimeout(timeout)\n }\n },\n /**\n * The setFastTimeout() method sets a fastTimer which executes a function once\n * the timer expires.\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should\n * wait before the specified function or code is executed.\n * @param {*} [arg] An optional argument to be passed to the callback function\n * when the timer expires.\n * @returns {FastTimer}\n */\n setFastTimeout (callback, delay, arg) {\n return new FastTimer(callback, delay, arg)\n },\n /**\n * The clearTimeout method cancels an instantiated FastTimer previously\n * created by calling setFastTimeout.\n *\n * @param {FastTimer} timeout\n */\n clearFastTimeout (timeout) {\n timeout.clear()\n },\n /**\n * The now method returns the value of the internal fast timer clock.\n *\n * @returns {number}\n */\n now () {\n return fastNow\n },\n /**\n * Trigger the onTick function to process the fastTimers array.\n * Exported for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n * @param {number} [delay=0] The delay in milliseconds to add to the now value.\n */\n tick (delay = 0) {\n fastNow += delay - RESOLUTION_MS + 1\n onTick()\n onTick()\n },\n /**\n * Reset FastTimers.\n * Exported for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n */\n reset () {\n fastNow = 0\n fastTimers.length = 0\n clearTimeout(fastNowTimeout)\n fastNowTimeout = null\n },\n /**\n * Exporting for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n */\n kFastTimer\n}\n", "'use strict'\n\nconst net = require('node:net')\nconst assert = require('node:assert')\nconst util = require('./util')\nconst { InvalidArgumentError, ConnectTimeoutError } = require('./errors')\nconst timers = require('../util/timers')\n\nfunction noop () {}\n\nlet tls // include tls conditionally since it is not always available\n\n// TODO: session re-use does not wait for the first\n// connection to resolve the session and might therefore\n// resolve the same servername multiple times even when\n// re-use is enabled.\n\nlet SessionCache\n// FIXME: remove workaround when the Node bug is fixed\n// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\nif (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) {\n SessionCache = class WeakSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n this._sessionRegistry = new global.FinalizationRegistry((key) => {\n if (this._sessionCache.size < this._maxCachedSessions) {\n return\n }\n\n const ref = this._sessionCache.get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this._sessionCache.delete(key)\n }\n })\n }\n\n get (sessionKey) {\n const ref = this._sessionCache.get(sessionKey)\n return ref ? ref.deref() : null\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n this._sessionCache.set(sessionKey, new WeakRef(session))\n this._sessionRegistry.register(session, sessionKey)\n }\n }\n} else {\n SessionCache = class SimpleSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n }\n\n get (sessionKey) {\n return this._sessionCache.get(sessionKey)\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n if (this._sessionCache.size >= this._maxCachedSessions) {\n // remove the oldest session\n const { value: oldestKey } = this._sessionCache.keys().next()\n this._sessionCache.delete(oldestKey)\n }\n\n this._sessionCache.set(sessionKey, session)\n }\n }\n}\n\nfunction buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {\n if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {\n throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')\n }\n\n const options = { path: socketPath, ...opts }\n const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)\n timeout = timeout == null ? 10e3 : timeout\n allowH2 = allowH2 != null ? allowH2 : false\n return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {\n let socket\n if (protocol === 'https:') {\n if (!tls) {\n tls = require('node:tls')\n }\n servername = servername || options.servername || util.getServerName(host) || null\n\n const sessionKey = servername || hostname\n assert(sessionKey)\n\n const session = customSession || sessionCache.get(sessionKey) || null\n\n port = port || 443\n\n socket = tls.connect({\n highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...\n ...options,\n servername,\n session,\n localAddress,\n // TODO(HTTP/2): Add support for h2c\n ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'],\n socket: httpSocket, // upgrade socket connection\n port,\n host: hostname\n })\n\n socket\n .on('session', function (session) {\n // TODO (fix): Can a session become invalid once established? Don't think so?\n sessionCache.set(sessionKey, session)\n })\n } else {\n assert(!httpSocket, 'httpSocket can only be sent on TLS update')\n\n port = port || 80\n\n socket = net.connect({\n highWaterMark: 64 * 1024, // Same as nodejs fs streams.\n ...options,\n localAddress,\n port,\n host: hostname\n })\n }\n\n // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket\n if (options.keepAlive == null || options.keepAlive) {\n const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay\n socket.setKeepAlive(true, keepAliveInitialDelay)\n }\n\n const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port })\n\n socket\n .setNoDelay(true)\n .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {\n queueMicrotask(clearConnectTimeout)\n\n if (callback) {\n const cb = callback\n callback = null\n cb(null, this)\n }\n })\n .on('error', function (err) {\n queueMicrotask(clearConnectTimeout)\n\n if (callback) {\n const cb = callback\n callback = null\n cb(err)\n }\n })\n\n return socket\n }\n}\n\n/**\n * @param {WeakRef} socketWeakRef\n * @param {object} opts\n * @param {number} opts.timeout\n * @param {string} opts.hostname\n * @param {number} opts.port\n * @returns {() => void}\n */\nconst setupConnectTimeout = process.platform === 'win32'\n ? (socketWeakRef, opts) => {\n if (!opts.timeout) {\n return noop\n }\n\n let s1 = null\n let s2 = null\n const fastTimer = timers.setFastTimeout(() => {\n // setImmediate is added to make sure that we prioritize socket error events over timeouts\n s1 = setImmediate(() => {\n // Windows needs an extra setImmediate probably due to implementation differences in the socket logic\n s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts))\n })\n }, opts.timeout)\n return () => {\n timers.clearFastTimeout(fastTimer)\n clearImmediate(s1)\n clearImmediate(s2)\n }\n }\n : (socketWeakRef, opts) => {\n if (!opts.timeout) {\n return noop\n }\n\n let s1 = null\n const fastTimer = timers.setFastTimeout(() => {\n // setImmediate is added to make sure that we prioritize socket error events over timeouts\n s1 = setImmediate(() => {\n onConnectTimeout(socketWeakRef.deref(), opts)\n })\n }, opts.timeout)\n return () => {\n timers.clearFastTimeout(fastTimer)\n clearImmediate(s1)\n }\n }\n\n/**\n * @param {net.Socket} socket\n * @param {object} opts\n * @param {number} opts.timeout\n * @param {string} opts.hostname\n * @param {number} opts.port\n */\nfunction onConnectTimeout (socket, opts) {\n // The socket could be already garbage collected\n if (socket == null) {\n return\n }\n\n let message = 'Connect Timeout Error'\n if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) {\n message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},`\n } else {\n message += ` (attempted address: ${opts.hostname}:${opts.port},`\n }\n\n message += ` timeout: ${opts.timeout}ms)`\n\n util.destroy(socket, new ConnectTimeoutError(message))\n}\n\nmodule.exports = buildConnector\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enumToMap = void 0;\nfunction enumToMap(obj) {\n const res = {};\n Object.keys(obj).forEach((key) => {\n const value = obj[key];\n if (typeof value === 'number') {\n res[key] = value;\n }\n });\n return res;\n}\nexports.enumToMap = enumToMap;\n//# sourceMappingURL=utils.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0;\nconst utils_1 = require(\"./utils\");\n// C headers\nvar ERROR;\n(function (ERROR) {\n ERROR[ERROR[\"OK\"] = 0] = \"OK\";\n ERROR[ERROR[\"INTERNAL\"] = 1] = \"INTERNAL\";\n ERROR[ERROR[\"STRICT\"] = 2] = \"STRICT\";\n ERROR[ERROR[\"LF_EXPECTED\"] = 3] = \"LF_EXPECTED\";\n ERROR[ERROR[\"UNEXPECTED_CONTENT_LENGTH\"] = 4] = \"UNEXPECTED_CONTENT_LENGTH\";\n ERROR[ERROR[\"CLOSED_CONNECTION\"] = 5] = \"CLOSED_CONNECTION\";\n ERROR[ERROR[\"INVALID_METHOD\"] = 6] = \"INVALID_METHOD\";\n ERROR[ERROR[\"INVALID_URL\"] = 7] = \"INVALID_URL\";\n ERROR[ERROR[\"INVALID_CONSTANT\"] = 8] = \"INVALID_CONSTANT\";\n ERROR[ERROR[\"INVALID_VERSION\"] = 9] = \"INVALID_VERSION\";\n ERROR[ERROR[\"INVALID_HEADER_TOKEN\"] = 10] = \"INVALID_HEADER_TOKEN\";\n ERROR[ERROR[\"INVALID_CONTENT_LENGTH\"] = 11] = \"INVALID_CONTENT_LENGTH\";\n ERROR[ERROR[\"INVALID_CHUNK_SIZE\"] = 12] = \"INVALID_CHUNK_SIZE\";\n ERROR[ERROR[\"INVALID_STATUS\"] = 13] = \"INVALID_STATUS\";\n ERROR[ERROR[\"INVALID_EOF_STATE\"] = 14] = \"INVALID_EOF_STATE\";\n ERROR[ERROR[\"INVALID_TRANSFER_ENCODING\"] = 15] = \"INVALID_TRANSFER_ENCODING\";\n ERROR[ERROR[\"CB_MESSAGE_BEGIN\"] = 16] = \"CB_MESSAGE_BEGIN\";\n ERROR[ERROR[\"CB_HEADERS_COMPLETE\"] = 17] = \"CB_HEADERS_COMPLETE\";\n ERROR[ERROR[\"CB_MESSAGE_COMPLETE\"] = 18] = \"CB_MESSAGE_COMPLETE\";\n ERROR[ERROR[\"CB_CHUNK_HEADER\"] = 19] = \"CB_CHUNK_HEADER\";\n ERROR[ERROR[\"CB_CHUNK_COMPLETE\"] = 20] = \"CB_CHUNK_COMPLETE\";\n ERROR[ERROR[\"PAUSED\"] = 21] = \"PAUSED\";\n ERROR[ERROR[\"PAUSED_UPGRADE\"] = 22] = \"PAUSED_UPGRADE\";\n ERROR[ERROR[\"PAUSED_H2_UPGRADE\"] = 23] = \"PAUSED_H2_UPGRADE\";\n ERROR[ERROR[\"USER\"] = 24] = \"USER\";\n})(ERROR = exports.ERROR || (exports.ERROR = {}));\nvar TYPE;\n(function (TYPE) {\n TYPE[TYPE[\"BOTH\"] = 0] = \"BOTH\";\n TYPE[TYPE[\"REQUEST\"] = 1] = \"REQUEST\";\n TYPE[TYPE[\"RESPONSE\"] = 2] = \"RESPONSE\";\n})(TYPE = exports.TYPE || (exports.TYPE = {}));\nvar FLAGS;\n(function (FLAGS) {\n FLAGS[FLAGS[\"CONNECTION_KEEP_ALIVE\"] = 1] = \"CONNECTION_KEEP_ALIVE\";\n FLAGS[FLAGS[\"CONNECTION_CLOSE\"] = 2] = \"CONNECTION_CLOSE\";\n FLAGS[FLAGS[\"CONNECTION_UPGRADE\"] = 4] = \"CONNECTION_UPGRADE\";\n FLAGS[FLAGS[\"CHUNKED\"] = 8] = \"CHUNKED\";\n FLAGS[FLAGS[\"UPGRADE\"] = 16] = \"UPGRADE\";\n FLAGS[FLAGS[\"CONTENT_LENGTH\"] = 32] = \"CONTENT_LENGTH\";\n FLAGS[FLAGS[\"SKIPBODY\"] = 64] = \"SKIPBODY\";\n FLAGS[FLAGS[\"TRAILING\"] = 128] = \"TRAILING\";\n // 1 << 8 is unused\n FLAGS[FLAGS[\"TRANSFER_ENCODING\"] = 512] = \"TRANSFER_ENCODING\";\n})(FLAGS = exports.FLAGS || (exports.FLAGS = {}));\nvar LENIENT_FLAGS;\n(function (LENIENT_FLAGS) {\n LENIENT_FLAGS[LENIENT_FLAGS[\"HEADERS\"] = 1] = \"HEADERS\";\n LENIENT_FLAGS[LENIENT_FLAGS[\"CHUNKED_LENGTH\"] = 2] = \"CHUNKED_LENGTH\";\n LENIENT_FLAGS[LENIENT_FLAGS[\"KEEP_ALIVE\"] = 4] = \"KEEP_ALIVE\";\n})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {}));\nvar METHODS;\n(function (METHODS) {\n METHODS[METHODS[\"DELETE\"] = 0] = \"DELETE\";\n METHODS[METHODS[\"GET\"] = 1] = \"GET\";\n METHODS[METHODS[\"HEAD\"] = 2] = \"HEAD\";\n METHODS[METHODS[\"POST\"] = 3] = \"POST\";\n METHODS[METHODS[\"PUT\"] = 4] = \"PUT\";\n /* pathological */\n METHODS[METHODS[\"CONNECT\"] = 5] = \"CONNECT\";\n METHODS[METHODS[\"OPTIONS\"] = 6] = \"OPTIONS\";\n METHODS[METHODS[\"TRACE\"] = 7] = \"TRACE\";\n /* WebDAV */\n METHODS[METHODS[\"COPY\"] = 8] = \"COPY\";\n METHODS[METHODS[\"LOCK\"] = 9] = \"LOCK\";\n METHODS[METHODS[\"MKCOL\"] = 10] = \"MKCOL\";\n METHODS[METHODS[\"MOVE\"] = 11] = \"MOVE\";\n METHODS[METHODS[\"PROPFIND\"] = 12] = \"PROPFIND\";\n METHODS[METHODS[\"PROPPATCH\"] = 13] = \"PROPPATCH\";\n METHODS[METHODS[\"SEARCH\"] = 14] = \"SEARCH\";\n METHODS[METHODS[\"UNLOCK\"] = 15] = \"UNLOCK\";\n METHODS[METHODS[\"BIND\"] = 16] = \"BIND\";\n METHODS[METHODS[\"REBIND\"] = 17] = \"REBIND\";\n METHODS[METHODS[\"UNBIND\"] = 18] = \"UNBIND\";\n METHODS[METHODS[\"ACL\"] = 19] = \"ACL\";\n /* subversion */\n METHODS[METHODS[\"REPORT\"] = 20] = \"REPORT\";\n METHODS[METHODS[\"MKACTIVITY\"] = 21] = \"MKACTIVITY\";\n METHODS[METHODS[\"CHECKOUT\"] = 22] = \"CHECKOUT\";\n METHODS[METHODS[\"MERGE\"] = 23] = \"MERGE\";\n /* upnp */\n METHODS[METHODS[\"M-SEARCH\"] = 24] = \"M-SEARCH\";\n METHODS[METHODS[\"NOTIFY\"] = 25] = \"NOTIFY\";\n METHODS[METHODS[\"SUBSCRIBE\"] = 26] = \"SUBSCRIBE\";\n METHODS[METHODS[\"UNSUBSCRIBE\"] = 27] = \"UNSUBSCRIBE\";\n /* RFC-5789 */\n METHODS[METHODS[\"PATCH\"] = 28] = \"PATCH\";\n METHODS[METHODS[\"PURGE\"] = 29] = \"PURGE\";\n /* CalDAV */\n METHODS[METHODS[\"MKCALENDAR\"] = 30] = \"MKCALENDAR\";\n /* RFC-2068, section 19.6.1.2 */\n METHODS[METHODS[\"LINK\"] = 31] = \"LINK\";\n METHODS[METHODS[\"UNLINK\"] = 32] = \"UNLINK\";\n /* icecast */\n METHODS[METHODS[\"SOURCE\"] = 33] = \"SOURCE\";\n /* RFC-7540, section 11.6 */\n METHODS[METHODS[\"PRI\"] = 34] = \"PRI\";\n /* RFC-2326 RTSP */\n METHODS[METHODS[\"DESCRIBE\"] = 35] = \"DESCRIBE\";\n METHODS[METHODS[\"ANNOUNCE\"] = 36] = \"ANNOUNCE\";\n METHODS[METHODS[\"SETUP\"] = 37] = \"SETUP\";\n METHODS[METHODS[\"PLAY\"] = 38] = \"PLAY\";\n METHODS[METHODS[\"PAUSE\"] = 39] = \"PAUSE\";\n METHODS[METHODS[\"TEARDOWN\"] = 40] = \"TEARDOWN\";\n METHODS[METHODS[\"GET_PARAMETER\"] = 41] = \"GET_PARAMETER\";\n METHODS[METHODS[\"SET_PARAMETER\"] = 42] = \"SET_PARAMETER\";\n METHODS[METHODS[\"REDIRECT\"] = 43] = \"REDIRECT\";\n METHODS[METHODS[\"RECORD\"] = 44] = \"RECORD\";\n /* RAOP */\n METHODS[METHODS[\"FLUSH\"] = 45] = \"FLUSH\";\n})(METHODS = exports.METHODS || (exports.METHODS = {}));\nexports.METHODS_HTTP = [\n METHODS.DELETE,\n METHODS.GET,\n METHODS.HEAD,\n METHODS.POST,\n METHODS.PUT,\n METHODS.CONNECT,\n METHODS.OPTIONS,\n METHODS.TRACE,\n METHODS.COPY,\n METHODS.LOCK,\n METHODS.MKCOL,\n METHODS.MOVE,\n METHODS.PROPFIND,\n METHODS.PROPPATCH,\n METHODS.SEARCH,\n METHODS.UNLOCK,\n METHODS.BIND,\n METHODS.REBIND,\n METHODS.UNBIND,\n METHODS.ACL,\n METHODS.REPORT,\n METHODS.MKACTIVITY,\n METHODS.CHECKOUT,\n METHODS.MERGE,\n METHODS['M-SEARCH'],\n METHODS.NOTIFY,\n METHODS.SUBSCRIBE,\n METHODS.UNSUBSCRIBE,\n METHODS.PATCH,\n METHODS.PURGE,\n METHODS.MKCALENDAR,\n METHODS.LINK,\n METHODS.UNLINK,\n METHODS.PRI,\n // TODO(indutny): should we allow it with HTTP?\n METHODS.SOURCE,\n];\nexports.METHODS_ICE = [\n METHODS.SOURCE,\n];\nexports.METHODS_RTSP = [\n METHODS.OPTIONS,\n METHODS.DESCRIBE,\n METHODS.ANNOUNCE,\n METHODS.SETUP,\n METHODS.PLAY,\n METHODS.PAUSE,\n METHODS.TEARDOWN,\n METHODS.GET_PARAMETER,\n METHODS.SET_PARAMETER,\n METHODS.REDIRECT,\n METHODS.RECORD,\n METHODS.FLUSH,\n // For AirPlay\n METHODS.GET,\n METHODS.POST,\n];\nexports.METHOD_MAP = utils_1.enumToMap(METHODS);\nexports.H_METHOD_MAP = {};\nObject.keys(exports.METHOD_MAP).forEach((key) => {\n if (/^H/.test(key)) {\n exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key];\n }\n});\nvar FINISH;\n(function (FINISH) {\n FINISH[FINISH[\"SAFE\"] = 0] = \"SAFE\";\n FINISH[FINISH[\"SAFE_WITH_CB\"] = 1] = \"SAFE_WITH_CB\";\n FINISH[FINISH[\"UNSAFE\"] = 2] = \"UNSAFE\";\n})(FINISH = exports.FINISH || (exports.FINISH = {}));\nexports.ALPHA = [];\nfor (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) {\n // Upper case\n exports.ALPHA.push(String.fromCharCode(i));\n // Lower case\n exports.ALPHA.push(String.fromCharCode(i + 0x20));\n}\nexports.NUM_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n};\nexports.HEX_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF,\n a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf,\n};\nexports.NUM = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n];\nexports.ALPHANUM = exports.ALPHA.concat(exports.NUM);\nexports.MARK = ['-', '_', '.', '!', '~', '*', '\\'', '(', ')'];\nexports.USERINFO_CHARS = exports.ALPHANUM\n .concat(exports.MARK)\n .concat(['%', ';', ':', '&', '=', '+', '$', ',']);\n// TODO(indutny): use RFC\nexports.STRICT_URL_CHAR = [\n '!', '\"', '$', '%', '&', '\\'',\n '(', ')', '*', '+', ',', '-', '.', '/',\n ':', ';', '<', '=', '>',\n '@', '[', '\\\\', ']', '^', '_',\n '`',\n '{', '|', '}', '~',\n].concat(exports.ALPHANUM);\nexports.URL_CHAR = exports.STRICT_URL_CHAR\n .concat(['\\t', '\\f']);\n// All characters with 0x80 bit set to 1\nfor (let i = 0x80; i <= 0xff; i++) {\n exports.URL_CHAR.push(i);\n}\nexports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);\n/* Tokens as defined by rfc 2616. Also lowercases them.\n * token = 1*\n * separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n * | \",\" | \";\" | \":\" | \"\\\" | <\">\n * | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n * | \"{\" | \"}\" | SP | HT\n */\nexports.STRICT_TOKEN = [\n '!', '#', '$', '%', '&', '\\'',\n '*', '+', '-', '.',\n '^', '_', '`',\n '|', '~',\n].concat(exports.ALPHANUM);\nexports.TOKEN = exports.STRICT_TOKEN.concat([' ']);\n/*\n * Verify that a char is a valid visible (printable) US-ASCII\n * character or %x80-FF\n */\nexports.HEADER_CHARS = ['\\t'];\nfor (let i = 32; i <= 255; i++) {\n if (i !== 127) {\n exports.HEADER_CHARS.push(i);\n }\n}\n// ',' = \\x44\nexports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44);\nexports.MAJOR = exports.NUM_MAP;\nexports.MINOR = exports.MAJOR;\nvar HEADER_STATE;\n(function (HEADER_STATE) {\n HEADER_STATE[HEADER_STATE[\"GENERAL\"] = 0] = \"GENERAL\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION\"] = 1] = \"CONNECTION\";\n HEADER_STATE[HEADER_STATE[\"CONTENT_LENGTH\"] = 2] = \"CONTENT_LENGTH\";\n HEADER_STATE[HEADER_STATE[\"TRANSFER_ENCODING\"] = 3] = \"TRANSFER_ENCODING\";\n HEADER_STATE[HEADER_STATE[\"UPGRADE\"] = 4] = \"UPGRADE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_KEEP_ALIVE\"] = 5] = \"CONNECTION_KEEP_ALIVE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_CLOSE\"] = 6] = \"CONNECTION_CLOSE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_UPGRADE\"] = 7] = \"CONNECTION_UPGRADE\";\n HEADER_STATE[HEADER_STATE[\"TRANSFER_ENCODING_CHUNKED\"] = 8] = \"TRANSFER_ENCODING_CHUNKED\";\n})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {}));\nexports.SPECIAL_HEADERS = {\n 'connection': HEADER_STATE.CONNECTION,\n 'content-length': HEADER_STATE.CONTENT_LENGTH,\n 'proxy-connection': HEADER_STATE.CONNECTION,\n 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING,\n 'upgrade': HEADER_STATE.UPGRADE,\n};\n//# sourceMappingURL=constants.js.map", "'use strict'\n\nconst { Buffer } = require('node:buffer')\n\nmodule.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAE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AiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJ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NgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAA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IARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSI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wgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIUBCyACKAIEIQBBACEDIAJBADYCBCACIAAgAUEBaiIBECoiAA0MDHcLQTkhAwyDAQsgAi0AMEEgcQ0GQcUBIQMMaQtBACEDIAJBADYCBCACIAEgARAqIgBFDQQgAkE6NgIcIAIgADYCDCACIAFBAWo2AhQMgQELIAItAChBAUcNACACLQAtQQhxR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AQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64')\n", "'use strict'\n\nconst corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST'])\nconst corsSafeListedMethodsSet = new Set(corsSafeListedMethods)\n\nconst nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304])\n\nconst redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308])\nconst redirectStatusSet = new Set(redirectStatus)\n\n/**\n * @see https://fetch.spec.whatwg.org/#block-bad-port\n */\nconst badPorts = /** @type {const} */ ([\n '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',\n '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',\n '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',\n '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',\n '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679',\n '6697', '10080'\n])\nconst badPortsSet = new Set(badPorts)\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies\n */\nconst referrerPolicy = /** @type {const} */ ([\n '',\n 'no-referrer',\n 'no-referrer-when-downgrade',\n 'same-origin',\n 'origin',\n 'strict-origin',\n 'origin-when-cross-origin',\n 'strict-origin-when-cross-origin',\n 'unsafe-url'\n])\nconst referrerPolicySet = new Set(referrerPolicy)\n\nconst requestRedirect = /** @type {const} */ (['follow', 'manual', 'error'])\n\nconst safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE'])\nconst safeMethodsSet = new Set(safeMethods)\n\nconst requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors'])\n\nconst requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include'])\n\nconst requestCache = /** @type {const} */ ([\n 'default',\n 'no-store',\n 'reload',\n 'no-cache',\n 'force-cache',\n 'only-if-cached'\n])\n\n/**\n * @see https://fetch.spec.whatwg.org/#request-body-header-name\n */\nconst requestBodyHeader = /** @type {const} */ ([\n 'content-encoding',\n 'content-language',\n 'content-location',\n 'content-type',\n // See https://github.com/nodejs/undici/issues/2021\n // 'Content-Length' is a forbidden header name, which is typically\n // removed in the Headers implementation. However, undici doesn't\n // filter out headers, so we add it here.\n 'content-length'\n])\n\n/**\n * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex\n */\nconst requestDuplex = /** @type {const} */ ([\n 'half'\n])\n\n/**\n * @see http://fetch.spec.whatwg.org/#forbidden-method\n */\nconst forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK'])\nconst forbiddenMethodsSet = new Set(forbiddenMethods)\n\nconst subresource = /** @type {const} */ ([\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'manifest',\n 'paintworklet',\n 'script',\n 'style',\n 'track',\n 'video',\n 'xslt',\n ''\n])\nconst subresourceSet = new Set(subresource)\n\nmodule.exports = {\n subresource,\n forbiddenMethods,\n requestBodyHeader,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n redirectStatus,\n corsSafeListedMethods,\n nullBodyStatus,\n safeMethods,\n badPorts,\n requestDuplex,\n subresourceSet,\n badPortsSet,\n redirectStatusSet,\n corsSafeListedMethodsSet,\n safeMethodsSet,\n forbiddenMethodsSet,\n referrerPolicySet\n}\n", "'use strict'\n\n// In case of breaking changes, increase the version\n// number to avoid conflicts.\nconst globalOrigin = Symbol.for('undici.globalOrigin.1')\n\nfunction getGlobalOrigin () {\n return globalThis[globalOrigin]\n}\n\nfunction setGlobalOrigin (newOrigin) {\n if (newOrigin === undefined) {\n Object.defineProperty(globalThis, globalOrigin, {\n value: undefined,\n writable: true,\n enumerable: false,\n configurable: false\n })\n\n return\n }\n\n const parsedURL = new URL(newOrigin)\n\n if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {\n throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)\n }\n\n Object.defineProperty(globalThis, globalOrigin, {\n value: parsedURL,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nmodule.exports = {\n getGlobalOrigin,\n setGlobalOrigin\n}\n", "'use strict'\n\nconst assert = require('node:assert')\n\nconst encoder = new TextEncoder()\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-token-code-point\n */\nconst HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\\-.^_|~A-Za-z0-9]+$/\nconst HTTP_WHITESPACE_REGEX = /[\\u000A\\u000D\\u0009\\u0020]/ // eslint-disable-line\nconst ASCII_WHITESPACE_REPLACE_REGEX = /[\\u0009\\u000A\\u000C\\u000D\\u0020]/g // eslint-disable-line\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point\n */\nconst HTTP_QUOTED_STRING_TOKENS = /^[\\u0009\\u0020-\\u007E\\u0080-\\u00FF]+$/ // eslint-disable-line\n\n// https://fetch.spec.whatwg.org/#data-url-processor\n/** @param {URL} dataURL */\nfunction dataURLProcessor (dataURL) {\n // 1. Assert: dataURL\u2019s scheme is \"data\".\n assert(dataURL.protocol === 'data:')\n\n // 2. Let input be the result of running the URL\n // serializer on dataURL with exclude fragment\n // set to true.\n let input = URLSerializer(dataURL, true)\n\n // 3. Remove the leading \"data:\" string from input.\n input = input.slice(5)\n\n // 4. Let position point at the start of input.\n const position = { position: 0 }\n\n // 5. Let mimeType be the result of collecting a\n // sequence of code points that are not equal\n // to U+002C (,), given position.\n let mimeType = collectASequenceOfCodePointsFast(\n ',',\n input,\n position\n )\n\n // 6. Strip leading and trailing ASCII whitespace\n // from mimeType.\n // Undici implementation note: we need to store the\n // length because if the mimetype has spaces removed,\n // the wrong amount will be sliced from the input in\n // step #9\n const mimeTypeLength = mimeType.length\n mimeType = removeASCIIWhitespace(mimeType, true, true)\n\n // 7. If position is past the end of input, then\n // return failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 8. Advance position by 1.\n position.position++\n\n // 9. Let encodedBody be the remainder of input.\n const encodedBody = input.slice(mimeTypeLength + 1)\n\n // 10. Let body be the percent-decoding of encodedBody.\n let body = stringPercentDecode(encodedBody)\n\n // 11. If mimeType ends with U+003B (;), followed by\n // zero or more U+0020 SPACE, followed by an ASCII\n // case-insensitive match for \"base64\", then:\n if (/;(\\u0020){0,}base64$/i.test(mimeType)) {\n // 1. Let stringBody be the isomorphic decode of body.\n const stringBody = isomorphicDecode(body)\n\n // 2. Set body to the forgiving-base64 decode of\n // stringBody.\n body = forgivingBase64(stringBody)\n\n // 3. If body is failure, then return failure.\n if (body === 'failure') {\n return 'failure'\n }\n\n // 4. Remove the last 6 code points from mimeType.\n mimeType = mimeType.slice(0, -6)\n\n // 5. Remove trailing U+0020 SPACE code points from mimeType,\n // if any.\n mimeType = mimeType.replace(/(\\u0020)+$/, '')\n\n // 6. Remove the last U+003B (;) code point from mimeType.\n mimeType = mimeType.slice(0, -1)\n }\n\n // 12. If mimeType starts with U+003B (;), then prepend\n // \"text/plain\" to mimeType.\n if (mimeType.startsWith(';')) {\n mimeType = 'text/plain' + mimeType\n }\n\n // 13. Let mimeTypeRecord be the result of parsing\n // mimeType.\n let mimeTypeRecord = parseMIMEType(mimeType)\n\n // 14. If mimeTypeRecord is failure, then set\n // mimeTypeRecord to text/plain;charset=US-ASCII.\n if (mimeTypeRecord === 'failure') {\n mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII')\n }\n\n // 15. Return a new data: URL struct whose MIME\n // type is mimeTypeRecord and body is body.\n // https://fetch.spec.whatwg.org/#data-url-struct\n return { mimeType: mimeTypeRecord, body }\n}\n\n// https://url.spec.whatwg.org/#concept-url-serializer\n/**\n * @param {URL} url\n * @param {boolean} excludeFragment\n */\nfunction URLSerializer (url, excludeFragment = false) {\n if (!excludeFragment) {\n return url.href\n }\n\n const href = url.href\n const hashLength = url.hash.length\n\n const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength)\n\n if (!hashLength && href.endsWith('#')) {\n return serialized.slice(0, -1)\n }\n\n return serialized\n}\n\n// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n/**\n * @param {(char: string) => boolean} condition\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePoints (condition, input, position) {\n // 1. Let result be the empty string.\n let result = ''\n\n // 2. While position doesn\u2019t point past the end of input and the\n // code point at position within input meets the condition condition:\n while (position.position < input.length && condition(input[position.position])) {\n // 1. Append that code point to the end of result.\n result += input[position.position]\n\n // 2. Advance position by 1.\n position.position++\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * A faster collectASequenceOfCodePoints that only works when comparing a single character.\n * @param {string} char\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePointsFast (char, input, position) {\n const idx = input.indexOf(char, position.position)\n const start = position.position\n\n if (idx === -1) {\n position.position = input.length\n return input.slice(start)\n }\n\n position.position = idx\n return input.slice(start, position.position)\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\n/** @param {string} input */\nfunction stringPercentDecode (input) {\n // 1. Let bytes be the UTF-8 encoding of input.\n const bytes = encoder.encode(input)\n\n // 2. Return the percent-decoding of bytes.\n return percentDecode(bytes)\n}\n\n/**\n * @param {number} byte\n */\nfunction isHexCharByte (byte) {\n // 0-9 A-F a-f\n return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66)\n}\n\n/**\n * @param {number} byte\n */\nfunction hexByteToNumber (byte) {\n return (\n // 0-9\n byte >= 0x30 && byte <= 0x39\n ? (byte - 48)\n // Convert to uppercase\n // ((byte & 0xDF) - 65) + 10\n : ((byte & 0xDF) - 55)\n )\n}\n\n// https://url.spec.whatwg.org/#percent-decode\n/** @param {Uint8Array} input */\nfunction percentDecode (input) {\n const length = input.length\n // 1. Let output be an empty byte sequence.\n /** @type {Uint8Array} */\n const output = new Uint8Array(length)\n let j = 0\n // 2. For each byte byte in input:\n for (let i = 0; i < length; ++i) {\n const byte = input[i]\n\n // 1. If byte is not 0x25 (%), then append byte to output.\n if (byte !== 0x25) {\n output[j++] = byte\n\n // 2. Otherwise, if byte is 0x25 (%) and the next two bytes\n // after byte in input are not in the ranges\n // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),\n // and 0x61 (a) to 0x66 (f), all inclusive, append byte\n // to output.\n } else if (\n byte === 0x25 &&\n !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))\n ) {\n output[j++] = 0x25\n\n // 3. Otherwise:\n } else {\n // 1. Let bytePoint be the two bytes after byte in input,\n // decoded, and then interpreted as hexadecimal number.\n // 2. Append a byte whose value is bytePoint to output.\n output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2])\n\n // 3. Skip the next two bytes in input.\n i += 2\n }\n }\n\n // 3. Return output.\n return length === j ? output : output.subarray(0, j)\n}\n\n// https://mimesniff.spec.whatwg.org/#parse-a-mime-type\n/** @param {string} input */\nfunction parseMIMEType (input) {\n // 1. Remove any leading and trailing HTTP whitespace\n // from input.\n input = removeHTTPWhitespace(input, true, true)\n\n // 2. Let position be a position variable for input,\n // initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let type be the result of collecting a sequence\n // of code points that are not U+002F (/) from\n // input, given position.\n const type = collectASequenceOfCodePointsFast(\n '/',\n input,\n position\n )\n\n // 4. If type is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n // https://mimesniff.spec.whatwg.org/#http-token-code-point\n if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {\n return 'failure'\n }\n\n // 5. If position is past the end of input, then return\n // failure\n if (position.position > input.length) {\n return 'failure'\n }\n\n // 6. Advance position by 1. (This skips past U+002F (/).)\n position.position++\n\n // 7. Let subtype be the result of collecting a sequence of\n // code points that are not U+003B (;) from input, given\n // position.\n let subtype = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 8. Remove any trailing HTTP whitespace from subtype.\n subtype = removeHTTPWhitespace(subtype, false, true)\n\n // 9. If subtype is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {\n return 'failure'\n }\n\n const typeLowercase = type.toLowerCase()\n const subtypeLowercase = subtype.toLowerCase()\n\n // 10. Let mimeType be a new MIME type record whose type\n // is type, in ASCII lowercase, and subtype is subtype,\n // in ASCII lowercase.\n // https://mimesniff.spec.whatwg.org/#mime-type\n const mimeType = {\n type: typeLowercase,\n subtype: subtypeLowercase,\n /** @type {Map} */\n parameters: new Map(),\n // https://mimesniff.spec.whatwg.org/#mime-type-essence\n essence: `${typeLowercase}/${subtypeLowercase}`\n }\n\n // 11. While position is not past the end of input:\n while (position.position < input.length) {\n // 1. Advance position by 1. (This skips past U+003B (;).)\n position.position++\n\n // 2. Collect a sequence of code points that are HTTP\n // whitespace from input given position.\n collectASequenceOfCodePoints(\n // https://fetch.spec.whatwg.org/#http-whitespace\n char => HTTP_WHITESPACE_REGEX.test(char),\n input,\n position\n )\n\n // 3. Let parameterName be the result of collecting a\n // sequence of code points that are not U+003B (;)\n // or U+003D (=) from input, given position.\n let parameterName = collectASequenceOfCodePoints(\n (char) => char !== ';' && char !== '=',\n input,\n position\n )\n\n // 4. Set parameterName to parameterName, in ASCII\n // lowercase.\n parameterName = parameterName.toLowerCase()\n\n // 5. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 1. If the code point at position within input is\n // U+003B (;), then continue.\n if (input[position.position] === ';') {\n continue\n }\n\n // 2. Advance position by 1. (This skips past U+003D (=).)\n position.position++\n }\n\n // 6. If position is past the end of input, then break.\n if (position.position > input.length) {\n break\n }\n\n // 7. Let parameterValue be null.\n let parameterValue = null\n\n // 8. If the code point at position within input is\n // U+0022 (\"), then:\n if (input[position.position] === '\"') {\n // 1. Set parameterValue to the result of collecting\n // an HTTP quoted string from input, given position\n // and the extract-value flag.\n parameterValue = collectAnHTTPQuotedString(input, position, true)\n\n // 2. Collect a sequence of code points that are not\n // U+003B (;) from input, given position.\n collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 9. Otherwise:\n } else {\n // 1. Set parameterValue to the result of collecting\n // a sequence of code points that are not U+003B (;)\n // from input, given position.\n parameterValue = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 2. Remove any trailing HTTP whitespace from parameterValue.\n parameterValue = removeHTTPWhitespace(parameterValue, false, true)\n\n // 3. If parameterValue is the empty string, then continue.\n if (parameterValue.length === 0) {\n continue\n }\n }\n\n // 10. If all of the following are true\n // - parameterName is not the empty string\n // - parameterName solely contains HTTP token code points\n // - parameterValue solely contains HTTP quoted-string token code points\n // - mimeType\u2019s parameters[parameterName] does not exist\n // then set mimeType\u2019s parameters[parameterName] to parameterValue.\n if (\n parameterName.length !== 0 &&\n HTTP_TOKEN_CODEPOINTS.test(parameterName) &&\n (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) &&\n !mimeType.parameters.has(parameterName)\n ) {\n mimeType.parameters.set(parameterName, parameterValue)\n }\n }\n\n // 12. Return mimeType.\n return mimeType\n}\n\n// https://infra.spec.whatwg.org/#forgiving-base64-decode\n/** @param {string} data */\nfunction forgivingBase64 (data) {\n // 1. Remove all ASCII whitespace from data.\n data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line\n\n let dataLength = data.length\n // 2. If data\u2019s code point length divides by 4 leaving\n // no remainder, then:\n if (dataLength % 4 === 0) {\n // 1. If data ends with one or two U+003D (=) code points,\n // then remove them from data.\n if (data.charCodeAt(dataLength - 1) === 0x003D) {\n --dataLength\n if (data.charCodeAt(dataLength - 1) === 0x003D) {\n --dataLength\n }\n }\n }\n\n // 3. If data\u2019s code point length divides by 4 leaving\n // a remainder of 1, then return failure.\n if (dataLength % 4 === 1) {\n return 'failure'\n }\n\n // 4. If data contains a code point that is not one of\n // U+002B (+)\n // U+002F (/)\n // ASCII alphanumeric\n // then return failure.\n if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) {\n return 'failure'\n }\n\n const buffer = Buffer.from(data, 'base64')\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength)\n}\n\n// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string\n// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string\n/**\n * @param {string} input\n * @param {{ position: number }} position\n * @param {boolean?} extractValue\n */\nfunction collectAnHTTPQuotedString (input, position, extractValue) {\n // 1. Let positionStart be position.\n const positionStart = position.position\n\n // 2. Let value be the empty string.\n let value = ''\n\n // 3. Assert: the code point at position within input\n // is U+0022 (\").\n assert(input[position.position] === '\"')\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. While true:\n while (true) {\n // 1. Append the result of collecting a sequence of code points\n // that are not U+0022 (\") or U+005C (\\) from input, given\n // position, to value.\n value += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== '\\\\',\n input,\n position\n )\n\n // 2. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 3. Let quoteOrBackslash be the code point at position within\n // input.\n const quoteOrBackslash = input[position.position]\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. If quoteOrBackslash is U+005C (\\), then:\n if (quoteOrBackslash === '\\\\') {\n // 1. If position is past the end of input, then append\n // U+005C (\\) to value and break.\n if (position.position >= input.length) {\n value += '\\\\'\n break\n }\n\n // 2. Append the code point at position within input to value.\n value += input[position.position]\n\n // 3. Advance position by 1.\n position.position++\n\n // 6. Otherwise:\n } else {\n // 1. Assert: quoteOrBackslash is U+0022 (\").\n assert(quoteOrBackslash === '\"')\n\n // 2. Break.\n break\n }\n }\n\n // 6. If the extract-value flag is set, then return value.\n if (extractValue) {\n return value\n }\n\n // 7. Return the code points from positionStart to position,\n // inclusive, within input.\n return input.slice(positionStart, position.position)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\n */\nfunction serializeAMimeType (mimeType) {\n assert(mimeType !== 'failure')\n const { parameters, essence } = mimeType\n\n // 1. Let serialization be the concatenation of mimeType\u2019s\n // type, U+002F (/), and mimeType\u2019s subtype.\n let serialization = essence\n\n // 2. For each name \u2192 value of mimeType\u2019s parameters:\n for (let [name, value] of parameters.entries()) {\n // 1. Append U+003B (;) to serialization.\n serialization += ';'\n\n // 2. Append name to serialization.\n serialization += name\n\n // 3. Append U+003D (=) to serialization.\n serialization += '='\n\n // 4. If value does not solely contain HTTP token code\n // points or value is the empty string, then:\n if (!HTTP_TOKEN_CODEPOINTS.test(value)) {\n // 1. Precede each occurrence of U+0022 (\") or\n // U+005C (\\) in value with U+005C (\\).\n value = value.replace(/(\\\\|\")/g, '\\\\$1')\n\n // 2. Prepend U+0022 (\") to value.\n value = '\"' + value\n\n // 3. Append U+0022 (\") to value.\n value += '\"'\n }\n\n // 5. Append value to serialization.\n serialization += value\n }\n\n // 3. Return serialization.\n return serialization\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {number} char\n */\nfunction isHTTPWhiteSpace (char) {\n // \"\\r\\n\\t \"\n return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} str\n * @param {boolean} [leading=true]\n * @param {boolean} [trailing=true]\n */\nfunction removeHTTPWhitespace (str, leading = true, trailing = true) {\n return removeChars(str, leading, trailing, isHTTPWhiteSpace)\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n * @param {number} char\n */\nfunction isASCIIWhitespace (char) {\n // \"\\r\\n\\t\\f \"\n return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace\n * @param {string} str\n * @param {boolean} [leading=true]\n * @param {boolean} [trailing=true]\n */\nfunction removeASCIIWhitespace (str, leading = true, trailing = true) {\n return removeChars(str, leading, trailing, isASCIIWhitespace)\n}\n\n/**\n * @param {string} str\n * @param {boolean} leading\n * @param {boolean} trailing\n * @param {(charCode: number) => boolean} predicate\n * @returns\n */\nfunction removeChars (str, leading, trailing, predicate) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n while (lead < str.length && predicate(str.charCodeAt(lead))) lead++\n }\n\n if (trailing) {\n while (trail > 0 && predicate(str.charCodeAt(trail))) trail--\n }\n\n return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1)\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-decode\n * @param {Uint8Array} input\n * @returns {string}\n */\nfunction isomorphicDecode (input) {\n // 1. To isomorphic decode a byte sequence input, return a string whose code point\n // length is equal to input\u2019s length and whose code points have the same values\n // as the values of input\u2019s bytes, in the same order.\n const length = input.length\n if ((2 << 15) - 1 > length) {\n return String.fromCharCode.apply(null, input)\n }\n let result = ''; let i = 0\n let addition = (2 << 15) - 1\n while (i < length) {\n if (i + addition > length) {\n addition = length - i\n }\n result += String.fromCharCode.apply(null, input.subarray(i, i += addition))\n }\n return result\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type\n * @param {Exclude, 'failure'>} mimeType\n */\nfunction minimizeSupportedMimeType (mimeType) {\n switch (mimeType.essence) {\n case 'application/ecmascript':\n case 'application/javascript':\n case 'application/x-ecmascript':\n case 'application/x-javascript':\n case 'text/ecmascript':\n case 'text/javascript':\n case 'text/javascript1.0':\n case 'text/javascript1.1':\n case 'text/javascript1.2':\n case 'text/javascript1.3':\n case 'text/javascript1.4':\n case 'text/javascript1.5':\n case 'text/jscript':\n case 'text/livescript':\n case 'text/x-ecmascript':\n case 'text/x-javascript':\n // 1. If mimeType is a JavaScript MIME type, then return \"text/javascript\".\n return 'text/javascript'\n case 'application/json':\n case 'text/json':\n // 2. If mimeType is a JSON MIME type, then return \"application/json\".\n return 'application/json'\n case 'image/svg+xml':\n // 3. If mimeType\u2019s essence is \"image/svg+xml\", then return \"image/svg+xml\".\n return 'image/svg+xml'\n case 'text/xml':\n case 'application/xml':\n // 4. If mimeType is an XML MIME type, then return \"application/xml\".\n return 'application/xml'\n }\n\n // 2. If mimeType is a JSON MIME type, then return \"application/json\".\n if (mimeType.subtype.endsWith('+json')) {\n return 'application/json'\n }\n\n // 4. If mimeType is an XML MIME type, then return \"application/xml\".\n if (mimeType.subtype.endsWith('+xml')) {\n return 'application/xml'\n }\n\n // 5. If mimeType is supported by the user agent, then return mimeType\u2019s essence.\n // Technically, node doesn't support any mimetypes.\n\n // 6. Return the empty string.\n return ''\n}\n\nmodule.exports = {\n dataURLProcessor,\n URLSerializer,\n collectASequenceOfCodePoints,\n collectASequenceOfCodePointsFast,\n stringPercentDecode,\n parseMIMEType,\n collectAnHTTPQuotedString,\n serializeAMimeType,\n removeChars,\n removeHTTPWhitespace,\n minimizeSupportedMimeType,\n HTTP_TOKEN_CODEPOINTS,\n isomorphicDecode\n}\n", "'use strict'\n\nconst { types, inspect } = require('node:util')\nconst { markAsUncloneable } = require('node:worker_threads')\nconst { toUSVString } = require('../../core/util')\n\n/** @type {import('../../../types/webidl').Webidl} */\nconst webidl = {}\nwebidl.converters = {}\nwebidl.util = {}\nwebidl.errors = {}\n\nwebidl.errors.exception = function (message) {\n return new TypeError(`${message.header}: ${message.message}`)\n}\n\nwebidl.errors.conversionFailed = function (context) {\n const plural = context.types.length === 1 ? '' : ' one of'\n const message =\n `${context.argument} could not be converted to` +\n `${plural}: ${context.types.join(', ')}.`\n\n return webidl.errors.exception({\n header: context.prefix,\n message\n })\n}\n\nwebidl.errors.invalidArgument = function (context) {\n return webidl.errors.exception({\n header: context.prefix,\n message: `\"${context.value}\" is an invalid ${context.type}.`\n })\n}\n\n// https://webidl.spec.whatwg.org/#implements\nwebidl.brandCheck = function (V, I, opts) {\n if (opts?.strict !== false) {\n if (!(V instanceof I)) {\n const err = new TypeError('Illegal invocation')\n err.code = 'ERR_INVALID_THIS' // node compat.\n throw err\n }\n } else {\n if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) {\n const err = new TypeError('Illegal invocation')\n err.code = 'ERR_INVALID_THIS' // node compat.\n throw err\n }\n }\n}\n\nwebidl.argumentLengthCheck = function ({ length }, min, ctx) {\n if (length < min) {\n throw webidl.errors.exception({\n message: `${min} argument${min !== 1 ? 's' : ''} required, ` +\n `but${length ? ' only' : ''} ${length} found.`,\n header: ctx\n })\n }\n}\n\nwebidl.illegalConstructor = function () {\n throw webidl.errors.exception({\n header: 'TypeError',\n message: 'Illegal constructor'\n })\n}\n\n// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values\nwebidl.util.Type = function (V) {\n switch (typeof V) {\n case 'undefined': return 'Undefined'\n case 'boolean': return 'Boolean'\n case 'string': return 'String'\n case 'symbol': return 'Symbol'\n case 'number': return 'Number'\n case 'bigint': return 'BigInt'\n case 'function':\n case 'object': {\n if (V === null) {\n return 'Null'\n }\n\n return 'Object'\n }\n }\n}\n\nwebidl.util.markAsUncloneable = markAsUncloneable || (() => {})\n// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint\nwebidl.util.ConvertToInt = function (V, bitLength, signedness, opts) {\n let upperBound\n let lowerBound\n\n // 1. If bitLength is 64, then:\n if (bitLength === 64) {\n // 1. Let upperBound be 2^53 \u2212 1.\n upperBound = Math.pow(2, 53) - 1\n\n // 2. If signedness is \"unsigned\", then let lowerBound be 0.\n if (signedness === 'unsigned') {\n lowerBound = 0\n } else {\n // 3. Otherwise let lowerBound be \u22122^53 + 1.\n lowerBound = Math.pow(-2, 53) + 1\n }\n } else if (signedness === 'unsigned') {\n // 2. Otherwise, if signedness is \"unsigned\", then:\n\n // 1. Let lowerBound be 0.\n lowerBound = 0\n\n // 2. Let upperBound be 2^bitLength \u2212 1.\n upperBound = Math.pow(2, bitLength) - 1\n } else {\n // 3. Otherwise:\n\n // 1. Let lowerBound be -2^bitLength \u2212 1.\n lowerBound = Math.pow(-2, bitLength) - 1\n\n // 2. Let upperBound be 2^bitLength \u2212 1 \u2212 1.\n upperBound = Math.pow(2, bitLength - 1) - 1\n }\n\n // 4. Let x be ? ToNumber(V).\n let x = Number(V)\n\n // 5. If x is \u22120, then set x to +0.\n if (x === 0) {\n x = 0\n }\n\n // 6. If the conversion is to an IDL type associated\n // with the [EnforceRange] extended attribute, then:\n if (opts?.enforceRange === true) {\n // 1. If x is NaN, +\u221E, or \u2212\u221E, then throw a TypeError.\n if (\n Number.isNaN(x) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Could not convert ${webidl.util.Stringify(V)} to an integer.`\n })\n }\n\n // 2. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 3. If x < lowerBound or x > upperBound, then\n // throw a TypeError.\n if (x < lowerBound || x > upperBound) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.`\n })\n }\n\n // 4. Return x.\n return x\n }\n\n // 7. If x is not NaN and the conversion is to an IDL\n // type associated with the [Clamp] extended\n // attribute, then:\n if (!Number.isNaN(x) && opts?.clamp === true) {\n // 1. Set x to min(max(x, lowerBound), upperBound).\n x = Math.min(Math.max(x, lowerBound), upperBound)\n\n // 2. Round x to the nearest integer, choosing the\n // even integer if it lies halfway between two,\n // and choosing +0 rather than \u22120.\n if (Math.floor(x) % 2 === 0) {\n x = Math.floor(x)\n } else {\n x = Math.ceil(x)\n }\n\n // 3. Return x.\n return x\n }\n\n // 8. If x is NaN, +0, +\u221E, or \u2212\u221E, then return +0.\n if (\n Number.isNaN(x) ||\n (x === 0 && Object.is(0, x)) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n return 0\n }\n\n // 9. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 10. Set x to x modulo 2^bitLength.\n x = x % Math.pow(2, bitLength)\n\n // 11. If signedness is \"signed\" and x \u2265 2^bitLength \u2212 1,\n // then return x \u2212 2^bitLength.\n if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {\n return x - Math.pow(2, bitLength)\n }\n\n // 12. Otherwise, return x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart\nwebidl.util.IntegerPart = function (n) {\n // 1. Let r be floor(abs(n)).\n const r = Math.floor(Math.abs(n))\n\n // 2. If n < 0, then return -1 \u00D7 r.\n if (n < 0) {\n return -1 * r\n }\n\n // 3. Otherwise, return r.\n return r\n}\n\nwebidl.util.Stringify = function (V) {\n const type = webidl.util.Type(V)\n\n switch (type) {\n case 'Symbol':\n return `Symbol(${V.description})`\n case 'Object':\n return inspect(V)\n case 'String':\n return `\"${V}\"`\n default:\n return `${V}`\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-sequence\nwebidl.sequenceConverter = function (converter) {\n return (V, prefix, argument, Iterable) => {\n // 1. If Type(V) is not Object, throw a TypeError.\n if (webidl.util.Type(V) !== 'Object') {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.`\n })\n }\n\n // 2. Let method be ? GetMethod(V, @@iterator).\n /** @type {Generator} */\n const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.()\n const seq = []\n let index = 0\n\n // 3. If method is undefined, throw a TypeError.\n if (\n method === undefined ||\n typeof method.next !== 'function'\n ) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is not iterable.`\n })\n }\n\n // https://webidl.spec.whatwg.org/#create-sequence-from-iterable\n while (true) {\n const { done, value } = method.next()\n\n if (done) {\n break\n }\n\n seq.push(converter(value, prefix, `${argument}[${index++}]`))\n }\n\n return seq\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-to-record\nwebidl.recordConverter = function (keyConverter, valueConverter) {\n return (O, prefix, argument) => {\n // 1. If Type(O) is not Object, throw a TypeError.\n if (webidl.util.Type(O) !== 'Object') {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} (\"${webidl.util.Type(O)}\") is not an Object.`\n })\n }\n\n // 2. Let result be a new empty instance of record.\n const result = {}\n\n if (!types.isProxy(O)) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]\n\n for (const key of keys) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key, prefix, argument)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key], prefix, argument)\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n\n // 5. Return result.\n return result\n }\n\n // 3. Let keys be ? O.[[OwnPropertyKeys]]().\n const keys = Reflect.ownKeys(O)\n\n // 4. For each key of keys.\n for (const key of keys) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const desc = Reflect.getOwnPropertyDescriptor(O, key)\n\n // 2. If desc is not undefined and desc.[[Enumerable]] is true:\n if (desc?.enumerable) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key, prefix, argument)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key], prefix, argument)\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n }\n\n // 5. Return result.\n return result\n }\n}\n\nwebidl.interfaceConverter = function (i) {\n return (V, prefix, argument, opts) => {\n if (opts?.strict !== false && !(V instanceof i)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Expected ${argument} (\"${webidl.util.Stringify(V)}\") to be an instance of ${i.name}.`\n })\n }\n\n return V\n }\n}\n\nwebidl.dictionaryConverter = function (converters) {\n return (dictionary, prefix, argument) => {\n const type = webidl.util.Type(dictionary)\n const dict = {}\n\n if (type === 'Null' || type === 'Undefined') {\n return dict\n } else if (type !== 'Object') {\n throw webidl.errors.exception({\n header: prefix,\n message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`\n })\n }\n\n for (const options of converters) {\n const { key, defaultValue, required, converter } = options\n\n if (required === true) {\n if (!Object.hasOwn(dictionary, key)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Missing required key \"${key}\".`\n })\n }\n }\n\n let value = dictionary[key]\n const hasDefault = Object.hasOwn(options, 'defaultValue')\n\n // Only use defaultValue if value is undefined and\n // a defaultValue options was provided.\n if (hasDefault && value !== null) {\n value ??= defaultValue()\n }\n\n // A key can be optional and have no default value.\n // When this happens, do not perform a conversion,\n // and do not assign the key a value.\n if (required || hasDefault || value !== undefined) {\n value = converter(value, prefix, `${argument}.${key}`)\n\n if (\n options.allowedValues &&\n !options.allowedValues.includes(value)\n ) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.`\n })\n }\n\n dict[key] = value\n }\n }\n\n return dict\n }\n}\n\nwebidl.nullableConverter = function (converter) {\n return (V, prefix, argument) => {\n if (V === null) {\n return V\n }\n\n return converter(V, prefix, argument)\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-DOMString\nwebidl.converters.DOMString = function (V, prefix, argument, opts) {\n // 1. If V is null and the conversion is to an IDL type\n // associated with the [LegacyNullToEmptyString]\n // extended attribute, then return the DOMString value\n // that represents the empty string.\n if (V === null && opts?.legacyNullToEmptyString) {\n return ''\n }\n\n // 2. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is a symbol, which cannot be converted to a DOMString.`\n })\n }\n\n // 3. Return the IDL DOMString value that represents the\n // same sequence of code units as the one the\n // ECMAScript String value x represents.\n return String(V)\n}\n\n// https://webidl.spec.whatwg.org/#es-ByteString\nwebidl.converters.ByteString = function (V, prefix, argument) {\n // 1. Let x be ? ToString(V).\n // Note: DOMString converter perform ? ToString(V)\n const x = webidl.converters.DOMString(V, prefix, argument)\n\n // 2. If the value of any element of x is greater than\n // 255, then throw a TypeError.\n for (let index = 0; index < x.length; index++) {\n if (x.charCodeAt(index) > 255) {\n throw new TypeError(\n 'Cannot convert argument to a ByteString because the character at ' +\n `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`\n )\n }\n }\n\n // 3. Return an IDL ByteString value whose length is the\n // length of x, and where the value of each element is\n // the value of the corresponding element of x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-USVString\n// TODO: rewrite this so we can control the errors thrown\nwebidl.converters.USVString = toUSVString\n\n// https://webidl.spec.whatwg.org/#es-boolean\nwebidl.converters.boolean = function (V) {\n // 1. Let x be the result of computing ToBoolean(V).\n const x = Boolean(V)\n\n // 2. Return the IDL boolean value that is the one that represents\n // the same truth value as the ECMAScript Boolean value x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-any\nwebidl.converters.any = function (V) {\n return V\n}\n\n// https://webidl.spec.whatwg.org/#es-long-long\nwebidl.converters['long long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 64, \"signed\").\n const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument)\n\n // 2. Return the IDL long long value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long-long\nwebidl.converters['unsigned long long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 64, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument)\n\n // 2. Return the IDL unsigned long long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long\nwebidl.converters['unsigned long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 32, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument)\n\n // 2. Return the IDL unsigned long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-short\nwebidl.converters['unsigned short'] = function (V, prefix, argument, opts) {\n // 1. Let x be ? ConvertToInt(V, 16, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument)\n\n // 2. Return the IDL unsigned short value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#idl-ArrayBuffer\nwebidl.converters.ArrayBuffer = function (V, prefix, argument, opts) {\n // 1. If Type(V) is not Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances\n // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isAnyArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBuffer']\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V) is true, then throw a\n // TypeError.\n if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n if (V.resizable || V.growable) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'Received a resizable ArrayBuffer.'\n })\n }\n\n // 4. Return the IDL ArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\nwebidl.converters.TypedArray = function (V, T, prefix, name, opts) {\n // 1. Let T be the IDL type V is being converted to.\n\n // 2. If Type(V) is not Object, or V does not have a\n // [[TypedArrayName]] internal slot with a value\n // equal to T\u2019s name, then throw a TypeError.\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isTypedArray(V) ||\n V.constructor.name !== T.name\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${name} (\"${webidl.util.Stringify(V)}\")`,\n types: [T.name]\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 4. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (V.buffer.resizable || V.buffer.growable) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'Received a resizable ArrayBuffer.'\n })\n }\n\n // 5. Return the IDL value of type T that is a reference\n // to the same object as V.\n return V\n}\n\nwebidl.converters.DataView = function (V, prefix, name, opts) {\n // 1. If Type(V) is not Object, or V does not have a\n // [[DataView]] internal slot, then throw a TypeError.\n if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${name} is not a DataView.`\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,\n // then throw a TypeError.\n if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (V.buffer.resizable || V.buffer.growable) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'Received a resizable ArrayBuffer.'\n })\n }\n\n // 4. Return the IDL DataView value that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#BufferSource\nwebidl.converters.BufferSource = function (V, prefix, name, opts) {\n if (types.isAnyArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false })\n }\n\n if (types.isTypedArray(V)) {\n return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false })\n }\n\n if (types.isDataView(V)) {\n return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false })\n }\n\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${name} (\"${webidl.util.Stringify(V)}\")`,\n types: ['BufferSource']\n })\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.ByteString\n)\n\nwebidl.converters['sequence>'] = webidl.sequenceConverter(\n webidl.converters['sequence']\n)\n\nwebidl.converters['record'] = webidl.recordConverter(\n webidl.converters.ByteString,\n webidl.converters.ByteString\n)\n\nmodule.exports = {\n webidl\n}\n", "'use strict'\n\nconst { Transform } = require('node:stream')\nconst zlib = require('node:zlib')\nconst { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants')\nconst { getGlobalOrigin } = require('./global')\nconst { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require('./data-url')\nconst { performance } = require('node:perf_hooks')\nconst { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util')\nconst assert = require('node:assert')\nconst { isUint8Array } = require('node:util/types')\nconst { webidl } = require('./webidl')\n\nlet supportedHashes = []\n\n// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('node:crypto')\n const possibleRelevantHashes = ['sha256', 'sha384', 'sha512']\n supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash))\n/* c8 ignore next 3 */\n} catch {\n\n}\n\nfunction responseURL (response) {\n // https://fetch.spec.whatwg.org/#responses\n // A response has an associated URL. It is a pointer to the last URL\n // in response\u2019s URL list and null if response\u2019s URL list is empty.\n const urlList = response.urlList\n const length = urlList.length\n return length === 0 ? null : urlList[length - 1].toString()\n}\n\n// https://fetch.spec.whatwg.org/#concept-response-location-url\nfunction responseLocationURL (response, requestFragment) {\n // 1. If response\u2019s status is not a redirect status, then return null.\n if (!redirectStatusSet.has(response.status)) {\n return null\n }\n\n // 2. Let location be the result of extracting header list values given\n // `Location` and response\u2019s header list.\n let location = response.headersList.get('location', true)\n\n // 3. If location is a header value, then set location to the result of\n // parsing location with response\u2019s URL.\n if (location !== null && isValidHeaderValue(location)) {\n if (!isValidEncodedURL(location)) {\n // Some websites respond location header in UTF-8 form without encoding them as ASCII\n // and major browsers redirect them to correctly UTF-8 encoded addresses.\n // Here, we handle that behavior in the same way.\n location = normalizeBinaryStringToUtf8(location)\n }\n location = new URL(location, responseURL(response))\n }\n\n // 4. If location is a URL whose fragment is null, then set location\u2019s\n // fragment to requestFragment.\n if (location && !location.hash) {\n location.hash = requestFragment\n }\n\n // 5. Return location.\n return location\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2\n * @param {string} url\n * @returns {boolean}\n */\nfunction isValidEncodedURL (url) {\n for (let i = 0; i < url.length; ++i) {\n const code = url.charCodeAt(i)\n\n if (\n code > 0x7E || // Non-US-ASCII + DEL\n code < 0x20 // Control characters NUL - US\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it.\n * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well.\n * @param {string} value\n * @returns {string}\n */\nfunction normalizeBinaryStringToUtf8 (value) {\n return Buffer.from(value, 'binary').toString('utf8')\n}\n\n/** @returns {URL} */\nfunction requestCurrentURL (request) {\n return request.urlList[request.urlList.length - 1]\n}\n\nfunction requestBadPort (request) {\n // 1. Let url be request\u2019s current URL.\n const url = requestCurrentURL(request)\n\n // 2. If url\u2019s scheme is an HTTP(S) scheme and url\u2019s port is a bad port,\n // then return blocked.\n if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) {\n return 'blocked'\n }\n\n // 3. Return allowed.\n return 'allowed'\n}\n\nfunction isErrorLike (object) {\n return object instanceof Error || (\n object?.constructor?.name === 'Error' ||\n object?.constructor?.name === 'DOMException'\n )\n}\n\n// Check whether |statusText| is a ByteString and\n// matches the Reason-Phrase token production.\n// RFC 2616: https://tools.ietf.org/html/rfc2616\n// RFC 7230: https://tools.ietf.org/html/rfc7230\n// \"reason-phrase = *( HTAB / SP / VCHAR / obs-text )\"\n// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116\nfunction isValidReasonPhrase (statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i)\n if (\n !(\n (\n c === 0x09 || // HTAB\n (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n (c >= 0x80 && c <= 0xff)\n ) // obs-text\n )\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-name\n * @param {string} potentialValue\n */\nconst isValidHeaderName = isValidHTTPToken\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value\n * @param {string} potentialValue\n */\nfunction isValidHeaderValue (potentialValue) {\n // - Has no leading or trailing HTTP tab or space bytes.\n // - Contains no 0x00 (NUL) or HTTP newline bytes.\n return (\n potentialValue[0] === '\\t' ||\n potentialValue[0] === ' ' ||\n potentialValue[potentialValue.length - 1] === '\\t' ||\n potentialValue[potentialValue.length - 1] === ' ' ||\n potentialValue.includes('\\n') ||\n potentialValue.includes('\\r') ||\n potentialValue.includes('\\0')\n ) === false\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect\nfunction setRequestReferrerPolicyOnRedirect (request, actualResponse) {\n // Given a request request and a response actualResponse, this algorithm\n // updates request\u2019s referrer policy according to the Referrer-Policy\n // header (if any) in actualResponse.\n\n // 1. Let policy be the result of executing \u00A7 8.1 Parse a referrer policy\n // from a Referrer-Policy header on actualResponse.\n\n // 8.1 Parse a referrer policy from a Referrer-Policy header\n // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response\u2019s header list.\n const { headersList } = actualResponse\n // 2. Let policy be the empty string.\n // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token.\n // 4. Return policy.\n const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',')\n\n // Note: As the referrer-policy can contain multiple policies\n // separated by comma, we need to loop through all of them\n // and pick the first valid one.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy\n let policy = ''\n if (policyHeader.length > 0) {\n // The right-most policy takes precedence.\n // The left-most policy is the fallback.\n for (let i = policyHeader.length; i !== 0; i--) {\n const token = policyHeader[i - 1].trim()\n if (referrerPolicyTokens.has(token)) {\n policy = token\n break\n }\n }\n }\n\n // 2. If policy is not the empty string, then set request\u2019s referrer policy to policy.\n if (policy !== '') {\n request.referrerPolicy = policy\n }\n}\n\n// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check\nfunction crossOriginResourcePolicyCheck () {\n // TODO\n return 'allowed'\n}\n\n// https://fetch.spec.whatwg.org/#concept-cors-check\nfunction corsCheck () {\n // TODO\n return 'success'\n}\n\n// https://fetch.spec.whatwg.org/#concept-tao-check\nfunction TAOCheck () {\n // TODO\n return 'success'\n}\n\nfunction appendFetchMetadata (httpRequest) {\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header\n\n // 1. Assert: r\u2019s url is a potentially trustworthy URL.\n // TODO\n\n // 2. Let header be a Structured Header whose value is a token.\n let header = null\n\n // 3. Set header\u2019s value to r\u2019s mode.\n header = httpRequest.mode\n\n // 4. Set a structured field value `Sec-Fetch-Mode`/header in r\u2019s header list.\n httpRequest.headersList.set('sec-fetch-mode', header, true)\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header\n // TODO\n}\n\n// https://fetch.spec.whatwg.org/#append-a-request-origin-header\nfunction appendRequestOriginHeader (request) {\n // 1. Let serializedOrigin be the result of byte-serializing a request origin\n // with request.\n // TODO: implement \"byte-serializing a request origin\"\n let serializedOrigin = request.origin\n\n // - \"'client' is changed to an origin during fetching.\"\n // This doesn't happen in undici (in most cases) because undici, by default,\n // has no concept of origin.\n // - request.origin can also be set to request.client.origin (client being\n // an environment settings object), which is undefined without using\n // setGlobalOrigin.\n if (serializedOrigin === 'client' || serializedOrigin === undefined) {\n return\n }\n\n // 2. If request\u2019s response tainting is \"cors\" or request\u2019s mode is \"websocket\",\n // then append (`Origin`, serializedOrigin) to request\u2019s header list.\n // 3. Otherwise, if request\u2019s method is neither `GET` nor `HEAD`, then:\n if (request.responseTainting === 'cors' || request.mode === 'websocket') {\n request.headersList.append('origin', serializedOrigin, true)\n } else if (request.method !== 'GET' && request.method !== 'HEAD') {\n // 1. Switch on request\u2019s referrer policy:\n switch (request.referrerPolicy) {\n case 'no-referrer':\n // Set serializedOrigin to `null`.\n serializedOrigin = null\n break\n case 'no-referrer-when-downgrade':\n case 'strict-origin':\n case 'strict-origin-when-cross-origin':\n // If request\u2019s origin is a tuple origin, its scheme is \"https\", and\n // request\u2019s current URL\u2019s scheme is not \"https\", then set\n // serializedOrigin to `null`.\n if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n case 'same-origin':\n // If request\u2019s origin is not same origin with request\u2019s current URL\u2019s\n // origin, then set serializedOrigin to `null`.\n if (!sameOrigin(request, requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n default:\n // Do nothing.\n }\n\n // 2. Append (`Origin`, serializedOrigin) to request\u2019s header list.\n request.headersList.append('origin', serializedOrigin, true)\n }\n}\n\n// https://w3c.github.io/hr-time/#dfn-coarsen-time\nfunction coarsenTime (timestamp, crossOriginIsolatedCapability) {\n // TODO\n return timestamp\n}\n\n// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info\nfunction clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) {\n if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) {\n return {\n domainLookupStartTime: defaultStartTime,\n domainLookupEndTime: defaultStartTime,\n connectionStartTime: defaultStartTime,\n connectionEndTime: defaultStartTime,\n secureConnectionStartTime: defaultStartTime,\n ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol\n }\n }\n\n return {\n domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability),\n domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability),\n connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability),\n connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability),\n secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability),\n ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol\n }\n}\n\n// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time\nfunction coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {\n return coarsenTime(performance.now(), crossOriginIsolatedCapability)\n}\n\n// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info\nfunction createOpaqueTimingInfo (timingInfo) {\n return {\n startTime: timingInfo.startTime ?? 0,\n redirectStartTime: 0,\n redirectEndTime: 0,\n postRedirectStartTime: timingInfo.startTime ?? 0,\n finalServiceWorkerStartTime: 0,\n finalNetworkResponseStartTime: 0,\n finalNetworkRequestStartTime: 0,\n endTime: 0,\n encodedBodySize: 0,\n decodedBodySize: 0,\n finalConnectionTimingInfo: null\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#policy-container\nfunction makePolicyContainer () {\n // Note: the fetch spec doesn't make use of embedder policy or CSP list\n return {\n referrerPolicy: 'strict-origin-when-cross-origin'\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container\nfunction clonePolicyContainer (policyContainer) {\n return {\n referrerPolicy: policyContainer.referrerPolicy\n }\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer\nfunction determineRequestsReferrer (request) {\n // 1. Let policy be request's referrer policy.\n const policy = request.referrerPolicy\n\n // Note: policy cannot (shouldn't) be null or an empty string.\n assert(policy)\n\n // 2. Let environment be request\u2019s client.\n\n let referrerSource = null\n\n // 3. Switch on request\u2019s referrer:\n if (request.referrer === 'client') {\n // Note: node isn't a browser and doesn't implement document/iframes,\n // so we bypass this step and replace it with our own.\n\n const globalOrigin = getGlobalOrigin()\n\n if (!globalOrigin || globalOrigin.origin === 'null') {\n return 'no-referrer'\n }\n\n // note: we need to clone it as it's mutated\n referrerSource = new URL(globalOrigin)\n } else if (request.referrer instanceof URL) {\n // Let referrerSource be request\u2019s referrer.\n referrerSource = request.referrer\n }\n\n // 4. Let request\u2019s referrerURL be the result of stripping referrerSource for\n // use as a referrer.\n let referrerURL = stripURLForReferrer(referrerSource)\n\n // 5. Let referrerOrigin be the result of stripping referrerSource for use as\n // a referrer, with the origin-only flag set to true.\n const referrerOrigin = stripURLForReferrer(referrerSource, true)\n\n // 6. If the result of serializing referrerURL is a string whose length is\n // greater than 4096, set referrerURL to referrerOrigin.\n if (referrerURL.toString().length > 4096) {\n referrerURL = referrerOrigin\n }\n\n const areSameOrigin = sameOrigin(request, referrerURL)\n const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) &&\n !isURLPotentiallyTrustworthy(request.url)\n\n // 8. Execute the switch statements corresponding to the value of policy:\n switch (policy) {\n case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true)\n case 'unsafe-url': return referrerURL\n case 'same-origin':\n return areSameOrigin ? referrerOrigin : 'no-referrer'\n case 'origin-when-cross-origin':\n return areSameOrigin ? referrerURL : referrerOrigin\n case 'strict-origin-when-cross-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If the origin of referrerURL and the origin of request\u2019s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(referrerURL, currentURL)) {\n return referrerURL\n }\n\n // 2. If referrerURL is a potentially trustworthy URL and request\u2019s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n\n // 3. Return referrerOrigin.\n return referrerOrigin\n }\n case 'strict-origin': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request\u2019s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n case 'no-referrer-when-downgrade': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request\u2019s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n\n default: // eslint-disable-line\n return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url\n * @param {URL} url\n * @param {boolean|undefined} originOnly\n */\nfunction stripURLForReferrer (url, originOnly) {\n // 1. Assert: url is a URL.\n assert(url instanceof URL)\n\n url = new URL(url)\n\n // 2. If url\u2019s scheme is a local scheme, then return no referrer.\n if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') {\n return 'no-referrer'\n }\n\n // 3. Set url\u2019s username to the empty string.\n url.username = ''\n\n // 4. Set url\u2019s password to the empty string.\n url.password = ''\n\n // 5. Set url\u2019s fragment to null.\n url.hash = ''\n\n // 6. If the origin-only flag is true, then:\n if (originOnly) {\n // 1. Set url\u2019s path to \u00AB the empty string \u00BB.\n url.pathname = ''\n\n // 2. Set url\u2019s query to null.\n url.search = ''\n }\n\n // 7. Return url.\n return url\n}\n\nfunction isURLPotentiallyTrustworthy (url) {\n if (!(url instanceof URL)) {\n return false\n }\n\n // If child of about, return true\n if (url.href === 'about:blank' || url.href === 'about:srcdoc') {\n return true\n }\n\n // If scheme is data, return true\n if (url.protocol === 'data:') return true\n\n // If file, return true\n if (url.protocol === 'file:') return true\n\n return isOriginPotentiallyTrustworthy(url.origin)\n\n function isOriginPotentiallyTrustworthy (origin) {\n // If origin is explicitly null, return false\n if (origin == null || origin === 'null') return false\n\n const originAsURL = new URL(origin)\n\n // If secure, return true\n if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') {\n return true\n }\n\n // If localhost or variants, return true\n if (/^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^\\[(?:0*:)*?:?0*1\\]$/.test(originAsURL.hostname) ||\n (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) ||\n (originAsURL.hostname.endsWith('.localhost'))) {\n return true\n }\n\n // If any other, return false\n return false\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist\n * @param {Uint8Array} bytes\n * @param {string} metadataList\n */\nfunction bytesMatch (bytes, metadataList) {\n // If node is not built with OpenSSL support, we cannot check\n // a request's integrity, so allow it by default (the spec will\n // allow requests if an invalid hash is given, as precedence).\n /* istanbul ignore if: only if node is built with --without-ssl */\n if (crypto === undefined) {\n return true\n }\n\n // 1. Let parsedMetadata be the result of parsing metadataList.\n const parsedMetadata = parseMetadata(metadataList)\n\n // 2. If parsedMetadata is no metadata, return true.\n if (parsedMetadata === 'no metadata') {\n return true\n }\n\n // 3. If response is not eligible for integrity validation, return false.\n // TODO\n\n // 4. If parsedMetadata is the empty set, return true.\n if (parsedMetadata.length === 0) {\n return true\n }\n\n // 5. Let metadata be the result of getting the strongest\n // metadata from parsedMetadata.\n const strongest = getStrongestMetadata(parsedMetadata)\n const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest)\n\n // 6. For each item in metadata:\n for (const item of metadata) {\n // 1. Let algorithm be the alg component of item.\n const algorithm = item.algo\n\n // 2. Let expectedValue be the val component of item.\n const expectedValue = item.hash\n\n // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e\n // \"be liberal with padding\". This is annoying, and it's not even in the spec.\n\n // 3. Let actualValue be the result of applying algorithm to bytes.\n let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')\n\n if (actualValue[actualValue.length - 1] === '=') {\n if (actualValue[actualValue.length - 2] === '=') {\n actualValue = actualValue.slice(0, -2)\n } else {\n actualValue = actualValue.slice(0, -1)\n }\n }\n\n // 4. If actualValue is a case-sensitive match for expectedValue,\n // return true.\n if (compareBase64Mixed(actualValue, expectedValue)) {\n return true\n }\n }\n\n // 7. Return false.\n return false\n}\n\n// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options\n// https://www.w3.org/TR/CSP2/#source-list-syntax\n// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1\nconst parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\\s|$)( +[!-~]*)?)?/i\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata\n * @param {string} metadata\n */\nfunction parseMetadata (metadata) {\n // 1. Let result be the empty set.\n /** @type {{ algo: string, hash: string }[]} */\n const result = []\n\n // 2. Let empty be equal to true.\n let empty = true\n\n // 3. For each token returned by splitting metadata on spaces:\n for (const token of metadata.split(' ')) {\n // 1. Set empty to false.\n empty = false\n\n // 2. Parse token as a hash-with-options.\n const parsedToken = parseHashWithOptions.exec(token)\n\n // 3. If token does not parse, continue to the next token.\n if (\n parsedToken === null ||\n parsedToken.groups === undefined ||\n parsedToken.groups.algo === undefined\n ) {\n // Note: Chromium blocks the request at this point, but Firefox\n // gives a warning that an invalid integrity was given. The\n // correct behavior is to ignore these, and subsequently not\n // check the integrity of the resource.\n continue\n }\n\n // 4. Let algorithm be the hash-algo component of token.\n const algorithm = parsedToken.groups.algo.toLowerCase()\n\n // 5. If algorithm is a hash function recognized by the user\n // agent, add the parsed token to result.\n if (supportedHashes.includes(algorithm)) {\n result.push(parsedToken.groups)\n }\n }\n\n // 4. Return no metadata if empty is true, otherwise return result.\n if (empty === true) {\n return 'no metadata'\n }\n\n return result\n}\n\n/**\n * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList\n */\nfunction getStrongestMetadata (metadataList) {\n // Let algorithm be the algo component of the first item in metadataList.\n // Can be sha256\n let algorithm = metadataList[0].algo\n // If the algorithm is sha512, then it is the strongest\n // and we can return immediately\n if (algorithm[3] === '5') {\n return algorithm\n }\n\n for (let i = 1; i < metadataList.length; ++i) {\n const metadata = metadataList[i]\n // If the algorithm is sha512, then it is the strongest\n // and we can break the loop immediately\n if (metadata.algo[3] === '5') {\n algorithm = 'sha512'\n break\n // If the algorithm is sha384, then a potential sha256 or sha384 is ignored\n } else if (algorithm[3] === '3') {\n continue\n // algorithm is sha256, check if algorithm is sha384 and if so, set it as\n // the strongest\n } else if (metadata.algo[3] === '3') {\n algorithm = 'sha384'\n }\n }\n return algorithm\n}\n\nfunction filterMetadataListByAlgorithm (metadataList, algorithm) {\n if (metadataList.length === 1) {\n return metadataList\n }\n\n let pos = 0\n for (let i = 0; i < metadataList.length; ++i) {\n if (metadataList[i].algo === algorithm) {\n metadataList[pos++] = metadataList[i]\n }\n }\n\n metadataList.length = pos\n\n return metadataList\n}\n\n/**\n * Compares two base64 strings, allowing for base64url\n * in the second string.\n *\n* @param {string} actualValue always base64\n * @param {string} expectedValue base64 or base64url\n * @returns {boolean}\n */\nfunction compareBase64Mixed (actualValue, expectedValue) {\n if (actualValue.length !== expectedValue.length) {\n return false\n }\n for (let i = 0; i < actualValue.length; ++i) {\n if (actualValue[i] !== expectedValue[i]) {\n if (\n (actualValue[i] === '+' && expectedValue[i] === '-') ||\n (actualValue[i] === '/' && expectedValue[i] === '_')\n ) {\n continue\n }\n return false\n }\n }\n\n return true\n}\n\n// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request\nfunction tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {\n // TODO\n}\n\n/**\n * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}\n * @param {URL} A\n * @param {URL} B\n */\nfunction sameOrigin (A, B) {\n // 1. If A and B are the same opaque origin, then return true.\n if (A.origin === B.origin && A.origin === 'null') {\n return true\n }\n\n // 2. If A and B are both tuple origins and their schemes,\n // hosts, and port are identical, then return true.\n if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {\n return true\n }\n\n // 3. Return false.\n return false\n}\n\nfunction createDeferredPromise () {\n let res\n let rej\n const promise = new Promise((resolve, reject) => {\n res = resolve\n rej = reject\n })\n\n return { promise, resolve: res, reject: rej }\n}\n\nfunction isAborted (fetchParams) {\n return fetchParams.controller.state === 'aborted'\n}\n\nfunction isCancelled (fetchParams) {\n return fetchParams.controller.state === 'aborted' ||\n fetchParams.controller.state === 'terminated'\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-method-normalize\n * @param {string} method\n */\nfunction normalizeMethod (method) {\n return normalizedMethodRecordsBase[method.toLowerCase()] ?? method\n}\n\n// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string\nfunction serializeJavascriptValueToJSONString (value) {\n // 1. Let result be ? Call(%JSON.stringify%, undefined, \u00AB value \u00BB).\n const result = JSON.stringify(value)\n\n // 2. If result is undefined, then throw a TypeError.\n if (result === undefined) {\n throw new TypeError('Value is not JSON serializable')\n }\n\n // 3. Assert: result is a string.\n assert(typeof result === 'string')\n\n // 4. Return result.\n return result\n}\n\n// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object\nconst esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {string} name name of the instance\n * @param {symbol} kInternalIterator\n * @param {string | number} [keyIndex]\n * @param {string | number} [valueIndex]\n */\nfunction createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) {\n class FastIterableIterator {\n /** @type {any} */\n #target\n /** @type {'key' | 'value' | 'key+value'} */\n #kind\n /** @type {number} */\n #index\n\n /**\n * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object\n * @param {unknown} target\n * @param {'key' | 'value' | 'key+value'} kind\n */\n constructor (target, kind) {\n this.#target = target\n this.#kind = kind\n this.#index = 0\n }\n\n next () {\n // 1. Let interface be the interface for which the iterator prototype object exists.\n // 2. Let thisValue be the this value.\n // 3. Let object be ? ToObject(thisValue).\n // 4. If object is a platform object, then perform a security\n // check, passing:\n // 5. If object is not a default iterator object for interface,\n // then throw a TypeError.\n if (typeof this !== 'object' || this === null || !(#target in this)) {\n throw new TypeError(\n `'next' called on an object that does not implement interface ${name} Iterator.`\n )\n }\n\n // 6. Let index be object\u2019s index.\n // 7. Let kind be object\u2019s kind.\n // 8. Let values be object\u2019s target's value pairs to iterate over.\n const index = this.#index\n const values = this.#target[kInternalIterator]\n\n // 9. Let len be the length of values.\n const len = values.length\n\n // 10. If index is greater than or equal to len, then return\n // CreateIterResultObject(undefined, true).\n if (index >= len) {\n return {\n value: undefined,\n done: true\n }\n }\n\n // 11. Let pair be the entry in values at index index.\n const { [keyIndex]: key, [valueIndex]: value } = values[index]\n\n // 12. Set object\u2019s index to index + 1.\n this.#index = index + 1\n\n // 13. Return the iterator result for pair and kind.\n\n // https://webidl.spec.whatwg.org/#iterator-result\n\n // 1. Let result be a value determined by the value of kind:\n let result\n switch (this.#kind) {\n case 'key':\n // 1. Let idlKey be pair\u2019s key.\n // 2. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 3. result is key.\n result = key\n break\n case 'value':\n // 1. Let idlValue be pair\u2019s value.\n // 2. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 3. result is value.\n result = value\n break\n case 'key+value':\n // 1. Let idlKey be pair\u2019s key.\n // 2. Let idlValue be pair\u2019s value.\n // 3. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 4. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 5. Let array be ! ArrayCreate(2).\n // 6. Call ! CreateDataProperty(array, \"0\", key).\n // 7. Call ! CreateDataProperty(array, \"1\", value).\n // 8. result is array.\n result = [key, value]\n break\n }\n\n // 2. Return CreateIterResultObject(result, false).\n return {\n value: result,\n done: false\n }\n }\n }\n\n // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n // @ts-ignore\n delete FastIterableIterator.prototype.constructor\n\n Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype)\n\n Object.defineProperties(FastIterableIterator.prototype, {\n [Symbol.toStringTag]: {\n writable: false,\n enumerable: false,\n configurable: true,\n value: `${name} Iterator`\n },\n next: { writable: true, enumerable: true, configurable: true }\n })\n\n /**\n * @param {unknown} target\n * @param {'key' | 'value' | 'key+value'} kind\n * @returns {IterableIterator}\n */\n return function (target, kind) {\n return new FastIterableIterator(target, kind)\n }\n}\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {string} name name of the instance\n * @param {any} object class\n * @param {symbol} kInternalIterator\n * @param {string | number} [keyIndex]\n * @param {string | number} [valueIndex]\n */\nfunction iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) {\n const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex)\n\n const properties = {\n keys: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function keys () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'key')\n }\n },\n values: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function values () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'value')\n }\n },\n entries: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function entries () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'key+value')\n }\n },\n forEach: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function forEach (callbackfn, thisArg = globalThis) {\n webidl.brandCheck(this, object)\n webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`)\n if (typeof callbackfn !== 'function') {\n throw new TypeError(\n `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`\n )\n }\n for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) {\n callbackfn.call(thisArg, value, key, this)\n }\n }\n }\n }\n\n return Object.defineProperties(object.prototype, {\n ...properties,\n [Symbol.iterator]: {\n writable: true,\n enumerable: false,\n configurable: true,\n value: properties.entries.value\n }\n })\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-fully-read\n */\nasync function fullyReadBody (body, processBody, processBodyError) {\n // 1. If taskDestination is null, then set taskDestination to\n // the result of starting a new parallel queue.\n\n // 2. Let successSteps given a byte sequence bytes be to queue a\n // fetch task to run processBody given bytes, with taskDestination.\n const successSteps = processBody\n\n // 3. Let errorSteps be to queue a fetch task to run processBodyError,\n // with taskDestination.\n const errorSteps = processBodyError\n\n // 4. Let reader be the result of getting a reader for body\u2019s stream.\n // If that threw an exception, then run errorSteps with that\n // exception and return.\n let reader\n\n try {\n reader = body.stream.getReader()\n } catch (e) {\n errorSteps(e)\n return\n }\n\n // 5. Read all bytes from reader, given successSteps and errorSteps.\n try {\n successSteps(await readAllBytes(reader))\n } catch (e) {\n errorSteps(e)\n }\n}\n\nfunction isReadableStreamLike (stream) {\n return stream instanceof ReadableStream || (\n stream[Symbol.toStringTag] === 'ReadableStream' &&\n typeof stream.tee === 'function'\n )\n}\n\n/**\n * @param {ReadableStreamController} controller\n */\nfunction readableStreamClose (controller) {\n try {\n controller.close()\n controller.byobRequest?.respond(0)\n } catch (err) {\n // TODO: add comment explaining why this error occurs.\n if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) {\n throw err\n }\n }\n}\n\nconst invalidIsomorphicEncodeValueRegex = /[^\\x00-\\xFF]/ // eslint-disable-line\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-encode\n * @param {string} input\n */\nfunction isomorphicEncode (input) {\n // 1. Assert: input contains no code points greater than U+00FF.\n assert(!invalidIsomorphicEncodeValueRegex.test(input))\n\n // 2. Return a byte sequence whose length is equal to input\u2019s code\n // point length and whose bytes have the same values as the\n // values of input\u2019s code points, in the same order\n return input\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes\n * @see https://streams.spec.whatwg.org/#read-loop\n * @param {ReadableStreamDefaultReader} reader\n */\nasync function readAllBytes (reader) {\n const bytes = []\n let byteLength = 0\n\n while (true) {\n const { done, value: chunk } = await reader.read()\n\n if (done) {\n // 1. Call successSteps with bytes.\n return Buffer.concat(bytes, byteLength)\n }\n\n // 1. If chunk is not a Uint8Array object, call failureSteps\n // with a TypeError and abort these steps.\n if (!isUint8Array(chunk)) {\n throw new TypeError('Received non-Uint8Array chunk')\n }\n\n // 2. Append the bytes represented by chunk to bytes.\n bytes.push(chunk)\n byteLength += chunk.length\n\n // 3. Read-loop given reader, bytes, successSteps, and failureSteps.\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#is-local\n * @param {URL} url\n */\nfunction urlIsLocal (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'\n}\n\n/**\n * @param {string|URL} url\n * @returns {boolean}\n */\nfunction urlHasHttpsScheme (url) {\n return (\n (\n typeof url === 'string' &&\n url[5] === ':' &&\n url[0] === 'h' &&\n url[1] === 't' &&\n url[2] === 't' &&\n url[3] === 'p' &&\n url[4] === 's'\n ) ||\n url.protocol === 'https:'\n )\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-scheme\n * @param {URL} url\n */\nfunction urlIsHttpHttpsScheme (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'http:' || protocol === 'https:'\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#simple-range-header-value\n * @param {string} value\n * @param {boolean} allowWhitespace\n */\nfunction simpleRangeHeaderValue (value, allowWhitespace) {\n // 1. Let data be the isomorphic decoding of value.\n // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string,\n // nothing more. We obviously don't need to do that if value is a string already.\n const data = value\n\n // 2. If data does not start with \"bytes\", then return failure.\n if (!data.startsWith('bytes')) {\n return 'failure'\n }\n\n // 3. Let position be a position variable for data, initially pointing at the 5th code point of data.\n const position = { position: 5 }\n\n // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,\n // from data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 5. If the code point at position within data is not U+003D (=), then return failure.\n if (data.charCodeAt(position.position) !== 0x3D) {\n return 'failure'\n }\n\n // 6. Advance position by 1.\n position.position++\n\n // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from\n // data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits,\n // from data given position.\n const rangeStart = collectASequenceOfCodePoints(\n (char) => {\n const code = char.charCodeAt(0)\n\n return code >= 0x30 && code <= 0x39\n },\n data,\n position\n )\n\n // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the\n // empty string; otherwise null.\n const rangeStartValue = rangeStart.length ? Number(rangeStart) : null\n\n // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,\n // from data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 11. If the code point at position within data is not U+002D (-), then return failure.\n if (data.charCodeAt(position.position) !== 0x2D) {\n return 'failure'\n }\n\n // 12. Advance position by 1.\n position.position++\n\n // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab\n // or space, from data given position.\n // Note from Khafra: its the same step as in #8 again lol\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 14. Let rangeEnd be the result of collecting a sequence of code points that are\n // ASCII digits, from data given position.\n // Note from Khafra: you wouldn't guess it, but this is also the same step as #8\n const rangeEnd = collectASequenceOfCodePoints(\n (char) => {\n const code = char.charCodeAt(0)\n\n return code >= 0x30 && code <= 0x39\n },\n data,\n position\n )\n\n // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd\n // is not the empty string; otherwise null.\n // Note from Khafra: THE SAME STEP, AGAIN!!!\n // Note: why interpret as a decimal if we only collect ascii digits?\n const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null\n\n // 16. If position is not past the end of data, then return failure.\n if (position.position < data.length) {\n return 'failure'\n }\n\n // 17. If rangeEndValue and rangeStartValue are null, then return failure.\n if (rangeEndValue === null && rangeStartValue === null) {\n return 'failure'\n }\n\n // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is\n // greater than rangeEndValue, then return failure.\n // Note: ... when can they not be numbers?\n if (rangeStartValue > rangeEndValue) {\n return 'failure'\n }\n\n // 19. Return (rangeStartValue, rangeEndValue).\n return { rangeStartValue, rangeEndValue }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#build-a-content-range\n * @param {number} rangeStart\n * @param {number} rangeEnd\n * @param {number} fullLength\n */\nfunction buildContentRange (rangeStart, rangeEnd, fullLength) {\n // 1. Let contentRange be `bytes `.\n let contentRange = 'bytes '\n\n // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange.\n contentRange += isomorphicEncode(`${rangeStart}`)\n\n // 3. Append 0x2D (-) to contentRange.\n contentRange += '-'\n\n // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange.\n contentRange += isomorphicEncode(`${rangeEnd}`)\n\n // 5. Append 0x2F (/) to contentRange.\n contentRange += '/'\n\n // 6. Append fullLength, serialized and isomorphic encoded to contentRange.\n contentRange += isomorphicEncode(`${fullLength}`)\n\n // 7. Return contentRange.\n return contentRange\n}\n\n// A Stream, which pipes the response to zlib.createInflate() or\n// zlib.createInflateRaw() depending on the first byte of the Buffer.\n// If the lower byte of the first byte is 0x08, then the stream is\n// interpreted as a zlib stream, otherwise it's interpreted as a\n// raw deflate stream.\nclass InflateStream extends Transform {\n #zlibOptions\n\n /** @param {zlib.ZlibOptions} [zlibOptions] */\n constructor (zlibOptions) {\n super()\n this.#zlibOptions = zlibOptions\n }\n\n _transform (chunk, encoding, callback) {\n if (!this._inflateStream) {\n if (chunk.length === 0) {\n callback()\n return\n }\n this._inflateStream = (chunk[0] & 0x0F) === 0x08\n ? zlib.createInflate(this.#zlibOptions)\n : zlib.createInflateRaw(this.#zlibOptions)\n\n this._inflateStream.on('data', this.push.bind(this))\n this._inflateStream.on('end', () => this.push(null))\n this._inflateStream.on('error', (err) => this.destroy(err))\n }\n\n this._inflateStream.write(chunk, encoding, callback)\n }\n\n _final (callback) {\n if (this._inflateStream) {\n this._inflateStream.end()\n this._inflateStream = null\n }\n callback()\n }\n}\n\n/**\n * @param {zlib.ZlibOptions} [zlibOptions]\n * @returns {InflateStream}\n */\nfunction createInflate (zlibOptions) {\n return new InflateStream(zlibOptions)\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type\n * @param {import('./headers').HeadersList} headers\n */\nfunction extractMimeType (headers) {\n // 1. Let charset be null.\n let charset = null\n\n // 2. Let essence be null.\n let essence = null\n\n // 3. Let mimeType be null.\n let mimeType = null\n\n // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers.\n const values = getDecodeSplit('content-type', headers)\n\n // 5. If values is null, then return failure.\n if (values === null) {\n return 'failure'\n }\n\n // 6. For each value of values:\n for (const value of values) {\n // 6.1. Let temporaryMimeType be the result of parsing value.\n const temporaryMimeType = parseMIMEType(value)\n\n // 6.2. If temporaryMimeType is failure or its essence is \"*/*\", then continue.\n if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') {\n continue\n }\n\n // 6.3. Set mimeType to temporaryMimeType.\n mimeType = temporaryMimeType\n\n // 6.4. If mimeType\u2019s essence is not essence, then:\n if (mimeType.essence !== essence) {\n // 6.4.1. Set charset to null.\n charset = null\n\n // 6.4.2. If mimeType\u2019s parameters[\"charset\"] exists, then set charset to\n // mimeType\u2019s parameters[\"charset\"].\n if (mimeType.parameters.has('charset')) {\n charset = mimeType.parameters.get('charset')\n }\n\n // 6.4.3. Set essence to mimeType\u2019s essence.\n essence = mimeType.essence\n } else if (!mimeType.parameters.has('charset') && charset !== null) {\n // 6.5. Otherwise, if mimeType\u2019s parameters[\"charset\"] does not exist, and\n // charset is non-null, set mimeType\u2019s parameters[\"charset\"] to charset.\n mimeType.parameters.set('charset', charset)\n }\n }\n\n // 7. If mimeType is null, then return failure.\n if (mimeType == null) {\n return 'failure'\n }\n\n // 8. Return mimeType.\n return mimeType\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split\n * @param {string|null} value\n */\nfunction gettingDecodingSplitting (value) {\n // 1. Let input be the result of isomorphic decoding value.\n const input = value\n\n // 2. Let position be a position variable for input, initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let values be a list of strings, initially empty.\n const values = []\n\n // 4. Let temporaryValue be the empty string.\n let temporaryValue = ''\n\n // 5. While position is not past the end of input:\n while (position.position < input.length) {\n // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (\")\n // or U+002C (,) from input, given position, to temporaryValue.\n temporaryValue += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== ',',\n input,\n position\n )\n\n // 5.2. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 5.2.1. If the code point at position within input is U+0022 (\"), then:\n if (input.charCodeAt(position.position) === 0x22) {\n // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue.\n temporaryValue += collectAnHTTPQuotedString(\n input,\n position\n )\n\n // 5.2.1.2. If position is not past the end of input, then continue.\n if (position.position < input.length) {\n continue\n }\n } else {\n // 5.2.2. Otherwise:\n\n // 5.2.2.1. Assert: the code point at position within input is U+002C (,).\n assert(input.charCodeAt(position.position) === 0x2C)\n\n // 5.2.2.2. Advance position by 1.\n position.position++\n }\n }\n\n // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue.\n temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20)\n\n // 5.4. Append temporaryValue to values.\n values.push(temporaryValue)\n\n // 5.6. Set temporaryValue to the empty string.\n temporaryValue = ''\n }\n\n // 6. Return values.\n return values\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split\n * @param {string} name lowercase header name\n * @param {import('./headers').HeadersList} list\n */\nfunction getDecodeSplit (name, list) {\n // 1. Let value be the result of getting name from list.\n const value = list.get(name, true)\n\n // 2. If value is null, then return null.\n if (value === null) {\n return null\n }\n\n // 3. Return the result of getting, decoding, and splitting value.\n return gettingDecodingSplitting(value)\n}\n\nconst textDecoder = new TextDecoder()\n\n/**\n * @see https://encoding.spec.whatwg.org/#utf-8-decode\n * @param {Buffer} buffer\n */\nfunction utf8DecodeBytes (buffer) {\n if (buffer.length === 0) {\n return ''\n }\n\n // 1. Let buffer be the result of peeking three bytes from\n // ioQueue, converted to a byte sequence.\n\n // 2. If buffer is 0xEF 0xBB 0xBF, then read three\n // bytes from ioQueue. (Do nothing with those bytes.)\n if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {\n buffer = buffer.subarray(3)\n }\n\n // 3. Process a queue with an instance of UTF-8\u2019s\n // decoder, ioQueue, output, and \"replacement\".\n const output = textDecoder.decode(buffer)\n\n // 4. Return output.\n return output\n}\n\nclass EnvironmentSettingsObjectBase {\n get baseUrl () {\n return getGlobalOrigin()\n }\n\n get origin () {\n return this.baseUrl?.origin\n }\n\n policyContainer = makePolicyContainer()\n}\n\nclass EnvironmentSettingsObject {\n settingsObject = new EnvironmentSettingsObjectBase()\n}\n\nconst environmentSettingsObject = new EnvironmentSettingsObject()\n\nmodule.exports = {\n isAborted,\n isCancelled,\n isValidEncodedURL,\n createDeferredPromise,\n ReadableStreamFrom,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n clampAndCoarsenConnectionTimingInfo,\n coarsenedSharedCurrentTime,\n determineRequestsReferrer,\n makePolicyContainer,\n clonePolicyContainer,\n appendFetchMetadata,\n appendRequestOriginHeader,\n TAOCheck,\n corsCheck,\n crossOriginResourcePolicyCheck,\n createOpaqueTimingInfo,\n setRequestReferrerPolicyOnRedirect,\n isValidHTTPToken,\n requestBadPort,\n requestCurrentURL,\n responseURL,\n responseLocationURL,\n isBlobLike,\n isURLPotentiallyTrustworthy,\n isValidReasonPhrase,\n sameOrigin,\n normalizeMethod,\n serializeJavascriptValueToJSONString,\n iteratorMixin,\n createIterator,\n isValidHeaderName,\n isValidHeaderValue,\n isErrorLike,\n fullyReadBody,\n bytesMatch,\n isReadableStreamLike,\n readableStreamClose,\n isomorphicEncode,\n urlIsLocal,\n urlHasHttpsScheme,\n urlIsHttpHttpsScheme,\n readAllBytes,\n simpleRangeHeaderValue,\n buildContentRange,\n parseMetadata,\n createInflate,\n extractMimeType,\n getDecodeSplit,\n utf8DecodeBytes,\n environmentSettingsObject\n}\n", "'use strict'\n\nmodule.exports = {\n kUrl: Symbol('url'),\n kHeaders: Symbol('headers'),\n kSignal: Symbol('signal'),\n kState: Symbol('state'),\n kDispatcher: Symbol('dispatcher')\n}\n", "'use strict'\n\nconst { Blob, File } = require('node:buffer')\nconst { kState } = require('./symbols')\nconst { webidl } = require('./webidl')\n\n// TODO(@KhafraDev): remove\nclass FileLike {\n constructor (blobLike, fileName, options = {}) {\n // TODO: argument idl type check\n\n // The File constructor is invoked with two or three parameters, depending\n // on whether the optional dictionary parameter is used. When the File()\n // constructor is invoked, user agents must run the following steps:\n\n // 1. Let bytes be the result of processing blob parts given fileBits and\n // options.\n\n // 2. Let n be the fileName argument to the constructor.\n const n = fileName\n\n // 3. Process FilePropertyBag dictionary argument by running the following\n // substeps:\n\n // 1. If the type member is provided and is not the empty string, let t\n // be set to the type dictionary member. If t contains any characters\n // outside the range U+0020 to U+007E, then set t to the empty string\n // and return from these substeps.\n // TODO\n const t = options.type\n\n // 2. Convert every character in t to ASCII lowercase.\n // TODO\n\n // 3. If the lastModified member is provided, let d be set to the\n // lastModified dictionary member. If it is not provided, set d to the\n // current date and time represented as the number of milliseconds since\n // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).\n const d = options.lastModified ?? Date.now()\n\n // 4. Return a new File object F such that:\n // F refers to the bytes byte sequence.\n // F.size is set to the number of total bytes in bytes.\n // F.name is set to n.\n // F.type is set to t.\n // F.lastModified is set to d.\n\n this[kState] = {\n blobLike,\n name: n,\n type: t,\n lastModified: d\n }\n }\n\n stream (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.stream(...args)\n }\n\n arrayBuffer (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.arrayBuffer(...args)\n }\n\n slice (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.slice(...args)\n }\n\n text (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.text(...args)\n }\n\n get size () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.size\n }\n\n get type () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.type\n }\n\n get name () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].name\n }\n\n get lastModified () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].lastModified\n }\n\n get [Symbol.toStringTag] () {\n return 'File'\n }\n}\n\nwebidl.converters.Blob = webidl.interfaceConverter(Blob)\n\n// If this function is moved to ./util.js, some tools (such as\n// rollup) will warn about circular dependencies. See:\n// https://github.com/nodejs/undici/issues/1629\nfunction isFileLike (object) {\n return (\n (object instanceof File) ||\n (\n object &&\n (typeof object.stream === 'function' ||\n typeof object.arrayBuffer === 'function') &&\n object[Symbol.toStringTag] === 'File'\n )\n )\n}\n\nmodule.exports = { FileLike, isFileLike }\n", "'use strict'\n\nconst { isBlobLike, iteratorMixin } = require('./util')\nconst { kState } = require('./symbols')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { FileLike, isFileLike } = require('./file')\nconst { webidl } = require('./webidl')\nconst { File: NativeFile } = require('node:buffer')\nconst nodeUtil = require('node:util')\n\n/** @type {globalThis['File']} */\nconst File = globalThis.File ?? NativeFile\n\n// https://xhr.spec.whatwg.org/#formdata\nclass FormData {\n constructor (form) {\n webidl.util.markAsUncloneable(this)\n\n if (form !== undefined) {\n throw webidl.errors.conversionFailed({\n prefix: 'FormData constructor',\n argument: 'Argument 1',\n types: ['undefined']\n })\n }\n\n this[kState] = []\n }\n\n append (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.append'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name, prefix, 'name')\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, prefix, 'value', { strict: false })\n : webidl.converters.USVString(value, prefix, 'value')\n filename = arguments.length === 3\n ? webidl.converters.USVString(filename, prefix, 'filename')\n : undefined\n\n // 2. Let entry be the result of creating an entry with\n // name, value, and filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. Append entry to this\u2019s entry list.\n this[kState].push(entry)\n }\n\n delete (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name, prefix, 'name')\n\n // The delete(name) method steps are to remove all entries whose name\n // is name from this\u2019s entry list.\n this[kState] = this[kState].filter(entry => entry.name !== name)\n }\n\n get (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.get'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name, prefix, 'name')\n\n // 1. If there is no entry whose name is name in this\u2019s entry list,\n // then return null.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx === -1) {\n return null\n }\n\n // 2. Return the value of the first entry whose name is name from\n // this\u2019s entry list.\n return this[kState][idx].value\n }\n\n getAll (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.getAll'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name, prefix, 'name')\n\n // 1. If there is no entry whose name is name in this\u2019s entry list,\n // then return the empty list.\n // 2. Return the values of all entries whose name is name, in order,\n // from this\u2019s entry list.\n return this[kState]\n .filter((entry) => entry.name === name)\n .map((entry) => entry.value)\n }\n\n has (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.has'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name, prefix, 'name')\n\n // The has(name) method steps are to return true if there is an entry\n // whose name is name in this\u2019s entry list; otherwise false.\n return this[kState].findIndex((entry) => entry.name === name) !== -1\n }\n\n set (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.set'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // The set(name, value) and set(name, blobValue, filename) method steps\n // are:\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name, prefix, 'name')\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, prefix, 'name', { strict: false })\n : webidl.converters.USVString(value, prefix, 'name')\n filename = arguments.length === 3\n ? webidl.converters.USVString(filename, prefix, 'name')\n : undefined\n\n // 2. Let entry be the result of creating an entry with name, value, and\n // filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. If there are entries in this\u2019s entry list whose name is name, then\n // replace the first such entry with entry and remove the others.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx !== -1) {\n this[kState] = [\n ...this[kState].slice(0, idx),\n entry,\n ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name)\n ]\n } else {\n // 4. Otherwise, append entry to this\u2019s entry list.\n this[kState].push(entry)\n }\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n const state = this[kState].reduce((a, b) => {\n if (a[b.name]) {\n if (Array.isArray(a[b.name])) {\n a[b.name].push(b.value)\n } else {\n a[b.name] = [a[b.name], b.value]\n }\n } else {\n a[b.name] = b.value\n }\n\n return a\n }, { __proto__: null })\n\n options.depth ??= depth\n options.colors ??= true\n\n const output = nodeUtil.formatWithOptions(options, state)\n\n // remove [Object null prototype]\n return `FormData ${output.slice(output.indexOf(']') + 2)}`\n }\n}\n\niteratorMixin('FormData', FormData, kState, 'name', 'value')\n\nObject.defineProperties(FormData.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n getAll: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'FormData',\n configurable: true\n }\n})\n\n/**\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry\n * @param {string} name\n * @param {string|Blob} value\n * @param {?string} filename\n * @returns\n */\nfunction makeEntry (name, value, filename) {\n // 1. Set name to the result of converting name into a scalar value string.\n // Note: This operation was done by the webidl converter USVString.\n\n // 2. If value is a string, then set value to the result of converting\n // value into a scalar value string.\n if (typeof value === 'string') {\n // Note: This operation was done by the webidl converter USVString.\n } else {\n // 3. Otherwise:\n\n // 1. If value is not a File object, then set value to a new File object,\n // representing the same bytes, whose name attribute value is \"blob\"\n if (!isFileLike(value)) {\n value = value instanceof Blob\n ? new File([value], 'blob', { type: value.type })\n : new FileLike(value, 'blob', { type: value.type })\n }\n\n // 2. If filename is given, then set value to a new File object,\n // representing the same bytes, whose name attribute is filename.\n if (filename !== undefined) {\n /** @type {FilePropertyBag} */\n const options = {\n type: value.type,\n lastModified: value.lastModified\n }\n\n value = value instanceof NativeFile\n ? new File([value], filename, options)\n : new FileLike(value, filename, options)\n }\n }\n\n // 4. Return an entry whose name is name and whose value is value.\n return { name, value }\n}\n\nmodule.exports = { FormData, makeEntry }\n", "'use strict'\n\nconst { isUSVString, bufferToLowerCasedHeaderName } = require('../../core/util')\nconst { utf8DecodeBytes } = require('./util')\nconst { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require('./data-url')\nconst { isFileLike } = require('./file')\nconst { makeEntry } = require('./formdata')\nconst assert = require('node:assert')\nconst { File: NodeFile } = require('node:buffer')\n\nconst File = globalThis.File ?? NodeFile\n\nconst formDataNameBuffer = Buffer.from('form-data; name=\"')\nconst filenameBuffer = Buffer.from('; filename')\nconst dd = Buffer.from('--')\nconst ddcrlf = Buffer.from('--\\r\\n')\n\n/**\n * @param {string} chars\n */\nfunction isAsciiString (chars) {\n for (let i = 0; i < chars.length; ++i) {\n if ((chars.charCodeAt(i) & ~0x7F) !== 0) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary\n * @param {string} boundary\n */\nfunction validateBoundary (boundary) {\n const length = boundary.length\n\n // - its length is greater or equal to 27 and lesser or equal to 70, and\n if (length < 27 || length > 70) {\n return false\n }\n\n // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or\n // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('),\n // 0x2D (-) or 0x5F (_).\n for (let i = 0; i < length; ++i) {\n const cp = boundary.charCodeAt(i)\n\n if (!(\n (cp >= 0x30 && cp <= 0x39) ||\n (cp >= 0x41 && cp <= 0x5a) ||\n (cp >= 0x61 && cp <= 0x7a) ||\n cp === 0x27 ||\n cp === 0x2d ||\n cp === 0x5f\n )) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser\n * @param {Buffer} input\n * @param {ReturnType} mimeType\n */\nfunction multipartFormDataParser (input, mimeType) {\n // 1. Assert: mimeType\u2019s essence is \"multipart/form-data\".\n assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data')\n\n const boundaryString = mimeType.parameters.get('boundary')\n\n // 2. If mimeType\u2019s parameters[\"boundary\"] does not exist, return failure.\n // Otherwise, let boundary be the result of UTF-8 decoding mimeType\u2019s\n // parameters[\"boundary\"].\n if (boundaryString === undefined) {\n return 'failure'\n }\n\n const boundary = Buffer.from(`--${boundaryString}`, 'utf8')\n\n // 3. Let entry list be an empty entry list.\n const entryList = []\n\n // 4. Let position be a pointer to a byte in input, initially pointing at\n // the first byte.\n const position = { position: 0 }\n\n // Note: undici addition, allows leading and trailing CRLFs.\n while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) {\n position.position += 2\n }\n\n let trailing = input.length\n\n while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) {\n trailing -= 2\n }\n\n if (trailing !== input.length) {\n input = input.subarray(0, trailing)\n }\n\n // 5. While true:\n while (true) {\n // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D\n // (`--`) followed by boundary, advance position by 2 + the length of\n // boundary. Otherwise, return failure.\n // Note: boundary is padded with 2 dashes already, no need to add 2.\n if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) {\n position.position += boundary.length\n } else {\n return 'failure'\n }\n\n // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A\n // (`--` followed by CR LF) followed by the end of input, return entry list.\n // Note: a body does NOT need to end with CRLF. It can end with --.\n if (\n (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) ||\n (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position))\n ) {\n return entryList\n }\n\n // 5.3. If position does not point to a sequence of bytes starting with 0x0D\n // 0x0A (CR LF), return failure.\n if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) {\n return 'failure'\n }\n\n // 5.4. Advance position by 2. (This skips past the newline.)\n position.position += 2\n\n // 5.5. Let name, filename and contentType be the result of parsing\n // multipart/form-data headers on input and position, if the result\n // is not failure. Otherwise, return failure.\n const result = parseMultipartFormDataHeaders(input, position)\n\n if (result === 'failure') {\n return 'failure'\n }\n\n let { name, filename, contentType, encoding } = result\n\n // 5.6. Advance position by 2. (This skips past the empty line that marks\n // the end of the headers.)\n position.position += 2\n\n // 5.7. Let body be the empty byte sequence.\n let body\n\n // 5.8. Body loop: While position is not past the end of input:\n // TODO: the steps here are completely wrong\n {\n const boundaryIndex = input.indexOf(boundary.subarray(2), position.position)\n\n if (boundaryIndex === -1) {\n return 'failure'\n }\n\n body = input.subarray(position.position, boundaryIndex - 4)\n\n position.position += body.length\n\n // Note: position must be advanced by the body's length before being\n // decoded, otherwise the parsing will fail.\n if (encoding === 'base64') {\n body = Buffer.from(body.toString(), 'base64')\n }\n }\n\n // 5.9. If position does not point to a sequence of bytes starting with\n // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2.\n if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) {\n return 'failure'\n } else {\n position.position += 2\n }\n\n // 5.10. If filename is not null:\n let value\n\n if (filename !== null) {\n // 5.10.1. If contentType is null, set contentType to \"text/plain\".\n contentType ??= 'text/plain'\n\n // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string.\n\n // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead.\n // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`.\n if (!isAsciiString(contentType)) {\n contentType = ''\n }\n\n // 5.10.3. Let value be a new File object with name filename, type contentType, and body body.\n value = new File([body], filename, { type: contentType })\n } else {\n // 5.11. Otherwise:\n\n // 5.11.1. Let value be the UTF-8 decoding without BOM of body.\n value = utf8DecodeBytes(Buffer.from(body))\n }\n\n // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object.\n assert(isUSVString(name))\n assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value))\n\n // 5.13. Create an entry with name and value, and append it to entry list.\n entryList.push(makeEntry(name, value, filename))\n }\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers\n * @param {Buffer} input\n * @param {{ position: number }} position\n */\nfunction parseMultipartFormDataHeaders (input, position) {\n // 1. Let name, filename and contentType be null.\n let name = null\n let filename = null\n let contentType = null\n let encoding = null\n\n // 2. While true:\n while (true) {\n // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF):\n if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) {\n // 2.1.1. If name is null, return failure.\n if (name === null) {\n return 'failure'\n }\n\n // 2.1.2. Return name, filename and contentType.\n return { name, filename, contentType, encoding }\n }\n\n // 2.2. Let header name be the result of collecting a sequence of bytes that are\n // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position.\n let headerName = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a,\n input,\n position\n )\n\n // 2.3. Remove any HTTP tab or space bytes from the start or end of header name.\n headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20)\n\n // 2.4. If header name does not match the field-name token production, return failure.\n if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) {\n return 'failure'\n }\n\n // 2.5. If the byte at position is not 0x3A (:), return failure.\n if (input[position.position] !== 0x3a) {\n return 'failure'\n }\n\n // 2.6. Advance position by 1.\n position.position++\n\n // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position.\n // (Do nothing with those bytes.)\n collectASequenceOfBytes(\n (char) => char === 0x20 || char === 0x09,\n input,\n position\n )\n\n // 2.8. Byte-lowercase header name and switch on the result:\n switch (bufferToLowerCasedHeaderName(headerName)) {\n case 'content-disposition': {\n // 1. Set name and filename to null.\n name = filename = null\n\n // 2. If position does not point to a sequence of bytes starting with\n // `form-data; name=\"`, return failure.\n if (!bufferStartsWith(input, formDataNameBuffer, position)) {\n return 'failure'\n }\n\n // 3. Advance position so it points at the byte after the next 0x22 (\")\n // byte (the one in the sequence of bytes matched above).\n position.position += 17\n\n // 4. Set name to the result of parsing a multipart/form-data name given\n // input and position, if the result is not failure. Otherwise, return\n // failure.\n name = parseMultipartFormDataName(input, position)\n\n if (name === null) {\n return 'failure'\n }\n\n // 5. If position points to a sequence of bytes starting with `; filename=\"`:\n if (bufferStartsWith(input, filenameBuffer, position)) {\n // Note: undici also handles filename*\n let check = position.position + filenameBuffer.length\n\n if (input[check] === 0x2a) {\n position.position += 1\n check += 1\n }\n\n if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =\"\n return 'failure'\n }\n\n // 1. Advance position so it points at the byte after the next 0x22 (\") byte\n // (the one in the sequence of bytes matched above).\n position.position += 12\n\n // 2. Set filename to the result of parsing a multipart/form-data name given\n // input and position, if the result is not failure. Otherwise, return failure.\n filename = parseMultipartFormDataName(input, position)\n\n if (filename === null) {\n return 'failure'\n }\n }\n\n break\n }\n case 'content-type': {\n // 1. Let header value be the result of collecting a sequence of bytes that are\n // not 0x0A (LF) or 0x0D (CR), given position.\n let headerValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n\n // 2. Remove any HTTP tab or space bytes from the end of header value.\n headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20)\n\n // 3. Set contentType to the isomorphic decoding of header value.\n contentType = isomorphicDecode(headerValue)\n\n break\n }\n case 'content-transfer-encoding': {\n let headerValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n\n headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20)\n\n encoding = isomorphicDecode(headerValue)\n\n break\n }\n default: {\n // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position.\n // (Do nothing with those bytes.)\n collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n }\n }\n\n // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A\n // (CR LF), return failure. Otherwise, advance position by 2 (past the newline).\n if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) {\n return 'failure'\n } else {\n position.position += 2\n }\n }\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name\n * @param {Buffer} input\n * @param {{ position: number }} position\n */\nfunction parseMultipartFormDataName (input, position) {\n // 1. Assert: The byte at (position - 1) is 0x22 (\").\n assert(input[position.position - 1] === 0x22)\n\n // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 (\"), given position.\n /** @type {string | Buffer} */\n let name = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d && char !== 0x22,\n input,\n position\n )\n\n // 3. If the byte at position is not 0x22 (\"), return failure. Otherwise, advance position by 1.\n if (input[position.position] !== 0x22) {\n return null // name could be 'failure'\n } else {\n position.position++\n }\n\n // 4. Replace any occurrence of the following subsequences in name with the given byte:\n // - `%0A`: 0x0A (LF)\n // - `%0D`: 0x0D (CR)\n // - `%22`: 0x22 (\")\n name = new TextDecoder().decode(name)\n .replace(/%0A/ig, '\\n')\n .replace(/%0D/ig, '\\r')\n .replace(/%22/g, '\"')\n\n // 5. Return the UTF-8 decoding without BOM of name.\n return name\n}\n\n/**\n * @param {(char: number) => boolean} condition\n * @param {Buffer} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfBytes (condition, input, position) {\n let start = position.position\n\n while (start < input.length && condition(input[start])) {\n ++start\n }\n\n return input.subarray(position.position, (position.position = start))\n}\n\n/**\n * @param {Buffer} buf\n * @param {boolean} leading\n * @param {boolean} trailing\n * @param {(charCode: number) => boolean} predicate\n * @returns {Buffer}\n */\nfunction removeChars (buf, leading, trailing, predicate) {\n let lead = 0\n let trail = buf.length - 1\n\n if (leading) {\n while (lead < buf.length && predicate(buf[lead])) lead++\n }\n\n if (trailing) {\n while (trail > 0 && predicate(buf[trail])) trail--\n }\n\n return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1)\n}\n\n/**\n * Checks if {@param buffer} starts with {@param start}\n * @param {Buffer} buffer\n * @param {Buffer} start\n * @param {{ position: number }} position\n */\nfunction bufferStartsWith (buffer, start, position) {\n if (buffer.length < start.length) {\n return false\n }\n\n for (let i = 0; i < start.length; i++) {\n if (start[i] !== buffer[position.position + i]) {\n return false\n }\n }\n\n return true\n}\n\nmodule.exports = {\n multipartFormDataParser,\n validateBoundary\n}\n", "'use strict'\n\nconst util = require('../../core/util')\nconst {\n ReadableStreamFrom,\n isBlobLike,\n isReadableStreamLike,\n readableStreamClose,\n createDeferredPromise,\n fullyReadBody,\n extractMimeType,\n utf8DecodeBytes\n} = require('./util')\nconst { FormData } = require('./formdata')\nconst { kState } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { Blob } = require('node:buffer')\nconst assert = require('node:assert')\nconst { isErrored, isDisturbed } = require('node:stream')\nconst { isArrayBuffer } = require('node:util/types')\nconst { serializeAMimeType } = require('./data-url')\nconst { multipartFormDataParser } = require('./formdata-parser')\nlet random\n\ntry {\n const crypto = require('node:crypto')\n random = (max) => crypto.randomInt(0, max)\n} catch {\n random = (max) => Math.floor(Math.random(max))\n}\n\nconst textEncoder = new TextEncoder()\nfunction noop () {}\n\nconst hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0\nlet streamRegistry\n\nif (hasFinalizationRegistry) {\n streamRegistry = new FinalizationRegistry((weakRef) => {\n const stream = weakRef.deref()\n if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) {\n stream.cancel('Response object has been garbage collected').catch(noop)\n }\n })\n}\n\n// https://fetch.spec.whatwg.org/#concept-bodyinit-extract\nfunction extractBody (object, keepalive = false) {\n // 1. Let stream be null.\n let stream = null\n\n // 2. If object is a ReadableStream object, then set stream to object.\n if (object instanceof ReadableStream) {\n stream = object\n } else if (isBlobLike(object)) {\n // 3. Otherwise, if object is a Blob object, set stream to the\n // result of running object\u2019s get stream.\n stream = object.stream()\n } else {\n // 4. Otherwise, set stream to a new ReadableStream object, and set\n // up stream with byte reading support.\n stream = new ReadableStream({\n async pull (controller) {\n const buffer = typeof source === 'string' ? textEncoder.encode(source) : source\n\n if (buffer.byteLength) {\n controller.enqueue(buffer)\n }\n\n queueMicrotask(() => readableStreamClose(controller))\n },\n start () {},\n type: 'bytes'\n })\n }\n\n // 5. Assert: stream is a ReadableStream object.\n assert(isReadableStreamLike(stream))\n\n // 6. Let action be null.\n let action = null\n\n // 7. Let source be null.\n let source = null\n\n // 8. Let length be null.\n let length = null\n\n // 9. Let type be null.\n let type = null\n\n // 10. Switch on object:\n if (typeof object === 'string') {\n // Set source to the UTF-8 encoding of object.\n // Note: setting source to a Uint8Array here breaks some mocking assumptions.\n source = object\n\n // Set type to `text/plain;charset=UTF-8`.\n type = 'text/plain;charset=UTF-8'\n } else if (object instanceof URLSearchParams) {\n // URLSearchParams\n\n // spec says to run application/x-www-form-urlencoded on body.list\n // this is implemented in Node.js as apart of an URLSearchParams instance toString method\n // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490\n // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100\n\n // Set source to the result of running the application/x-www-form-urlencoded serializer with object\u2019s list.\n source = object.toString()\n\n // Set type to `application/x-www-form-urlencoded;charset=UTF-8`.\n type = 'application/x-www-form-urlencoded;charset=UTF-8'\n } else if (isArrayBuffer(object)) {\n // BufferSource/ArrayBuffer\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.slice())\n } else if (ArrayBuffer.isView(object)) {\n // BufferSource/ArrayBufferView\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))\n } else if (util.isFormDataLike(object)) {\n const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`\n const prefix = `--${boundary}\\r\\nContent-Disposition: form-data`\n\n /*! formdata-polyfill. MIT License. Jimmy W\u00E4rting */\n const escape = (str) =>\n str.replace(/\\n/g, '%0A').replace(/\\r/g, '%0D').replace(/\"/g, '%22')\n const normalizeLinefeeds = (value) => value.replace(/\\r?\\n|\\r/g, '\\r\\n')\n\n // Set action to this step: run the multipart/form-data\n // encoding algorithm, with object\u2019s entry list and UTF-8.\n // - This ensures that the body is immutable and can't be changed afterwords\n // - That the content-length is calculated in advance.\n // - And that all parts are pre-encoded and ready to be sent.\n\n const blobParts = []\n const rn = new Uint8Array([13, 10]) // '\\r\\n'\n length = 0\n let hasUnknownSizeValue = false\n\n for (const [name, value] of object) {\n if (typeof value === 'string') {\n const chunk = textEncoder.encode(prefix +\n `; name=\"${escape(normalizeLinefeeds(name))}\"` +\n `\\r\\n\\r\\n${normalizeLinefeeds(value)}\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n } else {\n const chunk = textEncoder.encode(`${prefix}; name=\"${escape(normalizeLinefeeds(name))}\"` +\n (value.name ? `; filename=\"${escape(value.name)}\"` : '') + '\\r\\n' +\n `Content-Type: ${\n value.type || 'application/octet-stream'\n }\\r\\n\\r\\n`)\n blobParts.push(chunk, value, rn)\n if (typeof value.size === 'number') {\n length += chunk.byteLength + value.size + rn.byteLength\n } else {\n hasUnknownSizeValue = true\n }\n }\n }\n\n // CRLF is appended to the body to function with legacy servers and match other implementations.\n // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030\n // https://github.com/form-data/form-data/issues/63\n const chunk = textEncoder.encode(`--${boundary}--\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n if (hasUnknownSizeValue) {\n length = null\n }\n\n // Set source to object.\n source = object\n\n action = async function * () {\n for (const part of blobParts) {\n if (part.stream) {\n yield * part.stream()\n } else {\n yield part\n }\n }\n }\n\n // Set type to `multipart/form-data; boundary=`,\n // followed by the multipart/form-data boundary string generated\n // by the multipart/form-data encoding algorithm.\n type = `multipart/form-data; boundary=${boundary}`\n } else if (isBlobLike(object)) {\n // Blob\n\n // Set source to object.\n source = object\n\n // Set length to object\u2019s size.\n length = object.size\n\n // If object\u2019s type attribute is not the empty byte sequence, set\n // type to its value.\n if (object.type) {\n type = object.type\n }\n } else if (typeof object[Symbol.asyncIterator] === 'function') {\n // If keepalive is true, then throw a TypeError.\n if (keepalive) {\n throw new TypeError('keepalive')\n }\n\n // If object is disturbed or locked, then throw a TypeError.\n if (util.isDisturbed(object) || object.locked) {\n throw new TypeError(\n 'Response body object should not be disturbed or locked'\n )\n }\n\n stream =\n object instanceof ReadableStream ? object : ReadableStreamFrom(object)\n }\n\n // 11. If source is a byte sequence, then set action to a\n // step that returns source and length to source\u2019s length.\n if (typeof source === 'string' || util.isBuffer(source)) {\n length = Buffer.byteLength(source)\n }\n\n // 12. If action is non-null, then run these steps in in parallel:\n if (action != null) {\n // Run action.\n let iterator\n stream = new ReadableStream({\n async start () {\n iterator = action(object)[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { value, done } = await iterator.next()\n if (done) {\n // When running action is done, close stream.\n queueMicrotask(() => {\n controller.close()\n controller.byobRequest?.respond(0)\n })\n } else {\n // Whenever one or more bytes are available and stream is not errored,\n // enqueue a Uint8Array wrapping an ArrayBuffer containing the available\n // bytes into stream.\n if (!isErrored(stream)) {\n const buffer = new Uint8Array(value)\n if (buffer.byteLength) {\n controller.enqueue(buffer)\n }\n }\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n },\n type: 'bytes'\n })\n }\n\n // 13. Let body be a body whose stream is stream, source is source,\n // and length is length.\n const body = { stream, source, length }\n\n // 14. Return (body, type).\n return [body, type]\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit-safely-extract\nfunction safelyExtractBody (object, keepalive = false) {\n // To safely extract a body and a `Content-Type` value from\n // a byte sequence or BodyInit object object, run these steps:\n\n // 1. If object is a ReadableStream object, then:\n if (object instanceof ReadableStream) {\n // Assert: object is neither disturbed nor locked.\n // istanbul ignore next\n assert(!util.isDisturbed(object), 'The body has already been consumed.')\n // istanbul ignore next\n assert(!object.locked, 'The stream is locked.')\n }\n\n // 2. Return the results of extracting object.\n return extractBody(object, keepalive)\n}\n\nfunction cloneBody (instance, body) {\n // To clone a body body, run these steps:\n\n // https://fetch.spec.whatwg.org/#concept-body-clone\n\n // 1. Let \u00AB out1, out2 \u00BB be the result of teeing body\u2019s stream.\n const [out1, out2] = body.stream.tee()\n\n // 2. Set body\u2019s stream to out1.\n body.stream = out1\n\n // 3. Return a body whose stream is out2 and other members are copied from body.\n return {\n stream: out2,\n length: body.length,\n source: body.source\n }\n}\n\nfunction throwIfAborted (state) {\n if (state.aborted) {\n throw new DOMException('The operation was aborted.', 'AbortError')\n }\n}\n\nfunction bodyMixinMethods (instance) {\n const methods = {\n blob () {\n // The blob() method steps are to return the result of\n // running consume body with this and the following step\n // given a byte sequence bytes: return a Blob whose\n // contents are bytes and whose type attribute is this\u2019s\n // MIME type.\n return consumeBody(this, (bytes) => {\n let mimeType = bodyMimeType(this)\n\n if (mimeType === null) {\n mimeType = ''\n } else if (mimeType) {\n mimeType = serializeAMimeType(mimeType)\n }\n\n // Return a Blob whose contents are bytes and type attribute\n // is mimeType.\n return new Blob([bytes], { type: mimeType })\n }, instance)\n },\n\n arrayBuffer () {\n // The arrayBuffer() method steps are to return the result\n // of running consume body with this and the following step\n // given a byte sequence bytes: return a new ArrayBuffer\n // whose contents are bytes.\n return consumeBody(this, (bytes) => {\n return new Uint8Array(bytes).buffer\n }, instance)\n },\n\n text () {\n // The text() method steps are to return the result of running\n // consume body with this and UTF-8 decode.\n return consumeBody(this, utf8DecodeBytes, instance)\n },\n\n json () {\n // The json() method steps are to return the result of running\n // consume body with this and parse JSON from bytes.\n return consumeBody(this, parseJSONFromBytes, instance)\n },\n\n formData () {\n // The formData() method steps are to return the result of running\n // consume body with this and the following step given a byte sequence bytes:\n return consumeBody(this, (value) => {\n // 1. Let mimeType be the result of get the MIME type with this.\n const mimeType = bodyMimeType(this)\n\n // 2. If mimeType is non-null, then switch on mimeType\u2019s essence and run\n // the corresponding steps:\n if (mimeType !== null) {\n switch (mimeType.essence) {\n case 'multipart/form-data': {\n // 1. ... [long step]\n const parsed = multipartFormDataParser(value, mimeType)\n\n // 2. If that fails for some reason, then throw a TypeError.\n if (parsed === 'failure') {\n throw new TypeError('Failed to parse body as FormData.')\n }\n\n // 3. Return a new FormData object, appending each entry,\n // resulting from the parsing operation, to its entry list.\n const fd = new FormData()\n fd[kState] = parsed\n\n return fd\n }\n case 'application/x-www-form-urlencoded': {\n // 1. Let entries be the result of parsing bytes.\n const entries = new URLSearchParams(value.toString())\n\n // 2. If entries is failure, then throw a TypeError.\n\n // 3. Return a new FormData object whose entry list is entries.\n const fd = new FormData()\n\n for (const [name, value] of entries) {\n fd.append(name, value)\n }\n\n return fd\n }\n }\n }\n\n // 3. Throw a TypeError.\n throw new TypeError(\n 'Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\".'\n )\n }, instance)\n },\n\n bytes () {\n // The bytes() method steps are to return the result of running consume body\n // with this and the following step given a byte sequence bytes: return the\n // result of creating a Uint8Array from bytes in this\u2019s relevant realm.\n return consumeBody(this, (bytes) => {\n return new Uint8Array(bytes)\n }, instance)\n }\n }\n\n return methods\n}\n\nfunction mixinBody (prototype) {\n Object.assign(prototype.prototype, bodyMixinMethods(prototype))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-consume-body\n * @param {Response|Request} object\n * @param {(value: unknown) => unknown} convertBytesToJSValue\n * @param {Response|Request} instance\n */\nasync function consumeBody (object, convertBytesToJSValue, instance) {\n webidl.brandCheck(object, instance)\n\n // 1. If object is unusable, then return a promise rejected\n // with a TypeError.\n if (bodyUnusable(object)) {\n throw new TypeError('Body is unusable: Body has already been read')\n }\n\n throwIfAborted(object[kState])\n\n // 2. Let promise be a new promise.\n const promise = createDeferredPromise()\n\n // 3. Let errorSteps given error be to reject promise with error.\n const errorSteps = (error) => promise.reject(error)\n\n // 4. Let successSteps given a byte sequence data be to resolve\n // promise with the result of running convertBytesToJSValue\n // with data. If that threw an exception, then run errorSteps\n // with that exception.\n const successSteps = (data) => {\n try {\n promise.resolve(convertBytesToJSValue(data))\n } catch (e) {\n errorSteps(e)\n }\n }\n\n // 5. If object\u2019s body is null, then run successSteps with an\n // empty byte sequence.\n if (object[kState].body == null) {\n successSteps(Buffer.allocUnsafe(0))\n return promise.promise\n }\n\n // 6. Otherwise, fully read object\u2019s body given successSteps,\n // errorSteps, and object\u2019s relevant global object.\n await fullyReadBody(object[kState].body, successSteps, errorSteps)\n\n // 7. Return promise.\n return promise.promise\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction bodyUnusable (object) {\n const body = object[kState].body\n\n // An object including the Body interface mixin is\n // said to be unusable if its body is non-null and\n // its body\u2019s stream is disturbed or locked.\n return body != null && (body.stream.locked || util.isDisturbed(body.stream))\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value\n * @param {Uint8Array} bytes\n */\nfunction parseJSONFromBytes (bytes) {\n return JSON.parse(utf8DecodeBytes(bytes))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-mime-type\n * @param {import('./response').Response|import('./request').Request} requestOrResponse\n */\nfunction bodyMimeType (requestOrResponse) {\n // 1. Let headers be null.\n // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse\u2019s request\u2019s header list.\n // 3. Otherwise, set headers to requestOrResponse\u2019s response\u2019s header list.\n /** @type {import('./headers').HeadersList} */\n const headers = requestOrResponse[kState].headersList\n\n // 4. Let mimeType be the result of extracting a MIME type from headers.\n const mimeType = extractMimeType(headers)\n\n // 5. If mimeType is failure, then return null.\n if (mimeType === 'failure') {\n return null\n }\n\n // 6. Return mimeType.\n return mimeType\n}\n\nmodule.exports = {\n extractBody,\n safelyExtractBody,\n cloneBody,\n mixinBody,\n streamRegistry,\n hasFinalizationRegistry,\n bodyUnusable\n}\n", "'use strict'\n\n/* global WebAssembly */\n\nconst assert = require('node:assert')\nconst util = require('../core/util.js')\nconst { channels } = require('../core/diagnostics.js')\nconst timers = require('../util/timers.js')\nconst {\n RequestContentLengthMismatchError,\n ResponseContentLengthMismatchError,\n RequestAbortedError,\n HeadersTimeoutError,\n HeadersOverflowError,\n SocketError,\n InformationalError,\n BodyTimeoutError,\n HTTPParserError,\n ResponseExceededMaxSizeError\n} = require('../core/errors.js')\nconst {\n kUrl,\n kReset,\n kClient,\n kParser,\n kBlocking,\n kRunning,\n kPending,\n kSize,\n kWriting,\n kQueue,\n kNoRef,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kSocket,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kMaxRequests,\n kCounter,\n kMaxResponseSize,\n kOnError,\n kResume,\n kHTTPContext\n} = require('../core/symbols.js')\n\nconst constants = require('../llhttp/constants.js')\nconst EMPTY_BUF = Buffer.alloc(0)\nconst FastBuffer = Buffer[Symbol.species]\nconst addListener = util.addListener\nconst removeAllListeners = util.removeAllListeners\nconst kIdleSocketValidation = Symbol('kIdleSocketValidation')\nconst kIdleSocketValidationTimeout = Symbol('kIdleSocketValidationTimeout')\nconst kSocketUsed = Symbol('kSocketUsed')\n\nlet extractBody\n\nasync function lazyllhttp () {\n const llhttpWasmData = process.env.JEST_WORKER_ID ? require('../llhttp/llhttp-wasm.js') : undefined\n\n let mod\n try {\n mod = await WebAssembly.compile(require('../llhttp/llhttp_simd-wasm.js'))\n } catch (e) {\n /* istanbul ignore next */\n\n // We could check if the error was caused by the simd option not\n // being enabled, but the occurring of this other error\n // * https://github.com/emscripten-core/emscripten/issues/11495\n // got me to remove that check to avoid breaking Node 12.\n mod = await WebAssembly.compile(llhttpWasmData || require('../llhttp/llhttp-wasm.js'))\n }\n\n return await WebAssembly.instantiate(mod, {\n env: {\n /* eslint-disable camelcase */\n\n wasm_on_url: (p, at, len) => {\n /* istanbul ignore next */\n return 0\n },\n wasm_on_status: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_begin: (p) => {\n assert(currentParser.ptr === p)\n return currentParser.onMessageBegin() || 0\n },\n wasm_on_header_field: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_header_value: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {\n assert(currentParser.ptr === p)\n return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0\n },\n wasm_on_body: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_complete: (p) => {\n assert(currentParser.ptr === p)\n return currentParser.onMessageComplete() || 0\n }\n\n /* eslint-enable camelcase */\n }\n })\n}\n\nlet llhttpInstance = null\nlet llhttpPromise = lazyllhttp()\nllhttpPromise.catch()\n\nlet currentParser = null\nlet currentBufferRef = null\nlet currentBufferSize = 0\nlet currentBufferPtr = null\n\nconst USE_NATIVE_TIMER = 0\nconst USE_FAST_TIMER = 1\n\n// Use fast timers for headers and body to take eventual event loop\n// latency into account.\nconst TIMEOUT_HEADERS = 2 | USE_FAST_TIMER\nconst TIMEOUT_BODY = 4 | USE_FAST_TIMER\n\n// Use native timers to ignore event loop latency for keep-alive\n// handling.\nconst TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER\n\nclass Parser {\n constructor (client, socket, { exports }) {\n assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0)\n\n this.llhttp = exports\n this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)\n this.client = client\n this.socket = socket\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n this.statusCode = null\n this.statusText = ''\n this.upgrade = false\n this.headers = []\n this.headersSize = 0\n this.headersMaxSize = client[kMaxHeadersSize]\n this.shouldKeepAlive = false\n this.paused = false\n this.resume = this.resume.bind(this)\n\n this.bytesRead = 0\n\n this.keepAlive = ''\n this.contentLength = ''\n this.connection = ''\n this.maxResponseSize = client[kMaxResponseSize]\n }\n\n setTimeout (delay, type) {\n // If the existing timer and the new timer are of different timer type\n // (fast or native) or have different delay, we need to clear the existing\n // timer and set a new one.\n if (\n delay !== this.timeoutValue ||\n (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER)\n ) {\n // If a timeout is already set, clear it with clearTimeout of the fast\n // timer implementation, as it can clear fast and native timers.\n if (this.timeout) {\n timers.clearTimeout(this.timeout)\n this.timeout = null\n }\n\n if (delay) {\n if (type & USE_FAST_TIMER) {\n this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this))\n } else {\n this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this))\n this.timeout.unref()\n }\n }\n\n this.timeoutValue = delay\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.timeoutType = type\n }\n\n resume () {\n if (this.socket.destroyed || !this.paused) {\n return\n }\n\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_resume(this.ptr)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.paused = false\n this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.\n this.readMore()\n }\n\n readMore () {\n while (!this.paused && this.ptr) {\n const chunk = this.socket.read()\n if (chunk === null) {\n break\n }\n this.execute(chunk)\n }\n }\n\n execute (data) {\n assert(this.ptr != null)\n assert(currentParser == null)\n assert(!this.paused)\n\n const { socket, llhttp } = this\n\n if (data.length > currentBufferSize) {\n if (currentBufferPtr) {\n llhttp.free(currentBufferPtr)\n }\n currentBufferSize = Math.ceil(data.length / 4096) * 4096\n currentBufferPtr = llhttp.malloc(currentBufferSize)\n }\n\n new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data)\n\n // Call `execute` on the wasm parser.\n // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,\n // and finally the length of bytes to parse.\n // The return value is an error code or `constants.ERROR.OK`.\n try {\n let ret\n\n try {\n currentBufferRef = data\n currentParser = this\n ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length)\n /* eslint-disable-next-line no-useless-catch */\n } catch (err) {\n /* istanbul ignore next: difficult to make a test case for */\n throw err\n } finally {\n currentParser = null\n currentBufferRef = null\n }\n\n const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr\n\n if (ret !== constants.ERROR.OK) {\n const body = data.subarray(offset)\n\n if (ret === constants.ERROR.PAUSED_UPGRADE) {\n this.onUpgrade(body)\n } else if (ret === constants.ERROR.PAUSED) {\n this.paused = true\n socket.unshift(body)\n } else {\n throw this.createError(ret, body)\n }\n }\n } catch (err) {\n util.destroy(socket, err)\n }\n }\n\n finish () {\n assert(currentParser === null)\n assert(this.ptr != null)\n assert(!this.paused)\n\n const { llhttp } = this\n\n let ret\n\n try {\n currentParser = this\n ret = llhttp.llhttp_finish(this.ptr)\n } finally {\n currentParser = null\n }\n\n if (ret === constants.ERROR.OK) {\n return null\n }\n\n if (ret === constants.ERROR.PAUSED || ret === constants.ERROR.PAUSED_UPGRADE) {\n this.paused = true\n return null\n }\n\n return this.createError(ret, EMPTY_BUF)\n }\n\n createError (ret, data) {\n const { llhttp, contentLength, bytesRead } = this\n\n if (contentLength && bytesRead !== parseInt(contentLength, 10)) {\n return new ResponseContentLengthMismatchError()\n }\n\n const ptr = llhttp.llhttp_get_error_reason(this.ptr)\n let message = ''\n if (ptr) {\n const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)\n message =\n 'Response does not match the HTTP/1.1 protocol (' +\n Buffer.from(llhttp.memory.buffer, ptr, len).toString() +\n ')'\n }\n\n return new HTTPParserError(message, constants.ERROR[ret], data)\n }\n\n destroy () {\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_free(this.ptr)\n this.ptr = null\n\n this.timeout && timers.clearTimeout(this.timeout)\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n\n this.paused = false\n }\n\n onStatus (buf) {\n this.statusText = buf.toString()\n }\n\n onMessageBegin () {\n const { socket, client } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n if (client[kRunning] === 0) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n if (!request) {\n return -1\n }\n request.onResponseStarted()\n }\n\n onHeaderField (buf) {\n const len = this.headers.length\n\n if ((len & 1) === 0) {\n this.headers.push(buf)\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n this.trackHeader(buf.length)\n }\n\n onHeaderValue (buf) {\n let len = this.headers.length\n\n if ((len & 1) === 1) {\n this.headers.push(buf)\n len += 1\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n const key = this.headers[len - 2]\n if (key.length === 10) {\n const headerName = util.bufferToLowerCasedHeaderName(key)\n if (headerName === 'keep-alive') {\n this.keepAlive += buf.toString()\n } else if (headerName === 'connection') {\n this.connection += buf.toString()\n }\n } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') {\n this.contentLength += buf.toString()\n }\n\n this.trackHeader(buf.length)\n }\n\n trackHeader (len) {\n this.headersSize += len\n if (this.headersSize >= this.headersMaxSize) {\n util.destroy(this.socket, new HeadersOverflowError())\n }\n }\n\n onUpgrade (head) {\n const { upgrade, client, socket, headers, statusCode } = this\n\n assert(upgrade)\n assert(client[kSocket] === socket)\n assert(!socket.destroyed)\n assert(!this.paused)\n assert((headers.length & 1) === 0)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n assert(request.upgrade || request.method === 'CONNECT')\n\n this.statusCode = null\n this.statusText = ''\n this.shouldKeepAlive = null\n\n this.headers = []\n this.headersSize = 0\n\n socket.unshift(head)\n\n socket[kParser].destroy()\n socket[kParser] = null\n\n socket[kClient] = null\n socket[kError] = null\n\n removeAllListeners(socket)\n\n client[kSocket] = null\n client[kHTTPContext] = null // TODO (fix): This is hacky...\n client[kQueue][client[kRunningIdx]++] = null\n client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))\n\n try {\n request.onUpgrade(statusCode, headers, socket)\n } catch (err) {\n util.destroy(socket, err)\n }\n\n client[kResume]()\n }\n\n onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {\n const { client, socket, headers, statusText } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n if (client[kRunning] === 0) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n\n /* istanbul ignore next: difficult to make a test case for */\n if (!request) {\n return -1\n }\n\n assert(!this.upgrade)\n assert(this.statusCode < 200)\n\n if (statusCode === 100) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n /* this can only happen if server is misbehaving */\n if (upgrade && !request.upgrade) {\n util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))\n return -1\n }\n\n assert(this.timeoutType === TIMEOUT_HEADERS)\n\n this.statusCode = statusCode\n this.shouldKeepAlive = (\n shouldKeepAlive ||\n // Override llhttp value which does not allow keepAlive for HEAD.\n (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')\n )\n\n if (this.statusCode >= 200) {\n const bodyTimeout = request.bodyTimeout != null\n ? request.bodyTimeout\n : client[kBodyTimeout]\n this.setTimeout(bodyTimeout, TIMEOUT_BODY)\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n if (request.method === 'CONNECT') {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n if (upgrade) {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n assert((this.headers.length & 1) === 0)\n this.headers = []\n this.headersSize = 0\n\n if (this.shouldKeepAlive && client[kPipelining]) {\n const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null\n\n if (keepAliveTimeout != null) {\n const timeout = Math.min(\n keepAliveTimeout - client[kKeepAliveTimeoutThreshold],\n client[kKeepAliveMaxTimeout]\n )\n if (timeout <= 0) {\n socket[kReset] = true\n } else {\n client[kKeepAliveTimeoutValue] = timeout\n }\n } else {\n client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]\n }\n } else {\n // Stop more requests from being dispatched.\n socket[kReset] = true\n }\n\n const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false\n\n if (request.aborted) {\n return -1\n }\n\n if (request.method === 'HEAD') {\n return 1\n }\n\n if (statusCode < 200) {\n return 1\n }\n\n if (socket[kBlocking]) {\n socket[kBlocking] = false\n client[kResume]()\n }\n\n return pause ? constants.ERROR.PAUSED : 0\n }\n\n onBody (buf) {\n const { client, socket, statusCode, maxResponseSize } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n assert(statusCode >= 200)\n\n if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {\n util.destroy(socket, new ResponseExceededMaxSizeError())\n return -1\n }\n\n this.bytesRead += buf.length\n\n if (request.onData(buf) === false) {\n return constants.ERROR.PAUSED\n }\n }\n\n onMessageComplete () {\n const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this\n\n if (socket.destroyed && (!statusCode || shouldKeepAlive)) {\n return -1\n }\n\n if (upgrade) {\n return\n }\n\n assert(statusCode >= 100)\n assert((this.headers.length & 1) === 0)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n this.statusCode = null\n this.statusText = ''\n this.bytesRead = 0\n this.contentLength = ''\n this.keepAlive = ''\n this.connection = ''\n\n this.headers = []\n this.headersSize = 0\n\n if (statusCode < 200) {\n return\n }\n\n /* istanbul ignore next: should be handled by llhttp? */\n if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {\n util.destroy(socket, new ResponseContentLengthMismatchError())\n return -1\n }\n\n request.onComplete(headers)\n\n client[kQueue][client[kRunningIdx]++] = null\n socket[kSocketUsed] = true\n\n if (socket[kWriting]) {\n assert(client[kRunning] === 0)\n // Response completed before request.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (!shouldKeepAlive) {\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (socket[kReset] && client[kRunning] === 0) {\n // Destroy socket once all requests have completed.\n // The request at the tail of the pipeline is the one\n // that requested reset and no further requests should\n // have been queued since then.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (client[kPipelining] == null || client[kPipelining] === 1) {\n // We must wait a full event loop cycle to reuse this socket to make sure\n // that non-spec compliant servers are not closing the connection even if they\n // said they won't.\n setImmediate(() => client[kResume]())\n } else {\n client[kResume]()\n }\n }\n}\n\nfunction onParserTimeout (parser) {\n const { socket, timeoutType, client, paused } = parser.deref()\n\n /* istanbul ignore else */\n if (timeoutType === TIMEOUT_HEADERS) {\n if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {\n assert(!paused, 'cannot be paused while waiting for headers')\n util.destroy(socket, new HeadersTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_BODY) {\n if (!paused) {\n util.destroy(socket, new BodyTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {\n assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])\n util.destroy(socket, new InformationalError('socket idle timeout'))\n }\n}\n\nasync function connectH1 (client, socket) {\n client[kSocket] = socket\n\n if (!llhttpInstance) {\n llhttpInstance = await llhttpPromise\n llhttpPromise = null\n }\n\n socket[kNoRef] = false\n socket[kWriting] = false\n socket[kReset] = false\n socket[kBlocking] = false\n socket[kIdleSocketValidation] = 0\n socket[kIdleSocketValidationTimeout] = null\n socket[kSocketUsed] = false\n socket[kParser] = new Parser(client, socket, llhttpInstance)\n\n addListener(socket, 'error', function (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n const parser = this[kParser]\n\n // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded\n // to the user.\n if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {\n const parserErr = parser.finish()\n if (parserErr) {\n this[kError] = parserErr\n this[kClient][kOnError](parserErr)\n }\n return\n }\n\n this[kError] = err\n\n this[kClient][kOnError](err)\n })\n addListener(socket, 'readable', function () {\n const parser = this[kParser]\n\n if (parser) {\n parser.readMore()\n }\n })\n addListener(socket, 'end', function () {\n const parser = this[kParser]\n\n if (parser.statusCode && !parser.shouldKeepAlive) {\n const parserErr = parser.finish()\n if (parserErr) {\n util.destroy(this, parserErr)\n }\n return\n }\n\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n })\n addListener(socket, 'close', function () {\n const client = this[kClient]\n const parser = this[kParser]\n\n clearIdleSocketValidation(this)\n\n if (parser) {\n if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {\n this[kError] = parser.finish() || this[kError]\n }\n\n this[kParser].destroy()\n this[kParser] = null\n }\n\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n client[kSocket] = null\n client[kHTTPContext] = null // TODO (fix): This is hacky...\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n util.errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n client[kResume]()\n })\n\n let closed = false\n socket.on('close', () => {\n closed = true\n })\n\n return {\n version: 'h1',\n defaultPipelining: 1,\n write (...args) {\n return writeH1(client, ...args)\n },\n resume () {\n resumeH1(client)\n },\n destroy (err, callback) {\n if (closed) {\n queueMicrotask(callback)\n } else {\n socket.destroy(err).on('close', callback)\n }\n },\n get destroyed () {\n return socket.destroyed\n },\n busy (request) {\n if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) {\n return true\n }\n\n if (request) {\n if (client[kRunning] > 0 && !request.idempotent) {\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return true\n }\n\n if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {\n // Don't dispatch an upgrade until all preceding requests have completed.\n // A misbehaving server might upgrade the connection before all pipelined\n // request has completed.\n return true\n }\n\n if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) {\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return true\n }\n }\n\n return false\n }\n }\n}\n\nfunction clearIdleSocketValidation (socket) {\n if (socket[kIdleSocketValidationTimeout]) {\n clearTimeout(socket[kIdleSocketValidationTimeout])\n socket[kIdleSocketValidationTimeout] = null\n }\n\n socket[kIdleSocketValidation] = 0\n}\n\nfunction scheduleIdleSocketValidation (client, socket) {\n socket[kIdleSocketValidation] = 1\n socket[kIdleSocketValidationTimeout] = setTimeout(() => {\n socket[kIdleSocketValidationTimeout] = null\n socket[kIdleSocketValidation] = 2\n\n if (client[kSocket] === socket && !socket.destroyed) {\n client[kResume]()\n }\n }, 0)\n socket[kIdleSocketValidationTimeout].unref?.()\n}\n\n/**\n * @param {import('./client.js')} client\n */\nfunction resumeH1 (client) {\n const socket = client[kSocket]\n\n if (socket && !socket.destroyed) {\n if (client[kSize] === 0) {\n if (!socket[kNoRef] && socket.unref) {\n socket.unref()\n socket[kNoRef] = true\n }\n } else if (socket[kNoRef] && socket.ref) {\n socket.ref()\n socket[kNoRef] = false\n }\n\n if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {\n if (socket[kIdleSocketValidation] === 0) {\n scheduleIdleSocketValidation(client, socket)\n socket[kParser].readMore()\n if (socket.destroyed) {\n return\n }\n return\n }\n\n if (socket[kIdleSocketValidation] === 1) {\n socket[kParser].readMore()\n if (socket.destroyed) {\n return\n }\n return\n }\n }\n\n if (client[kRunning] === 0) {\n socket[kParser].readMore()\n if (socket.destroyed) {\n return\n }\n }\n\n if (client[kSize] === 0) {\n if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {\n socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)\n }\n } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {\n if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {\n const request = client[kQueue][client[kRunningIdx]]\n const headersTimeout = request.headersTimeout != null\n ? request.headersTimeout\n : client[kHeadersTimeout]\n socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)\n }\n }\n }\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\nfunction writeH1 (client, request) {\n const { method, path, host, upgrade, blocking, reset } = request\n\n let { body, headers, contentLength } = request\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH' ||\n method === 'QUERY' ||\n method === 'PROPFIND' ||\n method === 'PROPPATCH'\n )\n\n if (util.isFormDataLike(body)) {\n if (!extractBody) {\n extractBody = require('../web/fetch/body.js').extractBody\n }\n\n const [bodyStream, contentType] = extractBody(body)\n if (request.contentType == null) {\n headers.push('content-type', contentType)\n }\n body = bodyStream.stream\n contentLength = bodyStream.length\n } else if (util.isBlobLike(body) && request.contentType == null && body.type) {\n headers.push('content-type', body.type)\n }\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n const bodyLength = util.bodyLength(body)\n\n contentLength = bodyLength ?? contentLength\n\n if (contentLength === null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 && !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n util.errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n const socket = client[kSocket]\n clearIdleSocketValidation(socket)\n\n const abort = (err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n util.errorRequest(client, request, err || new RequestAbortedError())\n\n util.destroy(body)\n util.destroy(socket, new InformationalError('aborted'))\n }\n\n try {\n request.onConnect(abort)\n } catch (err) {\n util.errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (method === 'HEAD') {\n // https://github.com/mcollina/undici/issues/258\n // Close after a HEAD request to interop with misbehaving servers\n // that may send a body in the response.\n\n socket[kReset] = true\n }\n\n if (upgrade || method === 'CONNECT') {\n // On CONNECT or upgrade, block pipeline from dispatching further\n // requests on this connection.\n\n socket[kReset] = true\n }\n\n if (reset != null) {\n socket[kReset] = reset\n }\n\n if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {\n socket[kReset] = true\n }\n\n if (blocking) {\n socket[kBlocking] = true\n }\n\n let header = `${method} ${path} HTTP/1.1\\r\\n`\n\n if (typeof host === 'string') {\n header += `host: ${host}\\r\\n`\n } else {\n header += client[kHostHeader]\n }\n\n if (upgrade) {\n header += `connection: upgrade\\r\\nupgrade: ${upgrade}\\r\\n`\n } else if (client[kPipelining] && !socket[kReset]) {\n header += 'connection: keep-alive\\r\\n'\n } else {\n header += 'connection: close\\r\\n'\n }\n\n if (Array.isArray(headers)) {\n for (let n = 0; n < headers.length; n += 2) {\n const key = headers[n + 0]\n const val = headers[n + 1]\n\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n header += `${key}: ${val[i]}\\r\\n`\n }\n } else {\n header += `${key}: ${val}\\r\\n`\n }\n }\n }\n\n if (channels.sendHeaders.hasSubscribers) {\n channels.sendHeaders.publish({ request, headers: header, socket })\n }\n\n /* istanbul ignore else: assertion */\n if (!body || bodyLength === 0) {\n writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isBuffer(body)) {\n writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload)\n } else {\n writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload)\n }\n } else if (util.isStream(body)) {\n writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isIterable(body)) {\n writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else {\n assert(false)\n }\n\n return true\n}\n\nfunction writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n let finished = false\n\n const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })\n\n const onData = function (chunk) {\n if (finished) {\n return\n }\n\n try {\n if (!writer.write(chunk) && this.pause) {\n this.pause()\n }\n } catch (err) {\n util.destroy(this, err)\n }\n }\n const onDrain = function () {\n if (finished) {\n return\n }\n\n if (body.resume) {\n body.resume()\n }\n }\n const onClose = function () {\n // 'close' might be emitted *before* 'error' for\n // broken streams. Wait a tick to avoid this case.\n queueMicrotask(() => {\n // It's only safe to remove 'error' listener after\n // 'close'.\n body.removeListener('error', onFinished)\n })\n\n if (!finished) {\n const err = new RequestAbortedError()\n queueMicrotask(() => onFinished(err))\n }\n }\n const onFinished = function (err) {\n if (finished) {\n return\n }\n\n finished = true\n\n assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))\n\n socket\n .off('drain', onDrain)\n .off('error', onFinished)\n\n body\n .removeListener('data', onData)\n .removeListener('end', onFinished)\n .removeListener('close', onClose)\n\n if (!err) {\n try {\n writer.end()\n } catch (er) {\n err = er\n }\n }\n\n writer.destroy(err)\n\n if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {\n util.destroy(body, err)\n } else {\n util.destroy(body)\n }\n }\n\n body\n .on('data', onData)\n .on('end', onFinished)\n .on('error', onFinished)\n .on('close', onClose)\n\n if (body.resume) {\n body.resume()\n }\n\n socket\n .on('drain', onDrain)\n .on('error', onFinished)\n\n if (body.errorEmitted ?? body.errored) {\n setImmediate(() => onFinished(body.errored))\n } else if (body.endEmitted ?? body.readableEnded) {\n setImmediate(() => onFinished(null))\n }\n\n if (body.closeEmitted ?? body.closed) {\n setImmediate(onClose)\n }\n}\n\nfunction writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n try {\n if (!body) {\n if (contentLength === 0) {\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n assert(contentLength === null, 'no body must not have content length')\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(body)\n socket.uncork()\n request.onBodySent(body)\n\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n }\n request.onRequestSent()\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\nasync function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(buffer)\n socket.uncork()\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\nasync function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n socket\n .on('close', onDrain)\n .on('drain', onDrain)\n\n const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (!writer.write(chunk)) {\n await waitForDrain()\n }\n }\n\n writer.end()\n } catch (err) {\n writer.destroy(err)\n } finally {\n socket\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nclass AsyncWriter {\n constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) {\n this.socket = socket\n this.request = request\n this.contentLength = contentLength\n this.client = client\n this.bytesWritten = 0\n this.expectsPayload = expectsPayload\n this.header = header\n this.abort = abort\n\n socket[kWriting] = true\n }\n\n write (chunk) {\n const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return false\n }\n\n const len = Buffer.byteLength(chunk)\n if (!len) {\n return true\n }\n\n // We should defer writing chunks.\n if (contentLength !== null && bytesWritten + len > contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n socket.cork()\n\n if (bytesWritten === 0) {\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n\n if (contentLength === null) {\n socket.write(`${header}transfer-encoding: chunked\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n }\n }\n\n if (contentLength === null) {\n socket.write(`\\r\\n${len.toString(16)}\\r\\n`, 'latin1')\n }\n\n this.bytesWritten += len\n\n const ret = socket.write(chunk)\n\n socket.uncork()\n\n request.onBodySent(chunk)\n\n if (!ret) {\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n }\n\n return ret\n }\n\n end () {\n const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this\n request.onRequestSent()\n\n socket[kWriting] = false\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return\n }\n\n if (bytesWritten === 0) {\n if (expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD send a Content-Length in a request message when\n // no Transfer-Encoding is sent and the request method defines a meaning\n // for an enclosed payload body.\n\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (contentLength === null) {\n socket.write('\\r\\n0\\r\\n\\r\\n', 'latin1')\n }\n\n if (contentLength !== null && bytesWritten !== contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n } else {\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n }\n\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n\n client[kResume]()\n }\n\n destroy (err) {\n const { socket, client, abort } = this\n\n socket[kWriting] = false\n\n if (err) {\n assert(client[kRunning] <= 1, 'pipeline should only contain this request')\n abort(err)\n }\n }\n}\n\nmodule.exports = connectH1\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { pipeline } = require('node:stream')\nconst util = require('../core/util.js')\nconst {\n RequestContentLengthMismatchError,\n RequestAbortedError,\n SocketError,\n InformationalError\n} = require('../core/errors.js')\nconst {\n kUrl,\n kReset,\n kClient,\n kRunning,\n kPending,\n kQueue,\n kPendingIdx,\n kRunningIdx,\n kError,\n kSocket,\n kStrictContentLength,\n kOnError,\n kMaxConcurrentStreams,\n kHTTP2Session,\n kResume,\n kSize,\n kHTTPContext\n} = require('../core/symbols.js')\n\nconst kOpenStreams = Symbol('open streams')\n\nlet extractBody\n\n// Experimental\nlet h2ExperimentalWarned = false\n\n/** @type {import('http2')} */\nlet http2\ntry {\n http2 = require('node:http2')\n} catch {\n // @ts-ignore\n http2 = { constants: {} }\n}\n\nconst {\n constants: {\n HTTP2_HEADER_AUTHORITY,\n HTTP2_HEADER_METHOD,\n HTTP2_HEADER_PATH,\n HTTP2_HEADER_SCHEME,\n HTTP2_HEADER_CONTENT_LENGTH,\n HTTP2_HEADER_EXPECT,\n HTTP2_HEADER_STATUS\n }\n} = http2\n\nfunction parseH2Headers (headers) {\n const result = []\n\n for (const [name, value] of Object.entries(headers)) {\n // h2 may concat the header value by array\n // e.g. Set-Cookie\n if (Array.isArray(value)) {\n for (const subvalue of value) {\n // we need to provide each header value of header name\n // because the headers handler expect name-value pair\n result.push(Buffer.from(name), Buffer.from(subvalue))\n }\n } else {\n result.push(Buffer.from(name), Buffer.from(value))\n }\n }\n\n return result\n}\n\nasync function connectH2 (client, socket) {\n client[kSocket] = socket\n\n if (!h2ExperimentalWarned) {\n h2ExperimentalWarned = true\n process.emitWarning('H2 support is experimental, expect them to change at any time.', {\n code: 'UNDICI-H2'\n })\n }\n\n const session = http2.connect(client[kUrl], {\n createConnection: () => socket,\n peerMaxConcurrentStreams: client[kMaxConcurrentStreams]\n })\n\n session[kOpenStreams] = 0\n session[kClient] = client\n session[kSocket] = socket\n\n util.addListener(session, 'error', onHttp2SessionError)\n util.addListener(session, 'frameError', onHttp2FrameError)\n util.addListener(session, 'end', onHttp2SessionEnd)\n util.addListener(session, 'goaway', onHTTP2GoAway)\n util.addListener(session, 'close', function () {\n const { [kClient]: client } = this\n const { [kSocket]: socket } = client\n\n const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket))\n\n client[kHTTP2Session] = null\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n }\n })\n\n session.unref()\n\n client[kHTTP2Session] = session\n socket[kHTTP2Session] = session\n\n util.addListener(socket, 'error', function (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kError] = err\n\n this[kClient][kOnError](err)\n })\n\n util.addListener(socket, 'end', function () {\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n })\n\n util.addListener(socket, 'close', function () {\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n client[kSocket] = null\n\n if (this[kHTTP2Session] != null) {\n this[kHTTP2Session].destroy(err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n client[kResume]()\n })\n\n let closed = false\n socket.on('close', () => {\n closed = true\n })\n\n return {\n version: 'h2',\n defaultPipelining: Infinity,\n write (...args) {\n return writeH2(client, ...args)\n },\n resume () {\n resumeH2(client)\n },\n destroy (err, callback) {\n if (closed) {\n queueMicrotask(callback)\n } else {\n // Destroying the socket will trigger the session close\n socket.destroy(err).on('close', callback)\n }\n },\n get destroyed () {\n return socket.destroyed\n },\n busy () {\n return false\n }\n }\n}\n\nfunction resumeH2 (client) {\n const socket = client[kSocket]\n\n if (socket?.destroyed === false) {\n if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) {\n socket.unref()\n client[kHTTP2Session].unref()\n } else {\n socket.ref()\n client[kHTTP2Session].ref()\n }\n }\n}\n\nfunction onHttp2SessionError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n}\n\nfunction onHttp2FrameError (type, code, id) {\n if (id === 0) {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n }\n}\n\nfunction onHttp2SessionEnd () {\n const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket]))\n this.destroy(err)\n util.destroy(this[kSocket], err)\n}\n\n/**\n * This is the root cause of #3011\n * We need to handle GOAWAY frames properly, and trigger the session close\n * along with the socket right away\n */\nfunction onHTTP2GoAway (code) {\n // We cannot recover, so best to close the session and the socket\n const err = this[kError] || new SocketError(`HTTP/2: \"GOAWAY\" frame received with code ${code}`, util.getSocketInfo(this))\n const client = this[kClient]\n\n client[kSocket] = null\n client[kHTTPContext] = null\n\n if (this[kHTTP2Session] != null) {\n this[kHTTP2Session].destroy(err)\n this[kHTTP2Session] = null\n }\n\n util.destroy(this[kSocket], err)\n\n // Fail head of pipeline.\n if (client[kRunningIdx] < client[kQueue].length) {\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n util.errorRequest(client, request, err)\n client[kPendingIdx] = client[kRunningIdx]\n }\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n client[kResume]()\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\nfunction writeH2 (client, request) {\n const session = client[kHTTP2Session]\n const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request\n let { body } = request\n\n if (upgrade) {\n util.errorRequest(client, request, new Error('Upgrade not supported for H2'))\n return false\n }\n\n const headers = {}\n for (let n = 0; n < reqHeaders.length; n += 2) {\n const key = reqHeaders[n + 0]\n const val = reqHeaders[n + 1]\n\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n if (headers[key]) {\n headers[key] += `,${val[i]}`\n } else {\n headers[key] = val[i]\n }\n }\n } else {\n headers[key] = val\n }\n }\n\n /** @type {import('node:http2').ClientHttp2Stream} */\n let stream\n\n const { hostname, port } = client[kUrl]\n\n headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}`\n headers[HTTP2_HEADER_METHOD] = method\n\n const abort = (err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n err = err || new RequestAbortedError()\n\n util.errorRequest(client, request, err)\n\n if (stream != null) {\n util.destroy(stream, err)\n }\n\n // We do not destroy the socket as we can continue using the session\n // the stream get's destroyed and the session remains to create new streams\n util.destroy(body, err)\n client[kQueue][client[kRunningIdx]++] = null\n client[kResume]()\n }\n\n try {\n // We are already connected, streams are pending.\n // We can call on connect, and wait for abort\n request.onConnect(abort)\n } catch (err) {\n util.errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (method === 'CONNECT') {\n session.ref()\n // We are already connected, streams are pending, first request\n // will create a new stream. We trigger a request to create the stream and wait until\n // `ready` event is triggered\n // We disabled endStream to allow the user to write to the stream\n stream = session.request(headers, { endStream: false, signal })\n\n if (stream.id && !stream.pending) {\n request.onUpgrade(null, null, stream)\n ++session[kOpenStreams]\n client[kQueue][client[kRunningIdx]++] = null\n } else {\n stream.once('ready', () => {\n request.onUpgrade(null, null, stream)\n ++session[kOpenStreams]\n client[kQueue][client[kRunningIdx]++] = null\n })\n }\n\n stream.once('close', () => {\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) session.unref()\n })\n\n return true\n }\n\n // https://tools.ietf.org/html/rfc7540#section-8.3\n // :path and :scheme headers must be omitted when sending CONNECT\n\n headers[HTTP2_HEADER_PATH] = path\n headers[HTTP2_HEADER_SCHEME] = 'https'\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n let contentLength = util.bodyLength(body)\n\n if (util.isFormDataLike(body)) {\n extractBody ??= require('../web/fetch/body.js').extractBody\n\n const [bodyStream, contentType] = extractBody(body)\n headers['content-type'] = contentType\n\n body = bodyStream.stream\n contentLength = bodyStream.length\n }\n\n if (contentLength == null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 || !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n util.errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n if (contentLength != null) {\n assert(body, 'no body must not have content length')\n headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`\n }\n\n session.ref()\n\n const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null\n if (expectContinue) {\n headers[HTTP2_HEADER_EXPECT] = '100-continue'\n stream = session.request(headers, { endStream: shouldEndStream, signal })\n\n stream.once('continue', writeBodyH2)\n } else {\n stream = session.request(headers, {\n endStream: shouldEndStream,\n signal\n })\n writeBodyH2()\n }\n\n // Increment counter as we have new streams open\n ++session[kOpenStreams]\n\n stream.once('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n request.onResponseStarted()\n\n // Due to the stream nature, it is possible we face a race condition\n // where the stream has been assigned, but the request has been aborted\n // the request remains in-flight and headers hasn't been received yet\n // for those scenarios, best effort is to destroy the stream immediately\n // as there's no value to keep it open.\n if (request.aborted) {\n const err = new RequestAbortedError()\n util.errorRequest(client, request, err)\n util.destroy(stream, err)\n return\n }\n\n if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) {\n stream.pause()\n }\n\n stream.on('data', (chunk) => {\n if (request.onData(chunk) === false) {\n stream.pause()\n }\n })\n })\n\n stream.once('end', () => {\n // When state is null, it means we haven't consumed body and the stream still do not have\n // a state.\n // Present specially when using pipeline or stream\n if (stream.state?.state == null || stream.state.state < 6) {\n request.onComplete([])\n }\n\n if (session[kOpenStreams] === 0) {\n // Stream is closed or half-closed-remote (6), decrement counter and cleanup\n // It does not have sense to continue working with the stream as we do not\n // have yet RST_STREAM support on client-side\n\n session.unref()\n }\n\n abort(new InformationalError('HTTP/2: stream half-closed (remote)'))\n client[kQueue][client[kRunningIdx]++] = null\n client[kPendingIdx] = client[kRunningIdx]\n client[kResume]()\n })\n\n stream.once('close', () => {\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) {\n session.unref()\n }\n })\n\n stream.once('error', function (err) {\n abort(err)\n })\n\n stream.once('frameError', (type, code) => {\n abort(new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`))\n })\n\n // stream.on('aborted', () => {\n // // TODO(HTTP/2): Support aborted\n // })\n\n // stream.on('timeout', () => {\n // // TODO(HTTP/2): Support timeout\n // })\n\n // stream.on('push', headers => {\n // // TODO(HTTP/2): Support push\n // })\n\n // stream.on('trailers', headers => {\n // // TODO(HTTP/2): Support trailers\n // })\n\n return true\n\n function writeBodyH2 () {\n /* istanbul ignore else: assertion */\n if (!body || contentLength === 0) {\n writeBuffer(\n abort,\n stream,\n null,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else if (util.isBuffer(body)) {\n writeBuffer(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable(\n abort,\n stream,\n body.stream(),\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else {\n writeBlob(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n }\n } else if (util.isStream(body)) {\n writeStream(\n abort,\n client[kSocket],\n expectsPayload,\n stream,\n body,\n client,\n request,\n contentLength\n )\n } else if (util.isIterable(body)) {\n writeIterable(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else {\n assert(false)\n }\n }\n}\n\nfunction writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n try {\n if (body != null && util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n h2stream.cork()\n h2stream.write(body)\n h2stream.uncork()\n h2stream.end()\n\n request.onBodySent(body)\n }\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n request.onRequestSent()\n client[kResume]()\n } catch (error) {\n abort(error)\n }\n}\n\nfunction writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n // For HTTP/2, is enough to pipe the stream\n const pipe = pipeline(\n body,\n h2stream,\n (err) => {\n if (err) {\n util.destroy(pipe, err)\n abort(err)\n } else {\n util.removeAllListeners(pipe)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n }\n }\n )\n\n util.addListener(pipe, 'data', onPipeData)\n\n function onPipeData (chunk) {\n request.onBodySent(chunk)\n }\n}\n\nasync function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n h2stream.cork()\n h2stream.write(buffer)\n h2stream.uncork()\n h2stream.end()\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\nasync function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n h2stream\n .on('close', onDrain)\n .on('drain', onDrain)\n\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n const res = h2stream.write(chunk)\n request.onBodySent(chunk)\n if (!res) {\n await waitForDrain()\n }\n }\n\n h2stream.end()\n\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n } finally {\n h2stream\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nmodule.exports = connectH2\n", "'use strict'\n\nconst util = require('../core/util')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('node:assert')\nconst { InvalidArgumentError } = require('../core/errors')\nconst EE = require('node:events')\n\nconst redirectableStatusCodes = [300, 301, 302, 303, 307, 308]\n\nconst kBody = Symbol('body')\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nclass RedirectHandler {\n constructor (dispatch, maxRedirections, opts, handler) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n util.validateHandler(handler, opts.method, opts.upgrade)\n\n this.dispatch = dispatch\n this.location = null\n this.abort = null\n this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy\n this.maxRedirections = maxRedirections\n this.handler = handler\n this.history = []\n this.redirectionLimitReached = false\n\n if (util.isStream(this.opts.body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (util.bodyLength(this.opts.body) === 0) {\n this.opts.body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof this.opts.body.readableDidRead !== 'boolean') {\n this.opts.body[kBodyUsed] = false\n EE.prototype.on.call(this.opts.body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n } else if (\n this.opts.body &&\n typeof this.opts.body !== 'string' &&\n !ArrayBuffer.isView(this.opts.body) &&\n util.isIterable(this.opts.body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n }\n }\n\n onConnect (abort) {\n this.abort = abort\n this.handler.onConnect(abort, { history: this.history })\n }\n\n onUpgrade (statusCode, headers, socket) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n\n onError (error) {\n this.handler.onError(error)\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body)\n ? null\n : parseLocation(statusCode, headers)\n\n if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) {\n if (this.request) {\n this.request.abort(new Error('max redirects'))\n }\n\n this.redirectionLimitReached = true\n this.abort(new Error('max redirects'))\n return\n }\n\n if (this.opts.origin) {\n this.history.push(new URL(this.opts.path, this.opts.origin))\n }\n\n if (!this.location) {\n return this.handler.onHeaders(statusCode, headers, resume, statusText)\n }\n\n const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))\n const path = search ? `${pathname}${search}` : pathname\n\n // Remove headers referring to the original URL.\n // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers.\n // https://tools.ietf.org/html/rfc7231#section-6.4\n this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin)\n this.opts.path = path\n this.opts.origin = origin\n this.opts.maxRedirections = 0\n this.opts.query = null\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.4\n // In case of HTTP 303, always replace method to be either HEAD or GET\n if (statusCode === 303 && this.opts.method !== 'HEAD') {\n this.opts.method = 'GET'\n this.opts.body = null\n }\n }\n\n onData (chunk) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response bodies.\n\n Redirection is used to serve the requested resource from another URL, so it is assumes that\n no body is generated (and thus can be ignored). Even though generating a body is not prohibited.\n\n For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually\n (which means it's optional and not mandated) contain just an hyperlink to the value of\n the Location response header, so the body can be ignored safely.\n\n For status 300, which is \"Multiple Choices\", the spec mentions both generating a Location\n response header AND a response body with the other possible location to follow.\n Since the spec explicitly chooses not to specify a format for such body and leave it to\n servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.\n */\n } else {\n return this.handler.onData(chunk)\n }\n }\n\n onComplete (trailers) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections\n and neither are useful if present.\n\n See comment on onData method above for more detailed information.\n */\n\n this.location = null\n this.abort = null\n\n this.dispatch(this.opts, this)\n } else {\n this.handler.onComplete(trailers)\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) {\n this.handler.onBodySent(chunk)\n }\n }\n}\n\nfunction parseLocation (statusCode, headers) {\n if (redirectableStatusCodes.indexOf(statusCode) === -1) {\n return null\n }\n\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') {\n return headers[i + 1]\n }\n }\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4.4\nfunction shouldRemoveHeader (header, removeContent, unknownOrigin) {\n if (header.length === 4) {\n return util.headerNameToString(header) === 'host'\n }\n if (removeContent && util.headerNameToString(header).startsWith('content-')) {\n return true\n }\n if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {\n const name = util.headerNameToString(header)\n return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'\n }\n return false\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4\nfunction cleanRequestHeaders (headers, removeContent, unknownOrigin) {\n const ret = []\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {\n ret.push(headers[i], headers[i + 1])\n }\n }\n } else if (headers && typeof headers === 'object') {\n for (const key of Object.keys(headers)) {\n if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {\n ret.push(key, headers[key])\n }\n }\n } else {\n assert(headers == null, 'headers must be an object or an array')\n }\n return ret\n}\n\nmodule.exports = RedirectHandler\n", "'use strict'\n\nconst RedirectHandler = require('../handler/redirect-handler')\n\nfunction createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n const { maxRedirections = defaultMaxRedirections } = opts\n\n if (!maxRedirections) {\n return dispatch(opts, handler)\n }\n\n const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler)\n opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting.\n return dispatch(opts, redirectHandler)\n }\n }\n}\n\nmodule.exports = createRedirectInterceptor\n", "// @ts-check\n\n'use strict'\n\nconst assert = require('node:assert')\nconst net = require('node:net')\nconst http = require('node:http')\nconst util = require('../core/util.js')\nconst { channels } = require('../core/diagnostics.js')\nconst Request = require('../core/request.js')\nconst DispatcherBase = require('./dispatcher-base')\nconst {\n InvalidArgumentError,\n InformationalError,\n ClientDestroyedError\n} = require('../core/errors.js')\nconst buildConnector = require('../core/connect.js')\nconst {\n kUrl,\n kServerName,\n kClient,\n kBusy,\n kConnect,\n kResuming,\n kRunning,\n kPending,\n kSize,\n kQueue,\n kConnected,\n kConnecting,\n kNeedDrain,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kConnector,\n kMaxRedirections,\n kMaxRequests,\n kCounter,\n kClose,\n kDestroy,\n kDispatch,\n kInterceptors,\n kLocalAddress,\n kMaxResponseSize,\n kOnError,\n kHTTPContext,\n kMaxConcurrentStreams,\n kResume\n} = require('../core/symbols.js')\nconst connectH1 = require('./client-h1.js')\nconst connectH2 = require('./client-h2.js')\nlet deprecatedInterceptorWarned = false\n\nconst kClosedResolve = Symbol('kClosedResolve')\n\nconst noop = () => {}\n\nfunction getPipelining (client) {\n return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1\n}\n\n/**\n * @type {import('../../types/client.js').default}\n */\nclass Client extends DispatcherBase {\n /**\n *\n * @param {string|URL} url\n * @param {import('../../types/client.js').Client.Options} options\n */\n constructor (url, {\n interceptors,\n maxHeaderSize,\n headersTimeout,\n socketTimeout,\n requestTimeout,\n connectTimeout,\n bodyTimeout,\n idleTimeout,\n keepAlive,\n keepAliveTimeout,\n maxKeepAliveTimeout,\n keepAliveMaxTimeout,\n keepAliveTimeoutThreshold,\n socketPath,\n pipelining,\n tls,\n strictContentLength,\n maxCachedSessions,\n maxRedirections,\n connect,\n maxRequestsPerClient,\n localAddress,\n maxResponseSize,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n // h2\n maxConcurrentStreams,\n allowH2,\n webSocket\n } = {}) {\n super({ webSocket })\n\n if (keepAlive !== undefined) {\n throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')\n }\n\n if (socketTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (requestTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (idleTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead')\n }\n\n if (maxKeepAliveTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead')\n }\n\n if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) {\n throw new InvalidArgumentError('invalid maxHeaderSize')\n }\n\n if (socketPath != null && typeof socketPath !== 'string') {\n throw new InvalidArgumentError('invalid socketPath')\n }\n\n if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {\n throw new InvalidArgumentError('invalid connectTimeout')\n }\n\n if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveTimeout')\n }\n\n if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveMaxTimeout')\n }\n\n if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {\n throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold')\n }\n\n if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('headersTimeout must be a positive integer or zero')\n }\n\n if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {\n throw new InvalidArgumentError('maxRequestsPerClient must be a positive number')\n }\n\n if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) {\n throw new InvalidArgumentError('localAddress must be valid string IP address')\n }\n\n if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {\n throw new InvalidArgumentError('maxResponseSize must be a positive number')\n }\n\n if (\n autoSelectFamilyAttemptTimeout != null &&\n (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)\n ) {\n throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number')\n }\n\n // h2\n if (allowH2 != null && typeof allowH2 !== 'boolean') {\n throw new InvalidArgumentError('allowH2 must be a valid boolean value')\n }\n\n if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) {\n throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n if (interceptors?.Client && Array.isArray(interceptors.Client)) {\n this[kInterceptors] = interceptors.Client\n if (!deprecatedInterceptorWarned) {\n deprecatedInterceptorWarned = true\n process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', {\n code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED'\n })\n }\n } else {\n this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]\n }\n\n this[kUrl] = util.parseOrigin(url)\n this[kConnector] = connect\n this[kPipelining] = pipelining != null ? pipelining : 1\n this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize\n this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout\n this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout\n this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold\n this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]\n this[kServerName] = null\n this[kLocalAddress] = localAddress != null ? localAddress : null\n this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\\r\\n`\n this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3\n this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3\n this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength\n this[kMaxRedirections] = maxRedirections\n this[kMaxRequests] = maxRequestsPerClient\n this[kClosedResolve] = null\n this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1\n this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server\n this[kHTTPContext] = null\n\n // kQueue is built up of 3 sections separated by\n // the kRunningIdx and kPendingIdx indices.\n // | complete | running | pending |\n // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length\n // kRunningIdx points to the first running element.\n // kPendingIdx points to the first pending element.\n // This implements a fast queue with an amortized\n // time of O(1).\n\n this[kQueue] = []\n this[kRunningIdx] = 0\n this[kPendingIdx] = 0\n\n this[kResume] = (sync) => resume(this, sync)\n this[kOnError] = (err) => onError(this, err)\n }\n\n get pipelining () {\n return this[kPipelining]\n }\n\n set pipelining (value) {\n this[kPipelining] = value\n this[kResume](true)\n }\n\n get [kPending] () {\n return this[kQueue].length - this[kPendingIdx]\n }\n\n get [kRunning] () {\n return this[kPendingIdx] - this[kRunningIdx]\n }\n\n get [kSize] () {\n return this[kQueue].length - this[kRunningIdx]\n }\n\n get [kConnected] () {\n return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed\n }\n\n get [kBusy] () {\n return Boolean(\n this[kHTTPContext]?.busy(null) ||\n (this[kSize] >= (getPipelining(this) || 1)) ||\n this[kPending] > 0\n )\n }\n\n /* istanbul ignore: only used for test */\n [kConnect] (cb) {\n connect(this)\n this.once('connect', cb)\n }\n\n [kDispatch] (opts, handler) {\n const origin = opts.origin || this[kUrl].origin\n const request = new Request(origin, opts, handler)\n\n this[kQueue].push(request)\n if (this[kResuming]) {\n // Do nothing.\n } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {\n // Wait a tick in case stream/iterator is ended in the same tick.\n this[kResuming] = 1\n queueMicrotask(() => resume(this))\n } else {\n this[kResume](true)\n }\n\n if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {\n this[kNeedDrain] = 2\n }\n\n return this[kNeedDrain] < 2\n }\n\n async [kClose] () {\n // TODO: for H2 we need to gracefully flush the remaining enqueued\n // request and close each stream.\n return new Promise((resolve) => {\n if (this[kSize]) {\n this[kClosedResolve] = resolve\n } else {\n resolve(null)\n }\n })\n }\n\n async [kDestroy] (err) {\n return new Promise((resolve) => {\n const requests = this[kQueue].splice(this[kPendingIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(this, request, err)\n }\n\n const callback = () => {\n if (this[kClosedResolve]) {\n // TODO (fix): Should we error here with ClientDestroyedError?\n this[kClosedResolve]()\n this[kClosedResolve] = null\n }\n resolve(null)\n }\n\n if (this[kHTTPContext]) {\n this[kHTTPContext].destroy(err, callback)\n this[kHTTPContext] = null\n } else {\n queueMicrotask(callback)\n }\n\n this[kResume]()\n })\n }\n}\n\nconst createRedirectInterceptor = require('../interceptor/redirect-interceptor.js')\n\nfunction onError (client, err) {\n if (\n client[kRunning] === 0 &&\n err.code !== 'UND_ERR_INFO' &&\n err.code !== 'UND_ERR_SOCKET'\n ) {\n // Error is not caused by running request and not a recoverable\n // socket error.\n\n assert(client[kPendingIdx] === client[kRunningIdx])\n\n const requests = client[kQueue].splice(client[kRunningIdx])\n\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n assert(client[kSize] === 0)\n }\n}\n\n/**\n * @param {Client} client\n * @returns\n */\nasync function connect (client) {\n assert(!client[kConnecting])\n assert(!client[kHTTPContext])\n\n let { host, hostname, protocol, port } = client[kUrl]\n\n // Resolve ipv6\n if (hostname[0] === '[') {\n const idx = hostname.indexOf(']')\n\n assert(idx !== -1)\n const ip = hostname.substring(1, idx)\n\n assert(net.isIP(ip))\n hostname = ip\n }\n\n client[kConnecting] = true\n\n if (channels.beforeConnect.hasSubscribers) {\n channels.beforeConnect.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector]\n })\n }\n\n try {\n const socket = await new Promise((resolve, reject) => {\n client[kConnector]({\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n }, (err, socket) => {\n if (err) {\n reject(err)\n } else {\n resolve(socket)\n }\n })\n })\n\n if (client.destroyed) {\n util.destroy(socket.on('error', noop), new ClientDestroyedError())\n return\n }\n\n assert(socket)\n\n try {\n client[kHTTPContext] = socket.alpnProtocol === 'h2'\n ? await connectH2(client, socket)\n : await connectH1(client, socket)\n } catch (err) {\n socket.destroy().on('error', noop)\n throw err\n }\n\n client[kConnecting] = false\n\n socket[kCounter] = 0\n socket[kMaxRequests] = client[kMaxRequests]\n socket[kClient] = client\n socket[kError] = null\n\n if (channels.connected.hasSubscribers) {\n channels.connected.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n socket\n })\n }\n client.emit('connect', client[kUrl], [client])\n } catch (err) {\n if (client.destroyed) {\n return\n }\n\n client[kConnecting] = false\n\n if (channels.connectError.hasSubscribers) {\n channels.connectError.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n error: err\n })\n }\n\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n assert(client[kRunning] === 0)\n while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {\n const request = client[kQueue][client[kPendingIdx]++]\n util.errorRequest(client, request, err)\n }\n } else {\n onError(client, err)\n }\n\n client.emit('connectionError', client[kUrl], [client], err)\n }\n\n client[kResume]()\n}\n\nfunction emitDrain (client) {\n client[kNeedDrain] = 0\n client.emit('drain', client[kUrl], [client])\n}\n\nfunction resume (client, sync) {\n if (client[kResuming] === 2) {\n return\n }\n\n client[kResuming] = 2\n\n _resume(client, sync)\n client[kResuming] = 0\n\n if (client[kRunningIdx] > 256) {\n client[kQueue].splice(0, client[kRunningIdx])\n client[kPendingIdx] -= client[kRunningIdx]\n client[kRunningIdx] = 0\n }\n}\n\nfunction _resume (client, sync) {\n while (true) {\n if (client.destroyed) {\n assert(client[kPending] === 0)\n return\n }\n\n if (client[kClosedResolve] && !client[kSize]) {\n client[kClosedResolve]()\n client[kClosedResolve] = null\n return\n }\n\n if (client[kHTTPContext]) {\n client[kHTTPContext].resume()\n }\n\n if (client[kBusy]) {\n client[kNeedDrain] = 2\n } else if (client[kNeedDrain] === 2) {\n if (sync) {\n client[kNeedDrain] = 1\n queueMicrotask(() => emitDrain(client))\n } else {\n emitDrain(client)\n }\n continue\n }\n\n if (client[kPending] === 0) {\n return\n }\n\n if (client[kRunning] >= (getPipelining(client) || 1)) {\n return\n }\n\n const request = client[kQueue][client[kPendingIdx]]\n\n if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) {\n if (client[kRunning] > 0) {\n return\n }\n\n client[kServerName] = request.servername\n client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => {\n client[kHTTPContext] = null\n resume(client)\n })\n }\n\n if (client[kConnecting]) {\n return\n }\n\n if (!client[kHTTPContext]) {\n connect(client)\n return\n }\n\n if (client[kHTTPContext].destroyed) {\n return\n }\n\n if (client[kHTTPContext].busy(request)) {\n return\n }\n\n if (!request.aborted && client[kHTTPContext].write(request)) {\n client[kPendingIdx]++\n } else {\n client[kQueue].splice(client[kPendingIdx], 1)\n }\n }\n}\n\nmodule.exports = Client\n", "/* eslint-disable */\n\n'use strict'\n\n// Extracted from node/lib/internal/fixed_queue.js\n\n// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.\nconst kSize = 2048;\nconst kMask = kSize - 1;\n\n// The FixedQueue is implemented as a singly-linked list of fixed-size\n// circular buffers. It looks something like this:\n//\n// head tail\n// | |\n// v v\n// +-----------+ <-----\\ +-----------+ <------\\ +-----------+\n// | [null] | \\----- | next | \\------- | next |\n// +-----------+ +-----------+ +-----------+\n// | item | <-- bottom | item | <-- bottom | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | bottom --> | item |\n// | item | | item | | item |\n// | ... | | ... | | ... |\n// | item | | item | | item |\n// | item | | item | | item |\n// | [empty] | <-- top | item | | item |\n// | [empty] | | item | | item |\n// | [empty] | | [empty] | <-- top top --> | [empty] |\n// +-----------+ +-----------+ +-----------+\n//\n// Or, if there is only one circular buffer, it looks something\n// like either of these:\n//\n// head tail head tail\n// | | | |\n// v v v v\n// +-----------+ +-----------+\n// | [null] | | [null] |\n// +-----------+ +-----------+\n// | [empty] | | item |\n// | [empty] | | item |\n// | item | <-- bottom top --> | [empty] |\n// | item | | [empty] |\n// | [empty] | <-- top bottom --> | item |\n// | [empty] | | item |\n// +-----------+ +-----------+\n//\n// Adding a value means moving `top` forward by one, removing means\n// moving `bottom` forward by one. After reaching the end, the queue\n// wraps around.\n//\n// When `top === bottom` the current queue is empty and when\n// `top + 1 === bottom` it's full. This wastes a single space of storage\n// but allows much quicker checks.\n\nclass FixedCircularBuffer {\n constructor() {\n this.bottom = 0;\n this.top = 0;\n this.list = new Array(kSize);\n this.next = null;\n }\n\n isEmpty() {\n return this.top === this.bottom;\n }\n\n isFull() {\n return ((this.top + 1) & kMask) === this.bottom;\n }\n\n push(data) {\n this.list[this.top] = data;\n this.top = (this.top + 1) & kMask;\n }\n\n shift() {\n const nextItem = this.list[this.bottom];\n if (nextItem === undefined)\n return null;\n this.list[this.bottom] = undefined;\n this.bottom = (this.bottom + 1) & kMask;\n return nextItem;\n }\n}\n\nmodule.exports = class FixedQueue {\n constructor() {\n this.head = this.tail = new FixedCircularBuffer();\n }\n\n isEmpty() {\n return this.head.isEmpty();\n }\n\n push(data) {\n if (this.head.isFull()) {\n // Head is full: Creates a new queue, sets the old queue's `.next` to it,\n // and sets it as the new main queue.\n this.head = this.head.next = new FixedCircularBuffer();\n }\n this.head.push(data);\n }\n\n shift() {\n const tail = this.tail;\n const next = tail.shift();\n if (tail.isEmpty() && tail.next !== null) {\n // If there is another queue, it forms the new tail.\n this.tail = tail.next;\n }\n return next;\n }\n};\n", "const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('../core/symbols')\nconst kPool = Symbol('pool')\n\nclass PoolStats {\n constructor (pool) {\n this[kPool] = pool\n }\n\n get connected () {\n return this[kPool][kConnected]\n }\n\n get free () {\n return this[kPool][kFree]\n }\n\n get pending () {\n return this[kPool][kPending]\n }\n\n get queued () {\n return this[kPool][kQueued]\n }\n\n get running () {\n return this[kPool][kRunning]\n }\n\n get size () {\n return this[kPool][kSize]\n }\n}\n\nmodule.exports = PoolStats\n", "'use strict'\n\nconst DispatcherBase = require('./dispatcher-base')\nconst FixedQueue = require('./fixed-queue')\nconst { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('../core/symbols')\nconst PoolStats = require('./pool-stats')\n\nconst kClients = Symbol('clients')\nconst kNeedDrain = Symbol('needDrain')\nconst kQueue = Symbol('queue')\nconst kClosedResolve = Symbol('closed resolve')\nconst kOnDrain = Symbol('onDrain')\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kGetDispatcher = Symbol('get dispatcher')\nconst kAddClient = Symbol('add client')\nconst kRemoveClient = Symbol('remove client')\nconst kStats = Symbol('stats')\n\nclass PoolBase extends DispatcherBase {\n constructor (opts) {\n super(opts)\n\n this[kQueue] = new FixedQueue()\n this[kClients] = []\n this[kQueued] = 0\n\n const pool = this\n\n this[kOnDrain] = function onDrain (origin, targets) {\n const queue = pool[kQueue]\n\n let needDrain = false\n\n while (!needDrain) {\n const item = queue.shift()\n if (!item) {\n break\n }\n pool[kQueued]--\n needDrain = !this.dispatch(item.opts, item.handler)\n }\n\n this[kNeedDrain] = needDrain\n\n if (!this[kNeedDrain] && pool[kNeedDrain]) {\n pool[kNeedDrain] = false\n pool.emit('drain', origin, [pool, ...targets])\n }\n\n if (pool[kClosedResolve] && queue.isEmpty()) {\n Promise\n .all(pool[kClients].map(c => c.close()))\n .then(pool[kClosedResolve])\n }\n }\n\n this[kOnConnect] = (origin, targets) => {\n pool.emit('connect', origin, [pool, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n pool.emit('disconnect', origin, [pool, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n pool.emit('connectionError', origin, [pool, ...targets], err)\n }\n\n this[kStats] = new PoolStats(this)\n }\n\n get [kBusy] () {\n return this[kNeedDrain]\n }\n\n get [kConnected] () {\n return this[kClients].filter(client => client[kConnected]).length\n }\n\n get [kFree] () {\n return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length\n }\n\n get [kPending] () {\n let ret = this[kQueued]\n for (const { [kPending]: pending } of this[kClients]) {\n ret += pending\n }\n return ret\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { [kRunning]: running } of this[kClients]) {\n ret += running\n }\n return ret\n }\n\n get [kSize] () {\n let ret = this[kQueued]\n for (const { [kSize]: size } of this[kClients]) {\n ret += size\n }\n return ret\n }\n\n get stats () {\n return this[kStats]\n }\n\n async [kClose] () {\n if (this[kQueue].isEmpty()) {\n await Promise.all(this[kClients].map(c => c.close()))\n } else {\n await new Promise((resolve) => {\n this[kClosedResolve] = resolve\n })\n }\n }\n\n async [kDestroy] (err) {\n while (true) {\n const item = this[kQueue].shift()\n if (!item) {\n break\n }\n item.handler.onError(err)\n }\n\n await Promise.all(this[kClients].map(c => c.destroy(err)))\n }\n\n [kDispatch] (opts, handler) {\n const dispatcher = this[kGetDispatcher]()\n\n if (!dispatcher) {\n this[kNeedDrain] = true\n this[kQueue].push({ opts, handler })\n this[kQueued]++\n } else if (!dispatcher.dispatch(opts, handler)) {\n dispatcher[kNeedDrain] = true\n this[kNeedDrain] = !this[kGetDispatcher]()\n }\n\n return !this[kNeedDrain]\n }\n\n [kAddClient] (client) {\n client\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].push(client)\n\n if (this[kNeedDrain]) {\n queueMicrotask(() => {\n if (this[kNeedDrain]) {\n this[kOnDrain](client[kUrl], [this, client])\n }\n })\n }\n\n return this\n }\n\n [kRemoveClient] (client) {\n client.close(() => {\n const idx = this[kClients].indexOf(client)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n })\n\n this[kNeedDrain] = this[kClients].some(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n }\n}\n\nmodule.exports = {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n}\n", "'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { kUrl, kInterceptors } = require('../core/symbols')\nconst buildConnector = require('../core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass Pool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n ...options\n } = {}) {\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n super(options)\n\n this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool)\n ? options.interceptors.Pool\n : []\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2 }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n\n this.on('connectionError', (origin, targets, error) => {\n // If a connection error occurs, we remove the client from the pool,\n // and emit a connectionError event. They will not be re-used.\n // Fixes https://github.com/nodejs/undici/issues/3895\n for (const target of targets) {\n // Do not use kRemoveClient here, as it will close the client,\n // but the client cannot be closed in this state.\n const idx = this[kClients].indexOf(target)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n }\n })\n }\n\n [kGetDispatcher] () {\n for (const client of this[kClients]) {\n if (!client[kNeedDrain]) {\n return client\n }\n }\n\n if (!this[kConnections] || this[kClients].length < this[kConnections]) {\n const dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n return dispatcher\n }\n }\n}\n\nmodule.exports = Pool\n", "'use strict'\n\nconst {\n BalancedPoolMissingUpstreamError,\n InvalidArgumentError\n} = require('../core/errors')\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Pool = require('./pool')\nconst { kUrl, kInterceptors } = require('../core/symbols')\nconst { parseOrigin } = require('../core/util')\nconst kFactory = Symbol('factory')\n\nconst kOptions = Symbol('options')\nconst kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')\nconst kCurrentWeight = Symbol('kCurrentWeight')\nconst kIndex = Symbol('kIndex')\nconst kWeight = Symbol('kWeight')\nconst kMaxWeightPerServer = Symbol('kMaxWeightPerServer')\nconst kErrorPenalty = Symbol('kErrorPenalty')\n\n/**\n * Calculate the greatest common divisor of two numbers by\n * using the Euclidean algorithm.\n *\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction getGreatestCommonDivisor (a, b) {\n if (a === 0) return b\n\n while (b !== 0) {\n const t = b\n b = a % b\n a = t\n }\n return a\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass BalancedPool extends PoolBase {\n constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {\n super()\n\n this[kOptions] = opts\n this[kIndex] = -1\n this[kCurrentWeight] = 0\n\n this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100\n this[kErrorPenalty] = this[kOptions].errorPenalty || 15\n\n if (!Array.isArray(upstreams)) {\n upstreams = [upstreams]\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool)\n ? opts.interceptors.BalancedPool\n : []\n this[kFactory] = factory\n\n for (const upstream of upstreams) {\n this.addUpstream(upstream)\n }\n this._updateBalancedPoolStats()\n }\n\n addUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n if (this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))) {\n return this\n }\n const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]))\n\n this[kAddClient](pool)\n pool.on('connect', () => {\n pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])\n })\n\n pool.on('connectionError', () => {\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n })\n\n pool.on('disconnect', (...args) => {\n const err = args[2]\n if (err && err.code === 'UND_ERR_SOCKET') {\n // decrease the weight of the pool.\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n }\n })\n\n for (const client of this[kClients]) {\n client[kWeight] = this[kMaxWeightPerServer]\n }\n\n this._updateBalancedPoolStats()\n\n return this\n }\n\n _updateBalancedPoolStats () {\n let result = 0\n for (let i = 0; i < this[kClients].length; i++) {\n result = getGreatestCommonDivisor(this[kClients][i][kWeight], result)\n }\n\n this[kGreatestCommonDivisor] = result\n }\n\n removeUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n const pool = this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n\n if (pool) {\n this[kRemoveClient](pool)\n }\n\n return this\n }\n\n get upstreams () {\n return this[kClients]\n .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)\n .map((p) => p[kUrl].origin)\n }\n\n [kGetDispatcher] () {\n // We validate that pools is greater than 0,\n // otherwise we would have to wait until an upstream\n // is added, which might never happen.\n if (this[kClients].length === 0) {\n throw new BalancedPoolMissingUpstreamError()\n }\n\n const dispatcher = this[kClients].find(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n\n if (!dispatcher) {\n return\n }\n\n const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)\n\n if (allClientsBusy) {\n return\n }\n\n let counter = 0\n\n let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])\n\n while (counter++ < this[kClients].length) {\n this[kIndex] = (this[kIndex] + 1) % this[kClients].length\n const pool = this[kClients][this[kIndex]]\n\n // find pool index with the largest weight\n if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {\n maxWeightIndex = this[kIndex]\n }\n\n // decrease the current weight every `this[kClients].length`.\n if (this[kIndex] === 0) {\n // Set the current weight to the next lower weight.\n this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]\n\n if (this[kCurrentWeight] <= 0) {\n this[kCurrentWeight] = this[kMaxWeightPerServer]\n }\n }\n if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {\n return pool\n }\n }\n\n this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]\n this[kIndex] = maxWeightIndex\n return this[kClients][maxWeightIndex]\n }\n}\n\nmodule.exports = BalancedPool\n", "'use strict'\n\nconst { InvalidArgumentError } = require('../core/errors')\nconst { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require('../core/symbols')\nconst DispatcherBase = require('./dispatcher-base')\nconst Pool = require('./pool')\nconst Client = require('./client')\nconst util = require('../core/util')\nconst createRedirectInterceptor = require('../interceptor/redirect-interceptor')\n\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kMaxRedirections = Symbol('maxRedirections')\nconst kOnDrain = Symbol('onDrain')\nconst kFactory = Symbol('factory')\nconst kOptions = Symbol('options')\n\nfunction defaultFactory (origin, opts) {\n return opts && opts.connections === 1\n ? new Client(origin, opts)\n : new Pool(origin, opts)\n}\n\nclass Agent extends DispatcherBase {\n constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (!Number.isInteger(maxRedirections) || maxRedirections < 0) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n super(options)\n\n if (connect && typeof connect !== 'function') {\n connect = { ...connect }\n }\n\n this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent)\n ? options.interceptors.Agent\n : [createRedirectInterceptor({ maxRedirections })]\n\n this[kOptions] = { ...util.deepClone(options), connect }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kMaxRedirections] = maxRedirections\n this[kFactory] = factory\n this[kClients] = new Map()\n\n this[kOnDrain] = (origin, targets) => {\n this.emit('drain', origin, [this, ...targets])\n }\n\n this[kOnConnect] = (origin, targets) => {\n this.emit('connect', origin, [this, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n this.emit('disconnect', origin, [this, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n this.emit('connectionError', origin, [this, ...targets], err)\n }\n }\n\n get [kRunning] () {\n let ret = 0\n for (const client of this[kClients].values()) {\n ret += client[kRunning]\n }\n return ret\n }\n\n [kDispatch] (opts, handler) {\n let key\n if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {\n key = String(opts.origin)\n } else {\n throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')\n }\n\n let dispatcher = this[kClients].get(key)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](opts.origin, this[kOptions])\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n // This introduces a tiny memory leak, as dispatchers are never removed from the map.\n // TODO(mcollina): remove te timer when the client/pool do not have any more\n // active connections.\n this[kClients].set(key, dispatcher)\n }\n\n return dispatcher.dispatch(opts, handler)\n }\n\n async [kClose] () {\n const closePromises = []\n for (const client of this[kClients].values()) {\n closePromises.push(client.close())\n }\n this[kClients].clear()\n\n await Promise.all(closePromises)\n }\n\n async [kDestroy] (err) {\n const destroyPromises = []\n for (const client of this[kClients].values()) {\n destroyPromises.push(client.destroy(err))\n }\n this[kClients].clear()\n\n await Promise.all(destroyPromises)\n }\n}\n\nmodule.exports = Agent\n", "'use strict'\n\nconst { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require('../core/symbols')\nconst { URL } = require('node:url')\nconst Agent = require('./agent')\nconst Pool = require('./pool')\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require('../core/errors')\nconst buildConnector = require('../core/connect')\nconst Client = require('./client')\n\nconst kAgent = Symbol('proxy agent')\nconst kClient = Symbol('proxy client')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kRequestTls = Symbol('request tls settings')\nconst kProxyTls = Symbol('proxy tls settings')\nconst kConnectEndpoint = Symbol('connect endpoint function')\nconst kTunnelProxy = Symbol('tunnel proxy')\n\nfunction defaultProtocolPort (protocol) {\n return protocol === 'https:' ? 443 : 80\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nconst noop = () => {}\n\nfunction defaultAgentFactory (origin, opts) {\n if (opts.connections === 1) {\n return new Client(origin, opts)\n }\n return new Pool(origin, opts)\n}\n\nclass Http1ProxyWrapper extends DispatcherBase {\n #client\n\n constructor (proxyUrl, { headers = {}, connect, factory }) {\n super()\n if (!proxyUrl) {\n throw new InvalidArgumentError('Proxy URL is mandatory')\n }\n\n this[kProxyHeaders] = headers\n if (factory) {\n this.#client = factory(proxyUrl, { connect })\n } else {\n this.#client = new Client(proxyUrl, { connect })\n }\n }\n\n [kDispatch] (opts, handler) {\n const onHeaders = handler.onHeaders\n handler.onHeaders = function (statusCode, data, resume) {\n if (statusCode === 407) {\n if (typeof handler.onError === 'function') {\n handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)'))\n }\n return\n }\n if (onHeaders) onHeaders.call(this, statusCode, data, resume)\n }\n\n // Rewrite request as an HTTP1 Proxy request, without tunneling.\n const {\n origin,\n path = '/',\n headers = {}\n } = opts\n\n opts.path = origin + path\n\n if (!('host' in headers) && !('Host' in headers)) {\n const { host } = new URL(origin)\n headers.host = host\n }\n opts.headers = { ...this[kProxyHeaders], ...headers }\n\n return this.#client[kDispatch](opts, handler)\n }\n\n async [kClose] () {\n return this.#client.close()\n }\n\n async [kDestroy] (err) {\n return this.#client.destroy(err)\n }\n}\n\nclass ProxyAgent extends DispatcherBase {\n constructor (opts) {\n super()\n\n if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) {\n throw new InvalidArgumentError('Proxy uri is mandatory')\n }\n\n const { clientFactory = defaultFactory } = opts\n if (typeof clientFactory !== 'function') {\n throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')\n }\n\n const { proxyTunnel = true } = opts\n\n const url = this.#getUrl(opts)\n const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url\n\n this[kProxy] = { uri: href, protocol }\n this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent)\n ? opts.interceptors.ProxyAgent\n : []\n this[kRequestTls] = opts.requestTls\n this[kProxyTls] = opts.proxyTls\n this[kProxyHeaders] = opts.headers || {}\n this[kTunnelProxy] = proxyTunnel\n\n if (opts.auth && opts.token) {\n throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')\n } else if (opts.auth) {\n /* @deprecated in favour of opts.token */\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`\n } else if (opts.token) {\n this[kProxyHeaders]['proxy-authorization'] = opts.token\n } else if (username && password) {\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`\n }\n\n const connect = buildConnector({ ...opts.proxyTls })\n this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })\n\n const agentFactory = opts.factory || defaultAgentFactory\n const factory = (origin, options) => {\n const { protocol } = new URL(origin)\n if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') {\n return new Http1ProxyWrapper(this[kProxy].uri, {\n headers: this[kProxyHeaders],\n connect,\n factory: agentFactory\n })\n }\n return agentFactory(origin, options)\n }\n this[kClient] = clientFactory(url, { connect })\n this[kAgent] = new Agent({\n ...opts,\n factory,\n connect: async (opts, callback) => {\n let requestedPath = opts.host\n if (!opts.port) {\n requestedPath += `:${defaultProtocolPort(opts.protocol)}`\n }\n try {\n const { socket, statusCode } = await this[kClient].connect({\n origin,\n port,\n path: requestedPath,\n signal: opts.signal,\n headers: {\n ...this[kProxyHeaders],\n host: opts.host\n },\n servername: this[kProxyTls]?.servername || proxyHostname\n })\n if (statusCode !== 200) {\n socket.on('error', noop).destroy()\n callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`))\n }\n if (opts.protocol !== 'https:') {\n callback(null, socket)\n return\n }\n let servername\n if (this[kRequestTls]) {\n servername = this[kRequestTls].servername\n } else {\n servername = opts.servername\n }\n this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)\n } catch (err) {\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n // Throw a custom error to avoid loop in client.js#connect\n callback(new SecureProxyConnectionError(err))\n } else {\n callback(err)\n }\n }\n }\n })\n }\n\n dispatch (opts, handler) {\n const headers = buildHeaders(opts.headers)\n throwIfProxyAuthIsSent(headers)\n\n if (headers && !('host' in headers) && !('Host' in headers)) {\n const { host } = new URL(opts.origin)\n headers.host = host\n }\n\n return this[kAgent].dispatch(\n {\n ...opts,\n headers\n },\n handler\n )\n }\n\n /**\n * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts\n * @returns {URL}\n */\n #getUrl (opts) {\n if (typeof opts === 'string') {\n return new URL(opts)\n } else if (opts instanceof URL) {\n return opts\n } else {\n return new URL(opts.uri)\n }\n }\n\n async [kClose] () {\n await this[kAgent].close()\n await this[kClient].close()\n }\n\n async [kDestroy] () {\n await this[kAgent].destroy()\n await this[kClient].destroy()\n }\n}\n\n/**\n * @param {string[] | Record} headers\n * @returns {Record}\n */\nfunction buildHeaders (headers) {\n // When using undici.fetch, the headers list is stored\n // as an array.\n if (Array.isArray(headers)) {\n /** @type {Record} */\n const headersPair = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n headersPair[headers[i]] = headers[i + 1]\n }\n\n return headersPair\n }\n\n return headers\n}\n\n/**\n * @param {Record} headers\n *\n * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers\n * Nevertheless, it was changed and to avoid a security vulnerability by end users\n * this check was created.\n * It should be removed in the next major version for performance reasons\n */\nfunction throwIfProxyAuthIsSent (headers) {\n const existProxyAuth = headers && Object.keys(headers)\n .find((key) => key.toLowerCase() === 'proxy-authorization')\n if (existProxyAuth) {\n throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')\n }\n}\n\nmodule.exports = ProxyAgent\n", "'use strict'\n\nconst DispatcherBase = require('./dispatcher-base')\nconst { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require('../core/symbols')\nconst ProxyAgent = require('./proxy-agent')\nconst Agent = require('./agent')\n\nconst DEFAULT_PORTS = {\n 'http:': 80,\n 'https:': 443\n}\n\nlet experimentalWarned = false\n\nclass EnvHttpProxyAgent extends DispatcherBase {\n #noProxyValue = null\n #noProxyEntries = null\n #opts = null\n\n constructor (opts = {}) {\n super()\n this.#opts = opts\n\n if (!experimentalWarned) {\n experimentalWarned = true\n process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', {\n code: 'UNDICI-EHPA'\n })\n }\n\n const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts\n\n this[kNoProxyAgent] = new Agent(agentOpts)\n\n const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY\n if (HTTP_PROXY) {\n this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY })\n } else {\n this[kHttpProxyAgent] = this[kNoProxyAgent]\n }\n\n const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY\n if (HTTPS_PROXY) {\n this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY })\n } else {\n this[kHttpsProxyAgent] = this[kHttpProxyAgent]\n }\n\n this.#parseNoProxy()\n }\n\n [kDispatch] (opts, handler) {\n const url = new URL(opts.origin)\n const agent = this.#getProxyAgentForUrl(url)\n return agent.dispatch(opts, handler)\n }\n\n async [kClose] () {\n await this[kNoProxyAgent].close()\n if (!this[kHttpProxyAgent][kClosed]) {\n await this[kHttpProxyAgent].close()\n }\n if (!this[kHttpsProxyAgent][kClosed]) {\n await this[kHttpsProxyAgent].close()\n }\n }\n\n async [kDestroy] (err) {\n await this[kNoProxyAgent].destroy(err)\n if (!this[kHttpProxyAgent][kDestroyed]) {\n await this[kHttpProxyAgent].destroy(err)\n }\n if (!this[kHttpsProxyAgent][kDestroyed]) {\n await this[kHttpsProxyAgent].destroy(err)\n }\n }\n\n #getProxyAgentForUrl (url) {\n let { protocol, host: hostname, port } = url\n\n // Stripping ports in this way instead of using parsedUrl.hostname to make\n // sure that the brackets around IPv6 addresses are kept.\n hostname = hostname.replace(/:\\d*$/, '').toLowerCase()\n port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0\n if (!this.#shouldProxy(hostname, port)) {\n return this[kNoProxyAgent]\n }\n if (protocol === 'https:') {\n return this[kHttpsProxyAgent]\n }\n return this[kHttpProxyAgent]\n }\n\n #shouldProxy (hostname, port) {\n if (this.#noProxyChanged) {\n this.#parseNoProxy()\n }\n\n if (this.#noProxyEntries.length === 0) {\n return true // Always proxy if NO_PROXY is not set or empty.\n }\n if (this.#noProxyValue === '*') {\n return false // Never proxy if wildcard is set.\n }\n\n for (let i = 0; i < this.#noProxyEntries.length; i++) {\n const entry = this.#noProxyEntries[i]\n if (entry.port && entry.port !== port) {\n continue // Skip if ports don't match.\n }\n if (!/^[.*]/.test(entry.hostname)) {\n // No wildcards, so don't proxy only if there is not an exact match.\n if (hostname === entry.hostname) {\n return false\n }\n } else {\n // Don't proxy if the hostname ends with the no_proxy host.\n if (hostname.endsWith(entry.hostname.replace(/^\\*/, ''))) {\n return false\n }\n }\n }\n\n return true\n }\n\n #parseNoProxy () {\n const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv\n const noProxySplit = noProxyValue.split(/[,\\s]/)\n const noProxyEntries = []\n\n for (let i = 0; i < noProxySplit.length; i++) {\n const entry = noProxySplit[i]\n if (!entry) {\n continue\n }\n const parsed = entry.match(/^(.+):(\\d+)$/)\n noProxyEntries.push({\n hostname: (parsed ? parsed[1] : entry).toLowerCase(),\n port: parsed ? Number.parseInt(parsed[2], 10) : 0\n })\n }\n\n this.#noProxyValue = noProxyValue\n this.#noProxyEntries = noProxyEntries\n }\n\n get #noProxyChanged () {\n if (this.#opts.noProxy !== undefined) {\n return false\n }\n return this.#noProxyValue !== this.#noProxyEnv\n }\n\n get #noProxyEnv () {\n return process.env.no_proxy ?? process.env.NO_PROXY ?? ''\n }\n}\n\nmodule.exports = EnvHttpProxyAgent\n", "'use strict'\nconst assert = require('node:assert')\n\nconst { kRetryHandlerDefaultRetry } = require('../core/symbols')\nconst { RequestRetryError } = require('../core/errors')\nconst {\n isDisturbed,\n parseHeaders,\n parseRangeHeader,\n wrapRequestBody\n} = require('../core/util')\n\nfunction calculateRetryAfterHeader (retryAfter) {\n const current = Date.now()\n return new Date(retryAfter).getTime() - current\n}\n\nclass RetryHandler {\n constructor (opts, handlers) {\n const { retryOptions, ...dispatchOpts } = opts\n const {\n // Retry scoped\n retry: retryFn,\n maxRetries,\n maxTimeout,\n minTimeout,\n timeoutFactor,\n // Response scoped\n methods,\n errorCodes,\n retryAfter,\n statusCodes\n } = retryOptions ?? {}\n\n this.dispatch = handlers.dispatch\n this.handler = handlers.handler\n this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }\n this.abort = null\n this.aborted = false\n this.retryOpts = {\n retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry],\n retryAfter: retryAfter ?? true,\n maxTimeout: maxTimeout ?? 30 * 1000, // 30s,\n minTimeout: minTimeout ?? 500, // .5s\n timeoutFactor: timeoutFactor ?? 2,\n maxRetries: maxRetries ?? 5,\n // What errors we should retry\n methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],\n // Indicates which errors to retry\n statusCodes: statusCodes ?? [500, 502, 503, 504, 429],\n // List of errors to retry\n errorCodes: errorCodes ?? [\n 'ECONNRESET',\n 'ECONNREFUSED',\n 'ENOTFOUND',\n 'ENETDOWN',\n 'ENETUNREACH',\n 'EHOSTDOWN',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'UND_ERR_SOCKET'\n ]\n }\n\n this.retryCount = 0\n this.retryCountCheckpoint = 0\n this.start = 0\n this.end = null\n this.etag = null\n this.resume = null\n\n // Handle possible onConnect duplication\n this.handler.onConnect(reason => {\n this.aborted = true\n if (this.abort) {\n this.abort(reason)\n } else {\n this.reason = reason\n }\n })\n }\n\n onRequestSent () {\n if (this.handler.onRequestSent) {\n this.handler.onRequestSent()\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n if (this.handler.onUpgrade) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n }\n\n onConnect (abort) {\n if (this.aborted) {\n abort(this.reason)\n } else {\n this.abort = abort\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) return this.handler.onBodySent(chunk)\n }\n\n static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {\n const { statusCode, code, headers } = err\n const { method, retryOptions } = opts\n const {\n maxRetries,\n minTimeout,\n maxTimeout,\n timeoutFactor,\n statusCodes,\n errorCodes,\n methods\n } = retryOptions\n const { counter } = state\n\n // Any code that is not a Undici's originated and allowed to retry\n if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) {\n cb(err)\n return\n }\n\n // If a set of method are provided and the current method is not in the list\n if (Array.isArray(methods) && !methods.includes(method)) {\n cb(err)\n return\n }\n\n // If a set of status code are provided and the current status code is not in the list\n if (\n statusCode != null &&\n Array.isArray(statusCodes) &&\n !statusCodes.includes(statusCode)\n ) {\n cb(err)\n return\n }\n\n // If we reached the max number of retries\n if (counter > maxRetries) {\n cb(err)\n return\n }\n\n let retryAfterHeader = headers?.['retry-after']\n if (retryAfterHeader) {\n retryAfterHeader = Number(retryAfterHeader)\n retryAfterHeader = Number.isNaN(retryAfterHeader)\n ? calculateRetryAfterHeader(retryAfterHeader)\n : retryAfterHeader * 1e3 // Retry-After is in seconds\n }\n\n const retryTimeout =\n retryAfterHeader > 0\n ? Math.min(retryAfterHeader, maxTimeout)\n : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout)\n\n setTimeout(() => cb(null), retryTimeout)\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const headers = parseHeaders(rawHeaders)\n\n this.retryCount += 1\n\n if (statusCode >= 300) {\n if (this.retryOpts.statusCodes.includes(statusCode) === false) {\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n } else {\n this.abort(\n new RequestRetryError('Request failed', statusCode, {\n headers,\n data: {\n count: this.retryCount\n }\n })\n )\n return false\n }\n }\n\n // Checkpoint for resume from where we left it\n if (this.resume != null) {\n this.resume = null\n\n // Only Partial Content 206 supposed to provide Content-Range,\n // any other status code that partially consumed the payload\n // should not be retry because it would result in downstream\n // wrongly concatanete multiple responses.\n if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) {\n this.abort(\n new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n )\n return false\n }\n\n const contentRange = parseRangeHeader(headers['content-range'])\n // If no content range\n if (!contentRange) {\n this.abort(\n new RequestRetryError('Content-Range mismatch', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n )\n return false\n }\n\n // Let's start with a weak etag check\n if (this.etag != null && this.etag !== headers.etag) {\n this.abort(\n new RequestRetryError('ETag mismatch', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n )\n return false\n }\n\n const { start, size, end = size - 1 } = contentRange\n\n assert(this.start === start, 'content-range mismatch')\n assert(this.end == null || this.end === end, 'content-range mismatch')\n\n this.resume = resume\n return true\n }\n\n if (this.end == null) {\n if (statusCode === 206) {\n // First time we receive 206\n const range = parseRangeHeader(headers['content-range'])\n\n if (range == null) {\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const { start, size, end = size - 1 } = range\n assert(\n start != null && Number.isFinite(start),\n 'content-range mismatch'\n )\n assert(end != null && Number.isFinite(end), 'invalid content-length')\n\n this.start = start\n this.end = end\n }\n\n // We make our best to checkpoint the body for further range headers\n if (this.end == null) {\n const contentLength = headers['content-length']\n this.end = contentLength != null ? Number(contentLength) - 1 : null\n }\n\n assert(Number.isFinite(this.start))\n assert(\n this.end == null || Number.isFinite(this.end),\n 'invalid content-length'\n )\n\n this.resume = resume\n this.etag = headers.etag != null ? headers.etag : null\n\n // Weak etags are not useful for comparison nor cache\n // for instance not safe to assume if the response is byte-per-byte\n // equal\n if (this.etag != null && this.etag.startsWith('W/')) {\n this.etag = null\n }\n\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const err = new RequestRetryError('Request failed', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n\n this.abort(err)\n\n return false\n }\n\n onData (chunk) {\n this.start += chunk.length\n\n return this.handler.onData(chunk)\n }\n\n onComplete (rawTrailers) {\n this.retryCount = 0\n return this.handler.onComplete(rawTrailers)\n }\n\n onError (err) {\n if (this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n // We reconcile in case of a mix between network errors\n // and server error response\n if (this.retryCount - this.retryCountCheckpoint > 0) {\n // We count the difference between the last checkpoint and the current retry count\n this.retryCount =\n this.retryCountCheckpoint +\n (this.retryCount - this.retryCountCheckpoint)\n } else {\n this.retryCount += 1\n }\n\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n onRetry.bind(this)\n )\n\n function onRetry (err) {\n if (err != null || this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n if (this.start !== 0) {\n const headers = { range: `bytes=${this.start}-${this.end ?? ''}` }\n\n // Weak etag check - weak etags will make comparison algorithms never match\n if (this.etag != null) {\n headers['if-match'] = this.etag\n }\n\n this.opts = {\n ...this.opts,\n headers: {\n ...this.opts.headers,\n ...headers\n }\n }\n }\n\n try {\n this.retryCountCheckpoint = this.retryCount\n this.dispatch(this.opts, this)\n } catch (err) {\n this.handler.onError(err)\n }\n }\n }\n}\n\nmodule.exports = RetryHandler\n", "'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst RetryHandler = require('../handler/retry-handler')\n\nclass RetryAgent extends Dispatcher {\n #agent = null\n #options = null\n constructor (agent, options = {}) {\n super(options)\n this.#agent = agent\n this.#options = options\n }\n\n dispatch (opts, handler) {\n const retry = new RetryHandler({\n ...opts,\n retryOptions: this.#options\n }, {\n dispatch: this.#agent.dispatch.bind(this.#agent),\n handler\n })\n return this.#agent.dispatch(opts, retry)\n }\n\n close () {\n return this.#agent.close()\n }\n\n destroy () {\n return this.#agent.destroy()\n }\n}\n\nmodule.exports = RetryAgent\n", "// Ported from https://github.com/nodejs/undici/pull/907\n\n'use strict'\n\nconst assert = require('node:assert')\nconst { Readable } = require('node:stream')\nconst { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require('../core/errors')\nconst util = require('../core/util')\nconst { ReadableStreamFrom } = require('../core/util')\n\nconst kConsume = Symbol('kConsume')\nconst kReading = Symbol('kReading')\nconst kBody = Symbol('kBody')\nconst kAbort = Symbol('kAbort')\nconst kContentType = Symbol('kContentType')\nconst kContentLength = Symbol('kContentLength')\n\nconst noop = () => {}\n\nclass BodyReadable extends Readable {\n constructor ({\n resume,\n abort,\n contentType = '',\n contentLength,\n highWaterMark = 64 * 1024 // Same as nodejs fs streams.\n }) {\n super({\n autoDestroy: true,\n read: resume,\n highWaterMark\n })\n\n this._readableState.dataEmitted = false\n\n this[kAbort] = abort\n this[kConsume] = null\n this[kBody] = null\n this[kContentType] = contentType\n this[kContentLength] = contentLength\n\n // Is stream being consumed through Readable API?\n // This is an optimization so that we avoid checking\n // for 'data' and 'readable' listeners in the hot path\n // inside push().\n this[kReading] = false\n }\n\n destroy (err) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (err) {\n this[kAbort]()\n }\n\n return super.destroy(err)\n }\n\n _destroy (err, callback) {\n // Workaround for Node \"bug\". If the stream is destroyed in same\n // tick as it is created, then a user who is waiting for a\n // promise (i.e micro tick) for installing a 'error' listener will\n // never get a chance and will always encounter an unhandled exception.\n if (!this[kReading]) {\n setImmediate(() => {\n callback(err)\n })\n } else {\n callback(err)\n }\n }\n\n on (ev, ...args) {\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = true\n }\n return super.on(ev, ...args)\n }\n\n addListener (ev, ...args) {\n return this.on(ev, ...args)\n }\n\n off (ev, ...args) {\n const ret = super.off(ev, ...args)\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = (\n this.listenerCount('data') > 0 ||\n this.listenerCount('readable') > 0\n )\n }\n return ret\n }\n\n removeListener (ev, ...args) {\n return this.off(ev, ...args)\n }\n\n push (chunk) {\n if (this[kConsume] && chunk !== null) {\n consumePush(this[kConsume], chunk)\n return this[kReading] ? super.push(chunk) : true\n }\n return super.push(chunk)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-text\n async text () {\n return consume(this, 'text')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-json\n async json () {\n return consume(this, 'json')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-blob\n async blob () {\n return consume(this, 'blob')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-bytes\n async bytes () {\n return consume(this, 'bytes')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-arraybuffer\n async arrayBuffer () {\n return consume(this, 'arrayBuffer')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-formdata\n async formData () {\n // TODO: Implement.\n throw new NotSupportedError()\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-bodyused\n get bodyUsed () {\n return util.isDisturbed(this)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-body\n get body () {\n if (!this[kBody]) {\n this[kBody] = ReadableStreamFrom(this)\n if (this[kConsume]) {\n // TODO: Is this the best way to force a lock?\n this[kBody].getReader() // Ensure stream is locked.\n assert(this[kBody].locked)\n }\n }\n return this[kBody]\n }\n\n async dump (opts) {\n let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024\n const signal = opts?.signal\n\n if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {\n throw new InvalidArgumentError('signal must be an AbortSignal')\n }\n\n signal?.throwIfAborted()\n\n if (this._readableState.closeEmitted) {\n return null\n }\n\n return await new Promise((resolve, reject) => {\n if (this[kContentLength] > limit) {\n this.destroy(new AbortError())\n }\n\n const onAbort = () => {\n this.destroy(signal.reason ?? new AbortError())\n }\n signal?.addEventListener('abort', onAbort)\n\n this\n .on('close', function () {\n signal?.removeEventListener('abort', onAbort)\n if (signal?.aborted) {\n reject(signal.reason ?? new AbortError())\n } else {\n resolve(null)\n }\n })\n .on('error', noop)\n .on('data', function (chunk) {\n limit -= chunk.length\n if (limit <= 0) {\n this.destroy()\n }\n })\n .resume()\n })\n }\n}\n\n// https://streams.spec.whatwg.org/#readablestream-locked\nfunction isLocked (self) {\n // Consume is an implicit lock.\n return (self[kBody] && self[kBody].locked === true) || self[kConsume]\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction isUnusable (self) {\n return util.isDisturbed(self) || isLocked(self)\n}\n\nasync function consume (stream, type) {\n assert(!stream[kConsume])\n\n return new Promise((resolve, reject) => {\n if (isUnusable(stream)) {\n const rState = stream._readableState\n if (rState.destroyed && rState.closeEmitted === false) {\n stream\n .on('error', err => {\n reject(err)\n })\n .on('close', () => {\n reject(new TypeError('unusable'))\n })\n } else {\n reject(rState.errored ?? new TypeError('unusable'))\n }\n } else {\n queueMicrotask(() => {\n stream[kConsume] = {\n type,\n stream,\n resolve,\n reject,\n length: 0,\n body: []\n }\n\n stream\n .on('error', function (err) {\n consumeFinish(this[kConsume], err)\n })\n .on('close', function () {\n if (this[kConsume].body !== null) {\n consumeFinish(this[kConsume], new RequestAbortedError())\n }\n })\n\n consumeStart(stream[kConsume])\n })\n }\n })\n}\n\nfunction consumeStart (consume) {\n if (consume.body === null) {\n return\n }\n\n const { _readableState: state } = consume.stream\n\n if (state.bufferIndex) {\n const start = state.bufferIndex\n const end = state.buffer.length\n for (let n = start; n < end; n++) {\n consumePush(consume, state.buffer[n])\n }\n } else {\n for (const chunk of state.buffer) {\n consumePush(consume, chunk)\n }\n }\n\n if (state.endEmitted) {\n consumeEnd(this[kConsume])\n } else {\n consume.stream.on('end', function () {\n consumeEnd(this[kConsume])\n })\n }\n\n consume.stream.resume()\n\n while (consume.stream.read() != null) {\n // Loop\n }\n}\n\n/**\n * @param {Buffer[]} chunks\n * @param {number} length\n */\nfunction chunksDecode (chunks, length) {\n if (chunks.length === 0 || length === 0) {\n return ''\n }\n const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length)\n const bufferLength = buffer.length\n\n // Skip BOM.\n const start =\n bufferLength > 2 &&\n buffer[0] === 0xef &&\n buffer[1] === 0xbb &&\n buffer[2] === 0xbf\n ? 3\n : 0\n return buffer.utf8Slice(start, bufferLength)\n}\n\n/**\n * @param {Buffer[]} chunks\n * @param {number} length\n * @returns {Uint8Array}\n */\nfunction chunksConcat (chunks, length) {\n if (chunks.length === 0 || length === 0) {\n return new Uint8Array(0)\n }\n if (chunks.length === 1) {\n // fast-path\n return new Uint8Array(chunks[0])\n }\n const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer)\n\n let offset = 0\n for (let i = 0; i < chunks.length; ++i) {\n const chunk = chunks[i]\n buffer.set(chunk, offset)\n offset += chunk.length\n }\n\n return buffer\n}\n\nfunction consumeEnd (consume) {\n const { type, body, resolve, stream, length } = consume\n\n try {\n if (type === 'text') {\n resolve(chunksDecode(body, length))\n } else if (type === 'json') {\n resolve(JSON.parse(chunksDecode(body, length)))\n } else if (type === 'arrayBuffer') {\n resolve(chunksConcat(body, length).buffer)\n } else if (type === 'blob') {\n resolve(new Blob(body, { type: stream[kContentType] }))\n } else if (type === 'bytes') {\n resolve(chunksConcat(body, length))\n }\n\n consumeFinish(consume)\n } catch (err) {\n stream.destroy(err)\n }\n}\n\nfunction consumePush (consume, chunk) {\n consume.length += chunk.length\n consume.body.push(chunk)\n}\n\nfunction consumeFinish (consume, err) {\n if (consume.body === null) {\n return\n }\n\n if (err) {\n consume.reject(err)\n } else {\n consume.resolve()\n }\n\n consume.type = null\n consume.stream = null\n consume.resolve = null\n consume.reject = null\n consume.length = 0\n consume.body = null\n}\n\nmodule.exports = { Readable: BodyReadable, chunksDecode }\n", "const assert = require('node:assert')\nconst {\n ResponseStatusCodeError\n} = require('../core/errors')\n\nconst { chunksDecode } = require('./readable')\nconst CHUNK_LIMIT = 128 * 1024\n\nasync function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) {\n assert(body)\n\n let chunks = []\n let length = 0\n\n try {\n for await (const chunk of body) {\n chunks.push(chunk)\n length += chunk.length\n if (length > CHUNK_LIMIT) {\n chunks = []\n length = 0\n break\n }\n }\n } catch {\n chunks = []\n length = 0\n // Do nothing....\n }\n\n const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`\n\n if (statusCode === 204 || !contentType || !length) {\n queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers)))\n return\n }\n\n const stackTraceLimit = Error.stackTraceLimit\n Error.stackTraceLimit = 0\n let payload\n\n try {\n if (isContentTypeApplicationJson(contentType)) {\n payload = JSON.parse(chunksDecode(chunks, length))\n } else if (isContentTypeText(contentType)) {\n payload = chunksDecode(chunks, length)\n }\n } catch {\n // process in a callback to avoid throwing in the microtask queue\n } finally {\n Error.stackTraceLimit = stackTraceLimit\n }\n queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload)))\n}\n\nconst isContentTypeApplicationJson = (contentType) => {\n return (\n contentType.length > 15 &&\n contentType[11] === '/' &&\n contentType[0] === 'a' &&\n contentType[1] === 'p' &&\n contentType[2] === 'p' &&\n contentType[3] === 'l' &&\n contentType[4] === 'i' &&\n contentType[5] === 'c' &&\n contentType[6] === 'a' &&\n contentType[7] === 't' &&\n contentType[8] === 'i' &&\n contentType[9] === 'o' &&\n contentType[10] === 'n' &&\n contentType[12] === 'j' &&\n contentType[13] === 's' &&\n contentType[14] === 'o' &&\n contentType[15] === 'n'\n )\n}\n\nconst isContentTypeText = (contentType) => {\n return (\n contentType.length > 4 &&\n contentType[4] === '/' &&\n contentType[0] === 't' &&\n contentType[1] === 'e' &&\n contentType[2] === 'x' &&\n contentType[3] === 't'\n )\n}\n\nmodule.exports = {\n getResolveErrorBodyCallback,\n isContentTypeApplicationJson,\n isContentTypeText\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { Readable } = require('./readable')\nconst { InvalidArgumentError, RequestAbortedError } = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('node:async_hooks')\n\nclass RequestHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) {\n throw new InvalidArgumentError('invalid highWaterMark')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_REQUEST')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.method = method\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.res = null\n this.abort = null\n this.body = body\n this.trailers = {}\n this.context = null\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError\n this.highWaterMark = highWaterMark\n this.signal = signal\n this.reason = null\n this.removeAbortListener = null\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n if (this.signal) {\n if (this.signal.aborted) {\n this.reason = this.signal.reason ?? new RequestAbortedError()\n } else {\n this.removeAbortListener = util.addAbortListener(this.signal, () => {\n this.reason = this.signal.reason ?? new RequestAbortedError()\n if (this.res) {\n util.destroy(this.res.on('error', util.nop), this.reason)\n } else if (this.abort) {\n this.abort(this.reason)\n }\n\n if (this.removeAbortListener) {\n this.res?.off('close', this.removeAbortListener)\n this.removeAbortListener()\n this.removeAbortListener = null\n }\n })\n }\n }\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n const contentLength = parsedHeaders['content-length']\n const res = new Readable({\n resume,\n abort,\n contentType,\n contentLength: this.method !== 'HEAD' && contentLength\n ? Number(contentLength)\n : null,\n highWaterMark\n })\n\n if (this.removeAbortListener) {\n res.on('close', this.removeAbortListener)\n }\n\n this.callback = null\n this.res = res\n if (callback !== null) {\n if (this.throwOnError && statusCode >= 400) {\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body: res, contentType, statusCode, statusMessage, headers }\n )\n } else {\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n trailers: this.trailers,\n opaque,\n body: res,\n context\n })\n }\n }\n }\n\n onData (chunk) {\n return this.res.push(chunk)\n }\n\n onComplete (trailers) {\n util.parseHeaders(trailers, this.trailers)\n this.res.push(null)\n }\n\n onError (err) {\n const { res, callback, body, opaque } = this\n\n if (callback) {\n // TODO: Does this need queueMicrotask?\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (res) {\n this.res = null\n // Ensure all queued handlers are invoked before destroying res.\n queueMicrotask(() => {\n util.destroy(res, err)\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n\n if (this.removeAbortListener) {\n res?.off('close', this.removeAbortListener)\n this.removeAbortListener()\n this.removeAbortListener = null\n }\n }\n}\n\nfunction request (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n request.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new RequestHandler(opts, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = request\nmodule.exports.RequestHandler = RequestHandler\n", "const { addAbortListener } = require('../core/util')\nconst { RequestAbortedError } = require('../core/errors')\n\nconst kListener = Symbol('kListener')\nconst kSignal = Symbol('kSignal')\n\nfunction abort (self) {\n if (self.abort) {\n self.abort(self[kSignal]?.reason)\n } else {\n self.reason = self[kSignal]?.reason ?? new RequestAbortedError()\n }\n removeSignal(self)\n}\n\nfunction addSignal (self, signal) {\n self.reason = null\n\n self[kSignal] = null\n self[kListener] = null\n\n if (!signal) {\n return\n }\n\n if (signal.aborted) {\n abort(self)\n return\n }\n\n self[kSignal] = signal\n self[kListener] = () => {\n abort(self)\n }\n\n addAbortListener(self[kSignal], self[kListener])\n}\n\nfunction removeSignal (self) {\n if (!self[kSignal]) {\n return\n }\n\n if ('removeEventListener' in self[kSignal]) {\n self[kSignal].removeEventListener('abort', self[kListener])\n } else {\n self[kSignal].removeListener('abort', self[kListener])\n }\n\n self[kSignal] = null\n self[kListener] = null\n}\n\nmodule.exports = {\n addSignal,\n removeSignal\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { finished, PassThrough } = require('node:stream')\nconst { InvalidArgumentError, InvalidReturnValueError } = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('node:async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass StreamHandler extends AsyncResource {\n constructor (opts, factory, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('invalid factory')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_STREAM')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.factory = factory\n this.callback = callback\n this.res = null\n this.abort = null\n this.context = null\n this.trailers = null\n this.body = body\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError || false\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { factory, opaque, context, callback, responseHeaders } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.factory = null\n\n let res\n\n if (this.throwOnError && statusCode >= 400) {\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n res = new PassThrough()\n\n this.callback = null\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body: res, contentType, statusCode, statusMessage, headers }\n )\n } else {\n if (factory === null) {\n return\n }\n\n res = this.runInAsyncScope(factory, null, {\n statusCode,\n headers,\n opaque,\n context\n })\n\n if (\n !res ||\n typeof res.write !== 'function' ||\n typeof res.end !== 'function' ||\n typeof res.on !== 'function'\n ) {\n throw new InvalidReturnValueError('expected Writable')\n }\n\n // TODO: Avoid finished. It registers an unnecessary amount of listeners.\n finished(res, { readable: false }, (err) => {\n const { callback, res, opaque, trailers, abort } = this\n\n this.res = null\n if (err || !res.readable) {\n util.destroy(res, err)\n }\n\n this.callback = null\n this.runInAsyncScope(callback, null, err || null, { opaque, trailers })\n\n if (err) {\n abort()\n }\n })\n }\n\n res.on('drain', resume)\n\n this.res = res\n\n const needDrain = res.writableNeedDrain !== undefined\n ? res.writableNeedDrain\n : res._writableState?.needDrain\n\n return needDrain !== true\n }\n\n onData (chunk) {\n const { res } = this\n\n return res ? res.write(chunk) : true\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n if (!res) {\n return\n }\n\n this.trailers = util.parseHeaders(trailers)\n\n res.end()\n }\n\n onError (err) {\n const { res, callback, opaque, body } = this\n\n removeSignal(this)\n\n this.factory = null\n\n if (res) {\n this.res = null\n util.destroy(res, err)\n } else if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction stream (opts, factory, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n stream.call(this, opts, factory, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new StreamHandler(opts, factory, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = stream\n", "'use strict'\n\nconst {\n Readable,\n Duplex,\n PassThrough\n} = require('node:stream')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { AsyncResource } = require('node:async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('node:assert')\n\nconst kResume = Symbol('resume')\n\nclass PipelineRequest extends Readable {\n constructor () {\n super({ autoDestroy: true })\n\n this[kResume] = null\n }\n\n _read () {\n const { [kResume]: resume } = this\n\n if (resume) {\n this[kResume] = null\n resume()\n }\n }\n\n _destroy (err, callback) {\n this._read()\n\n callback(err)\n }\n}\n\nclass PipelineResponse extends Readable {\n constructor (resume) {\n super({ autoDestroy: true })\n this[kResume] = resume\n }\n\n _read () {\n this[kResume]()\n }\n\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n callback(err)\n }\n}\n\nclass PipelineHandler extends AsyncResource {\n constructor (opts, handler) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof handler !== 'function') {\n throw new InvalidArgumentError('invalid handler')\n }\n\n const { signal, method, opaque, onInfo, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_PIPELINE')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.handler = handler\n this.abort = null\n this.context = null\n this.onInfo = onInfo || null\n\n this.req = new PipelineRequest().on('error', util.nop)\n\n this.ret = new Duplex({\n readableObjectMode: opts.objectMode,\n autoDestroy: true,\n read: () => {\n const { body } = this\n\n if (body?.resume) {\n body.resume()\n }\n },\n write: (chunk, encoding, callback) => {\n const { req } = this\n\n if (req.push(chunk, encoding) || req._readableState.destroyed) {\n callback()\n } else {\n req[kResume] = callback\n }\n },\n destroy: (err, callback) => {\n const { body, req, res, ret, abort } = this\n\n if (!err && !ret._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (abort && err) {\n abort()\n }\n\n util.destroy(body, err)\n util.destroy(req, err)\n util.destroy(res, err)\n\n removeSignal(this)\n\n callback(err)\n }\n }).on('prefinish', () => {\n const { req } = this\n\n // Node < 15 does not call _final in same tick.\n req.push(null)\n })\n\n this.res = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n const { ret, res } = this\n\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(!res, 'pipeline cannot be retried')\n assert(!ret.destroyed)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume) {\n const { opaque, handler, context } = this\n\n if (statusCode < 200) {\n if (this.onInfo) {\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.res = new PipelineResponse(resume)\n\n let body\n try {\n this.handler = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n body = this.runInAsyncScope(handler, null, {\n statusCode,\n headers,\n opaque,\n body: this.res,\n context\n })\n } catch (err) {\n this.res.on('error', util.nop)\n throw err\n }\n\n if (!body || typeof body.on !== 'function') {\n throw new InvalidReturnValueError('expected Readable')\n }\n\n body\n .on('data', (chunk) => {\n const { ret, body } = this\n\n if (!ret.push(chunk) && body.pause) {\n body.pause()\n }\n })\n .on('error', (err) => {\n const { ret } = this\n\n util.destroy(ret, err)\n })\n .on('end', () => {\n const { ret } = this\n\n ret.push(null)\n })\n .on('close', () => {\n const { ret } = this\n\n if (!ret._readableState.ended) {\n util.destroy(ret, new RequestAbortedError())\n }\n })\n\n this.body = body\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n res.push(null)\n }\n\n onError (err) {\n const { ret } = this\n this.handler = null\n util.destroy(ret, err)\n }\n}\n\nfunction pipeline (opts, handler) {\n try {\n const pipelineHandler = new PipelineHandler(opts, handler)\n this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)\n return pipelineHandler.ret\n } catch (err) {\n return new PassThrough().destroy(err)\n }\n}\n\nmodule.exports = pipeline\n", "'use strict'\n\nconst { InvalidArgumentError, SocketError } = require('../core/errors')\nconst { AsyncResource } = require('node:async_hooks')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('node:assert')\n\nclass UpgradeHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_UPGRADE')\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.abort = null\n this.context = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = null\n }\n\n onHeaders () {\n throw new SocketError('bad upgrade', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n assert(statusCode === 101)\n\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.runInAsyncScope(callback, null, null, {\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction upgrade (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n upgrade.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const upgradeHandler = new UpgradeHandler(opts, callback)\n this.dispatch({\n ...opts,\n method: opts.method || 'GET',\n upgrade: opts.protocol || 'Websocket'\n }, upgradeHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = upgrade\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { AsyncResource } = require('node:async_hooks')\nconst { InvalidArgumentError, SocketError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass ConnectHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_CONNECT')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.callback = callback\n this.abort = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders () {\n throw new SocketError('bad connect', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n\n let headers = rawHeaders\n // Indicates is an HTTP2Session\n if (headers != null) {\n headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n }\n\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction connect (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n connect.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const connectHandler = new ConnectHandler(opts, callback)\n this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = connect\n", "'use strict'\n\nmodule.exports.request = require('./api-request')\nmodule.exports.stream = require('./api-stream')\nmodule.exports.pipeline = require('./api-pipeline')\nmodule.exports.upgrade = require('./api-upgrade')\nmodule.exports.connect = require('./api-connect')\n", "'use strict'\n\nconst { UndiciError } = require('../core/errors')\n\nconst kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED')\n\n/**\n * The request does not match any registered mock dispatches.\n */\nclass MockNotMatchedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, MockNotMatchedError)\n this.name = 'MockNotMatchedError'\n this.message = message || 'The request does not match any registered mock dispatches'\n this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMockNotMatchedError] === true\n }\n\n [kMockNotMatchedError] = true\n}\n\nmodule.exports = {\n MockNotMatchedError\n}\n", "'use strict'\n\nmodule.exports = {\n kAgent: Symbol('agent'),\n kOptions: Symbol('options'),\n kFactory: Symbol('factory'),\n kDispatches: Symbol('dispatches'),\n kDispatchKey: Symbol('dispatch key'),\n kDefaultHeaders: Symbol('default headers'),\n kDefaultTrailers: Symbol('default trailers'),\n kContentLength: Symbol('content length'),\n kMockAgent: Symbol('mock agent'),\n kMockAgentSet: Symbol('mock agent set'),\n kMockAgentGet: Symbol('mock agent get'),\n kMockDispatch: Symbol('mock dispatch'),\n kClose: Symbol('close'),\n kOriginalClose: Symbol('original agent close'),\n kOrigin: Symbol('origin'),\n kIsMockActive: Symbol('is mock active'),\n kNetConnect: Symbol('net connect'),\n kGetNetConnect: Symbol('get net connect'),\n kConnected: Symbol('connected')\n}\n", "'use strict'\n\nconst { MockNotMatchedError } = require('./mock-errors')\nconst {\n kDispatches,\n kMockAgent,\n kOriginalDispatch,\n kOrigin,\n kGetNetConnect\n} = require('./mock-symbols')\nconst { buildURL } = require('../core/util')\nconst { STATUS_CODES } = require('node:http')\nconst {\n types: {\n isPromise\n }\n} = require('node:util')\n\nfunction matchValue (match, value) {\n if (typeof match === 'string') {\n return match === value\n }\n if (match instanceof RegExp) {\n return match.test(value)\n }\n if (typeof match === 'function') {\n return match(value) === true\n }\n return false\n}\n\nfunction lowerCaseEntries (headers) {\n return Object.fromEntries(\n Object.entries(headers).map(([headerName, headerValue]) => {\n return [headerName.toLocaleLowerCase(), headerValue]\n })\n )\n}\n\n/**\n * @param {import('../../index').Headers|string[]|Record} headers\n * @param {string} key\n */\nfunction getHeaderByName (headers, key) {\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {\n return headers[i + 1]\n }\n }\n\n return undefined\n } else if (typeof headers.get === 'function') {\n return headers.get(key)\n } else {\n return lowerCaseEntries(headers)[key.toLocaleLowerCase()]\n }\n}\n\n/** @param {string[]} headers */\nfunction buildHeadersFromArray (headers) { // fetch HeadersList\n const clone = headers.slice()\n const entries = []\n for (let index = 0; index < clone.length; index += 2) {\n entries.push([clone[index], clone[index + 1]])\n }\n return Object.fromEntries(entries)\n}\n\nfunction matchHeaders (mockDispatch, headers) {\n if (typeof mockDispatch.headers === 'function') {\n if (Array.isArray(headers)) { // fetch HeadersList\n headers = buildHeadersFromArray(headers)\n }\n return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})\n }\n if (typeof mockDispatch.headers === 'undefined') {\n return true\n }\n if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {\n return false\n }\n\n for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {\n const headerValue = getHeaderByName(headers, matchHeaderName)\n\n if (!matchValue(matchHeaderValue, headerValue)) {\n return false\n }\n }\n return true\n}\n\nfunction safeUrl (path) {\n if (typeof path !== 'string') {\n return path\n }\n\n const pathSegments = path.split('?')\n\n if (pathSegments.length !== 2) {\n return path\n }\n\n const qp = new URLSearchParams(pathSegments.pop())\n qp.sort()\n return [...pathSegments, qp.toString()].join('?')\n}\n\nfunction matchKey (mockDispatch, { path, method, body, headers }) {\n const pathMatch = matchValue(mockDispatch.path, path)\n const methodMatch = matchValue(mockDispatch.method, method)\n const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true\n const headersMatch = matchHeaders(mockDispatch, headers)\n return pathMatch && methodMatch && bodyMatch && headersMatch\n}\n\nfunction getResponseData (data) {\n if (Buffer.isBuffer(data)) {\n return data\n } else if (data instanceof Uint8Array) {\n return data\n } else if (data instanceof ArrayBuffer) {\n return data\n } else if (typeof data === 'object') {\n return JSON.stringify(data)\n } else {\n return data.toString()\n }\n}\n\nfunction getMockDispatch (mockDispatches, key) {\n const basePath = key.query ? buildURL(key.path, key.query) : key.path\n const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath\n\n // Match path\n let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)\n }\n\n // Match method\n matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`)\n }\n\n // Match body\n matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`)\n }\n\n // Match headers\n matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))\n if (matchedMockDispatches.length === 0) {\n const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers\n throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`)\n }\n\n return matchedMockDispatches[0]\n}\n\nfunction addMockDispatch (mockDispatches, key, data) {\n const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }\n const replyData = typeof data === 'function' ? { callback: data } : { ...data }\n const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }\n mockDispatches.push(newMockDispatch)\n return newMockDispatch\n}\n\nfunction deleteMockDispatch (mockDispatches, key) {\n const index = mockDispatches.findIndex(dispatch => {\n if (!dispatch.consumed) {\n return false\n }\n return matchKey(dispatch, key)\n })\n if (index !== -1) {\n mockDispatches.splice(index, 1)\n }\n}\n\nfunction buildKey (opts) {\n const { path, method, body, headers, query } = opts\n return {\n path,\n method,\n body,\n headers,\n query\n }\n}\n\nfunction generateKeyValues (data) {\n const keys = Object.keys(data)\n const result = []\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n const value = data[key]\n const name = Buffer.from(`${key}`)\n if (Array.isArray(value)) {\n for (let j = 0; j < value.length; ++j) {\n result.push(name, Buffer.from(`${value[j]}`))\n }\n } else {\n result.push(name, Buffer.from(`${value}`))\n }\n }\n return result\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n * @param {number} statusCode\n */\nfunction getStatusText (statusCode) {\n return STATUS_CODES[statusCode] || 'unknown'\n}\n\nasync function getResponse (body) {\n const buffers = []\n for await (const data of body) {\n buffers.push(data)\n }\n return Buffer.concat(buffers).toString('utf8')\n}\n\n/**\n * Mock dispatch function used to simulate undici dispatches\n */\nfunction mockDispatch (opts, handler) {\n // Get mock dispatch from built key\n const key = buildKey(opts)\n const mockDispatch = getMockDispatch(this[kDispatches], key)\n\n mockDispatch.timesInvoked++\n\n // Here's where we resolve a callback if a callback is present for the dispatch data.\n if (mockDispatch.data.callback) {\n mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) }\n }\n\n // Parse mockDispatch data\n const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch\n const { timesInvoked, times } = mockDispatch\n\n // If it's used up and not persistent, mark as consumed\n mockDispatch.consumed = !persist && timesInvoked >= times\n mockDispatch.pending = timesInvoked < times\n\n // If specified, trigger dispatch error\n if (error !== null) {\n deleteMockDispatch(this[kDispatches], key)\n handler.onError(error)\n return true\n }\n\n // Handle the request with a delay if necessary\n if (typeof delay === 'number' && delay > 0) {\n setTimeout(() => {\n handleReply(this[kDispatches])\n }, delay)\n } else {\n handleReply(this[kDispatches])\n }\n\n function handleReply (mockDispatches, _data = data) {\n // fetch's HeadersList is a 1D string array\n const optsHeaders = Array.isArray(opts.headers)\n ? buildHeadersFromArray(opts.headers)\n : opts.headers\n const body = typeof _data === 'function'\n ? _data({ ...opts, headers: optsHeaders })\n : _data\n\n // util.types.isPromise is likely needed for jest.\n if (isPromise(body)) {\n // If handleReply is asynchronous, throwing an error\n // in the callback will reject the promise, rather than\n // synchronously throw the error, which breaks some tests.\n // Rather, we wait for the callback to resolve if it is a\n // promise, and then re-run handleReply with the new body.\n body.then((newData) => handleReply(mockDispatches, newData))\n return\n }\n\n const responseData = getResponseData(body)\n const responseHeaders = generateKeyValues(headers)\n const responseTrailers = generateKeyValues(trailers)\n\n handler.onConnect?.(err => handler.onError(err), null)\n handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode))\n handler.onData?.(Buffer.from(responseData))\n handler.onComplete?.(responseTrailers)\n deleteMockDispatch(mockDispatches, key)\n }\n\n function resume () {}\n\n return true\n}\n\nfunction buildMockDispatch () {\n const agent = this[kMockAgent]\n const origin = this[kOrigin]\n const originalDispatch = this[kOriginalDispatch]\n\n return function dispatch (opts, handler) {\n if (agent.isMockActive) {\n try {\n mockDispatch.call(this, opts, handler)\n } catch (error) {\n if (error instanceof MockNotMatchedError) {\n const netConnect = agent[kGetNetConnect]()\n if (netConnect === false) {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)\n }\n if (checkNetConnect(netConnect, origin)) {\n originalDispatch.call(this, opts, handler)\n } else {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`)\n }\n } else {\n throw error\n }\n }\n } else {\n originalDispatch.call(this, opts, handler)\n }\n }\n}\n\nfunction checkNetConnect (netConnect, origin) {\n const url = new URL(origin)\n if (netConnect === true) {\n return true\n } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {\n return true\n }\n return false\n}\n\nfunction buildMockOptions (opts) {\n if (opts) {\n const { agent, ...mockOptions } = opts\n return mockOptions\n }\n}\n\nmodule.exports = {\n getResponseData,\n getMockDispatch,\n addMockDispatch,\n deleteMockDispatch,\n buildKey,\n generateKeyValues,\n matchValue,\n getResponse,\n getStatusText,\n mockDispatch,\n buildMockDispatch,\n checkNetConnect,\n buildMockOptions,\n getHeaderByName,\n buildHeadersFromArray\n}\n", "'use strict'\n\nconst { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kDispatchKey,\n kDefaultHeaders,\n kDefaultTrailers,\n kContentLength,\n kMockDispatch\n} = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { buildURL } = require('../core/util')\n\n/**\n * Defines the scope API for an interceptor reply\n */\nclass MockScope {\n constructor (mockDispatch) {\n this[kMockDispatch] = mockDispatch\n }\n\n /**\n * Delay a reply by a set amount in ms.\n */\n delay (waitInMs) {\n if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {\n throw new InvalidArgumentError('waitInMs must be a valid integer > 0')\n }\n\n this[kMockDispatch].delay = waitInMs\n return this\n }\n\n /**\n * For a defined reply, never mark as consumed.\n */\n persist () {\n this[kMockDispatch].persist = true\n return this\n }\n\n /**\n * Allow one to define a reply for a set amount of matching requests.\n */\n times (repeatTimes) {\n if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {\n throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')\n }\n\n this[kMockDispatch].times = repeatTimes\n return this\n }\n}\n\n/**\n * Defines an interceptor for a Mock\n */\nclass MockInterceptor {\n constructor (opts, mockDispatches) {\n if (typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object')\n }\n if (typeof opts.path === 'undefined') {\n throw new InvalidArgumentError('opts.path must be defined')\n }\n if (typeof opts.method === 'undefined') {\n opts.method = 'GET'\n }\n // See https://github.com/nodejs/undici/issues/1245\n // As per RFC 3986, clients are not supposed to send URI\n // fragments to servers when they retrieve a document,\n if (typeof opts.path === 'string') {\n if (opts.query) {\n opts.path = buildURL(opts.path, opts.query)\n } else {\n // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811\n const parsedURL = new URL(opts.path, 'data://')\n opts.path = parsedURL.pathname + parsedURL.search\n }\n }\n if (typeof opts.method === 'string') {\n opts.method = opts.method.toUpperCase()\n }\n\n this[kDispatchKey] = buildKey(opts)\n this[kDispatches] = mockDispatches\n this[kDefaultHeaders] = {}\n this[kDefaultTrailers] = {}\n this[kContentLength] = false\n }\n\n createMockScopeDispatchData ({ statusCode, data, responseOptions }) {\n const responseData = getResponseData(data)\n const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}\n const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }\n const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }\n\n return { statusCode, data, headers, trailers }\n }\n\n validateReplyParameters (replyParameters) {\n if (typeof replyParameters.statusCode === 'undefined') {\n throw new InvalidArgumentError('statusCode must be defined')\n }\n if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) {\n throw new InvalidArgumentError('responseOptions must be an object')\n }\n }\n\n /**\n * Mock an undici request with a defined reply.\n */\n reply (replyOptionsCallbackOrStatusCode) {\n // Values of reply aren't available right now as they\n // can only be available when the reply callback is invoked.\n if (typeof replyOptionsCallbackOrStatusCode === 'function') {\n // We'll first wrap the provided callback in another function,\n // this function will properly resolve the data from the callback\n // when invoked.\n const wrappedDefaultsCallback = (opts) => {\n // Our reply options callback contains the parameter for statusCode, data and options.\n const resolvedData = replyOptionsCallbackOrStatusCode(opts)\n\n // Check if it is in the right format\n if (typeof resolvedData !== 'object' || resolvedData === null) {\n throw new InvalidArgumentError('reply options callback must return an object')\n }\n\n const replyParameters = { data: '', responseOptions: {}, ...resolvedData }\n this.validateReplyParameters(replyParameters)\n // Since the values can be obtained immediately we return them\n // from this higher order function that will be resolved later.\n return {\n ...this.createMockScopeDispatchData(replyParameters)\n }\n }\n\n // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)\n return new MockScope(newMockDispatch)\n }\n\n // We can have either one or three parameters, if we get here,\n // we should have 1-3 parameters. So we spread the arguments of\n // this function to obtain the parameters, since replyData will always\n // just be the statusCode.\n const replyParameters = {\n statusCode: replyOptionsCallbackOrStatusCode,\n data: arguments[1] === undefined ? '' : arguments[1],\n responseOptions: arguments[2] === undefined ? {} : arguments[2]\n }\n this.validateReplyParameters(replyParameters)\n\n // Send in-already provided data like usual\n const dispatchData = this.createMockScopeDispatchData(replyParameters)\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Mock an undici request with a defined error.\n */\n replyWithError (error) {\n if (typeof error === 'undefined') {\n throw new InvalidArgumentError('error must be defined')\n }\n\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Set default reply headers on the interceptor for subsequent replies\n */\n defaultReplyHeaders (headers) {\n if (typeof headers === 'undefined') {\n throw new InvalidArgumentError('headers must be defined')\n }\n\n this[kDefaultHeaders] = headers\n return this\n }\n\n /**\n * Set default reply trailers on the interceptor for subsequent replies\n */\n defaultReplyTrailers (trailers) {\n if (typeof trailers === 'undefined') {\n throw new InvalidArgumentError('trailers must be defined')\n }\n\n this[kDefaultTrailers] = trailers\n return this\n }\n\n /**\n * Set reply content length header for replies on the interceptor\n */\n replyContentLength () {\n this[kContentLength] = true\n return this\n }\n}\n\nmodule.exports.MockInterceptor = MockInterceptor\nmodule.exports.MockScope = MockScope\n", "'use strict'\n\nconst { promisify } = require('node:util')\nconst Client = require('../dispatcher/client')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockClient provides an API that extends the Client to influence the mockDispatches.\n */\nclass MockClient extends Client {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockClient\n", "'use strict'\n\nconst { promisify } = require('node:util')\nconst Pool = require('../dispatcher/pool')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockPool provides an API that extends the Pool to influence the mockDispatches.\n */\nclass MockPool extends Pool {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockPool\n", "'use strict'\n\nconst singulars = {\n pronoun: 'it',\n is: 'is',\n was: 'was',\n this: 'this'\n}\n\nconst plurals = {\n pronoun: 'they',\n is: 'are',\n was: 'were',\n this: 'these'\n}\n\nmodule.exports = class Pluralizer {\n constructor (singular, plural) {\n this.singular = singular\n this.plural = plural\n }\n\n pluralize (count) {\n const one = count === 1\n const keys = one ? singulars : plurals\n const noun = one ? this.singular : this.plural\n return { ...keys, count, noun }\n }\n}\n", "'use strict'\n\nconst { Transform } = require('node:stream')\nconst { Console } = require('node:console')\n\nconst PERSISTENT = process.versions.icu ? '\u2705' : 'Y '\nconst NOT_PERSISTENT = process.versions.icu ? '\u274C' : 'N '\n\n/**\n * Gets the output of `console.table(\u2026)` as a string.\n */\nmodule.exports = class PendingInterceptorsFormatter {\n constructor ({ disableColors } = {}) {\n this.transform = new Transform({\n transform (chunk, _enc, cb) {\n cb(null, chunk)\n }\n })\n\n this.logger = new Console({\n stdout: this.transform,\n inspectOptions: {\n colors: !disableColors && !process.env.CI\n }\n })\n }\n\n format (pendingInterceptors) {\n const withPrettyHeaders = pendingInterceptors.map(\n ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({\n Method: method,\n Origin: origin,\n Path: path,\n 'Status code': statusCode,\n Persistent: persist ? PERSISTENT : NOT_PERSISTENT,\n Invocations: timesInvoked,\n Remaining: persist ? Infinity : times - timesInvoked\n }))\n\n this.logger.table(withPrettyHeaders)\n return this.transform.read().toString()\n }\n}\n", "'use strict'\n\nconst { kClients } = require('../core/symbols')\nconst Agent = require('../dispatcher/agent')\nconst {\n kAgent,\n kMockAgentSet,\n kMockAgentGet,\n kDispatches,\n kIsMockActive,\n kNetConnect,\n kGetNetConnect,\n kOptions,\n kFactory\n} = require('./mock-symbols')\nconst MockClient = require('./mock-client')\nconst MockPool = require('./mock-pool')\nconst { matchValue, buildMockOptions } = require('./mock-utils')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst Dispatcher = require('../dispatcher/dispatcher')\nconst Pluralizer = require('./pluralizer')\nconst PendingInterceptorsFormatter = require('./pending-interceptors-formatter')\n\nclass MockAgent extends Dispatcher {\n constructor (opts) {\n super(opts)\n\n this[kNetConnect] = true\n this[kIsMockActive] = true\n\n // Instantiate Agent and encapsulate\n if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n const agent = opts?.agent ? opts.agent : new Agent(opts)\n this[kAgent] = agent\n\n this[kClients] = agent[kClients]\n this[kOptions] = buildMockOptions(opts)\n }\n\n get (origin) {\n let dispatcher = this[kMockAgentGet](origin)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n }\n return dispatcher\n }\n\n dispatch (opts, handler) {\n // Call MockAgent.get to perform additional setup before dispatching as normal\n this.get(opts.origin)\n return this[kAgent].dispatch(opts, handler)\n }\n\n async close () {\n await this[kAgent].close()\n this[kClients].clear()\n }\n\n deactivate () {\n this[kIsMockActive] = false\n }\n\n activate () {\n this[kIsMockActive] = true\n }\n\n enableNetConnect (matcher) {\n if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {\n if (Array.isArray(this[kNetConnect])) {\n this[kNetConnect].push(matcher)\n } else {\n this[kNetConnect] = [matcher]\n }\n } else if (typeof matcher === 'undefined') {\n this[kNetConnect] = true\n } else {\n throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')\n }\n }\n\n disableNetConnect () {\n this[kNetConnect] = false\n }\n\n // This is required to bypass issues caused by using global symbols - see:\n // https://github.com/nodejs/undici/issues/1447\n get isMockActive () {\n return this[kIsMockActive]\n }\n\n [kMockAgentSet] (origin, dispatcher) {\n this[kClients].set(origin, dispatcher)\n }\n\n [kFactory] (origin) {\n const mockOptions = Object.assign({ agent: this }, this[kOptions])\n return this[kOptions] && this[kOptions].connections === 1\n ? new MockClient(origin, mockOptions)\n : new MockPool(origin, mockOptions)\n }\n\n [kMockAgentGet] (origin) {\n // First check if we can immediately find it\n const client = this[kClients].get(origin)\n if (client) {\n return client\n }\n\n // If the origin is not a string create a dummy parent pool and return to user\n if (typeof origin !== 'string') {\n const dispatcher = this[kFactory]('http://localhost:9999')\n this[kMockAgentSet](origin, dispatcher)\n return dispatcher\n }\n\n // If we match, create a pool and assign the same dispatches\n for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) {\n if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {\n const dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]\n return dispatcher\n }\n }\n }\n\n [kGetNetConnect] () {\n return this[kNetConnect]\n }\n\n pendingInterceptors () {\n const mockAgentClients = this[kClients]\n\n return Array.from(mockAgentClients.entries())\n .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin })))\n .filter(({ pending }) => pending)\n }\n\n assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {\n const pending = this.pendingInterceptors()\n\n if (pending.length === 0) {\n return\n }\n\n const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length)\n\n throw new UndiciError(`\n${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending:\n\n${pendingInterceptorsFormatter.format(pending)}\n`.trim())\n }\n}\n\nmodule.exports = MockAgent\n", "'use strict'\n\n// We include a version number for the Dispatcher API. In case of breaking changes,\n// this version number must be increased to avoid conflicts.\nconst globalDispatcher = Symbol.for('undici.globalDispatcher.1')\nconst { InvalidArgumentError } = require('./core/errors')\nconst Agent = require('./dispatcher/agent')\n\nif (getGlobalDispatcher() === undefined) {\n setGlobalDispatcher(new Agent())\n}\n\nfunction setGlobalDispatcher (agent) {\n if (!agent || typeof agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument agent must implement Agent')\n }\n Object.defineProperty(globalThis, globalDispatcher, {\n value: agent,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nfunction getGlobalDispatcher () {\n return globalThis[globalDispatcher]\n}\n\nmodule.exports = {\n setGlobalDispatcher,\n getGlobalDispatcher\n}\n", "'use strict'\n\nmodule.exports = class DecoratorHandler {\n #handler\n\n constructor (handler) {\n if (typeof handler !== 'object' || handler === null) {\n throw new TypeError('handler must be an object')\n }\n this.#handler = handler\n }\n\n onConnect (...args) {\n return this.#handler.onConnect?.(...args)\n }\n\n onError (...args) {\n return this.#handler.onError?.(...args)\n }\n\n onUpgrade (...args) {\n return this.#handler.onUpgrade?.(...args)\n }\n\n onResponseStarted (...args) {\n return this.#handler.onResponseStarted?.(...args)\n }\n\n onHeaders (...args) {\n return this.#handler.onHeaders?.(...args)\n }\n\n onData (...args) {\n return this.#handler.onData?.(...args)\n }\n\n onComplete (...args) {\n return this.#handler.onComplete?.(...args)\n }\n\n onBodySent (...args) {\n return this.#handler.onBodySent?.(...args)\n }\n}\n", "'use strict'\nconst RedirectHandler = require('../handler/redirect-handler')\n\nmodule.exports = opts => {\n const globalMaxRedirections = opts?.maxRedirections\n return dispatch => {\n return function redirectInterceptor (opts, handler) {\n const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts\n\n if (!maxRedirections) {\n return dispatch(opts, handler)\n }\n\n const redirectHandler = new RedirectHandler(\n dispatch,\n maxRedirections,\n opts,\n handler\n )\n\n return dispatch(baseOpts, redirectHandler)\n }\n }\n}\n", "'use strict'\nconst RetryHandler = require('../handler/retry-handler')\n\nmodule.exports = globalOpts => {\n return dispatch => {\n return function retryInterceptor (opts, handler) {\n return dispatch(\n opts,\n new RetryHandler(\n { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } },\n {\n handler,\n dispatch\n }\n )\n )\n }\n }\n}\n", "'use strict'\n\nconst util = require('../core/util')\nconst { InvalidArgumentError, RequestAbortedError } = require('../core/errors')\nconst DecoratorHandler = require('../handler/decorator-handler')\n\nclass DumpHandler extends DecoratorHandler {\n #maxSize = 1024 * 1024\n #abort = null\n #dumped = false\n #aborted = false\n #size = 0\n #reason = null\n #handler = null\n\n constructor ({ maxSize }, handler) {\n super(handler)\n\n if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) {\n throw new InvalidArgumentError('maxSize must be a number greater than 0')\n }\n\n this.#maxSize = maxSize ?? this.#maxSize\n this.#handler = handler\n }\n\n onConnect (abort) {\n this.#abort = abort\n\n this.#handler.onConnect(this.#customAbort.bind(this))\n }\n\n #customAbort (reason) {\n this.#aborted = true\n this.#reason = reason\n }\n\n // TODO: will require adjustment after new hooks are out\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const headers = util.parseHeaders(rawHeaders)\n const contentLength = headers['content-length']\n\n if (contentLength != null && contentLength > this.#maxSize) {\n throw new RequestAbortedError(\n `Response size (${contentLength}) larger than maxSize (${\n this.#maxSize\n })`\n )\n }\n\n if (this.#aborted) {\n return true\n }\n\n return this.#handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n onError (err) {\n if (this.#dumped) {\n return\n }\n\n err = this.#reason ?? err\n\n this.#handler.onError(err)\n }\n\n onData (chunk) {\n this.#size = this.#size + chunk.length\n\n if (this.#size >= this.#maxSize) {\n this.#dumped = true\n\n if (this.#aborted) {\n this.#handler.onError(this.#reason)\n } else {\n this.#handler.onComplete([])\n }\n }\n\n return true\n }\n\n onComplete (trailers) {\n if (this.#dumped) {\n return\n }\n\n if (this.#aborted) {\n this.#handler.onError(this.reason)\n return\n }\n\n this.#handler.onComplete(trailers)\n }\n}\n\nfunction createDumpInterceptor (\n { maxSize: defaultMaxSize } = {\n maxSize: 1024 * 1024\n }\n) {\n return dispatch => {\n return function Intercept (opts, handler) {\n const { dumpMaxSize = defaultMaxSize } =\n opts\n\n const dumpHandler = new DumpHandler(\n { maxSize: dumpMaxSize },\n handler\n )\n\n return dispatch(opts, dumpHandler)\n }\n }\n}\n\nmodule.exports = createDumpInterceptor\n", "'use strict'\nconst { isIP } = require('node:net')\nconst { lookup } = require('node:dns')\nconst DecoratorHandler = require('../handler/decorator-handler')\nconst { InvalidArgumentError, InformationalError } = require('../core/errors')\nconst maxInt = Math.pow(2, 31) - 1\n\nclass DNSInstance {\n #maxTTL = 0\n #maxItems = 0\n #records = new Map()\n dualStack = true\n affinity = null\n lookup = null\n pick = null\n\n constructor (opts) {\n this.#maxTTL = opts.maxTTL\n this.#maxItems = opts.maxItems\n this.dualStack = opts.dualStack\n this.affinity = opts.affinity\n this.lookup = opts.lookup ?? this.#defaultLookup\n this.pick = opts.pick ?? this.#defaultPick\n }\n\n get full () {\n return this.#records.size === this.#maxItems\n }\n\n runLookup (origin, opts, cb) {\n const ips = this.#records.get(origin.hostname)\n\n // If full, we just return the origin\n if (ips == null && this.full) {\n cb(null, origin.origin)\n return\n }\n\n const newOpts = {\n affinity: this.affinity,\n dualStack: this.dualStack,\n lookup: this.lookup,\n pick: this.pick,\n ...opts.dns,\n maxTTL: this.#maxTTL,\n maxItems: this.#maxItems\n }\n\n // If no IPs we lookup\n if (ips == null) {\n this.lookup(origin, newOpts, (err, addresses) => {\n if (err || addresses == null || addresses.length === 0) {\n cb(err ?? new InformationalError('No DNS entries found'))\n return\n }\n\n this.setRecords(origin, addresses)\n const records = this.#records.get(origin.hostname)\n\n const ip = this.pick(\n origin,\n records,\n newOpts.affinity\n )\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (origin.port !== '') {\n port = `:${origin.port}`\n } else {\n port = ''\n }\n\n cb(\n null,\n `${origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`\n )\n })\n } else {\n // If there's IPs we pick\n const ip = this.pick(\n origin,\n ips,\n newOpts.affinity\n )\n\n // If no IPs we lookup - deleting old records\n if (ip == null) {\n this.#records.delete(origin.hostname)\n this.runLookup(origin, opts, cb)\n return\n }\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (origin.port !== '') {\n port = `:${origin.port}`\n } else {\n port = ''\n }\n\n cb(\n null,\n `${origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`\n )\n }\n }\n\n #defaultLookup (origin, opts, cb) {\n lookup(\n origin.hostname,\n {\n all: true,\n family: this.dualStack === false ? this.affinity : 0,\n order: 'ipv4first'\n },\n (err, addresses) => {\n if (err) {\n return cb(err)\n }\n\n const results = new Map()\n\n for (const addr of addresses) {\n // On linux we found duplicates, we attempt to remove them with\n // the latest record\n results.set(`${addr.address}:${addr.family}`, addr)\n }\n\n cb(null, results.values())\n }\n )\n }\n\n #defaultPick (origin, hostnameRecords, affinity) {\n let ip = null\n const { records, offset } = hostnameRecords\n\n let family\n if (this.dualStack) {\n if (affinity == null) {\n // Balance between ip families\n if (offset == null || offset === maxInt) {\n hostnameRecords.offset = 0\n affinity = 4\n } else {\n hostnameRecords.offset++\n affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4\n }\n }\n\n if (records[affinity] != null && records[affinity].ips.length > 0) {\n family = records[affinity]\n } else {\n family = records[affinity === 4 ? 6 : 4]\n }\n } else {\n family = records[affinity]\n }\n\n // If no IPs we return null\n if (family == null || family.ips.length === 0) {\n return ip\n }\n\n if (family.offset == null || family.offset === maxInt) {\n family.offset = 0\n } else {\n family.offset++\n }\n\n const position = family.offset % family.ips.length\n ip = family.ips[position] ?? null\n\n if (ip == null) {\n return ip\n }\n\n if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms\n // We delete expired records\n // It is possible that they have different TTL, so we manage them individually\n family.ips.splice(position, 1)\n return this.pick(origin, hostnameRecords, affinity)\n }\n\n return ip\n }\n\n setRecords (origin, addresses) {\n const timestamp = Date.now()\n const records = { records: { 4: null, 6: null } }\n for (const record of addresses) {\n record.timestamp = timestamp\n if (typeof record.ttl === 'number') {\n // The record TTL is expected to be in ms\n record.ttl = Math.min(record.ttl, this.#maxTTL)\n } else {\n record.ttl = this.#maxTTL\n }\n\n const familyRecords = records.records[record.family] ?? { ips: [] }\n\n familyRecords.ips.push(record)\n records.records[record.family] = familyRecords\n }\n\n this.#records.set(origin.hostname, records)\n }\n\n getHandler (meta, opts) {\n return new DNSDispatchHandler(this, meta, opts)\n }\n}\n\nclass DNSDispatchHandler extends DecoratorHandler {\n #state = null\n #opts = null\n #dispatch = null\n #handler = null\n #origin = null\n\n constructor (state, { origin, handler, dispatch }, opts) {\n super(handler)\n this.#origin = origin\n this.#handler = handler\n this.#opts = { ...opts }\n this.#state = state\n this.#dispatch = dispatch\n }\n\n onError (err) {\n switch (err.code) {\n case 'ETIMEDOUT':\n case 'ECONNREFUSED': {\n if (this.#state.dualStack) {\n // We delete the record and retry\n this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => {\n if (err) {\n return this.#handler.onError(err)\n }\n\n const dispatchOpts = {\n ...this.#opts,\n origin: newOrigin\n }\n\n this.#dispatch(dispatchOpts, this)\n })\n\n // if dual-stack disabled, we error out\n return\n }\n\n this.#handler.onError(err)\n return\n }\n case 'ENOTFOUND':\n this.#state.deleteRecord(this.#origin)\n // eslint-disable-next-line no-fallthrough\n default:\n this.#handler.onError(err)\n break\n }\n }\n}\n\nmodule.exports = interceptorOpts => {\n if (\n interceptorOpts?.maxTTL != null &&\n (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0)\n ) {\n throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number')\n }\n\n if (\n interceptorOpts?.maxItems != null &&\n (typeof interceptorOpts?.maxItems !== 'number' ||\n interceptorOpts?.maxItems < 1)\n ) {\n throw new InvalidArgumentError(\n 'Invalid maxItems. Must be a positive number and greater than zero'\n )\n }\n\n if (\n interceptorOpts?.affinity != null &&\n interceptorOpts?.affinity !== 4 &&\n interceptorOpts?.affinity !== 6\n ) {\n throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6')\n }\n\n if (\n interceptorOpts?.dualStack != null &&\n typeof interceptorOpts?.dualStack !== 'boolean'\n ) {\n throw new InvalidArgumentError('Invalid dualStack. Must be a boolean')\n }\n\n if (\n interceptorOpts?.lookup != null &&\n typeof interceptorOpts?.lookup !== 'function'\n ) {\n throw new InvalidArgumentError('Invalid lookup. Must be a function')\n }\n\n if (\n interceptorOpts?.pick != null &&\n typeof interceptorOpts?.pick !== 'function'\n ) {\n throw new InvalidArgumentError('Invalid pick. Must be a function')\n }\n\n const dualStack = interceptorOpts?.dualStack ?? true\n let affinity\n if (dualStack) {\n affinity = interceptorOpts?.affinity ?? null\n } else {\n affinity = interceptorOpts?.affinity ?? 4\n }\n\n const opts = {\n maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms\n lookup: interceptorOpts?.lookup ?? null,\n pick: interceptorOpts?.pick ?? null,\n dualStack,\n affinity,\n maxItems: interceptorOpts?.maxItems ?? Infinity\n }\n\n const instance = new DNSInstance(opts)\n\n return dispatch => {\n return function dnsInterceptor (origDispatchOpts, handler) {\n const origin =\n origDispatchOpts.origin.constructor === URL\n ? origDispatchOpts.origin\n : new URL(origDispatchOpts.origin)\n\n if (isIP(origin.hostname) !== 0) {\n return dispatch(origDispatchOpts, handler)\n }\n\n instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {\n if (err) {\n return handler.onError(err)\n }\n\n let dispatchOpts = null\n dispatchOpts = {\n ...origDispatchOpts,\n servername: origin.hostname, // For SNI on TLS\n origin: newOrigin,\n headers: {\n host: origin.hostname,\n ...origDispatchOpts.headers\n }\n }\n\n dispatch(\n dispatchOpts,\n instance.getHandler({ origin, dispatch, handler }, origDispatchOpts)\n )\n })\n\n return true\n }\n }\n}\n", "// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst { kConstruct } = require('../../core/symbols')\nconst { kEnumerableProperty } = require('../../core/util')\nconst {\n iteratorMixin,\n isValidHeaderName,\n isValidHeaderValue\n} = require('./util')\nconst { webidl } = require('./webidl')\nconst assert = require('node:assert')\nconst util = require('node:util')\n\nconst kHeadersMap = Symbol('headers map')\nconst kHeadersSortedMap = Symbol('headers map sorted')\n\n/**\n * @param {number} code\n */\nfunction isHTTPWhiteSpaceCharCode (code) {\n return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize\n * @param {string} potentialValue\n */\nfunction headerValueNormalize (potentialValue) {\n // To normalize a byte sequence potentialValue, remove\n // any leading and trailing HTTP whitespace bytes from\n // potentialValue.\n let i = 0; let j = potentialValue.length\n\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i\n\n return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j)\n}\n\nfunction fill (headers, object) {\n // To fill a Headers object headers with a given object object, run these steps:\n\n // 1. If object is a sequence, then for each header in object:\n // Note: webidl conversion to array has already been done.\n if (Array.isArray(object)) {\n for (let i = 0; i < object.length; ++i) {\n const header = object[i]\n // 1. If header does not contain exactly two items, then throw a TypeError.\n if (header.length !== 2) {\n throw webidl.errors.exception({\n header: 'Headers constructor',\n message: `expected name/value pair to be length 2, found ${header.length}.`\n })\n }\n\n // 2. Append (header\u2019s first item, header\u2019s second item) to headers.\n appendHeader(headers, header[0], header[1])\n }\n } else if (typeof object === 'object' && object !== null) {\n // Note: null should throw\n\n // 2. Otherwise, object is a record, then for each key \u2192 value in object,\n // append (key, value) to headers\n const keys = Object.keys(object)\n for (let i = 0; i < keys.length; ++i) {\n appendHeader(headers, keys[i], object[keys[i]])\n }\n } else {\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-headers-append\n */\nfunction appendHeader (headers, name, value) {\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value,\n type: 'header value'\n })\n }\n\n // 3. If headers\u2019s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if headers\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if headers\u2019s guard is \"request-no-cors\":\n // TODO\n // Note: undici does not implement forbidden header names\n if (getHeadersGuard(headers) === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 6. Otherwise, if headers\u2019s guard is \"response\" and name is a\n // forbidden response-header name, return.\n\n // 7. Append (name, value) to headers\u2019s header list.\n return getHeadersList(headers).append(name, value, false)\n\n // 8. If headers\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from headers\n}\n\nfunction compareHeaderName (a, b) {\n return a[0] < b[0] ? -1 : 1\n}\n\nclass HeadersList {\n /** @type {[string, string][]|null} */\n cookies = null\n\n constructor (init) {\n if (init instanceof HeadersList) {\n this[kHeadersMap] = new Map(init[kHeadersMap])\n this[kHeadersSortedMap] = init[kHeadersSortedMap]\n this.cookies = init.cookies === null ? null : [...init.cookies]\n } else {\n this[kHeadersMap] = new Map(init)\n this[kHeadersSortedMap] = null\n }\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#header-list-contains\n * @param {string} name\n * @param {boolean} isLowerCase\n */\n contains (name, isLowerCase) {\n // A header list list contains a header name name if list\n // contains a header whose name is a byte-case-insensitive\n // match for name.\n\n return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase())\n }\n\n clear () {\n this[kHeadersMap].clear()\n this[kHeadersSortedMap] = null\n this.cookies = null\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-append\n * @param {string} name\n * @param {string} value\n * @param {boolean} isLowerCase\n */\n append (name, value, isLowerCase) {\n this[kHeadersSortedMap] = null\n\n // 1. If list contains name, then set name to the first such\n // header\u2019s name.\n const lowercaseName = isLowerCase ? name : name.toLowerCase()\n const exists = this[kHeadersMap].get(lowercaseName)\n\n // 2. Append (name, value) to list.\n if (exists) {\n const delimiter = lowercaseName === 'cookie' ? '; ' : ', '\n this[kHeadersMap].set(lowercaseName, {\n name: exists.name,\n value: `${exists.value}${delimiter}${value}`\n })\n } else {\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n if (lowercaseName === 'set-cookie') {\n (this.cookies ??= []).push(value)\n }\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-set\n * @param {string} name\n * @param {string} value\n * @param {boolean} isLowerCase\n */\n set (name, value, isLowerCase) {\n this[kHeadersSortedMap] = null\n const lowercaseName = isLowerCase ? name : name.toLowerCase()\n\n if (lowercaseName === 'set-cookie') {\n this.cookies = [value]\n }\n\n // 1. If list contains name, then set the value of\n // the first such header to value and remove the\n // others.\n // 2. Otherwise, append header (name, value) to list.\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-delete\n * @param {string} name\n * @param {boolean} isLowerCase\n */\n delete (name, isLowerCase) {\n this[kHeadersSortedMap] = null\n if (!isLowerCase) name = name.toLowerCase()\n\n if (name === 'set-cookie') {\n this.cookies = null\n }\n\n this[kHeadersMap].delete(name)\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-get\n * @param {string} name\n * @param {boolean} isLowerCase\n * @returns {string | null}\n */\n get (name, isLowerCase) {\n // 1. If list does not contain name, then return null.\n // 2. Return the values of all headers in list whose name\n // is a byte-case-insensitive match for name,\n // separated from each other by 0x2C 0x20, in order.\n return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null\n }\n\n * [Symbol.iterator] () {\n // use the lowercased name\n for (const { 0: name, 1: { value } } of this[kHeadersMap]) {\n yield [name, value]\n }\n }\n\n get entries () {\n const headers = {}\n\n if (this[kHeadersMap].size !== 0) {\n for (const { name, value } of this[kHeadersMap].values()) {\n headers[name] = value\n }\n }\n\n return headers\n }\n\n rawValues () {\n return this[kHeadersMap].values()\n }\n\n get entriesList () {\n const headers = []\n\n if (this[kHeadersMap].size !== 0) {\n for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) {\n if (lowerName === 'set-cookie') {\n for (const cookie of this.cookies) {\n headers.push([name, cookie])\n }\n } else {\n headers.push([name, value])\n }\n }\n }\n\n return headers\n }\n\n // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set\n toSortedArray () {\n const size = this[kHeadersMap].size\n const array = new Array(size)\n // In most cases, you will use the fast-path.\n // fast-path: Use binary insertion sort for small arrays.\n if (size <= 32) {\n if (size === 0) {\n // If empty, it is an empty array. To avoid the first index assignment.\n return array\n }\n // Improve performance by unrolling loop and avoiding double-loop.\n // Double-loop-less version of the binary insertion sort.\n const iterator = this[kHeadersMap][Symbol.iterator]()\n const firstValue = iterator.next().value\n // set [name, value] to first index.\n array[0] = [firstValue[0], firstValue[1].value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(firstValue[1].value !== null)\n for (\n let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value;\n i < size;\n ++i\n ) {\n // get next value\n value = iterator.next().value\n // set [name, value] to current index.\n x = array[i] = [value[0], value[1].value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(x[1] !== null)\n left = 0\n right = i\n // binary search\n while (left < right) {\n // middle index\n pivot = left + ((right - left) >> 1)\n // compare header name\n if (array[pivot][0] <= x[0]) {\n left = pivot + 1\n } else {\n right = pivot\n }\n }\n if (i !== pivot) {\n j = i\n while (j > left) {\n array[j] = array[--j]\n }\n array[left] = x\n }\n }\n /* c8 ignore next 4 */\n if (!iterator.next().done) {\n // This is for debugging and will never be called.\n throw new TypeError('Unreachable')\n }\n return array\n } else {\n // This case would be a rare occurrence.\n // slow-path: fallback\n let i = 0\n for (const { 0: name, 1: { value } } of this[kHeadersMap]) {\n array[i++] = [name, value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(value !== null)\n }\n return array.sort(compareHeaderName)\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#headers-class\nclass Headers {\n #guard\n #headersList\n\n constructor (init = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (init === kConstruct) {\n return\n }\n\n this.#headersList = new HeadersList()\n\n // The new Headers(init) constructor steps are:\n\n // 1. Set this\u2019s guard to \"none\".\n this.#guard = 'none'\n\n // 2. If init is given, then fill this with init.\n if (init !== undefined) {\n init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init')\n fill(this, init)\n }\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-append\n append (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, 'Headers.append')\n\n const prefix = 'Headers.append'\n name = webidl.converters.ByteString(name, prefix, 'name')\n value = webidl.converters.ByteString(value, prefix, 'value')\n\n return appendHeader(this, name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-delete\n delete (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.delete')\n\n const prefix = 'Headers.delete'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.delete',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. If this\u2019s guard is \"immutable\", then throw a TypeError.\n // 3. Otherwise, if this\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 4. Otherwise, if this\u2019s guard is \"request-no-cors\", name\n // is not a no-CORS-safelisted request-header name, and\n // name is not a privileged no-CORS request-header name,\n // return.\n // 5. Otherwise, if this\u2019s guard is \"response\" and name is\n // a forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this.#guard === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 6. If this\u2019s header list does not contain name, then\n // return.\n if (!this.#headersList.contains(name, false)) {\n return\n }\n\n // 7. Delete name from this\u2019s header list.\n // 8. If this\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this.\n this.#headersList.delete(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-get\n get (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.get')\n\n const prefix = 'Headers.get'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return the result of getting name from this\u2019s header\n // list.\n return this.#headersList.get(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-has\n has (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.has')\n\n const prefix = 'Headers.has'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return true if this\u2019s header list contains name;\n // otherwise false.\n return this.#headersList.contains(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-set\n set (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, 'Headers.set')\n\n const prefix = 'Headers.set'\n name = webidl.converters.ByteString(name, prefix, 'name')\n value = webidl.converters.ByteString(value, prefix, 'value')\n\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value,\n type: 'header value'\n })\n }\n\n // 3. If this\u2019s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if this\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if this\u2019s guard is \"request-no-cors\" and\n // name/value is not a no-CORS-safelisted request-header,\n // return.\n // 6. Otherwise, if this\u2019s guard is \"response\" and name is a\n // forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this.#guard === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 7. Set (name, value) in this\u2019s header list.\n // 8. If this\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this\n this.#headersList.set(name, value, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie\n getSetCookie () {\n webidl.brandCheck(this, Headers)\n\n // 1. If this\u2019s header list does not contain `Set-Cookie`, then return \u00AB \u00BB.\n // 2. Return the values of all headers in this\u2019s header list whose name is\n // a byte-case-insensitive match for `Set-Cookie`, in order.\n\n const list = this.#headersList.cookies\n\n if (list) {\n return [...list]\n }\n\n return []\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n get [kHeadersSortedMap] () {\n if (this.#headersList[kHeadersSortedMap]) {\n return this.#headersList[kHeadersSortedMap]\n }\n\n // 1. Let headers be an empty list of headers with the key being the name\n // and value the value.\n const headers = []\n\n // 2. Let names be the result of convert header names to a sorted-lowercase\n // set with all the names of the headers in list.\n const names = this.#headersList.toSortedArray()\n\n const cookies = this.#headersList.cookies\n\n // fast-path\n if (cookies === null || cookies.length === 1) {\n // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray`\n return (this.#headersList[kHeadersSortedMap] = names)\n }\n\n // 3. For each name of names:\n for (let i = 0; i < names.length; ++i) {\n const { 0: name, 1: value } = names[i]\n // 1. If name is `set-cookie`, then:\n if (name === 'set-cookie') {\n // 1. Let values be a list of all values of headers in list whose name\n // is a byte-case-insensitive match for name, in order.\n\n // 2. For each value of values:\n // 1. Append (name, value) to headers.\n for (let j = 0; j < cookies.length; ++j) {\n headers.push([name, cookies[j]])\n }\n } else {\n // 2. Otherwise:\n\n // 1. Let value be the result of getting name from list.\n\n // 2. Assert: value is non-null.\n // Note: This operation was done by `HeadersList#toSortedArray`.\n\n // 3. Append (name, value) to headers.\n headers.push([name, value])\n }\n }\n\n // 4. Return headers.\n return (this.#headersList[kHeadersSortedMap] = headers)\n }\n\n [util.inspect.custom] (depth, options) {\n options.depth ??= depth\n\n return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`\n }\n\n static getHeadersGuard (o) {\n return o.#guard\n }\n\n static setHeadersGuard (o, guard) {\n o.#guard = guard\n }\n\n static getHeadersList (o) {\n return o.#headersList\n }\n\n static setHeadersList (o, list) {\n o.#headersList = list\n }\n}\n\nconst { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers\nReflect.deleteProperty(Headers, 'getHeadersGuard')\nReflect.deleteProperty(Headers, 'setHeadersGuard')\nReflect.deleteProperty(Headers, 'getHeadersList')\nReflect.deleteProperty(Headers, 'setHeadersList')\n\niteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1)\n\nObject.defineProperties(Headers.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n getSetCookie: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Headers',\n configurable: true\n },\n [util.inspect.custom]: {\n enumerable: false\n }\n})\n\nwebidl.converters.HeadersInit = function (V, prefix, argument) {\n if (webidl.util.Type(V) === 'Object') {\n const iterator = Reflect.get(V, Symbol.iterator)\n\n // A work-around to ensure we send the properly-cased Headers when V is a Headers object.\n // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please.\n if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object\n try {\n return getHeadersList(V).entriesList\n } catch {\n // fall-through\n }\n }\n\n if (typeof iterator === 'function') {\n return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V))\n }\n\n return webidl.converters['record'](V, prefix, argument)\n }\n\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n}\n\nmodule.exports = {\n fill,\n // for test.\n compareHeaderName,\n Headers,\n HeadersList,\n getHeadersGuard,\n setHeadersGuard,\n setHeadersList,\n getHeadersList\n}\n", "'use strict'\n\nconst { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require('./headers')\nconst { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require('./body')\nconst util = require('../../core/util')\nconst nodeUtil = require('node:util')\nconst { kEnumerableProperty } = util\nconst {\n isValidReasonPhrase,\n isCancelled,\n isAborted,\n isBlobLike,\n serializeJavascriptValueToJSONString,\n isErrorLike,\n isomorphicEncode,\n environmentSettingsObject: relevantRealm\n} = require('./util')\nconst {\n redirectStatusSet,\n nullBodyStatus\n} = require('./constants')\nconst { kState, kHeaders } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { FormData } = require('./formdata')\nconst { URLSerializer } = require('./data-url')\nconst { kConstruct } = require('../../core/symbols')\nconst assert = require('node:assert')\nconst { types } = require('node:util')\n\nconst textEncoder = new TextEncoder('utf-8')\n\n// https://fetch.spec.whatwg.org/#response-class\nclass Response {\n // Creates network error Response.\n static error () {\n // The static error() method steps are to return the result of creating a\n // Response object, given a new network error, \"immutable\", and this\u2019s\n // relevant Realm.\n const responseObject = fromInnerResponse(makeNetworkError(), 'immutable')\n\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response-json\n static json (data, init = {}) {\n webidl.argumentLengthCheck(arguments, 1, 'Response.json')\n\n if (init !== null) {\n init = webidl.converters.ResponseInit(init)\n }\n\n // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n const bytes = textEncoder.encode(\n serializeJavascriptValueToJSONString(data)\n )\n\n // 2. Let body be the result of extracting bytes.\n const body = extractBody(bytes)\n\n // 3. Let responseObject be the result of creating a Response object, given a new response,\n // \"response\", and this\u2019s relevant Realm.\n const responseObject = fromInnerResponse(makeResponse({}), 'response')\n\n // 4. Perform initialize a response given responseObject, init, and (body, \"application/json\").\n initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })\n\n // 5. Return responseObject.\n return responseObject\n }\n\n // Creates a redirect Response that redirects to url with status status.\n static redirect (url, status = 302) {\n webidl.argumentLengthCheck(arguments, 1, 'Response.redirect')\n\n url = webidl.converters.USVString(url)\n status = webidl.converters['unsigned short'](status)\n\n // 1. Let parsedURL be the result of parsing url with current settings\n // object\u2019s API base URL.\n // 2. If parsedURL is failure, then throw a TypeError.\n // TODO: base-URL?\n let parsedURL\n try {\n parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl)\n } catch (err) {\n throw new TypeError(`Failed to parse URL from ${url}`, { cause: err })\n }\n\n // 3. If status is not a redirect status, then throw a RangeError.\n if (!redirectStatusSet.has(status)) {\n throw new RangeError(`Invalid status code ${status}`)\n }\n\n // 4. Let responseObject be the result of creating a Response object,\n // given a new response, \"immutable\", and this\u2019s relevant Realm.\n const responseObject = fromInnerResponse(makeResponse({}), 'immutable')\n\n // 5. Set responseObject\u2019s response\u2019s status to status.\n responseObject[kState].status = status\n\n // 6. Let value be parsedURL, serialized and isomorphic encoded.\n const value = isomorphicEncode(URLSerializer(parsedURL))\n\n // 7. Append `Location`/value to responseObject\u2019s response\u2019s header list.\n responseObject[kState].headersList.append('location', value, true)\n\n // 8. Return responseObject.\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response\n constructor (body = null, init = {}) {\n webidl.util.markAsUncloneable(this)\n if (body === kConstruct) {\n return\n }\n\n if (body !== null) {\n body = webidl.converters.BodyInit(body)\n }\n\n init = webidl.converters.ResponseInit(init)\n\n // 1. Set this\u2019s response to a new response.\n this[kState] = makeResponse({})\n\n // 2. Set this\u2019s headers to a new Headers object with this\u2019s relevant\n // Realm, whose header list is this\u2019s response\u2019s header list and guard\n // is \"response\".\n this[kHeaders] = new Headers(kConstruct)\n setHeadersGuard(this[kHeaders], 'response')\n setHeadersList(this[kHeaders], this[kState].headersList)\n\n // 3. Let bodyWithType be null.\n let bodyWithType = null\n\n // 4. If body is non-null, then set bodyWithType to the result of extracting body.\n if (body != null) {\n const [extractedBody, type] = extractBody(body)\n bodyWithType = { body: extractedBody, type }\n }\n\n // 5. Perform initialize a response given this, init, and bodyWithType.\n initializeResponse(this, init, bodyWithType)\n }\n\n // Returns response\u2019s type, e.g., \"cors\".\n get type () {\n webidl.brandCheck(this, Response)\n\n // The type getter steps are to return this\u2019s response\u2019s type.\n return this[kState].type\n }\n\n // Returns response\u2019s URL, if it has one; otherwise the empty string.\n get url () {\n webidl.brandCheck(this, Response)\n\n const urlList = this[kState].urlList\n\n // The url getter steps are to return the empty string if this\u2019s\n // response\u2019s URL is null; otherwise this\u2019s response\u2019s URL,\n // serialized with exclude fragment set to true.\n const url = urlList[urlList.length - 1] ?? null\n\n if (url === null) {\n return ''\n }\n\n return URLSerializer(url, true)\n }\n\n // Returns whether response was obtained through a redirect.\n get redirected () {\n webidl.brandCheck(this, Response)\n\n // The redirected getter steps are to return true if this\u2019s response\u2019s URL\n // list has more than one item; otherwise false.\n return this[kState].urlList.length > 1\n }\n\n // Returns response\u2019s status.\n get status () {\n webidl.brandCheck(this, Response)\n\n // The status getter steps are to return this\u2019s response\u2019s status.\n return this[kState].status\n }\n\n // Returns whether response\u2019s status is an ok status.\n get ok () {\n webidl.brandCheck(this, Response)\n\n // The ok getter steps are to return true if this\u2019s response\u2019s status is an\n // ok status; otherwise false.\n return this[kState].status >= 200 && this[kState].status <= 299\n }\n\n // Returns response\u2019s status message.\n get statusText () {\n webidl.brandCheck(this, Response)\n\n // The statusText getter steps are to return this\u2019s response\u2019s status\n // message.\n return this[kState].statusText\n }\n\n // Returns response\u2019s headers as Headers.\n get headers () {\n webidl.brandCheck(this, Response)\n\n // The headers getter steps are to return this\u2019s headers.\n return this[kHeaders]\n }\n\n get body () {\n webidl.brandCheck(this, Response)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Response)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n // Returns a clone of response.\n clone () {\n webidl.brandCheck(this, Response)\n\n // 1. If this is unusable, then throw a TypeError.\n if (bodyUnusable(this)) {\n throw webidl.errors.exception({\n header: 'Response.clone',\n message: 'Body has already been consumed.'\n })\n }\n\n // 2. Let clonedResponse be the result of cloning this\u2019s response.\n const clonedResponse = cloneResponse(this[kState])\n\n // Note: To re-register because of a new stream.\n if (hasFinalizationRegistry && this[kState].body?.stream) {\n streamRegistry.register(this, new WeakRef(this[kState].body.stream))\n }\n\n // 3. Return the result of creating a Response object, given\n // clonedResponse, this\u2019s headers\u2019s guard, and this\u2019s relevant Realm.\n return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders]))\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n if (options.depth === null) {\n options.depth = 2\n }\n\n options.colors ??= true\n\n const properties = {\n status: this.status,\n statusText: this.statusText,\n headers: this.headers,\n body: this.body,\n bodyUsed: this.bodyUsed,\n ok: this.ok,\n redirected: this.redirected,\n type: this.type,\n url: this.url\n }\n\n return `Response ${nodeUtil.formatWithOptions(options, properties)}`\n }\n}\n\nmixinBody(Response)\n\nObject.defineProperties(Response.prototype, {\n type: kEnumerableProperty,\n url: kEnumerableProperty,\n status: kEnumerableProperty,\n ok: kEnumerableProperty,\n redirected: kEnumerableProperty,\n statusText: kEnumerableProperty,\n headers: kEnumerableProperty,\n clone: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Response',\n configurable: true\n }\n})\n\nObject.defineProperties(Response, {\n json: kEnumerableProperty,\n redirect: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\n// https://fetch.spec.whatwg.org/#concept-response-clone\nfunction cloneResponse (response) {\n // To clone a response response, run these steps:\n\n // 1. If response is a filtered response, then return a new identical\n // filtered response whose internal response is a clone of response\u2019s\n // internal response.\n if (response.internalResponse) {\n return filterResponse(\n cloneResponse(response.internalResponse),\n response.type\n )\n }\n\n // 2. Let newResponse be a copy of response, except for its body.\n const newResponse = makeResponse({ ...response, body: null })\n\n // 3. If response\u2019s body is non-null, then set newResponse\u2019s body to the\n // result of cloning response\u2019s body.\n if (response.body != null) {\n newResponse.body = cloneBody(newResponse, response.body)\n }\n\n // 4. Return newResponse.\n return newResponse\n}\n\nfunction makeResponse (init) {\n return {\n aborted: false,\n rangeRequested: false,\n timingAllowPassed: false,\n requestIncludesCredentials: false,\n type: 'default',\n status: 200,\n timingInfo: null,\n cacheState: '',\n statusText: '',\n ...init,\n headersList: init?.headersList\n ? new HeadersList(init?.headersList)\n : new HeadersList(),\n urlList: init?.urlList ? [...init.urlList] : []\n }\n}\n\nfunction makeNetworkError (reason) {\n const isError = isErrorLike(reason)\n return makeResponse({\n type: 'error',\n status: 0,\n error: isError\n ? reason\n : new Error(reason ? String(reason) : reason),\n aborted: reason && reason.name === 'AbortError'\n })\n}\n\n// @see https://fetch.spec.whatwg.org/#concept-network-error\nfunction isNetworkError (response) {\n return (\n // A network error is a response whose type is \"error\",\n response.type === 'error' &&\n // status is 0\n response.status === 0\n )\n}\n\nfunction makeFilteredResponse (response, state) {\n state = {\n internalResponse: response,\n ...state\n }\n\n return new Proxy(response, {\n get (target, p) {\n return p in state ? state[p] : target[p]\n },\n set (target, p, value) {\n assert(!(p in state))\n target[p] = value\n return true\n }\n })\n}\n\n// https://fetch.spec.whatwg.org/#concept-filtered-response\nfunction filterResponse (response, type) {\n // Set response to the following filtered response with response as its\n // internal response, depending on request\u2019s response tainting:\n if (type === 'basic') {\n // A basic filtered response is a filtered response whose type is \"basic\"\n // and header list excludes any headers in internal response\u2019s header list\n // whose name is a forbidden response-header name.\n\n // Note: undici does not implement forbidden response-header names\n return makeFilteredResponse(response, {\n type: 'basic',\n headersList: response.headersList\n })\n } else if (type === 'cors') {\n // A CORS filtered response is a filtered response whose type is \"cors\"\n // and header list excludes any headers in internal response\u2019s header\n // list whose name is not a CORS-safelisted response-header name, given\n // internal response\u2019s CORS-exposed header-name list.\n\n // Note: undici does not implement CORS-safelisted response-header names\n return makeFilteredResponse(response, {\n type: 'cors',\n headersList: response.headersList\n })\n } else if (type === 'opaque') {\n // An opaque filtered response is a filtered response whose type is\n // \"opaque\", URL list is the empty list, status is 0, status message\n // is the empty byte sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaque',\n urlList: Object.freeze([]),\n status: 0,\n statusText: '',\n body: null\n })\n } else if (type === 'opaqueredirect') {\n // An opaque-redirect filtered response is a filtered response whose type\n // is \"opaqueredirect\", status is 0, status message is the empty byte\n // sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaqueredirect',\n status: 0,\n statusText: '',\n headersList: [],\n body: null\n })\n } else {\n assert(false)\n }\n}\n\n// https://fetch.spec.whatwg.org/#appropriate-network-error\nfunction makeAppropriateNetworkError (fetchParams, err = null) {\n // 1. Assert: fetchParams is canceled.\n assert(isCancelled(fetchParams))\n\n // 2. Return an aborted network error if fetchParams is aborted;\n // otherwise return a network error.\n return isAborted(fetchParams)\n ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))\n : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))\n}\n\n// https://whatpr.org/fetch/1392.html#initialize-a-response\nfunction initializeResponse (response, init, body) {\n // 1. If init[\"status\"] is not in the range 200 to 599, inclusive, then\n // throw a RangeError.\n if (init.status !== null && (init.status < 200 || init.status > 599)) {\n throw new RangeError('init[\"status\"] must be in the range of 200 to 599, inclusive.')\n }\n\n // 2. If init[\"statusText\"] does not match the reason-phrase token production,\n // then throw a TypeError.\n if ('statusText' in init && init.statusText != null) {\n // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:\n // reason-phrase = *( HTAB / SP / VCHAR / obs-text )\n if (!isValidReasonPhrase(String(init.statusText))) {\n throw new TypeError('Invalid statusText')\n }\n }\n\n // 3. Set response\u2019s response\u2019s status to init[\"status\"].\n if ('status' in init && init.status != null) {\n response[kState].status = init.status\n }\n\n // 4. Set response\u2019s response\u2019s status message to init[\"statusText\"].\n if ('statusText' in init && init.statusText != null) {\n response[kState].statusText = init.statusText\n }\n\n // 5. If init[\"headers\"] exists, then fill response\u2019s headers with init[\"headers\"].\n if ('headers' in init && init.headers != null) {\n fill(response[kHeaders], init.headers)\n }\n\n // 6. If body was given, then:\n if (body) {\n // 1. If response's status is a null body status, then throw a TypeError.\n if (nullBodyStatus.includes(response.status)) {\n throw webidl.errors.exception({\n header: 'Response constructor',\n message: `Invalid response status code ${response.status}`\n })\n }\n\n // 2. Set response's body to body's body.\n response[kState].body = body.body\n\n // 3. If body's type is non-null and response's header list does not contain\n // `Content-Type`, then append (`Content-Type`, body's type) to response's header list.\n if (body.type != null && !response[kState].headersList.contains('content-type', true)) {\n response[kState].headersList.append('content-type', body.type, true)\n }\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#response-create\n * @param {any} innerResponse\n * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard\n * @returns {Response}\n */\nfunction fromInnerResponse (innerResponse, guard) {\n const response = new Response(kConstruct)\n response[kState] = innerResponse\n response[kHeaders] = new Headers(kConstruct)\n setHeadersList(response[kHeaders], innerResponse.headersList)\n setHeadersGuard(response[kHeaders], guard)\n\n if (hasFinalizationRegistry && innerResponse.body?.stream) {\n // If the target (response) is reclaimed, the cleanup callback may be called at some point with\n // the held value provided for it (innerResponse.body.stream). The held value can be any value:\n // a primitive or an object, even undefined. If the held value is an object, the registry keeps\n // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n streamRegistry.register(response, new WeakRef(innerResponse.body.stream))\n }\n\n return response\n}\n\nwebidl.converters.ReadableStream = webidl.interfaceConverter(\n ReadableStream\n)\n\nwebidl.converters.FormData = webidl.interfaceConverter(\n FormData\n)\n\nwebidl.converters.URLSearchParams = webidl.interfaceConverter(\n URLSearchParams\n)\n\n// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit\nwebidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V, prefix, name)\n }\n\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, prefix, name, { strict: false })\n }\n\n if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) {\n return webidl.converters.BufferSource(V, prefix, name)\n }\n\n if (util.isFormDataLike(V)) {\n return webidl.converters.FormData(V, prefix, name, { strict: false })\n }\n\n if (V instanceof URLSearchParams) {\n return webidl.converters.URLSearchParams(V, prefix, name)\n }\n\n return webidl.converters.DOMString(V, prefix, name)\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit\nwebidl.converters.BodyInit = function (V, prefix, argument) {\n if (V instanceof ReadableStream) {\n return webidl.converters.ReadableStream(V, prefix, argument)\n }\n\n // Note: the spec doesn't include async iterables,\n // this is an undici extension.\n if (V?.[Symbol.asyncIterator]) {\n return V\n }\n\n return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument)\n}\n\nwebidl.converters.ResponseInit = webidl.dictionaryConverter([\n {\n key: 'status',\n converter: webidl.converters['unsigned short'],\n defaultValue: () => 200\n },\n {\n key: 'statusText',\n converter: webidl.converters.ByteString,\n defaultValue: () => ''\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n }\n])\n\nmodule.exports = {\n isNetworkError,\n makeNetworkError,\n makeResponse,\n makeAppropriateNetworkError,\n filterResponse,\n Response,\n cloneResponse,\n fromInnerResponse\n}\n", "'use strict'\n\nconst { kConnected, kSize } = require('../../core/symbols')\n\nclass CompatWeakRef {\n constructor (value) {\n this.value = value\n }\n\n deref () {\n return this.value[kConnected] === 0 && this.value[kSize] === 0\n ? undefined\n : this.value\n }\n}\n\nclass CompatFinalizer {\n constructor (finalizer) {\n this.finalizer = finalizer\n }\n\n register (dispatcher, key) {\n if (dispatcher.on) {\n dispatcher.on('disconnect', () => {\n if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {\n this.finalizer(key)\n }\n })\n }\n }\n\n unregister (key) {}\n}\n\nmodule.exports = function () {\n // FIXME: remove workaround when the Node bug is backported to v18\n // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\n if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) {\n process._rawDebug('Using compatibility WeakRef and FinalizationRegistry')\n return {\n WeakRef: CompatWeakRef,\n FinalizationRegistry: CompatFinalizer\n }\n }\n return { WeakRef, FinalizationRegistry }\n}\n", "/* globals AbortController */\n\n'use strict'\n\nconst { extractBody, mixinBody, cloneBody, bodyUnusable } = require('./body')\nconst { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require('./headers')\nconst { FinalizationRegistry } = require('./dispatcher-weakref')()\nconst util = require('../../core/util')\nconst nodeUtil = require('node:util')\nconst {\n isValidHTTPToken,\n sameOrigin,\n environmentSettingsObject\n} = require('./util')\nconst {\n forbiddenMethodsSet,\n corsSafeListedMethodsSet,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n requestDuplex\n} = require('./constants')\nconst { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util\nconst { kHeaders, kSignal, kState, kDispatcher } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { URLSerializer } = require('./data-url')\nconst { kConstruct } = require('../../core/symbols')\nconst assert = require('node:assert')\nconst { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('node:events')\n\nconst kAbortController = Symbol('abortController')\n\nconst requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {\n signal.removeEventListener('abort', abort)\n})\n\nconst dependentControllerMap = new WeakMap()\n\nfunction buildAbort (acRef) {\n return abort\n\n function abort () {\n const ac = acRef.deref()\n if (ac !== undefined) {\n // Currently, there is a problem with FinalizationRegistry.\n // https://github.com/nodejs/node/issues/49344\n // https://github.com/nodejs/node/issues/47748\n // In the case of abort, the first step is to unregister from it.\n // If the controller can refer to it, it is still registered.\n // It will be removed in the future.\n requestFinalizer.unregister(abort)\n\n // Unsubscribe a listener.\n // FinalizationRegistry will no longer be called, so this must be done.\n this.removeEventListener('abort', abort)\n\n ac.abort(this.reason)\n\n const controllerList = dependentControllerMap.get(ac.signal)\n\n if (controllerList !== undefined) {\n if (controllerList.size !== 0) {\n for (const ref of controllerList) {\n const ctrl = ref.deref()\n if (ctrl !== undefined) {\n ctrl.abort(this.reason)\n }\n }\n controllerList.clear()\n }\n dependentControllerMap.delete(ac.signal)\n }\n }\n }\n}\n\nlet patchMethodWarning = false\n\n// https://fetch.spec.whatwg.org/#request-class\nclass Request {\n // https://fetch.spec.whatwg.org/#dom-request\n constructor (input, init = {}) {\n webidl.util.markAsUncloneable(this)\n if (input === kConstruct) {\n return\n }\n\n const prefix = 'Request constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n input = webidl.converters.RequestInfo(input, prefix, 'input')\n init = webidl.converters.RequestInit(init, prefix, 'init')\n\n // 1. Let request be null.\n let request = null\n\n // 2. Let fallbackMode be null.\n let fallbackMode = null\n\n // 3. Let baseURL be this\u2019s relevant settings object\u2019s API base URL.\n const baseUrl = environmentSettingsObject.settingsObject.baseUrl\n\n // 4. Let signal be null.\n let signal = null\n\n // 5. If input is a string, then:\n if (typeof input === 'string') {\n this[kDispatcher] = init.dispatcher\n\n // 1. Let parsedURL be the result of parsing input with baseURL.\n // 2. If parsedURL is failure, then throw a TypeError.\n let parsedURL\n try {\n parsedURL = new URL(input, baseUrl)\n } catch (err) {\n throw new TypeError('Failed to parse URL from ' + input, { cause: err })\n }\n\n // 3. If parsedURL includes credentials, then throw a TypeError.\n if (parsedURL.username || parsedURL.password) {\n throw new TypeError(\n 'Request cannot be constructed from a URL that includes credentials: ' +\n input\n )\n }\n\n // 4. Set request to a new request whose URL is parsedURL.\n request = makeRequest({ urlList: [parsedURL] })\n\n // 5. Set fallbackMode to \"cors\".\n fallbackMode = 'cors'\n } else {\n this[kDispatcher] = init.dispatcher || input[kDispatcher]\n\n // 6. Otherwise:\n\n // 7. Assert: input is a Request object.\n assert(input instanceof Request)\n\n // 8. Set request to input\u2019s request.\n request = input[kState]\n\n // 9. Set signal to input\u2019s signal.\n signal = input[kSignal]\n }\n\n // 7. Let origin be this\u2019s relevant settings object\u2019s origin.\n const origin = environmentSettingsObject.settingsObject.origin\n\n // 8. Let window be \"client\".\n let window = 'client'\n\n // 9. If request\u2019s window is an environment settings object and its origin\n // is same origin with origin, then set window to request\u2019s window.\n if (\n request.window?.constructor?.name === 'EnvironmentSettingsObject' &&\n sameOrigin(request.window, origin)\n ) {\n window = request.window\n }\n\n // 10. If init[\"window\"] exists and is non-null, then throw a TypeError.\n if (init.window != null) {\n throw new TypeError(`'window' option '${window}' must be null`)\n }\n\n // 11. If init[\"window\"] exists, then set window to \"no-window\".\n if ('window' in init) {\n window = 'no-window'\n }\n\n // 12. Set request to a new request with the following properties:\n request = makeRequest({\n // URL request\u2019s URL.\n // undici implementation note: this is set as the first item in request's urlList in makeRequest\n // method request\u2019s method.\n method: request.method,\n // header list A copy of request\u2019s header list.\n // undici implementation note: headersList is cloned in makeRequest\n headersList: request.headersList,\n // unsafe-request flag Set.\n unsafeRequest: request.unsafeRequest,\n // client This\u2019s relevant settings object.\n client: environmentSettingsObject.settingsObject,\n // window window.\n window,\n // priority request\u2019s priority.\n priority: request.priority,\n // origin request\u2019s origin. The propagation of the origin is only significant for navigation requests\n // being handled by a service worker. In this scenario a request can have an origin that is different\n // from the current client.\n origin: request.origin,\n // referrer request\u2019s referrer.\n referrer: request.referrer,\n // referrer policy request\u2019s referrer policy.\n referrerPolicy: request.referrerPolicy,\n // mode request\u2019s mode.\n mode: request.mode,\n // credentials mode request\u2019s credentials mode.\n credentials: request.credentials,\n // cache mode request\u2019s cache mode.\n cache: request.cache,\n // redirect mode request\u2019s redirect mode.\n redirect: request.redirect,\n // integrity metadata request\u2019s integrity metadata.\n integrity: request.integrity,\n // keepalive request\u2019s keepalive.\n keepalive: request.keepalive,\n // reload-navigation flag request\u2019s reload-navigation flag.\n reloadNavigation: request.reloadNavigation,\n // history-navigation flag request\u2019s history-navigation flag.\n historyNavigation: request.historyNavigation,\n // URL list A clone of request\u2019s URL list.\n urlList: [...request.urlList]\n })\n\n const initHasKey = Object.keys(init).length !== 0\n\n // 13. If init is not empty, then:\n if (initHasKey) {\n // 1. If request\u2019s mode is \"navigate\", then set it to \"same-origin\".\n if (request.mode === 'navigate') {\n request.mode = 'same-origin'\n }\n\n // 2. Unset request\u2019s reload-navigation flag.\n request.reloadNavigation = false\n\n // 3. Unset request\u2019s history-navigation flag.\n request.historyNavigation = false\n\n // 4. Set request\u2019s origin to \"client\".\n request.origin = 'client'\n\n // 5. Set request\u2019s referrer to \"client\"\n request.referrer = 'client'\n\n // 6. Set request\u2019s referrer policy to the empty string.\n request.referrerPolicy = ''\n\n // 7. Set request\u2019s URL to request\u2019s current URL.\n request.url = request.urlList[request.urlList.length - 1]\n\n // 8. Set request\u2019s URL list to \u00AB request\u2019s URL \u00BB.\n request.urlList = [request.url]\n }\n\n // 14. If init[\"referrer\"] exists, then:\n if (init.referrer !== undefined) {\n // 1. Let referrer be init[\"referrer\"].\n const referrer = init.referrer\n\n // 2. If referrer is the empty string, then set request\u2019s referrer to \"no-referrer\".\n if (referrer === '') {\n request.referrer = 'no-referrer'\n } else {\n // 1. Let parsedReferrer be the result of parsing referrer with\n // baseURL.\n // 2. If parsedReferrer is failure, then throw a TypeError.\n let parsedReferrer\n try {\n parsedReferrer = new URL(referrer, baseUrl)\n } catch (err) {\n throw new TypeError(`Referrer \"${referrer}\" is not a valid URL.`, { cause: err })\n }\n\n // 3. If one of the following is true\n // - parsedReferrer\u2019s scheme is \"about\" and path is the string \"client\"\n // - parsedReferrer\u2019s origin is not same origin with origin\n // then set request\u2019s referrer to \"client\".\n if (\n (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') ||\n (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl))\n ) {\n request.referrer = 'client'\n } else {\n // 4. Otherwise, set request\u2019s referrer to parsedReferrer.\n request.referrer = parsedReferrer\n }\n }\n }\n\n // 15. If init[\"referrerPolicy\"] exists, then set request\u2019s referrer policy\n // to it.\n if (init.referrerPolicy !== undefined) {\n request.referrerPolicy = init.referrerPolicy\n }\n\n // 16. Let mode be init[\"mode\"] if it exists, and fallbackMode otherwise.\n let mode\n if (init.mode !== undefined) {\n mode = init.mode\n } else {\n mode = fallbackMode\n }\n\n // 17. If mode is \"navigate\", then throw a TypeError.\n if (mode === 'navigate') {\n throw webidl.errors.exception({\n header: 'Request constructor',\n message: 'invalid request mode navigate.'\n })\n }\n\n // 18. If mode is non-null, set request\u2019s mode to mode.\n if (mode != null) {\n request.mode = mode\n }\n\n // 19. If init[\"credentials\"] exists, then set request\u2019s credentials mode\n // to it.\n if (init.credentials !== undefined) {\n request.credentials = init.credentials\n }\n\n // 18. If init[\"cache\"] exists, then set request\u2019s cache mode to it.\n if (init.cache !== undefined) {\n request.cache = init.cache\n }\n\n // 21. If request\u2019s cache mode is \"only-if-cached\" and request\u2019s mode is\n // not \"same-origin\", then throw a TypeError.\n if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {\n throw new TypeError(\n \"'only-if-cached' can be set only with 'same-origin' mode\"\n )\n }\n\n // 22. If init[\"redirect\"] exists, then set request\u2019s redirect mode to it.\n if (init.redirect !== undefined) {\n request.redirect = init.redirect\n }\n\n // 23. If init[\"integrity\"] exists, then set request\u2019s integrity metadata to it.\n if (init.integrity != null) {\n request.integrity = String(init.integrity)\n }\n\n // 24. If init[\"keepalive\"] exists, then set request\u2019s keepalive to it.\n if (init.keepalive !== undefined) {\n request.keepalive = Boolean(init.keepalive)\n }\n\n // 25. If init[\"method\"] exists, then:\n if (init.method !== undefined) {\n // 1. Let method be init[\"method\"].\n let method = init.method\n\n const mayBeNormalized = normalizedMethodRecords[method]\n\n if (mayBeNormalized !== undefined) {\n // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones\n request.method = mayBeNormalized\n } else {\n // 2. If method is not a method or method is a forbidden method, then\n // throw a TypeError.\n if (!isValidHTTPToken(method)) {\n throw new TypeError(`'${method}' is not a valid HTTP method.`)\n }\n\n const upperCase = method.toUpperCase()\n\n if (forbiddenMethodsSet.has(upperCase)) {\n throw new TypeError(`'${method}' HTTP method is unsupported.`)\n }\n\n // 3. Normalize method.\n // https://fetch.spec.whatwg.org/#concept-method-normalize\n // Note: must be in uppercase\n method = normalizedMethodRecordsBase[upperCase] ?? method\n\n // 4. Set request\u2019s method to method.\n request.method = method\n }\n\n if (!patchMethodWarning && request.method === 'patch') {\n process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', {\n code: 'UNDICI-FETCH-patch'\n })\n\n patchMethodWarning = true\n }\n }\n\n // 26. If init[\"signal\"] exists, then set signal to it.\n if (init.signal !== undefined) {\n signal = init.signal\n }\n\n // 27. Set this\u2019s request to request.\n this[kState] = request\n\n // 28. Set this\u2019s signal to a new AbortSignal object with this\u2019s relevant\n // Realm.\n // TODO: could this be simplified with AbortSignal.any\n // (https://dom.spec.whatwg.org/#dom-abortsignal-any)\n const ac = new AbortController()\n this[kSignal] = ac.signal\n\n // 29. If signal is not null, then make this\u2019s signal follow signal.\n if (signal != null) {\n if (\n !signal ||\n typeof signal.aborted !== 'boolean' ||\n typeof signal.addEventListener !== 'function'\n ) {\n throw new TypeError(\n \"Failed to construct 'Request': member signal is not of type AbortSignal.\"\n )\n }\n\n if (signal.aborted) {\n ac.abort(signal.reason)\n } else {\n // Keep a strong ref to ac while request object\n // is alive. This is needed to prevent AbortController\n // from being prematurely garbage collected.\n // See, https://github.com/nodejs/undici/issues/1926.\n this[kAbortController] = ac\n\n const acRef = new WeakRef(ac)\n const abort = buildAbort(acRef)\n\n // Third-party AbortControllers may not work with these.\n // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619.\n try {\n // If the max amount of listeners is equal to the default, increase it\n // This is only available in node >= v19.9.0\n if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) {\n setMaxListeners(1500, signal)\n } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) {\n setMaxListeners(1500, signal)\n }\n } catch {}\n\n util.addAbortListener(signal, abort)\n // The third argument must be a registry key to be unregistered.\n // Without it, you cannot unregister.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n // abort is used as the unregister key. (because it is unique)\n requestFinalizer.register(ac, { signal, abort }, abort)\n }\n }\n\n // 30. Set this\u2019s headers to a new Headers object with this\u2019s relevant\n // Realm, whose header list is request\u2019s header list and guard is\n // \"request\".\n this[kHeaders] = new Headers(kConstruct)\n setHeadersList(this[kHeaders], request.headersList)\n setHeadersGuard(this[kHeaders], 'request')\n\n // 31. If this\u2019s request\u2019s mode is \"no-cors\", then:\n if (mode === 'no-cors') {\n // 1. If this\u2019s request\u2019s method is not a CORS-safelisted method,\n // then throw a TypeError.\n if (!corsSafeListedMethodsSet.has(request.method)) {\n throw new TypeError(\n `'${request.method} is unsupported in no-cors mode.`\n )\n }\n\n // 2. Set this\u2019s headers\u2019s guard to \"request-no-cors\".\n setHeadersGuard(this[kHeaders], 'request-no-cors')\n }\n\n // 32. If init is not empty, then:\n if (initHasKey) {\n /** @type {HeadersList} */\n const headersList = getHeadersList(this[kHeaders])\n // 1. Let headers be a copy of this\u2019s headers and its associated header\n // list.\n // 2. If init[\"headers\"] exists, then set headers to init[\"headers\"].\n const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList)\n\n // 3. Empty this\u2019s headers\u2019s header list.\n headersList.clear()\n\n // 4. If headers is a Headers object, then for each header in its header\n // list, append header\u2019s name/header\u2019s value to this\u2019s headers.\n if (headers instanceof HeadersList) {\n for (const { name, value } of headers.rawValues()) {\n headersList.append(name, value, false)\n }\n // Note: Copy the `set-cookie` meta-data.\n headersList.cookies = headers.cookies\n } else {\n // 5. Otherwise, fill this\u2019s headers with headers.\n fillHeaders(this[kHeaders], headers)\n }\n }\n\n // 33. Let inputBody be input\u2019s request\u2019s body if input is a Request\n // object; otherwise null.\n const inputBody = input instanceof Request ? input[kState].body : null\n\n // 34. If either init[\"body\"] exists and is non-null or inputBody is\n // non-null, and request\u2019s method is `GET` or `HEAD`, then throw a\n // TypeError.\n if (\n (init.body != null || inputBody != null) &&\n (request.method === 'GET' || request.method === 'HEAD')\n ) {\n throw new TypeError('Request with GET/HEAD method cannot have body.')\n }\n\n // 35. Let initBody be null.\n let initBody = null\n\n // 36. If init[\"body\"] exists and is non-null, then:\n if (init.body != null) {\n // 1. Let Content-Type be null.\n // 2. Set initBody and Content-Type to the result of extracting\n // init[\"body\"], with keepalive set to request\u2019s keepalive.\n const [extractedBody, contentType] = extractBody(\n init.body,\n request.keepalive\n )\n initBody = extractedBody\n\n // 3, If Content-Type is non-null and this\u2019s headers\u2019s header list does\n // not contain `Content-Type`, then append `Content-Type`/Content-Type to\n // this\u2019s headers.\n if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) {\n this[kHeaders].append('content-type', contentType)\n }\n }\n\n // 37. Let inputOrInitBody be initBody if it is non-null; otherwise\n // inputBody.\n const inputOrInitBody = initBody ?? inputBody\n\n // 38. If inputOrInitBody is non-null and inputOrInitBody\u2019s source is\n // null, then:\n if (inputOrInitBody != null && inputOrInitBody.source == null) {\n // 1. If initBody is non-null and init[\"duplex\"] does not exist,\n // then throw a TypeError.\n if (initBody != null && init.duplex == null) {\n throw new TypeError('RequestInit: duplex option is required when sending a body.')\n }\n\n // 2. If this\u2019s request\u2019s mode is neither \"same-origin\" nor \"cors\",\n // then throw a TypeError.\n if (request.mode !== 'same-origin' && request.mode !== 'cors') {\n throw new TypeError(\n 'If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\"'\n )\n }\n\n // 3. Set this\u2019s request\u2019s use-CORS-preflight flag.\n request.useCORSPreflightFlag = true\n }\n\n // 39. Let finalBody be inputOrInitBody.\n let finalBody = inputOrInitBody\n\n // 40. If initBody is null and inputBody is non-null, then:\n if (initBody == null && inputBody != null) {\n // 1. If input is unusable, then throw a TypeError.\n if (bodyUnusable(input)) {\n throw new TypeError(\n 'Cannot construct a Request with a Request object that has already been used.'\n )\n }\n\n // 2. Set finalBody to the result of creating a proxy for inputBody.\n // https://streams.spec.whatwg.org/#readablestream-create-a-proxy\n const identityTransform = new TransformStream()\n inputBody.stream.pipeThrough(identityTransform)\n finalBody = {\n source: inputBody.source,\n length: inputBody.length,\n stream: identityTransform.readable\n }\n }\n\n // 41. Set this\u2019s request\u2019s body to finalBody.\n this[kState].body = finalBody\n }\n\n // Returns request\u2019s HTTP method, which is \"GET\" by default.\n get method () {\n webidl.brandCheck(this, Request)\n\n // The method getter steps are to return this\u2019s request\u2019s method.\n return this[kState].method\n }\n\n // Returns the URL of request as a string.\n get url () {\n webidl.brandCheck(this, Request)\n\n // The url getter steps are to return this\u2019s request\u2019s URL, serialized.\n return URLSerializer(this[kState].url)\n }\n\n // Returns a Headers object consisting of the headers associated with request.\n // Note that headers added in the network layer by the user agent will not\n // be accounted for in this object, e.g., the \"Host\" header.\n get headers () {\n webidl.brandCheck(this, Request)\n\n // The headers getter steps are to return this\u2019s headers.\n return this[kHeaders]\n }\n\n // Returns the kind of resource requested by request, e.g., \"document\"\n // or \"script\".\n get destination () {\n webidl.brandCheck(this, Request)\n\n // The destination getter are to return this\u2019s request\u2019s destination.\n return this[kState].destination\n }\n\n // Returns the referrer of request. Its value can be a same-origin URL if\n // explicitly set in init, the empty string to indicate no referrer, and\n // \"about:client\" when defaulting to the global\u2019s default. This is used\n // during fetching to determine the value of the `Referer` header of the\n // request being made.\n get referrer () {\n webidl.brandCheck(this, Request)\n\n // 1. If this\u2019s request\u2019s referrer is \"no-referrer\", then return the\n // empty string.\n if (this[kState].referrer === 'no-referrer') {\n return ''\n }\n\n // 2. If this\u2019s request\u2019s referrer is \"client\", then return\n // \"about:client\".\n if (this[kState].referrer === 'client') {\n return 'about:client'\n }\n\n // Return this\u2019s request\u2019s referrer, serialized.\n return this[kState].referrer.toString()\n }\n\n // Returns the referrer policy associated with request.\n // This is used during fetching to compute the value of the request\u2019s\n // referrer.\n get referrerPolicy () {\n webidl.brandCheck(this, Request)\n\n // The referrerPolicy getter steps are to return this\u2019s request\u2019s referrer policy.\n return this[kState].referrerPolicy\n }\n\n // Returns the mode associated with request, which is a string indicating\n // whether the request will use CORS, or will be restricted to same-origin\n // URLs.\n get mode () {\n webidl.brandCheck(this, Request)\n\n // The mode getter steps are to return this\u2019s request\u2019s mode.\n return this[kState].mode\n }\n\n // Returns the credentials mode associated with request,\n // which is a string indicating whether credentials will be sent with the\n // request always, never, or only when sent to a same-origin URL.\n get credentials () {\n // The credentials getter steps are to return this\u2019s request\u2019s credentials mode.\n return this[kState].credentials\n }\n\n // Returns the cache mode associated with request,\n // which is a string indicating how the request will\n // interact with the browser\u2019s cache when fetching.\n get cache () {\n webidl.brandCheck(this, Request)\n\n // The cache getter steps are to return this\u2019s request\u2019s cache mode.\n return this[kState].cache\n }\n\n // Returns the redirect mode associated with request,\n // which is a string indicating how redirects for the\n // request will be handled during fetching. A request\n // will follow redirects by default.\n get redirect () {\n webidl.brandCheck(this, Request)\n\n // The redirect getter steps are to return this\u2019s request\u2019s redirect mode.\n return this[kState].redirect\n }\n\n // Returns request\u2019s subresource integrity metadata, which is a\n // cryptographic hash of the resource being fetched. Its value\n // consists of multiple hashes separated by whitespace. [SRI]\n get integrity () {\n webidl.brandCheck(this, Request)\n\n // The integrity getter steps are to return this\u2019s request\u2019s integrity\n // metadata.\n return this[kState].integrity\n }\n\n // Returns a boolean indicating whether or not request can outlive the\n // global in which it was created.\n get keepalive () {\n webidl.brandCheck(this, Request)\n\n // The keepalive getter steps are to return this\u2019s request\u2019s keepalive.\n return this[kState].keepalive\n }\n\n // Returns a boolean indicating whether or not request is for a reload\n // navigation.\n get isReloadNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isReloadNavigation getter steps are to return true if this\u2019s\n // request\u2019s reload-navigation flag is set; otherwise false.\n return this[kState].reloadNavigation\n }\n\n // Returns a boolean indicating whether or not request is for a history\n // navigation (a.k.a. back-forward navigation).\n get isHistoryNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isHistoryNavigation getter steps are to return true if this\u2019s request\u2019s\n // history-navigation flag is set; otherwise false.\n return this[kState].historyNavigation\n }\n\n // Returns the signal associated with request, which is an AbortSignal\n // object indicating whether or not request has been aborted, and its\n // abort event handler.\n get signal () {\n webidl.brandCheck(this, Request)\n\n // The signal getter steps are to return this\u2019s signal.\n return this[kSignal]\n }\n\n get body () {\n webidl.brandCheck(this, Request)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Request)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n get duplex () {\n webidl.brandCheck(this, Request)\n\n return 'half'\n }\n\n // Returns a clone of request.\n clone () {\n webidl.brandCheck(this, Request)\n\n // 1. If this is unusable, then throw a TypeError.\n if (bodyUnusable(this)) {\n throw new TypeError('unusable')\n }\n\n // 2. Let clonedRequest be the result of cloning this\u2019s request.\n const clonedRequest = cloneRequest(this[kState])\n\n // 3. Let clonedRequestObject be the result of creating a Request object,\n // given clonedRequest, this\u2019s headers\u2019s guard, and this\u2019s relevant Realm.\n // 4. Make clonedRequestObject\u2019s signal follow this\u2019s signal.\n const ac = new AbortController()\n if (this.signal.aborted) {\n ac.abort(this.signal.reason)\n } else {\n let list = dependentControllerMap.get(this.signal)\n if (list === undefined) {\n list = new Set()\n dependentControllerMap.set(this.signal, list)\n }\n const acRef = new WeakRef(ac)\n list.add(acRef)\n util.addAbortListener(\n ac.signal,\n buildAbort(acRef)\n )\n }\n\n // 4. Return clonedRequestObject.\n return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders]))\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n if (options.depth === null) {\n options.depth = 2\n }\n\n options.colors ??= true\n\n const properties = {\n method: this.method,\n url: this.url,\n headers: this.headers,\n destination: this.destination,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n mode: this.mode,\n credentials: this.credentials,\n cache: this.cache,\n redirect: this.redirect,\n integrity: this.integrity,\n keepalive: this.keepalive,\n isReloadNavigation: this.isReloadNavigation,\n isHistoryNavigation: this.isHistoryNavigation,\n signal: this.signal\n }\n\n return `Request ${nodeUtil.formatWithOptions(options, properties)}`\n }\n}\n\nmixinBody(Request)\n\n// https://fetch.spec.whatwg.org/#requests\nfunction makeRequest (init) {\n return {\n method: init.method ?? 'GET',\n localURLsOnly: init.localURLsOnly ?? false,\n unsafeRequest: init.unsafeRequest ?? false,\n body: init.body ?? null,\n client: init.client ?? null,\n reservedClient: init.reservedClient ?? null,\n replacesClientId: init.replacesClientId ?? '',\n window: init.window ?? 'client',\n keepalive: init.keepalive ?? false,\n serviceWorkers: init.serviceWorkers ?? 'all',\n initiator: init.initiator ?? '',\n destination: init.destination ?? '',\n priority: init.priority ?? null,\n origin: init.origin ?? 'client',\n policyContainer: init.policyContainer ?? 'client',\n referrer: init.referrer ?? 'client',\n referrerPolicy: init.referrerPolicy ?? '',\n mode: init.mode ?? 'no-cors',\n useCORSPreflightFlag: init.useCORSPreflightFlag ?? false,\n credentials: init.credentials ?? 'same-origin',\n useCredentials: init.useCredentials ?? false,\n cache: init.cache ?? 'default',\n redirect: init.redirect ?? 'follow',\n integrity: init.integrity ?? '',\n cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '',\n parserMetadata: init.parserMetadata ?? '',\n reloadNavigation: init.reloadNavigation ?? false,\n historyNavigation: init.historyNavigation ?? false,\n userActivation: init.userActivation ?? false,\n taintedOrigin: init.taintedOrigin ?? false,\n redirectCount: init.redirectCount ?? 0,\n responseTainting: init.responseTainting ?? 'basic',\n preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false,\n done: init.done ?? false,\n timingAllowFailed: init.timingAllowFailed ?? false,\n urlList: init.urlList,\n url: init.urlList[0],\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList()\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-request-clone\nfunction cloneRequest (request) {\n // To clone a request request, run these steps:\n\n // 1. Let newRequest be a copy of request, except for its body.\n const newRequest = makeRequest({ ...request, body: null })\n\n // 2. If request\u2019s body is non-null, set newRequest\u2019s body to the\n // result of cloning request\u2019s body.\n if (request.body != null) {\n newRequest.body = cloneBody(newRequest, request.body)\n }\n\n // 3. Return newRequest.\n return newRequest\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#request-create\n * @param {any} innerRequest\n * @param {AbortSignal} signal\n * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard\n * @returns {Request}\n */\nfunction fromInnerRequest (innerRequest, signal, guard) {\n const request = new Request(kConstruct)\n request[kState] = innerRequest\n request[kSignal] = signal\n request[kHeaders] = new Headers(kConstruct)\n setHeadersList(request[kHeaders], innerRequest.headersList)\n setHeadersGuard(request[kHeaders], guard)\n return request\n}\n\nObject.defineProperties(Request.prototype, {\n method: kEnumerableProperty,\n url: kEnumerableProperty,\n headers: kEnumerableProperty,\n redirect: kEnumerableProperty,\n clone: kEnumerableProperty,\n signal: kEnumerableProperty,\n duplex: kEnumerableProperty,\n destination: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n isHistoryNavigation: kEnumerableProperty,\n isReloadNavigation: kEnumerableProperty,\n keepalive: kEnumerableProperty,\n integrity: kEnumerableProperty,\n cache: kEnumerableProperty,\n credentials: kEnumerableProperty,\n attribute: kEnumerableProperty,\n referrerPolicy: kEnumerableProperty,\n referrer: kEnumerableProperty,\n mode: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Request',\n configurable: true\n }\n})\n\nwebidl.converters.Request = webidl.interfaceConverter(\n Request\n)\n\n// https://fetch.spec.whatwg.org/#requestinfo\nwebidl.converters.RequestInfo = function (V, prefix, argument) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V, prefix, argument)\n }\n\n if (V instanceof Request) {\n return webidl.converters.Request(V, prefix, argument)\n }\n\n return webidl.converters.USVString(V, prefix, argument)\n}\n\nwebidl.converters.AbortSignal = webidl.interfaceConverter(\n AbortSignal\n)\n\n// https://fetch.spec.whatwg.org/#requestinit\nwebidl.converters.RequestInit = webidl.dictionaryConverter([\n {\n key: 'method',\n converter: webidl.converters.ByteString\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n },\n {\n key: 'body',\n converter: webidl.nullableConverter(\n webidl.converters.BodyInit\n )\n },\n {\n key: 'referrer',\n converter: webidl.converters.USVString\n },\n {\n key: 'referrerPolicy',\n converter: webidl.converters.DOMString,\n // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy\n allowedValues: referrerPolicy\n },\n {\n key: 'mode',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#concept-request-mode\n allowedValues: requestMode\n },\n {\n key: 'credentials',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcredentials\n allowedValues: requestCredentials\n },\n {\n key: 'cache',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcache\n allowedValues: requestCache\n },\n {\n key: 'redirect',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestredirect\n allowedValues: requestRedirect\n },\n {\n key: 'integrity',\n converter: webidl.converters.DOMString\n },\n {\n key: 'keepalive',\n converter: webidl.converters.boolean\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(\n (signal) => webidl.converters.AbortSignal(\n signal,\n 'RequestInit',\n 'signal',\n { strict: false }\n )\n )\n },\n {\n key: 'window',\n converter: webidl.converters.any\n },\n {\n key: 'duplex',\n converter: webidl.converters.DOMString,\n allowedValues: requestDuplex\n },\n {\n key: 'dispatcher', // undici specific option\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = { Request, makeRequest, fromInnerRequest, cloneRequest }\n", "// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst {\n makeNetworkError,\n makeAppropriateNetworkError,\n filterResponse,\n makeResponse,\n fromInnerResponse\n} = require('./response')\nconst { HeadersList } = require('./headers')\nconst { Request, cloneRequest } = require('./request')\nconst zlib = require('node:zlib')\nconst {\n bytesMatch,\n makePolicyContainer,\n clonePolicyContainer,\n requestBadPort,\n TAOCheck,\n appendRequestOriginHeader,\n responseLocationURL,\n requestCurrentURL,\n setRequestReferrerPolicyOnRedirect,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n createOpaqueTimingInfo,\n appendFetchMetadata,\n corsCheck,\n crossOriginResourcePolicyCheck,\n determineRequestsReferrer,\n coarsenedSharedCurrentTime,\n createDeferredPromise,\n isBlobLike,\n sameOrigin,\n isCancelled,\n isAborted,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n isomorphicEncode,\n urlIsLocal,\n urlIsHttpHttpsScheme,\n urlHasHttpsScheme,\n clampAndCoarsenConnectionTimingInfo,\n simpleRangeHeaderValue,\n buildContentRange,\n createInflate,\n extractMimeType\n} = require('./util')\nconst { kState, kDispatcher } = require('./symbols')\nconst assert = require('node:assert')\nconst { safelyExtractBody, extractBody } = require('./body')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n safeMethodsSet,\n requestBodyHeader,\n subresourceSet\n} = require('./constants')\nconst EE = require('node:events')\nconst { Readable, pipeline, finished } = require('node:stream')\nconst { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require('../../core/util')\nconst { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./data-url')\nconst { getGlobalDispatcher } = require('../../global')\nconst { webidl } = require('./webidl')\nconst { STATUS_CODES } = require('node:http')\nconst GET_OR_HEAD = ['GET', 'HEAD']\n\nconst defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined'\n ? 'node'\n : 'undici'\n\n/** @type {import('buffer').resolveObjectURL} */\nlet resolveObjectURL\n\nclass Fetch extends EE {\n constructor (dispatcher) {\n super()\n\n this.dispatcher = dispatcher\n this.connection = null\n this.dump = false\n this.state = 'ongoing'\n }\n\n terminate (reason) {\n if (this.state !== 'ongoing') {\n return\n }\n\n this.state = 'terminated'\n this.connection?.destroy(reason)\n this.emit('terminated', reason)\n }\n\n // https://fetch.spec.whatwg.org/#fetch-controller-abort\n abort (error) {\n if (this.state !== 'ongoing') {\n return\n }\n\n // 1. Set controller\u2019s state to \"aborted\".\n this.state = 'aborted'\n\n // 2. Let fallbackError be an \"AbortError\" DOMException.\n // 3. Set error to fallbackError if it is not given.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 4. Let serializedError be StructuredSerialize(error).\n // If that threw an exception, catch it, and let\n // serializedError be StructuredSerialize(fallbackError).\n\n // 5. Set controller\u2019s serialized abort reason to serializedError.\n this.serializedAbortReason = error\n\n this.connection?.destroy(error)\n this.emit('terminated', error)\n }\n}\n\nfunction handleFetchDone (response) {\n finalizeAndReportTiming(response, 'fetch')\n}\n\n// https://fetch.spec.whatwg.org/#fetch-method\nfunction fetch (input, init = undefined) {\n webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch')\n\n // 1. Let p be a new promise.\n let p = createDeferredPromise()\n\n // 2. Let requestObject be the result of invoking the initial value of\n // Request as constructor with input and init as arguments. If this throws\n // an exception, reject p with it and return p.\n let requestObject\n\n try {\n requestObject = new Request(input, init)\n } catch (e) {\n p.reject(e)\n return p.promise\n }\n\n // 3. Let request be requestObject\u2019s request.\n const request = requestObject[kState]\n\n // 4. If requestObject\u2019s signal\u2019s aborted flag is set, then:\n if (requestObject.signal.aborted) {\n // 1. Abort the fetch() call with p, request, null, and\n // requestObject\u2019s signal\u2019s abort reason.\n abortFetch(p, request, null, requestObject.signal.reason)\n\n // 2. Return p.\n return p.promise\n }\n\n // 5. Let globalObject be request\u2019s client\u2019s global object.\n const globalObject = request.client.globalObject\n\n // 6. If globalObject is a ServiceWorkerGlobalScope object, then set\n // request\u2019s service-workers mode to \"none\".\n if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') {\n request.serviceWorkers = 'none'\n }\n\n // 7. Let responseObject be null.\n let responseObject = null\n\n // 8. Let relevantRealm be this\u2019s relevant Realm.\n\n // 9. Let locallyAborted be false.\n let locallyAborted = false\n\n // 10. Let controller be null.\n let controller = null\n\n // 11. Add the following abort steps to requestObject\u2019s signal:\n addAbortListener(\n requestObject.signal,\n () => {\n // 1. Set locallyAborted to true.\n locallyAborted = true\n\n // 2. Assert: controller is non-null.\n assert(controller != null)\n\n // 3. Abort controller with requestObject\u2019s signal\u2019s abort reason.\n controller.abort(requestObject.signal.reason)\n\n const realResponse = responseObject?.deref()\n\n // 4. Abort the fetch() call with p, request, responseObject,\n // and requestObject\u2019s signal\u2019s abort reason.\n abortFetch(p, request, realResponse, requestObject.signal.reason)\n }\n )\n\n // 12. Let handleFetchDone given response response be to finalize and\n // report timing with response, globalObject, and \"fetch\".\n // see function handleFetchDone\n\n // 13. Set controller to the result of calling fetch given request,\n // with processResponseEndOfBody set to handleFetchDone, and processResponse\n // given response being these substeps:\n\n const processResponse = (response) => {\n // 1. If locallyAborted is true, terminate these substeps.\n if (locallyAborted) {\n return\n }\n\n // 2. If response\u2019s aborted flag is set, then:\n if (response.aborted) {\n // 1. Let deserializedError be the result of deserialize a serialized\n // abort reason given controller\u2019s serialized abort reason and\n // relevantRealm.\n\n // 2. Abort the fetch() call with p, request, responseObject, and\n // deserializedError.\n\n abortFetch(p, request, responseObject, controller.serializedAbortReason)\n return\n }\n\n // 3. If response is a network error, then reject p with a TypeError\n // and terminate these substeps.\n if (response.type === 'error') {\n p.reject(new TypeError('fetch failed', { cause: response.error }))\n return\n }\n\n // 4. Set responseObject to the result of creating a Response object,\n // given response, \"immutable\", and relevantRealm.\n responseObject = new WeakRef(fromInnerResponse(response, 'immutable'))\n\n // 5. Resolve p with responseObject.\n p.resolve(responseObject.deref())\n p = null\n }\n\n controller = fetching({\n request,\n processResponseEndOfBody: handleFetchDone,\n processResponse,\n dispatcher: requestObject[kDispatcher] // undici\n })\n\n // 14. Return p.\n return p.promise\n}\n\n// https://fetch.spec.whatwg.org/#finalize-and-report-timing\nfunction finalizeAndReportTiming (response, initiatorType = 'other') {\n // 1. If response is an aborted network error, then return.\n if (response.type === 'error' && response.aborted) {\n return\n }\n\n // 2. If response\u2019s URL list is null or empty, then return.\n if (!response.urlList?.length) {\n return\n }\n\n // 3. Let originalURL be response\u2019s URL list[0].\n const originalURL = response.urlList[0]\n\n // 4. Let timingInfo be response\u2019s timing info.\n let timingInfo = response.timingInfo\n\n // 5. Let cacheState be response\u2019s cache state.\n let cacheState = response.cacheState\n\n // 6. If originalURL\u2019s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(originalURL)) {\n return\n }\n\n // 7. If timingInfo is null, then return.\n if (timingInfo === null) {\n return\n }\n\n // 8. If response\u2019s timing allow passed flag is not set, then:\n if (!response.timingAllowPassed) {\n // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.\n timingInfo = createOpaqueTimingInfo({\n startTime: timingInfo.startTime\n })\n\n // 2. Set cacheState to the empty string.\n cacheState = ''\n }\n\n // 9. Set timingInfo\u2019s end time to the coarsened shared current time\n // given global\u2019s relevant settings object\u2019s cross-origin isolated\n // capability.\n // TODO: given global\u2019s relevant settings object\u2019s cross-origin isolated\n // capability?\n timingInfo.endTime = coarsenedSharedCurrentTime()\n\n // 10. Set response\u2019s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 11. Mark resource timing for timingInfo, originalURL, initiatorType,\n // global, and cacheState.\n markResourceTiming(\n timingInfo,\n originalURL.href,\n initiatorType,\n globalThis,\n cacheState\n )\n}\n\n// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing\nconst markResourceTiming = performance.markResourceTiming\n\n// https://fetch.spec.whatwg.org/#abort-fetch\nfunction abortFetch (p, request, responseObject, error) {\n // 1. Reject promise with error.\n if (p) {\n // We might have already resolved the promise at this stage\n p.reject(error)\n }\n\n // 2. If request\u2019s body is not null and is readable, then cancel request\u2019s\n // body with error.\n if (request.body != null && isReadable(request.body?.stream)) {\n request.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n\n // 3. If responseObject is null, then return.\n if (responseObject == null) {\n return\n }\n\n // 4. Let response be responseObject\u2019s response.\n const response = responseObject[kState]\n\n // 5. If response\u2019s body is not null and is readable, then error response\u2019s\n // body with error.\n if (response.body != null && isReadable(response.body?.stream)) {\n response.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetching\nfunction fetching ({\n request,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseEndOfBody,\n processResponseConsumeBody,\n useParallelQueue = false,\n dispatcher = getGlobalDispatcher() // undici\n}) {\n // Ensure that the dispatcher is set accordingly\n assert(dispatcher)\n\n // 1. Let taskDestination be null.\n let taskDestination = null\n\n // 2. Let crossOriginIsolatedCapability be false.\n let crossOriginIsolatedCapability = false\n\n // 3. If request\u2019s client is non-null, then:\n if (request.client != null) {\n // 1. Set taskDestination to request\u2019s client\u2019s global object.\n taskDestination = request.client.globalObject\n\n // 2. Set crossOriginIsolatedCapability to request\u2019s client\u2019s cross-origin\n // isolated capability.\n crossOriginIsolatedCapability =\n request.client.crossOriginIsolatedCapability\n }\n\n // 4. If useParallelQueue is true, then set taskDestination to the result of\n // starting a new parallel queue.\n // TODO\n\n // 5. Let timingInfo be a new fetch timing info whose start time and\n // post-redirect start time are the coarsened shared current time given\n // crossOriginIsolatedCapability.\n const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)\n const timingInfo = createOpaqueTimingInfo({\n startTime: currentTime\n })\n\n // 6. Let fetchParams be a new fetch params whose\n // request is request,\n // timing info is timingInfo,\n // process request body chunk length is processRequestBodyChunkLength,\n // process request end-of-body is processRequestEndOfBody,\n // process response is processResponse,\n // process response consume body is processResponseConsumeBody,\n // process response end-of-body is processResponseEndOfBody,\n // task destination is taskDestination,\n // and cross-origin isolated capability is crossOriginIsolatedCapability.\n const fetchParams = {\n controller: new Fetch(dispatcher),\n request,\n timingInfo,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseConsumeBody,\n processResponseEndOfBody,\n taskDestination,\n crossOriginIsolatedCapability\n }\n\n // 7. If request\u2019s body is a byte sequence, then set request\u2019s body to\n // request\u2019s body as a body.\n // NOTE: Since fetching is only called from fetch, body should already be\n // extracted.\n assert(!request.body || request.body.stream)\n\n // 8. If request\u2019s window is \"client\", then set request\u2019s window to request\u2019s\n // client, if request\u2019s client\u2019s global object is a Window object; otherwise\n // \"no-window\".\n if (request.window === 'client') {\n // TODO: What if request.client is null?\n request.window =\n request.client?.globalObject?.constructor?.name === 'Window'\n ? request.client\n : 'no-window'\n }\n\n // 9. If request\u2019s origin is \"client\", then set request\u2019s origin to request\u2019s\n // client\u2019s origin.\n if (request.origin === 'client') {\n request.origin = request.client.origin\n }\n\n // 10. If all of the following conditions are true:\n // TODO\n\n // 11. If request\u2019s policy container is \"client\", then:\n if (request.policyContainer === 'client') {\n // 1. If request\u2019s client is non-null, then set request\u2019s policy\n // container to a clone of request\u2019s client\u2019s policy container. [HTML]\n if (request.client != null) {\n request.policyContainer = clonePolicyContainer(\n request.client.policyContainer\n )\n } else {\n // 2. Otherwise, set request\u2019s policy container to a new policy\n // container.\n request.policyContainer = makePolicyContainer()\n }\n }\n\n // 12. If request\u2019s header list does not contain `Accept`, then:\n if (!request.headersList.contains('accept', true)) {\n // 1. Let value be `*/*`.\n const value = '*/*'\n\n // 2. A user agent should set value to the first matching statement, if\n // any, switching on request\u2019s destination:\n // \"document\"\n // \"frame\"\n // \"iframe\"\n // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`\n // \"image\"\n // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`\n // \"style\"\n // `text/css,*/*;q=0.1`\n // TODO\n\n // 3. Append `Accept`/value to request\u2019s header list.\n request.headersList.append('accept', value, true)\n }\n\n // 13. If request\u2019s header list does not contain `Accept-Language`, then\n // user agents should append `Accept-Language`/an appropriate value to\n // request\u2019s header list.\n if (!request.headersList.contains('accept-language', true)) {\n request.headersList.append('accept-language', '*', true)\n }\n\n // 14. If request\u2019s priority is null, then use request\u2019s initiator and\n // destination appropriately in setting request\u2019s priority to a\n // user-agent-defined object.\n if (request.priority === null) {\n // TODO\n }\n\n // 15. If request is a subresource request, then:\n if (subresourceSet.has(request.destination)) {\n // TODO\n }\n\n // 16. Run main fetch given fetchParams.\n mainFetch(fetchParams)\n .catch(err => {\n fetchParams.controller.terminate(err)\n })\n\n // 17. Return fetchParam's controller\n return fetchParams.controller\n}\n\n// https://fetch.spec.whatwg.org/#concept-main-fetch\nasync function mainFetch (fetchParams, recursive = false) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. If request\u2019s local-URLs-only flag is set and request\u2019s current URL is\n // not local, then set response to a network error.\n if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) {\n response = makeNetworkError('local URLs only')\n }\n\n // 4. Run report Content Security Policy violations for request.\n // TODO\n\n // 5. Upgrade request to a potentially trustworthy URL, if appropriate.\n tryUpgradeRequestToAPotentiallyTrustworthyURL(request)\n\n // 6. If should request be blocked due to a bad port, should fetching request\n // be blocked as mixed content, or should request be blocked by Content\n // Security Policy returns blocked, then set response to a network error.\n if (requestBadPort(request) === 'blocked') {\n response = makeNetworkError('bad port')\n }\n // TODO: should fetching request be blocked as mixed content?\n // TODO: should request be blocked by Content Security Policy?\n\n // 7. If request\u2019s referrer policy is the empty string, then set request\u2019s\n // referrer policy to request\u2019s policy container\u2019s referrer policy.\n if (request.referrerPolicy === '') {\n request.referrerPolicy = request.policyContainer.referrerPolicy\n }\n\n // 8. If request\u2019s referrer is not \"no-referrer\", then set request\u2019s\n // referrer to the result of invoking determine request\u2019s referrer.\n if (request.referrer !== 'no-referrer') {\n request.referrer = determineRequestsReferrer(request)\n }\n\n // 9. Set request\u2019s current URL\u2019s scheme to \"https\" if all of the following\n // conditions are true:\n // - request\u2019s current URL\u2019s scheme is \"http\"\n // - request\u2019s current URL\u2019s host is a domain\n // - Matching request\u2019s current URL\u2019s host per Known HSTS Host Domain Name\n // Matching results in either a superdomain match with an asserted\n // includeSubDomains directive or a congruent match (with or without an\n // asserted includeSubDomains directive). [HSTS]\n // TODO\n\n // 10. If recursive is false, then run the remaining steps in parallel.\n // TODO\n\n // 11. If response is null, then set response to the result of running\n // the steps corresponding to the first matching statement:\n if (response === null) {\n response = await (async () => {\n const currentURL = requestCurrentURL(request)\n\n if (\n // - request\u2019s current URL\u2019s origin is same origin with request\u2019s origin,\n // and request\u2019s response tainting is \"basic\"\n (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') ||\n // request\u2019s current URL\u2019s scheme is \"data\"\n (currentURL.protocol === 'data:') ||\n // - request\u2019s mode is \"navigate\" or \"websocket\"\n (request.mode === 'navigate' || request.mode === 'websocket')\n ) {\n // 1. Set request\u2019s response tainting to \"basic\".\n request.responseTainting = 'basic'\n\n // 2. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request\u2019s mode is \"same-origin\"\n if (request.mode === 'same-origin') {\n // 1. Return a network error.\n return makeNetworkError('request mode cannot be \"same-origin\"')\n }\n\n // request\u2019s mode is \"no-cors\"\n if (request.mode === 'no-cors') {\n // 1. If request\u2019s redirect mode is not \"follow\", then return a network\n // error.\n if (request.redirect !== 'follow') {\n return makeNetworkError(\n 'redirect mode cannot be \"follow\" for \"no-cors\" request'\n )\n }\n\n // 2. Set request\u2019s response tainting to \"opaque\".\n request.responseTainting = 'opaque'\n\n // 3. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request\u2019s current URL\u2019s scheme is not an HTTP(S) scheme\n if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) {\n // Return a network error.\n return makeNetworkError('URL scheme must be a HTTP(S) scheme')\n }\n\n // - request\u2019s use-CORS-preflight flag is set\n // - request\u2019s unsafe-request flag is set and either request\u2019s method is\n // not a CORS-safelisted method or CORS-unsafe request-header names with\n // request\u2019s header list is not empty\n // 1. Set request\u2019s response tainting to \"cors\".\n // 2. Let corsWithPreflightResponse be the result of running HTTP fetch\n // given fetchParams and true.\n // 3. If corsWithPreflightResponse is a network error, then clear cache\n // entries using request.\n // 4. Return corsWithPreflightResponse.\n // TODO\n\n // Otherwise\n // 1. Set request\u2019s response tainting to \"cors\".\n request.responseTainting = 'cors'\n\n // 2. Return the result of running HTTP fetch given fetchParams.\n return await httpFetch(fetchParams)\n })()\n }\n\n // 12. If recursive is true, then return response.\n if (recursive) {\n return response\n }\n\n // 13. If response is not a network error and response is not a filtered\n // response, then:\n if (response.status !== 0 && !response.internalResponse) {\n // If request\u2019s response tainting is \"cors\", then:\n if (request.responseTainting === 'cors') {\n // 1. Let headerNames be the result of extracting header list values\n // given `Access-Control-Expose-Headers` and response\u2019s header list.\n // TODO\n // 2. If request\u2019s credentials mode is not \"include\" and headerNames\n // contains `*`, then set response\u2019s CORS-exposed header-name list to\n // all unique header names in response\u2019s header list.\n // TODO\n // 3. Otherwise, if headerNames is not null or failure, then set\n // response\u2019s CORS-exposed header-name list to headerNames.\n // TODO\n }\n\n // Set response to the following filtered response with response as its\n // internal response, depending on request\u2019s response tainting:\n if (request.responseTainting === 'basic') {\n response = filterResponse(response, 'basic')\n } else if (request.responseTainting === 'cors') {\n response = filterResponse(response, 'cors')\n } else if (request.responseTainting === 'opaque') {\n response = filterResponse(response, 'opaque')\n } else {\n assert(false)\n }\n }\n\n // 14. Let internalResponse be response, if response is a network error,\n // and response\u2019s internal response otherwise.\n let internalResponse =\n response.status === 0 ? response : response.internalResponse\n\n // 15. If internalResponse\u2019s URL list is empty, then set it to a clone of\n // request\u2019s URL list.\n if (internalResponse.urlList.length === 0) {\n internalResponse.urlList.push(...request.urlList)\n }\n\n // 16. If request\u2019s timing allow failed flag is unset, then set\n // internalResponse\u2019s timing allow passed flag.\n if (!request.timingAllowFailed) {\n response.timingAllowPassed = true\n }\n\n // 17. If response is not a network error and any of the following returns\n // blocked\n // - should internalResponse to request be blocked as mixed content\n // - should internalResponse to request be blocked by Content Security Policy\n // - should internalResponse to request be blocked due to its MIME type\n // - should internalResponse to request be blocked due to nosniff\n // TODO\n\n // 18. If response\u2019s type is \"opaque\", internalResponse\u2019s status is 206,\n // internalResponse\u2019s range-requested flag is set, and request\u2019s header\n // list does not contain `Range`, then set response and internalResponse\n // to a network error.\n if (\n response.type === 'opaque' &&\n internalResponse.status === 206 &&\n internalResponse.rangeRequested &&\n !request.headers.contains('range', true)\n ) {\n response = internalResponse = makeNetworkError()\n }\n\n // 19. If response is not a network error and either request\u2019s method is\n // `HEAD` or `CONNECT`, or internalResponse\u2019s status is a null body status,\n // set internalResponse\u2019s body to null and disregard any enqueuing toward\n // it (if any).\n if (\n response.status !== 0 &&\n (request.method === 'HEAD' ||\n request.method === 'CONNECT' ||\n nullBodyStatus.includes(internalResponse.status))\n ) {\n internalResponse.body = null\n fetchParams.controller.dump = true\n }\n\n // 20. If request\u2019s integrity metadata is not the empty string, then:\n if (request.integrity) {\n // 1. Let processBodyError be this step: run fetch finale given fetchParams\n // and a network error.\n const processBodyError = (reason) =>\n fetchFinale(fetchParams, makeNetworkError(reason))\n\n // 2. If request\u2019s response tainting is \"opaque\", or response\u2019s body is null,\n // then run processBodyError and abort these steps.\n if (request.responseTainting === 'opaque' || response.body == null) {\n processBodyError(response.error)\n return\n }\n\n // 3. Let processBody given bytes be these steps:\n const processBody = (bytes) => {\n // 1. If bytes do not match request\u2019s integrity metadata,\n // then run processBodyError and abort these steps. [SRI]\n if (!bytesMatch(bytes, request.integrity)) {\n processBodyError('integrity mismatch')\n return\n }\n\n // 2. Set response\u2019s body to bytes as a body.\n response.body = safelyExtractBody(bytes)[0]\n\n // 3. Run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n\n // 4. Fully read response\u2019s body given processBody and processBodyError.\n await fullyReadBody(response.body, processBody, processBodyError)\n } else {\n // 21. Otherwise, run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-scheme-fetch\n// given a fetch params fetchParams\nfunction schemeFetch (fetchParams) {\n // Note: since the connection is destroyed on redirect, which sets fetchParams to a\n // cancelled state, we do not want this condition to trigger *unless* there have been\n // no redirects. See https://github.com/nodejs/undici/issues/1776\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {\n return Promise.resolve(makeAppropriateNetworkError(fetchParams))\n }\n\n // 2. Let request be fetchParams\u2019s request.\n const { request } = fetchParams\n\n const { protocol: scheme } = requestCurrentURL(request)\n\n // 3. Switch on request\u2019s current URL\u2019s scheme and run the associated steps:\n switch (scheme) {\n case 'about:': {\n // If request\u2019s current URL\u2019s path is the string \"blank\", then return a new response\n // whose status message is `OK`, header list is \u00AB (`Content-Type`, `text/html;charset=utf-8`) \u00BB,\n // and body is the empty byte sequence as a body.\n\n // Otherwise, return a network error.\n return Promise.resolve(makeNetworkError('about scheme is not supported'))\n }\n case 'blob:': {\n if (!resolveObjectURL) {\n resolveObjectURL = require('node:buffer').resolveObjectURL\n }\n\n // 1. Let blobURLEntry be request\u2019s current URL\u2019s blob URL entry.\n const blobURLEntry = requestCurrentURL(request)\n\n // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n // Buffer.resolveObjectURL does not ignore URL queries.\n if (blobURLEntry.search.length !== 0) {\n return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.'))\n }\n\n const blob = resolveObjectURL(blobURLEntry.toString())\n\n // 2. If request\u2019s method is not `GET`, blobURLEntry is null, or blobURLEntry\u2019s\n // object is not a Blob object, then return a network error.\n if (request.method !== 'GET' || !isBlobLike(blob)) {\n return Promise.resolve(makeNetworkError('invalid method'))\n }\n\n // 3. Let blob be blobURLEntry\u2019s object.\n // Note: done above\n\n // 4. Let response be a new response.\n const response = makeResponse()\n\n // 5. Let fullLength be blob\u2019s size.\n const fullLength = blob.size\n\n // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded.\n const serializedFullLength = isomorphicEncode(`${fullLength}`)\n\n // 7. Let type be blob\u2019s type.\n const type = blob.type\n\n // 8. If request\u2019s header list does not contain `Range`:\n // 9. Otherwise:\n if (!request.headersList.contains('range', true)) {\n // 1. Let bodyWithType be the result of safely extracting blob.\n // Note: in the FileAPI a blob \"object\" is a Blob *or* a MediaSource.\n // In node, this can only ever be a Blob. Therefore we can safely\n // use extractBody directly.\n const bodyWithType = extractBody(blob)\n\n // 2. Set response\u2019s status message to `OK`.\n response.statusText = 'OK'\n\n // 3. Set response\u2019s body to bodyWithType\u2019s body.\n response.body = bodyWithType[0]\n\n // 4. Set response\u2019s header list to \u00AB (`Content-Length`, serializedFullLength), (`Content-Type`, type) \u00BB.\n response.headersList.set('content-length', serializedFullLength, true)\n response.headersList.set('content-type', type, true)\n } else {\n // 1. Set response\u2019s range-requested flag.\n response.rangeRequested = true\n\n // 2. Let rangeHeader be the result of getting `Range` from request\u2019s header list.\n const rangeHeader = request.headersList.get('range', true)\n\n // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true.\n const rangeValue = simpleRangeHeaderValue(rangeHeader, true)\n\n // 4. If rangeValue is failure, then return a network error.\n if (rangeValue === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 5. Let (rangeStart, rangeEnd) be rangeValue.\n let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue\n\n // 6. If rangeStart is null:\n // 7. Otherwise:\n if (rangeStart === null) {\n // 1. Set rangeStart to fullLength \u2212 rangeEnd.\n rangeStart = fullLength - rangeEnd\n\n // 2. Set rangeEnd to rangeStart + rangeEnd \u2212 1.\n rangeEnd = rangeStart + rangeEnd - 1\n } else {\n // 1. If rangeStart is greater than or equal to fullLength, then return a network error.\n if (rangeStart >= fullLength) {\n return Promise.resolve(makeNetworkError('Range start is greater than the blob\\'s size.'))\n }\n\n // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set\n // rangeEnd to fullLength \u2212 1.\n if (rangeEnd === null || rangeEnd >= fullLength) {\n rangeEnd = fullLength - 1\n }\n }\n\n // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart,\n // rangeEnd + 1, and type.\n const slicedBlob = blob.slice(rangeStart, rangeEnd, type)\n\n // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob.\n // Note: same reason as mentioned above as to why we use extractBody\n const slicedBodyWithType = extractBody(slicedBlob)\n\n // 10. Set response\u2019s body to slicedBodyWithType\u2019s body.\n response.body = slicedBodyWithType[0]\n\n // 11. Let serializedSlicedLength be slicedBlob\u2019s size, serialized and isomorphic encoded.\n const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`)\n\n // 12. Let contentRange be the result of invoking build a content range given rangeStart,\n // rangeEnd, and fullLength.\n const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength)\n\n // 13. Set response\u2019s status to 206.\n response.status = 206\n\n // 14. Set response\u2019s status message to `Partial Content`.\n response.statusText = 'Partial Content'\n\n // 15. Set response\u2019s header list to \u00AB (`Content-Length`, serializedSlicedLength),\n // (`Content-Type`, type), (`Content-Range`, contentRange) \u00BB.\n response.headersList.set('content-length', serializedSlicedLength, true)\n response.headersList.set('content-type', type, true)\n response.headersList.set('content-range', contentRange, true)\n }\n\n // 10. Return response.\n return Promise.resolve(response)\n }\n case 'data:': {\n // 1. Let dataURLStruct be the result of running the\n // data: URL processor on request\u2019s current URL.\n const currentURL = requestCurrentURL(request)\n const dataURLStruct = dataURLProcessor(currentURL)\n\n // 2. If dataURLStruct is failure, then return a\n // network error.\n if (dataURLStruct === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 3. Let mimeType be dataURLStruct\u2019s MIME type, serialized.\n const mimeType = serializeAMimeType(dataURLStruct.mimeType)\n\n // 4. Return a response whose status message is `OK`,\n // header list is \u00AB (`Content-Type`, mimeType) \u00BB,\n // and body is dataURLStruct\u2019s body as a body.\n return Promise.resolve(makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-type', { name: 'Content-Type', value: mimeType }]\n ],\n body: safelyExtractBody(dataURLStruct.body)[0]\n }))\n }\n case 'file:': {\n // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n // When in doubt, return a network error.\n return Promise.resolve(makeNetworkError('not implemented... yet...'))\n }\n case 'http:':\n case 'https:': {\n // Return the result of running HTTP fetch given fetchParams.\n\n return httpFetch(fetchParams)\n .catch((err) => makeNetworkError(err))\n }\n default: {\n return Promise.resolve(makeNetworkError('unknown scheme'))\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#finalize-response\nfunction finalizeResponse (fetchParams, response) {\n // 1. Set fetchParams\u2019s request\u2019s done flag.\n fetchParams.request.done = true\n\n // 2, If fetchParams\u2019s process response done is not null, then queue a fetch\n // task to run fetchParams\u2019s process response done given response, with\n // fetchParams\u2019s task destination.\n if (fetchParams.processResponseDone != null) {\n queueMicrotask(() => fetchParams.processResponseDone(response))\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-finale\nfunction fetchFinale (fetchParams, response) {\n // 1. Let timingInfo be fetchParams\u2019s timing info.\n let timingInfo = fetchParams.timingInfo\n\n // 2. If response is not a network error and fetchParams\u2019s request\u2019s client is a secure context,\n // then set timingInfo\u2019s server-timing headers to the result of getting, decoding, and splitting\n // `Server-Timing` from response\u2019s internal response\u2019s header list.\n // TODO\n\n // 3. Let processResponseEndOfBody be the following steps:\n const processResponseEndOfBody = () => {\n // 1. Let unsafeEndTime be the unsafe shared current time.\n const unsafeEndTime = Date.now() // ?\n\n // 2. If fetchParams\u2019s request\u2019s destination is \"document\", then set fetchParams\u2019s controller\u2019s\n // full timing info to fetchParams\u2019s timing info.\n if (fetchParams.request.destination === 'document') {\n fetchParams.controller.fullTimingInfo = timingInfo\n }\n\n // 3. Set fetchParams\u2019s controller\u2019s report timing steps to the following steps given a global object global:\n fetchParams.controller.reportTimingSteps = () => {\n // 1. If fetchParams\u2019s request\u2019s URL\u2019s scheme is not an HTTP(S) scheme, then return.\n if (fetchParams.request.url.protocol !== 'https:') {\n return\n }\n\n // 2. Set timingInfo\u2019s end time to the relative high resolution time given unsafeEndTime and global.\n timingInfo.endTime = unsafeEndTime\n\n // 3. Let cacheState be response\u2019s cache state.\n let cacheState = response.cacheState\n\n // 4. Let bodyInfo be response\u2019s body info.\n const bodyInfo = response.bodyInfo\n\n // 5. If response\u2019s timing allow passed flag is not set, then set timingInfo to the result of creating an\n // opaque timing info for timingInfo and set cacheState to the empty string.\n if (!response.timingAllowPassed) {\n timingInfo = createOpaqueTimingInfo(timingInfo)\n\n cacheState = ''\n }\n\n // 6. Let responseStatus be 0.\n let responseStatus = 0\n\n // 7. If fetchParams\u2019s request\u2019s mode is not \"navigate\" or response\u2019s has-cross-origin-redirects is false:\n if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) {\n // 1. Set responseStatus to response\u2019s status.\n responseStatus = response.status\n\n // 2. Let mimeType be the result of extracting a MIME type from response\u2019s header list.\n const mimeType = extractMimeType(response.headersList)\n\n // 3. If mimeType is not failure, then set bodyInfo\u2019s content type to the result of minimizing a supported MIME type given mimeType.\n if (mimeType !== 'failure') {\n bodyInfo.contentType = minimizeSupportedMimeType(mimeType)\n }\n }\n\n // 8. If fetchParams\u2019s request\u2019s initiator type is non-null, then mark resource timing given timingInfo,\n // fetchParams\u2019s request\u2019s URL, fetchParams\u2019s request\u2019s initiator type, global, cacheState, bodyInfo,\n // and responseStatus.\n if (fetchParams.request.initiatorType != null) {\n // TODO: update markresourcetiming\n markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus)\n }\n }\n\n // 4. Let processResponseEndOfBodyTask be the following steps:\n const processResponseEndOfBodyTask = () => {\n // 1. Set fetchParams\u2019s request\u2019s done flag.\n fetchParams.request.done = true\n\n // 2. If fetchParams\u2019s process response end-of-body is non-null, then run fetchParams\u2019s process\n // response end-of-body given response.\n if (fetchParams.processResponseEndOfBody != null) {\n queueMicrotask(() => fetchParams.processResponseEndOfBody(response))\n }\n\n // 3. If fetchParams\u2019s request\u2019s initiator type is non-null and fetchParams\u2019s request\u2019s client\u2019s\n // global object is fetchParams\u2019s task destination, then run fetchParams\u2019s controller\u2019s report\n // timing steps given fetchParams\u2019s request\u2019s client\u2019s global object.\n if (fetchParams.request.initiatorType != null) {\n fetchParams.controller.reportTimingSteps()\n }\n }\n\n // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams\u2019s task destination\n queueMicrotask(() => processResponseEndOfBodyTask())\n }\n\n // 4. If fetchParams\u2019s process response is non-null, then queue a fetch task to run fetchParams\u2019s\n // process response given response, with fetchParams\u2019s task destination.\n if (fetchParams.processResponse != null) {\n queueMicrotask(() => {\n fetchParams.processResponse(response)\n fetchParams.processResponse = null\n })\n }\n\n // 5. Let internalResponse be response, if response is a network error; otherwise response\u2019s internal response.\n const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response)\n\n // 6. If internalResponse\u2019s body is null, then run processResponseEndOfBody.\n // 7. Otherwise:\n if (internalResponse.body == null) {\n processResponseEndOfBody()\n } else {\n // mcollina: all the following steps of the specs are skipped.\n // The internal transform stream is not needed.\n // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541\n\n // 1. Let transformStream be a new TransformStream.\n // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream.\n // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm\n // set to processResponseEndOfBody.\n // 4. Set internalResponse\u2019s body\u2019s stream to the result of internalResponse\u2019s body\u2019s stream piped through transformStream.\n\n finished(internalResponse.body.stream, () => {\n processResponseEndOfBody()\n })\n }\n}\n\n// https://fetch.spec.whatwg.org/#http-fetch\nasync function httpFetch (fetchParams) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let actualResponse be null.\n let actualResponse = null\n\n // 4. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 5. If request\u2019s service-workers mode is \"all\", then:\n if (request.serviceWorkers === 'all') {\n // TODO\n }\n\n // 6. If response is null, then:\n if (response === null) {\n // 1. If makeCORSPreflight is true and one of these conditions is true:\n // TODO\n\n // 2. If request\u2019s redirect mode is \"follow\", then set request\u2019s\n // service-workers mode to \"none\".\n if (request.redirect === 'follow') {\n request.serviceWorkers = 'none'\n }\n\n // 3. Set response and actualResponse to the result of running\n // HTTP-network-or-cache fetch given fetchParams.\n actualResponse = response = await httpNetworkOrCacheFetch(fetchParams)\n\n // 4. If request\u2019s response tainting is \"cors\" and a CORS check\n // for request and response returns failure, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n corsCheck(request, response) === 'failure'\n ) {\n return makeNetworkError('cors failure')\n }\n\n // 5. If the TAO check for request and response returns failure, then set\n // request\u2019s timing allow failed flag.\n if (TAOCheck(request, response) === 'failure') {\n request.timingAllowFailed = true\n }\n }\n\n // 7. If either request\u2019s response tainting or response\u2019s type\n // is \"opaque\", and the cross-origin resource policy check with\n // request\u2019s origin, request\u2019s client, request\u2019s destination,\n // and actualResponse returns blocked, then return a network error.\n if (\n (request.responseTainting === 'opaque' || response.type === 'opaque') &&\n crossOriginResourcePolicyCheck(\n request.origin,\n request.client,\n request.destination,\n actualResponse\n ) === 'blocked'\n ) {\n return makeNetworkError('blocked')\n }\n\n // 8. If actualResponse\u2019s status is a redirect status, then:\n if (redirectStatusSet.has(actualResponse.status)) {\n // 1. If actualResponse\u2019s status is not 303, request\u2019s body is not null,\n // and the connection uses HTTP/2, then user agents may, and are even\n // encouraged to, transmit an RST_STREAM frame.\n // See, https://github.com/whatwg/fetch/issues/1288\n if (request.redirect !== 'manual') {\n fetchParams.controller.connection.destroy(undefined, false)\n }\n\n // 2. Switch on request\u2019s redirect mode:\n if (request.redirect === 'error') {\n // Set response to a network error.\n response = makeNetworkError('unexpected redirect')\n } else if (request.redirect === 'manual') {\n // Set response to an opaque-redirect filtered response whose internal\n // response is actualResponse.\n // NOTE(spec): On the web this would return an `opaqueredirect` response,\n // but that doesn't make sense server side.\n // See https://github.com/nodejs/undici/issues/1193.\n response = actualResponse\n } else if (request.redirect === 'follow') {\n // Set response to the result of running HTTP-redirect fetch given\n // fetchParams and response.\n response = await httpRedirectFetch(fetchParams, response)\n } else {\n assert(false)\n }\n }\n\n // 9. Set response\u2019s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 10. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-redirect-fetch\nfunction httpRedirectFetch (fetchParams, response) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let actualResponse be response, if response is not a filtered response,\n // and response\u2019s internal response otherwise.\n const actualResponse = response.internalResponse\n ? response.internalResponse\n : response\n\n // 3. Let locationURL be actualResponse\u2019s location URL given request\u2019s current\n // URL\u2019s fragment.\n let locationURL\n\n try {\n locationURL = responseLocationURL(\n actualResponse,\n requestCurrentURL(request).hash\n )\n\n // 4. If locationURL is null, then return response.\n if (locationURL == null) {\n return response\n }\n } catch (err) {\n // 5. If locationURL is failure, then return a network error.\n return Promise.resolve(makeNetworkError(err))\n }\n\n // 6. If locationURL\u2019s scheme is not an HTTP(S) scheme, then return a network\n // error.\n if (!urlIsHttpHttpsScheme(locationURL)) {\n return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme'))\n }\n\n // 7. If request\u2019s redirect count is 20, then return a network error.\n if (request.redirectCount === 20) {\n return Promise.resolve(makeNetworkError('redirect count exceeded'))\n }\n\n // 8. Increase request\u2019s redirect count by 1.\n request.redirectCount += 1\n\n // 9. If request\u2019s mode is \"cors\", locationURL includes credentials, and\n // request\u2019s origin is not same origin with locationURL\u2019s origin, then return\n // a network error.\n if (\n request.mode === 'cors' &&\n (locationURL.username || locationURL.password) &&\n !sameOrigin(request, locationURL)\n ) {\n return Promise.resolve(makeNetworkError('cross origin not allowed for request mode \"cors\"'))\n }\n\n // 10. If request\u2019s response tainting is \"cors\" and locationURL includes\n // credentials, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n (locationURL.username || locationURL.password)\n ) {\n return Promise.resolve(makeNetworkError(\n 'URL cannot contain credentials for request mode \"cors\"'\n ))\n }\n\n // 11. If actualResponse\u2019s status is not 303, request\u2019s body is non-null,\n // and request\u2019s body\u2019s source is null, then return a network error.\n if (\n actualResponse.status !== 303 &&\n request.body != null &&\n request.body.source == null\n ) {\n return Promise.resolve(makeNetworkError())\n }\n\n // 12. If one of the following is true\n // - actualResponse\u2019s status is 301 or 302 and request\u2019s method is `POST`\n // - actualResponse\u2019s status is 303 and request\u2019s method is not `GET` or `HEAD`\n if (\n ([301, 302].includes(actualResponse.status) && request.method === 'POST') ||\n (actualResponse.status === 303 &&\n !GET_OR_HEAD.includes(request.method))\n ) {\n // then:\n // 1. Set request\u2019s method to `GET` and request\u2019s body to null.\n request.method = 'GET'\n request.body = null\n\n // 2. For each headerName of request-body-header name, delete headerName from\n // request\u2019s header list.\n for (const headerName of requestBodyHeader) {\n request.headersList.delete(headerName)\n }\n }\n\n // 13. If request\u2019s current URL\u2019s origin is not same origin with locationURL\u2019s\n // origin, then for each headerName of CORS non-wildcard request-header name,\n // delete headerName from request\u2019s header list.\n if (!sameOrigin(requestCurrentURL(request), locationURL)) {\n // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name\n request.headersList.delete('authorization', true)\n\n // https://fetch.spec.whatwg.org/#authentication-entries\n request.headersList.delete('proxy-authorization', true)\n\n // \"Cookie\" and \"Host\" are forbidden request-headers, which undici doesn't implement.\n request.headersList.delete('cookie', true)\n request.headersList.delete('host', true)\n }\n\n // 14. If request\u2019s body is non-null, then set request\u2019s body to the first return\n // value of safely extracting request\u2019s body\u2019s source.\n if (request.body != null) {\n assert(request.body.source != null)\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 15. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 16. Set timingInfo\u2019s redirect end time and post-redirect start time to the\n // coarsened shared current time given fetchParams\u2019s cross-origin isolated\n // capability.\n timingInfo.redirectEndTime = timingInfo.postRedirectStartTime =\n coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n\n // 17. If timingInfo\u2019s redirect start time is 0, then set timingInfo\u2019s\n // redirect start time to timingInfo\u2019s start time.\n if (timingInfo.redirectStartTime === 0) {\n timingInfo.redirectStartTime = timingInfo.startTime\n }\n\n // 18. Append locationURL to request\u2019s URL list.\n request.urlList.push(locationURL)\n\n // 19. Invoke set request\u2019s referrer policy on redirect on request and\n // actualResponse.\n setRequestReferrerPolicyOnRedirect(request, actualResponse)\n\n // 20. Return the result of running main fetch given fetchParams and true.\n return mainFetch(fetchParams, true)\n}\n\n// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch\nasync function httpNetworkOrCacheFetch (\n fetchParams,\n isAuthenticationFetch = false,\n isNewConnectionFetch = false\n) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let httpFetchParams be null.\n let httpFetchParams = null\n\n // 3. Let httpRequest be null.\n let httpRequest = null\n\n // 4. Let response be null.\n let response = null\n\n // 5. Let storedResponse be null.\n // TODO: cache\n\n // 6. Let httpCache be null.\n const httpCache = null\n\n // 7. Let the revalidatingFlag be unset.\n const revalidatingFlag = false\n\n // 8. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If request\u2019s window is \"no-window\" and request\u2019s redirect mode is\n // \"error\", then set httpFetchParams to fetchParams and httpRequest to\n // request.\n if (request.window === 'no-window' && request.redirect === 'error') {\n httpFetchParams = fetchParams\n httpRequest = request\n } else {\n // Otherwise:\n\n // 1. Set httpRequest to a clone of request.\n httpRequest = cloneRequest(request)\n\n // 2. Set httpFetchParams to a copy of fetchParams.\n httpFetchParams = { ...fetchParams }\n\n // 3. Set httpFetchParams\u2019s request to httpRequest.\n httpFetchParams.request = httpRequest\n }\n\n // 3. Let includeCredentials be true if one of\n const includeCredentials =\n request.credentials === 'include' ||\n (request.credentials === 'same-origin' &&\n request.responseTainting === 'basic')\n\n // 4. Let contentLength be httpRequest\u2019s body\u2019s length, if httpRequest\u2019s\n // body is non-null; otherwise null.\n const contentLength = httpRequest.body ? httpRequest.body.length : null\n\n // 5. Let contentLengthHeaderValue be null.\n let contentLengthHeaderValue = null\n\n // 6. If httpRequest\u2019s body is null and httpRequest\u2019s method is `POST` or\n // `PUT`, then set contentLengthHeaderValue to `0`.\n if (\n httpRequest.body == null &&\n ['POST', 'PUT'].includes(httpRequest.method)\n ) {\n contentLengthHeaderValue = '0'\n }\n\n // 7. If contentLength is non-null, then set contentLengthHeaderValue to\n // contentLength, serialized and isomorphic encoded.\n if (contentLength != null) {\n contentLengthHeaderValue = isomorphicEncode(`${contentLength}`)\n }\n\n // 8. If contentLengthHeaderValue is non-null, then append\n // `Content-Length`/contentLengthHeaderValue to httpRequest\u2019s header\n // list.\n if (contentLengthHeaderValue != null) {\n httpRequest.headersList.append('content-length', contentLengthHeaderValue, true)\n }\n\n // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,\n // contentLengthHeaderValue) to httpRequest\u2019s header list.\n\n // 10. If contentLength is non-null and httpRequest\u2019s keepalive is true,\n // then:\n if (contentLength != null && httpRequest.keepalive) {\n // NOTE: keepalive is a noop outside of browser context.\n }\n\n // 11. If httpRequest\u2019s referrer is a URL, then append\n // `Referer`/httpRequest\u2019s referrer, serialized and isomorphic encoded,\n // to httpRequest\u2019s header list.\n if (httpRequest.referrer instanceof URL) {\n httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true)\n }\n\n // 12. Append a request `Origin` header for httpRequest.\n appendRequestOriginHeader(httpRequest)\n\n // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA]\n appendFetchMetadata(httpRequest)\n\n // 14. If httpRequest\u2019s header list does not contain `User-Agent`, then\n // user agents should append `User-Agent`/default `User-Agent` value to\n // httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('user-agent', true)) {\n httpRequest.headersList.append('user-agent', defaultUserAgent)\n }\n\n // 15. If httpRequest\u2019s cache mode is \"default\" and httpRequest\u2019s header\n // list contains `If-Modified-Since`, `If-None-Match`,\n // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set\n // httpRequest\u2019s cache mode to \"no-store\".\n if (\n httpRequest.cache === 'default' &&\n (httpRequest.headersList.contains('if-modified-since', true) ||\n httpRequest.headersList.contains('if-none-match', true) ||\n httpRequest.headersList.contains('if-unmodified-since', true) ||\n httpRequest.headersList.contains('if-match', true) ||\n httpRequest.headersList.contains('if-range', true))\n ) {\n httpRequest.cache = 'no-store'\n }\n\n // 16. If httpRequest\u2019s cache mode is \"no-cache\", httpRequest\u2019s prevent\n // no-cache cache-control header modification flag is unset, and\n // httpRequest\u2019s header list does not contain `Cache-Control`, then append\n // `Cache-Control`/`max-age=0` to httpRequest\u2019s header list.\n if (\n httpRequest.cache === 'no-cache' &&\n !httpRequest.preventNoCacheCacheControlHeaderModification &&\n !httpRequest.headersList.contains('cache-control', true)\n ) {\n httpRequest.headersList.append('cache-control', 'max-age=0', true)\n }\n\n // 17. If httpRequest\u2019s cache mode is \"no-store\" or \"reload\", then:\n if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') {\n // 1. If httpRequest\u2019s header list does not contain `Pragma`, then append\n // `Pragma`/`no-cache` to httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('pragma', true)) {\n httpRequest.headersList.append('pragma', 'no-cache', true)\n }\n\n // 2. If httpRequest\u2019s header list does not contain `Cache-Control`,\n // then append `Cache-Control`/`no-cache` to httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('cache-control', true)) {\n httpRequest.headersList.append('cache-control', 'no-cache', true)\n }\n }\n\n // 18. If httpRequest\u2019s header list contains `Range`, then append\n // `Accept-Encoding`/`identity` to httpRequest\u2019s header list.\n if (httpRequest.headersList.contains('range', true)) {\n httpRequest.headersList.append('accept-encoding', 'identity', true)\n }\n\n // 19. Modify httpRequest\u2019s header list per HTTP. Do not append a given\n // header if httpRequest\u2019s header list contains that header\u2019s name.\n // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129\n if (!httpRequest.headersList.contains('accept-encoding', true)) {\n if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {\n httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true)\n } else {\n httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true)\n }\n }\n\n httpRequest.headersList.delete('host', true)\n\n // 20. If includeCredentials is true, then:\n if (includeCredentials) {\n // 1. If the user agent is not configured to block cookies for httpRequest\n // (see section 7 of [COOKIES]), then:\n // TODO: credentials\n // 2. If httpRequest\u2019s header list does not contain `Authorization`, then:\n // TODO: credentials\n }\n\n // 21. If there\u2019s a proxy-authentication entry, use it as appropriate.\n // TODO: proxy-authentication\n\n // 22. Set httpCache to the result of determining the HTTP cache\n // partition, given httpRequest.\n // TODO: cache\n\n // 23. If httpCache is null, then set httpRequest\u2019s cache mode to\n // \"no-store\".\n if (httpCache == null) {\n httpRequest.cache = 'no-store'\n }\n\n // 24. If httpRequest\u2019s cache mode is neither \"no-store\" nor \"reload\",\n // then:\n if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') {\n // TODO: cache\n }\n\n // 9. If aborted, then return the appropriate network error for fetchParams.\n // TODO\n\n // 10. If response is null, then:\n if (response == null) {\n // 1. If httpRequest\u2019s cache mode is \"only-if-cached\", then return a\n // network error.\n if (httpRequest.cache === 'only-if-cached') {\n return makeNetworkError('only if cached')\n }\n\n // 2. Let forwardResponse be the result of running HTTP-network fetch\n // given httpFetchParams, includeCredentials, and isNewConnectionFetch.\n const forwardResponse = await httpNetworkFetch(\n httpFetchParams,\n includeCredentials,\n isNewConnectionFetch\n )\n\n // 3. If httpRequest\u2019s method is unsafe and forwardResponse\u2019s status is\n // in the range 200 to 399, inclusive, invalidate appropriate stored\n // responses in httpCache, as per the \"Invalidation\" chapter of HTTP\n // Caching, and set storedResponse to null. [HTTP-CACHING]\n if (\n !safeMethodsSet.has(httpRequest.method) &&\n forwardResponse.status >= 200 &&\n forwardResponse.status <= 399\n ) {\n // TODO: cache\n }\n\n // 4. If the revalidatingFlag is set and forwardResponse\u2019s status is 304,\n // then:\n if (revalidatingFlag && forwardResponse.status === 304) {\n // TODO: cache\n }\n\n // 5. If response is null, then:\n if (response == null) {\n // 1. Set response to forwardResponse.\n response = forwardResponse\n\n // 2. Store httpRequest and forwardResponse in httpCache, as per the\n // \"Storing Responses in Caches\" chapter of HTTP Caching. [HTTP-CACHING]\n // TODO: cache\n }\n }\n\n // 11. Set response\u2019s URL list to a clone of httpRequest\u2019s URL list.\n response.urlList = [...httpRequest.urlList]\n\n // 12. If httpRequest\u2019s header list contains `Range`, then set response\u2019s\n // range-requested flag.\n if (httpRequest.headersList.contains('range', true)) {\n response.rangeRequested = true\n }\n\n // 13. Set response\u2019s request-includes-credentials to includeCredentials.\n response.requestIncludesCredentials = includeCredentials\n\n // 14. If response\u2019s status is 401, httpRequest\u2019s response tainting is not\n // \"cors\", includeCredentials is true, and request\u2019s window is an environment\n // settings object, then:\n // TODO\n\n // 15. If response\u2019s status is 407, then:\n if (response.status === 407) {\n // 1. If request\u2019s window is \"no-window\", then return a network error.\n if (request.window === 'no-window') {\n return makeNetworkError()\n }\n\n // 2. ???\n\n // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 4. Prompt the end user as appropriate in request\u2019s window and store\n // the result as a proxy-authentication entry. [HTTP-AUTH]\n // TODO: Invoke some kind of callback?\n\n // 5. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams.\n // TODO\n return makeNetworkError('proxy authentication required')\n }\n\n // 16. If all of the following are true\n if (\n // response\u2019s status is 421\n response.status === 421 &&\n // isNewConnectionFetch is false\n !isNewConnectionFetch &&\n // request\u2019s body is null, or request\u2019s body is non-null and request\u2019s body\u2019s source is non-null\n (request.body == null || request.body.source != null)\n ) {\n // then:\n\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Set response to the result of running HTTP-network-or-cache\n // fetch given fetchParams, isAuthenticationFetch, and true.\n\n // TODO (spec): The spec doesn't specify this but we need to cancel\n // the active response before we can start a new one.\n // https://github.com/whatwg/fetch/issues/1293\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(\n fetchParams,\n isAuthenticationFetch,\n true\n )\n }\n\n // 17. If isAuthenticationFetch is true, then create an authentication entry\n if (isAuthenticationFetch) {\n // TODO\n }\n\n // 18. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-network-fetch\nasync function httpNetworkFetch (\n fetchParams,\n includeCredentials = false,\n forceNewConnection = false\n) {\n assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed)\n\n fetchParams.controller.connection = {\n abort: null,\n destroyed: false,\n destroy (err, abort = true) {\n if (!this.destroyed) {\n this.destroyed = true\n if (abort) {\n this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError'))\n }\n }\n }\n }\n\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 4. Let httpCache be the result of determining the HTTP cache partition,\n // given request.\n // TODO: cache\n const httpCache = null\n\n // 5. If httpCache is null, then set request\u2019s cache mode to \"no-store\".\n if (httpCache == null) {\n request.cache = 'no-store'\n }\n\n // 6. Let networkPartitionKey be the result of determining the network\n // partition key given request.\n // TODO\n\n // 7. Let newConnection be \"yes\" if forceNewConnection is true; otherwise\n // \"no\".\n const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars\n\n // 8. Switch on request\u2019s mode:\n if (request.mode === 'websocket') {\n // Let connection be the result of obtaining a WebSocket connection,\n // given request\u2019s current URL.\n // TODO\n } else {\n // Let connection be the result of obtaining a connection, given\n // networkPartitionKey, request\u2019s current URL\u2019s origin,\n // includeCredentials, and forceNewConnection.\n // TODO\n }\n\n // 9. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If connection is failure, then return a network error.\n\n // 2. Set timingInfo\u2019s final connection timing info to the result of\n // calling clamp and coarsen connection timing info with connection\u2019s\n // timing info, timingInfo\u2019s post-redirect start time, and fetchParams\u2019s\n // cross-origin isolated capability.\n\n // 3. If connection is not an HTTP/2 connection, request\u2019s body is non-null,\n // and request\u2019s body\u2019s source is null, then append (`Transfer-Encoding`,\n // `chunked`) to request\u2019s header list.\n\n // 4. Set timingInfo\u2019s final network-request start time to the coarsened\n // shared current time given fetchParams\u2019s cross-origin isolated\n // capability.\n\n // 5. Set response to the result of making an HTTP request over connection\n // using request with the following caveats:\n\n // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS]\n // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH]\n\n // - If request\u2019s body is non-null, and request\u2019s body\u2019s source is null,\n // then the user agent may have a buffer of up to 64 kibibytes and store\n // a part of request\u2019s body in that buffer. If the user agent reads from\n // request\u2019s body beyond that buffer\u2019s size and the user agent needs to\n // resend request, then instead return a network error.\n\n // - Set timingInfo\u2019s final network-response start time to the coarsened\n // shared current time given fetchParams\u2019s cross-origin isolated capability,\n // immediately after the user agent\u2019s HTTP parser receives the first byte\n // of the response (e.g., frame header bytes for HTTP/2 or response status\n // line for HTTP/1.x).\n\n // - Wait until all the headers are transmitted.\n\n // - Any responses whose status is in the range 100 to 199, inclusive,\n // and is not 101, are to be ignored, except for the purposes of setting\n // timingInfo\u2019s final network-response start time above.\n\n // - If request\u2019s header list contains `Transfer-Encoding`/`chunked` and\n // response is transferred via HTTP/1.0 or older, then return a network\n // error.\n\n // - If the HTTP request results in a TLS client certificate dialog, then:\n\n // 1. If request\u2019s window is an environment settings object, make the\n // dialog available in request\u2019s window.\n\n // 2. Otherwise, return a network error.\n\n // To transmit request\u2019s body body, run these steps:\n let requestBody = null\n // 1. If body is null and fetchParams\u2019s process request end-of-body is\n // non-null, then queue a fetch task given fetchParams\u2019s process request\n // end-of-body and fetchParams\u2019s task destination.\n if (request.body == null && fetchParams.processRequestEndOfBody) {\n queueMicrotask(() => fetchParams.processRequestEndOfBody())\n } else if (request.body != null) {\n // 2. Otherwise, if body is non-null:\n\n // 1. Let processBodyChunk given bytes be these steps:\n const processBodyChunk = async function * (bytes) {\n // 1. If the ongoing fetch is terminated, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. Run this step in parallel: transmit bytes.\n yield bytes\n\n // 3. If fetchParams\u2019s process request body is non-null, then run\n // fetchParams\u2019s process request body given bytes\u2019s length.\n fetchParams.processRequestBodyChunkLength?.(bytes.byteLength)\n }\n\n // 2. Let processEndOfBody be these steps:\n const processEndOfBody = () => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If fetchParams\u2019s process request end-of-body is non-null,\n // then run fetchParams\u2019s process request end-of-body.\n if (fetchParams.processRequestEndOfBody) {\n fetchParams.processRequestEndOfBody()\n }\n }\n\n // 3. Let processBodyError given e be these steps:\n const processBodyError = (e) => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If e is an \"AbortError\" DOMException, then abort fetchParams\u2019s controller.\n if (e.name === 'AbortError') {\n fetchParams.controller.abort()\n } else {\n fetchParams.controller.terminate(e)\n }\n }\n\n // 4. Incrementally read request\u2019s body given processBodyChunk, processEndOfBody,\n // processBodyError, and fetchParams\u2019s task destination.\n requestBody = (async function * () {\n try {\n for await (const bytes of request.body.stream) {\n yield * processBodyChunk(bytes)\n }\n processEndOfBody()\n } catch (err) {\n processBodyError(err)\n }\n })()\n }\n\n try {\n // socket is only provided for websockets\n const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody })\n\n if (socket) {\n response = makeResponse({ status, statusText, headersList, socket })\n } else {\n const iterator = body[Symbol.asyncIterator]()\n fetchParams.controller.next = () => iterator.next()\n\n response = makeResponse({ status, statusText, headersList })\n }\n } catch (err) {\n // 10. If aborted, then:\n if (err.name === 'AbortError') {\n // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n fetchParams.controller.connection.destroy()\n\n // 2. Return the appropriate network error for fetchParams.\n return makeAppropriateNetworkError(fetchParams, err)\n }\n\n return makeNetworkError(err)\n }\n\n // 11. Let pullAlgorithm be an action that resumes the ongoing fetch\n // if it is suspended.\n const pullAlgorithm = async () => {\n await fetchParams.controller.resume()\n }\n\n // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams\u2019s\n // controller with reason, given reason.\n const cancelAlgorithm = (reason) => {\n // If the aborted fetch was already terminated, then we do not\n // need to do anything.\n if (!isCancelled(fetchParams)) {\n fetchParams.controller.abort(reason)\n }\n }\n\n // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by\n // the user agent.\n // TODO\n\n // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object\n // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.\n // TODO\n\n // 15. Let stream be a new ReadableStream.\n // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm,\n // cancelAlgorithm set to cancelAlgorithm.\n const stream = new ReadableStream(\n {\n async start (controller) {\n fetchParams.controller.controller = controller\n },\n async pull (controller) {\n await pullAlgorithm(controller)\n },\n async cancel (reason) {\n await cancelAlgorithm(reason)\n },\n type: 'bytes'\n }\n )\n\n // 17. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. Set response\u2019s body to a new body whose stream is stream.\n response.body = { stream, source: null, length: null }\n\n // 2. If response is not a network error and request\u2019s cache mode is\n // not \"no-store\", then update response in httpCache for request.\n // TODO\n\n // 3. If includeCredentials is true and the user agent is not configured\n // to block cookies for request (see section 7 of [COOKIES]), then run the\n // \"set-cookie-string\" parsing algorithm (see section 5.2 of [COOKIES]) on\n // the value of each header whose name is a byte-case-insensitive match for\n // `Set-Cookie` in response\u2019s header list, if any, and request\u2019s current URL.\n // TODO\n\n // 18. If aborted, then:\n // TODO\n\n // 19. Run these steps in parallel:\n\n // 1. Run these steps, but abort when fetchParams is canceled:\n fetchParams.controller.onAborted = onAborted\n fetchParams.controller.on('terminated', onAborted)\n fetchParams.controller.resume = async () => {\n // 1. While true\n while (true) {\n // 1-3. See onData...\n\n // 4. Set bytes to the result of handling content codings given\n // codings and bytes.\n let bytes\n let isFailure\n try {\n const { done, value } = await fetchParams.controller.next()\n\n if (isAborted(fetchParams)) {\n break\n }\n\n bytes = done ? undefined : value\n } catch (err) {\n if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {\n // zlib doesn't like empty streams.\n bytes = undefined\n } else {\n bytes = err\n\n // err may be propagated from the result of calling readablestream.cancel,\n // which might not be an error. https://github.com/nodejs/undici/issues/2009\n isFailure = true\n }\n }\n\n if (bytes === undefined) {\n // 2. Otherwise, if the bytes transmission for response\u2019s message\n // body is done normally and stream is readable, then close\n // stream, finalize response for fetchParams and response, and\n // abort these in-parallel steps.\n readableStreamClose(fetchParams.controller.controller)\n\n finalizeResponse(fetchParams, response)\n\n return\n }\n\n // 5. Increase timingInfo\u2019s decoded body size by bytes\u2019s length.\n timingInfo.decodedBodySize += bytes?.byteLength ?? 0\n\n // 6. If bytes is failure, then terminate fetchParams\u2019s controller.\n if (isFailure) {\n fetchParams.controller.terminate(bytes)\n return\n }\n\n // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes\n // into stream.\n const buffer = new Uint8Array(bytes)\n if (buffer.byteLength) {\n fetchParams.controller.controller.enqueue(buffer)\n }\n\n // 8. If stream is errored, then terminate the ongoing fetch.\n if (isErrored(stream)) {\n fetchParams.controller.terminate()\n return\n }\n\n // 9. If stream doesn\u2019t need more data ask the user agent to suspend\n // the ongoing fetch.\n if (fetchParams.controller.controller.desiredSize <= 0) {\n return\n }\n }\n }\n\n // 2. If aborted, then:\n function onAborted (reason) {\n // 2. If fetchParams is aborted, then:\n if (isAborted(fetchParams)) {\n // 1. Set response\u2019s aborted flag.\n response.aborted = true\n\n // 2. If stream is readable, then error stream with the result of\n // deserialize a serialized abort reason given fetchParams\u2019s\n // controller\u2019s serialized abort reason and an\n // implementation-defined realm.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(\n fetchParams.controller.serializedAbortReason\n )\n }\n } else {\n // 3. Otherwise, if stream is readable, error stream with a TypeError.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(new TypeError('terminated', {\n cause: isErrorLike(reason) ? reason : undefined\n }))\n }\n }\n\n // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so.\n fetchParams.controller.connection.destroy()\n }\n\n // 20. Return response.\n return response\n\n function dispatch ({ body }) {\n const url = requestCurrentURL(request)\n /** @type {import('../..').Agent} */\n const agent = fetchParams.controller.dispatcher\n\n return new Promise((resolve, reject) => agent.dispatch(\n {\n path: url.pathname + url.search,\n origin: url.origin,\n method: request.method,\n body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body,\n headers: request.headersList.entries,\n maxRedirections: 0,\n upgrade: request.mode === 'websocket' ? 'websocket' : undefined\n },\n {\n body: null,\n abort: null,\n\n onConnect (abort) {\n // TODO (fix): Do we need connection here?\n const { connection } = fetchParams.controller\n\n // Set timingInfo\u2019s final connection timing info to the result of calling clamp and coarsen\n // connection timing info with connection\u2019s timing info, timingInfo\u2019s post-redirect start\n // time, and fetchParams\u2019s cross-origin isolated capability.\n // TODO: implement connection timing\n timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability)\n\n if (connection.destroyed) {\n abort(new DOMException('The operation was aborted.', 'AbortError'))\n } else {\n fetchParams.controller.on('terminated', abort)\n this.abort = connection.abort = abort\n }\n\n // Set timingInfo\u2019s final network-request start time to the coarsened shared current time given\n // fetchParams\u2019s cross-origin isolated capability.\n timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n },\n\n onResponseStarted () {\n // Set timingInfo\u2019s final network-response start time to the coarsened shared current\n // time given fetchParams\u2019s cross-origin isolated capability, immediately after the\n // user agent\u2019s HTTP parser receives the first byte of the response (e.g., frame header\n // bytes for HTTP/2 or response status line for HTTP/1.x).\n timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n },\n\n onHeaders (status, rawHeaders, resume, statusText) {\n if (status < 200) {\n return\n }\n\n let location = ''\n\n const headersList = new HeadersList()\n\n for (let i = 0; i < rawHeaders.length; i += 2) {\n headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true)\n }\n location = headersList.get('location', true)\n\n this.body = new Readable({ read: resume })\n\n const decoders = []\n\n const willFollow = location && request.redirect === 'follow' &&\n redirectStatusSet.has(status)\n\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n const contentEncoding = headersList.get('content-encoding', true)\n // \"All content-coding values are case-insensitive...\"\n /** @type {string[]} */\n const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : []\n\n // Limit the number of content-encodings to prevent resource exhaustion.\n // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).\n const maxContentEncodings = 5\n if (codings.length > maxContentEncodings) {\n reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))\n return true\n }\n\n for (let i = codings.length - 1; i >= 0; --i) {\n const coding = codings[i].trim()\n // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2\n if (coding === 'x-gzip' || coding === 'gzip') {\n decoders.push(zlib.createGunzip({\n // Be less strict when decoding compressed responses, since sometimes\n // servers send slightly invalid responses that are still accepted\n // by common browsers.\n // Always using Z_SYNC_FLUSH is what cURL does.\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'deflate') {\n decoders.push(createInflate({\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'br') {\n decoders.push(zlib.createBrotliDecompress({\n flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n }))\n } else {\n decoders.length = 0\n break\n }\n }\n }\n\n const onError = this.onError.bind(this)\n\n resolve({\n status,\n statusText,\n headersList,\n body: decoders.length\n ? pipeline(this.body, ...decoders, (err) => {\n if (err) {\n this.onError(err)\n }\n }).on('error', onError)\n : this.body.on('error', onError)\n })\n\n return true\n },\n\n onData (chunk) {\n if (fetchParams.controller.dump) {\n return\n }\n\n // 1. If one or more bytes have been transmitted from response\u2019s\n // message body, then:\n\n // 1. Let bytes be the transmitted bytes.\n const bytes = chunk\n\n // 2. Let codings be the result of extracting header list values\n // given `Content-Encoding` and response\u2019s header list.\n // See pullAlgorithm.\n\n // 3. Increase timingInfo\u2019s encoded body size by bytes\u2019s length.\n timingInfo.encodedBodySize += bytes.byteLength\n\n // 4. See pullAlgorithm...\n\n return this.body.push(bytes)\n },\n\n onComplete () {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n if (fetchParams.controller.onAborted) {\n fetchParams.controller.off('terminated', fetchParams.controller.onAborted)\n }\n\n fetchParams.controller.ended = true\n\n this.body.push(null)\n },\n\n onError (error) {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n this.body?.destroy(error)\n\n fetchParams.controller.terminate(error)\n\n reject(error)\n },\n\n onUpgrade (status, rawHeaders, socket) {\n if (status !== 101) {\n return\n }\n\n const headersList = new HeadersList()\n\n for (let i = 0; i < rawHeaders.length; i += 2) {\n headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true)\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList,\n socket\n })\n\n return true\n }\n }\n ))\n }\n}\n\nmodule.exports = {\n fetch,\n Fetch,\n fetching,\n finalizeAndReportTiming\n}\n", "'use strict'\n\nmodule.exports = {\n kState: Symbol('FileReader state'),\n kResult: Symbol('FileReader result'),\n kError: Symbol('FileReader error'),\n kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'),\n kEvents: Symbol('FileReader events'),\n kAborted: Symbol('FileReader aborted')\n}\n", "'use strict'\n\nconst { webidl } = require('../fetch/webidl')\n\nconst kState = Symbol('ProgressEvent state')\n\n/**\n * @see https://xhr.spec.whatwg.org/#progressevent\n */\nclass ProgressEvent extends Event {\n constructor (type, eventInitDict = {}) {\n type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type')\n eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {})\n\n super(type, eventInitDict)\n\n this[kState] = {\n lengthComputable: eventInitDict.lengthComputable,\n loaded: eventInitDict.loaded,\n total: eventInitDict.total\n }\n }\n\n get lengthComputable () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].lengthComputable\n }\n\n get loaded () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].loaded\n }\n\n get total () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].total\n }\n}\n\nwebidl.converters.ProgressEventInit = webidl.dictionaryConverter([\n {\n key: 'lengthComputable',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'loaded',\n converter: webidl.converters['unsigned long long'],\n defaultValue: () => 0\n },\n {\n key: 'total',\n converter: webidl.converters['unsigned long long'],\n defaultValue: () => 0\n },\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n }\n])\n\nmodule.exports = {\n ProgressEvent\n}\n", "'use strict'\n\n/**\n * @see https://encoding.spec.whatwg.org/#concept-encoding-get\n * @param {string|undefined} label\n */\nfunction getEncoding (label) {\n if (!label) {\n return 'failure'\n }\n\n // 1. Remove any leading and trailing ASCII whitespace from label.\n // 2. If label is an ASCII case-insensitive match for any of the\n // labels listed in the table below, then return the\n // corresponding encoding; otherwise return failure.\n switch (label.trim().toLowerCase()) {\n case 'unicode-1-1-utf-8':\n case 'unicode11utf8':\n case 'unicode20utf8':\n case 'utf-8':\n case 'utf8':\n case 'x-unicode20utf8':\n return 'UTF-8'\n case '866':\n case 'cp866':\n case 'csibm866':\n case 'ibm866':\n return 'IBM866'\n case 'csisolatin2':\n case 'iso-8859-2':\n case 'iso-ir-101':\n case 'iso8859-2':\n case 'iso88592':\n case 'iso_8859-2':\n case 'iso_8859-2:1987':\n case 'l2':\n case 'latin2':\n return 'ISO-8859-2'\n case 'csisolatin3':\n case 'iso-8859-3':\n case 'iso-ir-109':\n case 'iso8859-3':\n case 'iso88593':\n case 'iso_8859-3':\n case 'iso_8859-3:1988':\n case 'l3':\n case 'latin3':\n return 'ISO-8859-3'\n case 'csisolatin4':\n case 'iso-8859-4':\n case 'iso-ir-110':\n case 'iso8859-4':\n case 'iso88594':\n case 'iso_8859-4':\n case 'iso_8859-4:1988':\n case 'l4':\n case 'latin4':\n return 'ISO-8859-4'\n case 'csisolatincyrillic':\n case 'cyrillic':\n case 'iso-8859-5':\n case 'iso-ir-144':\n case 'iso8859-5':\n case 'iso88595':\n case 'iso_8859-5':\n case 'iso_8859-5:1988':\n return 'ISO-8859-5'\n case 'arabic':\n case 'asmo-708':\n case 'csiso88596e':\n case 'csiso88596i':\n case 'csisolatinarabic':\n case 'ecma-114':\n case 'iso-8859-6':\n case 'iso-8859-6-e':\n case 'iso-8859-6-i':\n case 'iso-ir-127':\n case 'iso8859-6':\n case 'iso88596':\n case 'iso_8859-6':\n case 'iso_8859-6:1987':\n return 'ISO-8859-6'\n case 'csisolatingreek':\n case 'ecma-118':\n case 'elot_928':\n case 'greek':\n case 'greek8':\n case 'iso-8859-7':\n case 'iso-ir-126':\n case 'iso8859-7':\n case 'iso88597':\n case 'iso_8859-7':\n case 'iso_8859-7:1987':\n case 'sun_eu_greek':\n return 'ISO-8859-7'\n case 'csiso88598e':\n case 'csisolatinhebrew':\n case 'hebrew':\n case 'iso-8859-8':\n case 'iso-8859-8-e':\n case 'iso-ir-138':\n case 'iso8859-8':\n case 'iso88598':\n case 'iso_8859-8':\n case 'iso_8859-8:1988':\n case 'visual':\n return 'ISO-8859-8'\n case 'csiso88598i':\n case 'iso-8859-8-i':\n case 'logical':\n return 'ISO-8859-8-I'\n case 'csisolatin6':\n case 'iso-8859-10':\n case 'iso-ir-157':\n case 'iso8859-10':\n case 'iso885910':\n case 'l6':\n case 'latin6':\n return 'ISO-8859-10'\n case 'iso-8859-13':\n case 'iso8859-13':\n case 'iso885913':\n return 'ISO-8859-13'\n case 'iso-8859-14':\n case 'iso8859-14':\n case 'iso885914':\n return 'ISO-8859-14'\n case 'csisolatin9':\n case 'iso-8859-15':\n case 'iso8859-15':\n case 'iso885915':\n case 'iso_8859-15':\n case 'l9':\n return 'ISO-8859-15'\n case 'iso-8859-16':\n return 'ISO-8859-16'\n case 'cskoi8r':\n case 'koi':\n case 'koi8':\n case 'koi8-r':\n case 'koi8_r':\n return 'KOI8-R'\n case 'koi8-ru':\n case 'koi8-u':\n return 'KOI8-U'\n case 'csmacintosh':\n case 'mac':\n case 'macintosh':\n case 'x-mac-roman':\n return 'macintosh'\n case 'iso-8859-11':\n case 'iso8859-11':\n case 'iso885911':\n case 'tis-620':\n case 'windows-874':\n return 'windows-874'\n case 'cp1250':\n case 'windows-1250':\n case 'x-cp1250':\n return 'windows-1250'\n case 'cp1251':\n case 'windows-1251':\n case 'x-cp1251':\n return 'windows-1251'\n case 'ansi_x3.4-1968':\n case 'ascii':\n case 'cp1252':\n case 'cp819':\n case 'csisolatin1':\n case 'ibm819':\n case 'iso-8859-1':\n case 'iso-ir-100':\n case 'iso8859-1':\n case 'iso88591':\n case 'iso_8859-1':\n case 'iso_8859-1:1987':\n case 'l1':\n case 'latin1':\n case 'us-ascii':\n case 'windows-1252':\n case 'x-cp1252':\n return 'windows-1252'\n case 'cp1253':\n case 'windows-1253':\n case 'x-cp1253':\n return 'windows-1253'\n case 'cp1254':\n case 'csisolatin5':\n case 'iso-8859-9':\n case 'iso-ir-148':\n case 'iso8859-9':\n case 'iso88599':\n case 'iso_8859-9':\n case 'iso_8859-9:1989':\n case 'l5':\n case 'latin5':\n case 'windows-1254':\n case 'x-cp1254':\n return 'windows-1254'\n case 'cp1255':\n case 'windows-1255':\n case 'x-cp1255':\n return 'windows-1255'\n case 'cp1256':\n case 'windows-1256':\n case 'x-cp1256':\n return 'windows-1256'\n case 'cp1257':\n case 'windows-1257':\n case 'x-cp1257':\n return 'windows-1257'\n case 'cp1258':\n case 'windows-1258':\n case 'x-cp1258':\n return 'windows-1258'\n case 'x-mac-cyrillic':\n case 'x-mac-ukrainian':\n return 'x-mac-cyrillic'\n case 'chinese':\n case 'csgb2312':\n case 'csiso58gb231280':\n case 'gb2312':\n case 'gb_2312':\n case 'gb_2312-80':\n case 'gbk':\n case 'iso-ir-58':\n case 'x-gbk':\n return 'GBK'\n case 'gb18030':\n return 'gb18030'\n case 'big5':\n case 'big5-hkscs':\n case 'cn-big5':\n case 'csbig5':\n case 'x-x-big5':\n return 'Big5'\n case 'cseucpkdfmtjapanese':\n case 'euc-jp':\n case 'x-euc-jp':\n return 'EUC-JP'\n case 'csiso2022jp':\n case 'iso-2022-jp':\n return 'ISO-2022-JP'\n case 'csshiftjis':\n case 'ms932':\n case 'ms_kanji':\n case 'shift-jis':\n case 'shift_jis':\n case 'sjis':\n case 'windows-31j':\n case 'x-sjis':\n return 'Shift_JIS'\n case 'cseuckr':\n case 'csksc56011987':\n case 'euc-kr':\n case 'iso-ir-149':\n case 'korean':\n case 'ks_c_5601-1987':\n case 'ks_c_5601-1989':\n case 'ksc5601':\n case 'ksc_5601':\n case 'windows-949':\n return 'EUC-KR'\n case 'csiso2022kr':\n case 'hz-gb-2312':\n case 'iso-2022-cn':\n case 'iso-2022-cn-ext':\n case 'iso-2022-kr':\n case 'replacement':\n return 'replacement'\n case 'unicodefffe':\n case 'utf-16be':\n return 'UTF-16BE'\n case 'csunicode':\n case 'iso-10646-ucs-2':\n case 'ucs-2':\n case 'unicode':\n case 'unicodefeff':\n case 'utf-16':\n case 'utf-16le':\n return 'UTF-16LE'\n case 'x-user-defined':\n return 'x-user-defined'\n default: return 'failure'\n }\n}\n\nmodule.exports = {\n getEncoding\n}\n", "'use strict'\n\nconst {\n kState,\n kError,\n kResult,\n kAborted,\n kLastProgressEventFired\n} = require('./symbols')\nconst { ProgressEvent } = require('./progressevent')\nconst { getEncoding } = require('./encoding')\nconst { serializeAMimeType, parseMIMEType } = require('../fetch/data-url')\nconst { types } = require('node:util')\nconst { StringDecoder } = require('string_decoder')\nconst { btoa } = require('node:buffer')\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#readOperation\n * @param {import('./filereader').FileReader} fr\n * @param {import('buffer').Blob} blob\n * @param {string} type\n * @param {string?} encodingName\n */\nfunction readOperation (fr, blob, type, encodingName) {\n // 1. If fr\u2019s state is \"loading\", throw an InvalidStateError\n // DOMException.\n if (fr[kState] === 'loading') {\n throw new DOMException('Invalid state', 'InvalidStateError')\n }\n\n // 2. Set fr\u2019s state to \"loading\".\n fr[kState] = 'loading'\n\n // 3. Set fr\u2019s result to null.\n fr[kResult] = null\n\n // 4. Set fr\u2019s error to null.\n fr[kError] = null\n\n // 5. Let stream be the result of calling get stream on blob.\n /** @type {import('stream/web').ReadableStream} */\n const stream = blob.stream()\n\n // 6. Let reader be the result of getting a reader from stream.\n const reader = stream.getReader()\n\n // 7. Let bytes be an empty byte sequence.\n /** @type {Uint8Array[]} */\n const bytes = []\n\n // 8. Let chunkPromise be the result of reading a chunk from\n // stream with reader.\n let chunkPromise = reader.read()\n\n // 9. Let isFirstChunk be true.\n let isFirstChunk = true\n\n // 10. In parallel, while true:\n // Note: \"In parallel\" just means non-blocking\n // Note 2: readOperation itself cannot be async as double\n // reading the body would then reject the promise, instead\n // of throwing an error.\n ;(async () => {\n while (!fr[kAborted]) {\n // 1. Wait for chunkPromise to be fulfilled or rejected.\n try {\n const { done, value } = await chunkPromise\n\n // 2. If chunkPromise is fulfilled, and isFirstChunk is\n // true, queue a task to fire a progress event called\n // loadstart at fr.\n if (isFirstChunk && !fr[kAborted]) {\n queueMicrotask(() => {\n fireAProgressEvent('loadstart', fr)\n })\n }\n\n // 3. Set isFirstChunk to false.\n isFirstChunk = false\n\n // 4. If chunkPromise is fulfilled with an object whose\n // done property is false and whose value property is\n // a Uint8Array object, run these steps:\n if (!done && types.isUint8Array(value)) {\n // 1. Let bs be the byte sequence represented by the\n // Uint8Array object.\n\n // 2. Append bs to bytes.\n bytes.push(value)\n\n // 3. If roughly 50ms have passed since these steps\n // were last invoked, queue a task to fire a\n // progress event called progress at fr.\n if (\n (\n fr[kLastProgressEventFired] === undefined ||\n Date.now() - fr[kLastProgressEventFired] >= 50\n ) &&\n !fr[kAborted]\n ) {\n fr[kLastProgressEventFired] = Date.now()\n queueMicrotask(() => {\n fireAProgressEvent('progress', fr)\n })\n }\n\n // 4. Set chunkPromise to the result of reading a\n // chunk from stream with reader.\n chunkPromise = reader.read()\n } else if (done) {\n // 5. Otherwise, if chunkPromise is fulfilled with an\n // object whose done property is true, queue a task\n // to run the following steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr\u2019s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Let result be the result of package data given\n // bytes, type, blob\u2019s type, and encodingName.\n try {\n const result = packageData(bytes, type, blob.type, encodingName)\n\n // 4. Else:\n\n if (fr[kAborted]) {\n return\n }\n\n // 1. Set fr\u2019s result to result.\n fr[kResult] = result\n\n // 2. Fire a progress event called load at the fr.\n fireAProgressEvent('load', fr)\n } catch (error) {\n // 3. If package data threw an exception error:\n\n // 1. Set fr\u2019s error to error.\n fr[kError] = error\n\n // 2. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n }\n\n // 5. If fr\u2019s state is not \"loading\", fire a progress\n // event called loadend at the fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n } catch (error) {\n if (fr[kAborted]) {\n return\n }\n\n // 6. Otherwise, if chunkPromise is rejected with an\n // error error, queue a task to run the following\n // steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr\u2019s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Set fr\u2019s error to error.\n fr[kError] = error\n\n // 3. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n\n // 4. If fr\u2019s state is not \"loading\", fire a progress\n // event called loadend at fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n }\n })()\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#fire-a-progress-event\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e The name of the event\n * @param {import('./filereader').FileReader} reader\n */\nfunction fireAProgressEvent (e, reader) {\n // The progress event e does not bubble. e.bubbles must be false\n // The progress event e is NOT cancelable. e.cancelable must be false\n const event = new ProgressEvent(e, {\n bubbles: false,\n cancelable: false\n })\n\n reader.dispatchEvent(event)\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#blob-package-data\n * @param {Uint8Array[]} bytes\n * @param {string} type\n * @param {string?} mimeType\n * @param {string?} encodingName\n */\nfunction packageData (bytes, type, mimeType, encodingName) {\n // 1. A Blob has an associated package data algorithm, given\n // bytes, a type, a optional mimeType, and a optional\n // encodingName, which switches on type and runs the\n // associated steps:\n\n switch (type) {\n case 'DataURL': {\n // 1. Return bytes as a DataURL [RFC2397] subject to\n // the considerations below:\n // * Use mimeType as part of the Data URL if it is\n // available in keeping with the Data URL\n // specification [RFC2397].\n // * If mimeType is not available return a Data URL\n // without a media-type. [RFC2397].\n\n // https://datatracker.ietf.org/doc/html/rfc2397#section-3\n // dataurl := \"data:\" [ mediatype ] [ \";base64\" ] \",\" data\n // mediatype := [ type \"/\" subtype ] *( \";\" parameter )\n // data := *urlchar\n // parameter := attribute \"=\" value\n let dataURL = 'data:'\n\n const parsed = parseMIMEType(mimeType || 'application/octet-stream')\n\n if (parsed !== 'failure') {\n dataURL += serializeAMimeType(parsed)\n }\n\n dataURL += ';base64,'\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n dataURL += btoa(decoder.write(chunk))\n }\n\n dataURL += btoa(decoder.end())\n\n return dataURL\n }\n case 'Text': {\n // 1. Let encoding be failure\n let encoding = 'failure'\n\n // 2. If the encodingName is present, set encoding to the\n // result of getting an encoding from encodingName.\n if (encodingName) {\n encoding = getEncoding(encodingName)\n }\n\n // 3. If encoding is failure, and mimeType is present:\n if (encoding === 'failure' && mimeType) {\n // 1. Let type be the result of parse a MIME type\n // given mimeType.\n const type = parseMIMEType(mimeType)\n\n // 2. If type is not failure, set encoding to the result\n // of getting an encoding from type\u2019s parameters[\"charset\"].\n if (type !== 'failure') {\n encoding = getEncoding(type.parameters.get('charset'))\n }\n }\n\n // 4. If encoding is failure, then set encoding to UTF-8.\n if (encoding === 'failure') {\n encoding = 'UTF-8'\n }\n\n // 5. Decode bytes using fallback encoding encoding, and\n // return the result.\n return decode(bytes, encoding)\n }\n case 'ArrayBuffer': {\n // Return a new ArrayBuffer whose contents are bytes.\n const sequence = combineByteSequences(bytes)\n\n return sequence.buffer\n }\n case 'BinaryString': {\n // Return bytes as a binary string, in which every byte\n // is represented by a code unit of equal value [0..255].\n let binaryString = ''\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n binaryString += decoder.write(chunk)\n }\n\n binaryString += decoder.end()\n\n return binaryString\n }\n }\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#decode\n * @param {Uint8Array[]} ioQueue\n * @param {string} encoding\n */\nfunction decode (ioQueue, encoding) {\n const bytes = combineByteSequences(ioQueue)\n\n // 1. Let BOMEncoding be the result of BOM sniffing ioQueue.\n const BOMEncoding = BOMSniffing(bytes)\n\n let slice = 0\n\n // 2. If BOMEncoding is non-null:\n if (BOMEncoding !== null) {\n // 1. Set encoding to BOMEncoding.\n encoding = BOMEncoding\n\n // 2. Read three bytes from ioQueue, if BOMEncoding is\n // UTF-8; otherwise read two bytes.\n // (Do nothing with those bytes.)\n slice = BOMEncoding === 'UTF-8' ? 3 : 2\n }\n\n // 3. Process a queue with an instance of encoding\u2019s\n // decoder, ioQueue, output, and \"replacement\".\n\n // 4. Return output.\n\n const sliced = bytes.slice(slice)\n return new TextDecoder(encoding).decode(sliced)\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#bom-sniff\n * @param {Uint8Array} ioQueue\n */\nfunction BOMSniffing (ioQueue) {\n // 1. Let BOM be the result of peeking 3 bytes from ioQueue,\n // converted to a byte sequence.\n const [a, b, c] = ioQueue\n\n // 2. For each of the rows in the table below, starting with\n // the first one and going down, if BOM starts with the\n // bytes given in the first column, then return the\n // encoding given in the cell in the second column of that\n // row. Otherwise, return null.\n if (a === 0xEF && b === 0xBB && c === 0xBF) {\n return 'UTF-8'\n } else if (a === 0xFE && b === 0xFF) {\n return 'UTF-16BE'\n } else if (a === 0xFF && b === 0xFE) {\n return 'UTF-16LE'\n }\n\n return null\n}\n\n/**\n * @param {Uint8Array[]} sequences\n */\nfunction combineByteSequences (sequences) {\n const size = sequences.reduce((a, b) => {\n return a + b.byteLength\n }, 0)\n\n let offset = 0\n\n return sequences.reduce((a, b) => {\n a.set(b, offset)\n offset += b.byteLength\n return a\n }, new Uint8Array(size))\n}\n\nmodule.exports = {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n}\n", "'use strict'\n\nconst {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n} = require('./util')\nconst {\n kState,\n kError,\n kResult,\n kEvents,\n kAborted\n} = require('./symbols')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../../core/util')\n\nclass FileReader extends EventTarget {\n constructor () {\n super()\n\n this[kState] = 'empty'\n this[kResult] = null\n this[kError] = null\n this[kEvents] = {\n loadend: null,\n error: null,\n abort: null,\n load: null,\n progress: null,\n loadstart: null\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer\n * @param {import('buffer').Blob} blob\n */\n readAsArrayBuffer (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer')\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsArrayBuffer(blob) method, when invoked,\n // must initiate a read operation for blob with ArrayBuffer.\n readOperation(this, blob, 'ArrayBuffer')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsBinaryString\n * @param {import('buffer').Blob} blob\n */\n readAsBinaryString (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString')\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsBinaryString(blob) method, when invoked,\n // must initiate a read operation for blob with BinaryString.\n readOperation(this, blob, 'BinaryString')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsDataText\n * @param {import('buffer').Blob} blob\n * @param {string?} encoding\n */\n readAsText (blob, encoding = undefined) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText')\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n if (encoding !== undefined) {\n encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding')\n }\n\n // The readAsText(blob, encoding) method, when invoked,\n // must initiate a read operation for blob with Text and encoding.\n readOperation(this, blob, 'Text', encoding)\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL\n * @param {import('buffer').Blob} blob\n */\n readAsDataURL (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL')\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsDataURL(blob) method, when invoked, must\n // initiate a read operation for blob with DataURL.\n readOperation(this, blob, 'DataURL')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-abort\n */\n abort () {\n // 1. If this's state is \"empty\" or if this's state is\n // \"done\" set this's result to null and terminate\n // this algorithm.\n if (this[kState] === 'empty' || this[kState] === 'done') {\n this[kResult] = null\n return\n }\n\n // 2. If this's state is \"loading\" set this's state to\n // \"done\" and set this's result to null.\n if (this[kState] === 'loading') {\n this[kState] = 'done'\n this[kResult] = null\n }\n\n // 3. If there are any tasks from this on the file reading\n // task source in an affiliated task queue, then remove\n // those tasks from that task queue.\n this[kAborted] = true\n\n // 4. Terminate the algorithm for the read method being processed.\n // TODO\n\n // 5. Fire a progress event called abort at this.\n fireAProgressEvent('abort', this)\n\n // 6. If this's state is not \"loading\", fire a progress\n // event called loadend at this.\n if (this[kState] !== 'loading') {\n fireAProgressEvent('loadend', this)\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate\n */\n get readyState () {\n webidl.brandCheck(this, FileReader)\n\n switch (this[kState]) {\n case 'empty': return this.EMPTY\n case 'loading': return this.LOADING\n case 'done': return this.DONE\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-result\n */\n get result () {\n webidl.brandCheck(this, FileReader)\n\n // The result attribute\u2019s getter, when invoked, must return\n // this's result.\n return this[kResult]\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-error\n */\n get error () {\n webidl.brandCheck(this, FileReader)\n\n // The error attribute\u2019s getter, when invoked, must return\n // this's error.\n return this[kError]\n }\n\n get onloadend () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadend\n }\n\n set onloadend (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadend) {\n this.removeEventListener('loadend', this[kEvents].loadend)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadend = fn\n this.addEventListener('loadend', fn)\n } else {\n this[kEvents].loadend = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].error) {\n this.removeEventListener('error', this[kEvents].error)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].error = fn\n this.addEventListener('error', fn)\n } else {\n this[kEvents].error = null\n }\n }\n\n get onloadstart () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadstart\n }\n\n set onloadstart (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadstart) {\n this.removeEventListener('loadstart', this[kEvents].loadstart)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadstart = fn\n this.addEventListener('loadstart', fn)\n } else {\n this[kEvents].loadstart = null\n }\n }\n\n get onprogress () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].progress\n }\n\n set onprogress (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].progress) {\n this.removeEventListener('progress', this[kEvents].progress)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].progress = fn\n this.addEventListener('progress', fn)\n } else {\n this[kEvents].progress = null\n }\n }\n\n get onload () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].load\n }\n\n set onload (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].load) {\n this.removeEventListener('load', this[kEvents].load)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].load = fn\n this.addEventListener('load', fn)\n } else {\n this[kEvents].load = null\n }\n }\n\n get onabort () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].abort\n }\n\n set onabort (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].abort) {\n this.removeEventListener('abort', this[kEvents].abort)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].abort = fn\n this.addEventListener('abort', fn)\n } else {\n this[kEvents].abort = null\n }\n }\n}\n\n// https://w3c.github.io/FileAPI/#dom-filereader-empty\nFileReader.EMPTY = FileReader.prototype.EMPTY = 0\n// https://w3c.github.io/FileAPI/#dom-filereader-loading\nFileReader.LOADING = FileReader.prototype.LOADING = 1\n// https://w3c.github.io/FileAPI/#dom-filereader-done\nFileReader.DONE = FileReader.prototype.DONE = 2\n\nObject.defineProperties(FileReader.prototype, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors,\n readAsArrayBuffer: kEnumerableProperty,\n readAsBinaryString: kEnumerableProperty,\n readAsText: kEnumerableProperty,\n readAsDataURL: kEnumerableProperty,\n abort: kEnumerableProperty,\n readyState: kEnumerableProperty,\n result: kEnumerableProperty,\n error: kEnumerableProperty,\n onloadstart: kEnumerableProperty,\n onprogress: kEnumerableProperty,\n onload: kEnumerableProperty,\n onabort: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onloadend: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'FileReader',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(FileReader, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors\n})\n\nmodule.exports = {\n FileReader\n}\n", "'use strict'\n\nmodule.exports = {\n kConstruct: require('../../core/symbols').kConstruct\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { isValidHeaderName } = require('../fetch/util')\n\n/**\n * @see https://url.spec.whatwg.org/#concept-url-equals\n * @param {URL} A\n * @param {URL} B\n * @param {boolean | undefined} excludeFragment\n * @returns {boolean}\n */\nfunction urlEquals (A, B, excludeFragment = false) {\n const serializedA = URLSerializer(A, excludeFragment)\n\n const serializedB = URLSerializer(B, excludeFragment)\n\n return serializedA === serializedB\n}\n\n/**\n * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262\n * @param {string} header\n */\nfunction getFieldValues (header) {\n assert(header !== null)\n\n const values = []\n\n for (let value of header.split(',')) {\n value = value.trim()\n\n if (isValidHeaderName(value)) {\n values.push(value)\n }\n }\n\n return values\n}\n\nmodule.exports = {\n urlEquals,\n getFieldValues\n}\n", "'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { urlEquals, getFieldValues } = require('./util')\nconst { kEnumerableProperty, isDisturbed } = require('../../core/util')\nconst { webidl } = require('../fetch/webidl')\nconst { Response, cloneResponse, fromInnerResponse } = require('../fetch/response')\nconst { Request, fromInnerRequest } = require('../fetch/request')\nconst { kState } = require('../fetch/symbols')\nconst { fetching } = require('../fetch/index')\nconst { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util')\nconst assert = require('node:assert')\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation\n * @typedef {Object} CacheBatchOperation\n * @property {'delete' | 'put'} type\n * @property {any} request\n * @property {any} response\n * @property {import('../../types/cache').CacheQueryOptions} options\n */\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list\n * @typedef {[any, any][]} requestResponseList\n */\n\nclass Cache {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list\n * @type {requestResponseList}\n */\n #relevantRequestResponseList\n\n constructor () {\n if (arguments[0] !== kConstruct) {\n webidl.illegalConstructor()\n }\n\n webidl.util.markAsUncloneable(this)\n this.#relevantRequestResponseList = arguments[1]\n }\n\n async match (request, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.match'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request, prefix, 'request')\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n const p = this.#internalMatchAll(request, options, 1)\n\n if (p.length === 0) {\n return\n }\n\n return p[0]\n }\n\n async matchAll (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.matchAll'\n if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request')\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n return this.#internalMatchAll(request, options)\n }\n\n async add (request) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.add'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request, prefix, 'request')\n\n // 1.\n const requests = [request]\n\n // 2.\n const responseArrayPromise = this.addAll(requests)\n\n // 3.\n return await responseArrayPromise\n }\n\n async addAll (requests) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.addAll'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n // 1.\n const responsePromises = []\n\n // 2.\n const requestList = []\n\n // 3.\n for (let request of requests) {\n if (request === undefined) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: 'Argument 1',\n types: ['undefined is not allowed']\n })\n }\n\n request = webidl.converters.RequestInfo(request)\n\n if (typeof request === 'string') {\n continue\n }\n\n // 3.1\n const r = request[kState]\n\n // 3.2\n if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected http/s scheme when method is not GET.'\n })\n }\n }\n\n // 4.\n /** @type {ReturnType[]} */\n const fetchControllers = []\n\n // 5.\n for (const request of requests) {\n // 5.1\n const r = new Request(request)[kState]\n\n // 5.2\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected http/s scheme.'\n })\n }\n\n // 5.4\n r.initiator = 'fetch'\n r.destination = 'subresource'\n\n // 5.5\n requestList.push(r)\n\n // 5.6\n const responsePromise = createDeferredPromise()\n\n // 5.7\n fetchControllers.push(fetching({\n request: r,\n processResponse (response) {\n // 1.\n if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Received an invalid status code or the request failed.'\n }))\n } else if (response.headersList.contains('vary')) { // 2.\n // 2.1\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n // 2.2\n for (const fieldValue of fieldValues) {\n // 2.2.1\n if (fieldValue === '*') {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'invalid vary field value'\n }))\n\n for (const controller of fetchControllers) {\n controller.abort()\n }\n\n return\n }\n }\n }\n },\n processResponseEndOfBody (response) {\n // 1.\n if (response.aborted) {\n responsePromise.reject(new DOMException('aborted', 'AbortError'))\n return\n }\n\n // 2.\n responsePromise.resolve(response)\n }\n }))\n\n // 5.8\n responsePromises.push(responsePromise.promise)\n }\n\n // 6.\n const p = Promise.all(responsePromises)\n\n // 7.\n const responses = await p\n\n // 7.1\n const operations = []\n\n // 7.2\n let index = 0\n\n // 7.3\n for (const response of responses) {\n // 7.3.1\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 7.3.2\n request: requestList[index], // 7.3.3\n response // 7.3.4\n }\n\n operations.push(operation) // 7.3.5\n\n index++ // 7.3.6\n }\n\n // 7.5\n const cacheJobPromise = createDeferredPromise()\n\n // 7.6.1\n let errorData = null\n\n // 7.6.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 7.6.3\n queueMicrotask(() => {\n // 7.6.3.1\n if (errorData === null) {\n cacheJobPromise.resolve(undefined)\n } else {\n // 7.6.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n // 7.7\n return cacheJobPromise.promise\n }\n\n async put (request, response) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.put'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n request = webidl.converters.RequestInfo(request, prefix, 'request')\n response = webidl.converters.Response(response, prefix, 'response')\n\n // 1.\n let innerRequest = null\n\n // 2.\n if (request instanceof Request) {\n innerRequest = request[kState]\n } else { // 3.\n innerRequest = new Request(request)[kState]\n }\n\n // 4.\n if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected an http/s scheme when method is not GET'\n })\n }\n\n // 5.\n const innerResponse = response[kState]\n\n // 6.\n if (innerResponse.status === 206) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Got 206 status'\n })\n }\n\n // 7.\n if (innerResponse.headersList.contains('vary')) {\n // 7.1.\n const fieldValues = getFieldValues(innerResponse.headersList.get('vary'))\n\n // 7.2.\n for (const fieldValue of fieldValues) {\n // 7.2.1\n if (fieldValue === '*') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Got * vary field value'\n })\n }\n }\n }\n\n // 8.\n if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Response body is locked or disturbed'\n })\n }\n\n // 9.\n const clonedResponse = cloneResponse(innerResponse)\n\n // 10.\n const bodyReadPromise = createDeferredPromise()\n\n // 11.\n if (innerResponse.body != null) {\n // 11.1\n const stream = innerResponse.body.stream\n\n // 11.2\n const reader = stream.getReader()\n\n // 11.3\n readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject)\n } else {\n bodyReadPromise.resolve(undefined)\n }\n\n // 12.\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n // 13.\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 14.\n request: innerRequest, // 15.\n response: clonedResponse // 16.\n }\n\n // 17.\n operations.push(operation)\n\n // 19.\n const bytes = await bodyReadPromise.promise\n\n if (clonedResponse.body != null) {\n clonedResponse.body.source = bytes\n }\n\n // 19.1\n const cacheJobPromise = createDeferredPromise()\n\n // 19.2.1\n let errorData = null\n\n // 19.2.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 19.2.3\n queueMicrotask(() => {\n // 19.2.3.1\n if (errorData === null) {\n cacheJobPromise.resolve()\n } else { // 19.2.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n async delete (request, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request, prefix, 'request')\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n /**\n * @type {Request}\n */\n let r = null\n\n if (request instanceof Request) {\n r = request[kState]\n\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return false\n }\n } else {\n assert(typeof request === 'string')\n\n r = new Request(request)[kState]\n }\n\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'delete',\n request: r,\n options\n }\n\n operations.push(operation)\n\n const cacheJobPromise = createDeferredPromise()\n\n let errorData = null\n let requestResponses\n\n try {\n requestResponses = this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n queueMicrotask(() => {\n if (errorData === null) {\n cacheJobPromise.resolve(!!requestResponses?.length)\n } else {\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys\n * @param {any} request\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @returns {Promise}\n */\n async keys (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.keys'\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request')\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n // 2.1\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') { // 2.2\n r = new Request(request)[kState]\n }\n }\n\n // 4.\n const promise = createDeferredPromise()\n\n // 5.\n // 5.1\n const requests = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n // 5.2.1.1\n requests.push(requestResponse[0])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n // 5.3.2.1\n requests.push(requestResponse[0])\n }\n }\n\n // 5.4\n queueMicrotask(() => {\n // 5.4.1\n const requestList = []\n\n // 5.4.2\n for (const request of requests) {\n const requestObject = fromInnerRequest(\n request,\n new AbortController().signal,\n 'immutable'\n )\n // 5.4.2.1\n requestList.push(requestObject)\n }\n\n // 5.4.3\n promise.resolve(Object.freeze(requestList))\n })\n\n return promise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm\n * @param {CacheBatchOperation[]} operations\n * @returns {requestResponseList}\n */\n #batchCacheOperations (operations) {\n // 1.\n const cache = this.#relevantRequestResponseList\n\n // 2.\n const backupCache = [...cache]\n\n // 3.\n const addedItems = []\n\n // 4.1\n const resultList = []\n\n try {\n // 4.2\n for (const operation of operations) {\n // 4.2.1\n if (operation.type !== 'delete' && operation.type !== 'put') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'operation type does not match \"delete\" or \"put\"'\n })\n }\n\n // 4.2.2\n if (operation.type === 'delete' && operation.response != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'delete operation should not have an associated response'\n })\n }\n\n // 4.2.3\n if (this.#queryCache(operation.request, operation.options, addedItems).length) {\n throw new DOMException('???', 'InvalidStateError')\n }\n\n // 4.2.4\n let requestResponses\n\n // 4.2.5\n if (operation.type === 'delete') {\n // 4.2.5.1\n requestResponses = this.#queryCache(operation.request, operation.options)\n\n // TODO: the spec is wrong, this is needed to pass WPTs\n if (requestResponses.length === 0) {\n return []\n }\n\n // 4.2.5.2\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.5.2.1\n cache.splice(idx, 1)\n }\n } else if (operation.type === 'put') { // 4.2.6\n // 4.2.6.1\n if (operation.response == null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'put operation should have an associated response'\n })\n }\n\n // 4.2.6.2\n const r = operation.request\n\n // 4.2.6.3\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'expected http or https scheme'\n })\n }\n\n // 4.2.6.4\n if (r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'not get method'\n })\n }\n\n // 4.2.6.5\n if (operation.options != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'options must not be defined'\n })\n }\n\n // 4.2.6.6\n requestResponses = this.#queryCache(operation.request)\n\n // 4.2.6.7\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.6.7.1\n cache.splice(idx, 1)\n }\n\n // 4.2.6.8\n cache.push([operation.request, operation.response])\n\n // 4.2.6.10\n addedItems.push([operation.request, operation.response])\n }\n\n // 4.2.7\n resultList.push([operation.request, operation.response])\n }\n\n // 4.3\n return resultList\n } catch (e) { // 5.\n // 5.1\n this.#relevantRequestResponseList.length = 0\n\n // 5.2\n this.#relevantRequestResponseList = backupCache\n\n // 5.3\n throw e\n }\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#query-cache\n * @param {any} requestQuery\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @param {requestResponseList} targetStorage\n * @returns {requestResponseList}\n */\n #queryCache (requestQuery, options, targetStorage) {\n /** @type {requestResponseList} */\n const resultList = []\n\n const storage = targetStorage ?? this.#relevantRequestResponseList\n\n for (const requestResponse of storage) {\n const [cachedRequest, cachedResponse] = requestResponse\n if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) {\n resultList.push(requestResponse)\n }\n }\n\n return resultList\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm\n * @param {any} requestQuery\n * @param {any} request\n * @param {any | null} response\n * @param {import('../../types/cache').CacheQueryOptions | undefined} options\n * @returns {boolean}\n */\n #requestMatchesCachedItem (requestQuery, request, response = null, options) {\n // if (options?.ignoreMethod === false && request.method === 'GET') {\n // return false\n // }\n\n const queryURL = new URL(requestQuery.url)\n\n const cachedURL = new URL(request.url)\n\n if (options?.ignoreSearch) {\n cachedURL.search = ''\n\n queryURL.search = ''\n }\n\n if (!urlEquals(queryURL, cachedURL, true)) {\n return false\n }\n\n if (\n response == null ||\n options?.ignoreVary ||\n !response.headersList.contains('vary')\n ) {\n return true\n }\n\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n for (const fieldValue of fieldValues) {\n if (fieldValue === '*') {\n return false\n }\n\n const requestValue = request.headersList.get(fieldValue)\n const queryValue = requestQuery.headersList.get(fieldValue)\n\n // If one has the header and the other doesn't, or one has\n // a different value than the other, return false\n if (requestValue !== queryValue) {\n return false\n }\n }\n\n return true\n }\n\n #internalMatchAll (request, options, maxResponses = Infinity) {\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') {\n // 2.2.1\n r = new Request(request)[kState]\n }\n }\n\n // 5.\n // 5.1\n const responses = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n responses.push(requestResponse[1])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n responses.push(requestResponse[1])\n }\n }\n\n // 5.4\n // We don't implement CORs so we don't need to loop over the responses, yay!\n\n // 5.5.1\n const responseList = []\n\n // 5.5.2\n for (const response of responses) {\n // 5.5.2.1\n const responseObject = fromInnerResponse(response, 'immutable')\n\n responseList.push(responseObject.clone())\n\n if (responseList.length >= maxResponses) {\n break\n }\n }\n\n // 6.\n return Object.freeze(responseList)\n }\n}\n\nObject.defineProperties(Cache.prototype, {\n [Symbol.toStringTag]: {\n value: 'Cache',\n configurable: true\n },\n match: kEnumerableProperty,\n matchAll: kEnumerableProperty,\n add: kEnumerableProperty,\n addAll: kEnumerableProperty,\n put: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nconst cacheQueryOptionConverters = [\n {\n key: 'ignoreSearch',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'ignoreMethod',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'ignoreVary',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n }\n]\n\nwebidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters)\n\nwebidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([\n ...cacheQueryOptionConverters,\n {\n key: 'cacheName',\n converter: webidl.converters.DOMString\n }\n])\n\nwebidl.converters.Response = webidl.interfaceConverter(Response)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.RequestInfo\n)\n\nmodule.exports = {\n Cache\n}\n", "'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { Cache } = require('./cache')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../../core/util')\n\nclass CacheStorage {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map\n * @type {Map}\n */\n async has (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.has'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n // 2.1.1\n // 2.2\n return this.#caches.has(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open\n * @param {string} cacheName\n * @returns {Promise}\n */\n async open (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.open'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n // 2.1\n if (this.#caches.has(cacheName)) {\n // await caches.open('v1') !== await caches.open('v1')\n\n // 2.1.1\n const cache = this.#caches.get(cacheName)\n\n // 2.1.1.1\n return new Cache(kConstruct, cache)\n }\n\n // 2.2\n const cache = []\n\n // 2.3\n this.#caches.set(cacheName, cache)\n\n // 2.4\n return new Cache(kConstruct, cache)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete\n * @param {string} cacheName\n * @returns {Promise}\n */\n async delete (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n return this.#caches.delete(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys\n * @returns {Promise}\n */\n async keys () {\n webidl.brandCheck(this, CacheStorage)\n\n // 2.1\n const keys = this.#caches.keys()\n\n // 2.2\n return [...keys]\n }\n}\n\nObject.defineProperties(CacheStorage.prototype, {\n [Symbol.toStringTag]: {\n value: 'CacheStorage',\n configurable: true\n },\n match: kEnumerableProperty,\n has: kEnumerableProperty,\n open: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nmodule.exports = {\n CacheStorage\n}\n", "'use strict'\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size\nconst maxAttributeValueSize = 1024\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size\nconst maxNameValuePairSize = 4096\n\nmodule.exports = {\n maxAttributeValueSize,\n maxNameValuePairSize\n}\n", "'use strict'\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction isCTLExcludingHtab (value) {\n for (let i = 0; i < value.length; ++i) {\n const code = value.charCodeAt(i)\n\n if (\n (code >= 0x00 && code <= 0x08) ||\n (code >= 0x0A && code <= 0x1F) ||\n code === 0x7F\n ) {\n return true\n }\n }\n return false\n}\n\n/**\n CHAR = \n token = 1*\n separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n | \",\" | \";\" | \":\" | \"\\\" | <\">\n | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n | \"{\" | \"}\" | SP | HT\n * @param {string} name\n */\nfunction validateCookieName (name) {\n for (let i = 0; i < name.length; ++i) {\n const code = name.charCodeAt(i)\n\n if (\n code < 0x21 || // exclude CTLs (0-31), SP and HT\n code > 0x7E || // exclude non-ascii and DEL\n code === 0x22 || // \"\n code === 0x28 || // (\n code === 0x29 || // )\n code === 0x3C || // <\n code === 0x3E || // >\n code === 0x40 || // @\n code === 0x2C || // ,\n code === 0x3B || // ;\n code === 0x3A || // :\n code === 0x5C || // \\\n code === 0x2F || // /\n code === 0x5B || // [\n code === 0x5D || // ]\n code === 0x3F || // ?\n code === 0x3D || // =\n code === 0x7B || // {\n code === 0x7D // }\n ) {\n throw new Error('Invalid cookie name')\n }\n }\n}\n\n/**\n cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n ; US-ASCII characters excluding CTLs,\n ; whitespace DQUOTE, comma, semicolon,\n ; and backslash\n * @param {string} value\n */\nfunction validateCookieValue (value) {\n let len = value.length\n let i = 0\n\n // if the value is wrapped in DQUOTE\n if (value[0] === '\"') {\n if (len === 1 || value[len - 1] !== '\"') {\n throw new Error('Invalid cookie value')\n }\n --len\n ++i\n }\n\n while (i < len) {\n const code = value.charCodeAt(i++)\n\n if (\n code < 0x21 || // exclude CTLs (0-31)\n code > 0x7E || // non-ascii and DEL (127)\n code === 0x22 || // \"\n code === 0x2C || // ,\n code === 0x3B || // ;\n code === 0x5C // \\\n ) {\n throw new Error('Invalid cookie value')\n }\n }\n}\n\n/**\n * path-value = \n * @param {string} path\n */\nfunction validateCookiePath (path) {\n for (let i = 0; i < path.length; ++i) {\n const code = path.charCodeAt(i)\n\n if (\n code < 0x20 || // exclude CTLs (0-31)\n code === 0x7F || // DEL\n code === 0x3B // ;\n ) {\n throw new Error('Invalid cookie path')\n }\n }\n}\n\n/**\n * I have no idea why these values aren't allowed to be honest,\n * but Deno tests these. - Khafra\n * @param {string} domain\n */\nfunction validateCookieDomain (domain) {\n if (\n domain.startsWith('-') ||\n domain.endsWith('.') ||\n domain.endsWith('-')\n ) {\n throw new Error('Invalid cookie domain')\n }\n}\n\nconst IMFDays = [\n 'Sun', 'Mon', 'Tue', 'Wed',\n 'Thu', 'Fri', 'Sat'\n]\n\nconst IMFMonths = [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n]\n\nconst IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0'))\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1\n * @param {number|Date} date\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322]\n\n day-name = %x4D.6F.6E ; \"Mon\", case-sensitive\n / %x54.75.65 ; \"Tue\", case-sensitive\n / %x57.65.64 ; \"Wed\", case-sensitive\n / %x54.68.75 ; \"Thu\", case-sensitive\n / %x46.72.69 ; \"Fri\", case-sensitive\n / %x53.61.74 ; \"Sat\", case-sensitive\n / %x53.75.6E ; \"Sun\", case-sensitive\n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT\n month = %x4A.61.6E ; \"Jan\", case-sensitive\n / %x46.65.62 ; \"Feb\", case-sensitive\n / %x4D.61.72 ; \"Mar\", case-sensitive\n / %x41.70.72 ; \"Apr\", case-sensitive\n / %x4D.61.79 ; \"May\", case-sensitive\n / %x4A.75.6E ; \"Jun\", case-sensitive\n / %x4A.75.6C ; \"Jul\", case-sensitive\n / %x41.75.67 ; \"Aug\", case-sensitive\n / %x53.65.70 ; \"Sep\", case-sensitive\n / %x4F.63.74 ; \"Oct\", case-sensitive\n / %x4E.6F.76 ; \"Nov\", case-sensitive\n / %x44.65.63 ; \"Dec\", case-sensitive\n year = 4DIGIT\n\n GMT = %x47.4D.54 ; \"GMT\", case-sensitive\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n\n hour = 2DIGIT\n minute = 2DIGIT\n second = 2DIGIT\n */\nfunction toIMFDate (date) {\n if (typeof date === 'number') {\n date = new Date(date)\n }\n\n return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`\n}\n\n/**\n max-age-av = \"Max-Age=\" non-zero-digit *DIGIT\n ; In practice, both expires-av and max-age-av\n ; are limited to dates representable by the\n ; user agent.\n * @param {number} maxAge\n */\nfunction validateCookieMaxAge (maxAge) {\n if (maxAge < 0) {\n throw new Error('Invalid cookie max-age')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1\n * @param {import('./index').Cookie} cookie\n */\nfunction stringify (cookie) {\n if (cookie.name.length === 0) {\n return null\n }\n\n validateCookieName(cookie.name)\n validateCookieValue(cookie.value)\n\n const out = [`${cookie.name}=${cookie.value}`]\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2\n if (cookie.name.startsWith('__Secure-')) {\n cookie.secure = true\n }\n\n if (cookie.name.startsWith('__Host-')) {\n cookie.secure = true\n cookie.domain = null\n cookie.path = '/'\n }\n\n if (cookie.secure) {\n out.push('Secure')\n }\n\n if (cookie.httpOnly) {\n out.push('HttpOnly')\n }\n\n if (typeof cookie.maxAge === 'number') {\n validateCookieMaxAge(cookie.maxAge)\n out.push(`Max-Age=${cookie.maxAge}`)\n }\n\n if (cookie.domain) {\n validateCookieDomain(cookie.domain)\n out.push(`Domain=${cookie.domain}`)\n }\n\n if (cookie.path) {\n validateCookiePath(cookie.path)\n out.push(`Path=${cookie.path}`)\n }\n\n if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') {\n out.push(`Expires=${toIMFDate(cookie.expires)}`)\n }\n\n if (cookie.sameSite) {\n out.push(`SameSite=${cookie.sameSite}`)\n }\n\n for (const part of cookie.unparsed) {\n if (!part.includes('=')) {\n throw new Error('Invalid unparsed')\n }\n\n const [key, ...value] = part.split('=')\n\n out.push(`${key.trim()}=${value.join('=')}`)\n }\n\n return out.join('; ')\n}\n\nmodule.exports = {\n isCTLExcludingHtab,\n validateCookieName,\n validateCookiePath,\n validateCookieValue,\n toIMFDate,\n stringify\n}\n", "'use strict'\n\nconst { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')\nconst { isCTLExcludingHtab } = require('./util')\nconst { collectASequenceOfCodePointsFast } = require('../fetch/data-url')\nconst assert = require('node:assert')\n\n/**\n * @description Parses the field-value attributes of a set-cookie header string.\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} header\n * @returns if the header is invalid, null will be returned\n */\nfunction parseSetCookie (header) {\n // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F\n // character (CTL characters excluding HTAB): Abort these steps and\n // ignore the set-cookie-string entirely.\n if (isCTLExcludingHtab(header)) {\n return null\n }\n\n let nameValuePair = ''\n let unparsedAttributes = ''\n let name = ''\n let value = ''\n\n // 2. If the set-cookie-string contains a %x3B (\";\") character:\n if (header.includes(';')) {\n // 1. The name-value-pair string consists of the characters up to,\n // but not including, the first %x3B (\";\"), and the unparsed-\n // attributes consist of the remainder of the set-cookie-string\n // (including the %x3B (\";\") in question).\n const position = { position: 0 }\n\n nameValuePair = collectASequenceOfCodePointsFast(';', header, position)\n unparsedAttributes = header.slice(position.position)\n } else {\n // Otherwise:\n\n // 1. The name-value-pair string consists of all the characters\n // contained in the set-cookie-string, and the unparsed-\n // attributes is the empty string.\n nameValuePair = header\n }\n\n // 3. If the name-value-pair string lacks a %x3D (\"=\") character, then\n // the name string is empty, and the value string is the value of\n // name-value-pair.\n if (!nameValuePair.includes('=')) {\n value = nameValuePair\n } else {\n // Otherwise, the name string consists of the characters up to, but\n // not including, the first %x3D (\"=\") character, and the (possibly\n // empty) value string consists of the characters after the first\n // %x3D (\"=\") character.\n const position = { position: 0 }\n name = collectASequenceOfCodePointsFast(\n '=',\n nameValuePair,\n position\n )\n value = nameValuePair.slice(position.position + 1)\n }\n\n // 4. Remove any leading or trailing WSP characters from the name\n // string and the value string.\n name = name.trim()\n value = value.trim()\n\n // 5. If the sum of the lengths of the name string and the value string\n // is more than 4096 octets, abort these steps and ignore the set-\n // cookie-string entirely.\n if (name.length + value.length > maxNameValuePairSize) {\n return null\n }\n\n // 6. The cookie-name is the name string, and the cookie-value is the\n // value string.\n return {\n name, value, ...parseUnparsedAttributes(unparsedAttributes)\n }\n}\n\n/**\n * Parses the remaining attributes of a set-cookie header\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} unparsedAttributes\n * @param {[Object.]={}} cookieAttributeList\n */\nfunction parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) {\n // 1. If the unparsed-attributes string is empty, skip the rest of\n // these steps.\n if (unparsedAttributes.length === 0) {\n return cookieAttributeList\n }\n\n // 2. Discard the first character of the unparsed-attributes (which\n // will be a %x3B (\";\") character).\n assert(unparsedAttributes[0] === ';')\n unparsedAttributes = unparsedAttributes.slice(1)\n\n let cookieAv = ''\n\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n if (unparsedAttributes.includes(';')) {\n // 1. Consume the characters of the unparsed-attributes up to, but\n // not including, the first %x3B (\";\") character.\n cookieAv = collectASequenceOfCodePointsFast(\n ';',\n unparsedAttributes,\n { position: 0 }\n )\n unparsedAttributes = unparsedAttributes.slice(cookieAv.length)\n } else {\n // Otherwise:\n\n // 1. Consume the remainder of the unparsed-attributes.\n cookieAv = unparsedAttributes\n unparsedAttributes = ''\n }\n\n // Let the cookie-av string be the characters consumed in this step.\n\n let attributeName = ''\n let attributeValue = ''\n\n // 4. If the cookie-av string contains a %x3D (\"=\") character:\n if (cookieAv.includes('=')) {\n // 1. The (possibly empty) attribute-name string consists of the\n // characters up to, but not including, the first %x3D (\"=\")\n // character, and the (possibly empty) attribute-value string\n // consists of the characters after the first %x3D (\"=\")\n // character.\n const position = { position: 0 }\n\n attributeName = collectASequenceOfCodePointsFast(\n '=',\n cookieAv,\n position\n )\n attributeValue = cookieAv.slice(position.position + 1)\n } else {\n // Otherwise:\n\n // 1. The attribute-name string consists of the entire cookie-av\n // string, and the attribute-value string is empty.\n attributeName = cookieAv\n }\n\n // 5. Remove any leading or trailing WSP characters from the attribute-\n // name string and the attribute-value string.\n attributeName = attributeName.trim()\n attributeValue = attributeValue.trim()\n\n // 6. If the attribute-value is longer than 1024 octets, ignore the\n // cookie-av string and return to Step 1 of this algorithm.\n if (attributeValue.length > maxAttributeValueSize) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 7. Process the attribute-name and attribute-value according to the\n // requirements in the following subsections. (Notice that\n // attributes with unrecognized attribute-names are ignored.)\n const attributeNameLowercase = attributeName.toLowerCase()\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1\n // If the attribute-name case-insensitively matches the string\n // \"Expires\", the user agent MUST process the cookie-av as follows.\n if (attributeNameLowercase === 'expires') {\n // 1. Let the expiry-time be the result of parsing the attribute-value\n // as cookie-date (see Section 5.1.1).\n const expiryTime = new Date(attributeValue)\n\n // 2. If the attribute-value failed to parse as a cookie date, ignore\n // the cookie-av.\n\n cookieAttributeList.expires = expiryTime\n } else if (attributeNameLowercase === 'max-age') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2\n // If the attribute-name case-insensitively matches the string \"Max-\n // Age\", the user agent MUST process the cookie-av as follows.\n\n // 1. If the first character of the attribute-value is not a DIGIT or a\n // \"-\" character, ignore the cookie-av.\n const charCode = attributeValue.charCodeAt(0)\n\n if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 2. If the remainder of attribute-value contains a non-DIGIT\n // character, ignore the cookie-av.\n if (!/^\\d+$/.test(attributeValue)) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 3. Let delta-seconds be the attribute-value converted to an integer.\n const deltaSeconds = Number(attributeValue)\n\n // 4. Let cookie-age-limit be the maximum age of the cookie (which\n // SHOULD be 400 days or less, see Section 4.1.2.2).\n\n // 5. Set delta-seconds to the smaller of its present value and cookie-\n // age-limit.\n // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs)\n\n // 6. If delta-seconds is less than or equal to zero (0), let expiry-\n // time be the earliest representable date and time. Otherwise, let\n // the expiry-time be the current date and time plus delta-seconds\n // seconds.\n // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds\n\n // 7. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Max-Age and an attribute-value of expiry-time.\n cookieAttributeList.maxAge = deltaSeconds\n } else if (attributeNameLowercase === 'domain') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3\n // If the attribute-name case-insensitively matches the string \"Domain\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. Let cookie-domain be the attribute-value.\n let cookieDomain = attributeValue\n\n // 2. If cookie-domain starts with %x2E (\".\"), let cookie-domain be\n // cookie-domain without its leading %x2E (\".\").\n if (cookieDomain[0] === '.') {\n cookieDomain = cookieDomain.slice(1)\n }\n\n // 3. Convert the cookie-domain to lower case.\n cookieDomain = cookieDomain.toLowerCase()\n\n // 4. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Domain and an attribute-value of cookie-domain.\n cookieAttributeList.domain = cookieDomain\n } else if (attributeNameLowercase === 'path') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4\n // If the attribute-name case-insensitively matches the string \"Path\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. If the attribute-value is empty or if the first character of the\n // attribute-value is not %x2F (\"/\"):\n let cookiePath = ''\n if (attributeValue.length === 0 || attributeValue[0] !== '/') {\n // 1. Let cookie-path be the default-path.\n cookiePath = '/'\n } else {\n // Otherwise:\n\n // 1. Let cookie-path be the attribute-value.\n cookiePath = attributeValue\n }\n\n // 2. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Path and an attribute-value of cookie-path.\n cookieAttributeList.path = cookiePath\n } else if (attributeNameLowercase === 'secure') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5\n // If the attribute-name case-insensitively matches the string \"Secure\",\n // the user agent MUST append an attribute to the cookie-attribute-list\n // with an attribute-name of Secure and an empty attribute-value.\n\n cookieAttributeList.secure = true\n } else if (attributeNameLowercase === 'httponly') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6\n // If the attribute-name case-insensitively matches the string\n // \"HttpOnly\", the user agent MUST append an attribute to the cookie-\n // attribute-list with an attribute-name of HttpOnly and an empty\n // attribute-value.\n\n cookieAttributeList.httpOnly = true\n } else if (attributeNameLowercase === 'samesite') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7\n // If the attribute-name case-insensitively matches the string\n // \"SameSite\", the user agent MUST process the cookie-av as follows:\n\n const attributeValueLowercase = attributeValue.toLowerCase()\n\n // 1. If cookie-av's attribute-value is a case-insensitive match for\n // \"None\", append an attribute to the cookie-attribute-list with an\n // attribute-name of \"SameSite\" and an attribute-value of \"None\".\n if (attributeValueLowercase === 'none') {\n cookieAttributeList.sameSite = 'None'\n } else if (attributeValueLowercase === 'strict') {\n // 2. If cookie-av's attribute-value is a case-insensitive match for\n // \"Strict\", append an attribute to the cookie-attribute-list with\n // an attribute-name of \"SameSite\" and an attribute-value of\n // \"Strict\".\n cookieAttributeList.sameSite = 'Strict'\n } else if (attributeValueLowercase === 'lax') {\n // 3. If cookie-av's attribute-value is a case-insensitive match for\n // \"Lax\", append an attribute to the cookie-attribute-list with an\n // attribute-name of \"SameSite\" and an attribute-value of \"Lax\".\n cookieAttributeList.sameSite = 'Lax'\n }\n } else {\n cookieAttributeList.unparsed ??= []\n\n cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`)\n }\n\n // 8. Return to Step 1 of this algorithm.\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n}\n\nmodule.exports = {\n parseSetCookie,\n parseUnparsedAttributes\n}\n", "'use strict'\n\nconst { parseSetCookie } = require('./parse')\nconst { stringify } = require('./util')\nconst { webidl } = require('../fetch/webidl')\nconst { Headers } = require('../fetch/headers')\n\n/**\n * @typedef {Object} Cookie\n * @property {string} name\n * @property {string} value\n * @property {Date|number|undefined} expires\n * @property {number|undefined} maxAge\n * @property {string|undefined} domain\n * @property {string|undefined} path\n * @property {boolean|undefined} secure\n * @property {boolean|undefined} httpOnly\n * @property {'Strict'|'Lax'|'None'} sameSite\n * @property {string[]} unparsed\n */\n\n/**\n * @param {Headers} headers\n * @returns {Record}\n */\nfunction getCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, 'getCookies')\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookie = headers.get('cookie')\n const out = {}\n\n if (!cookie) {\n return out\n }\n\n for (const piece of cookie.split(';')) {\n const [name, ...value] = piece.split('=')\n\n out[name.trim()] = value.join('=')\n }\n\n return out\n}\n\n/**\n * @param {Headers} headers\n * @param {string} name\n * @param {{ path?: string, domain?: string }|undefined} attributes\n * @returns {void}\n */\nfunction deleteCookie (headers, name, attributes) {\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const prefix = 'deleteCookie'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n name = webidl.converters.DOMString(name, prefix, 'name')\n attributes = webidl.converters.DeleteCookieAttributes(attributes)\n\n // Matches behavior of\n // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278\n setCookie(headers, {\n name,\n value: '',\n expires: new Date(0),\n ...attributes\n })\n}\n\n/**\n * @param {Headers} headers\n * @returns {Cookie[]}\n */\nfunction getSetCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, 'getSetCookies')\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookies = headers.getSetCookie()\n\n if (!cookies) {\n return []\n }\n\n return cookies.map((pair) => parseSetCookie(pair))\n}\n\n/**\n * @param {Headers} headers\n * @param {Cookie} cookie\n * @returns {void}\n */\nfunction setCookie (headers, cookie) {\n webidl.argumentLengthCheck(arguments, 2, 'setCookie')\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n cookie = webidl.converters.Cookie(cookie)\n\n const str = stringify(cookie)\n\n if (str) {\n headers.append('Set-Cookie', str)\n }\n}\n\nwebidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: () => null\n }\n])\n\nwebidl.converters.Cookie = webidl.dictionaryConverter([\n {\n converter: webidl.converters.DOMString,\n key: 'name'\n },\n {\n converter: webidl.converters.DOMString,\n key: 'value'\n },\n {\n converter: webidl.nullableConverter((value) => {\n if (typeof value === 'number') {\n return webidl.converters['unsigned long long'](value)\n }\n\n return new Date(value)\n }),\n key: 'expires',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters['long long']),\n key: 'maxAge',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'secure',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'httpOnly',\n defaultValue: () => null\n },\n {\n converter: webidl.converters.USVString,\n key: 'sameSite',\n allowedValues: ['Strict', 'Lax', 'None']\n },\n {\n converter: webidl.sequenceConverter(webidl.converters.DOMString),\n key: 'unparsed',\n defaultValue: () => new Array(0)\n }\n])\n\nmodule.exports = {\n getCookies,\n deleteCookie,\n getSetCookies,\n setCookie\n}\n", "'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { kConstruct } = require('../../core/symbols')\nconst { MessagePort } = require('node:worker_threads')\n\n/**\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent\n */\nclass MessageEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n if (type === kConstruct) {\n super(arguments[1], arguments[2])\n webidl.util.markAsUncloneable(this)\n return\n }\n\n const prefix = 'MessageEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict')\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n webidl.util.markAsUncloneable(this)\n }\n\n get data () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.data\n }\n\n get origin () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.origin\n }\n\n get lastEventId () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.lastEventId\n }\n\n get source () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.source\n }\n\n get ports () {\n webidl.brandCheck(this, MessageEvent)\n\n if (!Object.isFrozen(this.#eventInit.ports)) {\n Object.freeze(this.#eventInit.ports)\n }\n\n return this.#eventInit.ports\n }\n\n initMessageEvent (\n type,\n bubbles = false,\n cancelable = false,\n data = null,\n origin = '',\n lastEventId = '',\n source = null,\n ports = []\n ) {\n webidl.brandCheck(this, MessageEvent)\n\n webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent')\n\n return new MessageEvent(type, {\n bubbles, cancelable, data, origin, lastEventId, source, ports\n })\n }\n\n static createFastMessageEvent (type, init) {\n const messageEvent = new MessageEvent(kConstruct, type, init)\n messageEvent.#eventInit = init\n messageEvent.#eventInit.data ??= null\n messageEvent.#eventInit.origin ??= ''\n messageEvent.#eventInit.lastEventId ??= ''\n messageEvent.#eventInit.source ??= null\n messageEvent.#eventInit.ports ??= []\n return messageEvent\n }\n}\n\nconst { createFastMessageEvent } = MessageEvent\ndelete MessageEvent.createFastMessageEvent\n\n/**\n * @see https://websockets.spec.whatwg.org/#the-closeevent-interface\n */\nclass CloseEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n const prefix = 'CloseEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.CloseEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n webidl.util.markAsUncloneable(this)\n }\n\n get wasClean () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.wasClean\n }\n\n get code () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.code\n }\n\n get reason () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.reason\n }\n}\n\n// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface\nclass ErrorEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict) {\n const prefix = 'ErrorEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n super(type, eventInitDict)\n webidl.util.markAsUncloneable(this)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})\n\n this.#eventInit = eventInitDict\n }\n\n get message () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.message\n }\n\n get filename () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.filename\n }\n\n get lineno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.lineno\n }\n\n get colno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.colno\n }\n\n get error () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.error\n }\n}\n\nObject.defineProperties(MessageEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'MessageEvent',\n configurable: true\n },\n data: kEnumerableProperty,\n origin: kEnumerableProperty,\n lastEventId: kEnumerableProperty,\n source: kEnumerableProperty,\n ports: kEnumerableProperty,\n initMessageEvent: kEnumerableProperty\n})\n\nObject.defineProperties(CloseEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'CloseEvent',\n configurable: true\n },\n reason: kEnumerableProperty,\n code: kEnumerableProperty,\n wasClean: kEnumerableProperty\n})\n\nObject.defineProperties(ErrorEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'ErrorEvent',\n configurable: true\n },\n message: kEnumerableProperty,\n filename: kEnumerableProperty,\n lineno: kEnumerableProperty,\n colno: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\nwebidl.converters.MessagePort = webidl.interfaceConverter(MessagePort)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.MessagePort\n)\n\nconst eventInit = [\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n }\n]\n\nwebidl.converters.MessageEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'data',\n converter: webidl.converters.any,\n defaultValue: () => null\n },\n {\n key: 'origin',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n },\n {\n key: 'lastEventId',\n converter: webidl.converters.DOMString,\n defaultValue: () => ''\n },\n {\n key: 'source',\n // Node doesn't implement WindowProxy or ServiceWorker, so the only\n // valid value for source is a MessagePort.\n converter: webidl.nullableConverter(webidl.converters.MessagePort),\n defaultValue: () => null\n },\n {\n key: 'ports',\n converter: webidl.converters['sequence'],\n defaultValue: () => new Array(0)\n }\n])\n\nwebidl.converters.CloseEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'wasClean',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'code',\n converter: webidl.converters['unsigned short'],\n defaultValue: () => 0\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n }\n])\n\nwebidl.converters.ErrorEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'message',\n converter: webidl.converters.DOMString,\n defaultValue: () => ''\n },\n {\n key: 'filename',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n },\n {\n key: 'lineno',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => 0\n },\n {\n key: 'colno',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => 0\n },\n {\n key: 'error',\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = {\n MessageEvent,\n CloseEvent,\n ErrorEvent,\n createFastMessageEvent\n}\n", "'use strict'\n\n// This is a Globally Unique Identifier unique used\n// to validate that the endpoint accepts websocket\n// connections.\n// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3\nconst uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\nconst states = {\n CONNECTING: 0,\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3\n}\n\nconst sentCloseFrameState = {\n NOT_SENT: 0,\n PROCESSING: 1,\n SENT: 2\n}\n\nconst opcodes = {\n CONTINUATION: 0x0,\n TEXT: 0x1,\n BINARY: 0x2,\n CLOSE: 0x8,\n PING: 0x9,\n PONG: 0xA\n}\n\nconst maxUnsigned16Bit = 2 ** 16 - 1 // 65535\n\nconst parserStates = {\n INFO: 0,\n PAYLOADLENGTH_16: 2,\n PAYLOADLENGTH_64: 3,\n READ_DATA: 4\n}\n\nconst emptyBuffer = Buffer.allocUnsafe(0)\n\nconst sendHints = {\n string: 1,\n typedArray: 2,\n arrayBuffer: 3,\n blob: 4\n}\n\nmodule.exports = {\n uid,\n sentCloseFrameState,\n staticPropertyDescriptors,\n states,\n opcodes,\n maxUnsigned16Bit,\n parserStates,\n emptyBuffer,\n sendHints\n}\n", "'use strict'\n\nmodule.exports = {\n kWebSocketURL: Symbol('url'),\n kReadyState: Symbol('ready state'),\n kController: Symbol('controller'),\n kResponse: Symbol('response'),\n kBinaryType: Symbol('binary type'),\n kSentClose: Symbol('sent close'),\n kReceivedClose: Symbol('received close'),\n kByteParser: Symbol('byte parser')\n}\n", "'use strict'\n\nconst { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols')\nconst { states, opcodes } = require('./constants')\nconst { ErrorEvent, createFastMessageEvent } = require('./events')\nconst { isUtf8 } = require('node:buffer')\nconst { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require('../fetch/data-url')\n\n/* globals Blob */\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @returns {boolean}\n */\nfunction isConnecting (ws) {\n // If the WebSocket connection is not yet established, and the connection\n // is not yet closed, then the WebSocket connection is in the CONNECTING state.\n return ws[kReadyState] === states.CONNECTING\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @returns {boolean}\n */\nfunction isEstablished (ws) {\n // If the server's response is validated as provided for above, it is\n // said that _The WebSocket Connection is Established_ and that the\n // WebSocket Connection is in the OPEN state.\n return ws[kReadyState] === states.OPEN\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @returns {boolean}\n */\nfunction isClosing (ws) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n return ws[kReadyState] === states.CLOSING\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @returns {boolean}\n */\nfunction isClosed (ws) {\n return ws[kReadyState] === states.CLOSED\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e\n * @param {EventTarget} target\n * @param {(...args: ConstructorParameters) => Event} eventFactory\n * @param {EventInit | undefined} eventInitDict\n */\nfunction fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) {\n // 1. If eventConstructor is not given, then let eventConstructor be Event.\n\n // 2. Let event be the result of creating an event given eventConstructor,\n // in the relevant realm of target.\n // 3. Initialize event\u2019s type attribute to e.\n const event = eventFactory(e, eventInitDict)\n\n // 4. Initialize any other IDL attributes of event as described in the\n // invocation of this algorithm.\n\n // 5. Return the result of dispatching event at target, with legacy target\n // override flag set if set.\n target.dispatchEvent(event)\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @param {import('./websocket').WebSocket} ws\n * @param {number} type Opcode\n * @param {Buffer} data application data\n */\nfunction websocketMessageReceived (ws, type, data) {\n // 1. If ready state is not OPEN (1), then return.\n if (ws[kReadyState] !== states.OPEN) {\n return\n }\n\n // 2. Let dataForEvent be determined by switching on type and binary type:\n let dataForEvent\n\n if (type === opcodes.TEXT) {\n // -> type indicates that the data is Text\n // a new DOMString containing data\n try {\n dataForEvent = utf8Decode(data)\n } catch {\n failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n if (ws[kBinaryType] === 'blob') {\n // -> type indicates that the data is Binary and binary type is \"blob\"\n // a new Blob object, created in the relevant Realm of the WebSocket\n // object, that represents data as its raw data\n dataForEvent = new Blob([data])\n } else {\n // -> type indicates that the data is Binary and binary type is \"arraybuffer\"\n // a new ArrayBuffer object, created in the relevant Realm of the\n // WebSocket object, whose contents are data\n dataForEvent = toArrayBuffer(data)\n }\n }\n\n // 3. Fire an event named message at the WebSocket object, using MessageEvent,\n // with the origin attribute initialized to the serialization of the WebSocket\n // object\u2019s url's origin, and the data attribute initialized to dataForEvent.\n fireEvent('message', ws, createFastMessageEvent, {\n origin: ws[kWebSocketURL].origin,\n data: dataForEvent\n })\n}\n\nfunction toArrayBuffer (buffer) {\n if (buffer.byteLength === buffer.buffer.byteLength) {\n return buffer.buffer\n }\n return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength)\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455\n * @see https://datatracker.ietf.org/doc/html/rfc2616\n * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407\n * @param {string} protocol\n */\nfunction isValidSubprotocol (protocol) {\n // If present, this value indicates one\n // or more comma-separated subprotocol the client wishes to speak,\n // ordered by preference. The elements that comprise this value\n // MUST be non-empty strings with characters in the range U+0021 to\n // U+007E not including separator characters as defined in\n // [RFC2616] and MUST all be unique strings.\n if (protocol.length === 0) {\n return false\n }\n\n for (let i = 0; i < protocol.length; ++i) {\n const code = protocol.charCodeAt(i)\n\n if (\n code < 0x21 || // CTL, contains SP (0x20) and HT (0x09)\n code > 0x7E ||\n code === 0x22 || // \"\n code === 0x28 || // (\n code === 0x29 || // )\n code === 0x2C || // ,\n code === 0x2F || // /\n code === 0x3A || // :\n code === 0x3B || // ;\n code === 0x3C || // <\n code === 0x3D || // =\n code === 0x3E || // >\n code === 0x3F || // ?\n code === 0x40 || // @\n code === 0x5B || // [\n code === 0x5C || // \\\n code === 0x5D || // ]\n code === 0x7B || // {\n code === 0x7D // }\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4\n * @param {number} code\n */\nfunction isValidStatusCode (code) {\n if (code >= 1000 && code < 1015) {\n return (\n code !== 1004 && // reserved\n code !== 1005 && // \"MUST NOT be set as a status code\"\n code !== 1006 // \"MUST NOT be set as a status code\"\n )\n }\n\n return code >= 3000 && code <= 4999\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @param {string|undefined} reason\n */\nfunction failWebsocketConnection (ws, reason) {\n const { [kController]: controller, [kResponse]: response } = ws\n\n controller.abort()\n\n if (response?.socket && !response.socket.destroyed) {\n response.socket.destroy()\n }\n\n if (reason) {\n // TODO: process.nextTick\n fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), {\n error: new Error(reason),\n message: reason\n })\n }\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5\n * @param {number} opcode\n */\nfunction isControlFrame (opcode) {\n return (\n opcode === opcodes.CLOSE ||\n opcode === opcodes.PING ||\n opcode === opcodes.PONG\n )\n}\n\nfunction isContinuationFrame (opcode) {\n return opcode === opcodes.CONTINUATION\n}\n\nfunction isTextBinaryFrame (opcode) {\n return opcode === opcodes.TEXT || opcode === opcodes.BINARY\n}\n\nfunction isValidOpcode (opcode) {\n return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode)\n}\n\n/**\n * Parses a Sec-WebSocket-Extensions header value.\n * @param {string} extensions\n * @returns {Map}\n */\n// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\nfunction parseExtensions (extensions) {\n const position = { position: 0 }\n const extensionList = new Map()\n\n while (position.position < extensions.length) {\n const pair = collectASequenceOfCodePointsFast(';', extensions, position)\n const [name, value = ''] = pair.split('=')\n\n extensionList.set(\n removeHTTPWhitespace(name, true, false),\n removeHTTPWhitespace(value, false, true)\n )\n\n position.position++\n }\n\n return extensionList\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2\n * @description \"client-max-window-bits = 1*DIGIT\"\n * @param {string} value\n */\nfunction isValidClientWindowBits (value) {\n // Must have at least one character\n if (value.length === 0) {\n return false\n }\n\n // Check all characters are ASCII digits\n for (let i = 0; i < value.length; i++) {\n const byte = value.charCodeAt(i)\n\n if (byte < 0x30 || byte > 0x39) {\n return false\n }\n }\n\n // Check numeric range: zlib requires windowBits in range 8-15\n const num = Number.parseInt(value, 10)\n return num >= 8 && num <= 15\n}\n\n// https://nodejs.org/api/intl.html#detecting-internationalization-support\nconst hasIntl = typeof process.versions.icu === 'string'\nconst fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined\n\n/**\n * Converts a Buffer to utf-8, even on platforms without icu.\n * @param {Buffer} buffer\n */\nconst utf8Decode = hasIntl\n ? fatalDecoder.decode.bind(fatalDecoder)\n : function (buffer) {\n if (isUtf8(buffer)) {\n return buffer.toString('utf-8')\n }\n throw new TypeError('Invalid utf-8 received.')\n }\n\nmodule.exports = {\n isConnecting,\n isEstablished,\n isClosing,\n isClosed,\n fireEvent,\n isValidSubprotocol,\n isValidStatusCode,\n failWebsocketConnection,\n websocketMessageReceived,\n utf8Decode,\n isControlFrame,\n isContinuationFrame,\n isTextBinaryFrame,\n isValidOpcode,\n parseExtensions,\n isValidClientWindowBits\n}\n", "'use strict'\n\nconst { maxUnsigned16Bit } = require('./constants')\n\nconst BUFFER_SIZE = 16386\n\n/** @type {import('crypto')} */\nlet crypto\nlet buffer = null\nlet bufIdx = BUFFER_SIZE\n\ntry {\n crypto = require('node:crypto')\n/* c8 ignore next 3 */\n} catch {\n crypto = {\n // not full compatibility, but minimum.\n randomFillSync: function randomFillSync (buffer, _offset, _size) {\n for (let i = 0; i < buffer.length; ++i) {\n buffer[i] = Math.random() * 255 | 0\n }\n return buffer\n }\n }\n}\n\nfunction generateMask () {\n if (bufIdx === BUFFER_SIZE) {\n bufIdx = 0\n crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE)\n }\n return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]\n}\n\nclass WebsocketFrameSend {\n /**\n * @param {Buffer|undefined} data\n */\n constructor (data) {\n this.frameData = data\n }\n\n createFrame (opcode) {\n const frameData = this.frameData\n const maskKey = generateMask()\n const bodyLength = frameData?.byteLength ?? 0\n\n /** @type {number} */\n let payloadLength = bodyLength // 0-125\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n\n const buffer = Buffer.allocUnsafe(bodyLength + offset)\n\n // Clear first 2 bytes, everything else is overwritten\n buffer[0] = buffer[1] = 0\n buffer[0] |= 0x80 // FIN\n buffer[0] = (buffer[0] & 0xF0) + opcode // opcode\n\n /*! ws. MIT License. Einar Otto Stangvik */\n buffer[offset - 4] = maskKey[0]\n buffer[offset - 3] = maskKey[1]\n buffer[offset - 2] = maskKey[2]\n buffer[offset - 1] = maskKey[3]\n\n buffer[1] = payloadLength\n\n if (payloadLength === 126) {\n buffer.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n // Clear extended payload length\n buffer[2] = buffer[3] = 0\n buffer.writeUIntBE(bodyLength, 4, 6)\n }\n\n buffer[1] |= 0x80 // MASK\n\n // mask body\n for (let i = 0; i < bodyLength; ++i) {\n buffer[offset + i] = frameData[i] ^ maskKey[i & 3]\n }\n\n return buffer\n }\n}\n\nmodule.exports = {\n WebsocketFrameSend\n}\n", "'use strict'\n\nconst { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require('./constants')\nconst {\n kReadyState,\n kSentClose,\n kByteParser,\n kReceivedClose,\n kResponse\n} = require('./symbols')\nconst { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require('./util')\nconst { channels } = require('../../core/diagnostics')\nconst { CloseEvent } = require('./events')\nconst { makeRequest } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { Headers, getHeadersList } = require('../fetch/headers')\nconst { getDecodeSplit } = require('../fetch/util')\nconst { WebsocketFrameSend } = require('./frame')\n\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('node:crypto')\n/* c8 ignore next 3 */\n} catch {\n\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#concept-websocket-establish\n * @param {URL} url\n * @param {string|string[]} protocols\n * @param {import('./websocket').WebSocket} ws\n * @param {(response: any, extensions: string[] | undefined) => void} onEstablish\n * @param {Partial} options\n */\nfunction establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) {\n // 1. Let requestURL be a copy of url, with its scheme set to \"http\", if url\u2019s\n // scheme is \"ws\", and to \"https\" otherwise.\n const requestURL = url\n\n requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'\n\n // 2. Let request be a new request, whose URL is requestURL, client is client,\n // service-workers mode is \"none\", referrer is \"no-referrer\", mode is\n // \"websocket\", credentials mode is \"include\", cache mode is \"no-store\" ,\n // and redirect mode is \"error\".\n const request = makeRequest({\n urlList: [requestURL],\n client,\n serviceWorkers: 'none',\n referrer: 'no-referrer',\n mode: 'websocket',\n credentials: 'include',\n cache: 'no-store',\n redirect: 'error'\n })\n\n // Note: undici extension, allow setting custom headers.\n if (options.headers) {\n const headersList = getHeadersList(new Headers(options.headers))\n\n request.headersList = headersList\n }\n\n // 3. Append (`Upgrade`, `websocket`) to request\u2019s header list.\n // 4. Append (`Connection`, `Upgrade`) to request\u2019s header list.\n // Note: both of these are handled by undici currently.\n // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397\n\n // 5. Let keyValue be a nonce consisting of a randomly selected\n // 16-byte value that has been forgiving-base64-encoded and\n // isomorphic encoded.\n const keyValue = crypto.randomBytes(16).toString('base64')\n\n // 6. Append (`Sec-WebSocket-Key`, keyValue) to request\u2019s\n // header list.\n request.headersList.append('sec-websocket-key', keyValue)\n\n // 7. Append (`Sec-WebSocket-Version`, `13`) to request\u2019s\n // header list.\n request.headersList.append('sec-websocket-version', '13')\n\n // 8. For each protocol in protocols, combine\n // (`Sec-WebSocket-Protocol`, protocol) in request\u2019s header\n // list.\n for (const protocol of protocols) {\n request.headersList.append('sec-websocket-protocol', protocol)\n }\n\n // 9. Let permessageDeflate be a user-agent defined\n // \"permessage-deflate\" extension header value.\n // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673\n const permessageDeflate = 'permessage-deflate; client_max_window_bits'\n\n // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to\n // request\u2019s header list.\n request.headersList.append('sec-websocket-extensions', permessageDeflate)\n\n // 11. Fetch request with useParallelQueue set to true, and\n // processResponse given response being these steps:\n const controller = fetching({\n request,\n useParallelQueue: true,\n dispatcher: options.dispatcher,\n processResponse (response) {\n // 1. If response is a network error or its status is not 101,\n // fail the WebSocket connection.\n if (response.type === 'error' || response.status !== 101) {\n failWebsocketConnection(ws, 'Received network error or non-101 status code.')\n return\n }\n\n // 2. If protocols is not the empty list and extracting header\n // list values given `Sec-WebSocket-Protocol` and response\u2019s\n // header list results in null, failure, or the empty byte\n // sequence, then fail the WebSocket connection.\n if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(ws, 'Server did not respond with sent protocols.')\n return\n }\n\n // 3. Follow the requirements stated step 2 to step 6, inclusive,\n // of the last set of steps in section 4.1 of The WebSocket\n // Protocol to validate response. This either results in fail\n // the WebSocket connection or the WebSocket connection is\n // established.\n\n // 2. If the response lacks an |Upgrade| header field or the |Upgrade|\n // header field contains a value that is not an ASCII case-\n // insensitive match for the value \"websocket\", the client MUST\n // _Fail the WebSocket Connection_.\n if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {\n failWebsocketConnection(ws, 'Server did not set Upgrade header to \"websocket\".')\n return\n }\n\n // 3. If the response lacks a |Connection| header field or the\n // |Connection| header field doesn't contain a token that is an\n // ASCII case-insensitive match for the value \"Upgrade\", the client\n // MUST _Fail the WebSocket Connection_.\n if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {\n failWebsocketConnection(ws, 'Server did not set Connection header to \"upgrade\".')\n return\n }\n\n // 4. If the response lacks a |Sec-WebSocket-Accept| header field or\n // the |Sec-WebSocket-Accept| contains a value other than the\n // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-\n // Key| (as a string, not base64-decoded) with the string \"258EAFA5-\n // E914-47DA-95CA-C5AB0DC85B11\" but ignoring any leading and\n // trailing whitespace, the client MUST _Fail the WebSocket\n // Connection_.\n const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')\n const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64')\n if (secWSAccept !== digest) {\n failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.')\n return\n }\n\n // 5. If the response includes a |Sec-WebSocket-Extensions| header\n // field and this header field indicates the use of an extension\n // that was not present in the client's handshake (the server has\n // indicated an extension not requested by the client), the client\n // MUST _Fail the WebSocket Connection_. (The parsing of this\n // header field to determine which extensions are requested is\n // discussed in Section 9.1.)\n const secExtension = response.headersList.get('Sec-WebSocket-Extensions')\n let extensions\n\n if (secExtension !== null) {\n extensions = parseExtensions(secExtension)\n\n if (!extensions.has('permessage-deflate')) {\n failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.')\n return\n }\n }\n\n // 6. If the response includes a |Sec-WebSocket-Protocol| header field\n // and this header field indicates the use of a subprotocol that was\n // not present in the client's handshake (the server has indicated a\n // subprotocol not requested by the client), the client MUST _Fail\n // the WebSocket Connection_.\n const secProtocol = response.headersList.get('Sec-WebSocket-Protocol')\n\n if (secProtocol !== null) {\n const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList)\n\n // The client can request that the server use a specific subprotocol by\n // including the |Sec-WebSocket-Protocol| field in its handshake. If it\n // is specified, the server needs to include the same field and one of\n // the selected subprotocol values in its response for the connection to\n // be established.\n if (!requestProtocols.includes(secProtocol)) {\n failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.')\n return\n }\n }\n\n response.socket.on('data', onSocketData)\n response.socket.on('close', onSocketClose)\n response.socket.on('error', onSocketError)\n\n if (channels.open.hasSubscribers) {\n channels.open.publish({\n address: response.socket.address(),\n protocol: secProtocol,\n extensions: secExtension\n })\n }\n\n onEstablish(response, extensions)\n }\n })\n\n return controller\n}\n\nfunction closeWebSocketConnection (ws, code, reason, reasonByteLength) {\n if (isClosing(ws) || isClosed(ws)) {\n // If this's ready state is CLOSING (2) or CLOSED (3)\n // Do nothing.\n } else if (!isEstablished(ws)) {\n // If the WebSocket connection is not yet established\n // Fail the WebSocket connection and set this's ready state\n // to CLOSING (2).\n failWebsocketConnection(ws, 'Connection was closed before it was established.')\n ws[kReadyState] = states.CLOSING\n } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) {\n // If the WebSocket closing handshake has not yet been started\n // Start the WebSocket closing handshake and set this's ready\n // state to CLOSING (2).\n // - If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n // - If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n // - If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n\n ws[kSentClose] = sentCloseFrameState.PROCESSING\n\n const frame = new WebsocketFrameSend()\n\n // If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n\n // If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n if (code !== undefined && reason === undefined) {\n frame.frameData = Buffer.allocUnsafe(2)\n frame.frameData.writeUInt16BE(code, 0)\n } else if (code !== undefined && reason !== undefined) {\n // If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength)\n frame.frameData.writeUInt16BE(code, 0)\n // the body MAY contain UTF-8-encoded data with value /reason/\n frame.frameData.write(reason, 2, 'utf-8')\n } else {\n frame.frameData = emptyBuffer\n }\n\n /** @type {import('stream').Duplex} */\n const socket = ws[kResponse].socket\n\n socket.write(frame.createFrame(opcodes.CLOSE))\n\n ws[kSentClose] = sentCloseFrameState.SENT\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n ws[kReadyState] = states.CLOSING\n } else {\n // Otherwise\n // Set this's ready state to CLOSING (2).\n ws[kReadyState] = states.CLOSING\n }\n}\n\n/**\n * @param {Buffer} chunk\n */\nfunction onSocketData (chunk) {\n if (!this.ws[kByteParser].write(chunk)) {\n this.pause()\n }\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4\n */\nfunction onSocketClose () {\n const { ws } = this\n const { [kResponse]: response } = ws\n\n response.socket.off('data', onSocketData)\n response.socket.off('close', onSocketClose)\n response.socket.off('error', onSocketError)\n\n // If the TCP connection was closed after the\n // WebSocket closing handshake was completed, the WebSocket connection\n // is said to have been closed _cleanly_.\n const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]\n\n let code = 1005\n let reason = ''\n\n const result = ws[kByteParser].closingInfo\n\n if (result && !result.error) {\n code = result.code ?? 1005\n reason = result.reason\n } else if (!ws[kReceivedClose]) {\n // If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n code = 1006\n }\n\n // 1. Change the ready state to CLOSED (3).\n ws[kReadyState] = states.CLOSED\n\n // 2. If the user agent was required to fail the WebSocket\n // connection, or if the WebSocket connection was closed\n // after being flagged as full, fire an event named error\n // at the WebSocket object.\n // TODO\n\n // 3. Fire an event named close at the WebSocket object,\n // using CloseEvent, with the wasClean attribute\n // initialized to true if the connection closed cleanly\n // and false otherwise, the code attribute initialized to\n // the WebSocket connection close code, and the reason\n // attribute initialized to the result of applying UTF-8\n // decode without BOM to the WebSocket connection close\n // reason.\n // TODO: process.nextTick\n fireEvent('close', ws, (type, init) => new CloseEvent(type, init), {\n wasClean, code, reason\n })\n\n if (channels.close.hasSubscribers) {\n channels.close.publish({\n websocket: ws,\n code,\n reason\n })\n }\n}\n\nfunction onSocketError (error) {\n const { ws } = this\n\n ws[kReadyState] = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(error)\n }\n\n this.destroy()\n}\n\nmodule.exports = {\n establishWebSocketConnection,\n closeWebSocketConnection\n}\n", "'use strict'\n\nconst { createInflateRaw, Z_DEFAULT_WINDOWBITS } = require('node:zlib')\nconst { isValidClientWindowBits } = require('./util')\nconst { MessageSizeExceededError } = require('../../core/errors')\n\nconst tail = Buffer.from([0x00, 0x00, 0xff, 0xff])\nconst kBuffer = Symbol('kBuffer')\nconst kLength = Symbol('kLength')\n\nclass PerMessageDeflate {\n /** @type {import('node:zlib').InflateRaw} */\n #inflate\n\n #options = {}\n\n #maxPayloadSize = 0\n\n /**\n * @param {Map} extensions\n */\n constructor (extensions, options) {\n this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')\n this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')\n\n this.#maxPayloadSize = options.maxPayloadSize\n }\n\n /**\n * Decompress a compressed payload.\n * @param {Buffer} chunk Compressed data\n * @param {boolean} fin Final fragment flag\n * @param {Function} callback Callback function\n */\n decompress (chunk, fin, callback) {\n // An endpoint uses the following algorithm to decompress a message.\n // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the\n // payload of the message.\n // 2. Decompress the resulting data using DEFLATE.\n if (!this.#inflate) {\n let windowBits = Z_DEFAULT_WINDOWBITS\n\n if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS\n if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) {\n callback(new Error('Invalid server_max_window_bits'))\n return\n }\n\n windowBits = Number.parseInt(this.#options.serverMaxWindowBits)\n }\n\n try {\n this.#inflate = createInflateRaw({ windowBits })\n } catch (err) {\n callback(err)\n return\n }\n this.#inflate[kBuffer] = []\n this.#inflate[kLength] = 0\n\n this.#inflate.on('data', (data) => {\n this.#inflate[kLength] += data.length\n\n if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) {\n callback(new MessageSizeExceededError())\n this.#inflate.removeAllListeners()\n this.#inflate = null\n return\n }\n\n this.#inflate[kBuffer].push(data)\n })\n\n this.#inflate.on('error', (err) => {\n this.#inflate = null\n callback(err)\n })\n }\n\n this.#inflate.write(chunk)\n if (fin) {\n this.#inflate.write(tail)\n }\n\n this.#inflate.flush(() => {\n if (!this.#inflate) {\n return\n }\n\n const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength])\n\n this.#inflate[kBuffer].length = 0\n this.#inflate[kLength] = 0\n\n callback(null, full)\n })\n }\n}\n\nmodule.exports = { PerMessageDeflate }\n", "'use strict'\n\nconst { Writable } = require('node:stream')\nconst assert = require('node:assert')\nconst { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require('./constants')\nconst { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols')\nconst { channels } = require('../../core/diagnostics')\nconst {\n isValidStatusCode,\n isValidOpcode,\n failWebsocketConnection,\n websocketMessageReceived,\n utf8Decode,\n isControlFrame,\n isTextBinaryFrame,\n isContinuationFrame\n} = require('./util')\nconst { WebsocketFrameSend } = require('./frame')\nconst { closeWebSocketConnection } = require('./connection')\nconst { PerMessageDeflate } = require('./permessage-deflate')\nconst { MessageSizeExceededError } = require('../../core/errors')\n\nfunction failWebsocketConnectionWithCode (ws, code, reason) {\n closeWebSocketConnection(ws, code, reason, Buffer.byteLength(reason))\n failWebsocketConnection(ws, reason)\n}\n\n// This code was influenced by ws released under the MIT license.\n// Copyright (c) 2011 Einar Otto Stangvik \n// Copyright (c) 2013 Arnout Kazemier and contributors\n// Copyright (c) 2016 Luigi Pinca and contributors\n\nclass ByteParser extends Writable {\n #buffers = []\n #fragmentsBytes = 0\n #byteOffset = 0\n #loop = false\n\n #state = parserStates.INFO\n\n #info = {}\n #fragments = []\n\n /** @type {Map} */\n #extensions\n\n /** @type {number} */\n #maxFragments\n\n /** @type {number} */\n #maxPayloadSize\n\n /**\n * @param {import('./websocket').WebSocket} ws\n * @param {Map|null} extensions\n * @param {{ maxFragments?: number, maxPayloadSize?: number }} [options]\n */\n constructor (ws, extensions, options = {}) {\n super()\n\n this.ws = ws\n this.#extensions = extensions == null ? new Map() : extensions\n this.#maxFragments = options.maxFragments ?? 0\n this.#maxPayloadSize = options.maxPayloadSize ?? 0\n\n if (this.#extensions.has('permessage-deflate')) {\n this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options))\n }\n }\n\n /**\n * @param {Buffer} chunk\n * @param {() => void} callback\n */\n _write (chunk, _, callback) {\n this.#buffers.push(chunk)\n this.#byteOffset += chunk.length\n this.#loop = true\n\n this.run(callback)\n }\n\n #validatePayloadLength () {\n if (\n this.#maxPayloadSize > 0 &&\n !isControlFrame(this.#info.opcode) &&\n this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize\n ) {\n failWebsocketConnectionWithCode(this.ws, 1009, 'Payload size exceeds maximum allowed size')\n return false\n }\n\n return true\n }\n\n /**\n * Runs whenever a new chunk is received.\n * Callback is called whenever there are no more chunks buffering,\n * or not enough bytes are buffered to parse.\n */\n run (callback) {\n while (this.#loop) {\n if (this.#state === parserStates.INFO) {\n // If there aren't enough bytes to parse the payload length, etc.\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n const fin = (buffer[0] & 0x80) !== 0\n const opcode = buffer[0] & 0x0F\n const masked = (buffer[1] & 0x80) === 0x80\n\n const fragmented = !fin && opcode !== opcodes.CONTINUATION\n const payloadLength = buffer[1] & 0x7F\n\n const rsv1 = buffer[0] & 0x40\n const rsv2 = buffer[0] & 0x20\n const rsv3 = buffer[0] & 0x10\n\n if (!isValidOpcode(opcode)) {\n failWebsocketConnection(this.ws, 'Invalid opcode received')\n return callback()\n }\n\n if (masked) {\n failWebsocketConnection(this.ws, 'Frame cannot be masked')\n return callback()\n }\n\n // MUST be 0 unless an extension is negotiated that defines meanings\n // for non-zero values. If a nonzero value is received and none of\n // the negotiated extensions defines the meaning of such a nonzero\n // value, the receiving endpoint MUST _Fail the WebSocket\n // Connection_.\n // This document allocates the RSV1 bit of the WebSocket header for\n // PMCEs and calls the bit the \"Per-Message Compressed\" bit. On a\n // WebSocket connection where a PMCE is in use, this bit indicates\n // whether a message is compressed or not.\n if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) {\n failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.')\n return\n }\n\n if (rsv2 !== 0 || rsv3 !== 0) {\n failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear')\n return\n }\n\n if (fragmented && !isTextBinaryFrame(opcode)) {\n // Only text and binary frames can be fragmented\n failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.')\n return\n }\n\n // If we are already parsing a text/binary frame and do not receive either\n // a continuation frame or close frame, fail the connection.\n if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) {\n failWebsocketConnection(this.ws, 'Expected continuation frame')\n return\n }\n\n if (this.#info.fragmented && fragmented) {\n // A fragmented frame can't be fragmented itself\n failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.')\n return\n }\n\n // \"All control frames MUST have a payload length of 125 bytes or less\n // and MUST NOT be fragmented.\"\n if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) {\n failWebsocketConnection(this.ws, 'Control frame either too large or fragmented')\n return\n }\n\n if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) {\n failWebsocketConnection(this.ws, 'Unexpected continuation frame')\n return\n }\n\n if (payloadLength <= 125) {\n this.#info.payloadLength = payloadLength\n this.#state = parserStates.READ_DATA\n\n if (!this.#validatePayloadLength()) {\n return\n }\n } else if (payloadLength === 126) {\n this.#state = parserStates.PAYLOADLENGTH_16\n } else if (payloadLength === 127) {\n this.#state = parserStates.PAYLOADLENGTH_64\n }\n\n if (isTextBinaryFrame(opcode)) {\n this.#info.binaryType = opcode\n this.#info.compressed = rsv1 !== 0\n }\n\n this.#info.opcode = opcode\n this.#info.masked = masked\n this.#info.fin = fin\n this.#info.fragmented = fragmented\n } else if (this.#state === parserStates.PAYLOADLENGTH_16) {\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.payloadLength = buffer.readUInt16BE(0)\n this.#state = parserStates.READ_DATA\n\n if (!this.#validatePayloadLength()) {\n return\n }\n } else if (this.#state === parserStates.PAYLOADLENGTH_64) {\n if (this.#byteOffset < 8) {\n return callback()\n }\n\n const buffer = this.consume(8)\n const upper = buffer.readUInt32BE(0)\n const lower = buffer.readUInt32BE(4)\n\n // 2^31 is the maximum bytes an arraybuffer can contain\n // on 32-bit systems. Although, on 64-bit systems, this is\n // 2^53-1 bytes.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e\n if (upper !== 0 || lower > 2 ** 31 - 1) {\n failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.')\n return\n }\n\n this.#info.payloadLength = lower\n this.#state = parserStates.READ_DATA\n\n if (!this.#validatePayloadLength()) {\n return\n }\n } else if (this.#state === parserStates.READ_DATA) {\n if (this.#byteOffset < this.#info.payloadLength) {\n return callback()\n }\n\n const body = this.consume(this.#info.payloadLength)\n\n if (isControlFrame(this.#info.opcode)) {\n this.#loop = this.parseControlFrame(body)\n this.#state = parserStates.INFO\n } else {\n if (!this.#info.compressed) {\n if (!this.writeFragments(body)) {\n return\n }\n\n if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {\n failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message)\n return\n }\n\n // If the frame is not fragmented, a message has been received.\n // If the frame is fragmented, it will terminate with a fin bit set\n // and an opcode of 0 (continuation), therefore we handle that when\n // parsing continuation frames, not here.\n if (!this.#info.fragmented && this.#info.fin) {\n websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())\n }\n\n this.#state = parserStates.INFO\n } else {\n this.#extensions.get('permessage-deflate').decompress(\n body,\n this.#info.fin,\n (error, data) => {\n if (error) {\n const code = error instanceof MessageSizeExceededError ? 1009 : 1007\n failWebsocketConnectionWithCode(this.ws, code, error.message)\n return\n }\n\n if (!this.writeFragments(data)) {\n return\n }\n\n if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {\n failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message)\n return\n }\n\n if (!this.#info.fin) {\n this.#state = parserStates.INFO\n this.#loop = true\n this.run(callback)\n return\n }\n\n websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())\n\n this.#loop = true\n this.#state = parserStates.INFO\n this.run(callback)\n }\n )\n\n this.#loop = false\n break\n }\n }\n }\n }\n }\n\n /**\n * Take n bytes from the buffered Buffers\n * @param {number} n\n * @returns {Buffer}\n */\n consume (n) {\n if (n > this.#byteOffset) {\n throw new Error('Called consume() before buffers satiated.')\n } else if (n === 0) {\n return emptyBuffer\n }\n\n if (this.#buffers[0].length === n) {\n this.#byteOffset -= this.#buffers[0].length\n return this.#buffers.shift()\n }\n\n const buffer = Buffer.allocUnsafe(n)\n let offset = 0\n\n while (offset !== n) {\n const next = this.#buffers[0]\n const { length } = next\n\n if (length + offset === n) {\n buffer.set(this.#buffers.shift(), offset)\n break\n } else if (length + offset > n) {\n buffer.set(next.subarray(0, n - offset), offset)\n this.#buffers[0] = next.subarray(n - offset)\n break\n } else {\n buffer.set(this.#buffers.shift(), offset)\n offset += next.length\n }\n }\n\n this.#byteOffset -= n\n\n return buffer\n }\n\n writeFragments (fragment) {\n if (\n this.#maxFragments > 0 &&\n this.#fragments.length === this.#maxFragments\n ) {\n failWebsocketConnectionWithCode(this.ws, 1008, 'Too many message fragments')\n return false\n }\n\n this.#fragmentsBytes += fragment.length\n this.#fragments.push(fragment)\n return true\n }\n\n consumeFragments () {\n const fragments = this.#fragments\n\n if (fragments.length === 1) {\n this.#fragmentsBytes = 0\n return fragments.shift()\n }\n\n const output = Buffer.concat(fragments, this.#fragmentsBytes)\n this.#fragments = []\n this.#fragmentsBytes = 0\n\n return output\n }\n\n parseCloseBody (data) {\n assert(data.length !== 1)\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n /** @type {number|undefined} */\n let code\n\n if (data.length >= 2) {\n // _The WebSocket Connection Close Code_ is\n // defined as the status code (Section 7.4) contained in the first Close\n // control frame received by the application\n code = data.readUInt16BE(0)\n }\n\n if (code !== undefined && !isValidStatusCode(code)) {\n return { code: 1002, reason: 'Invalid status code', error: true }\n }\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6\n /** @type {Buffer} */\n let reason = data.subarray(2)\n\n // Remove BOM\n if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) {\n reason = reason.subarray(3)\n }\n\n try {\n reason = utf8Decode(reason)\n } catch {\n return { code: 1007, reason: 'Invalid UTF-8', error: true }\n }\n\n return { code, reason, error: false }\n }\n\n /**\n * Parses control frames.\n * @param {Buffer} body\n */\n parseControlFrame (body) {\n const { opcode, payloadLength } = this.#info\n\n if (opcode === opcodes.CLOSE) {\n if (payloadLength === 1) {\n failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.')\n return false\n }\n\n this.#info.closeInfo = this.parseCloseBody(body)\n\n if (this.#info.closeInfo.error) {\n const { code, reason } = this.#info.closeInfo\n\n closeWebSocketConnection(this.ws, code, reason, reason.length)\n failWebsocketConnection(this.ws, reason)\n return false\n }\n\n if (this.ws[kSentClose] !== sentCloseFrameState.SENT) {\n // If an endpoint receives a Close frame and did not previously send a\n // Close frame, the endpoint MUST send a Close frame in response. (When\n // sending a Close frame in response, the endpoint typically echos the\n // status code it received.)\n let body = emptyBuffer\n if (this.#info.closeInfo.code) {\n body = Buffer.allocUnsafe(2)\n body.writeUInt16BE(this.#info.closeInfo.code, 0)\n }\n const closeFrame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(\n closeFrame.createFrame(opcodes.CLOSE),\n (err) => {\n if (!err) {\n this.ws[kSentClose] = sentCloseFrameState.SENT\n }\n }\n )\n }\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this.ws[kReadyState] = states.CLOSING\n this.ws[kReceivedClose] = true\n\n return false\n } else if (opcode === opcodes.PING) {\n // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in\n // response, unless it already received a Close frame.\n // A Pong frame sent in response to a Ping frame must have identical\n // \"Application data\"\n\n if (!this.ws[kReceivedClose]) {\n const frame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG))\n\n if (channels.ping.hasSubscribers) {\n channels.ping.publish({\n payload: body\n })\n }\n }\n } else if (opcode === opcodes.PONG) {\n // A Pong frame MAY be sent unsolicited. This serves as a\n // unidirectional heartbeat. A response to an unsolicited Pong frame is\n // not expected.\n\n if (channels.pong.hasSubscribers) {\n channels.pong.publish({\n payload: body\n })\n }\n }\n\n return true\n }\n\n get closingInfo () {\n return this.#info.closeInfo\n }\n}\n\nmodule.exports = {\n ByteParser\n}\n", "'use strict'\n\nconst { WebsocketFrameSend } = require('./frame')\nconst { opcodes, sendHints } = require('./constants')\nconst FixedQueue = require('../../dispatcher/fixed-queue')\n\n/** @type {typeof Uint8Array} */\nconst FastBuffer = Buffer[Symbol.species]\n\n/**\n * @typedef {object} SendQueueNode\n * @property {Promise | null} promise\n * @property {((...args: any[]) => any)} callback\n * @property {Buffer | null} frame\n */\n\nclass SendQueue {\n /**\n * @type {FixedQueue}\n */\n #queue = new FixedQueue()\n\n /**\n * @type {boolean}\n */\n #running = false\n\n /** @type {import('node:net').Socket} */\n #socket\n\n constructor (socket) {\n this.#socket = socket\n }\n\n add (item, cb, hint) {\n if (hint !== sendHints.blob) {\n const frame = createFrame(item, hint)\n if (!this.#running) {\n // fast-path\n this.#socket.write(frame, cb)\n } else {\n /** @type {SendQueueNode} */\n const node = {\n promise: null,\n callback: cb,\n frame\n }\n this.#queue.push(node)\n }\n return\n }\n\n /** @type {SendQueueNode} */\n const node = {\n promise: item.arrayBuffer().then((ab) => {\n node.promise = null\n node.frame = createFrame(ab, hint)\n }),\n callback: cb,\n frame: null\n }\n\n this.#queue.push(node)\n\n if (!this.#running) {\n this.#run()\n }\n }\n\n async #run () {\n this.#running = true\n const queue = this.#queue\n while (!queue.isEmpty()) {\n const node = queue.shift()\n // wait pending promise\n if (node.promise !== null) {\n await node.promise\n }\n // write\n this.#socket.write(node.frame, node.callback)\n // cleanup\n node.callback = node.frame = null\n }\n this.#running = false\n }\n}\n\nfunction createFrame (data, hint) {\n return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY)\n}\n\nfunction toBuffer (data, hint) {\n switch (hint) {\n case sendHints.string:\n return Buffer.from(data)\n case sendHints.arrayBuffer:\n case sendHints.blob:\n return new FastBuffer(data)\n case sendHints.typedArray:\n return new FastBuffer(data.buffer, data.byteOffset, data.byteLength)\n }\n}\n\nmodule.exports = { SendQueue }\n", "'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { environmentSettingsObject } = require('../fetch/util')\nconst { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require('./constants')\nconst {\n kWebSocketURL,\n kReadyState,\n kController,\n kBinaryType,\n kResponse,\n kSentClose,\n kByteParser\n} = require('./symbols')\nconst {\n isConnecting,\n isEstablished,\n isClosing,\n isValidSubprotocol,\n fireEvent\n} = require('./util')\nconst { establishWebSocketConnection, closeWebSocketConnection } = require('./connection')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty, isBlobLike } = require('../../core/util')\nconst { getGlobalDispatcher } = require('../../global')\nconst { types } = require('node:util')\nconst { ErrorEvent, CloseEvent } = require('./events')\nconst { SendQueue } = require('./sender')\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /** @type {SendQueue} */\n #sendQueue\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'WebSocket constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options')\n\n url = webidl.converters.USVString(url, prefix, 'url')\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = environmentSettingsObject.settingsObject.baseUrl\n\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL.\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n // 3. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 4. If urlRecord\u2019s scheme is \"http\", then set urlRecord\u2019s scheme to \"ws\".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n // 5. Otherwise, if urlRecord\u2019s scheme is \"https\", set urlRecord\u2019s scheme to \"wss\".\n urlRecord.protocol = 'wss:'\n }\n\n // 6. If urlRecord\u2019s scheme is not \"ws\" or \"wss\", then throw a \"SyntaxError\" DOMException.\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException(\n `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`,\n 'SyntaxError'\n )\n }\n\n // 7. If urlRecord\u2019s fragment is non-null, then throw a \"SyntaxError\"\n // DOMException.\n if (urlRecord.hash || urlRecord.href.endsWith('#')) {\n throw new DOMException('Got fragment', 'SyntaxError')\n }\n\n // 8. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 9. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 10. Set this's url to urlRecord.\n this[kWebSocketURL] = new URL(urlRecord.href)\n\n // 11. Let client be this's relevant settings object.\n const client = environmentSettingsObject.settingsObject\n\n // 12. Run this step in parallel:\n\n // 1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this[kController] = establishWebSocketConnection(\n urlRecord,\n protocols,\n client,\n this,\n (response, extensions) => this.#onConnectionEstablished(response, extensions),\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this[kReadyState] = WebSocket.CONNECTING\n\n this[kSentClose] = sentCloseFrameState.NOT_SENT\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this[kBinaryType] = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.close'\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true })\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason, prefix, 'reason')\n }\n\n // 1. If code is present, but is neither an integer equal to 1000 nor an\n // integer in the range 3000 to 4999, inclusive, throw an\n // \"InvalidAccessError\" DOMException.\n if (code !== undefined) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n let reasonByteLength = 0\n\n // 2. If reason is present, then run these substeps:\n if (reason !== undefined) {\n // 1. Let reasonBytes be the result of encoding reason.\n // 2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n reasonByteLength = Buffer.byteLength(reason)\n\n if (reasonByteLength > 123) {\n throw new DOMException(\n `Reason must be less than 123 bytes; received ${reasonByteLength}`,\n 'SyntaxError'\n )\n }\n }\n\n // 3. Run the first matching steps from the following list:\n closeWebSocketConnection(this, code, reason, reasonByteLength)\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.send'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n data = webidl.converters.WebSocketSendData(data, prefix, 'data')\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (isConnecting(this)) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this) || isClosing(this)) {\n return\n }\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const length = Buffer.byteLength(data)\n\n this.#bufferedAmount += length\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= length\n }, sendHints.string)\n } else if (types.isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.arrayBuffer)\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data\u2019s buffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.typedArray)\n } else if (isBlobLike(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object\u2019s raw data, in bytes.\n\n this.#bufferedAmount += data.size\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.size\n }, sendHints.blob)\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this[kReadyState]\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this[kWebSocketURL])\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n if (typeof fn === 'function') {\n this.#events.open = fn\n this.addEventListener('open', fn)\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n if (typeof fn === 'function') {\n this.#events.error = fn\n this.addEventListener('error', fn)\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n if (typeof fn === 'function') {\n this.#events.close = fn\n this.addEventListener('close', fn)\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n if (typeof fn === 'function') {\n this.#events.message = fn\n this.addEventListener('message', fn)\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this[kBinaryType]\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this[kBinaryType] = 'blob'\n } else {\n this[kBinaryType] = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response, parsedExtensions) {\n // processResponse is called when the \"response's header list has been received and initialized.\"\n // once this happens, the connection is open\n this[kResponse] = response\n\n const webSocketOptions = this[kController]?.dispatcher?.webSocketOptions\n const maxFragments = webSocketOptions?.maxFragments\n const maxPayloadSize = webSocketOptions?.maxPayloadSize\n\n const parser = new ByteParser(this, parsedExtensions, {\n maxFragments,\n maxPayloadSize\n })\n parser.on('drain', onParserDrain)\n parser.on('error', onParserError.bind(this))\n\n response.socket.ws = this\n this[kByteParser] = parser\n\n this.#sendQueue = new SendQueue(response.socket)\n\n // 1. Change the ready state to OPEN (1).\n this[kReadyState] = states.OPEN\n\n // 2. Change the extensions attribute\u2019s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute\u2019s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n }\n}\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence'] = function (V, prefix, argument) {\n if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) {\n return webidl.converters['sequence'](V)\n }\n\n return webidl.converters.DOMString(V, prefix, argument)\n}\n\n// This implements the proposal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence'],\n defaultValue: () => new Array(0)\n },\n {\n key: 'dispatcher',\n converter: webidl.converters.any,\n defaultValue: () => getGlobalDispatcher()\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) {\n return webidl.converters.BufferSource(V)\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nfunction onParserDrain () {\n this.ws[kResponse].socket.resume()\n}\n\nfunction onParserError (err) {\n let message\n let code\n\n if (err instanceof CloseEvent) {\n message = err.reason\n code = err.code\n } else {\n message = err.message\n }\n\n fireEvent('error', this, () => new ErrorEvent('error', { error: err, message }))\n\n closeWebSocketConnection(this, code)\n}\n\nmodule.exports = {\n WebSocket\n}\n", "'use strict'\n\n/**\n * Checks if the given value is a valid LastEventId.\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidLastEventId (value) {\n // LastEventId should not contain U+0000 NULL\n return value.indexOf('\\u0000') === -1\n}\n\n/**\n * Checks if the given value is a base 10 digit.\n * @param {string} value\n * @returns {boolean}\n */\nfunction isASCIINumber (value) {\n if (value.length === 0) return false\n for (let i = 0; i < value.length; i++) {\n if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false\n }\n return true\n}\n\n// https://github.com/nodejs/undici/issues/2664\nfunction delay (ms) {\n return new Promise((resolve) => {\n setTimeout(resolve, ms).unref()\n })\n}\n\nmodule.exports = {\n isValidLastEventId,\n isASCIINumber,\n delay\n}\n", "'use strict'\nconst { Transform } = require('node:stream')\nconst { isASCIINumber, isValidLastEventId } = require('./util')\n\n/**\n * @type {number[]} BOM\n */\nconst BOM = [0xEF, 0xBB, 0xBF]\n/**\n * @type {10} LF\n */\nconst LF = 0x0A\n/**\n * @type {13} CR\n */\nconst CR = 0x0D\n/**\n * @type {58} COLON\n */\nconst COLON = 0x3A\n/**\n * @type {32} SPACE\n */\nconst SPACE = 0x20\n\n/**\n * @typedef {object} EventSourceStreamEvent\n * @type {object}\n * @property {string} [event] The event type.\n * @property {string} [data] The data of the message.\n * @property {string} [id] A unique ID for the event.\n * @property {string} [retry] The reconnection time, in milliseconds.\n */\n\n/**\n * @typedef eventSourceSettings\n * @type {object}\n * @property {string} lastEventId The last event ID received from the server.\n * @property {string} origin The origin of the event source.\n * @property {number} reconnectionTime The reconnection time, in milliseconds.\n */\n\nclass EventSourceStream extends Transform {\n /**\n * @type {eventSourceSettings}\n */\n state = null\n\n /**\n * Leading byte-order-mark check.\n * @type {boolean}\n */\n checkBOM = true\n\n /**\n * @type {boolean}\n */\n crlfCheck = false\n\n /**\n * @type {boolean}\n */\n eventEndCheck = false\n\n /**\n * @type {Buffer}\n */\n buffer = null\n\n pos = 0\n\n event = {\n data: undefined,\n event: undefined,\n id: undefined,\n retry: undefined\n }\n\n /**\n * @param {object} options\n * @param {eventSourceSettings} options.eventSourceSettings\n * @param {Function} [options.push]\n */\n constructor (options = {}) {\n // Enable object mode as EventSourceStream emits objects of shape\n // EventSourceStreamEvent\n options.readableObjectMode = true\n\n super(options)\n\n this.state = options.eventSourceSettings || {}\n if (options.push) {\n this.push = options.push\n }\n }\n\n /**\n * @param {Buffer} chunk\n * @param {string} _encoding\n * @param {Function} callback\n * @returns {void}\n */\n _transform (chunk, _encoding, callback) {\n if (chunk.length === 0) {\n callback()\n return\n }\n\n // Cache the chunk in the buffer, as the data might not be complete while\n // processing it\n // TODO: Investigate if there is a more performant way to handle\n // incoming chunks\n // see: https://github.com/nodejs/undici/issues/2630\n if (this.buffer) {\n this.buffer = Buffer.concat([this.buffer, chunk])\n } else {\n this.buffer = chunk\n }\n\n // Strip leading byte-order-mark if we opened the stream and started\n // the processing of the incoming data\n if (this.checkBOM) {\n switch (this.buffer.length) {\n case 1:\n // Check if the first byte is the same as the first byte of the BOM\n if (this.buffer[0] === BOM[0]) {\n // If it is, we need to wait for more data\n callback()\n return\n }\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n\n // The buffer only contains one byte so we need to wait for more data\n callback()\n return\n case 2:\n // Check if the first two bytes are the same as the first two bytes\n // of the BOM\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1]\n ) {\n // If it is, we need to wait for more data, because the third byte\n // is needed to determine if it is the BOM or not\n callback()\n return\n }\n\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n break\n case 3:\n // Check if the first three bytes are the same as the first three\n // bytes of the BOM\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1] &&\n this.buffer[2] === BOM[2]\n ) {\n // If it is, we can drop the buffered data, as it is only the BOM\n this.buffer = Buffer.alloc(0)\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n\n // Await more data\n callback()\n return\n }\n // If it is not the BOM, we can start processing the data\n this.checkBOM = false\n break\n default:\n // The buffer is longer than 3 bytes, so we can drop the BOM if it is\n // present\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1] &&\n this.buffer[2] === BOM[2]\n ) {\n // Remove the BOM from the buffer\n this.buffer = this.buffer.subarray(3)\n }\n\n // Set the checkBOM flag to false as we don't need to check for the\n this.checkBOM = false\n break\n }\n }\n\n while (this.pos < this.buffer.length) {\n // If the previous line ended with an end-of-line, we need to check\n // if the next character is also an end-of-line.\n if (this.eventEndCheck) {\n // If the the current character is an end-of-line, then the event\n // is finished and we can process it\n\n // If the previous line ended with a carriage return, we need to\n // check if the current character is a line feed and remove it\n // from the buffer.\n if (this.crlfCheck) {\n // If the current character is a line feed, we can remove it\n // from the buffer and reset the crlfCheck flag\n if (this.buffer[this.pos] === LF) {\n this.buffer = this.buffer.subarray(this.pos + 1)\n this.pos = 0\n this.crlfCheck = false\n\n // It is possible that the line feed is not the end of the\n // event. We need to check if the next character is an\n // end-of-line character to determine if the event is\n // finished. We simply continue the loop to check the next\n // character.\n\n // As we removed the line feed from the buffer and set the\n // crlfCheck flag to false, we basically don't make any\n // distinction between a line feed and a carriage return.\n continue\n }\n this.crlfCheck = false\n }\n\n if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {\n // If the current character is a carriage return, we need to\n // set the crlfCheck flag to true, as we need to check if the\n // next character is a line feed so we can remove it from the\n // buffer\n if (this.buffer[this.pos] === CR) {\n this.crlfCheck = true\n }\n\n this.buffer = this.buffer.subarray(this.pos + 1)\n this.pos = 0\n if (\n this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) {\n this.processEvent(this.event)\n }\n this.clearEvent()\n continue\n }\n // If the current character is not an end-of-line, then the event\n // is not finished and we have to reset the eventEndCheck flag\n this.eventEndCheck = false\n continue\n }\n\n // If the current character is an end-of-line, we can process the\n // line\n if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {\n // If the current character is a carriage return, we need to\n // set the crlfCheck flag to true, as we need to check if the\n // next character is a line feed\n if (this.buffer[this.pos] === CR) {\n this.crlfCheck = true\n }\n\n // In any case, we can process the line as we reached an\n // end-of-line character\n this.parseLine(this.buffer.subarray(0, this.pos), this.event)\n\n // Remove the processed line from the buffer\n this.buffer = this.buffer.subarray(this.pos + 1)\n // Reset the position as we removed the processed line from the buffer\n this.pos = 0\n // A line was processed and this could be the end of the event. We need\n // to check if the next line is empty to determine if the event is\n // finished.\n this.eventEndCheck = true\n continue\n }\n\n this.pos++\n }\n\n callback()\n }\n\n /**\n * @param {Buffer} line\n * @param {EventStreamEvent} event\n */\n parseLine (line, event) {\n // If the line is empty (a blank line)\n // Dispatch the event, as defined below.\n // This will be handled in the _transform method\n if (line.length === 0) {\n return\n }\n\n // If the line starts with a U+003A COLON character (:)\n // Ignore the line.\n const colonPosition = line.indexOf(COLON)\n if (colonPosition === 0) {\n return\n }\n\n let field = ''\n let value = ''\n\n // If the line contains a U+003A COLON character (:)\n if (colonPosition !== -1) {\n // Collect the characters on the line before the first U+003A COLON\n // character (:), and let field be that string.\n // TODO: Investigate if there is a more performant way to extract the\n // field\n // see: https://github.com/nodejs/undici/issues/2630\n field = line.subarray(0, colonPosition).toString('utf8')\n\n // Collect the characters on the line after the first U+003A COLON\n // character (:), and let value be that string.\n // If value starts with a U+0020 SPACE character, remove it from value.\n let valueStart = colonPosition + 1\n if (line[valueStart] === SPACE) {\n ++valueStart\n }\n // TODO: Investigate if there is a more performant way to extract the\n // value\n // see: https://github.com/nodejs/undici/issues/2630\n value = line.subarray(valueStart).toString('utf8')\n\n // Otherwise, the string is not empty but does not contain a U+003A COLON\n // character (:)\n } else {\n // Process the field using the steps described below, using the whole\n // line as the field name, and the empty string as the field value.\n field = line.toString('utf8')\n value = ''\n }\n\n // Modify the event with the field name and value. The value is also\n // decoded as UTF-8\n switch (field) {\n case 'data':\n if (event[field] === undefined) {\n event[field] = value\n } else {\n event[field] += `\\n${value}`\n }\n break\n case 'retry':\n if (isASCIINumber(value)) {\n event[field] = value\n }\n break\n case 'id':\n if (isValidLastEventId(value)) {\n event[field] = value\n }\n break\n case 'event':\n if (value.length > 0) {\n event[field] = value\n }\n break\n }\n }\n\n /**\n * @param {EventSourceStreamEvent} event\n */\n processEvent (event) {\n if (event.retry && isASCIINumber(event.retry)) {\n this.state.reconnectionTime = parseInt(event.retry, 10)\n }\n\n if (event.id && isValidLastEventId(event.id)) {\n this.state.lastEventId = event.id\n }\n\n // only dispatch event, when data is provided\n if (event.data !== undefined) {\n this.push({\n type: event.event || 'message',\n options: {\n data: event.data,\n lastEventId: this.state.lastEventId,\n origin: this.state.origin\n }\n })\n }\n }\n\n clearEvent () {\n this.event = {\n data: undefined,\n event: undefined,\n id: undefined,\n retry: undefined\n }\n }\n}\n\nmodule.exports = {\n EventSourceStream\n}\n", "'use strict'\n\nconst { pipeline } = require('node:stream')\nconst { fetching } = require('../fetch')\nconst { makeRequest } = require('../fetch/request')\nconst { webidl } = require('../fetch/webidl')\nconst { EventSourceStream } = require('./eventsource-stream')\nconst { parseMIMEType } = require('../fetch/data-url')\nconst { createFastMessageEvent } = require('../websocket/events')\nconst { isNetworkError } = require('../fetch/response')\nconst { delay } = require('./util')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { environmentSettingsObject } = require('../fetch/util')\n\nlet experimentalWarned = false\n\n/**\n * A reconnection time, in milliseconds. This must initially be an implementation-defined value,\n * probably in the region of a few seconds.\n *\n * In Comparison:\n * - Chrome uses 3000ms.\n * - Deno uses 5000ms.\n *\n * @type {3000}\n */\nconst defaultReconnectionTime = 3000\n\n/**\n * The readyState attribute represents the state of the connection.\n * @enum\n * @readonly\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev\n */\n\n/**\n * The connection has not yet been established, or it was closed and the user\n * agent is reconnecting.\n * @type {0}\n */\nconst CONNECTING = 0\n\n/**\n * The user agent has an open connection and is dispatching events as it\n * receives them.\n * @type {1}\n */\nconst OPEN = 1\n\n/**\n * The connection is not open, and the user agent is not trying to reconnect.\n * @type {2}\n */\nconst CLOSED = 2\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"same-origin\".\n * @type {'anonymous'}\n */\nconst ANONYMOUS = 'anonymous'\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"include\".\n * @type {'use-credentials'}\n */\nconst USE_CREDENTIALS = 'use-credentials'\n\n/**\n * The EventSource interface is used to receive server-sent events. It\n * connects to a server over HTTP and receives events in text/event-stream\n * format without closing the connection.\n * @extends {EventTarget}\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events\n * @api public\n */\nclass EventSource extends EventTarget {\n #events = {\n open: null,\n error: null,\n message: null\n }\n\n #url = null\n #withCredentials = false\n\n #readyState = CONNECTING\n\n #request = null\n #controller = null\n\n #dispatcher\n\n /**\n * @type {import('./eventsource-stream').eventSourceSettings}\n */\n #state\n\n /**\n * Creates a new EventSource object.\n * @param {string} url\n * @param {EventSourceInit} [eventSourceInitDict]\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface\n */\n constructor (url, eventSourceInitDict = {}) {\n // 1. Let ev be a new EventSource object.\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'EventSource constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n if (!experimentalWarned) {\n experimentalWarned = true\n process.emitWarning('EventSource is experimental, expect them to change at any time.', {\n code: 'UNDICI-ES'\n })\n }\n\n url = webidl.converters.USVString(url, prefix, 'url')\n eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict')\n\n this.#dispatcher = eventSourceInitDict.dispatcher\n this.#state = {\n lastEventId: '',\n reconnectionTime: defaultReconnectionTime\n }\n\n // 2. Let settings be ev's relevant settings object.\n // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object\n const settings = environmentSettingsObject\n\n let urlRecord\n\n try {\n // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings.\n urlRecord = new URL(url, settings.settingsObject.baseUrl)\n this.#state.origin = urlRecord.origin\n } catch (e) {\n // 4. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 5. Set ev's url to urlRecord.\n this.#url = urlRecord.href\n\n // 6. Let corsAttributeState be Anonymous.\n let corsAttributeState = ANONYMOUS\n\n // 7. If the value of eventSourceInitDict's withCredentials member is true,\n // then set corsAttributeState to Use Credentials and set ev's\n // withCredentials attribute to true.\n if (eventSourceInitDict.withCredentials) {\n corsAttributeState = USE_CREDENTIALS\n this.#withCredentials = true\n }\n\n // 8. Let request be the result of creating a potential-CORS request given\n // urlRecord, the empty string, and corsAttributeState.\n const initRequest = {\n redirect: 'follow',\n keepalive: true,\n // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes\n mode: 'cors',\n credentials: corsAttributeState === 'anonymous'\n ? 'same-origin'\n : 'omit',\n referrer: 'no-referrer'\n }\n\n // 9. Set request's client to settings.\n initRequest.client = environmentSettingsObject.settingsObject\n\n // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list.\n initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]]\n\n // 11. Set request's cache mode to \"no-store\".\n initRequest.cache = 'no-store'\n\n // 12. Set request's initiator type to \"other\".\n initRequest.initiator = 'other'\n\n initRequest.urlList = [new URL(this.#url)]\n\n // 13. Set ev's request to request.\n this.#request = makeRequest(initRequest)\n\n this.#connect()\n }\n\n /**\n * Returns the state of this EventSource object's connection. It can have the\n * values described below.\n * @returns {0|1|2}\n * @readonly\n */\n get readyState () {\n return this.#readyState\n }\n\n /**\n * Returns the URL providing the event stream.\n * @readonly\n * @returns {string}\n */\n get url () {\n return this.#url\n }\n\n /**\n * Returns a boolean indicating whether the EventSource object was\n * instantiated with CORS credentials set (true), or not (false, the default).\n */\n get withCredentials () {\n return this.#withCredentials\n }\n\n #connect () {\n if (this.#readyState === CLOSED) return\n\n this.#readyState = CONNECTING\n\n const fetchParams = {\n request: this.#request,\n dispatcher: this.#dispatcher\n }\n\n // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection.\n const processEventSourceEndOfBody = (response) => {\n if (isNetworkError(response)) {\n this.dispatchEvent(new Event('error'))\n this.close()\n }\n\n this.#reconnect()\n }\n\n // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody...\n fetchParams.processResponseEndOfBody = processEventSourceEndOfBody\n\n // and processResponse set to the following steps given response res:\n fetchParams.processResponse = (response) => {\n // 1. If res is an aborted network error, then fail the connection.\n\n if (isNetworkError(response)) {\n // 1. When a user agent is to fail the connection, the user agent\n // must queue a task which, if the readyState attribute is set to a\n // value other than CLOSED, sets the readyState attribute to CLOSED\n // and fires an event named error at the EventSource object. Once the\n // user agent has failed the connection, it does not attempt to\n // reconnect.\n if (response.aborted) {\n this.close()\n this.dispatchEvent(new Event('error'))\n return\n // 2. Otherwise, if res is a network error, then reestablish the\n // connection, unless the user agent knows that to be futile, in\n // which case the user agent may fail the connection.\n } else {\n this.#reconnect()\n return\n }\n }\n\n // 3. Otherwise, if res's status is not 200, or if res's `Content-Type`\n // is not `text/event-stream`, then fail the connection.\n const contentType = response.headersList.get('content-type', true)\n const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure'\n const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream'\n if (\n response.status !== 200 ||\n contentTypeValid === false\n ) {\n this.close()\n this.dispatchEvent(new Event('error'))\n return\n }\n\n // 4. Otherwise, announce the connection and interpret res's body\n // line by line.\n\n // When a user agent is to announce the connection, the user agent\n // must queue a task which, if the readyState attribute is set to a\n // value other than CLOSED, sets the readyState attribute to OPEN\n // and fires an event named open at the EventSource object.\n // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n this.#readyState = OPEN\n this.dispatchEvent(new Event('open'))\n\n // If redirected to a different origin, set the origin to the new origin.\n this.#state.origin = response.urlList[response.urlList.length - 1].origin\n\n const eventSourceStream = new EventSourceStream({\n eventSourceSettings: this.#state,\n push: (event) => {\n this.dispatchEvent(createFastMessageEvent(\n event.type,\n event.options\n ))\n }\n })\n\n pipeline(response.body.stream,\n eventSourceStream,\n (error) => {\n if (\n error?.aborted === false\n ) {\n this.close()\n this.dispatchEvent(new Event('error'))\n }\n })\n }\n\n this.#controller = fetching(fetchParams)\n }\n\n /**\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n * @returns {Promise}\n */\n async #reconnect () {\n // When a user agent is to reestablish the connection, the user agent must\n // run the following steps. These steps are run in parallel, not as part of\n // a task. (The tasks that it queues, of course, are run like normal tasks\n // and not themselves in parallel.)\n\n // 1. Queue a task to run the following steps:\n\n // 1. If the readyState attribute is set to CLOSED, abort the task.\n if (this.#readyState === CLOSED) return\n\n // 2. Set the readyState attribute to CONNECTING.\n this.#readyState = CONNECTING\n\n // 3. Fire an event named error at the EventSource object.\n this.dispatchEvent(new Event('error'))\n\n // 2. Wait a delay equal to the reconnection time of the event source.\n await delay(this.#state.reconnectionTime)\n\n // 5. Queue a task to run the following steps:\n\n // 1. If the EventSource object's readyState attribute is not set to\n // CONNECTING, then return.\n if (this.#readyState !== CONNECTING) return\n\n // 2. Let request be the EventSource object's request.\n // 3. If the EventSource object's last event ID string is not the empty\n // string, then:\n // 1. Let lastEventIDValue be the EventSource object's last event ID\n // string, encoded as UTF-8.\n // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header\n // list.\n if (this.#state.lastEventId.length) {\n this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)\n }\n\n // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.\n this.#connect()\n }\n\n /**\n * Closes the connection, if any, and sets the readyState attribute to\n * CLOSED.\n */\n close () {\n webidl.brandCheck(this, EventSource)\n\n if (this.#readyState === CLOSED) return\n this.#readyState = CLOSED\n this.#controller.abort()\n this.#request = null\n }\n\n get onopen () {\n return this.#events.open\n }\n\n set onopen (fn) {\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n if (typeof fn === 'function') {\n this.#events.open = fn\n this.addEventListener('open', fn)\n } else {\n this.#events.open = null\n }\n }\n\n get onmessage () {\n return this.#events.message\n }\n\n set onmessage (fn) {\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n if (typeof fn === 'function') {\n this.#events.message = fn\n this.addEventListener('message', fn)\n } else {\n this.#events.message = null\n }\n }\n\n get onerror () {\n return this.#events.error\n }\n\n set onerror (fn) {\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n if (typeof fn === 'function') {\n this.#events.error = fn\n this.addEventListener('error', fn)\n } else {\n this.#events.error = null\n }\n }\n}\n\nconst constantsPropertyDescriptors = {\n CONNECTING: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: CONNECTING,\n writable: false\n },\n OPEN: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: OPEN,\n writable: false\n },\n CLOSED: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: CLOSED,\n writable: false\n }\n}\n\nObject.defineProperties(EventSource, constantsPropertyDescriptors)\nObject.defineProperties(EventSource.prototype, constantsPropertyDescriptors)\n\nObject.defineProperties(EventSource.prototype, {\n close: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n onopen: kEnumerableProperty,\n readyState: kEnumerableProperty,\n url: kEnumerableProperty,\n withCredentials: kEnumerableProperty\n})\n\nwebidl.converters.EventSourceInitDict = webidl.dictionaryConverter([\n {\n key: 'withCredentials',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'dispatcher', // undici only\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = {\n EventSource,\n defaultReconnectionTime\n}\n", "'use strict'\n\nconst Client = require('./lib/dispatcher/client')\nconst Dispatcher = require('./lib/dispatcher/dispatcher')\nconst Pool = require('./lib/dispatcher/pool')\nconst BalancedPool = require('./lib/dispatcher/balanced-pool')\nconst Agent = require('./lib/dispatcher/agent')\nconst ProxyAgent = require('./lib/dispatcher/proxy-agent')\nconst EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent')\nconst RetryAgent = require('./lib/dispatcher/retry-agent')\nconst errors = require('./lib/core/errors')\nconst util = require('./lib/core/util')\nconst { InvalidArgumentError } = errors\nconst api = require('./lib/api')\nconst buildConnector = require('./lib/core/connect')\nconst MockClient = require('./lib/mock/mock-client')\nconst MockAgent = require('./lib/mock/mock-agent')\nconst MockPool = require('./lib/mock/mock-pool')\nconst mockErrors = require('./lib/mock/mock-errors')\nconst RetryHandler = require('./lib/handler/retry-handler')\nconst { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')\nconst DecoratorHandler = require('./lib/handler/decorator-handler')\nconst RedirectHandler = require('./lib/handler/redirect-handler')\nconst createRedirectInterceptor = require('./lib/interceptor/redirect-interceptor')\n\nObject.assign(Dispatcher.prototype, api)\n\nmodule.exports.Dispatcher = Dispatcher\nmodule.exports.Client = Client\nmodule.exports.Pool = Pool\nmodule.exports.BalancedPool = BalancedPool\nmodule.exports.Agent = Agent\nmodule.exports.ProxyAgent = ProxyAgent\nmodule.exports.EnvHttpProxyAgent = EnvHttpProxyAgent\nmodule.exports.RetryAgent = RetryAgent\nmodule.exports.RetryHandler = RetryHandler\n\nmodule.exports.DecoratorHandler = DecoratorHandler\nmodule.exports.RedirectHandler = RedirectHandler\nmodule.exports.createRedirectInterceptor = createRedirectInterceptor\nmodule.exports.interceptors = {\n redirect: require('./lib/interceptor/redirect'),\n retry: require('./lib/interceptor/retry'),\n dump: require('./lib/interceptor/dump'),\n dns: require('./lib/interceptor/dns')\n}\n\nmodule.exports.buildConnector = buildConnector\nmodule.exports.errors = errors\nmodule.exports.util = {\n parseHeaders: util.parseHeaders,\n headerNameToString: util.headerNameToString\n}\n\nfunction makeDispatcher (fn) {\n return (url, opts, handler) => {\n if (typeof opts === 'function') {\n handler = opts\n opts = null\n }\n\n if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) {\n throw new InvalidArgumentError('invalid url')\n }\n\n if (opts != null && typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (opts && opts.path != null) {\n if (typeof opts.path !== 'string') {\n throw new InvalidArgumentError('invalid opts.path')\n }\n\n let path = opts.path\n if (!opts.path.startsWith('/')) {\n path = `/${path}`\n }\n\n url = new URL(util.parseOrigin(url).origin + path)\n } else {\n if (!opts) {\n opts = typeof url === 'object' ? url : {}\n }\n\n url = util.parseURL(url)\n }\n\n const { agent, dispatcher = getGlobalDispatcher() } = opts\n\n if (agent) {\n throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')\n }\n\n return fn.call(dispatcher, {\n ...opts,\n origin: url.origin,\n path: url.search ? `${url.pathname}${url.search}` : url.pathname,\n method: opts.method || (opts.body ? 'PUT' : 'GET')\n }, handler)\n }\n}\n\nmodule.exports.setGlobalDispatcher = setGlobalDispatcher\nmodule.exports.getGlobalDispatcher = getGlobalDispatcher\n\nconst fetchImpl = require('./lib/web/fetch').fetch\nmodule.exports.fetch = async function fetch (init, options = undefined) {\n try {\n return await fetchImpl(init, options)\n } catch (err) {\n if (err && typeof err === 'object') {\n Error.captureStackTrace(err)\n }\n\n throw err\n }\n}\nmodule.exports.Headers = require('./lib/web/fetch/headers').Headers\nmodule.exports.Response = require('./lib/web/fetch/response').Response\nmodule.exports.Request = require('./lib/web/fetch/request').Request\nmodule.exports.FormData = require('./lib/web/fetch/formdata').FormData\nmodule.exports.File = globalThis.File ?? require('node:buffer').File\nmodule.exports.FileReader = require('./lib/web/fileapi/filereader').FileReader\n\nconst { setGlobalOrigin, getGlobalOrigin } = require('./lib/web/fetch/global')\n\nmodule.exports.setGlobalOrigin = setGlobalOrigin\nmodule.exports.getGlobalOrigin = getGlobalOrigin\n\nconst { CacheStorage } = require('./lib/web/cache/cachestorage')\nconst { kConstruct } = require('./lib/web/cache/symbols')\n\n// Cache & CacheStorage are tightly coupled with fetch. Even if it may run\n// in an older version of Node, it doesn't have any use without fetch.\nmodule.exports.caches = new CacheStorage(kConstruct)\n\nconst { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/web/cookies')\n\nmodule.exports.deleteCookie = deleteCookie\nmodule.exports.getCookies = getCookies\nmodule.exports.getSetCookies = getSetCookies\nmodule.exports.setCookie = setCookie\n\nconst { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/data-url')\n\nmodule.exports.parseMIMEType = parseMIMEType\nmodule.exports.serializeAMimeType = serializeAMimeType\n\nconst { CloseEvent, ErrorEvent, MessageEvent } = require('./lib/web/websocket/events')\nmodule.exports.WebSocket = require('./lib/web/websocket/websocket').WebSocket\nmodule.exports.CloseEvent = CloseEvent\nmodule.exports.ErrorEvent = ErrorEvent\nmodule.exports.MessageEvent = MessageEvent\n\nmodule.exports.request = makeDispatcher(api.request)\nmodule.exports.stream = makeDispatcher(api.stream)\nmodule.exports.pipeline = makeDispatcher(api.pipeline)\nmodule.exports.connect = makeDispatcher(api.connect)\nmodule.exports.upgrade = makeDispatcher(api.upgrade)\n\nmodule.exports.MockClient = MockClient\nmodule.exports.MockPool = MockPool\nmodule.exports.MockAgent = MockAgent\nmodule.exports.mockErrors = mockErrors\n\nconst { EventSource } = require('./lib/web/eventsource/eventsource')\n\nmodule.exports.EventSource = EventSource\n", "'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numberic identifiers include numberic identifiers but can be longer.\n// Therefore non-numberic identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a === b ? 0 : a < b ? -1 : 1\n }\n\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n if (this.major < other.major) {\n return -1\n }\n if (this.major > other.major) {\n return 1\n }\n if (this.minor < other.minor) {\n return -1\n }\n if (this.minor > other.minor) {\n return 1\n }\n if (this.patch < other.patch) {\n return -1\n }\n if (this.patch > other.patch) {\n return 1\n }\n return 0\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n", "'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n", "'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n comp = comp.replace(re[t.BUILD], '')\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", "module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n", "'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n", "var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str, options) {\n if (!str)\n return [];\n\n options = options || {};\n var max = options.max == null ? Infinity : options.max;\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), max, true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, max, isTop) {\n var expansions = [];\n\n // The `{a},b}` rewrite below restarts expansion on a rewritten string with\n // the same `max` and `isTop = true`. Loop instead of recursing so a long run\n // of non-expanding `{}` groups can't exhaust the call stack.\n for (;;) {\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n isTop = true\n continue\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], max, false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, max, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, max, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.max(Math.abs(numeric(n[2])), 1)\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y) && N.length < max; i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, max, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length && expansions.length < max; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n }\n}\n", "module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = (function () { try { return require('path') } catch (e) {}}()) || {\n sep: '/'\n}\nminimatch.sep = path.sep\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n b = b || {}\n var t = {}\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n m.Minimatch.defaults = function defaults (options) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n\n m.filter = function filter (pattern, options) {\n return orig.filter(pattern, ext(def, options))\n }\n\n m.defaults = function defaults (options) {\n return orig.defaults(ext(def, options))\n }\n\n m.makeRe = function makeRe (pattern, options) {\n return orig.makeRe(pattern, ext(def, options))\n }\n\n m.braceExpand = function braceExpand (pattern, options) {\n return orig.braceExpand(pattern, ext(def, options))\n }\n\n m.match = function (list, pattern, options) {\n return orig.match(list, pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (!options.allowWindowsEscape && path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined\n ? options.maxGlobstarRecursion : 200\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nvar MAX_PATTERN_LENGTH = 1024 * 64\nvar assertValidPattern = function (pattern) {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n var options = this.options\n\n // shortcuts\n if (pattern === '**') {\n if (!options.noglobstar)\n return GLOBSTAR\n else\n pattern = '*'\n }\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n /* istanbul ignore next */\n case '/': {\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // coalesce consecutive non-globstar * characters\n if (c === '*' && stateChar === '*') continue\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '[': case '.': case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = function match (f, partial) {\n if (typeof partial === 'undefined') partial = this.partial\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n if (pattern.indexOf(GLOBSTAR) !== -1) {\n return this._matchGlobstar(file, pattern, partial, 0, 0)\n }\n return this._matchOne(file, pattern, partial, 0, 0)\n}\n\nMinimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) {\n var i\n\n // find first globstar from patternIndex\n var firstgs = -1\n for (i = patternIndex; i < pattern.length; i++) {\n if (pattern[i] === GLOBSTAR) { firstgs = i; break }\n }\n\n // find last globstar\n var lastgs = -1\n for (i = pattern.length - 1; i >= 0; i--) {\n if (pattern[i] === GLOBSTAR) { lastgs = i; break }\n }\n\n var head = pattern.slice(patternIndex, firstgs)\n var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs)\n var tail = partial ? [] : pattern.slice(lastgs + 1)\n\n // check the head\n if (head.length) {\n var fileHead = file.slice(fileIndex, fileIndex + head.length)\n if (!this._matchOne(fileHead, head, partial, 0, 0)) {\n return false\n }\n fileIndex += head.length\n }\n\n // check the tail\n var fileTailMatch = 0\n if (tail.length) {\n if (tail.length + fileIndex > file.length) return false\n\n var tailStart = file.length - tail.length\n if (this._matchOne(file, tail, partial, tailStart, 0)) {\n fileTailMatch = tail.length\n } else {\n // affordance for stuff like a/**/* matching a/b/\n if (file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length) {\n return false\n }\n tailStart--\n if (!this._matchOne(file, tail, partial, tailStart, 0)) {\n return false\n }\n fileTailMatch = tail.length + 1\n }\n }\n\n // if body is empty (single ** between head and tail)\n if (!body.length) {\n var sawSome = !!fileTailMatch\n for (i = fileIndex; i < file.length - fileTailMatch; i++) {\n var f = String(file[i])\n sawSome = true\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n }\n return partial || sawSome\n }\n\n // split body into segments at each GLOBSTAR\n var bodySegments = [[[], 0]]\n var currentBody = bodySegments[0]\n var nonGsParts = 0\n var nonGsPartsSums = [0]\n for (var bi = 0; bi < body.length; bi++) {\n var b = body[bi]\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts)\n currentBody = [[], 0]\n bodySegments.push(currentBody)\n } else {\n currentBody[0].push(b)\n nonGsParts++\n }\n }\n\n var idx = bodySegments.length - 1\n var fileLength = file.length - fileTailMatch\n for (var si = 0; si < bodySegments.length; si++) {\n bodySegments[si][1] = fileLength -\n (nonGsPartsSums[idx--] + bodySegments[si][0].length)\n }\n\n return !!this._matchGlobStarBodySections(\n file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch\n )\n}\n\n// return false for \"nope, not matching\"\n// return null for \"not matching, cannot keep trying\"\nMinimatch.prototype._matchGlobStarBodySections = function (\n file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail\n) {\n var bs = bodySegments[bodyIndex]\n if (!bs) {\n // just make sure there are no bad dots\n for (var i = fileIndex; i < file.length; i++) {\n sawTail = true\n var f = file[i]\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n }\n return sawTail\n }\n\n var body = bs[0]\n var after = bs[1]\n while (fileIndex <= after) {\n var m = this._matchOne(\n file.slice(0, fileIndex + body.length),\n body,\n partial,\n fileIndex,\n 0\n )\n // if limit exceeded, no match. intentional false negative,\n // acceptable break in correctness for security.\n if (m && globStarDepth < this.maxGlobstarRecursion) {\n var sub = this._matchGlobStarBodySections(\n file, bodySegments,\n fileIndex + body.length, bodyIndex + 1,\n partial, globStarDepth + 1, sawTail\n )\n if (sub !== false) {\n return sub\n }\n }\n var f = file[fileIndex]\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n fileIndex++\n }\n return partial || null\n}\n\nMinimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) {\n var fi, pi, fl, pl\n for (\n fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++\n ) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false || p === GLOBSTAR) return false\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n", "'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numeric identifiers include numeric identifiers but can be longer.\n// Therefore non-numeric identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifier, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a === b ? 0 : a < b ? -1 : 1\n }\n\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n if (this.major < other.major) {\n return -1\n }\n if (this.major > other.major) {\n return 1\n }\n if (this.minor < other.minor) {\n return -1\n }\n if (this.minor > other.minor) {\n return 1\n }\n if (this.patch < other.patch) {\n return -1\n }\n if (this.patch > other.patch) {\n return 1\n }\n return 0\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n", "'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are prereleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\n\nconst parse = require('./parse')\nconst constants = require('../internal/constants')\nconst SemVer = require('../classes/semver')\n\nconst truncate = (version, truncation, options) => {\n if (!constants.RELEASE_TYPES.includes(truncation)) {\n return null\n }\n\n const clonedVersion = cloneInputVersion(version, options)\n return clonedVersion && doTruncation(clonedVersion, truncation)\n}\n\nconst cloneInputVersion = (version, options) => {\n const versionStringToParse = (\n version instanceof SemVer ? version.version : version\n )\n\n return parse(versionStringToParse, options)\n}\n\nconst doTruncation = (version, truncation) => {\n if (isPrerelease(truncation)) {\n return version.version\n }\n\n version.prerelease = []\n\n switch (truncation) {\n case 'major':\n version.minor = 0\n version.patch = 0\n break\n case 'minor':\n version.patch = 0\n break\n }\n\n return version.format()\n}\n\nconst isPrerelease = (type) => {\n return type.startsWith('pre')\n}\n\nmodule.exports = truncate\n", "'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n", "'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // strip build metadata so it can't bleed into the version\n range = range.replace(BUILDSTRIPRE, '')\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n src,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\n// unbounded global build-metadata stripper used by parseRange\nconst BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n comp = comp.replace(re[t.BUILD], '')\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If LT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !c.test(gt.semver)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !c.test(lt.semver)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst truncate = require('./functions/truncate')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n truncate,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", "/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", "'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n", "'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n", "/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n", "/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n", null, null, null, null, null, null, null, "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * @internal\n *\n * Holds the singleton instrumenter, to be shared across CJS and ESM imports.\n */\nexport const state = {\n instrumenterImplementation: undefined,\n};\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Holds the singleton operationRequestMap, to be shared across CJS and ESM imports.\n */\nexport const state = {\n operationRequestMap: new WeakMap(),\n};\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { EOL } from \"os\";\nimport util from \"util\";\n\nexport function log(message: unknown, ...args: any[]): void {\n process.stderr.write(`${util.format(message, ...args)}${EOL}`);\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { log } from \"./log\";\n\n/**\n * A simple mechanism for enabling logging.\n * Intended to mimic the publicly available `debug` package.\n */\nexport interface Debug {\n /**\n * Creates a new logger with the given namespace.\n */\n (namespace: string): Debugger;\n /**\n * The default log method (defaults to console)\n */\n log: (...args: any[]) => void;\n /**\n * Enables a particular set of namespaces.\n * To enable multiple separate them with commas, e.g. \"info,debug\".\n * Supports wildcards, e.g. \"azure:*\"\n * Supports skip syntax, e.g. \"azure:*,-azure:storage:*\" will enable\n * everything under azure except for things under azure:storage.\n */\n enable: (namespaces: string) => void;\n /**\n * Checks if a particular namespace is enabled.\n */\n enabled: (namespace: string) => boolean;\n /**\n * Disables all logging, returns what was previously enabled.\n */\n disable: () => string;\n}\n\n/**\n * A log function that can be dynamically enabled and redirected.\n */\nexport interface Debugger {\n /**\n * Logs the given arguments to the `log` method.\n */\n (...args: any[]): void;\n /**\n * True if this logger is active and logging.\n */\n enabled: boolean;\n /**\n * Used to cleanup/remove this logger.\n */\n destroy: () => boolean;\n /**\n * The current log method. Can be overridden to redirect output.\n */\n log: (...args: any[]) => void;\n /**\n * The namespace of this logger.\n */\n namespace: string;\n /**\n * Extends this logger with a child namespace.\n * Namespaces are separated with a ':' character.\n */\n extend: (namespace: string) => Debugger;\n}\n\nconst debugEnvVariable =\n (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\n\nlet enabledString: string | undefined;\nlet enabledNamespaces: RegExp[] = [];\nlet skippedNamespaces: RegExp[] = [];\nconst debuggers: Debugger[] = [];\n\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\n\nconst debugObj: Debug = Object.assign(\n (namespace: string): Debugger => {\n return createDebugger(namespace);\n },\n {\n enable,\n enabled,\n disable,\n log,\n }\n);\n\nfunction enable(namespaces: string): void {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n } else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\n\nfunction enabled(namespace: string): boolean {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\n\nfunction disable(): string {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\n\nfunction createDebugger(namespace: string): Debugger {\n const newDebugger: Debugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend,\n });\n\n function debug(...args: any[]): void {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n\n debuggers.push(newDebugger);\n\n return newDebugger;\n}\n\nfunction destroy(this: Debugger): boolean {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\n\nfunction extend(this: Debugger, namespace: string): Debugger {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\n\nexport default debugObj;\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport debug, { Debugger } from \"./debug\";\nexport { Debugger } from \"./debug\";\n\nconst registeredLoggers = new Set();\nconst logLevelFromEnv =\n (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\n\nlet azureLogLevel: AzureLogLevel | undefined;\n\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger: AzureClientLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\n\n/**\n * The log levels supported by the logger.\n * The log levels in order of most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport type AzureLogLevel = \"verbose\" | \"info\" | \"warning\" | \"error\";\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\n\ntype AzureDebugger = Debugger & { level: AzureLogLevel };\n\n/**\n * An AzureClientLogger is a function that can log to an appropriate severity level.\n */\nexport type AzureClientLogger = Debugger;\n\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n } else {\n console.error(\n `AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\n \", \"\n )}.`\n );\n }\n}\n\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level?: AzureLogLevel): void {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(\n `Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`\n );\n }\n azureLogLevel = level;\n\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n\n debug.enable(enabledNamespaces.join(\",\"));\n}\n\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel(): AzureLogLevel | undefined {\n return azureLogLevel;\n}\n\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100,\n};\n\n/**\n * Defines the methods available on the SDK-facing logger.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport interface AzureLogger {\n /**\n * Used for failures the program is unlikely to recover from,\n * such as Out of Memory.\n */\n error: Debugger;\n /**\n * Used when a function fails to perform its intended task.\n * Usually this means the function will throw an exception.\n * Not used for self-healing events (e.g. automatic retry)\n */\n warning: Debugger;\n /**\n * Used when a function operates normally.\n */\n info: Debugger;\n /**\n * Used for detailed troubleshooting scenarios. This is\n * intended for use by developers / system administrators\n * for diagnosing specific failures.\n */\n verbose: Debugger;\n}\n\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nexport function createClientLogger(namespace: string): AzureLogger {\n const clientRootLogger: AzureClientLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\"),\n };\n}\n\nfunction patchLogMethod(parent: AzureClientLogger, child: AzureClientLogger | AzureDebugger): void {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\n\nfunction createLogger(parent: AzureClientLogger, level: AzureLogLevel): AzureDebugger {\n const logger: AzureDebugger = Object.assign(parent.extend(level), {\n level,\n });\n\n patchLogMethod(parent, logger);\n\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n\n registeredLoggers.add(logger);\n\n return logger;\n}\n\nfunction shouldEnable(logger: AzureDebugger): boolean {\n return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\n\nfunction isAzureLogLevel(logLevel: string): logLevel is AzureLogLevel {\n return AZURE_LOG_LEVELS.includes(logLevel as any);\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// \n\ntype AbortEventListener = (this: AbortSignalLike, ev?: any) => any;\n\nconst listenersMap = new WeakMap();\nconst abortedMap = new WeakMap();\n\n/**\n * Allows the request to be aborted upon firing of the \"abort\" event.\n * Compatible with the browser built-in AbortSignal and common polyfills.\n */\nexport interface AbortSignalLike {\n /**\n * Indicates if the signal has already been aborted.\n */\n readonly aborted: boolean;\n /**\n * Add new \"abort\" event listener, only support \"abort\" event.\n */\n addEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n */\n removeEventListener(\n type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any,\n options?: any\n ): void;\n}\n\n/**\n * An aborter instance implements AbortSignal interface, can abort HTTP requests.\n *\n * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled.\n * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation\n * cannot or will not ever be cancelled.\n *\n * @example\n * Abort without timeout\n * ```ts\n * await doAsyncWork(AbortSignal.none);\n * ```\n */\nexport class AbortSignal implements AbortSignalLike {\n constructor() {\n listenersMap.set(this, []);\n abortedMap.set(this, false);\n }\n\n /**\n * Status of whether aborted or not.\n *\n * @readonly\n */\n public get aborted(): boolean {\n if (!abortedMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n return abortedMap.get(this)!;\n }\n\n /**\n * Creates a new AbortSignal instance that will never be aborted.\n *\n * @readonly\n */\n public static get none(): AbortSignal {\n return new AbortSignal();\n }\n\n /**\n * onabort event listener.\n */\n public onabort: ((ev?: Event) => any) | null = null;\n\n /**\n * Added new \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be added\n */\n public addEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n listeners.push(listener);\n }\n\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be removed\n */\n public removeEventListener(\n // tslint:disable-next-line:variable-name\n _type: \"abort\",\n listener: (this: AbortSignalLike, ev: any) => any\n ): void {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n\n const listeners = listenersMap.get(this)!;\n\n const index = listeners.indexOf(listener);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n\n /**\n * Dispatches a synthetic event to the AbortSignal.\n */\n dispatchEvent(_event: Event): boolean {\n throw new Error(\n \"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\"\n );\n }\n}\n\n/**\n * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.\n * Will try to trigger abort event for all linked AbortSignal nodes.\n *\n * - If there is a timeout, the timer will be cancelled.\n * - If aborted is true, nothing will happen.\n *\n * @internal\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nexport function abortSignal(signal: AbortSignal): void {\n if (signal.aborted) {\n return;\n }\n\n if (signal.onabort) {\n signal.onabort.call(signal);\n }\n\n const listeners = listenersMap.get(signal)!;\n if (listeners) {\n // Create a copy of listeners so mutations to the array\n // (e.g. via removeListener calls) don't affect the listeners\n // we invoke.\n listeners.slice().forEach((listener) => {\n listener.call(signal, { type: \"abort\" });\n });\n }\n\n abortedMap.set(signal, true);\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignal, AbortSignalLike, abortSignal } from \"./AbortSignal\";\n\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message?: string) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * Abort an operation when another event fires\n * ```ts\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n * ```\n *\n * @example\n * Share aborter cross multiple operations in 30s\n * ```ts\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *```\n *\n * @example\n * Cascaded aborting\n * ```ts\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * ```\n */\nexport class AbortController {\n private _signal: AbortSignal;\n\n /**\n * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n */\n constructor(parentSignals?: AbortSignalLike[]);\n /**\n * @param parentSignals - The AbortSignals that will signal aborted on the AbortSignal associated with this controller.\n */\n constructor(...parentSignals: AbortSignalLike[]);\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(parentSignals?: any) {\n this._signal = new AbortSignal();\n\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n // eslint-disable-next-line prefer-rest-params\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n } else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n */\n public get signal(): AbortSignal {\n return this._signal;\n }\n\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n */\n abort(): void {\n abortSignal(this._signal);\n }\n\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n * @param ms - Elapsed time in milliseconds to trigger an abort.\n */\n public static timeout(ms: number): AbortSignal {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNode =\n typeof process !== \"undefined\" && Boolean(process.version) && Boolean(process.versions?.node);\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError, AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Options for the createAbortablePromise function.\n */\nexport interface CreateAbortablePromiseOptions {\n /** A function to be called if the promise was aborted */\n cleanupBeforeAbort?: () => void;\n /** An abort signal */\n abortSignal?: AbortSignalLike;\n /** An abort error message */\n abortErrorMsg?: string;\n}\n\n/**\n * Creates an abortable promise.\n * @param buildPromise - A function that takes the resolve and reject functions as parameters.\n * @param options - The options for the abortable promise.\n * @returns A promise that can be aborted.\n */\nexport function createAbortablePromise(\n buildPromise: (\n resolve: (value: T | PromiseLike) => void,\n reject: (reason?: any) => void\n ) => void,\n options?: CreateAbortablePromiseOptions\n): Promise {\n const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {};\n return new Promise((resolve, reject) => {\n function rejectOnAbort(): void {\n reject(new AbortError(abortErrorMsg ?? \"The operation was aborted.\"));\n }\n function removeListeners(): void {\n abortSignal?.removeEventListener(\"abort\", onAbort);\n }\n function onAbort(): void {\n cleanupBeforeAbort?.();\n removeListeners();\n rejectOnAbort();\n }\n if (abortSignal?.aborted) {\n return rejectOnAbort();\n }\n try {\n buildPromise(\n (x) => {\n removeListeners();\n resolve(x);\n },\n (x) => {\n removeListeners();\n reject(x);\n }\n );\n } catch (err) {\n reject(err);\n }\n abortSignal?.addEventListener(\"abort\", onAbort);\n });\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { createAbortablePromise } from \"./createAbortablePromise\";\n\nconst StandardAbortMessage = \"The delay was aborted.\";\n\n/**\n * Options for support abort functionality for the delay method\n */\nexport interface DelayOptions {\n /**\n * The abortSignal associated with containing operation.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The abort error message associated with containing operation.\n */\n abortErrorMsg?: string;\n}\n\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs: number, options?: DelayOptions): Promise {\n let token: ReturnType;\n const { abortSignal, abortErrorMsg } = options ?? {};\n return createAbortablePromise(\n (resolve) => {\n token = setTimeout(resolve, timeInMs);\n },\n {\n cleanupBeforeAbort: () => clearTimeout(token),\n abortSignal,\n abortErrorMsg: abortErrorMsg ?? StandardAbortMessage,\n }\n );\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nexport function getRandomIntegerInclusive(min: number, max: number): number {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * A generic shape for a plain JS object.\n */\nexport type UnknownObject = { [s: string]: unknown };\n\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nexport function isObject(input: unknown): input is UnknownObject {\n return (\n typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date)\n );\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { isObject } from \"./object\";\n\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nexport function isError(e: unknown): e is Error {\n if (isObject(e)) {\n const hasName = typeof e.name === \"string\";\n const hasMessage = typeof e.message === \"string\";\n return hasName && hasMessage;\n }\n return false;\n}\n\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nexport function getErrorMessage(e: unknown): string {\n if (isError(e)) {\n return e.message;\n } else {\n let stringified: string;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n } else {\n stringified = String(e);\n }\n } catch (err: any) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createHash, createHmac } from \"crypto\";\n\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(\n key: string,\n stringToSign: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n const decodedKey = Buffer.from(key, \"base64\");\n\n return createHmac(\"sha256\", decodedKey).update(stringToSign).digest(encoding);\n}\n\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(\n content: string,\n encoding: \"base64\" | \"hex\"\n): Promise {\n return createHash(\"sha256\").update(content).digest(encoding);\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n */\nexport function isDefined(thing: T | undefined | null): thing is T {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n */\nexport function isObjectWithProperties(\n thing: Thing,\n properties: PropertyName[]\n): thing is Thing & Record {\n if (!isDefined(thing) || typeof thing !== \"object\") {\n return false;\n }\n\n for (const property of properties) {\n if (!objectHasProperty(thing, property)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n */\nexport function objectHasProperty(\n thing: Thing,\n property: PropertyName\n): thing is Thing & Record {\n return (\n isDefined(thing) && typeof thing === \"object\" && property in (thing as Record)\n );\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * NOTE: When moving this file, please update \"react-native\" section in package.json.\n */\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function generateUUID(): string {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n } else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += (randomNumber & 0x3) | 0x8;\n } else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return generateUUID();\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { randomUUID as v4RandomUUID } from \"crypto\";\nimport { generateUUID } from \"./uuidUtils.native\";\n\ninterface Crypto {\n randomUUID(): string;\n}\n\ndeclare const globalThis: {\n crypto: Crypto;\n};\n\n// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+.\nlet uuidFunction =\n typeof globalThis?.crypto?.randomUUID === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : v4RandomUUID;\n\n// Not defined in earlier versions of Node.js 14\nif (!uuidFunction) {\n uuidFunction = generateUUID;\n}\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return uuidFunction();\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The `@azure/logger` configuration for this package.\n * @internal\n */\nexport const logger = createClientLogger(\"core-lro\");\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * The default time interval to wait before sending the next polling request.\n */\nexport const POLL_INTERVAL_IN_MS = 2000;\n/**\n * The closed set of terminal states.\n */\nexport const terminalStates = [\"succeeded\", \"canceled\", \"failed\"];\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n LroError,\n InnerError,\n Operation,\n OperationStatus,\n RestorableOperationState,\n StateProxy,\n} from \"./models\";\nimport { logger } from \"../logger\";\nimport { terminalStates } from \"./constants\";\n\n/**\n * Deserializes the state\n */\nexport function deserializeState(\n serializedState: string\n): RestorableOperationState {\n try {\n return JSON.parse(serializedState).state;\n } catch (e) {\n throw new Error(`Unable to deserialize input state: ${serializedState}`);\n }\n}\n\nfunction setStateError(inputs: {\n state: TState;\n stateProxy: StateProxy;\n isOperationError: (error: Error) => boolean;\n}): (error: Error) => never {\n const { state, stateProxy, isOperationError } = inputs;\n return (error: Error) => {\n if (isOperationError(error)) {\n stateProxy.setError(state, error);\n stateProxy.setFailed(state);\n }\n throw error;\n };\n}\n\nfunction appendReadableErrorMessage(currentMessage: string, innerMessage: string): string {\n let message = currentMessage;\n if (message.slice(-1) !== \".\") {\n message = message + \".\";\n }\n return message + \" \" + innerMessage;\n}\n\nfunction simplifyError(err: LroError): {\n code: string;\n message: string;\n} {\n let message = err.message;\n let code = err.code;\n let curErr = err as InnerError;\n while (curErr.innererror) {\n curErr = curErr.innererror;\n code = curErr.code;\n message = appendReadableErrorMessage(message, curErr.message);\n }\n return {\n code,\n message,\n };\n}\n\nfunction processOperationStatus(result: {\n status: OperationStatus;\n response: TResponse;\n state: RestorableOperationState;\n stateProxy: StateProxy;\n processResult?: (result: TResponse, state: TState) => TResult;\n getError?: (response: TResponse) => LroError | undefined;\n isDone?: (lastResponse: TResponse, state: TState) => boolean;\n setErrorAsResult: boolean;\n}): void {\n const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } =\n result;\n switch (status) {\n case \"succeeded\": {\n stateProxy.setSucceeded(state);\n break;\n }\n case \"failed\": {\n const err = getError?.(response);\n let postfix = \"\";\n if (err) {\n const { code, message } = simplifyError(err);\n postfix = `. ${code}. ${message}`;\n }\n const errStr = `The long-running operation has failed${postfix}`;\n stateProxy.setError(state, new Error(errStr));\n stateProxy.setFailed(state);\n logger.warning(errStr);\n break;\n }\n case \"canceled\": {\n stateProxy.setCanceled(state);\n break;\n }\n }\n if (\n isDone?.(response, state) ||\n (isDone === undefined &&\n [\"succeeded\", \"canceled\"].concat(setErrorAsResult ? [] : [\"failed\"]).includes(status))\n ) {\n stateProxy.setResult(\n state,\n buildResult({\n response,\n state,\n processResult,\n })\n );\n }\n}\n\nfunction buildResult(inputs: {\n response: TResponse;\n state: TState;\n processResult?: (result: TResponse, state: TState) => TResult;\n}): TResult {\n const { processResult, response, state } = inputs;\n return processResult ? processResult(response, state) : (response as unknown as TResult);\n}\n\n/**\n * Initiates the long-running operation.\n */\nexport async function initOperation(inputs: {\n init: Operation[\"init\"];\n stateProxy: StateProxy;\n getOperationStatus: (inputs: {\n response: TResponse;\n state: RestorableOperationState;\n operationLocation?: string;\n }) => OperationStatus;\n processResult?: (result: TResponse, state: TState) => TResult;\n withOperationLocation?: (operationLocation: string, isUpdated: boolean) => void;\n setErrorAsResult: boolean;\n}): Promise> {\n const {\n init,\n stateProxy,\n processResult,\n getOperationStatus,\n withOperationLocation,\n setErrorAsResult,\n } = inputs;\n const { operationLocation, resourceLocation, metadata, response } = await init();\n if (operationLocation) withOperationLocation?.(operationLocation, false);\n const config = {\n metadata,\n operationLocation,\n resourceLocation,\n };\n logger.verbose(`LRO: Operation description:`, config);\n const state = stateProxy.initState(config);\n const status = getOperationStatus({ response, state, operationLocation });\n processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult });\n return state;\n}\n\nasync function pollOperationHelper(inputs: {\n poll: Operation[\"poll\"];\n stateProxy: StateProxy;\n state: RestorableOperationState;\n operationLocation: string;\n getOperationStatus: (\n response: TResponse,\n state: RestorableOperationState\n ) => OperationStatus;\n getResourceLocation: (\n response: TResponse,\n state: RestorableOperationState\n ) => string | undefined;\n isOperationError: (error: Error) => boolean;\n options?: TOptions;\n}): Promise<{\n status: OperationStatus;\n response: TResponse;\n}> {\n const {\n poll,\n state,\n stateProxy,\n operationLocation,\n getOperationStatus,\n getResourceLocation,\n isOperationError,\n options,\n } = inputs;\n const response = await poll(operationLocation, options).catch(\n setStateError({\n state,\n stateProxy,\n isOperationError,\n })\n );\n const status = getOperationStatus(response, state);\n logger.verbose(\n `LRO: Status:\\n\\tPolling from: ${\n state.config.operationLocation\n }\\n\\tOperation status: ${status}\\n\\tPolling status: ${\n terminalStates.includes(status) ? \"Stopped\" : \"Running\"\n }`\n );\n if (status === \"succeeded\") {\n const resourceLocation = getResourceLocation(response, state);\n if (resourceLocation !== undefined) {\n return {\n response: await poll(resourceLocation).catch(\n setStateError({ state, stateProxy, isOperationError })\n ),\n status,\n };\n }\n }\n return { response, status };\n}\n\n/** Polls the long-running operation. */\nexport async function pollOperation(inputs: {\n poll: Operation[\"poll\"];\n stateProxy: StateProxy;\n state: RestorableOperationState;\n getOperationStatus: (\n response: TResponse,\n state: RestorableOperationState\n ) => OperationStatus;\n getResourceLocation: (\n response: TResponse,\n state: RestorableOperationState\n ) => string | undefined;\n isOperationError: (error: Error) => boolean;\n getPollingInterval?: (response: TResponse) => number | undefined;\n setDelay: (intervalInMs: number) => void;\n getOperationLocation?: (\n response: TResponse,\n state: RestorableOperationState\n ) => string | undefined;\n withOperationLocation?: (operationLocation: string, isUpdated: boolean) => void;\n processResult?: (result: TResponse, state: TState) => TResult;\n getError?: (response: TResponse) => LroError | undefined;\n updateState?: (state: TState, lastResponse: TResponse) => void;\n isDone?: (lastResponse: TResponse, state: TState) => boolean;\n setErrorAsResult: boolean;\n options?: TOptions;\n}): Promise {\n const {\n poll,\n state,\n stateProxy,\n options,\n getOperationStatus,\n getResourceLocation,\n getOperationLocation,\n isOperationError,\n withOperationLocation,\n getPollingInterval,\n processResult,\n getError,\n updateState,\n setDelay,\n isDone,\n setErrorAsResult,\n } = inputs;\n const { operationLocation } = state.config;\n if (operationLocation !== undefined) {\n const { response, status } = await pollOperationHelper({\n poll,\n getOperationStatus,\n state,\n stateProxy,\n operationLocation,\n getResourceLocation,\n isOperationError,\n options,\n });\n processOperationStatus({\n status,\n response,\n state,\n stateProxy,\n isDone,\n processResult,\n getError,\n setErrorAsResult,\n });\n\n if (!terminalStates.includes(status)) {\n const intervalInMs = getPollingInterval?.(response);\n if (intervalInMs) setDelay(intervalInMs);\n const location = getOperationLocation?.(response, state);\n if (location !== undefined) {\n const isUpdated = operationLocation !== location;\n state.config.operationLocation = location;\n withOperationLocation?.(location, isUpdated);\n } else withOperationLocation?.(operationLocation, false);\n }\n updateState?.(state, response);\n }\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n HttpOperationMode,\n LongRunningOperation,\n LroResourceLocationConfig,\n LroResponse,\n RawResponse,\n ResponseBody,\n} from \"./models\";\nimport {\n LroError,\n OperationConfig,\n OperationStatus,\n RestorableOperationState,\n StateProxy,\n} from \"../poller/models\";\nimport { initOperation, pollOperation } from \"../poller/operation\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { logger } from \"../logger\";\n\nfunction getOperationLocationPollingUrl(inputs: {\n operationLocation?: string;\n azureAsyncOperation?: string;\n}): string | undefined {\n const { azureAsyncOperation, operationLocation } = inputs;\n return operationLocation ?? azureAsyncOperation;\n}\n\nfunction getLocationHeader(rawResponse: RawResponse): string | undefined {\n return rawResponse.headers[\"location\"];\n}\n\nfunction getOperationLocationHeader(rawResponse: RawResponse): string | undefined {\n return rawResponse.headers[\"operation-location\"];\n}\n\nfunction getAzureAsyncOperationHeader(rawResponse: RawResponse): string | undefined {\n return rawResponse.headers[\"azure-asyncoperation\"];\n}\n\nfunction findResourceLocation(inputs: {\n requestMethod?: string;\n location?: string;\n requestPath?: string;\n resourceLocationConfig?: LroResourceLocationConfig;\n}): string | undefined {\n const { location, requestMethod, requestPath, resourceLocationConfig } = inputs;\n switch (requestMethod) {\n case \"PUT\": {\n return requestPath;\n }\n case \"DELETE\": {\n return undefined;\n }\n default: {\n switch (resourceLocationConfig) {\n case \"azure-async-operation\": {\n return undefined;\n }\n case \"original-uri\": {\n return requestPath;\n }\n case \"location\":\n default: {\n return location;\n }\n }\n }\n }\n}\n\nexport function inferLroMode(inputs: {\n rawResponse: RawResponse;\n requestPath?: string;\n requestMethod?: string;\n resourceLocationConfig?: LroResourceLocationConfig;\n}): (OperationConfig & { mode: HttpOperationMode }) | undefined {\n const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs;\n const operationLocation = getOperationLocationHeader(rawResponse);\n const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse);\n const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation });\n const location = getLocationHeader(rawResponse);\n const normalizedRequestMethod = requestMethod?.toLocaleUpperCase();\n if (pollingUrl !== undefined) {\n return {\n mode: \"OperationLocation\",\n operationLocation: pollingUrl,\n resourceLocation: findResourceLocation({\n requestMethod: normalizedRequestMethod,\n location,\n requestPath,\n resourceLocationConfig,\n }),\n };\n } else if (location !== undefined) {\n return {\n mode: \"ResourceLocation\",\n operationLocation: location,\n };\n } else if (normalizedRequestMethod === \"PUT\" && requestPath) {\n return {\n mode: \"Body\",\n operationLocation: requestPath,\n };\n } else {\n return undefined;\n }\n}\n\nfunction transformStatus(inputs: { status: unknown; statusCode: number }): OperationStatus {\n const { status, statusCode } = inputs;\n if (typeof status !== \"string\" && status !== undefined) {\n throw new Error(\n `Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`\n );\n }\n switch (status?.toLocaleLowerCase()) {\n case undefined:\n return toOperationStatus(statusCode);\n case \"succeeded\":\n return \"succeeded\";\n case \"failed\":\n return \"failed\";\n case \"running\":\n case \"accepted\":\n case \"started\":\n case \"canceling\":\n case \"cancelling\":\n return \"running\";\n case \"canceled\":\n case \"cancelled\":\n return \"canceled\";\n default: {\n logger.verbose(`LRO: unrecognized operation status: ${status}`);\n return status as OperationStatus;\n }\n }\n}\n\nfunction getStatus(rawResponse: RawResponse): OperationStatus {\n const { status } = (rawResponse.body as ResponseBody) ?? {};\n return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\n\nfunction getProvisioningState(rawResponse: RawResponse): OperationStatus {\n const { properties, provisioningState } = (rawResponse.body as ResponseBody) ?? {};\n const status = properties?.provisioningState ?? provisioningState;\n return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\n\nfunction toOperationStatus(statusCode: number): OperationStatus {\n if (statusCode === 202) {\n return \"running\";\n } else if (statusCode < 300) {\n return \"succeeded\";\n } else {\n return \"failed\";\n }\n}\n\nexport function parseRetryAfter({ rawResponse }: LroResponse): number | undefined {\n const retryAfter: string | undefined = rawResponse.headers[\"retry-after\"];\n if (retryAfter !== undefined) {\n // Retry-After header value is either in HTTP date format, or in seconds\n const retryAfterInSeconds = parseInt(retryAfter);\n return isNaN(retryAfterInSeconds)\n ? calculatePollingIntervalFromDate(new Date(retryAfter))\n : retryAfterInSeconds * 1000;\n }\n return undefined;\n}\n\nexport function getErrorFromResponse(response: LroResponse): LroError | undefined {\n const error = (response.flatResponse as ResponseBody).error;\n if (!error) {\n logger.warning(\n `The long-running operation failed but there is no error property in the response's body`\n );\n return;\n }\n if (!error.code || !error.message) {\n logger.warning(\n `The long-running operation failed but the error property in the response's body doesn't contain code or message`\n );\n return;\n }\n return error as LroError;\n}\n\nfunction calculatePollingIntervalFromDate(retryAfterDate: Date): number | undefined {\n const timeNow = Math.floor(new Date().getTime());\n const retryAfterTime = retryAfterDate.getTime();\n if (timeNow < retryAfterTime) {\n return retryAfterTime - timeNow;\n }\n return undefined;\n}\n\nexport function getStatusFromInitialResponse(inputs: {\n response: LroResponse;\n state: RestorableOperationState;\n operationLocation?: string;\n}): OperationStatus {\n const { response, state, operationLocation } = inputs;\n function helper(): OperationStatus {\n const mode = state.config.metadata?.[\"mode\"];\n switch (mode) {\n case undefined:\n return toOperationStatus(response.rawResponse.statusCode);\n case \"Body\":\n return getOperationStatus(response, state);\n default:\n return \"running\";\n }\n }\n const status = helper();\n return status === \"running\" && operationLocation === undefined ? \"succeeded\" : status;\n}\n\n/**\n * Initiates the long-running operation.\n */\nexport async function initHttpOperation(inputs: {\n stateProxy: StateProxy;\n resourceLocationConfig?: LroResourceLocationConfig;\n processResult?: (result: unknown, state: TState) => TResult;\n setErrorAsResult: boolean;\n lro: LongRunningOperation;\n}): Promise> {\n const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs;\n return initOperation({\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return {\n response,\n operationLocation: config?.operationLocation,\n resourceLocation: config?.resourceLocation,\n ...(config?.mode ? { metadata: { mode: config.mode } } : {}),\n };\n },\n stateProxy,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse as TResult,\n getOperationStatus: getStatusFromInitialResponse,\n setErrorAsResult,\n });\n}\n\nexport function getOperationLocation(\n { rawResponse }: LroResponse,\n state: RestorableOperationState\n): string | undefined {\n const mode = state.config.metadata?.[\"mode\"];\n switch (mode) {\n case \"OperationLocation\": {\n return getOperationLocationPollingUrl({\n operationLocation: getOperationLocationHeader(rawResponse),\n azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse),\n });\n }\n case \"ResourceLocation\": {\n return getLocationHeader(rawResponse);\n }\n case \"Body\":\n default: {\n return undefined;\n }\n }\n}\n\nexport function getOperationStatus(\n { rawResponse }: LroResponse,\n state: RestorableOperationState\n): OperationStatus {\n const mode = state.config.metadata?.[\"mode\"];\n switch (mode) {\n case \"OperationLocation\": {\n return getStatus(rawResponse);\n }\n case \"ResourceLocation\": {\n return toOperationStatus(rawResponse.statusCode);\n }\n case \"Body\": {\n return getProvisioningState(rawResponse);\n }\n default:\n throw new Error(`Internal error: Unexpected operation mode: ${mode}`);\n }\n}\n\nexport function getResourceLocation(\n { flatResponse }: LroResponse,\n state: RestorableOperationState\n): string | undefined {\n if (typeof flatResponse === \"object\") {\n const resourceLocation = (flatResponse as { resourceLocation?: string }).resourceLocation;\n if (resourceLocation !== undefined) {\n state.config.resourceLocation = resourceLocation;\n }\n }\n return state.config.resourceLocation;\n}\n\nexport function isOperationError(e: Error): boolean {\n return e.name === \"RestError\";\n}\n\n/** Polls the long-running operation. */\nexport async function pollHttpOperation(inputs: {\n lro: LongRunningOperation;\n stateProxy: StateProxy;\n processResult?: (result: unknown, state: TState) => TResult;\n updateState?: (state: TState, lastResponse: LroResponse) => void;\n isDone?: (lastResponse: LroResponse, state: TState) => boolean;\n setDelay: (intervalInMs: number) => void;\n options?: { abortSignal?: AbortSignalLike };\n state: RestorableOperationState;\n setErrorAsResult: boolean;\n}): Promise {\n const {\n lro,\n stateProxy,\n options,\n processResult,\n updateState,\n setDelay,\n state,\n setErrorAsResult,\n } = inputs;\n return pollOperation({\n state,\n stateProxy,\n setDelay,\n processResult: processResult\n ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState)\n : ({ flatResponse }) => flatResponse as TResult,\n getError: getErrorFromResponse,\n updateState,\n getPollingInterval: parseRetryAfter,\n getOperationLocation,\n getOperationStatus,\n isOperationError,\n getResourceLocation,\n options,\n /**\n * The expansion here is intentional because `lro` could be an object that\n * references an inner this, so we need to preserve a reference to it.\n */\n poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions),\n setErrorAsResult,\n });\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortController, AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n BuildCreatePollerOptions,\n CreatePollerOptions,\n Operation,\n OperationState,\n RestorableOperationState,\n SimplePollerLike,\n StateProxy,\n} from \"./models\";\nimport { deserializeState, initOperation, pollOperation } from \"./operation\";\nimport { POLL_INTERVAL_IN_MS } from \"./constants\";\nimport { delay } from \"@azure/core-util\";\n\nconst createStateProxy: >() => StateProxy<\n TState,\n TResult\n> = () => ({\n /**\n * The state at this point is created to be of type OperationState.\n * It will be updated later to be of type TState when the\n * customer-provided callback, `updateState`, is called during polling.\n */\n initState: (config) => ({ status: \"running\", config } as any),\n setCanceled: (state) => (state.status = \"canceled\"),\n setError: (state, error) => (state.error = error),\n setResult: (state, result) => (state.result = result),\n setRunning: (state) => (state.status = \"running\"),\n setSucceeded: (state) => (state.status = \"succeeded\"),\n setFailed: (state) => (state.status = \"failed\"),\n\n getError: (state) => state.error,\n getResult: (state) => state.result,\n isCanceled: (state) => state.status === \"canceled\",\n isFailed: (state) => state.status === \"failed\",\n isRunning: (state) => state.status === \"running\",\n isSucceeded: (state) => state.status === \"succeeded\",\n});\n\n/**\n * Returns a poller factory.\n */\nexport function buildCreatePoller>(\n inputs: BuildCreatePollerOptions\n): (\n lro: Operation,\n options?: CreatePollerOptions\n) => Promise> {\n const {\n getOperationLocation,\n getStatusFromInitialResponse,\n getStatusFromPollResponse,\n isOperationError,\n getResourceLocation,\n getPollingInterval,\n getError,\n resolveOnUnsuccessful,\n } = inputs;\n return async (\n { init, poll }: Operation,\n options?: CreatePollerOptions\n ) => {\n const {\n processResult,\n updateState,\n withOperationLocation: withOperationLocationCallback,\n intervalInMs = POLL_INTERVAL_IN_MS,\n restoreFrom,\n } = options || {};\n const stateProxy = createStateProxy();\n const withOperationLocation = withOperationLocationCallback\n ? (() => {\n let called = false;\n return (operationLocation: string, isUpdated: boolean) => {\n if (isUpdated) withOperationLocationCallback(operationLocation);\n else if (!called) withOperationLocationCallback(operationLocation);\n called = true;\n };\n })()\n : undefined;\n const state: RestorableOperationState = restoreFrom\n ? deserializeState(restoreFrom)\n : await initOperation({\n init,\n stateProxy,\n processResult,\n getOperationStatus: getStatusFromInitialResponse,\n withOperationLocation,\n setErrorAsResult: !resolveOnUnsuccessful,\n });\n let resultPromise: Promise | undefined;\n const abortController = new AbortController();\n // Progress handlers\n type Handler = (state: TState) => void;\n const handlers = new Map();\n const handleProgressEvents = async (): Promise => handlers.forEach((h) => h(state));\n const cancelErrMsg = \"Operation was canceled\";\n let currentPollIntervalInMs = intervalInMs;\n\n const poller: SimplePollerLike = {\n getOperationState: () => state,\n getResult: () => state.result,\n isDone: () => [\"succeeded\", \"failed\", \"canceled\"].includes(state.status),\n isStopped: () => resultPromise === undefined,\n stopPolling: () => {\n abortController.abort();\n },\n toString: () =>\n JSON.stringify({\n state,\n }),\n onProgress: (callback: (state: TState) => void) => {\n const s = Symbol();\n handlers.set(s, callback);\n return () => handlers.delete(s);\n },\n pollUntilDone: (pollOptions?: { abortSignal?: AbortSignalLike }) =>\n (resultPromise ??= (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n const { signal: abortSignal } = inputAbortSignal\n ? new AbortController([inputAbortSignal, abortController.signal])\n : abortController;\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n await delay(currentPollIntervalInMs, { abortSignal });\n await poller.poll({ abortSignal });\n }\n }\n if (resolveOnUnsuccessful) {\n return poller.getResult() as TResult;\n } else {\n switch (state.status) {\n case \"succeeded\":\n return poller.getResult() as TResult;\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n case \"notStarted\":\n case \"running\":\n throw new Error(`Polling completed without succeeding or failing`);\n }\n }\n })().finally(() => {\n resultPromise = undefined;\n })),\n async poll(pollOptions?: { abortSignal?: AbortSignalLike }): Promise {\n if (resolveOnUnsuccessful) {\n if (poller.isDone()) return;\n } else {\n switch (state.status) {\n case \"succeeded\":\n return;\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n }\n }\n await pollOperation({\n poll,\n state,\n stateProxy,\n getOperationLocation,\n isOperationError,\n withOperationLocation,\n getPollingInterval,\n getOperationStatus: getStatusFromPollResponse,\n getResourceLocation,\n processResult,\n getError,\n updateState,\n options: pollOptions,\n setDelay: (pollIntervalInMs) => {\n currentPollIntervalInMs = pollIntervalInMs;\n },\n setErrorAsResult: !resolveOnUnsuccessful,\n });\n await handleProgressEvents();\n if (!resolveOnUnsuccessful) {\n switch (state.status) {\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n }\n }\n },\n };\n return poller;\n };\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { LongRunningOperation, LroResponse } from \"./models\";\nimport { OperationState, SimplePollerLike } from \"../poller/models\";\nimport {\n getErrorFromResponse,\n getOperationLocation,\n getOperationStatus,\n getResourceLocation,\n getStatusFromInitialResponse,\n inferLroMode,\n isOperationError,\n parseRetryAfter,\n} from \"./operation\";\nimport { CreateHttpPollerOptions } from \"./models\";\nimport { buildCreatePoller } from \"../poller/poller\";\n\n/**\n * Creates a poller that can be used to poll a long-running operation.\n * @param lro - Description of the long-running operation\n * @param options - options to configure the poller\n * @returns an initialized poller\n */\nexport async function createHttpPoller>(\n lro: LongRunningOperation,\n options?: CreateHttpPollerOptions\n): Promise> {\n const {\n resourceLocationConfig,\n intervalInMs,\n processResult,\n restoreFrom,\n updateState,\n withOperationLocation,\n resolveOnUnsuccessful = false,\n } = options || {};\n return buildCreatePoller({\n getStatusFromInitialResponse,\n getStatusFromPollResponse: getOperationStatus,\n isOperationError,\n getOperationLocation,\n getResourceLocation,\n getPollingInterval: parseRetryAfter,\n getError: getErrorFromResponse,\n resolveOnUnsuccessful,\n })(\n {\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return {\n response,\n operationLocation: config?.operationLocation,\n resourceLocation: config?.resourceLocation,\n ...(config?.mode ? { metadata: { mode: config.mode } } : {}),\n };\n },\n poll: lro.sendPollRequest,\n },\n {\n intervalInMs,\n withOperationLocation,\n restoreFrom,\n updateState,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse as TResult,\n }\n );\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { LongRunningOperation, LroResourceLocationConfig, RawResponse } from \"../../http/models\";\nimport { PollOperation, PollOperationState } from \"../pollOperation\";\nimport { RestorableOperationState, StateProxy } from \"../../poller/models\";\nimport { initHttpOperation, pollHttpOperation } from \"../../http/operation\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { PollerConfig } from \"./models\";\nimport { logger } from \"../../logger\";\n\nconst createStateProxy: >() => StateProxy<\n TState,\n TResult\n> = () => ({\n initState: (config) => ({ config, isStarted: true } as any),\n setCanceled: (state) => (state.isCancelled = true),\n setError: (state, error) => (state.error = error),\n setResult: (state, result) => (state.result = result),\n setRunning: (state) => (state.isStarted = true),\n setSucceeded: (state) => (state.isCompleted = true),\n setFailed: () => {\n /** empty body */\n },\n\n getError: (state) => state.error,\n getResult: (state) => state.result,\n isCanceled: (state) => !!state.isCancelled,\n isFailed: (state) => !!state.error,\n isRunning: (state) => !!state.isStarted,\n isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error),\n});\n\nexport class GenericPollOperation>\n implements PollOperation\n{\n private pollerConfig?: PollerConfig;\n\n constructor(\n public state: RestorableOperationState,\n private lro: LongRunningOperation,\n private setErrorAsResult: boolean,\n private lroResourceLocationConfig?: LroResourceLocationConfig,\n private processResult?: (result: unknown, state: TState) => TResult,\n private updateState?: (state: TState, lastResponse: RawResponse) => void,\n private isDone?: (lastResponse: TResult, state: TState) => boolean\n ) {}\n\n public setPollerConfig(pollerConfig: PollerConfig): void {\n this.pollerConfig = pollerConfig;\n }\n\n async update(options?: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: TState) => void;\n }): Promise> {\n const stateProxy = createStateProxy();\n if (!this.state.isStarted) {\n this.state = {\n ...this.state,\n ...(await initHttpOperation({\n lro: this.lro,\n stateProxy,\n resourceLocationConfig: this.lroResourceLocationConfig,\n processResult: this.processResult,\n setErrorAsResult: this.setErrorAsResult,\n })),\n };\n }\n const updateState = this.updateState;\n const isDone = this.isDone;\n\n if (!this.state.isCompleted && this.state.error === undefined) {\n await pollHttpOperation({\n lro: this.lro,\n state: this.state,\n stateProxy,\n processResult: this.processResult,\n updateState: updateState\n ? (state, { rawResponse }) => updateState(state, rawResponse)\n : undefined,\n isDone: isDone\n ? ({ flatResponse }, state) => isDone(flatResponse as TResult, state)\n : undefined,\n options,\n setDelay: (intervalInMs) => {\n this.pollerConfig!.intervalInMs = intervalInMs;\n },\n setErrorAsResult: this.setErrorAsResult,\n });\n }\n options?.fireProgress?.(this.state);\n return this;\n }\n\n async cancel(): Promise> {\n logger.error(\"`cancelOperation` is deprecated because it wasn't implemented\");\n return this;\n }\n\n /**\n * Serializes the Poller operation.\n */\n public toString(): string {\n return JSON.stringify({\n state: this.state,\n });\n }\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperation, PollOperationState } from \"./pollOperation\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { CancelOnProgress } from \"../poller/models\";\nimport { PollerLike } from \"./models\";\n\n/**\n * PollProgressCallback is the type of the callback functions sent to onProgress.\n * These functions will receive a TState that is defined by your implementation of\n * the Poller class.\n */\nexport type PollProgressCallback = (state: TState) => void;\n\n/**\n * When a poller is manually stopped through the `stopPolling` method,\n * the poller will be rejected with an instance of the PollerStoppedError.\n */\nexport class PollerStoppedError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"PollerStoppedError\";\n Object.setPrototypeOf(this, PollerStoppedError.prototype);\n }\n}\n\n/**\n * When the operation is cancelled, the poller will be rejected with an instance\n * of the PollerCancelledError.\n */\nexport class PollerCancelledError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"PollerCancelledError\";\n Object.setPrototypeOf(this, PollerCancelledError.prototype);\n }\n}\n\n/**\n * A class that represents the definition of a program that polls through consecutive requests\n * until it reaches a state of completion.\n *\n * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.\n * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.\n * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.\n *\n * ```ts\n * const poller = new MyPoller();\n *\n * // Polling just once:\n * await poller.poll();\n *\n * // We can try to cancel the request here, by calling:\n * //\n * // await poller.cancelOperation();\n * //\n *\n * // Getting the final result:\n * const result = await poller.pollUntilDone();\n * ```\n *\n * The Poller is defined by two types, a type representing the state of the poller, which\n * must include a basic set of properties from `PollOperationState`,\n * and a return type defined by `TResult`, which can be anything.\n *\n * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having\n * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.\n *\n * ```ts\n * class Client {\n * public async makePoller: PollerLike {\n * const poller = new MyPoller({});\n * // It might be preferred to return the poller after the first request is made,\n * // so that some information can be obtained right away.\n * await poller.poll();\n * return poller;\n * }\n * }\n *\n * const poller: PollerLike = myClient.makePoller();\n * ```\n *\n * A poller can be created through its constructor, then it can be polled until it's completed.\n * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.\n * At any point in time, the intermediate forms of the result type can be requested without delay.\n * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.\n *\n * ```ts\n * const poller = myClient.makePoller();\n * const state: MyOperationState = poller.getOperationState();\n *\n * // The intermediate result can be obtained at any time.\n * const result: MyResult | undefined = poller.getResult();\n *\n * // The final result can only be obtained after the poller finishes.\n * const result: MyResult = await poller.pollUntilDone();\n * ```\n *\n */\n// eslint-disable-next-line no-use-before-define\nexport abstract class Poller, TResult>\n implements PollerLike\n{\n /** controls whether to throw an error if the operation failed or was canceled. */\n protected resolveOnUnsuccessful: boolean = false;\n private stopped: boolean = true;\n private resolve?: (value: TResult) => void;\n private reject?: (error: PollerStoppedError | PollerCancelledError | Error) => void;\n private pollOncePromise?: Promise;\n private cancelPromise?: Promise;\n private promise: Promise;\n private pollProgressCallbacks: PollProgressCallback[] = [];\n\n /**\n * The poller's operation is available in full to any of the methods of the Poller class\n * and any class extending the Poller class.\n */\n protected operation: PollOperation;\n\n /**\n * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`.\n *\n * When writing an implementation of a Poller, this implementation needs to deal with the initialization\n * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's\n * operation has already been defined, at least its basic properties. The code below shows how to approach\n * the definition of the constructor of a new custom poller.\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor({\n * // Anything you might need outside of the basics\n * }) {\n * let state: MyOperationState = {\n * privateProperty: private,\n * publicProperty: public,\n * };\n *\n * const operation = {\n * state,\n * update,\n * cancel,\n * toString\n * }\n *\n * // Sending the operation to the parent's constructor.\n * super(operation);\n *\n * // You can assign more local properties here.\n * }\n * }\n * ```\n *\n * Inside of this constructor, a new promise is created. This will be used to\n * tell the user when the poller finishes (see `pollUntilDone()`). The promise's\n * resolve and reject methods are also used internally to control when to resolve\n * or reject anyone waiting for the poller to finish.\n *\n * The constructor of a custom implementation of a poller is where any serialized version of\n * a previous poller's operation should be deserialized into the operation sent to the\n * base constructor. For example:\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor(\n * baseOperation: string | undefined\n * ) {\n * let state: MyOperationState = {};\n * if (baseOperation) {\n * state = {\n * ...JSON.parse(baseOperation).state,\n * ...state\n * };\n * }\n * const operation = {\n * state,\n * // ...\n * }\n * super(operation);\n * }\n * }\n * ```\n *\n * @param operation - Must contain the basic properties of `PollOperation`.\n */\n constructor(operation: PollOperation) {\n this.operation = operation;\n this.promise = new Promise(\n (\n resolve: (result: TResult) => void,\n reject: (error: PollerStoppedError | PollerCancelledError | Error) => void\n ) => {\n this.resolve = resolve;\n this.reject = reject;\n }\n );\n // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.\n // The above warning would get thrown if `poller.poll` is called, it returns an error,\n // and pullUntilDone did not have a .catch or await try/catch on it's return value.\n this.promise.catch(() => {\n /* intentionally blank */\n });\n }\n\n /**\n * Defines how much to wait between each poll request.\n * This has to be implemented by your custom poller.\n *\n * \\@azure/core-util has a simple implementation of a delay function that waits as many milliseconds as specified.\n * This can be used as follows:\n *\n * ```ts\n * import { delay } from \"@azure/core-util\";\n *\n * export class MyPoller extends Poller {\n * // The other necessary definitions.\n *\n * async delay(): Promise {\n * const milliseconds = 1000;\n * return delay(milliseconds);\n * }\n * }\n * ```\n *\n */\n protected abstract delay(): Promise;\n\n /**\n * Starts a loop that will break only if the poller is done\n * or if the poller is stopped.\n */\n private async startPolling(pollOptions: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (this.stopped) {\n this.stopped = false;\n }\n while (!this.isStopped() && !this.isDone()) {\n await this.poll(pollOptions);\n await this.delay();\n }\n }\n\n /**\n * pollOnce does one polling, by calling to the update method of the underlying\n * poll operation to make any relevant change effective.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n private async pollOnce(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (!this.isDone()) {\n this.operation = await this.operation.update({\n abortSignal: options.abortSignal,\n fireProgress: this.fireProgress.bind(this),\n });\n }\n this.processUpdatedState();\n }\n\n /**\n * fireProgress calls the functions passed in via onProgress the method of the poller.\n *\n * It loops over all of the callbacks received from onProgress, and executes them, sending them\n * the current operation state.\n *\n * @param state - The current operation state.\n */\n private fireProgress(state: TState): void {\n for (const callback of this.pollProgressCallbacks) {\n callback(state);\n }\n }\n\n /**\n * Invokes the underlying operation's cancel method.\n */\n private async cancelOnce(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n this.operation = await this.operation.cancel(options);\n }\n\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n public poll(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (!this.pollOncePromise) {\n this.pollOncePromise = this.pollOnce(options);\n const clearPollOncePromise = (): void => {\n this.pollOncePromise = undefined;\n };\n this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject);\n }\n return this.pollOncePromise;\n }\n\n private processUpdatedState(): void {\n if (this.operation.state.error) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n this.reject!(this.operation.state.error);\n throw this.operation.state.error;\n }\n }\n if (this.operation.state.isCancelled) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n const error = new PollerCancelledError(\"Operation was canceled\");\n this.reject!(error);\n throw error;\n }\n }\n if (this.isDone() && this.resolve) {\n // If the poller has finished polling, this means we now have a result.\n // However, it can be the case that TResult is instantiated to void, so\n // we are not expecting a result anyway. To assert that we might not\n // have a result eventually after finishing polling, we cast the result\n // to TResult.\n this.resolve(this.getResult() as TResult);\n }\n }\n\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n public async pollUntilDone(\n pollOptions: { abortSignal?: AbortSignalLike } = {}\n ): Promise {\n if (this.stopped) {\n this.startPolling(pollOptions).catch(this.reject);\n }\n // This is needed because the state could have been updated by\n // `cancelOperation`, e.g. the operation is canceled or an error occurred.\n this.processUpdatedState();\n return this.promise;\n }\n\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n public onProgress(callback: (state: TState) => void): CancelOnProgress {\n this.pollProgressCallbacks.push(callback);\n return (): void => {\n this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);\n };\n }\n\n /**\n * Returns true if the poller has finished polling.\n */\n public isDone(): boolean {\n const state: PollOperationState = this.operation.state;\n return Boolean(state.isCompleted || state.isCancelled || state.error);\n }\n\n /**\n * Stops the poller from continuing to poll.\n */\n public stopPolling(): void {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }\n\n /**\n * Returns true if the poller is stopped.\n */\n public isStopped(): boolean {\n return this.stopped;\n }\n\n /**\n * Attempts to cancel the underlying operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * If it's called again before it finishes, it will throw an error.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n public cancelOperation(options: { abortSignal?: AbortSignalLike } = {}): Promise {\n if (!this.cancelPromise) {\n this.cancelPromise = this.cancelOnce(options);\n } else if (options.abortSignal) {\n throw new Error(\"A cancel request is currently pending\");\n }\n return this.cancelPromise;\n }\n\n /**\n * Returns the state of the operation.\n *\n * Even though TState will be the same type inside any of the methods of any extension of the Poller class,\n * implementations of the pollers can customize what's shared with the public by writing their own\n * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller\n * and a public type representing a safe to share subset of the properties of the internal state.\n * Their definition of getOperationState can then return their public type.\n *\n * Example:\n *\n * ```ts\n * // Let's say we have our poller's operation state defined as:\n * interface MyOperationState extends PollOperationState {\n * privateProperty?: string;\n * publicProperty?: string;\n * }\n *\n * // To allow us to have a true separation of public and private state, we have to define another interface:\n * interface PublicState extends PollOperationState {\n * publicProperty?: string;\n * }\n *\n * // Then, we define our Poller as follows:\n * export class MyPoller extends Poller {\n * // ... More content is needed here ...\n *\n * public getOperationState(): PublicState {\n * const state: PublicState = this.operation.state;\n * return {\n * // Properties from PollOperationState\n * isStarted: state.isStarted,\n * isCompleted: state.isCompleted,\n * isCancelled: state.isCancelled,\n * error: state.error,\n * result: state.result,\n *\n * // The only other property needed by PublicState.\n * publicProperty: state.publicProperty\n * }\n * }\n * }\n * ```\n *\n * You can see this in the tests of this repository, go to the file:\n * `../test/utils/testPoller.ts`\n * and look for the getOperationState implementation.\n */\n public getOperationState(): TState {\n return this.operation.state;\n }\n\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n public getResult(): TResult | undefined {\n const state: PollOperationState = this.operation.state;\n return state.result;\n }\n\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n public toString(): string {\n return this.operation.toString();\n }\n}\n", "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { LroEngineOptions, PollerConfig } from \"./models\";\nimport { GenericPollOperation } from \"./operation\";\nimport { LongRunningOperation } from \"../../http/models\";\nimport { POLL_INTERVAL_IN_MS } from \"../../poller/constants\";\nimport { PollOperationState } from \"../pollOperation\";\nimport { Poller } from \"../poller\";\nimport { RestorableOperationState } from \"../../poller/models\";\nimport { deserializeState } from \"../../poller/operation\";\n\n/**\n * The LRO Engine, a class that performs polling.\n */\nexport class LroEngine> extends Poller<\n TState,\n TResult\n> {\n private config: PollerConfig;\n\n constructor(lro: LongRunningOperation, options?: LroEngineOptions) {\n const {\n intervalInMs = POLL_INTERVAL_IN_MS,\n resumeFrom,\n resolveOnUnsuccessful = false,\n isDone,\n lroResourceLocationConfig,\n processResult,\n updateState,\n } = options || {};\n const state: RestorableOperationState = resumeFrom\n ? deserializeState(resumeFrom)\n : ({} as RestorableOperationState);\n const operation = new GenericPollOperation(\n state,\n lro,\n !resolveOnUnsuccessful,\n lroResourceLocationConfig,\n processResult,\n updateState,\n isDone\n );\n super(operation);\n this.resolveOnUnsuccessful = resolveOnUnsuccessful;\n\n this.config = { intervalInMs: intervalInMs };\n operation.setPollerConfig(this.config);\n }\n\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n delay(): Promise {\n return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs));\n }\n}\n", "{\n \"name\": \"@actions/cache\",\n \"version\": \"6.2.0\",\n \"description\": \"Actions cache lib\",\n \"keywords\": [\n \"github\",\n \"actions\",\n \"cache\"\n ],\n \"homepage\": \"https://github.com/actions/toolkit/tree/main/packages/cache\",\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"main\": \"lib/cache.js\",\n \"types\": \"lib/cache.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/cache.d.ts\",\n \"import\": \"./lib/cache.js\"\n }\n },\n \"directories\": {\n \"lib\": \"lib\",\n \"test\": \"__tests__\"\n },\n \"files\": [\n \"lib\",\n \"!.DS_Store\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/actions/toolkit.git\",\n \"directory\": \"packages/cache\"\n },\n \"scripts\": {\n \"audit-moderate\": \"npm install && npm audit --json --audit-level=moderate > audit.json\",\n \"test\": \"echo \\\"Error: run tests from root\\\" && exit 1\",\n \"tsc\": \"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/actions/toolkit/issues\"\n },\n \"dependencies\": {\n \"@actions/core\": \"^3.0.1\",\n \"@actions/exec\": \"^3.0.0\",\n \"@actions/glob\": \"^0.6.1\",\n \"@actions/http-client\": \"^4.0.1\",\n \"@actions/io\": \"^3.0.2\",\n \"@azure/core-rest-pipeline\": \"^1.23.0\",\n \"@azure/storage-blob\": \"^12.31.0\",\n \"@protobuf-ts/runtime-rpc\": \"^2.11.1\",\n \"semver\": \"^7.7.4\"\n },\n \"devDependencies\": {\n \"@protobuf-ts/plugin\": \"^2.11.1\",\n \"@types/node\": \"^25.6.0\",\n \"@types/semver\": \"^7.7.1\",\n \"typescript\": \"^5.9.3\"\n },\n \"overrides\": {\n \"uri-js\": \"npm:uri-js-replace@^1.0.1\",\n \"node-fetch\": \"^3.3.2\"\n }\n}\n", "// This file exists as a CommonJS module to read the version from package.json.\n// In an ESM package, using `require()` directly in .ts files requires disabling\n// ESLint rules and doesn't work reliably across all Node.js versions.\n// By keeping this as a .cjs file, we can use require() naturally and export\n// the version for the ESM modules to import.\nconst packageJson = require('../../../package.json')\nmodule.exports = { version: packageJson.version }\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isJsonObject = exports.typeofJsonValue = void 0;\n/**\n * Get the type of a JSON value.\n * Distinguishes between array, null and object.\n */\nfunction typeofJsonValue(value) {\n let t = typeof value;\n if (t == \"object\") {\n if (Array.isArray(value))\n return \"array\";\n if (value === null)\n return \"null\";\n }\n return t;\n}\nexports.typeofJsonValue = typeofJsonValue;\n/**\n * Is this a JSON object (instead of an array or null)?\n */\nfunction isJsonObject(value) {\n return value !== null && typeof value == \"object\" && !Array.isArray(value);\n}\nexports.isJsonObject = isJsonObject;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.base64encode = exports.base64decode = void 0;\n// lookup table from base64 character to byte\nlet encTable = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n// lookup table from base64 character *code* to byte because lookup by number is fast\nlet decTable = [];\nfor (let i = 0; i < encTable.length; i++)\n decTable[encTable[i].charCodeAt(0)] = i;\n// support base64url variants\ndecTable[\"-\".charCodeAt(0)] = encTable.indexOf(\"+\");\ndecTable[\"_\".charCodeAt(0)] = encTable.indexOf(\"/\");\n/**\n * Decodes a base64 string to a byte array.\n *\n * - ignores white-space, including line breaks and tabs\n * - allows inner padding (can decode concatenated base64 strings)\n * - does not require padding\n * - understands base64url encoding:\n * \"-\" instead of \"+\",\n * \"_\" instead of \"/\",\n * no padding\n */\nfunction base64decode(base64Str) {\n // estimate byte size, not accounting for inner padding and whitespace\n let es = base64Str.length * 3 / 4;\n // if (es % 3 !== 0)\n // throw new Error('invalid base64 string');\n if (base64Str[base64Str.length - 2] == '=')\n es -= 2;\n else if (base64Str[base64Str.length - 1] == '=')\n es -= 1;\n let bytes = new Uint8Array(es), bytePos = 0, // position in byte array\n groupPos = 0, // position in base64 group\n b, // current byte\n p = 0 // previous byte\n ;\n for (let i = 0; i < base64Str.length; i++) {\n b = decTable[base64Str.charCodeAt(i)];\n if (b === undefined) {\n // noinspection FallThroughInSwitchStatementJS\n switch (base64Str[i]) {\n case '=':\n groupPos = 0; // reset state when padding found\n case '\\n':\n case '\\r':\n case '\\t':\n case ' ':\n continue; // skip white-space, and padding\n default:\n throw Error(`invalid base64 string.`);\n }\n }\n switch (groupPos) {\n case 0:\n p = b;\n groupPos = 1;\n break;\n case 1:\n bytes[bytePos++] = p << 2 | (b & 48) >> 4;\n p = b;\n groupPos = 2;\n break;\n case 2:\n bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2;\n p = b;\n groupPos = 3;\n break;\n case 3:\n bytes[bytePos++] = (p & 3) << 6 | b;\n groupPos = 0;\n break;\n }\n }\n if (groupPos == 1)\n throw Error(`invalid base64 string.`);\n return bytes.subarray(0, bytePos);\n}\nexports.base64decode = base64decode;\n/**\n * Encodes a byte array to a base64 string.\n * Adds padding at the end.\n * Does not insert newlines.\n */\nfunction base64encode(bytes) {\n let base64 = '', groupPos = 0, // position in base64 group\n b, // current byte\n p = 0; // carry over from previous byte\n for (let i = 0; i < bytes.length; i++) {\n b = bytes[i];\n switch (groupPos) {\n case 0:\n base64 += encTable[b >> 2];\n p = (b & 3) << 4;\n groupPos = 1;\n break;\n case 1:\n base64 += encTable[p | b >> 4];\n p = (b & 15) << 2;\n groupPos = 2;\n break;\n case 2:\n base64 += encTable[p | b >> 6];\n base64 += encTable[b & 63];\n groupPos = 0;\n break;\n }\n }\n // padding required?\n if (groupPos) {\n base64 += encTable[p];\n base64 += '=';\n if (groupPos == 1)\n base64 += '=';\n }\n return base64;\n}\nexports.base64encode = base64encode;\n", "\"use strict\";\n// Copyright (c) 2016, Daniel Wirtz All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// * Neither the name of its author, nor the names of its contributors\n// may be used to endorse or promote products derived from this software\n// without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.utf8read = void 0;\nconst fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk);\n/**\n * @deprecated This function will no longer be exported with the next major\n * release, since protobuf-ts has switch to TextDecoder API. If you need this\n * function, please migrate to @protobufjs/utf8. For context, see\n * https://github.com/timostamm/protobuf-ts/issues/184\n *\n * Reads UTF8 bytes as a string.\n *\n * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40)\n *\n * Copyright (c) 2016, Daniel Wirtz\n */\nfunction utf8read(bytes) {\n if (bytes.length < 1)\n return \"\";\n let pos = 0, // position in bytes\n parts = [], chunk = [], i = 0, // char offset\n t; // temporary\n let len = bytes.length;\n while (pos < len) {\n t = bytes[pos++];\n if (t < 128)\n chunk[i++] = t;\n else if (t > 191 && t < 224)\n chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63;\n else if (t > 239 && t < 365) {\n t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 0x10000;\n chunk[i++] = 0xD800 + (t >> 10);\n chunk[i++] = 0xDC00 + (t & 1023);\n }\n else\n chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63;\n if (i > 8191) {\n parts.push(fromCharCodes(chunk));\n i = 0;\n }\n }\n if (parts.length) {\n if (i)\n parts.push(fromCharCodes(chunk.slice(0, i)));\n return parts.join(\"\");\n }\n return fromCharCodes(chunk.slice(0, i));\n}\nexports.utf8read = utf8read;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0;\n/**\n * This handler implements the default behaviour for unknown fields.\n * When reading data, unknown fields are stored on the message, in a\n * symbol property.\n * When writing data, the symbol property is queried and unknown fields\n * are serialized into the output again.\n */\nvar UnknownFieldHandler;\n(function (UnknownFieldHandler) {\n /**\n * The symbol used to store unknown fields for a message.\n * The property must conform to `UnknownFieldContainer`.\n */\n UnknownFieldHandler.symbol = Symbol.for(\"protobuf-ts/unknown\");\n /**\n * Store an unknown field during binary read directly on the message.\n * This method is compatible with `BinaryReadOptions.readUnknownField`.\n */\n UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => {\n let container = is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = [];\n container.push({ no: fieldNo, wireType, data });\n };\n /**\n * Write unknown fields stored for the message to the writer.\n * This method is compatible with `BinaryWriteOptions.writeUnknownFields`.\n */\n UnknownFieldHandler.onWrite = (typeName, message, writer) => {\n for (let { no, wireType, data } of UnknownFieldHandler.list(message))\n writer.tag(no, wireType).raw(data);\n };\n /**\n * List unknown fields stored for the message.\n * Note that there may be multiples fields with the same number.\n */\n UnknownFieldHandler.list = (message, fieldNo) => {\n if (is(message)) {\n let all = message[UnknownFieldHandler.symbol];\n return fieldNo ? all.filter(uf => uf.no == fieldNo) : all;\n }\n return [];\n };\n /**\n * Returns the last unknown field by field number.\n */\n UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0];\n const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]);\n})(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {}));\n/**\n * Merges binary write or read options. Later values override earlier values.\n */\nfunction mergeBinaryOptions(a, b) {\n return Object.assign(Object.assign({}, a), b);\n}\nexports.mergeBinaryOptions = mergeBinaryOptions;\n/**\n * Protobuf binary format wire types.\n *\n * A wire type provides just enough information to find the length of the\n * following value.\n *\n * See https://developers.google.com/protocol-buffers/docs/encoding#structure\n */\nvar WireType;\n(function (WireType) {\n /**\n * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum\n */\n WireType[WireType[\"Varint\"] = 0] = \"Varint\";\n /**\n * Used for fixed64, sfixed64, double.\n * Always 8 bytes with little-endian byte order.\n */\n WireType[WireType[\"Bit64\"] = 1] = \"Bit64\";\n /**\n * Used for string, bytes, embedded messages, packed repeated fields\n *\n * Only repeated numeric types (types which use the varint, 32-bit,\n * or 64-bit wire types) can be packed. In proto3, such fields are\n * packed by default.\n */\n WireType[WireType[\"LengthDelimited\"] = 2] = \"LengthDelimited\";\n /**\n * Used for groups\n * @deprecated\n */\n WireType[WireType[\"StartGroup\"] = 3] = \"StartGroup\";\n /**\n * Used for groups\n * @deprecated\n */\n WireType[WireType[\"EndGroup\"] = 4] = \"EndGroup\";\n /**\n * Used for fixed32, sfixed32, float.\n * Always 4 bytes with little-endian byte order.\n */\n WireType[WireType[\"Bit32\"] = 5] = \"Bit32\";\n})(WireType = exports.WireType || (exports.WireType = {}));\n", "\"use strict\";\n// Copyright 2008 Google Inc. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Code generated by the Protocol Buffer compiler is owned by the owner\n// of the input file used when generating it. This code is not\n// standalone and requires a support library to be linked with it. This\n// support library is itself covered by the above license.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0;\n/**\n * Read a 64 bit varint as two JS numbers.\n *\n * Returns tuple:\n * [0]: low bits\n * [0]: high bits\n *\n * Copyright 2008 Google Inc. All rights reserved.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175\n */\nfunction varint64read() {\n let lowBits = 0;\n let highBits = 0;\n for (let shift = 0; shift < 28; shift += 7) {\n let b = this.buf[this.pos++];\n lowBits |= (b & 0x7F) << shift;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return [lowBits, highBits];\n }\n }\n let middleByte = this.buf[this.pos++];\n // last four bits of the first 32 bit number\n lowBits |= (middleByte & 0x0F) << 28;\n // 3 upper bits are part of the next 32 bit number\n highBits = (middleByte & 0x70) >> 4;\n if ((middleByte & 0x80) == 0) {\n this.assertBounds();\n return [lowBits, highBits];\n }\n for (let shift = 3; shift <= 31; shift += 7) {\n let b = this.buf[this.pos++];\n highBits |= (b & 0x7F) << shift;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return [lowBits, highBits];\n }\n }\n throw new Error('invalid varint');\n}\nexports.varint64read = varint64read;\n/**\n * Write a 64 bit varint, given as two JS numbers, to the given bytes array.\n *\n * Copyright 2008 Google Inc. All rights reserved.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344\n */\nfunction varint64write(lo, hi, bytes) {\n for (let i = 0; i < 28; i = i + 7) {\n const shift = lo >>> i;\n const hasNext = !((shift >>> 7) == 0 && hi == 0);\n const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;\n bytes.push(byte);\n if (!hasNext) {\n return;\n }\n }\n const splitBits = ((lo >>> 28) & 0x0F) | ((hi & 0x07) << 4);\n const hasMoreBits = !((hi >> 3) == 0);\n bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xFF);\n if (!hasMoreBits) {\n return;\n }\n for (let i = 3; i < 31; i = i + 7) {\n const shift = hi >>> i;\n const hasNext = !((shift >>> 7) == 0);\n const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;\n bytes.push(byte);\n if (!hasNext) {\n return;\n }\n }\n bytes.push((hi >>> 31) & 0x01);\n}\nexports.varint64write = varint64write;\n// constants for binary math\nconst TWO_PWR_32_DBL = (1 << 16) * (1 << 16);\n/**\n * Parse decimal string of 64 bit integer value as two JS numbers.\n *\n * Returns tuple:\n * [0]: minus sign?\n * [1]: low bits\n * [2]: high bits\n *\n * Copyright 2008 Google Inc.\n */\nfunction int64fromString(dec) {\n // Check for minus sign.\n let minus = dec[0] == '-';\n if (minus)\n dec = dec.slice(1);\n // Work 6 decimal digits at a time, acting like we're converting base 1e6\n // digits to binary. This is safe to do with floating point math because\n // Number.isSafeInteger(ALL_32_BITS * 1e6) == true.\n const base = 1e6;\n let lowBits = 0;\n let highBits = 0;\n function add1e6digit(begin, end) {\n // Note: Number('') is 0.\n const digit1e6 = Number(dec.slice(begin, end));\n highBits *= base;\n lowBits = lowBits * base + digit1e6;\n // Carry bits from lowBits to highBits\n if (lowBits >= TWO_PWR_32_DBL) {\n highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0);\n lowBits = lowBits % TWO_PWR_32_DBL;\n }\n }\n add1e6digit(-24, -18);\n add1e6digit(-18, -12);\n add1e6digit(-12, -6);\n add1e6digit(-6);\n return [minus, lowBits, highBits];\n}\nexports.int64fromString = int64fromString;\n/**\n * Format 64 bit integer value (as two JS numbers) to decimal string.\n *\n * Copyright 2008 Google Inc.\n */\nfunction int64toString(bitsLow, bitsHigh) {\n // Skip the expensive conversion if the number is small enough to use the\n // built-in conversions.\n if ((bitsHigh >>> 0) <= 0x1FFFFF) {\n return '' + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0));\n }\n // What this code is doing is essentially converting the input number from\n // base-2 to base-1e7, which allows us to represent the 64-bit range with\n // only 3 (very large) digits. Those digits are then trivial to convert to\n // a base-10 string.\n // The magic numbers used here are -\n // 2^24 = 16777216 = (1,6777216) in base-1e7.\n // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.\n // Split 32:32 representation into 16:24:24 representation so our\n // intermediate digits don't overflow.\n let low = bitsLow & 0xFFFFFF;\n let mid = (((bitsLow >>> 24) | (bitsHigh << 8)) >>> 0) & 0xFFFFFF;\n let high = (bitsHigh >> 16) & 0xFFFF;\n // Assemble our three base-1e7 digits, ignoring carries. The maximum\n // value in a digit at this step is representable as a 48-bit integer, which\n // can be stored in a 64-bit floating point number.\n let digitA = low + (mid * 6777216) + (high * 6710656);\n let digitB = mid + (high * 8147497);\n let digitC = (high * 2);\n // Apply carries from A to B and from B to C.\n let base = 10000000;\n if (digitA >= base) {\n digitB += Math.floor(digitA / base);\n digitA %= base;\n }\n if (digitB >= base) {\n digitC += Math.floor(digitB / base);\n digitB %= base;\n }\n // Convert base-1e7 digits to base-10, with optional leading zeroes.\n function decimalFrom1e7(digit1e7, needLeadingZeros) {\n let partial = digit1e7 ? String(digit1e7) : '';\n if (needLeadingZeros) {\n return '0000000'.slice(partial.length) + partial;\n }\n return partial;\n }\n return decimalFrom1e7(digitC, /*needLeadingZeros=*/ 0) +\n decimalFrom1e7(digitB, /*needLeadingZeros=*/ digitC) +\n // If the final 1e7 digit didn't need leading zeros, we would have\n // returned via the trivial code path at the top.\n decimalFrom1e7(digitA, /*needLeadingZeros=*/ 1);\n}\nexports.int64toString = int64toString;\n/**\n * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`\n *\n * Copyright 2008 Google Inc. All rights reserved.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144\n */\nfunction varint32write(value, bytes) {\n if (value >= 0) {\n // write value as varint 32\n while (value > 0x7f) {\n bytes.push((value & 0x7f) | 0x80);\n value = value >>> 7;\n }\n bytes.push(value);\n }\n else {\n for (let i = 0; i < 9; i++) {\n bytes.push(value & 127 | 128);\n value = value >> 7;\n }\n bytes.push(1);\n }\n}\nexports.varint32write = varint32write;\n/**\n * Read an unsigned 32 bit varint.\n *\n * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220\n */\nfunction varint32read() {\n let b = this.buf[this.pos++];\n let result = b & 0x7F;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n b = this.buf[this.pos++];\n result |= (b & 0x7F) << 7;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n b = this.buf[this.pos++];\n result |= (b & 0x7F) << 14;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n b = this.buf[this.pos++];\n result |= (b & 0x7F) << 21;\n if ((b & 0x80) == 0) {\n this.assertBounds();\n return result;\n }\n // Extract only last 4 bits\n b = this.buf[this.pos++];\n result |= (b & 0x0F) << 28;\n for (let readBytes = 5; ((b & 0x80) !== 0) && readBytes < 10; readBytes++)\n b = this.buf[this.pos++];\n if ((b & 0x80) != 0)\n throw new Error('invalid varint');\n this.assertBounds();\n // Result can have 32 bits, convert it to unsigned\n return result >>> 0;\n}\nexports.varint32read = varint32read;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PbLong = exports.PbULong = exports.detectBi = void 0;\nconst goog_varint_1 = require(\"./goog-varint\");\nlet BI;\nfunction detectBi() {\n const dv = new DataView(new ArrayBuffer(8));\n const ok = globalThis.BigInt !== undefined\n && typeof dv.getBigInt64 === \"function\"\n && typeof dv.getBigUint64 === \"function\"\n && typeof dv.setBigInt64 === \"function\"\n && typeof dv.setBigUint64 === \"function\";\n BI = ok ? {\n MIN: BigInt(\"-9223372036854775808\"),\n MAX: BigInt(\"9223372036854775807\"),\n UMIN: BigInt(\"0\"),\n UMAX: BigInt(\"18446744073709551615\"),\n C: BigInt,\n V: dv,\n } : undefined;\n}\nexports.detectBi = detectBi;\ndetectBi();\nfunction assertBi(bi) {\n if (!bi)\n throw new Error(\"BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support\");\n}\n// used to validate from(string) input (when bigint is unavailable)\nconst RE_DECIMAL_STR = /^-?[0-9]+$/;\n// constants for binary math\nconst TWO_PWR_32_DBL = 0x100000000;\nconst HALF_2_PWR_32 = 0x080000000;\n// base class for PbLong and PbULong provides shared code\nclass SharedPbLong {\n /**\n * Create a new instance with the given bits.\n */\n constructor(lo, hi) {\n this.lo = lo | 0;\n this.hi = hi | 0;\n }\n /**\n * Is this instance equal to 0?\n */\n isZero() {\n return this.lo == 0 && this.hi == 0;\n }\n /**\n * Convert to a native number.\n */\n toNumber() {\n let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0);\n if (!Number.isSafeInteger(result))\n throw new Error(\"cannot convert to safe number\");\n return result;\n }\n}\n/**\n * 64-bit unsigned integer as two 32-bit values.\n * Converts between `string`, `number` and `bigint` representations.\n */\nclass PbULong extends SharedPbLong {\n /**\n * Create instance from a `string`, `number` or `bigint`.\n */\n static from(value) {\n if (BI)\n // noinspection FallThroughInSwitchStatementJS\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n if (value == \"\")\n throw new Error('string is no integer');\n value = BI.C(value);\n case \"number\":\n if (value === 0)\n return this.ZERO;\n value = BI.C(value);\n case \"bigint\":\n if (!value)\n return this.ZERO;\n if (value < BI.UMIN)\n throw new Error('signed value for ulong');\n if (value > BI.UMAX)\n throw new Error('ulong too large');\n BI.V.setBigUint64(0, value, true);\n return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));\n }\n else\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n value = value.trim();\n if (!RE_DECIMAL_STR.test(value))\n throw new Error('string is no integer');\n let [minus, lo, hi] = goog_varint_1.int64fromString(value);\n if (minus)\n throw new Error('signed value for ulong');\n return new PbULong(lo, hi);\n case \"number\":\n if (value == 0)\n return this.ZERO;\n if (!Number.isSafeInteger(value))\n throw new Error('number is no integer');\n if (value < 0)\n throw new Error('signed value for ulong');\n return new PbULong(value, value / TWO_PWR_32_DBL);\n }\n throw new Error('unknown value ' + typeof value);\n }\n /**\n * Convert to decimal string.\n */\n toString() {\n return BI ? this.toBigInt().toString() : goog_varint_1.int64toString(this.lo, this.hi);\n }\n /**\n * Convert to native bigint.\n */\n toBigInt() {\n assertBi(BI);\n BI.V.setInt32(0, this.lo, true);\n BI.V.setInt32(4, this.hi, true);\n return BI.V.getBigUint64(0, true);\n }\n}\nexports.PbULong = PbULong;\n/**\n * ulong 0 singleton.\n */\nPbULong.ZERO = new PbULong(0, 0);\n/**\n * 64-bit signed integer as two 32-bit values.\n * Converts between `string`, `number` and `bigint` representations.\n */\nclass PbLong extends SharedPbLong {\n /**\n * Create instance from a `string`, `number` or `bigint`.\n */\n static from(value) {\n if (BI)\n // noinspection FallThroughInSwitchStatementJS\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n if (value == \"\")\n throw new Error('string is no integer');\n value = BI.C(value);\n case \"number\":\n if (value === 0)\n return this.ZERO;\n value = BI.C(value);\n case \"bigint\":\n if (!value)\n return this.ZERO;\n if (value < BI.MIN)\n throw new Error('signed long too small');\n if (value > BI.MAX)\n throw new Error('signed long too large');\n BI.V.setBigInt64(0, value, true);\n return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));\n }\n else\n switch (typeof value) {\n case \"string\":\n if (value == \"0\")\n return this.ZERO;\n value = value.trim();\n if (!RE_DECIMAL_STR.test(value))\n throw new Error('string is no integer');\n let [minus, lo, hi] = goog_varint_1.int64fromString(value);\n if (minus) {\n if (hi > HALF_2_PWR_32 || (hi == HALF_2_PWR_32 && lo != 0))\n throw new Error('signed long too small');\n }\n else if (hi >= HALF_2_PWR_32)\n throw new Error('signed long too large');\n let pbl = new PbLong(lo, hi);\n return minus ? pbl.negate() : pbl;\n case \"number\":\n if (value == 0)\n return this.ZERO;\n if (!Number.isSafeInteger(value))\n throw new Error('number is no integer');\n return value > 0\n ? new PbLong(value, value / TWO_PWR_32_DBL)\n : new PbLong(-value, -value / TWO_PWR_32_DBL).negate();\n }\n throw new Error('unknown value ' + typeof value);\n }\n /**\n * Do we have a minus sign?\n */\n isNegative() {\n return (this.hi & HALF_2_PWR_32) !== 0;\n }\n /**\n * Negate two's complement.\n * Invert all the bits and add one to the result.\n */\n negate() {\n let hi = ~this.hi, lo = this.lo;\n if (lo)\n lo = ~lo + 1;\n else\n hi += 1;\n return new PbLong(lo, hi);\n }\n /**\n * Convert to decimal string.\n */\n toString() {\n if (BI)\n return this.toBigInt().toString();\n if (this.isNegative()) {\n let n = this.negate();\n return '-' + goog_varint_1.int64toString(n.lo, n.hi);\n }\n return goog_varint_1.int64toString(this.lo, this.hi);\n }\n /**\n * Convert to native bigint.\n */\n toBigInt() {\n assertBi(BI);\n BI.V.setInt32(0, this.lo, true);\n BI.V.setInt32(4, this.hi, true);\n return BI.V.getBigInt64(0, true);\n }\n}\nexports.PbLong = PbLong;\n/**\n * long 0 singleton.\n */\nPbLong.ZERO = new PbLong(0, 0);\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BinaryReader = exports.binaryReadOptions = void 0;\nconst binary_format_contract_1 = require(\"./binary-format-contract\");\nconst pb_long_1 = require(\"./pb-long\");\nconst goog_varint_1 = require(\"./goog-varint\");\nconst defaultsRead = {\n readUnknownField: true,\n readerFactory: bytes => new BinaryReader(bytes),\n};\n/**\n * Make options for reading binary data form partial options.\n */\nfunction binaryReadOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;\n}\nexports.binaryReadOptions = binaryReadOptions;\nclass BinaryReader {\n constructor(buf, textDecoder) {\n this.varint64 = goog_varint_1.varint64read; // dirty cast for `this`\n /**\n * Read a `uint32` field, an unsigned 32 bit varint.\n */\n this.uint32 = goog_varint_1.varint32read; // dirty cast for `this` and access to protected `buf`\n this.buf = buf;\n this.len = buf.length;\n this.pos = 0;\n this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);\n this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder(\"utf-8\", {\n fatal: true,\n ignoreBOM: true,\n });\n }\n /**\n * Reads a tag - field number and wire type.\n */\n tag() {\n let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7;\n if (fieldNo <= 0 || wireType < 0 || wireType > 5)\n throw new Error(\"illegal tag: field no \" + fieldNo + \" wire type \" + wireType);\n return [fieldNo, wireType];\n }\n /**\n * Skip one element on the wire and return the skipped data.\n * Supports WireType.StartGroup since v2.0.0-alpha.23.\n */\n skip(wireType) {\n let start = this.pos;\n // noinspection FallThroughInSwitchStatementJS\n switch (wireType) {\n case binary_format_contract_1.WireType.Varint:\n while (this.buf[this.pos++] & 0x80) {\n // ignore\n }\n break;\n case binary_format_contract_1.WireType.Bit64:\n this.pos += 4;\n case binary_format_contract_1.WireType.Bit32:\n this.pos += 4;\n break;\n case binary_format_contract_1.WireType.LengthDelimited:\n let len = this.uint32();\n this.pos += len;\n break;\n case binary_format_contract_1.WireType.StartGroup:\n // From descriptor.proto: Group type is deprecated, not supported in proto3.\n // But we must still be able to parse and treat as unknown.\n let t;\n while ((t = this.tag()[1]) !== binary_format_contract_1.WireType.EndGroup) {\n this.skip(t);\n }\n break;\n default:\n throw new Error(\"cant skip wire type \" + wireType);\n }\n this.assertBounds();\n return this.buf.subarray(start, this.pos);\n }\n /**\n * Throws error if position in byte array is out of range.\n */\n assertBounds() {\n if (this.pos > this.len)\n throw new RangeError(\"premature EOF\");\n }\n /**\n * Read a `int32` field, a signed 32 bit varint.\n */\n int32() {\n return this.uint32() | 0;\n }\n /**\n * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.\n */\n sint32() {\n let zze = this.uint32();\n // decode zigzag\n return (zze >>> 1) ^ -(zze & 1);\n }\n /**\n * Read a `int64` field, a signed 64-bit varint.\n */\n int64() {\n return new pb_long_1.PbLong(...this.varint64());\n }\n /**\n * Read a `uint64` field, an unsigned 64-bit varint.\n */\n uint64() {\n return new pb_long_1.PbULong(...this.varint64());\n }\n /**\n * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.\n */\n sint64() {\n let [lo, hi] = this.varint64();\n // decode zig zag\n let s = -(lo & 1);\n lo = ((lo >>> 1 | (hi & 1) << 31) ^ s);\n hi = (hi >>> 1 ^ s);\n return new pb_long_1.PbLong(lo, hi);\n }\n /**\n * Read a `bool` field, a variant.\n */\n bool() {\n let [lo, hi] = this.varint64();\n return lo !== 0 || hi !== 0;\n }\n /**\n * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.\n */\n fixed32() {\n return this.view.getUint32((this.pos += 4) - 4, true);\n }\n /**\n * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.\n */\n sfixed32() {\n return this.view.getInt32((this.pos += 4) - 4, true);\n }\n /**\n * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.\n */\n fixed64() {\n return new pb_long_1.PbULong(this.sfixed32(), this.sfixed32());\n }\n /**\n * Read a `fixed64` field, a signed, fixed-length 64-bit integer.\n */\n sfixed64() {\n return new pb_long_1.PbLong(this.sfixed32(), this.sfixed32());\n }\n /**\n * Read a `float` field, 32-bit floating point number.\n */\n float() {\n return this.view.getFloat32((this.pos += 4) - 4, true);\n }\n /**\n * Read a `double` field, a 64-bit floating point number.\n */\n double() {\n return this.view.getFloat64((this.pos += 8) - 8, true);\n }\n /**\n * Read a `bytes` field, length-delimited arbitrary data.\n */\n bytes() {\n let len = this.uint32();\n let start = this.pos;\n this.pos += len;\n this.assertBounds();\n return this.buf.subarray(start, start + len);\n }\n /**\n * Read a `string` field, length-delimited data converted to UTF-8 text.\n */\n string() {\n return this.textDecoder.decode(this.bytes());\n }\n}\nexports.BinaryReader = BinaryReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0;\n/**\n * assert that condition is true or throw error (with message)\n */\nfunction assert(condition, msg) {\n if (!condition) {\n throw new Error(msg);\n }\n}\nexports.assert = assert;\n/**\n * assert that value cannot exist = type `never`. throw runtime error if it does.\n */\nfunction assertNever(value, msg) {\n throw new Error(msg !== null && msg !== void 0 ? msg : 'Unexpected object: ' + value);\n}\nexports.assertNever = assertNever;\nconst FLOAT32_MAX = 3.4028234663852886e+38, FLOAT32_MIN = -3.4028234663852886e+38, UINT32_MAX = 0xFFFFFFFF, INT32_MAX = 0X7FFFFFFF, INT32_MIN = -0X80000000;\nfunction assertInt32(arg) {\n if (typeof arg !== \"number\")\n throw new Error('invalid int 32: ' + typeof arg);\n if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN)\n throw new Error('invalid int 32: ' + arg);\n}\nexports.assertInt32 = assertInt32;\nfunction assertUInt32(arg) {\n if (typeof arg !== \"number\")\n throw new Error('invalid uint 32: ' + typeof arg);\n if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0)\n throw new Error('invalid uint 32: ' + arg);\n}\nexports.assertUInt32 = assertUInt32;\nfunction assertFloat32(arg) {\n if (typeof arg !== \"number\")\n throw new Error('invalid float 32: ' + typeof arg);\n if (!Number.isFinite(arg))\n return;\n if (arg > FLOAT32_MAX || arg < FLOAT32_MIN)\n throw new Error('invalid float 32: ' + arg);\n}\nexports.assertFloat32 = assertFloat32;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BinaryWriter = exports.binaryWriteOptions = void 0;\nconst pb_long_1 = require(\"./pb-long\");\nconst goog_varint_1 = require(\"./goog-varint\");\nconst assert_1 = require(\"./assert\");\nconst defaultsWrite = {\n writeUnknownFields: true,\n writerFactory: () => new BinaryWriter(),\n};\n/**\n * Make options for writing binary data form partial options.\n */\nfunction binaryWriteOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;\n}\nexports.binaryWriteOptions = binaryWriteOptions;\nclass BinaryWriter {\n constructor(textEncoder) {\n /**\n * Previous fork states.\n */\n this.stack = [];\n this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder();\n this.chunks = [];\n this.buf = [];\n }\n /**\n * Return all bytes written and reset this writer.\n */\n finish() {\n this.chunks.push(new Uint8Array(this.buf)); // flush the buffer\n let len = 0;\n for (let i = 0; i < this.chunks.length; i++)\n len += this.chunks[i].length;\n let bytes = new Uint8Array(len);\n let offset = 0;\n for (let i = 0; i < this.chunks.length; i++) {\n bytes.set(this.chunks[i], offset);\n offset += this.chunks[i].length;\n }\n this.chunks = [];\n return bytes;\n }\n /**\n * Start a new fork for length-delimited data like a message\n * or a packed repeated field.\n *\n * Must be joined later with `join()`.\n */\n fork() {\n this.stack.push({ chunks: this.chunks, buf: this.buf });\n this.chunks = [];\n this.buf = [];\n return this;\n }\n /**\n * Join the last fork. Write its length and bytes, then\n * return to the previous state.\n */\n join() {\n // get chunk of fork\n let chunk = this.finish();\n // restore previous state\n let prev = this.stack.pop();\n if (!prev)\n throw new Error('invalid state, fork stack empty');\n this.chunks = prev.chunks;\n this.buf = prev.buf;\n // write length of chunk as varint\n this.uint32(chunk.byteLength);\n return this.raw(chunk);\n }\n /**\n * Writes a tag (field number and wire type).\n *\n * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.\n *\n * Generated code should compute the tag ahead of time and call `uint32()`.\n */\n tag(fieldNo, type) {\n return this.uint32((fieldNo << 3 | type) >>> 0);\n }\n /**\n * Write a chunk of raw bytes.\n */\n raw(chunk) {\n if (this.buf.length) {\n this.chunks.push(new Uint8Array(this.buf));\n this.buf = [];\n }\n this.chunks.push(chunk);\n return this;\n }\n /**\n * Write a `uint32` value, an unsigned 32 bit varint.\n */\n uint32(value) {\n assert_1.assertUInt32(value);\n // write value as varint 32, inlined for speed\n while (value > 0x7f) {\n this.buf.push((value & 0x7f) | 0x80);\n value = value >>> 7;\n }\n this.buf.push(value);\n return this;\n }\n /**\n * Write a `int32` value, a signed 32 bit varint.\n */\n int32(value) {\n assert_1.assertInt32(value);\n goog_varint_1.varint32write(value, this.buf);\n return this;\n }\n /**\n * Write a `bool` value, a variant.\n */\n bool(value) {\n this.buf.push(value ? 1 : 0);\n return this;\n }\n /**\n * Write a `bytes` value, length-delimited arbitrary data.\n */\n bytes(value) {\n this.uint32(value.byteLength); // write length of chunk as varint\n return this.raw(value);\n }\n /**\n * Write a `string` value, length-delimited data converted to UTF-8 text.\n */\n string(value) {\n let chunk = this.textEncoder.encode(value);\n this.uint32(chunk.byteLength); // write length of chunk as varint\n return this.raw(chunk);\n }\n /**\n * Write a `float` value, 32-bit floating point number.\n */\n float(value) {\n assert_1.assertFloat32(value);\n let chunk = new Uint8Array(4);\n new DataView(chunk.buffer).setFloat32(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `double` value, a 64-bit floating point number.\n */\n double(value) {\n let chunk = new Uint8Array(8);\n new DataView(chunk.buffer).setFloat64(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.\n */\n fixed32(value) {\n assert_1.assertUInt32(value);\n let chunk = new Uint8Array(4);\n new DataView(chunk.buffer).setUint32(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.\n */\n sfixed32(value) {\n assert_1.assertInt32(value);\n let chunk = new Uint8Array(4);\n new DataView(chunk.buffer).setInt32(0, value, true);\n return this.raw(chunk);\n }\n /**\n * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.\n */\n sint32(value) {\n assert_1.assertInt32(value);\n // zigzag encode\n value = ((value << 1) ^ (value >> 31)) >>> 0;\n goog_varint_1.varint32write(value, this.buf);\n return this;\n }\n /**\n * Write a `fixed64` value, a signed, fixed-length 64-bit integer.\n */\n sfixed64(value) {\n let chunk = new Uint8Array(8);\n let view = new DataView(chunk.buffer);\n let long = pb_long_1.PbLong.from(value);\n view.setInt32(0, long.lo, true);\n view.setInt32(4, long.hi, true);\n return this.raw(chunk);\n }\n /**\n * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.\n */\n fixed64(value) {\n let chunk = new Uint8Array(8);\n let view = new DataView(chunk.buffer);\n let long = pb_long_1.PbULong.from(value);\n view.setInt32(0, long.lo, true);\n view.setInt32(4, long.hi, true);\n return this.raw(chunk);\n }\n /**\n * Write a `int64` value, a signed 64-bit varint.\n */\n int64(value) {\n let long = pb_long_1.PbLong.from(value);\n goog_varint_1.varint64write(long.lo, long.hi, this.buf);\n return this;\n }\n /**\n * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.\n */\n sint64(value) {\n let long = pb_long_1.PbLong.from(value), \n // zigzag encode\n sign = long.hi >> 31, lo = (long.lo << 1) ^ sign, hi = ((long.hi << 1) | (long.lo >>> 31)) ^ sign;\n goog_varint_1.varint64write(lo, hi, this.buf);\n return this;\n }\n /**\n * Write a `uint64` value, an unsigned 64-bit varint.\n */\n uint64(value) {\n let long = pb_long_1.PbULong.from(value);\n goog_varint_1.varint64write(long.lo, long.hi, this.buf);\n return this;\n }\n}\nexports.BinaryWriter = BinaryWriter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0;\nconst defaultsWrite = {\n emitDefaultValues: false,\n enumAsInteger: false,\n useProtoFieldName: false,\n prettySpaces: 0,\n}, defaultsRead = {\n ignoreUnknownFields: false,\n};\n/**\n * Make options for reading JSON data from partial options.\n */\nfunction jsonReadOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;\n}\nexports.jsonReadOptions = jsonReadOptions;\n/**\n * Make options for writing JSON data from partial options.\n */\nfunction jsonWriteOptions(options) {\n return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;\n}\nexports.jsonWriteOptions = jsonWriteOptions;\n/**\n * Merges JSON write or read options. Later values override earlier values. Type registries are merged.\n */\nfunction mergeJsonOptions(a, b) {\n var _a, _b;\n let c = Object.assign(Object.assign({}, a), b);\n c.typeRegistry = [...((_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : []), ...((_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : [])];\n return c;\n}\nexports.mergeJsonOptions = mergeJsonOptions;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MESSAGE_TYPE = void 0;\n/**\n * The symbol used as a key on message objects to store the message type.\n *\n * Note that this is an experimental feature - it is here to stay, but\n * implementation details may change without notice.\n */\nexports.MESSAGE_TYPE = Symbol.for(\"protobuf-ts/message-type\");\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lowerCamelCase = void 0;\n/**\n * Converts snake_case to lowerCamelCase.\n *\n * Should behave like protoc:\n * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118\n */\nfunction lowerCamelCase(snakeCase) {\n let capNext = false;\n const sb = [];\n for (let i = 0; i < snakeCase.length; i++) {\n let next = snakeCase.charAt(i);\n if (next == '_') {\n capNext = true;\n }\n else if (/\\d/.test(next)) {\n sb.push(next);\n capNext = true;\n }\n else if (capNext) {\n sb.push(next.toUpperCase());\n capNext = false;\n }\n else if (i == 0) {\n sb.push(next.toLowerCase());\n }\n else {\n sb.push(next);\n }\n }\n return sb.join('');\n}\nexports.lowerCamelCase = lowerCamelCase;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0;\nconst lower_camel_case_1 = require(\"./lower-camel-case\");\n/**\n * Scalar value types. This is a subset of field types declared by protobuf\n * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE\n * are omitted, but the numerical values are identical.\n */\nvar ScalarType;\n(function (ScalarType) {\n // 0 is reserved for errors.\n // Order is weird for historical reasons.\n ScalarType[ScalarType[\"DOUBLE\"] = 1] = \"DOUBLE\";\n ScalarType[ScalarType[\"FLOAT\"] = 2] = \"FLOAT\";\n // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if\n // negative values are likely.\n ScalarType[ScalarType[\"INT64\"] = 3] = \"INT64\";\n ScalarType[ScalarType[\"UINT64\"] = 4] = \"UINT64\";\n // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if\n // negative values are likely.\n ScalarType[ScalarType[\"INT32\"] = 5] = \"INT32\";\n ScalarType[ScalarType[\"FIXED64\"] = 6] = \"FIXED64\";\n ScalarType[ScalarType[\"FIXED32\"] = 7] = \"FIXED32\";\n ScalarType[ScalarType[\"BOOL\"] = 8] = \"BOOL\";\n ScalarType[ScalarType[\"STRING\"] = 9] = \"STRING\";\n // Tag-delimited aggregate.\n // Group type is deprecated and not supported in proto3. However, Proto3\n // implementations should still be able to parse the group wire format and\n // treat group fields as unknown fields.\n // TYPE_GROUP = 10,\n // TYPE_MESSAGE = 11, // Length-delimited aggregate.\n // New in version 2.\n ScalarType[ScalarType[\"BYTES\"] = 12] = \"BYTES\";\n ScalarType[ScalarType[\"UINT32\"] = 13] = \"UINT32\";\n // TYPE_ENUM = 14,\n ScalarType[ScalarType[\"SFIXED32\"] = 15] = \"SFIXED32\";\n ScalarType[ScalarType[\"SFIXED64\"] = 16] = \"SFIXED64\";\n ScalarType[ScalarType[\"SINT32\"] = 17] = \"SINT32\";\n ScalarType[ScalarType[\"SINT64\"] = 18] = \"SINT64\";\n})(ScalarType = exports.ScalarType || (exports.ScalarType = {}));\n/**\n * JavaScript representation of 64 bit integral types. Equivalent to the\n * field option \"jstype\".\n *\n * By default, protobuf-ts represents 64 bit types as `bigint`.\n *\n * You can change the default behaviour by enabling the plugin parameter\n * `long_type_string`, which will represent 64 bit types as `string`.\n *\n * Alternatively, you can change the behaviour for individual fields\n * with the field option \"jstype\":\n *\n * ```protobuf\n * uint64 my_field = 1 [jstype = JS_STRING];\n * uint64 other_field = 2 [jstype = JS_NUMBER];\n * ```\n */\nvar LongType;\n(function (LongType) {\n /**\n * Use JavaScript `bigint`.\n *\n * Field option `[jstype = JS_NORMAL]`.\n */\n LongType[LongType[\"BIGINT\"] = 0] = \"BIGINT\";\n /**\n * Use JavaScript `string`.\n *\n * Field option `[jstype = JS_STRING]`.\n */\n LongType[LongType[\"STRING\"] = 1] = \"STRING\";\n /**\n * Use JavaScript `number`.\n *\n * Large values will loose precision.\n *\n * Field option `[jstype = JS_NUMBER]`.\n */\n LongType[LongType[\"NUMBER\"] = 2] = \"NUMBER\";\n})(LongType = exports.LongType || (exports.LongType = {}));\n/**\n * Protobuf 2.1.0 introduced packed repeated fields.\n * Setting the field option `[packed = true]` enables packing.\n *\n * In proto3, all repeated fields are packed by default.\n * Setting the field option `[packed = false]` disables packing.\n *\n * Packed repeated fields are encoded with a single tag,\n * then a length-delimiter, then the element values.\n *\n * Unpacked repeated fields are encoded with a tag and\n * value for each element.\n *\n * `bytes` and `string` cannot be packed.\n */\nvar RepeatType;\n(function (RepeatType) {\n /**\n * The field is not repeated.\n */\n RepeatType[RepeatType[\"NO\"] = 0] = \"NO\";\n /**\n * The field is repeated and should be packed.\n * Invalid for `bytes` and `string`, they cannot be packed.\n */\n RepeatType[RepeatType[\"PACKED\"] = 1] = \"PACKED\";\n /**\n * The field is repeated but should not be packed.\n * The only valid repeat type for repeated `bytes` and `string`.\n */\n RepeatType[RepeatType[\"UNPACKED\"] = 2] = \"UNPACKED\";\n})(RepeatType = exports.RepeatType || (exports.RepeatType = {}));\n/**\n * Turns PartialFieldInfo into FieldInfo.\n */\nfunction normalizeFieldInfo(field) {\n var _a, _b, _c, _d;\n field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lower_camel_case_1.lowerCamelCase(field.name);\n field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lower_camel_case_1.lowerCamelCase(field.name);\n field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO;\n field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : (field.repeat ? false : field.oneof ? false : field.kind == \"message\");\n return field;\n}\nexports.normalizeFieldInfo = normalizeFieldInfo;\n/**\n * Read custom field options from a generated message type.\n *\n * @deprecated use readFieldOption()\n */\nfunction readFieldOptions(messageType, fieldName, extensionName, extensionType) {\n var _a;\n const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;\n return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;\n}\nexports.readFieldOptions = readFieldOptions;\nfunction readFieldOption(messageType, fieldName, extensionName, extensionType) {\n var _a;\n const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;\n if (!options) {\n return undefined;\n }\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readFieldOption = readFieldOption;\nfunction readMessageOption(messageType, extensionName, extensionType) {\n const options = messageType.options;\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readMessageOption = readMessageOption;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0;\n/**\n * Is the given value a valid oneof group?\n *\n * We represent protobuf `oneof` as algebraic data types (ADT) in generated\n * code. But when working with messages of unknown type, the ADT does not\n * help us.\n *\n * This type guard checks if the given object adheres to the ADT rules, which\n * are as follows:\n *\n * 1) Must be an object.\n *\n * 2) Must have a \"oneofKind\" discriminator property.\n *\n * 3) If \"oneofKind\" is `undefined`, no member field is selected. The object\n * must not have any other properties.\n *\n * 4) If \"oneofKind\" is a `string`, the member field with this name is\n * selected.\n *\n * 5) If a member field is selected, the object must have a second property\n * with this name. The property must not be `undefined`.\n *\n * 6) No extra properties are allowed. The object has either one property\n * (no selection) or two properties (selection).\n *\n */\nfunction isOneofGroup(any) {\n if (typeof any != 'object' || any === null || !any.hasOwnProperty('oneofKind')) {\n return false;\n }\n switch (typeof any.oneofKind) {\n case \"string\":\n if (any[any.oneofKind] === undefined)\n return false;\n return Object.keys(any).length == 2;\n case \"undefined\":\n return Object.keys(any).length == 1;\n default:\n return false;\n }\n}\nexports.isOneofGroup = isOneofGroup;\n/**\n * Returns the value of the given field in a oneof group.\n */\nfunction getOneofValue(oneof, kind) {\n return oneof[kind];\n}\nexports.getOneofValue = getOneofValue;\nfunction setOneofValue(oneof, kind, value) {\n if (oneof.oneofKind !== undefined) {\n delete oneof[oneof.oneofKind];\n }\n oneof.oneofKind = kind;\n if (value !== undefined) {\n oneof[kind] = value;\n }\n}\nexports.setOneofValue = setOneofValue;\nfunction setUnknownOneofValue(oneof, kind, value) {\n if (oneof.oneofKind !== undefined) {\n delete oneof[oneof.oneofKind];\n }\n oneof.oneofKind = kind;\n if (value !== undefined && kind !== undefined) {\n oneof[kind] = value;\n }\n}\nexports.setUnknownOneofValue = setUnknownOneofValue;\n/**\n * Removes the selected field in a oneof group.\n *\n * Note that the recommended way to modify a oneof group is to set\n * a new object:\n *\n * ```ts\n * message.result = { oneofKind: undefined };\n * ```\n */\nfunction clearOneofValue(oneof) {\n if (oneof.oneofKind !== undefined) {\n delete oneof[oneof.oneofKind];\n }\n oneof.oneofKind = undefined;\n}\nexports.clearOneofValue = clearOneofValue;\n/**\n * Returns the selected value of the given oneof group.\n *\n * Not that the recommended way to access a oneof group is to check\n * the \"oneofKind\" property and let TypeScript narrow down the union\n * type for you:\n *\n * ```ts\n * if (message.result.oneofKind === \"error\") {\n * message.result.error; // string\n * }\n * ```\n *\n * In the rare case you just need the value, and do not care about\n * which protobuf field is selected, you can use this function\n * for convenience.\n */\nfunction getSelectedOneofValue(oneof) {\n if (oneof.oneofKind === undefined) {\n return undefined;\n }\n return oneof[oneof.oneofKind];\n}\nexports.getSelectedOneofValue = getSelectedOneofValue;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionTypeCheck = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\nconst oneof_1 = require(\"./oneof\");\n// noinspection JSMethodCanBeStatic\nclass ReflectionTypeCheck {\n constructor(info) {\n var _a;\n this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];\n }\n prepare() {\n if (this.data)\n return;\n const req = [], known = [], oneofs = [];\n for (let field of this.fields) {\n if (field.oneof) {\n if (!oneofs.includes(field.oneof)) {\n oneofs.push(field.oneof);\n req.push(field.oneof);\n known.push(field.oneof);\n }\n }\n else {\n known.push(field.localName);\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n if (!field.opt || field.repeat)\n req.push(field.localName);\n break;\n case \"message\":\n if (field.repeat)\n req.push(field.localName);\n break;\n case \"map\":\n req.push(field.localName);\n break;\n }\n }\n }\n this.data = { req, known, oneofs: Object.values(oneofs) };\n }\n /**\n * Is the argument a valid message as specified by the\n * reflection information?\n *\n * Checks all field types recursively. The `depth`\n * specifies how deep into the structure the check will be.\n *\n * With a depth of 0, only the presence of fields\n * is checked.\n *\n * With a depth of 1 or more, the field types are checked.\n *\n * With a depth of 2 or more, the members of map, repeated\n * and message fields are checked.\n *\n * Message fields will be checked recursively with depth - 1.\n *\n * The number of map entries / repeated values being checked\n * is < depth.\n */\n is(message, depth, allowExcessProperties = false) {\n if (depth < 0)\n return true;\n if (message === null || message === undefined || typeof message != 'object')\n return false;\n this.prepare();\n let keys = Object.keys(message), data = this.data;\n // if a required field is missing in arg, this cannot be a T\n if (keys.length < data.req.length || data.req.some(n => !keys.includes(n)))\n return false;\n if (!allowExcessProperties) {\n // if the arg contains a key we dont know, this is not a literal T\n if (keys.some(k => !data.known.includes(k)))\n return false;\n }\n // \"With a depth of 0, only the presence and absence of fields is checked.\"\n // \"With a depth of 1 or more, the field types are checked.\"\n if (depth < 1) {\n return true;\n }\n // check oneof group\n for (const name of data.oneofs) {\n const group = message[name];\n if (!oneof_1.isOneofGroup(group))\n return false;\n if (group.oneofKind === undefined)\n continue;\n const field = this.fields.find(f => f.localName === group.oneofKind);\n if (!field)\n return false; // we found no field, but have a kind, something is wrong\n if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth))\n return false;\n }\n // check types\n for (const field of this.fields) {\n if (field.oneof !== undefined)\n continue;\n if (!this.field(message[field.localName], field, allowExcessProperties, depth))\n return false;\n }\n return true;\n }\n field(arg, field, allowExcessProperties, depth) {\n let repeated = field.repeat;\n switch (field.kind) {\n case \"scalar\":\n if (arg === undefined)\n return field.opt;\n if (repeated)\n return this.scalars(arg, field.T, depth, field.L);\n return this.scalar(arg, field.T, field.L);\n case \"enum\":\n if (arg === undefined)\n return field.opt;\n if (repeated)\n return this.scalars(arg, reflection_info_1.ScalarType.INT32, depth);\n return this.scalar(arg, reflection_info_1.ScalarType.INT32);\n case \"message\":\n if (arg === undefined)\n return true;\n if (repeated)\n return this.messages(arg, field.T(), allowExcessProperties, depth);\n return this.message(arg, field.T(), allowExcessProperties, depth);\n case \"map\":\n if (typeof arg != 'object' || arg === null)\n return false;\n if (depth < 2)\n return true;\n if (!this.mapKeys(arg, field.K, depth))\n return false;\n switch (field.V.kind) {\n case \"scalar\":\n return this.scalars(Object.values(arg), field.V.T, depth, field.V.L);\n case \"enum\":\n return this.scalars(Object.values(arg), reflection_info_1.ScalarType.INT32, depth);\n case \"message\":\n return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth);\n }\n break;\n }\n return true;\n }\n message(arg, type, allowExcessProperties, depth) {\n if (allowExcessProperties) {\n return type.isAssignable(arg, depth);\n }\n return type.is(arg, depth);\n }\n messages(arg, type, allowExcessProperties, depth) {\n if (!Array.isArray(arg))\n return false;\n if (depth < 2)\n return true;\n if (allowExcessProperties) {\n for (let i = 0; i < arg.length && i < depth; i++)\n if (!type.isAssignable(arg[i], depth - 1))\n return false;\n }\n else {\n for (let i = 0; i < arg.length && i < depth; i++)\n if (!type.is(arg[i], depth - 1))\n return false;\n }\n return true;\n }\n scalar(arg, type, longType) {\n let argType = typeof arg;\n switch (type) {\n case reflection_info_1.ScalarType.UINT64:\n case reflection_info_1.ScalarType.FIXED64:\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n switch (longType) {\n case reflection_info_1.LongType.BIGINT:\n return argType == \"bigint\";\n case reflection_info_1.LongType.NUMBER:\n return argType == \"number\" && !isNaN(arg);\n default:\n return argType == \"string\";\n }\n case reflection_info_1.ScalarType.BOOL:\n return argType == 'boolean';\n case reflection_info_1.ScalarType.STRING:\n return argType == 'string';\n case reflection_info_1.ScalarType.BYTES:\n return arg instanceof Uint8Array;\n case reflection_info_1.ScalarType.DOUBLE:\n case reflection_info_1.ScalarType.FLOAT:\n return argType == 'number' && !isNaN(arg);\n default:\n // case ScalarType.UINT32:\n // case ScalarType.FIXED32:\n // case ScalarType.INT32:\n // case ScalarType.SINT32:\n // case ScalarType.SFIXED32:\n return argType == 'number' && Number.isInteger(arg);\n }\n }\n scalars(arg, type, depth, longType) {\n if (!Array.isArray(arg))\n return false;\n if (depth < 2)\n return true;\n if (Array.isArray(arg))\n for (let i = 0; i < arg.length && i < depth; i++)\n if (!this.scalar(arg[i], type, longType))\n return false;\n return true;\n }\n mapKeys(map, type, depth) {\n let keys = Object.keys(map);\n switch (type) {\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n case reflection_info_1.ScalarType.UINT32:\n return this.scalars(keys.slice(0, depth).map(k => parseInt(k)), type, depth);\n case reflection_info_1.ScalarType.BOOL:\n return this.scalars(keys.slice(0, depth).map(k => k == 'true' ? true : k == 'false' ? false : k), type, depth);\n default:\n return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING);\n }\n }\n}\nexports.ReflectionTypeCheck = ReflectionTypeCheck;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionLongConvert = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\n/**\n * Utility method to convert a PbLong or PbUlong to a JavaScript\n * representation during runtime.\n *\n * Works with generated field information, `undefined` is equivalent\n * to `STRING`.\n */\nfunction reflectionLongConvert(long, type) {\n switch (type) {\n case reflection_info_1.LongType.BIGINT:\n return long.toBigInt();\n case reflection_info_1.LongType.NUMBER:\n return long.toNumber();\n default:\n // case undefined:\n // case LongType.STRING:\n return long.toString();\n }\n}\nexports.reflectionLongConvert = reflectionLongConvert;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionJsonReader = void 0;\nconst json_typings_1 = require(\"./json-typings\");\nconst base64_1 = require(\"./base64\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst pb_long_1 = require(\"./pb-long\");\nconst assert_1 = require(\"./assert\");\nconst reflection_long_convert_1 = require(\"./reflection-long-convert\");\n/**\n * Reads proto3 messages in canonical JSON format using reflection information.\n *\n * https://developers.google.com/protocol-buffers/docs/proto3#json\n */\nclass ReflectionJsonReader {\n constructor(info) {\n this.info = info;\n }\n prepare() {\n var _a;\n if (this.fMap === undefined) {\n this.fMap = {};\n const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];\n for (const field of fieldsInput) {\n this.fMap[field.name] = field;\n this.fMap[field.jsonName] = field;\n this.fMap[field.localName] = field;\n }\n }\n }\n // Cannot parse JSON for #.\n assert(condition, fieldName, jsonValue) {\n if (!condition) {\n let what = json_typings_1.typeofJsonValue(jsonValue);\n if (what == \"number\" || what == \"boolean\")\n what = jsonValue.toString();\n throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`);\n }\n }\n /**\n * Reads a message from canonical JSON format into the target message.\n *\n * Repeated fields are appended. Map entries are added, overwriting\n * existing keys.\n *\n * If a message field is already present, it will be merged with the\n * new data.\n */\n read(input, message, options) {\n this.prepare();\n const oneofsHandled = [];\n for (const [jsonKey, jsonValue] of Object.entries(input)) {\n const field = this.fMap[jsonKey];\n if (!field) {\n if (!options.ignoreUnknownFields)\n throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`);\n continue;\n }\n const localName = field.localName;\n // handle oneof ADT\n let target; // this will be the target for the field value, whether it is member of a oneof or not\n if (field.oneof) {\n if (jsonValue === null && (field.kind !== 'enum' || field.T()[0] !== 'google.protobuf.NullValue')) {\n continue;\n }\n // since json objects are unordered by specification, it is not possible to take the last of multiple oneofs\n if (oneofsHandled.includes(field.oneof))\n throw new Error(`Multiple members of the oneof group \"${field.oneof}\" of ${this.info.typeName} are present in JSON.`);\n oneofsHandled.push(field.oneof);\n target = message[field.oneof] = {\n oneofKind: localName\n };\n }\n else {\n target = message;\n }\n // we have handled oneof above. we just have read the value into `target`.\n if (field.kind == 'map') {\n if (jsonValue === null) {\n continue;\n }\n // check input\n this.assert(json_typings_1.isJsonObject(jsonValue), field.name, jsonValue);\n // our target to put map entries into\n const fieldObj = target[localName];\n // read entries\n for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) {\n this.assert(jsonObjValue !== null, field.name + \" map value\", null);\n // read value\n let val;\n switch (field.V.kind) {\n case \"message\":\n val = field.V.T().internalJsonRead(jsonObjValue, options);\n break;\n case \"enum\":\n val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields);\n if (val === false)\n continue;\n break;\n case \"scalar\":\n val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name);\n break;\n }\n this.assert(val !== undefined, field.name + \" map value\", jsonObjValue);\n // read key\n let key = jsonObjKey;\n if (field.K == reflection_info_1.ScalarType.BOOL)\n key = key == \"true\" ? true : key == \"false\" ? false : key;\n key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString();\n fieldObj[key] = val;\n }\n }\n else if (field.repeat) {\n if (jsonValue === null)\n continue;\n // check input\n this.assert(Array.isArray(jsonValue), field.name, jsonValue);\n // our target to put array entries into\n const fieldArr = target[localName];\n // read array entries\n for (const jsonItem of jsonValue) {\n this.assert(jsonItem !== null, field.name, null);\n let val;\n switch (field.kind) {\n case \"message\":\n val = field.T().internalJsonRead(jsonItem, options);\n break;\n case \"enum\":\n val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields);\n if (val === false)\n continue;\n break;\n case \"scalar\":\n val = this.scalar(jsonItem, field.T, field.L, field.name);\n break;\n }\n this.assert(val !== undefined, field.name, jsonValue);\n fieldArr.push(val);\n }\n }\n else {\n switch (field.kind) {\n case \"message\":\n if (jsonValue === null && field.T().typeName != 'google.protobuf.Value') {\n this.assert(field.oneof === undefined, field.name + \" (oneof member)\", null);\n continue;\n }\n target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]);\n break;\n case \"enum\":\n if (jsonValue === null)\n continue;\n let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields);\n if (val === false)\n continue;\n target[localName] = val;\n break;\n case \"scalar\":\n if (jsonValue === null)\n continue;\n target[localName] = this.scalar(jsonValue, field.T, field.L, field.name);\n break;\n }\n }\n }\n }\n /**\n * Returns `false` for unrecognized string representations.\n *\n * google.protobuf.NullValue accepts only JSON `null` (or the old `\"NULL_VALUE\"`).\n */\n enum(type, json, fieldName, ignoreUnknownFields) {\n if (type[0] == 'google.protobuf.NullValue')\n assert_1.assert(json === null || json === \"NULL_VALUE\", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`);\n if (json === null)\n // we require 0 to be default value for all enums\n return 0;\n switch (typeof json) {\n case \"number\":\n assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json}.`);\n return json;\n case \"string\":\n let localEnumName = json;\n if (type[2] && json.substring(0, type[2].length) === type[2])\n // lookup without the shared prefix\n localEnumName = json.substring(type[2].length);\n let enumNumber = type[1][localEnumName];\n if (typeof enumNumber === 'undefined' && ignoreUnknownFields) {\n return false;\n }\n assert_1.assert(typeof enumNumber == \"number\", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for \"${json}\".`);\n return enumNumber;\n }\n assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}\".`);\n }\n scalar(json, type, longType, fieldName) {\n let e;\n try {\n switch (type) {\n // float, double: JSON value will be a number or one of the special string values \"NaN\", \"Infinity\", and \"-Infinity\".\n // Either numbers or strings are accepted. Exponent notation is also accepted.\n case reflection_info_1.ScalarType.DOUBLE:\n case reflection_info_1.ScalarType.FLOAT:\n if (json === null)\n return .0;\n if (json === \"NaN\")\n return Number.NaN;\n if (json === \"Infinity\")\n return Number.POSITIVE_INFINITY;\n if (json === \"-Infinity\")\n return Number.NEGATIVE_INFINITY;\n if (json === \"\") {\n e = \"empty string\";\n break;\n }\n if (typeof json == \"string\" && json.trim().length !== json.length) {\n e = \"extra whitespace\";\n break;\n }\n if (typeof json != \"string\" && typeof json != \"number\") {\n break;\n }\n let float = Number(json);\n if (Number.isNaN(float)) {\n e = \"not a number\";\n break;\n }\n if (!Number.isFinite(float)) {\n // infinity and -infinity are handled by string representation above, so this is an error\n e = \"too large or small\";\n break;\n }\n if (type == reflection_info_1.ScalarType.FLOAT)\n assert_1.assertFloat32(float);\n return float;\n // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n case reflection_info_1.ScalarType.UINT32:\n if (json === null)\n return 0;\n let int32;\n if (typeof json == \"number\")\n int32 = json;\n else if (json === \"\")\n e = \"empty string\";\n else if (typeof json == \"string\") {\n if (json.trim().length !== json.length)\n e = \"extra whitespace\";\n else\n int32 = Number(json);\n }\n if (int32 === undefined)\n break;\n if (type == reflection_info_1.ScalarType.UINT32)\n assert_1.assertUInt32(int32);\n else\n assert_1.assertInt32(int32);\n return int32;\n // int64, fixed64, uint64: JSON value will be a decimal string. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n if (json === null)\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);\n if (typeof json != \"number\" && typeof json != \"string\")\n break;\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType);\n case reflection_info_1.ScalarType.FIXED64:\n case reflection_info_1.ScalarType.UINT64:\n if (json === null)\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);\n if (typeof json != \"number\" && typeof json != \"string\")\n break;\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType);\n // bool:\n case reflection_info_1.ScalarType.BOOL:\n if (json === null)\n return false;\n if (typeof json !== \"boolean\")\n break;\n return json;\n // string:\n case reflection_info_1.ScalarType.STRING:\n if (json === null)\n return \"\";\n if (typeof json !== \"string\") {\n e = \"extra whitespace\";\n break;\n }\n try {\n encodeURIComponent(json);\n }\n catch (e) {\n e = \"invalid UTF8\";\n break;\n }\n return json;\n // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.\n // Either standard or URL-safe base64 encoding with/without paddings are accepted.\n case reflection_info_1.ScalarType.BYTES:\n if (json === null || json === \"\")\n return new Uint8Array(0);\n if (typeof json !== 'string')\n break;\n return base64_1.base64decode(json);\n }\n }\n catch (error) {\n e = error.message;\n }\n this.assert(false, fieldName + (e ? \" - \" + e : \"\"), json);\n }\n}\nexports.ReflectionJsonReader = ReflectionJsonReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionJsonWriter = void 0;\nconst base64_1 = require(\"./base64\");\nconst pb_long_1 = require(\"./pb-long\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst assert_1 = require(\"./assert\");\n/**\n * Writes proto3 messages in canonical JSON format using reflection\n * information.\n *\n * https://developers.google.com/protocol-buffers/docs/proto3#json\n */\nclass ReflectionJsonWriter {\n constructor(info) {\n var _a;\n this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];\n }\n /**\n * Converts the message to a JSON object, based on the field descriptors.\n */\n write(message, options) {\n const json = {}, source = message;\n for (const field of this.fields) {\n // field is not part of a oneof, simply write as is\n if (!field.oneof) {\n let jsonValue = this.field(field, source[field.localName], options);\n if (jsonValue !== undefined)\n json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;\n continue;\n }\n // field is part of a oneof\n const group = source[field.oneof];\n if (group.oneofKind !== field.localName)\n continue; // not selected, skip\n const opt = field.kind == 'scalar' || field.kind == 'enum'\n ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options;\n let jsonValue = this.field(field, group[field.localName], opt);\n assert_1.assert(jsonValue !== undefined);\n json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;\n }\n return json;\n }\n field(field, value, options) {\n let jsonValue = undefined;\n if (field.kind == 'map') {\n assert_1.assert(typeof value == \"object\" && value !== null);\n const jsonObj = {};\n switch (field.V.kind) {\n case \"scalar\":\n for (const [entryKey, entryValue] of Object.entries(value)) {\n const val = this.scalar(field.V.T, entryValue, field.name, false, true);\n assert_1.assert(val !== undefined);\n jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key\n }\n break;\n case \"message\":\n const messageType = field.V.T();\n for (const [entryKey, entryValue] of Object.entries(value)) {\n const val = this.message(messageType, entryValue, field.name, options);\n assert_1.assert(val !== undefined);\n jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key\n }\n break;\n case \"enum\":\n const enumInfo = field.V.T();\n for (const [entryKey, entryValue] of Object.entries(value)) {\n assert_1.assert(entryValue === undefined || typeof entryValue == 'number');\n const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger);\n assert_1.assert(val !== undefined);\n jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key\n }\n break;\n }\n if (options.emitDefaultValues || Object.keys(jsonObj).length > 0)\n jsonValue = jsonObj;\n }\n else if (field.repeat) {\n assert_1.assert(Array.isArray(value));\n const jsonArr = [];\n switch (field.kind) {\n case \"scalar\":\n for (let i = 0; i < value.length; i++) {\n const val = this.scalar(field.T, value[i], field.name, field.opt, true);\n assert_1.assert(val !== undefined);\n jsonArr.push(val);\n }\n break;\n case \"enum\":\n const enumInfo = field.T();\n for (let i = 0; i < value.length; i++) {\n assert_1.assert(value[i] === undefined || typeof value[i] == 'number');\n const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger);\n assert_1.assert(val !== undefined);\n jsonArr.push(val);\n }\n break;\n case \"message\":\n const messageType = field.T();\n for (let i = 0; i < value.length; i++) {\n const val = this.message(messageType, value[i], field.name, options);\n assert_1.assert(val !== undefined);\n jsonArr.push(val);\n }\n break;\n }\n // add converted array to json output\n if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues)\n jsonValue = jsonArr;\n }\n else {\n switch (field.kind) {\n case \"scalar\":\n jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues);\n break;\n case \"enum\":\n jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger);\n break;\n case \"message\":\n jsonValue = this.message(field.T(), value, field.name, options);\n break;\n }\n }\n return jsonValue;\n }\n /**\n * Returns `null` as the default for google.protobuf.NullValue.\n */\n enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) {\n if (type[0] == 'google.protobuf.NullValue')\n return !emitDefaultValues && !optional ? undefined : null;\n if (value === undefined) {\n assert_1.assert(optional);\n return undefined;\n }\n if (value === 0 && !emitDefaultValues && !optional)\n // we require 0 to be default value for all enums\n return undefined;\n assert_1.assert(typeof value == 'number');\n assert_1.assert(Number.isInteger(value));\n if (enumAsInteger || !type[1].hasOwnProperty(value))\n // if we don't now the enum value, just return the number\n return value;\n if (type[2])\n // restore the dropped prefix\n return type[2] + type[1][value];\n return type[1][value];\n }\n message(type, value, fieldName, options) {\n if (value === undefined)\n return options.emitDefaultValues ? null : undefined;\n return type.internalJsonWrite(value, options);\n }\n scalar(type, value, fieldName, optional, emitDefaultValues) {\n if (value === undefined) {\n assert_1.assert(optional);\n return undefined;\n }\n const ed = emitDefaultValues || optional;\n // noinspection FallThroughInSwitchStatementJS\n switch (type) {\n // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n if (value === 0)\n return ed ? 0 : undefined;\n assert_1.assertInt32(value);\n return value;\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.UINT32:\n if (value === 0)\n return ed ? 0 : undefined;\n assert_1.assertUInt32(value);\n return value;\n // float, double: JSON value will be a number or one of the special string values \"NaN\", \"Infinity\", and \"-Infinity\".\n // Either numbers or strings are accepted. Exponent notation is also accepted.\n case reflection_info_1.ScalarType.FLOAT:\n assert_1.assertFloat32(value);\n case reflection_info_1.ScalarType.DOUBLE:\n if (value === 0)\n return ed ? 0 : undefined;\n assert_1.assert(typeof value == 'number');\n if (Number.isNaN(value))\n return 'NaN';\n if (value === Number.POSITIVE_INFINITY)\n return 'Infinity';\n if (value === Number.NEGATIVE_INFINITY)\n return '-Infinity';\n return value;\n // string:\n case reflection_info_1.ScalarType.STRING:\n if (value === \"\")\n return ed ? '' : undefined;\n assert_1.assert(typeof value == 'string');\n return value;\n // bool:\n case reflection_info_1.ScalarType.BOOL:\n if (value === false)\n return ed ? false : undefined;\n assert_1.assert(typeof value == 'boolean');\n return value;\n // JSON value will be a decimal string. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.UINT64:\n case reflection_info_1.ScalarType.FIXED64:\n assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');\n let ulong = pb_long_1.PbULong.from(value);\n if (ulong.isZero() && !ed)\n return undefined;\n return ulong.toString();\n // JSON value will be a decimal string. Either numbers or strings are accepted.\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');\n let long = pb_long_1.PbLong.from(value);\n if (long.isZero() && !ed)\n return undefined;\n return long.toString();\n // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.\n // Either standard or URL-safe base64 encoding with/without paddings are accepted.\n case reflection_info_1.ScalarType.BYTES:\n assert_1.assert(value instanceof Uint8Array);\n if (!value.byteLength)\n return ed ? \"\" : undefined;\n return base64_1.base64encode(value);\n }\n }\n}\nexports.ReflectionJsonWriter = ReflectionJsonWriter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionScalarDefault = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\nconst reflection_long_convert_1 = require(\"./reflection-long-convert\");\nconst pb_long_1 = require(\"./pb-long\");\n/**\n * Creates the default value for a scalar type.\n */\nfunction reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) {\n switch (type) {\n case reflection_info_1.ScalarType.BOOL:\n return false;\n case reflection_info_1.ScalarType.UINT64:\n case reflection_info_1.ScalarType.FIXED64:\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);\n case reflection_info_1.ScalarType.INT64:\n case reflection_info_1.ScalarType.SFIXED64:\n case reflection_info_1.ScalarType.SINT64:\n return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);\n case reflection_info_1.ScalarType.DOUBLE:\n case reflection_info_1.ScalarType.FLOAT:\n return 0.0;\n case reflection_info_1.ScalarType.BYTES:\n return new Uint8Array(0);\n case reflection_info_1.ScalarType.STRING:\n return \"\";\n default:\n // case ScalarType.INT32:\n // case ScalarType.UINT32:\n // case ScalarType.SINT32:\n // case ScalarType.FIXED32:\n // case ScalarType.SFIXED32:\n return 0;\n }\n}\nexports.reflectionScalarDefault = reflectionScalarDefault;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionBinaryReader = void 0;\nconst binary_format_contract_1 = require(\"./binary-format-contract\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst reflection_long_convert_1 = require(\"./reflection-long-convert\");\nconst reflection_scalar_default_1 = require(\"./reflection-scalar-default\");\n/**\n * Reads proto3 messages in binary format using reflection information.\n *\n * https://developers.google.com/protocol-buffers/docs/encoding\n */\nclass ReflectionBinaryReader {\n constructor(info) {\n this.info = info;\n }\n prepare() {\n var _a;\n if (!this.fieldNoToField) {\n const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];\n this.fieldNoToField = new Map(fieldsInput.map(field => [field.no, field]));\n }\n }\n /**\n * Reads a message from binary format into the target message.\n *\n * Repeated fields are appended. Map entries are added, overwriting\n * existing keys.\n *\n * If a message field is already present, it will be merged with the\n * new data.\n */\n read(reader, message, options, length) {\n this.prepare();\n const end = length === undefined ? reader.len : reader.pos + length;\n while (reader.pos < end) {\n // read the tag and find the field\n const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo);\n if (!field) {\n let u = options.readUnknownField;\n if (u == \"throw\")\n throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? binary_format_contract_1.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d);\n continue;\n }\n // target object for the field we are reading\n let target = message, repeated = field.repeat, localName = field.localName;\n // if field is member of oneof ADT, use ADT as target\n if (field.oneof) {\n target = target[field.oneof];\n // if other oneof member selected, set new ADT\n if (target.oneofKind !== localName)\n target = message[field.oneof] = {\n oneofKind: localName\n };\n }\n // we have handled oneof above, we just have read the value into `target[localName]`\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n let T = field.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.T;\n let L = field.kind == \"scalar\" ? field.L : undefined;\n if (repeated) {\n let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values\n if (wireType == binary_format_contract_1.WireType.LengthDelimited && T != reflection_info_1.ScalarType.STRING && T != reflection_info_1.ScalarType.BYTES) {\n let e = reader.uint32() + reader.pos;\n while (reader.pos < e)\n arr.push(this.scalar(reader, T, L));\n }\n else\n arr.push(this.scalar(reader, T, L));\n }\n else\n target[localName] = this.scalar(reader, T, L);\n break;\n case \"message\":\n if (repeated) {\n let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values\n let msg = field.T().internalBinaryRead(reader, reader.uint32(), options);\n arr.push(msg);\n }\n else\n target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]);\n break;\n case \"map\":\n let [mapKey, mapVal] = this.mapEntry(field, reader, options);\n // safe to assume presence of map object, oneof cannot contain repeated values\n target[localName][mapKey] = mapVal;\n break;\n }\n }\n }\n /**\n * Read a map field, expecting key field = 1, value field = 2\n */\n mapEntry(field, reader, options) {\n let length = reader.uint32();\n let end = reader.pos + length;\n let key = undefined; // javascript only allows number or string for object properties\n let val = undefined;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case 1:\n if (field.K == reflection_info_1.ScalarType.BOOL)\n key = reader.bool().toString();\n else\n // long types are read as string, number types are okay as number\n key = this.scalar(reader, field.K, reflection_info_1.LongType.STRING);\n break;\n case 2:\n switch (field.V.kind) {\n case \"scalar\":\n val = this.scalar(reader, field.V.T, field.V.L);\n break;\n case \"enum\":\n val = reader.int32();\n break;\n case \"message\":\n val = field.V.T().internalBinaryRead(reader, reader.uint32(), options);\n break;\n }\n break;\n default:\n throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`);\n }\n }\n if (key === undefined) {\n let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K);\n key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw;\n }\n if (val === undefined)\n switch (field.V.kind) {\n case \"scalar\":\n val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L);\n break;\n case \"enum\":\n val = 0;\n break;\n case \"message\":\n val = field.V.T().create();\n break;\n }\n return [key, val];\n }\n scalar(reader, type, longType) {\n switch (type) {\n case reflection_info_1.ScalarType.INT32:\n return reader.int32();\n case reflection_info_1.ScalarType.STRING:\n return reader.string();\n case reflection_info_1.ScalarType.BOOL:\n return reader.bool();\n case reflection_info_1.ScalarType.DOUBLE:\n return reader.double();\n case reflection_info_1.ScalarType.FLOAT:\n return reader.float();\n case reflection_info_1.ScalarType.INT64:\n return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType);\n case reflection_info_1.ScalarType.UINT64:\n return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType);\n case reflection_info_1.ScalarType.FIXED64:\n return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType);\n case reflection_info_1.ScalarType.FIXED32:\n return reader.fixed32();\n case reflection_info_1.ScalarType.BYTES:\n return reader.bytes();\n case reflection_info_1.ScalarType.UINT32:\n return reader.uint32();\n case reflection_info_1.ScalarType.SFIXED32:\n return reader.sfixed32();\n case reflection_info_1.ScalarType.SFIXED64:\n return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType);\n case reflection_info_1.ScalarType.SINT32:\n return reader.sint32();\n case reflection_info_1.ScalarType.SINT64:\n return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType);\n }\n }\n}\nexports.ReflectionBinaryReader = ReflectionBinaryReader;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReflectionBinaryWriter = void 0;\nconst binary_format_contract_1 = require(\"./binary-format-contract\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst assert_1 = require(\"./assert\");\nconst pb_long_1 = require(\"./pb-long\");\n/**\n * Writes proto3 messages in binary format using reflection information.\n *\n * https://developers.google.com/protocol-buffers/docs/encoding\n */\nclass ReflectionBinaryWriter {\n constructor(info) {\n this.info = info;\n }\n prepare() {\n if (!this.fields) {\n const fieldsInput = this.info.fields ? this.info.fields.concat() : [];\n this.fields = fieldsInput.sort((a, b) => a.no - b.no);\n }\n }\n /**\n * Writes the message to binary format.\n */\n write(message, writer, options) {\n this.prepare();\n for (const field of this.fields) {\n let value, // this will be our field value, whether it is member of a oneof or not\n emitDefault, // whether we emit the default value (only true for oneof members)\n repeated = field.repeat, localName = field.localName;\n // handle oneof ADT\n if (field.oneof) {\n const group = message[field.oneof];\n if (group.oneofKind !== localName)\n continue; // if field is not selected, skip\n value = group[localName];\n emitDefault = true;\n }\n else {\n value = message[localName];\n emitDefault = false;\n }\n // we have handled oneof above. we just have to honor `emitDefault`.\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n let T = field.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.T;\n if (repeated) {\n assert_1.assert(Array.isArray(value));\n if (repeated == reflection_info_1.RepeatType.PACKED)\n this.packed(writer, T, field.no, value);\n else\n for (const item of value)\n this.scalar(writer, T, field.no, item, true);\n }\n else if (value === undefined)\n assert_1.assert(field.opt);\n else\n this.scalar(writer, T, field.no, value, emitDefault || field.opt);\n break;\n case \"message\":\n if (repeated) {\n assert_1.assert(Array.isArray(value));\n for (const item of value)\n this.message(writer, options, field.T(), field.no, item);\n }\n else {\n this.message(writer, options, field.T(), field.no, value);\n }\n break;\n case \"map\":\n assert_1.assert(typeof value == 'object' && value !== null);\n for (const [key, val] of Object.entries(value))\n this.mapEntry(writer, options, field, key, val);\n break;\n }\n }\n let u = options.writeUnknownFields;\n if (u !== false)\n (u === true ? binary_format_contract_1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer);\n }\n mapEntry(writer, options, field, key, value) {\n writer.tag(field.no, binary_format_contract_1.WireType.LengthDelimited);\n writer.fork();\n // javascript only allows number or string for object properties\n // we convert from our representation to the protobuf type\n let keyValue = key;\n switch (field.K) {\n case reflection_info_1.ScalarType.INT32:\n case reflection_info_1.ScalarType.FIXED32:\n case reflection_info_1.ScalarType.UINT32:\n case reflection_info_1.ScalarType.SFIXED32:\n case reflection_info_1.ScalarType.SINT32:\n keyValue = Number.parseInt(key);\n break;\n case reflection_info_1.ScalarType.BOOL:\n assert_1.assert(key == 'true' || key == 'false');\n keyValue = key == 'true';\n break;\n }\n // write key, expecting key field number = 1\n this.scalar(writer, field.K, 1, keyValue, true);\n // write value, expecting value field number = 2\n switch (field.V.kind) {\n case 'scalar':\n this.scalar(writer, field.V.T, 2, value, true);\n break;\n case 'enum':\n this.scalar(writer, reflection_info_1.ScalarType.INT32, 2, value, true);\n break;\n case 'message':\n this.message(writer, options, field.V.T(), 2, value);\n break;\n }\n writer.join();\n }\n message(writer, options, handler, fieldNo, value) {\n if (value === undefined)\n return;\n handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited).fork(), options);\n writer.join();\n }\n /**\n * Write a single scalar value.\n */\n scalar(writer, type, fieldNo, value, emitDefault) {\n let [wireType, method, isDefault] = this.scalarInfo(type, value);\n if (!isDefault || emitDefault) {\n writer.tag(fieldNo, wireType);\n writer[method](value);\n }\n }\n /**\n * Write an array of scalar values in packed format.\n */\n packed(writer, type, fieldNo, value) {\n if (!value.length)\n return;\n assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING);\n // write tag\n writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited);\n // begin length-delimited\n writer.fork();\n // write values without tags\n let [, method,] = this.scalarInfo(type);\n for (let i = 0; i < value.length; i++)\n writer[method](value[i]);\n // end length delimited\n writer.join();\n }\n /**\n * Get information for writing a scalar value.\n *\n * Returns tuple:\n * [0]: appropriate WireType\n * [1]: name of the appropriate method of IBinaryWriter\n * [2]: whether the given value is a default value\n *\n * If argument `value` is omitted, [2] is always false.\n */\n scalarInfo(type, value) {\n let t = binary_format_contract_1.WireType.Varint;\n let m;\n let i = value === undefined;\n let d = value === 0;\n switch (type) {\n case reflection_info_1.ScalarType.INT32:\n m = \"int32\";\n break;\n case reflection_info_1.ScalarType.STRING:\n d = i || !value.length;\n t = binary_format_contract_1.WireType.LengthDelimited;\n m = \"string\";\n break;\n case reflection_info_1.ScalarType.BOOL:\n d = value === false;\n m = \"bool\";\n break;\n case reflection_info_1.ScalarType.UINT32:\n m = \"uint32\";\n break;\n case reflection_info_1.ScalarType.DOUBLE:\n t = binary_format_contract_1.WireType.Bit64;\n m = \"double\";\n break;\n case reflection_info_1.ScalarType.FLOAT:\n t = binary_format_contract_1.WireType.Bit32;\n m = \"float\";\n break;\n case reflection_info_1.ScalarType.INT64:\n d = i || pb_long_1.PbLong.from(value).isZero();\n m = \"int64\";\n break;\n case reflection_info_1.ScalarType.UINT64:\n d = i || pb_long_1.PbULong.from(value).isZero();\n m = \"uint64\";\n break;\n case reflection_info_1.ScalarType.FIXED64:\n d = i || pb_long_1.PbULong.from(value).isZero();\n t = binary_format_contract_1.WireType.Bit64;\n m = \"fixed64\";\n break;\n case reflection_info_1.ScalarType.BYTES:\n d = i || !value.byteLength;\n t = binary_format_contract_1.WireType.LengthDelimited;\n m = \"bytes\";\n break;\n case reflection_info_1.ScalarType.FIXED32:\n t = binary_format_contract_1.WireType.Bit32;\n m = \"fixed32\";\n break;\n case reflection_info_1.ScalarType.SFIXED32:\n t = binary_format_contract_1.WireType.Bit32;\n m = \"sfixed32\";\n break;\n case reflection_info_1.ScalarType.SFIXED64:\n d = i || pb_long_1.PbLong.from(value).isZero();\n t = binary_format_contract_1.WireType.Bit64;\n m = \"sfixed64\";\n break;\n case reflection_info_1.ScalarType.SINT32:\n m = \"sint32\";\n break;\n case reflection_info_1.ScalarType.SINT64:\n d = i || pb_long_1.PbLong.from(value).isZero();\n m = \"sint64\";\n break;\n }\n return [t, m, i || d];\n }\n}\nexports.ReflectionBinaryWriter = ReflectionBinaryWriter;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionCreate = void 0;\nconst reflection_scalar_default_1 = require(\"./reflection-scalar-default\");\nconst message_type_contract_1 = require(\"./message-type-contract\");\n/**\n * Creates an instance of the generic message, using the field\n * information.\n */\nfunction reflectionCreate(type) {\n /**\n * This ternary can be removed in the next major version.\n * The `Object.create()` code path utilizes a new `messagePrototype`\n * property on the `IMessageType` which has this same `MESSAGE_TYPE`\n * non-enumerable property on it. Doing it this way means that we only\n * pay the cost of `Object.defineProperty()` once per `IMessageType`\n * class of once per \"instance\". The falsy code path is only provided\n * for backwards compatibility in cases where the runtime library is\n * updated without also updating the generated code.\n */\n const msg = type.messagePrototype\n ? Object.create(type.messagePrototype)\n : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type });\n for (let field of type.fields) {\n let name = field.localName;\n if (field.opt)\n continue;\n if (field.oneof)\n msg[field.oneof] = { oneofKind: undefined };\n else if (field.repeat)\n msg[name] = [];\n else\n switch (field.kind) {\n case \"scalar\":\n msg[name] = reflection_scalar_default_1.reflectionScalarDefault(field.T, field.L);\n break;\n case \"enum\":\n // we require 0 to be default value for all enums\n msg[name] = 0;\n break;\n case \"map\":\n msg[name] = {};\n break;\n }\n }\n return msg;\n}\nexports.reflectionCreate = reflectionCreate;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionMergePartial = void 0;\n/**\n * Copy partial data into the target message.\n *\n * If a singular scalar or enum field is present in the source, it\n * replaces the field in the target.\n *\n * If a singular message field is present in the source, it is merged\n * with the target field by calling mergePartial() of the responsible\n * message type.\n *\n * If a repeated field is present in the source, its values replace\n * all values in the target array, removing extraneous values.\n * Repeated message fields are copied, not merged.\n *\n * If a map field is present in the source, entries are added to the\n * target map, replacing entries with the same key. Entries that only\n * exist in the target remain. Entries with message values are copied,\n * not merged.\n *\n * Note that this function differs from protobuf merge semantics,\n * which appends repeated fields.\n */\nfunction reflectionMergePartial(info, target, source) {\n let fieldValue, // the field value we are working with\n input = source, output; // where we want our field value to go\n for (let field of info.fields) {\n let name = field.localName;\n if (field.oneof) {\n const group = input[field.oneof]; // this is the oneof`s group in the source\n if ((group === null || group === void 0 ? void 0 : group.oneofKind) == undefined) { // the user is free to omit\n continue; // we skip this field, and all other members too\n }\n fieldValue = group[name]; // our value comes from the the oneof group of the source\n output = target[field.oneof]; // and our output is the oneof group of the target\n output.oneofKind = group.oneofKind; // always update discriminator\n if (fieldValue == undefined) {\n delete output[name]; // remove any existing value\n continue; // skip further work on field\n }\n }\n else {\n fieldValue = input[name]; // we are using the source directly\n output = target; // we want our field value to go directly into the target\n if (fieldValue == undefined) {\n continue; // skip further work on field, existing value is used as is\n }\n }\n if (field.repeat)\n output[name].length = fieldValue.length; // resize target array to match source array\n // now we just work with `fieldValue` and `output` to merge the value\n switch (field.kind) {\n case \"scalar\":\n case \"enum\":\n if (field.repeat)\n for (let i = 0; i < fieldValue.length; i++)\n output[name][i] = fieldValue[i]; // not a reference type\n else\n output[name] = fieldValue; // not a reference type\n break;\n case \"message\":\n let T = field.T();\n if (field.repeat)\n for (let i = 0; i < fieldValue.length; i++)\n output[name][i] = T.create(fieldValue[i]);\n else if (output[name] === undefined)\n output[name] = T.create(fieldValue); // nothing to merge with\n else\n T.mergePartial(output[name], fieldValue);\n break;\n case \"map\":\n // Map and repeated fields are simply overwritten, not appended or merged\n switch (field.V.kind) {\n case \"scalar\":\n case \"enum\":\n Object.assign(output[name], fieldValue); // elements are not reference types\n break;\n case \"message\":\n let T = field.V.T();\n for (let k of Object.keys(fieldValue))\n output[name][k] = T.create(fieldValue[k]);\n break;\n }\n break;\n }\n }\n}\nexports.reflectionMergePartial = reflectionMergePartial;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reflectionEquals = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\n/**\n * Determines whether two message of the same type have the same field values.\n * Checks for deep equality, traversing repeated fields, oneof groups, maps\n * and messages recursively.\n * Will also return true if both messages are `undefined`.\n */\nfunction reflectionEquals(info, a, b) {\n if (a === b)\n return true;\n if (!a || !b)\n return false;\n for (let field of info.fields) {\n let localName = field.localName;\n let val_a = field.oneof ? a[field.oneof][localName] : a[localName];\n let val_b = field.oneof ? b[field.oneof][localName] : b[localName];\n switch (field.kind) {\n case \"enum\":\n case \"scalar\":\n let t = field.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.T;\n if (!(field.repeat\n ? repeatedPrimitiveEq(t, val_a, val_b)\n : primitiveEq(t, val_a, val_b)))\n return false;\n break;\n case \"map\":\n if (!(field.V.kind == \"message\"\n ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b))\n : repeatedPrimitiveEq(field.V.kind == \"enum\" ? reflection_info_1.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b))))\n return false;\n break;\n case \"message\":\n let T = field.T();\n if (!(field.repeat\n ? repeatedMsgEq(T, val_a, val_b)\n : T.equals(val_a, val_b)))\n return false;\n break;\n }\n }\n return true;\n}\nexports.reflectionEquals = reflectionEquals;\nconst objectValues = Object.values;\nfunction primitiveEq(type, a, b) {\n if (a === b)\n return true;\n if (type !== reflection_info_1.ScalarType.BYTES)\n return false;\n let ba = a;\n let bb = b;\n if (ba.length !== bb.length)\n return false;\n for (let i = 0; i < ba.length; i++)\n if (ba[i] != bb[i])\n return false;\n return true;\n}\nfunction repeatedPrimitiveEq(type, a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!primitiveEq(type, a[i], b[i]))\n return false;\n return true;\n}\nfunction repeatedMsgEq(type, a, b) {\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!type.equals(a[i], b[i]))\n return false;\n return true;\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageType = void 0;\nconst message_type_contract_1 = require(\"./message-type-contract\");\nconst reflection_info_1 = require(\"./reflection-info\");\nconst reflection_type_check_1 = require(\"./reflection-type-check\");\nconst reflection_json_reader_1 = require(\"./reflection-json-reader\");\nconst reflection_json_writer_1 = require(\"./reflection-json-writer\");\nconst reflection_binary_reader_1 = require(\"./reflection-binary-reader\");\nconst reflection_binary_writer_1 = require(\"./reflection-binary-writer\");\nconst reflection_create_1 = require(\"./reflection-create\");\nconst reflection_merge_partial_1 = require(\"./reflection-merge-partial\");\nconst json_typings_1 = require(\"./json-typings\");\nconst json_format_contract_1 = require(\"./json-format-contract\");\nconst reflection_equals_1 = require(\"./reflection-equals\");\nconst binary_writer_1 = require(\"./binary-writer\");\nconst binary_reader_1 = require(\"./binary-reader\");\nconst baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));\nconst messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {};\n/**\n * This standard message type provides reflection-based\n * operations to work with a message.\n */\nclass MessageType {\n constructor(name, fields, options) {\n this.defaultCheckDepth = 16;\n this.typeName = name;\n this.fields = fields.map(reflection_info_1.normalizeFieldInfo);\n this.options = options !== null && options !== void 0 ? options : {};\n messageTypeDescriptor.value = this;\n this.messagePrototype = Object.create(null, baseDescriptors);\n this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this);\n this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this);\n this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this);\n this.refBinReader = new reflection_binary_reader_1.ReflectionBinaryReader(this);\n this.refBinWriter = new reflection_binary_writer_1.ReflectionBinaryWriter(this);\n }\n create(value) {\n let message = reflection_create_1.reflectionCreate(this);\n if (value !== undefined) {\n reflection_merge_partial_1.reflectionMergePartial(this, message, value);\n }\n return message;\n }\n /**\n * Clone the message.\n *\n * Unknown fields are discarded.\n */\n clone(message) {\n let copy = this.create();\n reflection_merge_partial_1.reflectionMergePartial(this, copy, message);\n return copy;\n }\n /**\n * Determines whether two message of the same type have the same field values.\n * Checks for deep equality, traversing repeated fields, oneof groups, maps\n * and messages recursively.\n * Will also return true if both messages are `undefined`.\n */\n equals(a, b) {\n return reflection_equals_1.reflectionEquals(this, a, b);\n }\n /**\n * Is the given value assignable to our message type\n * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?\n */\n is(arg, depth = this.defaultCheckDepth) {\n return this.refTypeCheck.is(arg, depth, false);\n }\n /**\n * Is the given value assignable to our message type,\n * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?\n */\n isAssignable(arg, depth = this.defaultCheckDepth) {\n return this.refTypeCheck.is(arg, depth, true);\n }\n /**\n * Copy partial data into the target message.\n */\n mergePartial(target, source) {\n reflection_merge_partial_1.reflectionMergePartial(this, target, source);\n }\n /**\n * Create a new message from binary format.\n */\n fromBinary(data, options) {\n let opt = binary_reader_1.binaryReadOptions(options);\n return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt);\n }\n /**\n * Read a new message from a JSON value.\n */\n fromJson(json, options) {\n return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options));\n }\n /**\n * Read a new message from a JSON string.\n * This is equivalent to `T.fromJson(JSON.parse(json))`.\n */\n fromJsonString(json, options) {\n let value = JSON.parse(json);\n return this.fromJson(value, options);\n }\n /**\n * Write the message to canonical JSON value.\n */\n toJson(message, options) {\n return this.internalJsonWrite(message, json_format_contract_1.jsonWriteOptions(options));\n }\n /**\n * Convert the message to canonical JSON string.\n * This is equivalent to `JSON.stringify(T.toJson(t))`\n */\n toJsonString(message, options) {\n var _a;\n let value = this.toJson(message, options);\n return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0);\n }\n /**\n * Write the message to binary format.\n */\n toBinary(message, options) {\n let opt = binary_writer_1.binaryWriteOptions(options);\n return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish();\n }\n /**\n * This is an internal method. If you just want to read a message from\n * JSON, use `fromJson()` or `fromJsonString()`.\n *\n * Reads JSON value and merges the fields into the target\n * according to protobuf rules. If the target is omitted,\n * a new instance is created first.\n */\n internalJsonRead(json, options, target) {\n if (json !== null && typeof json == \"object\" && !Array.isArray(json)) {\n let message = target !== null && target !== void 0 ? target : this.create();\n this.refJsonReader.read(json, message, options);\n return message;\n }\n throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`);\n }\n /**\n * This is an internal method. If you just want to write a message\n * to JSON, use `toJson()` or `toJsonString().\n *\n * Writes JSON value and returns it.\n */\n internalJsonWrite(message, options) {\n return this.refJsonWriter.write(message, options);\n }\n /**\n * This is an internal method. If you just want to write a message\n * in binary format, use `toBinary()`.\n *\n * Serializes the message in binary format and appends it to the given\n * writer. Returns passed writer.\n */\n internalBinaryWrite(message, writer, options) {\n this.refBinWriter.write(message, writer, options);\n return writer;\n }\n /**\n * This is an internal method. If you just want to read a message from\n * binary data, use `fromBinary()`.\n *\n * Reads data from binary format and merges the fields into\n * the target according to protobuf rules. If the target is\n * omitted, a new instance is created first.\n */\n internalBinaryRead(reader, length, options, target) {\n let message = target !== null && target !== void 0 ? target : this.create();\n this.refBinReader.read(reader, message, options, length);\n return message;\n }\n}\nexports.MessageType = MessageType;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.containsMessageType = void 0;\nconst message_type_contract_1 = require(\"./message-type-contract\");\n/**\n * Check if the provided object is a proto message.\n *\n * Note that this is an experimental feature - it is here to stay, but\n * implementation details may change without notice.\n */\nfunction containsMessageType(msg) {\n return msg[message_type_contract_1.MESSAGE_TYPE] != null;\n}\nexports.containsMessageType = containsMessageType;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0;\n/**\n * Is this a lookup object generated by Typescript, for a Typescript enum\n * generated by protobuf-ts?\n *\n * - No `const enum` (enum must not be inlined, we need reverse mapping).\n * - No string enum (we need int32 for protobuf).\n * - Must have a value for 0 (otherwise, we would need to support custom default values).\n */\nfunction isEnumObject(arg) {\n if (typeof arg != 'object' || arg === null) {\n return false;\n }\n if (!arg.hasOwnProperty(0)) {\n return false;\n }\n for (let k of Object.keys(arg)) {\n let num = parseInt(k);\n if (!Number.isNaN(num)) {\n // is there a name for the number?\n let nam = arg[num];\n if (nam === undefined)\n return false;\n // does the name resolve back to the number?\n if (arg[nam] !== num)\n return false;\n }\n else {\n // is there a number for the name?\n let num = arg[k];\n if (num === undefined)\n return false;\n // is it a string enum?\n if (typeof num !== 'number')\n return false;\n // do we know the number?\n if (arg[num] === undefined)\n return false;\n }\n }\n return true;\n}\nexports.isEnumObject = isEnumObject;\n/**\n * Lists all values of a Typescript enum, as an array of objects with a \"name\"\n * property and a \"number\" property.\n *\n * Note that it is possible that a number appears more than once, because it is\n * possible to have aliases in an enum.\n *\n * Throws if the enum does not adhere to the rules of enums generated by\n * protobuf-ts. See `isEnumObject()`.\n */\nfunction listEnumValues(enumObject) {\n if (!isEnumObject(enumObject))\n throw new Error(\"not a typescript enum object\");\n let values = [];\n for (let [name, number] of Object.entries(enumObject))\n if (typeof number == \"number\")\n values.push({ name, number });\n return values;\n}\nexports.listEnumValues = listEnumValues;\n/**\n * Lists the names of a Typescript enum.\n *\n * Throws if the enum does not adhere to the rules of enums generated by\n * protobuf-ts. See `isEnumObject()`.\n */\nfunction listEnumNames(enumObject) {\n return listEnumValues(enumObject).map(val => val.name);\n}\nexports.listEnumNames = listEnumNames;\n/**\n * Lists the numbers of a Typescript enum.\n *\n * Throws if the enum does not adhere to the rules of enums generated by\n * protobuf-ts. See `isEnumObject()`.\n */\nfunction listEnumNumbers(enumObject) {\n return listEnumValues(enumObject)\n .map(val => val.number)\n .filter((num, index, arr) => arr.indexOf(num) == index);\n}\nexports.listEnumNumbers = listEnumNumbers;\n", "\"use strict\";\n// Public API of the protobuf-ts runtime.\n// Note: we do not use `export * from ...` to help tree shakers,\n// webpack verbose output hints that this should be useful\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Convenience JSON typings and corresponding type guards\nvar json_typings_1 = require(\"./json-typings\");\nObject.defineProperty(exports, \"typeofJsonValue\", { enumerable: true, get: function () { return json_typings_1.typeofJsonValue; } });\nObject.defineProperty(exports, \"isJsonObject\", { enumerable: true, get: function () { return json_typings_1.isJsonObject; } });\n// Base 64 encoding\nvar base64_1 = require(\"./base64\");\nObject.defineProperty(exports, \"base64decode\", { enumerable: true, get: function () { return base64_1.base64decode; } });\nObject.defineProperty(exports, \"base64encode\", { enumerable: true, get: function () { return base64_1.base64encode; } });\n// UTF8 encoding\nvar protobufjs_utf8_1 = require(\"./protobufjs-utf8\");\nObject.defineProperty(exports, \"utf8read\", { enumerable: true, get: function () { return protobufjs_utf8_1.utf8read; } });\n// Binary format contracts, options for reading and writing, for example\nvar binary_format_contract_1 = require(\"./binary-format-contract\");\nObject.defineProperty(exports, \"WireType\", { enumerable: true, get: function () { return binary_format_contract_1.WireType; } });\nObject.defineProperty(exports, \"mergeBinaryOptions\", { enumerable: true, get: function () { return binary_format_contract_1.mergeBinaryOptions; } });\nObject.defineProperty(exports, \"UnknownFieldHandler\", { enumerable: true, get: function () { return binary_format_contract_1.UnknownFieldHandler; } });\n// Standard IBinaryReader implementation\nvar binary_reader_1 = require(\"./binary-reader\");\nObject.defineProperty(exports, \"BinaryReader\", { enumerable: true, get: function () { return binary_reader_1.BinaryReader; } });\nObject.defineProperty(exports, \"binaryReadOptions\", { enumerable: true, get: function () { return binary_reader_1.binaryReadOptions; } });\n// Standard IBinaryWriter implementation\nvar binary_writer_1 = require(\"./binary-writer\");\nObject.defineProperty(exports, \"BinaryWriter\", { enumerable: true, get: function () { return binary_writer_1.BinaryWriter; } });\nObject.defineProperty(exports, \"binaryWriteOptions\", { enumerable: true, get: function () { return binary_writer_1.binaryWriteOptions; } });\n// Int64 and UInt64 implementations required for the binary format\nvar pb_long_1 = require(\"./pb-long\");\nObject.defineProperty(exports, \"PbLong\", { enumerable: true, get: function () { return pb_long_1.PbLong; } });\nObject.defineProperty(exports, \"PbULong\", { enumerable: true, get: function () { return pb_long_1.PbULong; } });\n// JSON format contracts, options for reading and writing, for example\nvar json_format_contract_1 = require(\"./json-format-contract\");\nObject.defineProperty(exports, \"jsonReadOptions\", { enumerable: true, get: function () { return json_format_contract_1.jsonReadOptions; } });\nObject.defineProperty(exports, \"jsonWriteOptions\", { enumerable: true, get: function () { return json_format_contract_1.jsonWriteOptions; } });\nObject.defineProperty(exports, \"mergeJsonOptions\", { enumerable: true, get: function () { return json_format_contract_1.mergeJsonOptions; } });\n// Message type contract\nvar message_type_contract_1 = require(\"./message-type-contract\");\nObject.defineProperty(exports, \"MESSAGE_TYPE\", { enumerable: true, get: function () { return message_type_contract_1.MESSAGE_TYPE; } });\n// Message type implementation via reflection\nvar message_type_1 = require(\"./message-type\");\nObject.defineProperty(exports, \"MessageType\", { enumerable: true, get: function () { return message_type_1.MessageType; } });\n// Reflection info, generated by the plugin, exposed to the user, used by reflection ops\nvar reflection_info_1 = require(\"./reflection-info\");\nObject.defineProperty(exports, \"ScalarType\", { enumerable: true, get: function () { return reflection_info_1.ScalarType; } });\nObject.defineProperty(exports, \"LongType\", { enumerable: true, get: function () { return reflection_info_1.LongType; } });\nObject.defineProperty(exports, \"RepeatType\", { enumerable: true, get: function () { return reflection_info_1.RepeatType; } });\nObject.defineProperty(exports, \"normalizeFieldInfo\", { enumerable: true, get: function () { return reflection_info_1.normalizeFieldInfo; } });\nObject.defineProperty(exports, \"readFieldOptions\", { enumerable: true, get: function () { return reflection_info_1.readFieldOptions; } });\nObject.defineProperty(exports, \"readFieldOption\", { enumerable: true, get: function () { return reflection_info_1.readFieldOption; } });\nObject.defineProperty(exports, \"readMessageOption\", { enumerable: true, get: function () { return reflection_info_1.readMessageOption; } });\n// Message operations via reflection\nvar reflection_type_check_1 = require(\"./reflection-type-check\");\nObject.defineProperty(exports, \"ReflectionTypeCheck\", { enumerable: true, get: function () { return reflection_type_check_1.ReflectionTypeCheck; } });\nvar reflection_create_1 = require(\"./reflection-create\");\nObject.defineProperty(exports, \"reflectionCreate\", { enumerable: true, get: function () { return reflection_create_1.reflectionCreate; } });\nvar reflection_scalar_default_1 = require(\"./reflection-scalar-default\");\nObject.defineProperty(exports, \"reflectionScalarDefault\", { enumerable: true, get: function () { return reflection_scalar_default_1.reflectionScalarDefault; } });\nvar reflection_merge_partial_1 = require(\"./reflection-merge-partial\");\nObject.defineProperty(exports, \"reflectionMergePartial\", { enumerable: true, get: function () { return reflection_merge_partial_1.reflectionMergePartial; } });\nvar reflection_equals_1 = require(\"./reflection-equals\");\nObject.defineProperty(exports, \"reflectionEquals\", { enumerable: true, get: function () { return reflection_equals_1.reflectionEquals; } });\nvar reflection_binary_reader_1 = require(\"./reflection-binary-reader\");\nObject.defineProperty(exports, \"ReflectionBinaryReader\", { enumerable: true, get: function () { return reflection_binary_reader_1.ReflectionBinaryReader; } });\nvar reflection_binary_writer_1 = require(\"./reflection-binary-writer\");\nObject.defineProperty(exports, \"ReflectionBinaryWriter\", { enumerable: true, get: function () { return reflection_binary_writer_1.ReflectionBinaryWriter; } });\nvar reflection_json_reader_1 = require(\"./reflection-json-reader\");\nObject.defineProperty(exports, \"ReflectionJsonReader\", { enumerable: true, get: function () { return reflection_json_reader_1.ReflectionJsonReader; } });\nvar reflection_json_writer_1 = require(\"./reflection-json-writer\");\nObject.defineProperty(exports, \"ReflectionJsonWriter\", { enumerable: true, get: function () { return reflection_json_writer_1.ReflectionJsonWriter; } });\nvar reflection_contains_message_type_1 = require(\"./reflection-contains-message-type\");\nObject.defineProperty(exports, \"containsMessageType\", { enumerable: true, get: function () { return reflection_contains_message_type_1.containsMessageType; } });\n// Oneof helpers\nvar oneof_1 = require(\"./oneof\");\nObject.defineProperty(exports, \"isOneofGroup\", { enumerable: true, get: function () { return oneof_1.isOneofGroup; } });\nObject.defineProperty(exports, \"setOneofValue\", { enumerable: true, get: function () { return oneof_1.setOneofValue; } });\nObject.defineProperty(exports, \"getOneofValue\", { enumerable: true, get: function () { return oneof_1.getOneofValue; } });\nObject.defineProperty(exports, \"clearOneofValue\", { enumerable: true, get: function () { return oneof_1.clearOneofValue; } });\nObject.defineProperty(exports, \"getSelectedOneofValue\", { enumerable: true, get: function () { return oneof_1.getSelectedOneofValue; } });\n// Enum object type guard and reflection util, may be interesting to the user.\nvar enum_object_1 = require(\"./enum-object\");\nObject.defineProperty(exports, \"listEnumValues\", { enumerable: true, get: function () { return enum_object_1.listEnumValues; } });\nObject.defineProperty(exports, \"listEnumNames\", { enumerable: true, get: function () { return enum_object_1.listEnumNames; } });\nObject.defineProperty(exports, \"listEnumNumbers\", { enumerable: true, get: function () { return enum_object_1.listEnumNumbers; } });\nObject.defineProperty(exports, \"isEnumObject\", { enumerable: true, get: function () { return enum_object_1.isEnumObject; } });\n// lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages\nvar lower_camel_case_1 = require(\"./lower-camel-case\");\nObject.defineProperty(exports, \"lowerCamelCase\", { enumerable: true, get: function () { return lower_camel_case_1.lowerCamelCase; } });\n// assertion functions are exported for plugin, may also be useful to user\nvar assert_1 = require(\"./assert\");\nObject.defineProperty(exports, \"assert\", { enumerable: true, get: function () { return assert_1.assert; } });\nObject.defineProperty(exports, \"assertNever\", { enumerable: true, get: function () { return assert_1.assertNever; } });\nObject.defineProperty(exports, \"assertInt32\", { enumerable: true, get: function () { return assert_1.assertInt32; } });\nObject.defineProperty(exports, \"assertUInt32\", { enumerable: true, get: function () { return assert_1.assertUInt32; } });\nObject.defineProperty(exports, \"assertFloat32\", { enumerable: true, get: function () { return assert_1.assertFloat32; } });\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0;\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * Turns PartialMethodInfo into MethodInfo.\n */\nfunction normalizeMethodInfo(method, service) {\n var _a, _b, _c;\n let m = method;\n m.service = service;\n m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name);\n // noinspection PointlessBooleanExpressionJS\n m.serverStreaming = !!m.serverStreaming;\n // noinspection PointlessBooleanExpressionJS\n m.clientStreaming = !!m.clientStreaming;\n m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {};\n m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : undefined;\n return m;\n}\nexports.normalizeMethodInfo = normalizeMethodInfo;\n/**\n * Read custom method options from a generated service client.\n *\n * @deprecated use readMethodOption()\n */\nfunction readMethodOptions(service, methodName, extensionName, extensionType) {\n var _a;\n const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;\n return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;\n}\nexports.readMethodOptions = readMethodOptions;\nfunction readMethodOption(service, methodName, extensionName, extensionType) {\n var _a;\n const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;\n if (!options) {\n return undefined;\n }\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readMethodOption = readMethodOption;\nfunction readServiceOption(service, extensionName, extensionType) {\n const options = service.options;\n if (!options) {\n return undefined;\n }\n const optionVal = options[extensionName];\n if (optionVal === undefined) {\n return optionVal;\n }\n return extensionType ? extensionType.fromJson(optionVal) : optionVal;\n}\nexports.readServiceOption = readServiceOption;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServiceType = void 0;\nconst reflection_info_1 = require(\"./reflection-info\");\nclass ServiceType {\n constructor(typeName, methods, options) {\n this.typeName = typeName;\n this.methods = methods.map(i => reflection_info_1.normalizeMethodInfo(i, this));\n this.options = options !== null && options !== void 0 ? options : {};\n }\n}\nexports.ServiceType = ServiceType;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RpcError = void 0;\n/**\n * An error that occurred while calling a RPC method.\n */\nclass RpcError extends Error {\n constructor(message, code = 'UNKNOWN', meta) {\n super(message);\n this.name = 'RpcError';\n // see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example\n Object.setPrototypeOf(this, new.target.prototype);\n this.code = code;\n this.meta = meta !== null && meta !== void 0 ? meta : {};\n }\n toString() {\n const l = [this.name + ': ' + this.message];\n if (this.code) {\n l.push('');\n l.push('Code: ' + this.code);\n }\n if (this.serviceName && this.methodName) {\n l.push('Method: ' + this.serviceName + '/' + this.methodName);\n }\n let m = Object.entries(this.meta);\n if (m.length) {\n l.push('');\n l.push('Meta:');\n for (let [k, v] of m) {\n l.push(` ${k}: ${v}`);\n }\n }\n return l.join('\\n');\n }\n}\nexports.RpcError = RpcError;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeRpcOptions = void 0;\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * Merges custom RPC options with defaults. Returns a new instance and keeps\n * the \"defaults\" and the \"options\" unmodified.\n *\n * Merges `RpcMetadata` \"meta\", overwriting values from \"defaults\" with\n * values from \"options\". Does not append values to existing entries.\n *\n * Merges \"jsonOptions\", including \"jsonOptions.typeRegistry\", by creating\n * a new array that contains types from \"options.jsonOptions.typeRegistry\"\n * first, then types from \"defaults.jsonOptions.typeRegistry\".\n *\n * Merges \"binaryOptions\".\n *\n * Merges \"interceptors\" by creating a new array that contains interceptors\n * from \"defaults\" first, then interceptors from \"options\".\n *\n * Works with objects that extend `RpcOptions`, but only if the added\n * properties are of type Date, primitive like string, boolean, or Array\n * of primitives. If you have other property types, you have to merge them\n * yourself.\n */\nfunction mergeRpcOptions(defaults, options) {\n if (!options)\n return defaults;\n let o = {};\n copy(defaults, o);\n copy(options, o);\n for (let key of Object.keys(options)) {\n let val = options[key];\n switch (key) {\n case \"jsonOptions\":\n o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions);\n break;\n case \"binaryOptions\":\n o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions);\n break;\n case \"meta\":\n o.meta = {};\n copy(defaults.meta, o.meta);\n copy(options.meta, o.meta);\n break;\n case \"interceptors\":\n o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat();\n break;\n }\n }\n return o;\n}\nexports.mergeRpcOptions = mergeRpcOptions;\nfunction copy(a, into) {\n if (!a)\n return;\n let c = into;\n for (let [k, v] of Object.entries(a)) {\n if (v instanceof Date)\n c[k] = new Date(v.getTime());\n else if (Array.isArray(v))\n c[k] = v.concat();\n else\n c[k] = v;\n }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = exports.DeferredState = void 0;\nvar DeferredState;\n(function (DeferredState) {\n DeferredState[DeferredState[\"PENDING\"] = 0] = \"PENDING\";\n DeferredState[DeferredState[\"REJECTED\"] = 1] = \"REJECTED\";\n DeferredState[DeferredState[\"RESOLVED\"] = 2] = \"RESOLVED\";\n})(DeferredState = exports.DeferredState || (exports.DeferredState = {}));\n/**\n * A deferred promise. This is a \"controller\" for a promise, which lets you\n * pass a promise around and reject or resolve it from the outside.\n *\n * Warning: This class is to be used with care. Using it can make code very\n * difficult to read. It is intended for use in library code that exposes\n * promises, not for regular business logic.\n */\nclass Deferred {\n /**\n * @param preventUnhandledRejectionWarning - prevents the warning\n * \"Unhandled Promise rejection\" by adding a noop rejection handler.\n * Working with calls returned from the runtime-rpc package in an\n * async function usually means awaiting one call property after\n * the other. This means that the \"status\" is not being awaited when\n * an earlier await for the \"headers\" is rejected. This causes the\n * \"unhandled promise reject\" warning. A more correct behaviour for\n * calls might be to become aware whether at least one of the\n * promises is handled and swallow the rejection warning for the\n * others.\n */\n constructor(preventUnhandledRejectionWarning = true) {\n this._state = DeferredState.PENDING;\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n if (preventUnhandledRejectionWarning) {\n this._promise.catch(_ => { });\n }\n }\n /**\n * Get the current state of the promise.\n */\n get state() {\n return this._state;\n }\n /**\n * Get the deferred promise.\n */\n get promise() {\n return this._promise;\n }\n /**\n * Resolve the promise. Throws if the promise is already resolved or rejected.\n */\n resolve(value) {\n if (this.state !== DeferredState.PENDING)\n throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`);\n this._resolve(value);\n this._state = DeferredState.RESOLVED;\n }\n /**\n * Reject the promise. Throws if the promise is already resolved or rejected.\n */\n reject(reason) {\n if (this.state !== DeferredState.PENDING)\n throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`);\n this._reject(reason);\n this._state = DeferredState.REJECTED;\n }\n /**\n * Resolve the promise. Ignore if not pending.\n */\n resolvePending(val) {\n if (this._state === DeferredState.PENDING)\n this.resolve(val);\n }\n /**\n * Reject the promise. Ignore if not pending.\n */\n rejectPending(reason) {\n if (this._state === DeferredState.PENDING)\n this.reject(reason);\n }\n}\nexports.Deferred = Deferred;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RpcOutputStreamController = void 0;\nconst deferred_1 = require(\"./deferred\");\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * A `RpcOutputStream` that you control.\n */\nclass RpcOutputStreamController {\n constructor() {\n this._lis = {\n nxt: [],\n msg: [],\n err: [],\n cmp: [],\n };\n this._closed = false;\n // --- RpcOutputStream async iterator API\n // iterator state.\n // is undefined when no iterator has been acquired yet.\n this._itState = { q: [] };\n }\n // --- RpcOutputStream callback API\n onNext(callback) {\n return this.addLis(callback, this._lis.nxt);\n }\n onMessage(callback) {\n return this.addLis(callback, this._lis.msg);\n }\n onError(callback) {\n return this.addLis(callback, this._lis.err);\n }\n onComplete(callback) {\n return this.addLis(callback, this._lis.cmp);\n }\n addLis(callback, list) {\n list.push(callback);\n return () => {\n let i = list.indexOf(callback);\n if (i >= 0)\n list.splice(i, 1);\n };\n }\n // remove all listeners\n clearLis() {\n for (let l of Object.values(this._lis))\n l.splice(0, l.length);\n }\n // --- Controller API\n /**\n * Is this stream already closed by a completion or error?\n */\n get closed() {\n return this._closed !== false;\n }\n /**\n * Emit message, close with error, or close successfully, but only one\n * at a time.\n * Can be used to wrap a stream by using the other stream's `onNext`.\n */\n notifyNext(message, error, complete) {\n runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, 'only one emission at a time');\n if (message)\n this.notifyMessage(message);\n if (error)\n this.notifyError(error);\n if (complete)\n this.notifyComplete();\n }\n /**\n * Emits a new message. Throws if stream is closed.\n *\n * Triggers onNext and onMessage callbacks.\n */\n notifyMessage(message) {\n runtime_1.assert(!this.closed, 'stream is closed');\n this.pushIt({ value: message, done: false });\n this._lis.msg.forEach(l => l(message));\n this._lis.nxt.forEach(l => l(message, undefined, false));\n }\n /**\n * Closes the stream with an error. Throws if stream is closed.\n *\n * Triggers onNext and onError callbacks.\n */\n notifyError(error) {\n runtime_1.assert(!this.closed, 'stream is closed');\n this._closed = error;\n this.pushIt(error);\n this._lis.err.forEach(l => l(error));\n this._lis.nxt.forEach(l => l(undefined, error, false));\n this.clearLis();\n }\n /**\n * Closes the stream successfully. Throws if stream is closed.\n *\n * Triggers onNext and onComplete callbacks.\n */\n notifyComplete() {\n runtime_1.assert(!this.closed, 'stream is closed');\n this._closed = true;\n this.pushIt({ value: null, done: true });\n this._lis.cmp.forEach(l => l());\n this._lis.nxt.forEach(l => l(undefined, undefined, true));\n this.clearLis();\n }\n /**\n * Creates an async iterator (that can be used with `for await {...}`)\n * to consume the stream.\n *\n * Some things to note:\n * - If an error occurs, the `for await` will throw it.\n * - If an error occurred before the `for await` was started, `for await`\n * will re-throw it.\n * - If the stream is already complete, the `for await` will be empty.\n * - If your `for await` consumes slower than the stream produces,\n * for example because you are relaying messages in a slow operation,\n * messages are queued.\n */\n [Symbol.asyncIterator]() {\n // if we are closed, we are definitely not receiving any more messages.\n // but we can't let the iterator get stuck. we want to either:\n // a) finish the new iterator immediately, because we are completed\n // b) reject the new iterator, because we errored\n if (this._closed === true)\n this.pushIt({ value: null, done: true });\n else if (this._closed !== false)\n this.pushIt(this._closed);\n // the async iterator\n return {\n next: () => {\n let state = this._itState;\n runtime_1.assert(state, \"bad state\"); // if we don't have a state here, code is broken\n // there should be no pending result.\n // did the consumer call next() before we resolved our previous result promise?\n runtime_1.assert(!state.p, \"iterator contract broken\");\n // did we produce faster than the iterator consumed?\n // return the oldest result from the queue.\n let first = state.q.shift();\n if (first)\n return (\"value\" in first) ? Promise.resolve(first) : Promise.reject(first);\n // we have no result ATM, but we promise one.\n // as soon as we have a result, we must resolve promise.\n state.p = new deferred_1.Deferred();\n return state.p.promise;\n },\n };\n }\n // \"push\" a new iterator result.\n // this either resolves a pending promise, or enqueues the result.\n pushIt(result) {\n let state = this._itState;\n // is the consumer waiting for us?\n if (state.p) {\n // yes, consumer is waiting for this promise.\n const p = state.p;\n runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, \"iterator contract broken\");\n // resolve the promise\n (\"value\" in result) ? p.resolve(result) : p.reject(result);\n // must cleanup, otherwise iterator.next() would pick it up again.\n delete state.p;\n }\n else {\n // we are producing faster than the iterator consumes.\n // push result onto queue.\n state.q.push(result);\n }\n }\n}\nexports.RpcOutputStreamController = RpcOutputStreamController;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnaryCall = void 0;\n/**\n * A unary RPC call. Unary means there is exactly one input message and\n * exactly one output message unless an error occurred.\n */\nclass UnaryCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * If you are only interested in the final outcome of this call,\n * you can await it to receive a `FinishedUnaryCall`.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n request: this.request,\n headers,\n response,\n status,\n trailers\n };\n });\n }\n}\nexports.UnaryCall = UnaryCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerStreamingCall = void 0;\n/**\n * A server streaming RPC call. The client provides exactly one input message\n * but the server may respond with 0, 1, or more messages.\n */\nclass ServerStreamingCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.request = request;\n this.headers = headers;\n this.responses = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * Instead of awaiting the response status and trailers, you can\n * just as well await this call itself to receive the server outcome.\n * You should first setup some listeners to the `request` to\n * see the actual messages the server replied with.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n request: this.request,\n headers,\n status,\n trailers,\n };\n });\n }\n}\nexports.ServerStreamingCall = ServerStreamingCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientStreamingCall = void 0;\n/**\n * A client streaming RPC call. This means that the clients sends 0, 1, or\n * more messages to the server, and the server replies with exactly one\n * message.\n */\nclass ClientStreamingCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.requests = request;\n this.headers = headers;\n this.response = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * Instead of awaiting the response status and trailers, you can\n * just as well await this call itself to receive the server outcome.\n * Note that it may still be valid to send more request messages.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n headers,\n response,\n status,\n trailers\n };\n });\n }\n}\nexports.ClientStreamingCall = ClientStreamingCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DuplexStreamingCall = void 0;\n/**\n * A duplex streaming RPC call. This means that the clients sends an\n * arbitrary amount of messages to the server, while at the same time,\n * the server sends an arbitrary amount of messages to the client.\n */\nclass DuplexStreamingCall {\n constructor(method, requestHeaders, request, headers, response, status, trailers) {\n this.method = method;\n this.requestHeaders = requestHeaders;\n this.requests = request;\n this.headers = headers;\n this.responses = response;\n this.status = status;\n this.trailers = trailers;\n }\n /**\n * Instead of awaiting the response status and trailers, you can\n * just as well await this call itself to receive the server outcome.\n * Note that it may still be valid to send more request messages.\n */\n then(onfulfilled, onrejected) {\n return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));\n }\n promiseFinished() {\n return __awaiter(this, void 0, void 0, function* () {\n let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);\n return {\n method: this.method,\n requestHeaders: this.requestHeaders,\n headers,\n status,\n trailers,\n };\n });\n }\n}\nexports.DuplexStreamingCall = DuplexStreamingCall;\n", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TestTransport = void 0;\nconst rpc_error_1 = require(\"./rpc-error\");\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\nconst rpc_output_stream_1 = require(\"./rpc-output-stream\");\nconst rpc_options_1 = require(\"./rpc-options\");\nconst unary_call_1 = require(\"./unary-call\");\nconst server_streaming_call_1 = require(\"./server-streaming-call\");\nconst client_streaming_call_1 = require(\"./client-streaming-call\");\nconst duplex_streaming_call_1 = require(\"./duplex-streaming-call\");\n/**\n * Transport for testing.\n */\nclass TestTransport {\n /**\n * Initialize with mock data. Omitted fields have default value.\n */\n constructor(data) {\n /**\n * Suppress warning / error about uncaught rejections of\n * \"status\" and \"trailers\".\n */\n this.suppressUncaughtRejections = true;\n this.headerDelay = 10;\n this.responseDelay = 50;\n this.betweenResponseDelay = 10;\n this.afterResponseDelay = 10;\n this.data = data !== null && data !== void 0 ? data : {};\n }\n /**\n * Sent message(s) during the last operation.\n */\n get sentMessages() {\n if (this.lastInput instanceof TestInputStream) {\n return this.lastInput.sent;\n }\n else if (typeof this.lastInput == \"object\") {\n return [this.lastInput.single];\n }\n return [];\n }\n /**\n * Sending message(s) completed?\n */\n get sendComplete() {\n if (this.lastInput instanceof TestInputStream) {\n return this.lastInput.completed;\n }\n else if (typeof this.lastInput == \"object\") {\n return true;\n }\n return false;\n }\n // Creates a promise for response headers from the mock data.\n promiseHeaders() {\n var _a;\n const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : TestTransport.defaultHeaders;\n return headers instanceof rpc_error_1.RpcError\n ? Promise.reject(headers)\n : Promise.resolve(headers);\n }\n // Creates a promise for a single, valid, message from the mock data.\n promiseSingleResponse(method) {\n if (this.data.response instanceof rpc_error_1.RpcError) {\n return Promise.reject(this.data.response);\n }\n let r;\n if (Array.isArray(this.data.response)) {\n runtime_1.assert(this.data.response.length > 0);\n r = this.data.response[0];\n }\n else if (this.data.response !== undefined) {\n r = this.data.response;\n }\n else {\n r = method.O.create();\n }\n runtime_1.assert(method.O.is(r));\n return Promise.resolve(r);\n }\n /**\n * Pushes response messages from the mock data to the output stream.\n * If an error response, status or trailers are mocked, the stream is\n * closed with the respective error.\n * Otherwise, stream is completed successfully.\n *\n * The returned promise resolves when the stream is closed. It should\n * not reject. If it does, code is broken.\n */\n streamResponses(method, stream, abort) {\n return __awaiter(this, void 0, void 0, function* () {\n // normalize \"data.response\" into an array of valid output messages\n const messages = [];\n if (this.data.response === undefined) {\n messages.push(method.O.create());\n }\n else if (Array.isArray(this.data.response)) {\n for (let msg of this.data.response) {\n runtime_1.assert(method.O.is(msg));\n messages.push(msg);\n }\n }\n else if (!(this.data.response instanceof rpc_error_1.RpcError)) {\n runtime_1.assert(method.O.is(this.data.response));\n messages.push(this.data.response);\n }\n // start the stream with an initial delay.\n // if the request is cancelled, notify() error and exit.\n try {\n yield delay(this.responseDelay, abort)(undefined);\n }\n catch (error) {\n stream.notifyError(error);\n return;\n }\n // if error response was mocked, notify() error (stream is now closed with error) and exit.\n if (this.data.response instanceof rpc_error_1.RpcError) {\n stream.notifyError(this.data.response);\n return;\n }\n // regular response messages were mocked. notify() them.\n for (let msg of messages) {\n stream.notifyMessage(msg);\n // add a short delay between responses\n // if the request is cancelled, notify() error and exit.\n try {\n yield delay(this.betweenResponseDelay, abort)(undefined);\n }\n catch (error) {\n stream.notifyError(error);\n return;\n }\n }\n // error status was mocked, notify() error (stream is now closed with error) and exit.\n if (this.data.status instanceof rpc_error_1.RpcError) {\n stream.notifyError(this.data.status);\n return;\n }\n // error trailers were mocked, notify() error (stream is now closed with error) and exit.\n if (this.data.trailers instanceof rpc_error_1.RpcError) {\n stream.notifyError(this.data.trailers);\n return;\n }\n // stream completed successfully\n stream.notifyComplete();\n });\n }\n // Creates a promise for response status from the mock data.\n promiseStatus() {\n var _a;\n const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : TestTransport.defaultStatus;\n return status instanceof rpc_error_1.RpcError\n ? Promise.reject(status)\n : Promise.resolve(status);\n }\n // Creates a promise for response trailers from the mock data.\n promiseTrailers() {\n var _a;\n const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : TestTransport.defaultTrailers;\n return trailers instanceof rpc_error_1.RpcError\n ? Promise.reject(trailers)\n : Promise.resolve(trailers);\n }\n maybeSuppressUncaught(...promise) {\n if (this.suppressUncaughtRejections) {\n for (let p of promise) {\n p.catch(() => {\n });\n }\n }\n }\n mergeOptions(options) {\n return rpc_options_1.mergeRpcOptions({}, options);\n }\n unary(method, input, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise\n .catch(_ => {\n })\n .then(delay(this.responseDelay, options.abort))\n .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseStatus()), trailersPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = { single: input };\n return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise);\n }\n serverStreaming(method, input, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise\n .then(delay(this.responseDelay, options.abort))\n .catch(() => {\n })\n .then(() => this.streamResponses(method, outputStream, options.abort))\n .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise\n .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise\n .then(() => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = { single: input };\n return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise);\n }\n clientStreaming(method, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise\n .catch(_ => {\n })\n .then(delay(this.responseDelay, options.abort))\n .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseStatus()), trailersPromise = responsePromise\n .catch(_ => {\n })\n .then(delay(this.afterResponseDelay, options.abort))\n .then(_ => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = new TestInputStream(this.data, options.abort);\n return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise);\n }\n duplex(method, options) {\n var _a;\n const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()\n .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise\n .then(delay(this.responseDelay, options.abort))\n .catch(() => {\n })\n .then(() => this.streamResponses(method, outputStream, options.abort))\n .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise\n .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise\n .then(() => this.promiseTrailers());\n this.maybeSuppressUncaught(statusPromise, trailersPromise);\n this.lastInput = new TestInputStream(this.data, options.abort);\n return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise);\n }\n}\nexports.TestTransport = TestTransport;\nTestTransport.defaultHeaders = {\n responseHeader: \"test\"\n};\nTestTransport.defaultStatus = {\n code: \"OK\", detail: \"all good\"\n};\nTestTransport.defaultTrailers = {\n responseTrailer: \"test\"\n};\nfunction delay(ms, abort) {\n return (v) => new Promise((resolve, reject) => {\n if (abort === null || abort === void 0 ? void 0 : abort.aborted) {\n reject(new rpc_error_1.RpcError(\"user cancel\", \"CANCELLED\"));\n }\n else {\n const id = setTimeout(() => resolve(v), ms);\n if (abort) {\n abort.addEventListener(\"abort\", ev => {\n clearTimeout(id);\n reject(new rpc_error_1.RpcError(\"user cancel\", \"CANCELLED\"));\n });\n }\n }\n });\n}\nclass TestInputStream {\n constructor(data, abort) {\n this._completed = false;\n this._sent = [];\n this.data = data;\n this.abort = abort;\n }\n get sent() {\n return this._sent;\n }\n get completed() {\n return this._completed;\n }\n send(message) {\n if (this.data.inputMessage instanceof rpc_error_1.RpcError) {\n return Promise.reject(this.data.inputMessage);\n }\n const delayMs = this.data.inputMessage === undefined\n ? 10\n : this.data.inputMessage;\n return Promise.resolve(undefined)\n .then(() => {\n this._sent.push(message);\n })\n .then(delay(delayMs, this.abort));\n }\n complete() {\n if (this.data.inputComplete instanceof rpc_error_1.RpcError) {\n return Promise.reject(this.data.inputComplete);\n }\n const delayMs = this.data.inputComplete === undefined\n ? 10\n : this.data.inputComplete;\n return Promise.resolve(undefined)\n .then(() => {\n this._completed = true;\n })\n .then(delay(delayMs, this.abort));\n }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0;\nconst runtime_1 = require(\"@protobuf-ts/runtime\");\n/**\n * Creates a \"stack\" of of all interceptors specified in the given `RpcOptions`.\n * Used by generated client implementations.\n * @internal\n */\nfunction stackIntercept(kind, transport, method, options, input) {\n var _a, _b, _c, _d;\n if (kind == \"unary\") {\n let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt);\n for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter(i => i.interceptUnary).reverse()) {\n const next = tail;\n tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt);\n }\n return tail(method, input, options);\n }\n if (kind == \"serverStreaming\") {\n let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt);\n for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter(i => i.interceptServerStreaming).reverse()) {\n const next = tail;\n tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt);\n }\n return tail(method, input, options);\n }\n if (kind == \"clientStreaming\") {\n let tail = (mtd, opt) => transport.clientStreaming(mtd, opt);\n for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter(i => i.interceptClientStreaming).reverse()) {\n const next = tail;\n tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt);\n }\n return tail(method, options);\n }\n if (kind == \"duplex\") {\n let tail = (mtd, opt) => transport.duplex(mtd, opt);\n for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter(i => i.interceptDuplex).reverse()) {\n const next = tail;\n tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt);\n }\n return tail(method, options);\n }\n runtime_1.assertNever(kind);\n}\nexports.stackIntercept = stackIntercept;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackUnaryInterceptors(transport, method, input, options) {\n return stackIntercept(\"unary\", transport, method, options, input);\n}\nexports.stackUnaryInterceptors = stackUnaryInterceptors;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackServerStreamingInterceptors(transport, method, input, options) {\n return stackIntercept(\"serverStreaming\", transport, method, options, input);\n}\nexports.stackServerStreamingInterceptors = stackServerStreamingInterceptors;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackClientStreamingInterceptors(transport, method, options) {\n return stackIntercept(\"clientStreaming\", transport, method, options);\n}\nexports.stackClientStreamingInterceptors = stackClientStreamingInterceptors;\n/**\n * @deprecated replaced by `stackIntercept()`, still here to support older generated code\n */\nfunction stackDuplexStreamingInterceptors(transport, method, options) {\n return stackIntercept(\"duplex\", transport, method, options);\n}\nexports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerCallContextController = void 0;\nclass ServerCallContextController {\n constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: 'OK', detail: '' }) {\n this._cancelled = false;\n this._listeners = [];\n this.method = method;\n this.headers = headers;\n this.deadline = deadline;\n this.trailers = {};\n this._sendRH = sendResponseHeadersFn;\n this.status = defaultStatus;\n }\n /**\n * Set the call cancelled.\n *\n * Invokes all callbacks registered with onCancel() and\n * sets `cancelled = true`.\n */\n notifyCancelled() {\n if (!this._cancelled) {\n this._cancelled = true;\n for (let l of this._listeners) {\n l();\n }\n }\n }\n /**\n * Send response headers.\n */\n sendResponseHeaders(data) {\n this._sendRH(data);\n }\n /**\n * Is the call cancelled?\n *\n * When the client closes the connection before the server\n * is done, the call is cancelled.\n *\n * If you want to cancel a request on the server, throw a\n * RpcError with the CANCELLED status code.\n */\n get cancelled() {\n return this._cancelled;\n }\n /**\n * Add a callback for cancellation.\n */\n onCancel(callback) {\n const l = this._listeners;\n l.push(callback);\n return () => {\n let i = l.indexOf(callback);\n if (i >= 0)\n l.splice(i, 1);\n };\n }\n}\nexports.ServerCallContextController = ServerCallContextController;\n", "\"use strict\";\n// Public API of the rpc runtime.\n// Note: we do not use `export * from ...` to help tree shakers,\n// webpack verbose output hints that this should be useful\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar service_type_1 = require(\"./service-type\");\nObject.defineProperty(exports, \"ServiceType\", { enumerable: true, get: function () { return service_type_1.ServiceType; } });\nvar reflection_info_1 = require(\"./reflection-info\");\nObject.defineProperty(exports, \"readMethodOptions\", { enumerable: true, get: function () { return reflection_info_1.readMethodOptions; } });\nObject.defineProperty(exports, \"readMethodOption\", { enumerable: true, get: function () { return reflection_info_1.readMethodOption; } });\nObject.defineProperty(exports, \"readServiceOption\", { enumerable: true, get: function () { return reflection_info_1.readServiceOption; } });\nvar rpc_error_1 = require(\"./rpc-error\");\nObject.defineProperty(exports, \"RpcError\", { enumerable: true, get: function () { return rpc_error_1.RpcError; } });\nvar rpc_options_1 = require(\"./rpc-options\");\nObject.defineProperty(exports, \"mergeRpcOptions\", { enumerable: true, get: function () { return rpc_options_1.mergeRpcOptions; } });\nvar rpc_output_stream_1 = require(\"./rpc-output-stream\");\nObject.defineProperty(exports, \"RpcOutputStreamController\", { enumerable: true, get: function () { return rpc_output_stream_1.RpcOutputStreamController; } });\nvar test_transport_1 = require(\"./test-transport\");\nObject.defineProperty(exports, \"TestTransport\", { enumerable: true, get: function () { return test_transport_1.TestTransport; } });\nvar deferred_1 = require(\"./deferred\");\nObject.defineProperty(exports, \"Deferred\", { enumerable: true, get: function () { return deferred_1.Deferred; } });\nObject.defineProperty(exports, \"DeferredState\", { enumerable: true, get: function () { return deferred_1.DeferredState; } });\nvar duplex_streaming_call_1 = require(\"./duplex-streaming-call\");\nObject.defineProperty(exports, \"DuplexStreamingCall\", { enumerable: true, get: function () { return duplex_streaming_call_1.DuplexStreamingCall; } });\nvar client_streaming_call_1 = require(\"./client-streaming-call\");\nObject.defineProperty(exports, \"ClientStreamingCall\", { enumerable: true, get: function () { return client_streaming_call_1.ClientStreamingCall; } });\nvar server_streaming_call_1 = require(\"./server-streaming-call\");\nObject.defineProperty(exports, \"ServerStreamingCall\", { enumerable: true, get: function () { return server_streaming_call_1.ServerStreamingCall; } });\nvar unary_call_1 = require(\"./unary-call\");\nObject.defineProperty(exports, \"UnaryCall\", { enumerable: true, get: function () { return unary_call_1.UnaryCall; } });\nvar rpc_interceptor_1 = require(\"./rpc-interceptor\");\nObject.defineProperty(exports, \"stackIntercept\", { enumerable: true, get: function () { return rpc_interceptor_1.stackIntercept; } });\nObject.defineProperty(exports, \"stackDuplexStreamingInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackDuplexStreamingInterceptors; } });\nObject.defineProperty(exports, \"stackClientStreamingInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackClientStreamingInterceptors; } });\nObject.defineProperty(exports, \"stackServerStreamingInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackServerStreamingInterceptors; } });\nObject.defineProperty(exports, \"stackUnaryInterceptors\", { enumerable: true, get: function () { return rpc_interceptor_1.stackUnaryInterceptors; } });\nvar server_call_context_1 = require(\"./server-call-context\");\nObject.defineProperty(exports, \"ServerCallContextController\", { enumerable: true, get: function () { return server_call_context_1.ServerCallContextController; } });\n", "'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numeric identifiers include numeric identifiers but can be longer.\n// Therefore non-numeric identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifier, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a === b ? 0 : a < b ? -1 : 1\n }\n\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\n\nconst isPrereleaseIdentifier = (prerelease, identifier) => {\n const identifiers = identifier.split('.')\n if (identifiers.length > prerelease.length) {\n return false\n }\n\n for (let i = 0; i < identifiers.length; i++) {\n if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {\n return false\n }\n }\n\n return true\n}\n\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n if (this.major < other.major) {\n return -1\n }\n if (this.major > other.major) {\n return 1\n }\n if (this.minor < other.minor) {\n return -1\n }\n if (this.minor > other.minor) {\n return 1\n }\n if (this.patch < other.patch) {\n return -1\n }\n if (this.patch > other.patch) {\n return 1\n }\n return 0\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (isPrereleaseIdentifier(this.prerelease, identifier)) {\n const prereleaseBase = this.prerelease[identifier.split('.').length]\n if (isNaN(prereleaseBase)) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n", "'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are prereleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\n\nconst parse = require('./parse')\nconst constants = require('../internal/constants')\nconst SemVer = require('../classes/semver')\n\nconst truncate = (version, truncation, options) => {\n if (!constants.RELEASE_TYPES.includes(truncation)) {\n return null\n }\n\n const clonedVersion = cloneInputVersion(version, options)\n return clonedVersion && doTruncation(clonedVersion, truncation)\n}\n\nconst cloneInputVersion = (version, options) => {\n const versionStringToParse = (\n version instanceof SemVer ? version.version : version\n )\n\n return parse(versionStringToParse, options)\n}\n\nconst doTruncation = (version, truncation) => {\n if (isPrerelease(truncation)) {\n return version.version\n }\n\n version.prerelease = []\n\n switch (truncation) {\n case 'major':\n version.minor = 0\n version.patch = 0\n break\n case 'minor':\n version.patch = 0\n break\n }\n\n return version.format()\n}\n\nconst isPrerelease = (type) => {\n return type.startsWith('pre')\n}\n\nmodule.exports = truncate\n", "'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n", "'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // strip build metadata so it can't bleed into the version\n range = range.replace(BUILDSTRIPRE, '')\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n src,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\n// unbounded global build-metadata stripper used by parseRange\nconst BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n comp = comp.replace(re[t.BUILD], '')\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\nconst invalidXRangeOrder = (M, m, p) => (\n (isX(M) && !isX(m)) ||\n (isX(m) && p && !isX(p))\n)\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n // if we're including prereleases in the match, then the lower bound is\n // -0, the lowest possible prerelease value, just like x-ranges and carets.\n // this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n if (invalidXRangeOrder(M, m, p)) {\n return comp\n }\n\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If LT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !c.test(gt.semver)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !c.test(lt.semver)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst truncate = require('./functions/truncate')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n truncate,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", "/*!\n * Tmp\n *\n * Copyright (c) 2011-2017 KARASZI Istvan \n *\n * MIT Licensed\n */\n\n/*\n * Module dependencies.\n */\nconst fs = require('fs');\nconst os = require('os');\nconst path = require('path');\nconst crypto = require('crypto');\nconst _c = { fs: fs.constants, os: os.constants };\n\n/*\n * The working inner variables.\n */\nconst // the random characters to choose from\n RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',\n TEMPLATE_PATTERN = /XXXXXX/,\n DEFAULT_TRIES = 3,\n CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR),\n // constants are off on the windows platform and will not match the actual errno codes\n IS_WIN32 = os.platform() === 'win32',\n EBADF = _c.EBADF || _c.os.errno.EBADF,\n ENOENT = _c.ENOENT || _c.os.errno.ENOENT,\n DIR_MODE = 0o700 /* 448 */,\n FILE_MODE = 0o600 /* 384 */,\n EXIT = 'exit',\n // this will hold the objects need to be removed on exit\n _removeObjects = [],\n // API change in fs.rmdirSync leads to error when passing in a second parameter, e.g. the callback\n FN_RMDIR_SYNC = fs.rmdirSync.bind(fs);\n\nlet _gracefulCleanup = false;\n\n/**\n * Recursively remove a directory and its contents.\n *\n * @param {string} dirPath path of directory to remove\n * @param {Function} callback\n * @private\n */\nfunction rimraf(dirPath, callback) {\n return fs.rm(dirPath, { recursive: true }, callback);\n}\n\n/**\n * Recursively remove a directory and its contents, synchronously.\n *\n * @param {string} dirPath path of directory to remove\n * @private\n */\nfunction FN_RIMRAF_SYNC(dirPath) {\n return fs.rmSync(dirPath, { recursive: true });\n}\n\n/**\n * Gets a temporary file name.\n *\n * @param {(Options|tmpNameCallback)} options options or callback\n * @param {?tmpNameCallback} callback the callback function\n */\nfunction tmpName(options, callback) {\n const args = _parseArguments(options, callback),\n opts = args[0],\n cb = args[1];\n\n _assertAndSanitizeOptions(opts, function (err, sanitizedOptions) {\n if (err) return cb(err);\n\n let tries = sanitizedOptions.tries;\n (function _getUniqueName() {\n try {\n const name = _generateTmpName(sanitizedOptions);\n\n // check whether the path exists then retry if needed\n fs.stat(name, function (err) {\n /* istanbul ignore else */\n if (!err) {\n /* istanbul ignore else */\n if (tries-- > 0) return _getUniqueName();\n\n return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name));\n }\n\n cb(null, name);\n });\n } catch (err) {\n cb(err);\n }\n })();\n });\n}\n\n/**\n * Synchronous version of tmpName.\n *\n * @param {Object} options\n * @returns {string} the generated random name\n * @throws {Error} if the options are invalid or could not generate a filename\n */\nfunction tmpNameSync(options) {\n const args = _parseArguments(options),\n opts = args[0];\n\n const sanitizedOptions = _assertAndSanitizeOptionsSync(opts);\n\n let tries = sanitizedOptions.tries;\n do {\n const name = _generateTmpName(sanitizedOptions);\n try {\n fs.statSync(name);\n } catch (e) {\n return name;\n }\n } while (tries-- > 0);\n\n throw new Error('Could not get a unique tmp filename, max tries reached');\n}\n\n/**\n * Creates and opens a temporary file.\n *\n * @param {(Options|null|undefined|fileCallback)} options the config options or the callback function or null or undefined\n * @param {?fileCallback} callback\n */\nfunction file(options, callback) {\n const args = _parseArguments(options, callback),\n opts = args[0],\n cb = args[1];\n\n // gets a temporary filename\n tmpName(opts, function _tmpNameCreated(err, name) {\n /* istanbul ignore else */\n if (err) return cb(err);\n\n // create and open the file\n fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) {\n /* istanbu ignore else */\n if (err) return cb(err);\n\n if (opts.discardDescriptor) {\n return fs.close(fd, function _discardCallback(possibleErr) {\n // the chance of getting an error on close here is rather low and might occur in the most edgiest cases only\n return cb(possibleErr, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts, false));\n });\n } else {\n // detachDescriptor passes the descriptor whereas discardDescriptor closes it, either way, we no longer care\n // about the descriptor\n const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;\n cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false));\n }\n });\n });\n}\n\n/**\n * Synchronous version of file.\n *\n * @param {Options} options\n * @returns {FileSyncObject} object consists of name, fd and removeCallback\n * @throws {Error} if cannot create a file\n */\nfunction fileSync(options) {\n const args = _parseArguments(options),\n opts = args[0];\n\n const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;\n const name = tmpNameSync(opts);\n let fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);\n /* istanbul ignore else */\n if (opts.discardDescriptor) {\n fs.closeSync(fd);\n fd = undefined;\n }\n\n return {\n name: name,\n fd: fd,\n removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true)\n };\n}\n\n/**\n * Creates a temporary directory.\n *\n * @param {(Options|dirCallback)} options the options or the callback function\n * @param {?dirCallback} callback\n */\nfunction dir(options, callback) {\n const args = _parseArguments(options, callback),\n opts = args[0],\n cb = args[1];\n\n // gets a temporary filename\n tmpName(opts, function _tmpNameCreated(err, name) {\n /* istanbul ignore else */\n if (err) return cb(err);\n\n // create the directory\n fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) {\n /* istanbul ignore else */\n if (err) return cb(err);\n\n cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false));\n });\n });\n}\n\n/**\n * Synchronous version of dir.\n *\n * @param {Options} options\n * @returns {DirSyncObject} object consists of name and removeCallback\n * @throws {Error} if it cannot create a directory\n */\nfunction dirSync(options) {\n const args = _parseArguments(options),\n opts = args[0];\n\n const name = tmpNameSync(opts);\n fs.mkdirSync(name, opts.mode || DIR_MODE);\n\n return {\n name: name,\n removeCallback: _prepareTmpDirRemoveCallback(name, opts, true)\n };\n}\n\n/**\n * Removes files asynchronously.\n *\n * @param {Object} fdPath\n * @param {Function} next\n * @private\n */\nfunction _removeFileAsync(fdPath, next) {\n const _handler = function (err) {\n if (err && !_isENOENT(err)) {\n // reraise any unanticipated error\n return next(err);\n }\n next();\n };\n\n if (0 <= fdPath[0])\n fs.close(fdPath[0], function () {\n fs.unlink(fdPath[1], _handler);\n });\n else fs.unlink(fdPath[1], _handler);\n}\n\n/**\n * Removes files synchronously.\n *\n * @param {Object} fdPath\n * @private\n */\nfunction _removeFileSync(fdPath) {\n let rethrownException = null;\n try {\n if (0 <= fdPath[0]) fs.closeSync(fdPath[0]);\n } catch (e) {\n // reraise any unanticipated error\n if (!_isEBADF(e) && !_isENOENT(e)) throw e;\n } finally {\n try {\n fs.unlinkSync(fdPath[1]);\n } catch (e) {\n // reraise any unanticipated error\n if (!_isENOENT(e)) rethrownException = e;\n }\n }\n if (rethrownException !== null) {\n throw rethrownException;\n }\n}\n\n/**\n * Prepares the callback for removal of the temporary file.\n *\n * Returns either a sync callback or a async callback depending on whether\n * fileSync or file was called, which is expressed by the sync parameter.\n *\n * @param {string} name the path of the file\n * @param {number} fd file descriptor\n * @param {Object} opts\n * @param {boolean} sync\n * @returns {fileCallback | fileCallbackSync}\n * @private\n */\nfunction _prepareTmpFileRemoveCallback(name, fd, opts, sync) {\n const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync);\n const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync);\n\n if (!opts.keep) _removeObjects.unshift(removeCallbackSync);\n\n return sync ? removeCallbackSync : removeCallback;\n}\n\n/**\n * Prepares the callback for removal of the temporary directory.\n *\n * Returns either a sync callback or a async callback depending on whether\n * tmpFileSync or tmpFile was called, which is expressed by the sync parameter.\n *\n * @param {string} name\n * @param {Object} opts\n * @param {boolean} sync\n * @returns {Function} the callback\n * @private\n */\nfunction _prepareTmpDirRemoveCallback(name, opts, sync) {\n const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs);\n const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC;\n const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync);\n const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync);\n if (!opts.keep) _removeObjects.unshift(removeCallbackSync);\n\n return sync ? removeCallbackSync : removeCallback;\n}\n\n/**\n * Creates a guarded function wrapping the removeFunction call.\n *\n * The cleanup callback is save to be called multiple times.\n * Subsequent invocations will be ignored.\n *\n * @param {Function} removeFunction\n * @param {string} fileOrDirName\n * @param {boolean} sync\n * @param {cleanupCallbackSync?} cleanupCallbackSync\n * @returns {cleanupCallback | cleanupCallbackSync}\n * @private\n */\nfunction _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) {\n let called = false;\n\n // if sync is true, the next parameter will be ignored\n return function _cleanupCallback(next) {\n /* istanbul ignore else */\n if (!called) {\n // remove cleanupCallback from cache\n const toRemove = cleanupCallbackSync || _cleanupCallback;\n const index = _removeObjects.indexOf(toRemove);\n /* istanbul ignore else */\n if (index >= 0) _removeObjects.splice(index, 1);\n\n called = true;\n if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) {\n return removeFunction(fileOrDirName);\n } else {\n return removeFunction(fileOrDirName, next || function () {});\n }\n }\n };\n}\n\n/**\n * The garbage collector.\n *\n * @private\n */\nfunction _garbageCollector() {\n /* istanbul ignore else */\n if (!_gracefulCleanup) return;\n\n // the function being called removes itself from _removeObjects,\n // loop until _removeObjects is empty\n while (_removeObjects.length) {\n try {\n _removeObjects[0]();\n } catch (e) {\n // already removed?\n }\n }\n}\n\n/**\n * Random name generator based on crypto.\n * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript\n *\n * @param {number} howMany\n * @returns {string} the generated random name\n * @private\n */\nfunction _randomChars(howMany) {\n let value = [],\n rnd = null;\n\n // make sure that we do not fail because we ran out of entropy\n try {\n rnd = crypto.randomBytes(howMany);\n } catch (e) {\n rnd = crypto.pseudoRandomBytes(howMany);\n }\n\n for (let i = 0; i < howMany; i++) {\n value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);\n }\n\n return value.join('');\n}\n\n/**\n * Checks whether the `obj` parameter is defined or not.\n *\n * @param {Object} obj\n * @returns {boolean} true if the object is undefined\n * @private\n */\nfunction _isUndefined(obj) {\n return typeof obj === 'undefined';\n}\n\n/**\n * Parses the function arguments.\n *\n * This function helps to have optional arguments.\n *\n * @param {(Options|null|undefined|Function)} options\n * @param {?Function} callback\n * @returns {Array} parsed arguments\n * @private\n */\nfunction _parseArguments(options, callback) {\n /* istanbul ignore else */\n if (typeof options === 'function') {\n return [{}, options];\n }\n\n /* istanbul ignore else */\n if (_isUndefined(options)) {\n return [{}, callback];\n }\n\n // copy options so we do not leak the changes we make internally\n const actualOptions = {};\n for (const key of Object.getOwnPropertyNames(options)) {\n actualOptions[key] = options[key];\n }\n\n return [actualOptions, callback];\n}\n\n/**\n * Resolve the specified path name in respect to tmpDir.\n *\n * The specified name might include relative path components, e.g. ../\n * so we need to resolve in order to be sure that is is located inside tmpDir\n *\n * @private\n */\nfunction _resolvePath(name, tmpDir, cb) {\n const pathToResolve = path.isAbsolute(name) ? name : path.join(tmpDir, name);\n\n fs.stat(pathToResolve, function (err) {\n if (err) {\n fs.realpath(path.dirname(pathToResolve), function (err, parentDir) {\n if (err) return cb(err);\n\n cb(null, path.join(parentDir, path.basename(pathToResolve)));\n });\n } else {\n fs.realpath(pathToResolve, cb);\n }\n });\n}\n\n/**\n * Resolve the specified path name in respect to tmpDir.\n *\n * The specified name might include relative path components, e.g. ../\n * so we need to resolve in order to be sure that is is located inside tmpDir\n *\n * @private\n */\nfunction _resolvePathSync(name, tmpDir) {\n const pathToResolve = path.isAbsolute(name) ? name : path.join(tmpDir, name);\n\n try {\n fs.statSync(pathToResolve);\n return fs.realpathSync(pathToResolve);\n } catch (_err) {\n const parentDir = fs.realpathSync(path.dirname(pathToResolve));\n\n return path.join(parentDir, path.basename(pathToResolve));\n }\n}\n\n/**\n * Generates a new temporary name.\n *\n * @param {Object} opts\n * @returns {string} the new random name according to opts\n * @private\n */\nfunction _generateTmpName(opts) {\n const tmpDir = opts.tmpdir;\n\n /* istanbul ignore else */\n if (!_isUndefined(opts.name)) {\n return path.join(tmpDir, opts.dir, opts.name);\n }\n\n /* istanbul ignore else */\n if (!_isUndefined(opts.template)) {\n return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));\n }\n\n // prefix and postfix\n const name = [\n opts.prefix ? opts.prefix : 'tmp',\n '-',\n process.pid,\n '-',\n _randomChars(12),\n opts.postfix ? '-' + opts.postfix : ''\n ].join('');\n\n return path.join(tmpDir, opts.dir, name);\n}\n\n/**\n * Check the prefix, postfix, and template options.\n *\n * Rejects non-string inputs so that a non-string `.includes('..')` cannot evade\n * the substring check (e.g. an Array whose `.includes('..')` is element-wise,\n * or a duck-typed object with a custom `.includes`), and so that the value is\n * not later coerced to a string with traversal sequences via `Array.prototype.join`\n * or `path.join`.\n *\n * @private\n */\nfunction _assertPath(option, value) {\n if (typeof value !== 'string') {\n throw new Error(`${option} option must be a string, got \"${typeof value}\".`);\n }\n\n if (value.includes(\"..\")) {\n throw new Error(\"Relative value not allowed\");\n }\n\n return value;\n}\n\n/**\n * Asserts and sanitizes the basic options.\n *\n * @private\n */\nfunction _assertOptionsBase(options) {\n if (!_isUndefined(options.name)) {\n const name = options.name;\n\n // assert that name is not absolute and does not contain a path\n if (path.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found \"${name}\".`);\n\n // must not fail on valid . or .. or similar such constructs\n const basename = path.basename(name);\n if (basename === '..' || basename === '.' || basename !== name) {\n throw new Error(`name option must not contain a path, found \"${name}\".`);\n }\n }\n\n /* istanbul ignore else */\n if (!_isUndefined(options.template)) {\n if (typeof options.template !== 'string') {\n throw new Error(`template option must be a string, got \"${typeof options.template}\".`);\n }\n if (!options.template.match(TEMPLATE_PATTERN)) {\n throw new Error(`Invalid template, found \"${options.template}\".`);\n }\n }\n\n /* istanbul ignore else */\n if ((!_isUndefined(options.tries) && isNaN(options.tries)) || options.tries < 0) {\n throw new Error(`Invalid tries, found \"${options.tries}\".`);\n }\n\n // if a name was specified we will try once\n options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1;\n options.keep = !!options.keep;\n options.detachDescriptor = !!options.detachDescriptor;\n options.discardDescriptor = !!options.discardDescriptor;\n options.unsafeCleanup = !!options.unsafeCleanup;\n\n // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to\n options.prefix = _isUndefined(options.prefix) ? '' : _assertPath('prefix', options.prefix);\n options.postfix = _isUndefined(options.postfix) ? '' : _assertPath('postfix', options.postfix);\n options.template = _isUndefined(options.template) ? undefined : _assertPath('template', options.template);\n}\n\n/**\n * Gets the relative directory to tmpDir.\n *\n * @private\n */\nfunction _getRelativePath(option, name, tmpDir, cb) {\n if (_isUndefined(name)) return cb(null);\n\n _resolvePath(name, tmpDir, function (err, resolvedPath) {\n if (err) return cb(err);\n\n const relativePath = path.relative(tmpDir, resolvedPath);\n\n if (relativePath.startsWith('..') || path.isAbsolute(relativePath)) {\n return cb(new Error(`${option} option must be relative to \"${tmpDir}\", found \"${relativePath}\".`));\n }\n\n cb(null, relativePath);\n });\n}\n\n/**\n * Gets the relative path to tmpDir.\n *\n * @private\n */\nfunction _getRelativePathSync(option, name, tmpDir) {\n if (_isUndefined(name)) return;\n\n const resolvedPath = _resolvePathSync(name, tmpDir);\n const relativePath = path.relative(tmpDir, resolvedPath);\n\n if (relativePath.startsWith('..') || path.isAbsolute(relativePath)) {\n throw new Error(`${option} option must be relative to \"${tmpDir}\", found \"${relativePath}\".`);\n }\n\n return relativePath;\n}\n\n/**\n * Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing\n * options.\n *\n * @private\n */\nfunction _assertAndSanitizeOptions(options, cb) {\n _getTmpDir(options, function (err, tmpDir) {\n if (err) return cb(err);\n\n options.tmpdir = tmpDir;\n\n try {\n _assertOptionsBase(options, tmpDir);\n } catch (err) {\n return cb(err);\n }\n\n // sanitize dir, also keep (multiple) blanks if the user, purportedly sane, requests us to\n _getRelativePath('dir', options.dir, tmpDir, function (err, dir) {\n if (err) return cb(err);\n\n options.dir = _isUndefined(dir) ? '' : dir;\n\n // sanitize further if template is relative to options.dir\n _getRelativePath('template', options.template, tmpDir, function (err, template) {\n if (err) return cb(err);\n\n options.template = template;\n\n cb(null, options);\n });\n });\n });\n}\n\n/**\n * Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing\n * options.\n *\n * @private\n */\nfunction _assertAndSanitizeOptionsSync(options) {\n const tmpDir = (options.tmpdir = _getTmpDirSync(options));\n\n _assertOptionsBase(options, tmpDir);\n\n const dir = _getRelativePathSync('dir', options.dir, tmpDir);\n options.dir = _isUndefined(dir) ? '' : dir;\n\n options.template = _getRelativePathSync('template', options.template, tmpDir);\n\n return options;\n}\n\n/**\n * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows.\n *\n * @private\n */\nfunction _isEBADF(error) {\n return _isExpectedError(error, -EBADF, 'EBADF');\n}\n\n/**\n * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows.\n *\n * @private\n */\nfunction _isENOENT(error) {\n return _isExpectedError(error, -ENOENT, 'ENOENT');\n}\n\n/**\n * Helper to determine whether the expected error code matches the actual code and errno,\n * which will differ between the supported node versions.\n *\n * - Node >= 7.0:\n * error.code {string}\n * error.errno {number} any numerical value will be negated\n *\n * CAVEAT\n *\n * On windows, the errno for EBADF is -4083 but os.constants.errno.EBADF is different and we must assume that ENOENT\n * is no different here.\n *\n * @param {SystemError} error\n * @param {number} errno\n * @param {string} code\n * @private\n */\nfunction _isExpectedError(error, errno, code) {\n return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno;\n}\n\n/**\n * Sets the graceful cleanup.\n *\n * If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the\n * temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary\n * object removals.\n */\nfunction setGracefulCleanup() {\n _gracefulCleanup = true;\n}\n\n/**\n * Returns the currently configured tmp dir from os.tmpdir().\n *\n * @private\n */\nfunction _getTmpDir(options, cb) {\n return fs.realpath((options && options.tmpdir) || os.tmpdir(), cb);\n}\n\n/**\n * Returns the currently configured tmp dir from os.tmpdir().\n *\n * @private\n */\nfunction _getTmpDirSync(options) {\n return fs.realpathSync((options && options.tmpdir) || os.tmpdir());\n}\n\n// Install process exit listener\nprocess.addListener(EXIT, _garbageCollector);\n\n/**\n * Configuration options.\n *\n * @typedef {Object} Options\n * @property {?boolean} keep the temporary object (file or dir) will not be garbage collected\n * @property {?number} tries the number of tries before give up the name generation\n * @property (?int) mode the access mode, defaults are 0o700 for directories and 0o600 for files\n * @property {?string} template the \"mkstemp\" like filename template\n * @property {?string} name fixed name relative to tmpdir or the specified dir option\n * @property {?string} dir tmp directory relative to the root tmp directory in use\n * @property {?string} prefix prefix for the generated name\n * @property {?string} postfix postfix for the generated name\n * @property {?string} tmpdir the root tmp directory which overrides the os tmpdir\n * @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty\n * @property {?boolean} detachDescriptor detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection\n * @property {?boolean} discardDescriptor discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection\n */\n\n/**\n * @typedef {Object} FileSyncObject\n * @property {string} name the name of the file\n * @property {string} fd the file descriptor or -1 if the fd has been discarded\n * @property {fileCallback} removeCallback the callback function to remove the file\n */\n\n/**\n * @typedef {Object} DirSyncObject\n * @property {string} name the name of the directory\n * @property {fileCallback} removeCallback the callback function to remove the directory\n */\n\n/**\n * @callback tmpNameCallback\n * @param {?Error} err the error object if anything goes wrong\n * @param {string} name the temporary file name\n */\n\n/**\n * @callback fileCallback\n * @param {?Error} err the error object if anything goes wrong\n * @param {string} name the temporary file name\n * @param {number} fd the file descriptor or -1 if the fd had been discarded\n * @param {cleanupCallback} fn the cleanup callback function\n */\n\n/**\n * @callback fileCallbackSync\n * @param {?Error} err the error object if anything goes wrong\n * @param {string} name the temporary file name\n * @param {number} fd the file descriptor or -1 if the fd had been discarded\n * @param {cleanupCallbackSync} fn the cleanup callback function\n */\n\n/**\n * @callback dirCallback\n * @param {?Error} err the error object if anything goes wrong\n * @param {string} name the temporary file name\n * @param {cleanupCallback} fn the cleanup callback function\n */\n\n/**\n * @callback dirCallbackSync\n * @param {?Error} err the error object if anything goes wrong\n * @param {string} name the temporary file name\n * @param {cleanupCallbackSync} fn the cleanup callback function\n */\n\n/**\n * Removes the temporary created file or directory.\n *\n * @callback cleanupCallback\n * @param {simpleCallback} [next] function to call whenever the tmp object needs to be removed\n */\n\n/**\n * Removes the temporary created file or directory.\n *\n * @callback cleanupCallbackSync\n */\n\n/**\n * Callback function for function composition.\n * @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57}\n *\n * @callback simpleCallback\n */\n\n// exporting all the needed methods\n\n// evaluate _getTmpDir() lazily, mainly for simplifying testing but it also will\n// allow users to reconfigure the temporary directory\nObject.defineProperty(module.exports, 'tmpdir', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _getTmpDirSync();\n }\n});\n\nmodule.exports.dir = dir;\nmodule.exports.dirSync = dirSync;\n\nmodule.exports.file = file;\nmodule.exports.fileSync = fileSync;\n\nmodule.exports.tmpName = tmpName;\nmodule.exports.tmpNameSync = tmpNameSync;\n\nmodule.exports.setGracefulCleanup = setGracefulCleanup;\n", "const escape = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`',\n '=': '='\n};\n\nconst badChars = /[&<>\"'`=]/g,\n possible = /[&<>\"'`=]/;\n\nfunction escapeChar(chr) {\n return escape[chr];\n}\n\nexport function extend(obj /* , ...source */) {\n for (let i = 1; i < arguments.length; i++) {\n for (let key in arguments[i]) {\n if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {\n obj[key] = arguments[i][key];\n }\n }\n }\n\n return obj;\n}\n\nexport let toString = Object.prototype.toString;\n\n// Sourced from lodash\n// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\n/* eslint-disable func-style */\nlet isFunction = function(value) {\n return typeof value === 'function';\n};\n// fallback for older versions of Chrome and Safari\n/* istanbul ignore next */\nif (isFunction(/x/)) {\n isFunction = function(value) {\n return (\n typeof value === 'function' &&\n toString.call(value) === '[object Function]'\n );\n };\n}\nexport { isFunction };\n/* eslint-enable func-style */\n\n/* istanbul ignore next */\nexport const isArray =\n Array.isArray ||\n function(value) {\n return value && typeof value === 'object'\n ? toString.call(value) === '[object Array]'\n : false;\n };\n\n// Older IE versions do not directly support indexOf so we must implement our own, sadly.\nexport function indexOf(array, value) {\n for (let i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}\n\nexport function escapeExpression(string) {\n if (typeof string !== 'string') {\n // don't escape SafeStrings, since they're already safe\n if (string && string.toHTML) {\n return string.toHTML();\n } else if (string == null) {\n return '';\n } else if (!string) {\n return string + '';\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = '' + string;\n }\n\n if (!possible.test(string)) {\n return string;\n }\n return string.replace(badChars, escapeChar);\n}\n\nexport function isEmpty(value) {\n if (!value && value !== 0) {\n return true;\n } else if (isArray(value) && value.length === 0) {\n return true;\n } else {\n return false;\n }\n}\n\nexport function createFrame(object) {\n let frame = extend({}, object);\n frame._parent = object;\n return frame;\n}\n\nexport function blockParams(params, ids) {\n params.path = ids;\n return params;\n}\n\nexport function appendContextPath(contextPath, id) {\n return (contextPath ? contextPath + '.' : '') + id;\n}\n", "const errorProps = [\n 'description',\n 'fileName',\n 'lineNumber',\n 'endLineNumber',\n 'message',\n 'name',\n 'number',\n 'stack'\n];\n\nfunction Exception(message, node) {\n let loc = node && node.loc,\n line,\n endLineNumber,\n column,\n endColumn;\n\n if (loc) {\n line = loc.start.line;\n endLineNumber = loc.end.line;\n column = loc.start.column;\n endColumn = loc.end.column;\n\n message += ' - ' + line + ':' + column;\n }\n\n let tmp = Error.prototype.constructor.call(this, message);\n\n // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n for (let idx = 0; idx < errorProps.length; idx++) {\n this[errorProps[idx]] = tmp[errorProps[idx]];\n }\n\n /* istanbul ignore else */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, Exception);\n }\n\n try {\n if (loc) {\n this.lineNumber = line;\n this.endLineNumber = endLineNumber;\n\n // Work around issue under safari where we can't directly set the column value\n /* istanbul ignore next */\n if (Object.defineProperty) {\n Object.defineProperty(this, 'column', {\n value: column,\n enumerable: true\n });\n Object.defineProperty(this, 'endColumn', {\n value: endColumn,\n enumerable: true\n });\n } else {\n this.column = column;\n this.endColumn = endColumn;\n }\n }\n } catch (nop) {\n /* Ignore if the browser is very particular */\n }\n}\n\nException.prototype = new Error();\n\nexport default Exception;\n", "import { appendContextPath, createFrame, isArray } from '../utils';\n\nexport default function(instance) {\n instance.registerHelper('blockHelperMissing', function(context, options) {\n let inverse = options.inverse,\n fn = options.fn;\n\n if (context === true) {\n return fn(this);\n } else if (context === false || context == null) {\n return inverse(this);\n } else if (isArray(context)) {\n if (context.length > 0) {\n if (options.ids) {\n options.ids = [options.name];\n }\n\n return instance.helpers.each(context, options);\n } else {\n return inverse(this);\n }\n } else {\n if (options.data && options.ids) {\n let data = createFrame(options.data);\n data.contextPath = appendContextPath(\n options.data.contextPath,\n options.name\n );\n options = { data: data };\n }\n\n return fn(context, options);\n }\n });\n}\n", "import {\n appendContextPath,\n blockParams,\n createFrame,\n isArray,\n isFunction\n} from '../utils';\nimport Exception from '../exception';\n\nexport default function(instance) {\n instance.registerHelper('each', function(context, options) {\n if (!options) {\n throw new Exception('Must pass iterator to #each');\n }\n\n let fn = options.fn,\n inverse = options.inverse,\n i = 0,\n ret = '',\n data,\n contextPath;\n\n if (options.data && options.ids) {\n contextPath =\n appendContextPath(options.data.contextPath, options.ids[0]) + '.';\n }\n\n if (isFunction(context)) {\n context = context.call(this);\n }\n\n if (options.data) {\n data = createFrame(options.data);\n }\n\n function execIteration(field, index, last) {\n if (data) {\n data.key = field;\n data.index = index;\n data.first = index === 0;\n data.last = !!last;\n\n if (contextPath) {\n data.contextPath = contextPath + field;\n }\n }\n\n ret =\n ret +\n fn(context[field], {\n data: data,\n blockParams: blockParams(\n [context[field], field],\n [contextPath + field, null]\n )\n });\n }\n\n if (context && typeof context === 'object') {\n if (isArray(context)) {\n for (let j = context.length; i < j; i++) {\n if (i in context) {\n execIteration(i, i, i === context.length - 1);\n }\n }\n } else if (typeof Symbol === 'function' && context[Symbol.iterator]) {\n const newContext = [];\n const iterator = context[Symbol.iterator]();\n for (let it = iterator.next(); !it.done; it = iterator.next()) {\n newContext.push(it.value);\n }\n context = newContext;\n for (let j = context.length; i < j; i++) {\n execIteration(i, i, i === context.length - 1);\n }\n } else {\n let priorKey;\n\n Object.keys(context).forEach(key => {\n // We're running the iterations one step out of sync so we can detect\n // the last iteration without have to scan the object twice and create\n // an itermediate keys array.\n if (priorKey !== undefined) {\n execIteration(priorKey, i - 1);\n }\n priorKey = key;\n i++;\n });\n if (priorKey !== undefined) {\n execIteration(priorKey, i - 1, true);\n }\n }\n }\n\n if (i === 0) {\n ret = inverse(this);\n }\n\n return ret;\n });\n}\n", "import Exception from '../exception';\n\nexport default function(instance) {\n instance.registerHelper('helperMissing', function(/* [args, ]options */) {\n if (arguments.length === 1) {\n // A missing field in a {{foo}} construct.\n return undefined;\n } else {\n // Someone is actually trying to call something, blow up.\n throw new Exception(\n 'Missing helper: \"' + arguments[arguments.length - 1].name + '\"'\n );\n }\n });\n}\n", "import { isEmpty, isFunction } from '../utils';\nimport Exception from '../exception';\n\nexport default function(instance) {\n instance.registerHelper('if', function(conditional, options) {\n if (arguments.length != 2) {\n throw new Exception('#if requires exactly one argument');\n }\n if (isFunction(conditional)) {\n conditional = conditional.call(this);\n }\n\n // Default behavior is to render the positive path if the value is truthy and not empty.\n // The `includeZero` option may be set to treat the condtional as purely not empty based on the\n // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.\n if ((!options.hash.includeZero && !conditional) || isEmpty(conditional)) {\n return options.inverse(this);\n } else {\n return options.fn(this);\n }\n });\n\n instance.registerHelper('unless', function(conditional, options) {\n if (arguments.length != 2) {\n throw new Exception('#unless requires exactly one argument');\n }\n return instance.helpers['if'].call(this, conditional, {\n fn: options.inverse,\n inverse: options.fn,\n hash: options.hash\n });\n });\n}\n", "export default function(instance) {\n instance.registerHelper('log', function(/* message, options */) {\n let args = [undefined],\n options = arguments[arguments.length - 1];\n for (let i = 0; i < arguments.length - 1; i++) {\n args.push(arguments[i]);\n }\n\n let level = 1;\n if (options.hash.level != null) {\n level = options.hash.level;\n } else if (options.data && options.data.level != null) {\n level = options.data.level;\n }\n args[0] = level;\n\n instance.log(...args);\n });\n}\n", "export default function(instance) {\n instance.registerHelper('lookup', function(obj, field, options) {\n if (!obj) {\n // Note for 5.0: Change to \"obj == null\" in 5.0\n return obj;\n }\n return options.lookupProperty(obj, field);\n });\n}\n", "import {\n appendContextPath,\n blockParams,\n createFrame,\n isEmpty,\n isFunction\n} from '../utils';\nimport Exception from '../exception';\n\nexport default function(instance) {\n instance.registerHelper('with', function(context, options) {\n if (arguments.length != 2) {\n throw new Exception('#with requires exactly one argument');\n }\n if (isFunction(context)) {\n context = context.call(this);\n }\n\n let fn = options.fn;\n\n if (!isEmpty(context)) {\n let data = options.data;\n if (options.data && options.ids) {\n data = createFrame(options.data);\n data.contextPath = appendContextPath(\n options.data.contextPath,\n options.ids[0]\n );\n }\n\n return fn(context, {\n data: data,\n blockParams: blockParams([context], [data && data.contextPath])\n });\n } else {\n return options.inverse(this);\n }\n });\n}\n", "import registerBlockHelperMissing from './helpers/block-helper-missing';\nimport registerEach from './helpers/each';\nimport registerHelperMissing from './helpers/helper-missing';\nimport registerIf from './helpers/if';\nimport registerLog from './helpers/log';\nimport registerLookup from './helpers/lookup';\nimport registerWith from './helpers/with';\n\nexport function registerDefaultHelpers(instance) {\n registerBlockHelperMissing(instance);\n registerEach(instance);\n registerHelperMissing(instance);\n registerIf(instance);\n registerLog(instance);\n registerLookup(instance);\n registerWith(instance);\n}\n\nexport function moveHelperToHooks(instance, helperName, keepHelper) {\n if (instance.helpers[helperName]) {\n instance.hooks[helperName] = instance.helpers[helperName];\n if (!keepHelper) {\n // Using delete is slow\n instance.helpers[helperName] = undefined;\n }\n }\n}\n", "import { extend } from '../utils';\n\nexport default function(instance) {\n instance.registerDecorator('inline', function(fn, props, container, options) {\n let ret = fn;\n if (!props.partials) {\n props.partials = {};\n ret = function(context, options) {\n // Create a new partials stack frame prior to exec.\n let original = container.partials;\n container.partials = extend({}, original, props.partials);\n let ret = fn(context, options);\n container.partials = original;\n return ret;\n };\n }\n\n props.partials[options.args[0]] = options.fn;\n\n return ret;\n });\n}\n", "import registerInline from './decorators/inline';\n\nexport function registerDefaultDecorators(instance) {\n registerInline(instance);\n}\n", "import { indexOf } from './utils';\n\nlet logger = {\n methodMap: ['debug', 'info', 'warn', 'error'],\n level: 'info',\n\n // Maps a given level value to the `methodMap` indexes above.\n lookupLevel: function(level) {\n if (typeof level === 'string') {\n let levelMap = indexOf(logger.methodMap, level.toLowerCase());\n if (levelMap >= 0) {\n level = levelMap;\n } else {\n level = parseInt(level, 10);\n }\n }\n\n return level;\n },\n\n // Can be overridden in the host environment\n log: function(level, ...message) {\n level = logger.lookupLevel(level);\n\n if (\n typeof console !== 'undefined' &&\n logger.lookupLevel(logger.level) <= level\n ) {\n let method = logger.methodMap[level];\n // eslint-disable-next-line no-console\n if (!console[method]) {\n method = 'log';\n }\n console[method](...message); // eslint-disable-line no-console\n }\n }\n};\n\nexport default logger;\n", "import { extend } from '../utils';\nimport logger from '../logger';\n\nconst loggedProperties = Object.create(null);\n\nexport function createProtoAccessControl(runtimeOptions) {\n // Create an object with \"null\"-prototype to avoid truthy results on\n // prototype properties.\n const propertyWhiteList = Object.create(null);\n // eslint-disable-next-line no-proto\n propertyWhiteList['__proto__'] = false;\n extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);\n\n const methodWhiteList = Object.create(null);\n methodWhiteList['constructor'] = false;\n methodWhiteList['__defineGetter__'] = false;\n methodWhiteList['__defineSetter__'] = false;\n methodWhiteList['__lookupGetter__'] = false;\n methodWhiteList['__lookupSetter__'] = false;\n extend(methodWhiteList, runtimeOptions.allowedProtoMethods);\n\n return {\n properties: {\n whitelist: propertyWhiteList,\n defaultValue: runtimeOptions.allowProtoPropertiesByDefault\n },\n methods: {\n whitelist: methodWhiteList,\n defaultValue: runtimeOptions.allowProtoMethodsByDefault\n }\n };\n}\n\nexport function resultIsAllowed(result, protoAccessControl, propertyName) {\n if (typeof result === 'function') {\n return checkWhiteList(protoAccessControl.methods, propertyName);\n } else {\n return checkWhiteList(protoAccessControl.properties, propertyName);\n }\n}\n\nfunction checkWhiteList(protoAccessControlForType, propertyName) {\n if (protoAccessControlForType.whitelist[propertyName] !== undefined) {\n return protoAccessControlForType.whitelist[propertyName] === true;\n }\n if (protoAccessControlForType.defaultValue !== undefined) {\n return protoAccessControlForType.defaultValue;\n }\n logUnexpecedPropertyAccessOnce(propertyName);\n return false;\n}\n\nfunction logUnexpecedPropertyAccessOnce(propertyName) {\n if (loggedProperties[propertyName] !== true) {\n loggedProperties[propertyName] = true;\n logger.log(\n 'error',\n `Handlebars: Access has been denied to resolve the property \"${propertyName}\" because it is not an \"own property\" of its parent.\\n` +\n `You can add a runtime option to disable the check or this warning:\\n` +\n `See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`\n );\n }\n}\n\nexport function resetLoggedProperties() {\n Object.keys(loggedProperties).forEach(propertyName => {\n delete loggedProperties[propertyName];\n });\n}\n", "import { createFrame, extend, toString } from './utils';\nimport Exception from './exception';\nimport { registerDefaultHelpers } from './helpers';\nimport { registerDefaultDecorators } from './decorators';\nimport logger from './logger';\nimport { resetLoggedProperties } from './internal/proto-access';\n\nexport const VERSION = '4.7.9';\nexport const COMPILER_REVISION = 8;\nexport const LAST_COMPATIBLE_COMPILER_REVISION = 7;\n\nexport const REVISION_CHANGES = {\n 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n 2: '== 1.0.0-rc.3',\n 3: '== 1.0.0-rc.4',\n 4: '== 1.x.x',\n 5: '== 2.0.0-alpha.x',\n 6: '>= 2.0.0-beta.1',\n 7: '>= 4.0.0 <4.3.0',\n 8: '>= 4.3.0'\n};\n\nconst objectType = '[object Object]';\n\nexport function HandlebarsEnvironment(helpers, partials, decorators) {\n this.helpers = helpers || {};\n this.partials = partials || {};\n this.decorators = decorators || {};\n\n registerDefaultHelpers(this);\n registerDefaultDecorators(this);\n}\n\nHandlebarsEnvironment.prototype = {\n constructor: HandlebarsEnvironment,\n\n logger: logger,\n log: logger.log,\n\n registerHelper: function(name, fn) {\n if (toString.call(name) === objectType) {\n if (fn) {\n throw new Exception('Arg not supported with multiple helpers');\n }\n extend(this.helpers, name);\n } else {\n this.helpers[name] = fn;\n }\n },\n unregisterHelper: function(name) {\n delete this.helpers[name];\n },\n\n registerPartial: function(name, partial) {\n if (toString.call(name) === objectType) {\n extend(this.partials, name);\n } else {\n if (typeof partial === 'undefined') {\n throw new Exception(\n `Attempting to register a partial called \"${name}\" as undefined`\n );\n }\n this.partials[name] = partial;\n }\n },\n unregisterPartial: function(name) {\n delete this.partials[name];\n },\n\n registerDecorator: function(name, fn) {\n if (toString.call(name) === objectType) {\n if (fn) {\n throw new Exception('Arg not supported with multiple decorators');\n }\n extend(this.decorators, name);\n } else {\n this.decorators[name] = fn;\n }\n },\n unregisterDecorator: function(name) {\n delete this.decorators[name];\n },\n /**\n * Reset the memory of illegal property accesses that have already been logged.\n * @deprecated should only be used in handlebars test-cases\n */\n resetLoggedPropertyAccesses() {\n resetLoggedProperties();\n }\n};\n\nexport let log = logger.log;\n\nexport { createFrame, logger };\n", "// Build out our basic SafeString type\nfunction SafeString(string) {\n this.string = string;\n}\n\nSafeString.prototype.toString = SafeString.prototype.toHTML = function() {\n return '' + this.string;\n};\n\nexport default SafeString;\n", "export function wrapHelper(helper, transformOptionsFn) {\n if (typeof helper !== 'function') {\n // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639\n // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.\n return helper;\n }\n let wrapper = function(/* dynamic arguments */) {\n const options = arguments[arguments.length - 1];\n arguments[arguments.length - 1] = transformOptionsFn(options);\n return helper.apply(this, arguments);\n };\n return wrapper;\n}\n", "import * as Utils from './utils';\nimport Exception from './exception';\nimport {\n COMPILER_REVISION,\n createFrame,\n LAST_COMPATIBLE_COMPILER_REVISION,\n REVISION_CHANGES\n} from './base';\nimport { moveHelperToHooks } from './helpers';\nimport { wrapHelper } from './internal/wrapHelper';\nimport {\n createProtoAccessControl,\n resultIsAllowed\n} from './internal/proto-access';\n\nexport function checkRevision(compilerInfo) {\n const compilerRevision = (compilerInfo && compilerInfo[0]) || 1,\n currentRevision = COMPILER_REVISION;\n\n if (\n compilerRevision >= LAST_COMPATIBLE_COMPILER_REVISION &&\n compilerRevision <= COMPILER_REVISION\n ) {\n return;\n }\n\n if (compilerRevision < LAST_COMPATIBLE_COMPILER_REVISION) {\n const runtimeVersions = REVISION_CHANGES[currentRevision],\n compilerVersions = REVISION_CHANGES[compilerRevision];\n throw new Exception(\n 'Template was precompiled with an older version of Handlebars than the current runtime. ' +\n 'Please update your precompiler to a newer version (' +\n runtimeVersions +\n ') or downgrade your runtime to an older version (' +\n compilerVersions +\n ').'\n );\n } else {\n // Use the embedded version info since the runtime doesn't know about this revision yet\n throw new Exception(\n 'Template was precompiled with a newer version of Handlebars than the current runtime. ' +\n 'Please update your runtime to a newer version (' +\n compilerInfo[1] +\n ').'\n );\n }\n}\n\nexport function template(templateSpec, env) {\n /* istanbul ignore next */\n if (!env) {\n throw new Exception('No environment passed to template');\n }\n if (!templateSpec || !templateSpec.main) {\n throw new Exception('Unknown template object: ' + typeof templateSpec);\n }\n\n templateSpec.main.decorator = templateSpec.main_d;\n\n // Note: Using env.VM references rather than local var references throughout this section to allow\n // for external users to override these as pseudo-supported APIs.\n env.VM.checkRevision(templateSpec.compiler);\n\n // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)\n const templateWasPrecompiledWithCompilerV7 =\n templateSpec.compiler && templateSpec.compiler[0] === 7;\n\n function invokePartialWrapper(partial, context, options) {\n if (options.hash) {\n context = Utils.extend({}, context, options.hash);\n if (options.ids) {\n options.ids[0] = true;\n }\n }\n partial = env.VM.resolvePartial.call(this, partial, context, options);\n\n options.hooks = this.hooks;\n options.protoAccessControl = this.protoAccessControl;\n\n let result = env.VM.invokePartial.call(this, partial, context, options);\n\n if (result == null && env.compile) {\n options.partials[options.name] = env.compile(\n partial,\n templateSpec.compilerOptions,\n env\n );\n result = options.partials[options.name](context, options);\n }\n if (result != null) {\n if (options.indent) {\n let lines = result.split('\\n');\n for (let i = 0, l = lines.length; i < l; i++) {\n if (!lines[i] && i + 1 === l) {\n break;\n }\n\n lines[i] = options.indent + lines[i];\n }\n result = lines.join('\\n');\n }\n return result;\n } else {\n throw new Exception(\n 'The partial ' +\n options.name +\n ' could not be compiled when running in runtime-only mode'\n );\n }\n }\n\n // Just add water\n let container = {\n strict: function(obj, name, loc) {\n if (!obj || !(name in obj)) {\n throw new Exception('\"' + name + '\" not defined in ' + obj, {\n loc: loc\n });\n }\n return container.lookupProperty(obj, name);\n },\n lookupProperty: function(parent, propertyName) {\n let result = parent[propertyName];\n if (result == null) {\n return result;\n }\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return result;\n }\n\n if (resultIsAllowed(result, container.protoAccessControl, propertyName)) {\n return result;\n }\n return undefined;\n },\n lookup: function(depths, name) {\n const len = depths.length;\n for (let i = 0; i < len; i++) {\n let result = depths[i] && container.lookupProperty(depths[i], name);\n if (result != null) {\n return result;\n }\n }\n },\n lambda: function(current, context) {\n return typeof current === 'function' ? current.call(context) : current;\n },\n\n escapeExpression: Utils.escapeExpression,\n invokePartial: invokePartialWrapper,\n\n fn: function(i) {\n let ret = templateSpec[i];\n ret.decorator = templateSpec[i + '_d'];\n return ret;\n },\n\n programs: [],\n program: function(i, data, declaredBlockParams, blockParams, depths) {\n let programWrapper = this.programs[i],\n fn = this.fn(i);\n if (data || depths || blockParams || declaredBlockParams) {\n programWrapper = wrapProgram(\n this,\n i,\n fn,\n data,\n declaredBlockParams,\n blockParams,\n depths\n );\n } else if (!programWrapper) {\n programWrapper = this.programs[i] = wrapProgram(this, i, fn);\n }\n return programWrapper;\n },\n\n data: function(value, depth) {\n while (value && depth--) {\n value = value._parent;\n }\n return value;\n },\n mergeIfNeeded: function(param, common) {\n let obj = param || common;\n\n if (param && common && param !== common) {\n obj = Utils.extend({}, common, param);\n }\n\n return obj;\n },\n // An empty object to use as replacement for null-contexts\n nullContext: Object.seal({}),\n\n noop: env.VM.noop,\n compilerInfo: templateSpec.compiler\n };\n\n function ret(context, options = {}) {\n let data = options.data;\n\n ret._setup(options);\n if (!options.partial && templateSpec.useData) {\n data = initData(context, data);\n }\n let depths,\n blockParams = templateSpec.useBlockParams ? [] : undefined;\n if (templateSpec.useDepths) {\n if (options.depths) {\n depths =\n context != options.depths[0]\n ? [context].concat(options.depths)\n : options.depths;\n } else {\n depths = [context];\n }\n }\n\n function main(context /*, options*/) {\n return (\n '' +\n templateSpec.main(\n container,\n context,\n container.helpers,\n container.partials,\n data,\n blockParams,\n depths\n )\n );\n }\n\n main = executeDecorators(\n templateSpec.main,\n main,\n container,\n options.depths || [],\n data,\n blockParams\n );\n return main(context, options);\n }\n\n ret.isTop = true;\n\n ret._setup = function(options) {\n if (!options.partial) {\n let mergedHelpers = {};\n addHelpers(mergedHelpers, env.helpers, container);\n addHelpers(mergedHelpers, options.helpers, container);\n container.helpers = mergedHelpers;\n\n if (templateSpec.usePartial) {\n // Use mergeIfNeeded here to prevent compiling global partials multiple times\n container.partials = container.mergeIfNeeded(\n options.partials,\n env.partials\n );\n }\n if (templateSpec.usePartial || templateSpec.useDecorators) {\n container.decorators = Utils.extend(\n {},\n env.decorators,\n options.decorators\n );\n }\n\n container.hooks = {};\n container.protoAccessControl = createProtoAccessControl(options);\n\n let keepHelperInHelpers =\n options.allowCallsToHelperMissing ||\n templateWasPrecompiledWithCompilerV7;\n moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);\n moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);\n } else {\n container.protoAccessControl = options.protoAccessControl; // internal option\n container.helpers = options.helpers;\n container.partials = options.partials;\n container.decorators = options.decorators;\n container.hooks = options.hooks;\n }\n };\n\n ret._child = function(i, data, blockParams, depths) {\n if (templateSpec.useBlockParams && !blockParams) {\n throw new Exception('must pass block params');\n }\n if (templateSpec.useDepths && !depths) {\n throw new Exception('must pass parent depths');\n }\n\n return wrapProgram(\n container,\n i,\n templateSpec[i],\n data,\n 0,\n blockParams,\n depths\n );\n };\n return ret;\n}\n\nexport function wrapProgram(\n container,\n i,\n fn,\n data,\n declaredBlockParams,\n blockParams,\n depths\n) {\n function prog(context, options = {}) {\n let currentDepths = depths;\n if (\n depths &&\n context != depths[0] &&\n !(context === container.nullContext && depths[0] === null)\n ) {\n currentDepths = [context].concat(depths);\n }\n\n return fn(\n container,\n context,\n container.helpers,\n container.partials,\n options.data || data,\n blockParams && [options.blockParams].concat(blockParams),\n currentDepths\n );\n }\n\n prog = executeDecorators(fn, prog, container, depths, data, blockParams);\n\n prog.program = i;\n prog.depth = depths ? depths.length : 0;\n prog.blockParams = declaredBlockParams || 0;\n return prog;\n}\n\n/**\n * This is currently part of the official API, therefore implementation details should not be changed.\n */\nexport function resolvePartial(partial, context, options) {\n if (!partial) {\n if (options.name === '@partial-block') {\n partial = lookupOwnProperty(options.data, 'partial-block');\n } else {\n partial = lookupOwnProperty(options.partials, options.name);\n }\n } else if (!partial.call && !options.name) {\n // This is a dynamic partial that returned a string\n options.name = partial;\n partial = lookupOwnProperty(options.partials, partial);\n }\n return partial;\n}\n\nexport function invokePartial(partial, context, options) {\n // Use the current closure context to save the partial-block if this partial\n const currentPartialBlock = lookupOwnProperty(options.data, 'partial-block');\n options.partial = true;\n if (options.ids) {\n options.data.contextPath = options.ids[0] || options.data.contextPath;\n }\n\n let partialBlock;\n if (options.fn && options.fn !== noop) {\n options.data = createFrame(options.data);\n // Wrapper function to get access to currentPartialBlock from the closure\n let fn = options.fn;\n partialBlock = options.data['partial-block'] = function partialBlockWrapper(\n context,\n options = {}\n ) {\n // Restore the partial-block from the closure for the execution of the block\n // i.e. the part inside the block of the partial call.\n options.data = createFrame(options.data);\n options.data['partial-block'] = currentPartialBlock;\n return fn(context, options);\n };\n if (fn.partials) {\n options.partials = Utils.extend({}, options.partials, fn.partials);\n }\n }\n\n if (partial === undefined && partialBlock) {\n partial = partialBlock;\n }\n\n if (partial === undefined) {\n throw new Exception('The partial ' + options.name + ' could not be found');\n } else if (partial instanceof Function) {\n return partial(context, options);\n }\n}\n\nexport function noop() {\n return '';\n}\n\nfunction lookupOwnProperty(obj, name) {\n if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {\n return obj[name];\n }\n}\n\nfunction initData(context, data) {\n if (!data || !('root' in data)) {\n data = data ? createFrame(data) : {};\n data.root = context;\n }\n return data;\n}\n\nfunction executeDecorators(fn, prog, container, depths, data, blockParams) {\n if (fn.decorator) {\n let props = {};\n prog = fn.decorator(\n prog,\n props,\n container,\n depths && depths[0],\n data,\n blockParams,\n depths\n );\n Utils.extend(prog, props);\n }\n return prog;\n}\n\nfunction addHelpers(mergedHelpers, helpers, container) {\n if (!helpers) return;\n Object.keys(helpers).forEach(helperName => {\n let helper = helpers[helperName];\n mergedHelpers[helperName] = passLookupPropertyOption(helper, container);\n });\n}\n\nfunction passLookupPropertyOption(helper, container) {\n const lookupProperty = container.lookupProperty;\n return wrapHelper(helper, options => {\n options.lookupProperty = lookupProperty;\n return options;\n });\n}\n", "/* global globalThis */\nexport default function(Handlebars) {\n /* istanbul ignore next */\n // https://mathiasbynens.be/notes/globalthis\n (function() {\n if (typeof globalThis === 'object') return;\n Object.prototype.__defineGetter__('__magic__', function() {\n return this;\n });\n __magic__.globalThis = __magic__; // eslint-disable-line no-undef\n delete Object.prototype.__magic__;\n })();\n\n const $Handlebars = globalThis.Handlebars;\n\n /* istanbul ignore next */\n Handlebars.noConflict = function() {\n if (globalThis.Handlebars === Handlebars) {\n globalThis.Handlebars = $Handlebars;\n }\n return Handlebars;\n };\n}\n", "import * as base from './handlebars/base';\n\n// Each of these augment the Handlebars object. No need to setup here.\n// (This is done to easily share code between commonjs and browse envs)\nimport SafeString from './handlebars/safe-string';\nimport Exception from './handlebars/exception';\nimport * as Utils from './handlebars/utils';\nimport * as runtime from './handlebars/runtime';\n\nimport noConflict from './handlebars/no-conflict';\n\n// For compatibility and usage outside of module systems, make the Handlebars object a namespace\nfunction create() {\n let hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = SafeString;\n hb.Exception = Exception;\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function(spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}\n\nlet inst = create();\ninst.create = create;\n\nnoConflict(inst);\n\ninst['default'] = inst;\n\nexport default inst;\n", "let AST = {\n // Public API used to evaluate derived attributes regarding AST nodes\n helpers: {\n // a mustache is definitely a helper if:\n // * it is an eligible helper, and\n // * it has at least one parameter or hash segment\n helperExpression: function(node) {\n return (\n node.type === 'SubExpression' ||\n ((node.type === 'MustacheStatement' ||\n node.type === 'BlockStatement') &&\n !!((node.params && node.params.length) || node.hash))\n );\n },\n\n scopedId: function(path) {\n return /^\\.|this\\b/.test(path.original);\n },\n\n // an ID is simple if it only has one part, and that part is not\n // `..` or `this`.\n simpleId: function(path) {\n return (\n path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth\n );\n }\n }\n};\n\n// Must be exported as an object rather than the root of the module as the jison lexer\n// must modify the object to operate properly.\nexport default AST;\n", "// File ignored in coverage tests via setting in .istanbul.yml\n/* Jison generated parser */\nvar handlebars = (function(){\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"root\":3,\"program\":4,\"EOF\":5,\"program_repetition0\":6,\"statement\":7,\"mustache\":8,\"block\":9,\"rawBlock\":10,\"partial\":11,\"partialBlock\":12,\"content\":13,\"COMMENT\":14,\"CONTENT\":15,\"openRawBlock\":16,\"rawBlock_repetition0\":17,\"END_RAW_BLOCK\":18,\"OPEN_RAW_BLOCK\":19,\"helperName\":20,\"openRawBlock_repetition0\":21,\"openRawBlock_option0\":22,\"CLOSE_RAW_BLOCK\":23,\"openBlock\":24,\"block_option0\":25,\"closeBlock\":26,\"openInverse\":27,\"block_option1\":28,\"OPEN_BLOCK\":29,\"openBlock_repetition0\":30,\"openBlock_option0\":31,\"openBlock_option1\":32,\"CLOSE\":33,\"OPEN_INVERSE\":34,\"openInverse_repetition0\":35,\"openInverse_option0\":36,\"openInverse_option1\":37,\"openInverseChain\":38,\"OPEN_INVERSE_CHAIN\":39,\"openInverseChain_repetition0\":40,\"openInverseChain_option0\":41,\"openInverseChain_option1\":42,\"inverseAndProgram\":43,\"INVERSE\":44,\"inverseChain\":45,\"inverseChain_option0\":46,\"OPEN_ENDBLOCK\":47,\"OPEN\":48,\"mustache_repetition0\":49,\"mustache_option0\":50,\"OPEN_UNESCAPED\":51,\"mustache_repetition1\":52,\"mustache_option1\":53,\"CLOSE_UNESCAPED\":54,\"OPEN_PARTIAL\":55,\"partialName\":56,\"partial_repetition0\":57,\"partial_option0\":58,\"openPartialBlock\":59,\"OPEN_PARTIAL_BLOCK\":60,\"openPartialBlock_repetition0\":61,\"openPartialBlock_option0\":62,\"param\":63,\"sexpr\":64,\"OPEN_SEXPR\":65,\"sexpr_repetition0\":66,\"sexpr_option0\":67,\"CLOSE_SEXPR\":68,\"hash\":69,\"hash_repetition_plus0\":70,\"hashSegment\":71,\"ID\":72,\"EQUALS\":73,\"blockParams\":74,\"OPEN_BLOCK_PARAMS\":75,\"blockParams_repetition_plus0\":76,\"CLOSE_BLOCK_PARAMS\":77,\"path\":78,\"dataName\":79,\"STRING\":80,\"NUMBER\":81,\"BOOLEAN\":82,\"UNDEFINED\":83,\"NULL\":84,\"DATA\":85,\"pathSegments\":86,\"SEP\":87,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"EOF\",14:\"COMMENT\",15:\"CONTENT\",18:\"END_RAW_BLOCK\",19:\"OPEN_RAW_BLOCK\",23:\"CLOSE_RAW_BLOCK\",29:\"OPEN_BLOCK\",33:\"CLOSE\",34:\"OPEN_INVERSE\",39:\"OPEN_INVERSE_CHAIN\",44:\"INVERSE\",47:\"OPEN_ENDBLOCK\",48:\"OPEN\",51:\"OPEN_UNESCAPED\",54:\"CLOSE_UNESCAPED\",55:\"OPEN_PARTIAL\",60:\"OPEN_PARTIAL_BLOCK\",65:\"OPEN_SEXPR\",68:\"CLOSE_SEXPR\",72:\"ID\",73:\"EQUALS\",75:\"OPEN_BLOCK_PARAMS\",77:\"CLOSE_BLOCK_PARAMS\",80:\"STRING\",81:\"NUMBER\",82:\"BOOLEAN\",83:\"UNDEFINED\",84:\"NULL\",85:\"DATA\",87:\"SEP\"},\nproductions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],\nperformAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$\n) {\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1: return $$[$0-1]; \nbreak;\ncase 2:this.$ = yy.prepareProgram($$[$0]);\nbreak;\ncase 3:this.$ = $$[$0];\nbreak;\ncase 4:this.$ = $$[$0];\nbreak;\ncase 5:this.$ = $$[$0];\nbreak;\ncase 6:this.$ = $$[$0];\nbreak;\ncase 7:this.$ = $$[$0];\nbreak;\ncase 8:this.$ = $$[$0];\nbreak;\ncase 9:\n this.$ = {\n type: 'CommentStatement',\n value: yy.stripComment($$[$0]),\n strip: yy.stripFlags($$[$0], $$[$0]),\n loc: yy.locInfo(this._$)\n };\n \nbreak;\ncase 10:\n this.$ = {\n type: 'ContentStatement',\n original: $$[$0],\n value: $$[$0],\n loc: yy.locInfo(this._$)\n };\n \nbreak;\ncase 11:this.$ = yy.prepareRawBlock($$[$0-2], $$[$0-1], $$[$0], this._$);\nbreak;\ncase 12:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1] };\nbreak;\ncase 13:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], false, this._$);\nbreak;\ncase 14:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], true, this._$);\nbreak;\ncase 15:this.$ = { open: $$[$0-5], path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) };\nbreak;\ncase 16:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) };\nbreak;\ncase 17:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) };\nbreak;\ncase 18:this.$ = { strip: yy.stripFlags($$[$0-1], $$[$0-1]), program: $$[$0] };\nbreak;\ncase 19:\n var inverse = yy.prepareBlock($$[$0-2], $$[$0-1], $$[$0], $$[$0], false, this._$),\n program = yy.prepareProgram([inverse], $$[$0-1].loc);\n program.chained = true;\n\n this.$ = { strip: $$[$0-2].strip, program: program, chain: true };\n \nbreak;\ncase 20:this.$ = $$[$0];\nbreak;\ncase 21:this.$ = {path: $$[$0-1], strip: yy.stripFlags($$[$0-2], $$[$0])};\nbreak;\ncase 22:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$);\nbreak;\ncase 23:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$);\nbreak;\ncase 24:\n this.$ = {\n type: 'PartialStatement',\n name: $$[$0-3],\n params: $$[$0-2],\n hash: $$[$0-1],\n indent: '',\n strip: yy.stripFlags($$[$0-4], $$[$0]),\n loc: yy.locInfo(this._$)\n };\n \nbreak;\ncase 25:this.$ = yy.preparePartialBlock($$[$0-2], $$[$0-1], $$[$0], this._$);\nbreak;\ncase 26:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1], strip: yy.stripFlags($$[$0-4], $$[$0]) };\nbreak;\ncase 27:this.$ = $$[$0];\nbreak;\ncase 28:this.$ = $$[$0];\nbreak;\ncase 29:\n this.$ = {\n type: 'SubExpression',\n path: $$[$0-3],\n params: $$[$0-2],\n hash: $$[$0-1],\n loc: yy.locInfo(this._$)\n };\n \nbreak;\ncase 30:this.$ = {type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$)};\nbreak;\ncase 31:this.$ = {type: 'HashPair', key: yy.id($$[$0-2]), value: $$[$0], loc: yy.locInfo(this._$)};\nbreak;\ncase 32:this.$ = yy.id($$[$0-1]);\nbreak;\ncase 33:this.$ = $$[$0];\nbreak;\ncase 34:this.$ = $$[$0];\nbreak;\ncase 35:this.$ = {type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$)};\nbreak;\ncase 36:this.$ = {type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$)};\nbreak;\ncase 37:this.$ = {type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$)};\nbreak;\ncase 38:this.$ = {type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$)};\nbreak;\ncase 39:this.$ = {type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$)};\nbreak;\ncase 40:this.$ = $$[$0];\nbreak;\ncase 41:this.$ = $$[$0];\nbreak;\ncase 42:this.$ = yy.preparePath(true, $$[$0], this._$);\nbreak;\ncase 43:this.$ = yy.preparePath(false, $$[$0], this._$);\nbreak;\ncase 44: $$[$0-2].push({part: yy.id($$[$0]), original: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2]; \nbreak;\ncase 45:this.$ = [{part: yy.id($$[$0]), original: $$[$0]}];\nbreak;\ncase 46:this.$ = [];\nbreak;\ncase 47:$$[$0-1].push($$[$0]);\nbreak;\ncase 48:this.$ = [];\nbreak;\ncase 49:$$[$0-1].push($$[$0]);\nbreak;\ncase 50:this.$ = [];\nbreak;\ncase 51:$$[$0-1].push($$[$0]);\nbreak;\ncase 58:this.$ = [];\nbreak;\ncase 59:$$[$0-1].push($$[$0]);\nbreak;\ncase 64:this.$ = [];\nbreak;\ncase 65:$$[$0-1].push($$[$0]);\nbreak;\ncase 70:this.$ = [];\nbreak;\ncase 71:$$[$0-1].push($$[$0]);\nbreak;\ncase 78:this.$ = [];\nbreak;\ncase 79:$$[$0-1].push($$[$0]);\nbreak;\ncase 82:this.$ = [];\nbreak;\ncase 83:$$[$0-1].push($$[$0]);\nbreak;\ncase 86:this.$ = [];\nbreak;\ncase 87:$$[$0-1].push($$[$0]);\nbreak;\ncase 90:this.$ = [];\nbreak;\ncase 91:$$[$0-1].push($$[$0]);\nbreak;\ncase 94:this.$ = [];\nbreak;\ncase 95:$$[$0-1].push($$[$0]);\nbreak;\ncase 98:this.$ = [$$[$0]];\nbreak;\ncase 99:$$[$0-1].push($$[$0]);\nbreak;\ncase 100:this.$ = [$$[$0]];\nbreak;\ncase 101:$$[$0-1].push($$[$0]);\nbreak;\n}\n},\ntable: [{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],\ndefaultActions: {4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},\nparseError: function parseError (str, hash) {\n throw new Error(str);\n},\nparse: function parse(input) {\n var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n this.lexer.setInput(input);\n this.lexer.yy = this.yy;\n this.yy.lexer = this.lexer;\n this.yy.parser = this;\n if (typeof this.lexer.yylloc == \"undefined\")\n this.lexer.yylloc = {};\n var yyloc = this.lexer.yylloc;\n lstack.push(yyloc);\n var ranges = this.lexer.options && this.lexer.options.ranges;\n if (typeof this.yy.parseError === \"function\")\n this.parseError = this.yy.parseError;\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = self.lexer.lex() || 1;\n if (typeof token !== \"number\") {\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n if (!recovering) {\n expected = [];\n for (p in table[state])\n if (this.terminals_[p] && p > 2) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n if (this.lexer.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + this.lexer.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == 1?\"end of input\":\"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});\n }\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(this.lexer.yytext);\n lstack.push(this.lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = this.lexer.yyleng;\n yytext = this.lexer.yytext;\n yylineno = this.lexer.yylineno;\n yyloc = this.lexer.yylloc;\n if (recovering > 0)\n recovering--;\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}\n};\n/* Jison generated lexer */\nvar lexer = (function(){\nvar lexer = ({EOF:1,\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\nsetInput:function (input) {\n this._input = input;\n this._more = this._less = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};\n if (this.options.ranges) this.yylloc.range = [0,0];\n this.offset = 0;\n return this;\n },\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) this.yylloc.range[1]++;\n\n this._input = this._input.slice(1);\n return ch;\n },\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length-len-1);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length-1);\n this.matched = this.matched.substr(0, this.matched.length-1);\n\n if (lines.length-1) this.yylineno -= lines.length-1;\n var r = this.yylloc.range;\n\n this.yylloc = {first_line: this.yylloc.first_line,\n last_line: this.yylineno+1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n return this;\n },\nmore:function () {\n this._more = true;\n return this;\n },\nless:function (n) {\n this.unput(this.match.slice(n));\n },\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\\n/g, \"\");\n },\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c+\"^\";\n },\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) this.done = true;\n\n var token,\n match,\n tempMatch,\n index,\n col,\n lines;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i=0;i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (!this.options.flex) break;\n }\n }\n if (match) {\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) this.yylineno += lines.length;\n this.yylloc = {first_line: this.yylloc.last_line,\n last_line: this.yylineno+1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length};\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);\n if (this.done && this._input) this.done = false;\n if (token) return token;\n else return;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\\n'+this.showPosition(),\n {text: \"\", token: null, line: this.yylineno});\n }\n },\nlex:function lex () {\n var r = this.next();\n if (typeof r !== 'undefined') {\n return r;\n } else {\n return this.lex();\n }\n },\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\npopState:function popState () {\n return this.conditionStack.pop();\n },\n_currentRules:function _currentRules () {\n return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;\n },\ntopState:function () {\n return this.conditionStack[this.conditionStack.length-2];\n },\npushState:function begin (condition) {\n this.begin(condition);\n }});\nlexer.options = {};\nlexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START\n) {\n\n\nfunction strip(start, end) {\n return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);\n}\n\n\nvar YYSTATE=YY_START\nswitch($avoiding_name_collisions) {\ncase 0:\n if(yy_.yytext.slice(-2) === \"\\\\\\\\\") {\n strip(0,1);\n this.begin(\"mu\");\n } else if(yy_.yytext.slice(-1) === \"\\\\\") {\n strip(0,1);\n this.begin(\"emu\");\n } else {\n this.begin(\"mu\");\n }\n if(yy_.yytext) return 15;\n \nbreak;\ncase 1:return 15;\nbreak;\ncase 2:\n this.popState();\n return 15;\n \nbreak;\ncase 3:this.begin('raw'); return 15;\nbreak;\ncase 4:\n this.popState();\n // Should be using `this.topState()` below, but it currently\n // returns the second top instead of the first top. Opened an\n // issue about it at https://github.com/zaach/jison/issues/291\n if (this.conditionStack[this.conditionStack.length-1] === 'raw') {\n return 15;\n } else {\n strip(5, 9);\n return 'END_RAW_BLOCK';\n }\n \nbreak;\ncase 5: return 15; \nbreak;\ncase 6:\n this.popState();\n return 14;\n\nbreak;\ncase 7:return 65;\nbreak;\ncase 8:return 68;\nbreak;\ncase 9: return 19; \nbreak;\ncase 10:\n this.popState();\n this.begin('raw');\n return 23;\n \nbreak;\ncase 11:return 55;\nbreak;\ncase 12:return 60;\nbreak;\ncase 13:return 29;\nbreak;\ncase 14:return 47;\nbreak;\ncase 15:this.popState(); return 44;\nbreak;\ncase 16:this.popState(); return 44;\nbreak;\ncase 17:return 34;\nbreak;\ncase 18:return 39;\nbreak;\ncase 19:return 51;\nbreak;\ncase 20:return 48;\nbreak;\ncase 21:\n this.unput(yy_.yytext);\n this.popState();\n this.begin('com');\n\nbreak;\ncase 22:\n this.popState();\n return 14;\n\nbreak;\ncase 23:return 48;\nbreak;\ncase 24:return 73;\nbreak;\ncase 25:return 72;\nbreak;\ncase 26:return 72;\nbreak;\ncase 27:return 87;\nbreak;\ncase 28:// ignore whitespace\nbreak;\ncase 29:this.popState(); return 54;\nbreak;\ncase 30:this.popState(); return 33;\nbreak;\ncase 31:yy_.yytext = strip(1,2).replace(/\\\\\"/g,'\"'); return 80;\nbreak;\ncase 32:yy_.yytext = strip(1,2).replace(/\\\\'/g,\"'\"); return 80;\nbreak;\ncase 33:return 85;\nbreak;\ncase 34:return 82;\nbreak;\ncase 35:return 82;\nbreak;\ncase 36:return 83;\nbreak;\ncase 37:return 84;\nbreak;\ncase 38:return 81;\nbreak;\ncase 39:return 75;\nbreak;\ncase 40:return 77;\nbreak;\ncase 41:return 72;\nbreak;\ncase 42:yy_.yytext = yy_.yytext.replace(/\\\\([\\\\\\]])/g,'$1'); return 72;\nbreak;\ncase 43:return 'IN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\s!\"#%-,\\.\\/;->@\\[-\\^`\\{-~]+(?=([=~}\\s\\/.)|]))))/,/^(?:\\[(\\\\\\]|[^\\]])*\\])/,/^(?:.)/,/^(?:$)/];\nlexer.conditions = {\"mu\":{\"rules\":[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],\"inclusive\":false},\"emu\":{\"rules\":[2],\"inclusive\":false},\"com\":{\"rules\":[6],\"inclusive\":false},\"raw\":{\"rules\":[3,4,5],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,44],\"inclusive\":true}};\nreturn lexer;})()\nparser.lexer = lexer;\nfunction Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();export default handlebars;\n", "import Exception from '../exception';\n\nfunction Visitor() {\n this.parents = [];\n}\n\nVisitor.prototype = {\n constructor: Visitor,\n mutating: false,\n\n // Visits a given value. If mutating, will replace the value if necessary.\n acceptKey: function(node, name) {\n let value = this.accept(node[name]);\n if (this.mutating) {\n // Hacky sanity check: This may have a few false positives for type for the helper\n // methods but will generally do the right thing without a lot of overhead.\n if (value && !Visitor.prototype[value.type]) {\n throw new Exception(\n 'Unexpected node type \"' +\n value.type +\n '\" found when accepting ' +\n name +\n ' on ' +\n node.type\n );\n }\n node[name] = value;\n }\n },\n\n // Performs an accept operation with added sanity check to ensure\n // required keys are not removed.\n acceptRequired: function(node, name) {\n this.acceptKey(node, name);\n\n if (!node[name]) {\n throw new Exception(node.type + ' requires ' + name);\n }\n },\n\n // Traverses a given array. If mutating, empty respnses will be removed\n // for child elements.\n acceptArray: function(array) {\n for (let i = 0, l = array.length; i < l; i++) {\n this.acceptKey(array, i);\n\n if (!array[i]) {\n array.splice(i, 1);\n i--;\n l--;\n }\n }\n },\n\n accept: function(object) {\n if (!object) {\n return;\n }\n\n /* istanbul ignore next: Sanity code */\n if (!this[object.type]) {\n throw new Exception('Unknown type: ' + object.type, object);\n }\n\n if (this.current) {\n this.parents.unshift(this.current);\n }\n this.current = object;\n\n let ret = this[object.type](object);\n\n this.current = this.parents.shift();\n\n if (!this.mutating || ret) {\n return ret;\n } else if (ret !== false) {\n return object;\n }\n },\n\n Program: function(program) {\n this.acceptArray(program.body);\n },\n\n MustacheStatement: visitSubExpression,\n Decorator: visitSubExpression,\n\n BlockStatement: visitBlock,\n DecoratorBlock: visitBlock,\n\n PartialStatement: visitPartial,\n PartialBlockStatement: function(partial) {\n visitPartial.call(this, partial);\n\n this.acceptKey(partial, 'program');\n },\n\n ContentStatement: function(/* content */) {},\n CommentStatement: function(/* comment */) {},\n\n SubExpression: visitSubExpression,\n\n PathExpression: function(/* path */) {},\n\n StringLiteral: function(/* string */) {},\n NumberLiteral: function(/* number */) {},\n BooleanLiteral: function(/* bool */) {},\n UndefinedLiteral: function(/* literal */) {},\n NullLiteral: function(/* literal */) {},\n\n Hash: function(hash) {\n this.acceptArray(hash.pairs);\n },\n HashPair: function(pair) {\n this.acceptRequired(pair, 'value');\n }\n};\n\nfunction visitSubExpression(mustache) {\n this.acceptRequired(mustache, 'path');\n this.acceptArray(mustache.params);\n this.acceptKey(mustache, 'hash');\n}\nfunction visitBlock(block) {\n visitSubExpression.call(this, block);\n\n this.acceptKey(block, 'program');\n this.acceptKey(block, 'inverse');\n}\nfunction visitPartial(partial) {\n this.acceptRequired(partial, 'name');\n this.acceptArray(partial.params);\n this.acceptKey(partial, 'hash');\n}\n\nexport default Visitor;\n", "import Visitor from './visitor';\n\nfunction WhitespaceControl(options = {}) {\n this.options = options;\n}\nWhitespaceControl.prototype = new Visitor();\n\nWhitespaceControl.prototype.Program = function(program) {\n const doStandalone = !this.options.ignoreStandalone;\n\n let isRoot = !this.isRootSeen;\n this.isRootSeen = true;\n\n let body = program.body;\n for (let i = 0, l = body.length; i < l; i++) {\n let current = body[i],\n strip = this.accept(current);\n\n if (!strip) {\n continue;\n }\n\n let _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),\n _isNextWhitespace = isNextWhitespace(body, i, isRoot),\n openStandalone = strip.openStandalone && _isPrevWhitespace,\n closeStandalone = strip.closeStandalone && _isNextWhitespace,\n inlineStandalone =\n strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;\n\n if (strip.close) {\n omitRight(body, i, true);\n }\n if (strip.open) {\n omitLeft(body, i, true);\n }\n\n if (doStandalone && inlineStandalone) {\n omitRight(body, i);\n\n if (omitLeft(body, i)) {\n // If we are on a standalone node, save the indent info for partials\n if (current.type === 'PartialStatement') {\n // Pull out the whitespace from the final line\n current.indent = /([ \\t]+$)/.exec(body[i - 1].original)[1];\n }\n }\n }\n if (doStandalone && openStandalone) {\n omitRight((current.program || current.inverse).body);\n\n // Strip out the previous content node if it's whitespace only\n omitLeft(body, i);\n }\n if (doStandalone && closeStandalone) {\n // Always strip the next node\n omitRight(body, i);\n\n omitLeft((current.inverse || current.program).body);\n }\n }\n\n return program;\n};\n\nWhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function(\n block\n) {\n this.accept(block.program);\n this.accept(block.inverse);\n\n // Find the inverse program that is involed with whitespace stripping.\n let program = block.program || block.inverse,\n inverse = block.program && block.inverse,\n firstInverse = inverse,\n lastInverse = inverse;\n\n if (inverse && inverse.chained) {\n firstInverse = inverse.body[0].program;\n\n // Walk the inverse chain to find the last inverse that is actually in the chain.\n while (lastInverse.chained) {\n lastInverse = lastInverse.body[lastInverse.body.length - 1].program;\n }\n }\n\n let strip = {\n open: block.openStrip.open,\n close: block.closeStrip.close,\n\n // Determine the standalone candiacy. Basically flag our content as being possibly standalone\n // so our parent can determine if we actually are standalone\n openStandalone: isNextWhitespace(program.body),\n closeStandalone: isPrevWhitespace((firstInverse || program).body)\n };\n\n if (block.openStrip.close) {\n omitRight(program.body, null, true);\n }\n\n if (inverse) {\n let inverseStrip = block.inverseStrip;\n\n if (inverseStrip.open) {\n omitLeft(program.body, null, true);\n }\n\n if (inverseStrip.close) {\n omitRight(firstInverse.body, null, true);\n }\n if (block.closeStrip.open) {\n omitLeft(lastInverse.body, null, true);\n }\n\n // Find standalone else statments\n if (\n !this.options.ignoreStandalone &&\n isPrevWhitespace(program.body) &&\n isNextWhitespace(firstInverse.body)\n ) {\n omitLeft(program.body);\n omitRight(firstInverse.body);\n }\n } else if (block.closeStrip.open) {\n omitLeft(program.body, null, true);\n }\n\n return strip;\n};\n\nWhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function(\n mustache\n) {\n return mustache.strip;\n};\n\nWhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function(\n node\n) {\n /* istanbul ignore next */\n let strip = node.strip || {};\n return {\n inlineStandalone: true,\n open: strip.open,\n close: strip.close\n };\n};\n\nfunction isPrevWhitespace(body, i, isRoot) {\n if (i === undefined) {\n i = body.length;\n }\n\n // Nodes that end with newlines are considered whitespace (but are special\n // cased for strip operations)\n let prev = body[i - 1],\n sibling = body[i - 2];\n if (!prev) {\n return isRoot;\n }\n\n if (prev.type === 'ContentStatement') {\n return (sibling || !isRoot ? /\\r?\\n\\s*?$/ : /(^|\\r?\\n)\\s*?$/).test(\n prev.original\n );\n }\n}\nfunction isNextWhitespace(body, i, isRoot) {\n if (i === undefined) {\n i = -1;\n }\n\n let next = body[i + 1],\n sibling = body[i + 2];\n if (!next) {\n return isRoot;\n }\n\n if (next.type === 'ContentStatement') {\n return (sibling || !isRoot ? /^\\s*?\\r?\\n/ : /^\\s*?(\\r?\\n|$)/).test(\n next.original\n );\n }\n}\n\n// Marks the node to the right of the position as omitted.\n// I.e. {{foo}}' ' will mark the ' ' node as omitted.\n//\n// If i is undefined, then the first child will be marked as such.\n//\n// If mulitple is truthy then all whitespace will be stripped out until non-whitespace\n// content is met.\nfunction omitRight(body, i, multiple) {\n let current = body[i == null ? 0 : i + 1];\n if (\n !current ||\n current.type !== 'ContentStatement' ||\n (!multiple && current.rightStripped)\n ) {\n return;\n }\n\n let original = current.value;\n current.value = current.value.replace(\n multiple ? /^\\s+/ : /^[ \\t]*\\r?\\n?/,\n ''\n );\n current.rightStripped = current.value !== original;\n}\n\n// Marks the node to the left of the position as omitted.\n// I.e. ' '{{foo}} will mark the ' ' node as omitted.\n//\n// If i is undefined then the last child will be marked as such.\n//\n// If mulitple is truthy then all whitespace will be stripped out until non-whitespace\n// content is met.\nfunction omitLeft(body, i, multiple) {\n let current = body[i == null ? body.length - 1 : i - 1];\n if (\n !current ||\n current.type !== 'ContentStatement' ||\n (!multiple && current.leftStripped)\n ) {\n return;\n }\n\n // We omit the last node if it's whitespace only and not preceded by a non-content node.\n let original = current.value;\n current.value = current.value.replace(multiple ? /\\s+$/ : /[ \\t]+$/, '');\n current.leftStripped = current.value !== original;\n return current.leftStripped;\n}\n\nexport default WhitespaceControl;\n", "import Exception from '../exception';\n\nfunction validateClose(open, close) {\n close = close.path ? close.path.original : close;\n\n if (open.path.original !== close) {\n let errorNode = { loc: open.path.loc };\n\n throw new Exception(\n open.path.original + \" doesn't match \" + close,\n errorNode\n );\n }\n}\n\nexport function SourceLocation(source, locInfo) {\n this.source = source;\n this.start = {\n line: locInfo.first_line,\n column: locInfo.first_column\n };\n this.end = {\n line: locInfo.last_line,\n column: locInfo.last_column\n };\n}\n\nexport function id(token) {\n if (/^\\[.*\\]$/.test(token)) {\n return token.substring(1, token.length - 1);\n } else {\n return token;\n }\n}\n\nexport function stripFlags(open, close) {\n return {\n open: open.charAt(2) === '~',\n close: close.charAt(close.length - 3) === '~'\n };\n}\n\nexport function stripComment(comment) {\n return comment.replace(/^\\{\\{~?!-?-?/, '').replace(/-?-?~?\\}\\}$/, '');\n}\n\nexport function preparePath(data, parts, loc) {\n loc = this.locInfo(loc);\n\n let original = data ? '@' : '',\n dig = [],\n depth = 0;\n\n for (let i = 0, l = parts.length; i < l; i++) {\n let part = parts[i].part,\n // If we have [] syntax then we do not treat path references as operators,\n // i.e. foo.[this] resolves to approximately context.foo['this']\n isLiteral = parts[i].original !== part;\n original += (parts[i].separator || '') + part;\n\n if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {\n if (dig.length > 0) {\n throw new Exception('Invalid path: ' + original, { loc });\n } else if (part === '..') {\n depth++;\n }\n } else {\n dig.push(part);\n }\n }\n\n return {\n type: 'PathExpression',\n data,\n depth,\n parts: dig,\n original,\n loc\n };\n}\n\nexport function prepareMustache(path, params, hash, open, strip, locInfo) {\n // Must use charAt to support IE pre-10\n let escapeFlag = open.charAt(3) || open.charAt(2),\n escaped = escapeFlag !== '{' && escapeFlag !== '&';\n\n let decorator = /\\*/.test(open);\n return {\n type: decorator ? 'Decorator' : 'MustacheStatement',\n path,\n params,\n hash,\n escaped,\n strip,\n loc: this.locInfo(locInfo)\n };\n}\n\nexport function prepareRawBlock(openRawBlock, contents, close, locInfo) {\n validateClose(openRawBlock, close);\n\n locInfo = this.locInfo(locInfo);\n let program = {\n type: 'Program',\n body: contents,\n strip: {},\n loc: locInfo\n };\n\n return {\n type: 'BlockStatement',\n path: openRawBlock.path,\n params: openRawBlock.params,\n hash: openRawBlock.hash,\n program,\n openStrip: {},\n inverseStrip: {},\n closeStrip: {},\n loc: locInfo\n };\n}\n\nexport function prepareBlock(\n openBlock,\n program,\n inverseAndProgram,\n close,\n inverted,\n locInfo\n) {\n if (close && close.path) {\n validateClose(openBlock, close);\n }\n\n let decorator = /\\*/.test(openBlock.open);\n\n program.blockParams = openBlock.blockParams;\n\n let inverse, inverseStrip;\n\n if (inverseAndProgram) {\n if (decorator) {\n throw new Exception(\n 'Unexpected inverse block on decorator',\n inverseAndProgram\n );\n }\n\n if (inverseAndProgram.chain) {\n inverseAndProgram.program.body[0].closeStrip = close.strip;\n }\n\n inverseStrip = inverseAndProgram.strip;\n inverse = inverseAndProgram.program;\n }\n\n if (inverted) {\n inverted = inverse;\n inverse = program;\n program = inverted;\n }\n\n return {\n type: decorator ? 'DecoratorBlock' : 'BlockStatement',\n path: openBlock.path,\n params: openBlock.params,\n hash: openBlock.hash,\n program,\n inverse,\n openStrip: openBlock.strip,\n inverseStrip,\n closeStrip: close && close.strip,\n loc: this.locInfo(locInfo)\n };\n}\n\nexport function prepareProgram(statements, loc) {\n if (!loc && statements.length) {\n const firstLoc = statements[0].loc,\n lastLoc = statements[statements.length - 1].loc;\n\n /* istanbul ignore else */\n if (firstLoc && lastLoc) {\n loc = {\n source: firstLoc.source,\n start: {\n line: firstLoc.start.line,\n column: firstLoc.start.column\n },\n end: {\n line: lastLoc.end.line,\n column: lastLoc.end.column\n }\n };\n }\n }\n\n return {\n type: 'Program',\n body: statements,\n strip: {},\n loc: loc\n };\n}\n\nexport function preparePartialBlock(open, program, close, locInfo) {\n validateClose(open, close);\n\n return {\n type: 'PartialBlockStatement',\n name: open.path,\n params: open.params,\n hash: open.hash,\n program,\n openStrip: open.strip,\n closeStrip: close && close.strip,\n loc: this.locInfo(locInfo)\n };\n}\n", "import parser from './parser';\nimport WhitespaceControl from './whitespace-control';\nimport * as Helpers from './helpers';\nimport Exception from '../exception';\nimport { extend } from '../utils';\n\nexport { parser };\n\nlet yy = {};\nextend(yy, Helpers);\n\nexport function parseWithoutProcessing(input, options) {\n // Just return if an already-compiled AST was passed in.\n if (input.type === 'Program') {\n // When a pre-parsed AST is passed in, validate all node values to prevent\n // code injection via type-confused literals.\n validateInputAst(input);\n return input;\n }\n\n parser.yy = yy;\n\n // Altering the shared object here, but this is ok as parser is a sync operation\n yy.locInfo = function(locInfo) {\n return new yy.SourceLocation(options && options.srcName, locInfo);\n };\n\n let ast = parser.parse(input);\n\n return ast;\n}\n\nexport function parse(input, options) {\n let ast = parseWithoutProcessing(input, options);\n let strip = new WhitespaceControl(options);\n\n return strip.accept(ast);\n}\n\nfunction validateInputAst(ast) {\n validateAstNode(ast);\n}\n\nfunction validateAstNode(node) {\n if (node == null) {\n return;\n }\n\n if (Array.isArray(node)) {\n node.forEach(validateAstNode);\n return;\n }\n\n if (typeof node !== 'object') {\n return;\n }\n\n if (node.type === 'PathExpression') {\n if (!isValidDepth(node.depth)) {\n throw new Exception(\n 'Invalid AST: PathExpression.depth must be an integer'\n );\n }\n if (!Array.isArray(node.parts)) {\n throw new Exception('Invalid AST: PathExpression.parts must be an array');\n }\n for (let i = 0; i < node.parts.length; i++) {\n if (typeof node.parts[i] !== 'string') {\n throw new Exception(\n 'Invalid AST: PathExpression.parts must only contain strings'\n );\n }\n }\n } else if (node.type === 'NumberLiteral') {\n if (typeof node.value !== 'number' || !isFinite(node.value)) {\n throw new Exception('Invalid AST: NumberLiteral.value must be a number');\n }\n } else if (node.type === 'BooleanLiteral') {\n if (typeof node.value !== 'boolean') {\n throw new Exception(\n 'Invalid AST: BooleanLiteral.value must be a boolean'\n );\n }\n }\n\n Object.keys(node).forEach(propertyName => {\n if (propertyName === 'loc') {\n return;\n }\n validateAstNode(node[propertyName]);\n });\n}\n\nfunction isValidDepth(depth) {\n return (\n typeof depth === 'number' &&\n isFinite(depth) &&\n Math.floor(depth) === depth &&\n depth >= 0\n );\n}\n", "/* eslint-disable new-cap */\n\nimport Exception from '../exception';\nimport { isArray, indexOf, extend } from '../utils';\nimport AST from './ast';\n\nconst slice = [].slice;\n\nexport function Compiler() {}\n\n// the foundHelper register will disambiguate helper lookup from finding a\n// function in a context. This is necessary for mustache compatibility, which\n// requires that context functions in blocks are evaluated by blockHelperMissing,\n// and then proceed as if the resulting value was provided to blockHelperMissing.\n\nCompiler.prototype = {\n compiler: Compiler,\n\n equals: function(other) {\n let len = this.opcodes.length;\n if (other.opcodes.length !== len) {\n return false;\n }\n\n for (let i = 0; i < len; i++) {\n let opcode = this.opcodes[i],\n otherOpcode = other.opcodes[i];\n if (\n opcode.opcode !== otherOpcode.opcode ||\n !argEquals(opcode.args, otherOpcode.args)\n ) {\n return false;\n }\n }\n\n // We know that length is the same between the two arrays because they are directly tied\n // to the opcode behavior above.\n len = this.children.length;\n for (let i = 0; i < len; i++) {\n if (!this.children[i].equals(other.children[i])) {\n return false;\n }\n }\n\n return true;\n },\n\n guid: 0,\n\n compile: function(program, options) {\n this.sourceNode = [];\n this.opcodes = [];\n this.children = [];\n this.options = options;\n this.stringParams = options.stringParams;\n this.trackIds = options.trackIds;\n\n options.blockParams = options.blockParams || [];\n\n options.knownHelpers = extend(\n Object.create(null),\n {\n helperMissing: true,\n blockHelperMissing: true,\n each: true,\n if: true,\n unless: true,\n with: true,\n log: true,\n lookup: true\n },\n options.knownHelpers\n );\n\n return this.accept(program);\n },\n\n compileProgram: function(program) {\n let childCompiler = new this.compiler(), // eslint-disable-line new-cap\n result = childCompiler.compile(program, this.options),\n guid = this.guid++;\n\n this.usePartial = this.usePartial || result.usePartial;\n\n this.children[guid] = result;\n this.useDepths = this.useDepths || result.useDepths;\n\n return guid;\n },\n\n accept: function(node) {\n /* istanbul ignore next: Sanity code */\n if (!this[node.type]) {\n throw new Exception('Unknown type: ' + node.type, node);\n }\n\n this.sourceNode.unshift(node);\n let ret = this[node.type](node);\n this.sourceNode.shift();\n return ret;\n },\n\n Program: function(program) {\n this.options.blockParams.unshift(program.blockParams);\n\n let body = program.body,\n bodyLength = body.length;\n for (let i = 0; i < bodyLength; i++) {\n this.accept(body[i]);\n }\n\n this.options.blockParams.shift();\n\n this.isSimple = bodyLength === 1;\n this.blockParams = program.blockParams ? program.blockParams.length : 0;\n\n return this;\n },\n\n BlockStatement: function(block) {\n transformLiteralToPath(block);\n\n let program = block.program,\n inverse = block.inverse;\n\n program = program && this.compileProgram(program);\n inverse = inverse && this.compileProgram(inverse);\n\n let type = this.classifySexpr(block);\n\n if (type === 'helper') {\n this.helperSexpr(block, program, inverse);\n } else if (type === 'simple') {\n this.simpleSexpr(block);\n\n // now that the simple mustache is resolved, we need to\n // evaluate it by executing `blockHelperMissing`\n this.opcode('pushProgram', program);\n this.opcode('pushProgram', inverse);\n this.opcode('emptyHash');\n this.opcode('blockValue', block.path.original);\n } else {\n this.ambiguousSexpr(block, program, inverse);\n\n // now that the simple mustache is resolved, we need to\n // evaluate it by executing `blockHelperMissing`\n this.opcode('pushProgram', program);\n this.opcode('pushProgram', inverse);\n this.opcode('emptyHash');\n this.opcode('ambiguousBlockValue');\n }\n\n this.opcode('append');\n },\n\n DecoratorBlock(decorator) {\n let program = decorator.program && this.compileProgram(decorator.program);\n let params = this.setupFullMustacheParams(decorator, program, undefined),\n path = decorator.path;\n\n this.useDecorators = true;\n this.opcode('registerDecorator', params.length, path.original);\n },\n\n PartialStatement: function(partial) {\n this.usePartial = true;\n\n let program = partial.program;\n if (program) {\n program = this.compileProgram(partial.program);\n }\n\n let params = partial.params;\n if (params.length > 1) {\n throw new Exception(\n 'Unsupported number of partial arguments: ' + params.length,\n partial\n );\n } else if (!params.length) {\n if (this.options.explicitPartialContext) {\n this.opcode('pushLiteral', 'undefined');\n } else {\n params.push({ type: 'PathExpression', parts: [], depth: 0 });\n }\n }\n\n let partialName = partial.name.original,\n isDynamic = partial.name.type === 'SubExpression';\n if (isDynamic) {\n this.accept(partial.name);\n }\n\n this.setupFullMustacheParams(partial, program, undefined, true);\n\n let indent = partial.indent || '';\n if (this.options.preventIndent && indent) {\n this.opcode('appendContent', indent);\n indent = '';\n }\n\n this.opcode('invokePartial', isDynamic, partialName, indent);\n this.opcode('append');\n },\n PartialBlockStatement: function(partialBlock) {\n this.PartialStatement(partialBlock);\n },\n\n MustacheStatement: function(mustache) {\n this.SubExpression(mustache);\n\n if (mustache.escaped && !this.options.noEscape) {\n this.opcode('appendEscaped');\n } else {\n this.opcode('append');\n }\n },\n Decorator(decorator) {\n this.DecoratorBlock(decorator);\n },\n\n ContentStatement: function(content) {\n if (content.value) {\n this.opcode('appendContent', content.value);\n }\n },\n\n CommentStatement: function() {},\n\n SubExpression: function(sexpr) {\n transformLiteralToPath(sexpr);\n let type = this.classifySexpr(sexpr);\n\n if (type === 'simple') {\n this.simpleSexpr(sexpr);\n } else if (type === 'helper') {\n this.helperSexpr(sexpr);\n } else {\n this.ambiguousSexpr(sexpr);\n }\n },\n ambiguousSexpr: function(sexpr, program, inverse) {\n let path = sexpr.path,\n name = path.parts[0],\n isBlock = program != null || inverse != null;\n\n this.opcode('getContext', path.depth);\n\n this.opcode('pushProgram', program);\n this.opcode('pushProgram', inverse);\n\n path.strict = true;\n this.accept(path);\n\n this.opcode('invokeAmbiguous', name, isBlock);\n },\n\n simpleSexpr: function(sexpr) {\n let path = sexpr.path;\n path.strict = true;\n this.accept(path);\n this.opcode('resolvePossibleLambda');\n },\n\n helperSexpr: function(sexpr, program, inverse) {\n let params = this.setupFullMustacheParams(sexpr, program, inverse),\n path = sexpr.path,\n name = path.parts[0];\n\n if (this.options.knownHelpers[name]) {\n this.opcode('invokeKnownHelper', params.length, name);\n } else if (this.options.knownHelpersOnly) {\n throw new Exception(\n 'You specified knownHelpersOnly, but used the unknown helper ' + name,\n sexpr\n );\n } else {\n path.strict = true;\n path.falsy = true;\n\n this.accept(path);\n this.opcode(\n 'invokeHelper',\n params.length,\n path.original,\n AST.helpers.simpleId(path)\n );\n }\n },\n\n PathExpression: function(path) {\n this.addDepth(path.depth);\n this.opcode('getContext', path.depth);\n\n let name = path.parts[0],\n scoped = AST.helpers.scopedId(path),\n blockParamId = !path.depth && !scoped && this.blockParamIndex(name);\n\n if (blockParamId) {\n this.opcode('lookupBlockParam', blockParamId, path.parts);\n } else if (!name) {\n // Context reference, i.e. `{{foo .}}` or `{{foo ..}}`\n this.opcode('pushContext');\n } else if (path.data) {\n this.options.data = true;\n this.opcode('lookupData', path.depth, path.parts, path.strict);\n } else {\n this.opcode(\n 'lookupOnContext',\n path.parts,\n path.falsy,\n path.strict,\n scoped\n );\n }\n },\n\n StringLiteral: function(string) {\n this.opcode('pushString', string.value);\n },\n\n NumberLiteral: function(number) {\n this.opcode('pushLiteral', number.value);\n },\n\n BooleanLiteral: function(bool) {\n this.opcode('pushLiteral', bool.value);\n },\n\n UndefinedLiteral: function() {\n this.opcode('pushLiteral', 'undefined');\n },\n\n NullLiteral: function() {\n this.opcode('pushLiteral', 'null');\n },\n\n Hash: function(hash) {\n let pairs = hash.pairs,\n i = 0,\n l = pairs.length;\n\n this.opcode('pushHash');\n\n for (; i < l; i++) {\n this.pushParam(pairs[i].value);\n }\n while (i--) {\n this.opcode('assignToHash', pairs[i].key);\n }\n this.opcode('popHash');\n },\n\n // HELPERS\n opcode: function(name) {\n this.opcodes.push({\n opcode: name,\n args: slice.call(arguments, 1),\n loc: this.sourceNode[0].loc\n });\n },\n\n addDepth: function(depth) {\n if (!depth) {\n return;\n }\n\n this.useDepths = true;\n },\n\n classifySexpr: function(sexpr) {\n let isSimple = AST.helpers.simpleId(sexpr.path);\n\n let isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);\n\n // a mustache is an eligible helper if:\n // * its id is simple (a single part, not `this` or `..`)\n let isHelper = !isBlockParam && AST.helpers.helperExpression(sexpr);\n\n // if a mustache is an eligible helper but not a definite\n // helper, it is ambiguous, and will be resolved in a later\n // pass or at runtime.\n let isEligible = !isBlockParam && (isHelper || isSimple);\n\n // if ambiguous, we can possibly resolve the ambiguity now\n // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.\n if (isEligible && !isHelper) {\n let name = sexpr.path.parts[0],\n options = this.options;\n if (options.knownHelpers[name]) {\n isHelper = true;\n } else if (options.knownHelpersOnly) {\n isEligible = false;\n }\n }\n\n if (isHelper) {\n return 'helper';\n } else if (isEligible) {\n return 'ambiguous';\n } else {\n return 'simple';\n }\n },\n\n pushParams: function(params) {\n for (let i = 0, l = params.length; i < l; i++) {\n this.pushParam(params[i]);\n }\n },\n\n pushParam: function(val) {\n let value = val.value != null ? val.value : val.original || '';\n\n if (this.stringParams) {\n if (value.replace) {\n value = value.replace(/^(\\.?\\.\\/)*/g, '').replace(/\\//g, '.');\n }\n\n if (val.depth) {\n this.addDepth(val.depth);\n }\n this.opcode('getContext', val.depth || 0);\n this.opcode('pushStringParam', value, val.type);\n\n if (val.type === 'SubExpression') {\n // SubExpressions get evaluated and passed in\n // in string params mode.\n this.accept(val);\n }\n } else {\n if (this.trackIds) {\n let blockParamIndex;\n if (val.parts && !AST.helpers.scopedId(val) && !val.depth) {\n blockParamIndex = this.blockParamIndex(val.parts[0]);\n }\n if (blockParamIndex) {\n let blockParamChild = val.parts.slice(1).join('.');\n this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);\n } else {\n value = val.original || value;\n if (value.replace) {\n value = value\n .replace(/^this(?:\\.|$)/, '')\n .replace(/^\\.\\//, '')\n .replace(/^\\.$/, '');\n }\n\n this.opcode('pushId', val.type, value);\n }\n }\n this.accept(val);\n }\n },\n\n setupFullMustacheParams: function(sexpr, program, inverse, omitEmpty) {\n let params = sexpr.params;\n this.pushParams(params);\n\n this.opcode('pushProgram', program);\n this.opcode('pushProgram', inverse);\n\n if (sexpr.hash) {\n this.accept(sexpr.hash);\n } else {\n this.opcode('emptyHash', omitEmpty);\n }\n\n return params;\n },\n\n blockParamIndex: function(name) {\n for (\n let depth = 0, len = this.options.blockParams.length;\n depth < len;\n depth++\n ) {\n let blockParams = this.options.blockParams[depth],\n param = blockParams && indexOf(blockParams, name);\n if (blockParams && param >= 0) {\n return [depth, param];\n }\n }\n }\n};\n\nexport function precompile(input, options, env) {\n if (\n input == null ||\n (typeof input !== 'string' && input.type !== 'Program')\n ) {\n throw new Exception(\n 'You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' +\n input\n );\n }\n\n options = options || {};\n if (!('data' in options)) {\n options.data = true;\n }\n if (options.compat) {\n options.useDepths = true;\n }\n\n let ast = env.parse(input, options),\n environment = new env.Compiler().compile(ast, options);\n return new env.JavaScriptCompiler().compile(environment, options);\n}\n\nexport function compile(input, options = {}, env) {\n if (\n input == null ||\n (typeof input !== 'string' && input.type !== 'Program')\n ) {\n throw new Exception(\n 'You must pass a string or Handlebars AST to Handlebars.compile. You passed ' +\n input\n );\n }\n\n options = extend({}, options);\n if (!('data' in options)) {\n options.data = true;\n }\n if (options.compat) {\n options.useDepths = true;\n }\n\n let compiled;\n\n function compileInput() {\n let ast = env.parse(input, options),\n environment = new env.Compiler().compile(ast, options),\n templateSpec = new env.JavaScriptCompiler().compile(\n environment,\n options,\n undefined,\n true\n );\n return env.template(templateSpec);\n }\n\n // Template is only compiled on first use and cached after that point.\n function ret(context, execOptions) {\n if (!compiled) {\n compiled = compileInput();\n }\n return compiled.call(this, context, execOptions);\n }\n ret._setup = function(setupOptions) {\n if (!compiled) {\n compiled = compileInput();\n }\n return compiled._setup(setupOptions);\n };\n ret._child = function(i, data, blockParams, depths) {\n if (!compiled) {\n compiled = compileInput();\n }\n return compiled._child(i, data, blockParams, depths);\n };\n return ret;\n}\n\nfunction argEquals(a, b) {\n if (a === b) {\n return true;\n }\n\n if (isArray(a) && isArray(b) && a.length === b.length) {\n for (let i = 0; i < a.length; i++) {\n if (!argEquals(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction transformLiteralToPath(sexpr) {\n if (!sexpr.path.parts) {\n let literal = sexpr.path;\n // Casting to string here to make false and 0 literal values play nicely with the rest\n // of the system.\n sexpr.path = {\n type: 'PathExpression',\n data: false,\n depth: 0,\n parts: [literal.original + ''],\n original: literal.original + '',\n loc: literal.loc\n };\n }\n}\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // \u201Csources\u201D entry. This value is prepended to the individual\n // entries in the \u201Csource\u201D field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // \u201CsourceRoot\u201D, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n", "/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n", "/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n", "/* global define, require */\nimport { isArray } from '../utils';\n\nlet SourceNode;\n\ntry {\n /* istanbul ignore next */\n if (typeof define !== 'function' || !define.amd) {\n // We don't support this in AMD environments. For these environments, we assume that\n // they are running on the browser and thus have no need for the source-map library.\n let SourceMap = require('source-map');\n SourceNode = SourceMap.SourceNode;\n }\n} catch (err) {\n /* NOP */\n}\n\n/* istanbul ignore if: tested but not covered in istanbul due to dist build */\nif (!SourceNode) {\n SourceNode = function(line, column, srcFile, chunks) {\n this.src = '';\n if (chunks) {\n this.add(chunks);\n }\n };\n /* istanbul ignore next */\n SourceNode.prototype = {\n add: function(chunks) {\n if (isArray(chunks)) {\n chunks = chunks.join('');\n }\n this.src += chunks;\n },\n prepend: function(chunks) {\n if (isArray(chunks)) {\n chunks = chunks.join('');\n }\n this.src = chunks + this.src;\n },\n toStringWithSourceMap: function() {\n return { code: this.toString() };\n },\n toString: function() {\n return this.src;\n }\n };\n}\n\nfunction castChunk(chunk, codeGen, loc) {\n if (isArray(chunk)) {\n let ret = [];\n\n for (let i = 0, len = chunk.length; i < len; i++) {\n ret.push(codeGen.wrap(chunk[i], loc));\n }\n return ret;\n } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {\n // Handle primitives that the SourceNode will throw up on\n return chunk + '';\n }\n return chunk;\n}\n\nfunction CodeGen(srcFile) {\n this.srcFile = srcFile;\n this.source = [];\n}\n\nCodeGen.prototype = {\n isEmpty() {\n return !this.source.length;\n },\n prepend: function(source, loc) {\n this.source.unshift(this.wrap(source, loc));\n },\n push: function(source, loc) {\n this.source.push(this.wrap(source, loc));\n },\n\n merge: function() {\n let source = this.empty();\n this.each(function(line) {\n source.add([' ', line, '\\n']);\n });\n return source;\n },\n\n each: function(iter) {\n for (let i = 0, len = this.source.length; i < len; i++) {\n iter(this.source[i]);\n }\n },\n\n empty: function() {\n let loc = this.currentLocation || { start: {} };\n return new SourceNode(loc.start.line, loc.start.column, this.srcFile);\n },\n wrap: function(chunk, loc = this.currentLocation || { start: {} }) {\n if (chunk instanceof SourceNode) {\n return chunk;\n }\n\n chunk = castChunk(chunk, this, loc);\n\n return new SourceNode(\n loc.start.line,\n loc.start.column,\n this.srcFile,\n chunk\n );\n },\n\n functionCall: function(fn, type, params) {\n params = this.generateList(params);\n return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);\n },\n\n quotedString: function(str) {\n return (\n '\"' +\n (str + '')\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\u2028/g, '\\\\u2028') // Per Ecma-262 7.3 + 7.8.4\n .replace(/\\u2029/g, '\\\\u2029') +\n '\"'\n );\n },\n\n objectLiteral: function(obj) {\n let pairs = [];\n\n Object.keys(obj).forEach(key => {\n let value = castChunk(obj[key], this);\n if (value !== 'undefined') {\n pairs.push([this.quotedString(key), ':', value]);\n }\n });\n\n let ret = this.generateList(pairs);\n ret.prepend('{');\n ret.add('}');\n return ret;\n },\n\n generateList: function(entries) {\n let ret = this.empty();\n\n for (let i = 0, len = entries.length; i < len; i++) {\n if (i) {\n ret.add(',');\n }\n\n ret.add(castChunk(entries[i], this));\n }\n\n return ret;\n },\n\n generateArray: function(entries) {\n let ret = this.generateList(entries);\n ret.prepend('[');\n ret.add(']');\n\n return ret;\n }\n};\n\nexport default CodeGen;\n", "import { COMPILER_REVISION, REVISION_CHANGES } from '../base';\nimport Exception from '../exception';\nimport { isArray } from '../utils';\nimport CodeGen from './code-gen';\n\nfunction Literal(value) {\n this.value = value;\n}\n\nfunction JavaScriptCompiler() {}\n\nJavaScriptCompiler.prototype = {\n // PUBLIC API: You can override these methods in a subclass to provide\n // alternative compiled forms for name lookup and buffering semantics\n nameLookup: function(parent, name /*, type */) {\n return this.internalNameLookup(parent, name);\n },\n depthedLookup: function(name) {\n return [\n this.aliasable('container.lookup'),\n '(depths, ',\n JSON.stringify(name),\n ')'\n ];\n },\n\n compilerInfo: function() {\n const revision = COMPILER_REVISION,\n versions = REVISION_CHANGES[revision];\n return [revision, versions];\n },\n\n appendToBuffer: function(source, location, explicit) {\n // Force a source as this simplifies the merge logic.\n if (!isArray(source)) {\n source = [source];\n }\n source = this.source.wrap(source, location);\n\n if (this.environment.isSimple) {\n return ['return ', source, ';'];\n } else if (explicit) {\n // This is a case where the buffer operation occurs as a child of another\n // construct, generally braces. We have to explicitly output these buffer\n // operations to ensure that the emitted code goes in the correct location.\n return ['buffer += ', source, ';'];\n } else {\n source.appendToBuffer = true;\n return source;\n }\n },\n\n initializeBuffer: function() {\n return this.quotedString('');\n },\n // END PUBLIC API\n internalNameLookup: function(parent, name) {\n this.lookupPropertyFunctionIsUsed = true;\n return ['lookupProperty(', parent, ',', JSON.stringify(name), ')'];\n },\n\n lookupPropertyFunctionIsUsed: false,\n\n compile: function(environment, options, context, asObject) {\n this.environment = environment;\n this.options = options;\n this.stringParams = this.options.stringParams;\n this.trackIds = this.options.trackIds;\n this.precompile = !asObject;\n\n this.name = this.environment.name;\n this.isChild = !!context;\n this.context = context || {\n decorators: [],\n programs: [],\n environments: []\n };\n\n this.preamble();\n\n this.stackSlot = 0;\n this.stackVars = [];\n this.aliases = {};\n this.registers = { list: [] };\n this.hashes = [];\n this.compileStack = [];\n this.inlineStack = [];\n this.blockParams = [];\n\n this.compileChildren(environment, options);\n\n this.useDepths =\n this.useDepths ||\n environment.useDepths ||\n environment.useDecorators ||\n this.options.compat;\n this.useBlockParams = this.useBlockParams || environment.useBlockParams;\n\n let opcodes = environment.opcodes,\n opcode,\n firstLoc,\n i,\n l;\n\n for (i = 0, l = opcodes.length; i < l; i++) {\n opcode = opcodes[i];\n\n this.source.currentLocation = opcode.loc;\n firstLoc = firstLoc || opcode.loc;\n this[opcode.opcode].apply(this, opcode.args);\n }\n\n // Flush any trailing content that might be pending.\n this.source.currentLocation = firstLoc;\n this.pushSource('');\n\n /* istanbul ignore next */\n if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {\n throw new Exception('Compile completed with content left on stack');\n }\n\n if (!this.decorators.isEmpty()) {\n this.useDecorators = true;\n\n this.decorators.prepend([\n 'var decorators = container.decorators, ',\n this.lookupPropertyFunctionVarDeclaration(),\n ';\\n'\n ]);\n this.decorators.push('return fn;');\n\n if (asObject) {\n this.decorators = Function.apply(this, [\n 'fn',\n 'props',\n 'container',\n 'depth0',\n 'data',\n 'blockParams',\n 'depths',\n this.decorators.merge()\n ]);\n } else {\n this.decorators.prepend(\n 'function(fn, props, container, depth0, data, blockParams, depths) {\\n'\n );\n this.decorators.push('}\\n');\n this.decorators = this.decorators.merge();\n }\n } else {\n this.decorators = undefined;\n }\n\n let fn = this.createFunctionContext(asObject);\n if (!this.isChild) {\n let ret = {\n compiler: this.compilerInfo(),\n main: fn\n };\n\n if (this.decorators) {\n ret.main_d = this.decorators; // eslint-disable-line camelcase\n ret.useDecorators = true;\n }\n\n let { programs, decorators } = this.context;\n for (i = 0, l = programs.length; i < l; i++) {\n ret[i] = programs[i];\n if (decorators[i]) {\n ret[i + '_d'] = decorators[i];\n ret.useDecorators = true;\n }\n }\n\n if (this.environment.usePartial) {\n ret.usePartial = true;\n }\n if (this.options.data) {\n ret.useData = true;\n }\n if (this.useDepths) {\n ret.useDepths = true;\n }\n if (this.useBlockParams) {\n ret.useBlockParams = true;\n }\n if (this.options.compat) {\n ret.compat = true;\n }\n\n if (!asObject) {\n ret.compiler = JSON.stringify(ret.compiler);\n\n this.source.currentLocation = { start: { line: 1, column: 0 } };\n ret = this.objectLiteral(ret);\n\n if (options.srcName) {\n ret = ret.toStringWithSourceMap({ file: options.destName });\n ret.map = ret.map && ret.map.toString();\n } else {\n ret = ret.toString();\n }\n } else {\n ret.compilerOptions = this.options;\n }\n\n return ret;\n } else {\n return fn;\n }\n },\n\n preamble: function() {\n // track the last context pushed into place to allow skipping the\n // getContext opcode when it would be a noop\n this.lastContext = 0;\n this.source = new CodeGen(this.options.srcName);\n this.decorators = new CodeGen(this.options.srcName);\n },\n\n createFunctionContext: function(asObject) {\n let varDeclarations = '';\n\n let locals = this.stackVars.concat(this.registers.list);\n if (locals.length > 0) {\n varDeclarations += ', ' + locals.join(', ');\n }\n\n // Generate minimizer alias mappings\n //\n // When using true SourceNodes, this will update all references to the given alias\n // as the source nodes are reused in situ. For the non-source node compilation mode,\n // aliases will not be used, but this case is already being run on the client and\n // we aren't concern about minimizing the template size.\n let aliasCount = 0;\n Object.keys(this.aliases).forEach(alias => {\n let node = this.aliases[alias];\n if (node.children && node.referenceCount > 1) {\n varDeclarations += ', alias' + ++aliasCount + '=' + alias;\n node.children[0] = 'alias' + aliasCount;\n }\n });\n\n if (this.lookupPropertyFunctionIsUsed) {\n varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration();\n }\n\n let params = ['container', 'depth0', 'helpers', 'partials', 'data'];\n\n if (this.useBlockParams || this.useDepths) {\n params.push('blockParams');\n }\n if (this.useDepths) {\n params.push('depths');\n }\n\n // Perform a second pass over the output to merge content when possible\n let source = this.mergeSource(varDeclarations);\n\n if (asObject) {\n params.push(source);\n\n return Function.apply(this, params);\n } else {\n return this.source.wrap([\n 'function(',\n params.join(','),\n ') {\\n ',\n source,\n '}'\n ]);\n }\n },\n mergeSource: function(varDeclarations) {\n let isSimple = this.environment.isSimple,\n appendOnly = !this.forceBuffer,\n appendFirst,\n sourceSeen,\n bufferStart,\n bufferEnd;\n this.source.each(line => {\n if (line.appendToBuffer) {\n if (bufferStart) {\n line.prepend(' + ');\n } else {\n bufferStart = line;\n }\n bufferEnd = line;\n } else {\n if (bufferStart) {\n if (!sourceSeen) {\n appendFirst = true;\n } else {\n bufferStart.prepend('buffer += ');\n }\n bufferEnd.add(';');\n bufferStart = bufferEnd = undefined;\n }\n\n sourceSeen = true;\n if (!isSimple) {\n appendOnly = false;\n }\n }\n });\n\n if (appendOnly) {\n if (bufferStart) {\n bufferStart.prepend('return ');\n bufferEnd.add(';');\n } else if (!sourceSeen) {\n this.source.push('return \"\";');\n }\n } else {\n varDeclarations +=\n ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());\n\n if (bufferStart) {\n bufferStart.prepend('return buffer + ');\n bufferEnd.add(';');\n } else {\n this.source.push('return buffer;');\n }\n }\n\n if (varDeclarations) {\n this.source.prepend(\n 'var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\\n')\n );\n }\n\n return this.source.merge();\n },\n\n lookupPropertyFunctionVarDeclaration: function() {\n return `\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n `.trim();\n },\n\n // [blockValue]\n //\n // On stack, before: hash, inverse, program, value\n // On stack, after: return value of blockHelperMissing\n //\n // The purpose of this opcode is to take a block of the form\n // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and\n // replace it on the stack with the result of properly\n // invoking blockHelperMissing.\n blockValue: function(name) {\n let blockHelperMissing = this.aliasable(\n 'container.hooks.blockHelperMissing'\n ),\n params = [this.contextName(0)];\n this.setupHelperArgs(name, 0, params);\n\n let blockName = this.popStack();\n params.splice(1, 0, blockName);\n\n this.push(this.source.functionCall(blockHelperMissing, 'call', params));\n },\n\n // [ambiguousBlockValue]\n //\n // On stack, before: hash, inverse, program, value\n // Compiler value, before: lastHelper=value of last found helper, if any\n // On stack, after, if no lastHelper: same as [blockValue]\n // On stack, after, if lastHelper: value\n ambiguousBlockValue: function() {\n // We're being a bit cheeky and reusing the options value from the prior exec\n let blockHelperMissing = this.aliasable(\n 'container.hooks.blockHelperMissing'\n ),\n params = [this.contextName(0)];\n this.setupHelperArgs('', 0, params, true);\n\n this.flushInline();\n\n let current = this.topStack();\n params.splice(1, 0, current);\n\n this.pushSource([\n 'if (!',\n this.lastHelper,\n ') { ',\n current,\n ' = ',\n this.source.functionCall(blockHelperMissing, 'call', params),\n '}'\n ]);\n },\n\n // [appendContent]\n //\n // On stack, before: ...\n // On stack, after: ...\n //\n // Appends the string value of `content` to the current buffer\n appendContent: function(content) {\n if (this.pendingContent) {\n content = this.pendingContent + content;\n } else {\n this.pendingLocation = this.source.currentLocation;\n }\n\n this.pendingContent = content;\n },\n\n // [append]\n //\n // On stack, before: value, ...\n // On stack, after: ...\n //\n // Coerces `value` to a String and appends it to the current buffer.\n //\n // If `value` is truthy, or 0, it is coerced into a string and appended\n // Otherwise, the empty string is appended\n append: function() {\n if (this.isInline()) {\n this.replaceStack(current => [' != null ? ', current, ' : \"\"']);\n\n this.pushSource(this.appendToBuffer(this.popStack()));\n } else {\n let local = this.popStack();\n this.pushSource([\n 'if (',\n local,\n ' != null) { ',\n this.appendToBuffer(local, undefined, true),\n ' }'\n ]);\n if (this.environment.isSimple) {\n this.pushSource([\n 'else { ',\n this.appendToBuffer(\"''\", undefined, true),\n ' }'\n ]);\n }\n }\n },\n\n // [appendEscaped]\n //\n // On stack, before: value, ...\n // On stack, after: ...\n //\n // Escape `value` and append it to the buffer\n appendEscaped: function() {\n this.pushSource(\n this.appendToBuffer([\n this.aliasable('container.escapeExpression'),\n '(',\n this.popStack(),\n ')'\n ])\n );\n },\n\n // [getContext]\n //\n // On stack, before: ...\n // On stack, after: ...\n // Compiler value, after: lastContext=depth\n //\n // Set the value of the `lastContext` compiler value to the depth\n getContext: function(depth) {\n this.lastContext = depth;\n },\n\n // [pushContext]\n //\n // On stack, before: ...\n // On stack, after: currentContext, ...\n //\n // Pushes the value of the current context onto the stack.\n pushContext: function() {\n this.pushStackLiteral(this.contextName(this.lastContext));\n },\n\n // [lookupOnContext]\n //\n // On stack, before: ...\n // On stack, after: currentContext[name], ...\n //\n // Looks up the value of `name` on the current context and pushes\n // it onto the stack.\n lookupOnContext: function(parts, falsy, strict, scoped) {\n let i = 0;\n\n if (!scoped && this.options.compat && !this.lastContext) {\n // The depthed query is expected to handle the undefined logic for the root level that\n // is implemented below, so we evaluate that directly in compat mode\n this.push(this.depthedLookup(parts[i++]));\n } else {\n this.pushContext();\n }\n\n this.resolvePath('context', parts, i, falsy, strict);\n },\n\n // [lookupBlockParam]\n //\n // On stack, before: ...\n // On stack, after: blockParam[name], ...\n //\n // Looks up the value of `parts` on the given block param and pushes\n // it onto the stack.\n lookupBlockParam: function(blockParamId, parts) {\n this.useBlockParams = true;\n\n this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);\n this.resolvePath('context', parts, 1);\n },\n\n // [lookupData]\n //\n // On stack, before: ...\n // On stack, after: data, ...\n //\n // Push the data lookup operator\n lookupData: function(depth, parts, strict) {\n if (!depth) {\n this.pushStackLiteral('data');\n } else {\n this.pushStackLiteral('container.data(data, ' + depth + ')');\n }\n\n this.resolvePath('data', parts, 0, true, strict);\n },\n\n resolvePath: function(type, parts, startPartIndex, falsy, strict) {\n if (this.options.strict || this.options.assumeObjects) {\n this.push(\n strictLookup(\n this.options.strict && strict,\n this,\n parts,\n startPartIndex,\n type\n )\n );\n return;\n }\n\n let len = parts.length;\n for (let i = startPartIndex; i < len; i++) {\n /* eslint-disable no-loop-func */\n this.replaceStack(current => {\n let lookup = this.nameLookup(current, parts[i], type);\n // We want to ensure that zero and false are handled properly if the context (falsy flag)\n // needs to have the special handling for these values.\n if (!falsy) {\n return [' != null ? ', lookup, ' : ', current];\n } else {\n // Otherwise we can use generic falsy handling\n return [' && ', lookup];\n }\n });\n /* eslint-enable no-loop-func */\n }\n },\n\n // [resolvePossibleLambda]\n //\n // On stack, before: value, ...\n // On stack, after: resolved value, ...\n //\n // If the `value` is a lambda, replace it on the stack by\n // the return value of the lambda\n resolvePossibleLambda: function() {\n this.push([\n this.aliasable('container.lambda'),\n '(',\n this.popStack(),\n ', ',\n this.contextName(0),\n ')'\n ]);\n },\n\n // [pushStringParam]\n //\n // On stack, before: ...\n // On stack, after: string, currentContext, ...\n //\n // This opcode is designed for use in string mode, which\n // provides the string value of a parameter along with its\n // depth rather than resolving it immediately.\n pushStringParam: function(string, type) {\n this.pushContext();\n this.pushString(type);\n\n // If it's a subexpression, the string result\n // will be pushed after this opcode.\n if (type !== 'SubExpression') {\n if (typeof string === 'string') {\n this.pushString(string);\n } else {\n this.pushStackLiteral(string);\n }\n }\n },\n\n emptyHash: function(omitEmpty) {\n if (this.trackIds) {\n this.push('{}'); // hashIds\n }\n if (this.stringParams) {\n this.push('{}'); // hashContexts\n this.push('{}'); // hashTypes\n }\n this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');\n },\n pushHash: function() {\n if (this.hash) {\n this.hashes.push(this.hash);\n }\n this.hash = { values: {}, types: [], contexts: [], ids: [] };\n },\n popHash: function() {\n let hash = this.hash;\n this.hash = this.hashes.pop();\n\n if (this.trackIds) {\n this.push(this.objectLiteral(hash.ids));\n }\n if (this.stringParams) {\n this.push(this.objectLiteral(hash.contexts));\n this.push(this.objectLiteral(hash.types));\n }\n\n this.push(this.objectLiteral(hash.values));\n },\n\n // [pushString]\n //\n // On stack, before: ...\n // On stack, after: quotedString(string), ...\n //\n // Push a quoted version of `string` onto the stack\n pushString: function(string) {\n this.pushStackLiteral(this.quotedString(string));\n },\n\n // [pushLiteral]\n //\n // On stack, before: ...\n // On stack, after: value, ...\n //\n // Pushes a value onto the stack. This operation prevents\n // the compiler from creating a temporary variable to hold\n // it.\n pushLiteral: function(value) {\n this.pushStackLiteral(value);\n },\n\n // [pushProgram]\n //\n // On stack, before: ...\n // On stack, after: program(guid), ...\n //\n // Push a program expression onto the stack. This takes\n // a compile-time guid and converts it into a runtime-accessible\n // expression.\n pushProgram: function(guid) {\n if (guid != null) {\n this.pushStackLiteral(this.programExpression(guid));\n } else {\n this.pushStackLiteral(null);\n }\n },\n\n // [registerDecorator]\n //\n // On stack, before: hash, program, params..., ...\n // On stack, after: ...\n //\n // Pops off the decorator's parameters, invokes the decorator,\n // and inserts the decorator into the decorators list.\n registerDecorator(paramSize, name) {\n let foundDecorator = this.nameLookup('decorators', name, 'decorator'),\n options = this.setupHelperArgs(name, paramSize);\n\n // Store the resolved decorator in a variable and verify it is a function before\n // calling it. Without this, unregistered decorators can cause an unhandled TypeError\n // (calling undefined), which crashes the process — enabling Denial of Service.\n this.decorators.push(['var decorator = ', foundDecorator, ';']);\n this.decorators.push([\n 'if (typeof decorator !== \"function\") { throw new Error(',\n this.quotedString('Missing decorator: \"' + name + '\"'),\n '); }'\n ]);\n this.decorators.push([\n 'fn = ',\n this.decorators.functionCall('decorator', '', [\n 'fn',\n 'props',\n 'container',\n options\n ]),\n ' || fn;'\n ]);\n },\n\n // [invokeHelper]\n //\n // On stack, before: hash, inverse, program, params..., ...\n // On stack, after: result of helper invocation\n //\n // Pops off the helper's parameters, invokes the helper,\n // and pushes the helper's return value onto the stack.\n //\n // If the helper is not found, `helperMissing` is called.\n invokeHelper: function(paramSize, name, isSimple) {\n let nonHelper = this.popStack(),\n helper = this.setupHelper(paramSize, name);\n\n let possibleFunctionCalls = [];\n\n if (isSimple) {\n // direct call to helper\n possibleFunctionCalls.push(helper.name);\n }\n // call a function from the input object\n possibleFunctionCalls.push(nonHelper);\n if (!this.options.strict) {\n possibleFunctionCalls.push(\n this.aliasable('container.hooks.helperMissing')\n );\n }\n\n let functionLookupCode = [\n '(',\n this.itemsSeparatedBy(possibleFunctionCalls, '||'),\n ')'\n ];\n let functionCall = this.source.functionCall(\n functionLookupCode,\n 'call',\n helper.callParams\n );\n this.push(functionCall);\n },\n\n itemsSeparatedBy: function(items, separator) {\n let result = [];\n result.push(items[0]);\n for (let i = 1; i < items.length; i++) {\n result.push(separator, items[i]);\n }\n return result;\n },\n // [invokeKnownHelper]\n //\n // On stack, before: hash, inverse, program, params..., ...\n // On stack, after: result of helper invocation\n //\n // This operation is used when the helper is known to exist,\n // so a `helperMissing` fallback is not required.\n invokeKnownHelper: function(paramSize, name) {\n let helper = this.setupHelper(paramSize, name);\n this.push(this.source.functionCall(helper.name, 'call', helper.callParams));\n },\n\n // [invokeAmbiguous]\n //\n // On stack, before: hash, inverse, program, params..., ...\n // On stack, after: result of disambiguation\n //\n // This operation is used when an expression like `{{foo}}`\n // is provided, but we don't know at compile-time whether it\n // is a helper or a path.\n //\n // This operation emits more code than the other options,\n // and can be avoided by passing the `knownHelpers` and\n // `knownHelpersOnly` flags at compile-time.\n invokeAmbiguous: function(name, helperCall) {\n this.useRegister('helper');\n\n let nonHelper = this.popStack();\n\n this.emptyHash();\n let helper = this.setupHelper(0, name, helperCall);\n\n let helperName = (this.lastHelper = this.nameLookup(\n 'helpers',\n name,\n 'helper'\n ));\n\n let lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];\n if (!this.options.strict) {\n lookup[0] = '(helper = ';\n lookup.push(\n ' != null ? helper : ',\n this.aliasable('container.hooks.helperMissing')\n );\n }\n\n this.push([\n '(',\n lookup,\n helper.paramsInit ? ['),(', helper.paramsInit] : [],\n '),',\n '(typeof helper === ',\n this.aliasable('\"function\"'),\n ' ? ',\n this.source.functionCall('helper', 'call', helper.callParams),\n ' : helper))'\n ]);\n },\n\n // [invokePartial]\n //\n // On stack, before: context, ...\n // On stack after: result of partial invocation\n //\n // This operation pops off a context, invokes a partial with that context,\n // and pushes the result of the invocation back.\n invokePartial: function(isDynamic, name, indent) {\n let params = [],\n options = this.setupParams(name, 1, params);\n\n if (isDynamic) {\n name = this.popStack();\n delete options.name;\n }\n\n if (indent) {\n options.indent = JSON.stringify(indent);\n }\n options.helpers = 'helpers';\n options.partials = 'partials';\n options.decorators = 'container.decorators';\n\n if (!isDynamic) {\n params.unshift(this.nameLookup('partials', name, 'partial'));\n } else {\n params.unshift(name);\n }\n\n if (this.options.compat) {\n options.depths = 'depths';\n }\n options = this.objectLiteral(options);\n params.push(options);\n\n this.push(this.source.functionCall('container.invokePartial', '', params));\n },\n\n // [assignToHash]\n //\n // On stack, before: value, ..., hash, ...\n // On stack, after: ..., hash, ...\n //\n // Pops a value off the stack and assigns it to the current hash\n assignToHash: function(key) {\n let value = this.popStack(),\n context,\n type,\n id;\n\n if (this.trackIds) {\n id = this.popStack();\n }\n if (this.stringParams) {\n type = this.popStack();\n context = this.popStack();\n }\n\n let hash = this.hash;\n if (context) {\n hash.contexts[key] = context;\n }\n if (type) {\n hash.types[key] = type;\n }\n if (id) {\n hash.ids[key] = id;\n }\n hash.values[key] = value;\n },\n\n pushId: function(type, name, child) {\n if (type === 'BlockParam') {\n this.pushStackLiteral(\n 'blockParams[' +\n name[0] +\n '].path[' +\n name[1] +\n ']' +\n (child ? ' + ' + JSON.stringify('.' + child) : '')\n );\n } else if (type === 'PathExpression') {\n this.pushString(name);\n } else if (type === 'SubExpression') {\n this.pushStackLiteral('true');\n } else {\n this.pushStackLiteral('null');\n }\n },\n\n // HELPERS\n\n compiler: JavaScriptCompiler,\n\n compileChildren: function(environment, options) {\n let children = environment.children,\n child,\n compiler;\n\n for (let i = 0, l = children.length; i < l; i++) {\n child = children[i];\n compiler = new this.compiler(); // eslint-disable-line new-cap\n\n let existing = this.matchExistingProgram(child);\n\n if (existing == null) {\n // Placeholder to prevent name conflicts for nested children\n let index = this.context.programs.push('') - 1;\n child.index = index;\n child.name = 'program' + index;\n this.context.programs[index] = compiler.compile(\n child,\n options,\n this.context,\n !this.precompile\n );\n this.context.decorators[index] = compiler.decorators;\n this.context.environments[index] = child;\n\n this.useDepths = this.useDepths || compiler.useDepths;\n this.useBlockParams = this.useBlockParams || compiler.useBlockParams;\n child.useDepths = this.useDepths;\n child.useBlockParams = this.useBlockParams;\n } else {\n child.index = existing.index;\n child.name = 'program' + existing.index;\n\n this.useDepths = this.useDepths || existing.useDepths;\n this.useBlockParams = this.useBlockParams || existing.useBlockParams;\n }\n }\n },\n matchExistingProgram: function(child) {\n for (let i = 0, len = this.context.environments.length; i < len; i++) {\n let environment = this.context.environments[i];\n if (environment && environment.equals(child)) {\n return environment;\n }\n }\n },\n\n programExpression: function(guid) {\n let child = this.environment.children[guid],\n programParams = [child.index, 'data', child.blockParams];\n\n if (this.useBlockParams || this.useDepths) {\n programParams.push('blockParams');\n }\n if (this.useDepths) {\n programParams.push('depths');\n }\n\n return 'container.program(' + programParams.join(', ') + ')';\n },\n\n useRegister: function(name) {\n if (!this.registers[name]) {\n this.registers[name] = true;\n this.registers.list.push(name);\n }\n },\n\n push: function(expr) {\n if (!(expr instanceof Literal)) {\n expr = this.source.wrap(expr);\n }\n\n this.inlineStack.push(expr);\n return expr;\n },\n\n pushStackLiteral: function(item) {\n this.push(new Literal(item));\n },\n\n pushSource: function(source) {\n if (this.pendingContent) {\n this.source.push(\n this.appendToBuffer(\n this.source.quotedString(this.pendingContent),\n this.pendingLocation\n )\n );\n this.pendingContent = undefined;\n }\n\n if (source) {\n this.source.push(source);\n }\n },\n\n replaceStack: function(callback) {\n let prefix = ['('],\n stack,\n createdStack,\n usedLiteral;\n\n /* istanbul ignore next */\n if (!this.isInline()) {\n throw new Exception('replaceStack on non-inline');\n }\n\n // We want to merge the inline statement into the replacement statement via ','\n let top = this.popStack(true);\n\n if (top instanceof Literal) {\n // Literals do not need to be inlined\n stack = [top.value];\n prefix = ['(', stack];\n usedLiteral = true;\n } else {\n // Get or create the current stack name for use by the inline\n createdStack = true;\n let name = this.incrStack();\n\n prefix = ['((', this.push(name), ' = ', top, ')'];\n stack = this.topStack();\n }\n\n let item = callback.call(this, stack);\n\n if (!usedLiteral) {\n this.popStack();\n }\n if (createdStack) {\n this.stackSlot--;\n }\n this.push(prefix.concat(item, ')'));\n },\n\n incrStack: function() {\n this.stackSlot++;\n if (this.stackSlot > this.stackVars.length) {\n this.stackVars.push('stack' + this.stackSlot);\n }\n return this.topStackName();\n },\n topStackName: function() {\n return 'stack' + this.stackSlot;\n },\n flushInline: function() {\n let inlineStack = this.inlineStack;\n this.inlineStack = [];\n for (let i = 0, len = inlineStack.length; i < len; i++) {\n let entry = inlineStack[i];\n /* istanbul ignore if */\n if (entry instanceof Literal) {\n this.compileStack.push(entry);\n } else {\n let stack = this.incrStack();\n this.pushSource([stack, ' = ', entry, ';']);\n this.compileStack.push(stack);\n }\n }\n },\n isInline: function() {\n return this.inlineStack.length;\n },\n\n popStack: function(wrapped) {\n let inline = this.isInline(),\n item = (inline ? this.inlineStack : this.compileStack).pop();\n\n if (!wrapped && item instanceof Literal) {\n return item.value;\n } else {\n if (!inline) {\n /* istanbul ignore next */\n if (!this.stackSlot) {\n throw new Exception('Invalid stack pop');\n }\n this.stackSlot--;\n }\n return item;\n }\n },\n\n topStack: function() {\n let stack = this.isInline() ? this.inlineStack : this.compileStack,\n item = stack[stack.length - 1];\n\n /* istanbul ignore if */\n if (item instanceof Literal) {\n return item.value;\n } else {\n return item;\n }\n },\n\n contextName: function(context) {\n if (this.useDepths && context) {\n return 'depths[' + context + ']';\n } else {\n return 'depth' + context;\n }\n },\n\n quotedString: function(str) {\n return this.source.quotedString(str);\n },\n\n objectLiteral: function(obj) {\n return this.source.objectLiteral(obj);\n },\n\n aliasable: function(name) {\n let ret = this.aliases[name];\n if (ret) {\n ret.referenceCount++;\n return ret;\n }\n\n ret = this.aliases[name] = this.source.wrap(name);\n ret.aliasable = true;\n ret.referenceCount = 1;\n\n return ret;\n },\n\n setupHelper: function(paramSize, name, blockHelper) {\n let params = [],\n paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);\n let foundHelper = this.nameLookup('helpers', name, 'helper'),\n callContext = this.aliasable(\n `${this.contextName(0)} != null ? ${this.contextName(\n 0\n )} : (container.nullContext || {})`\n );\n\n return {\n params: params,\n paramsInit: paramsInit,\n name: foundHelper,\n callParams: [callContext].concat(params)\n };\n },\n\n setupParams: function(helper, paramSize, params) {\n let options = {},\n contexts = [],\n types = [],\n ids = [],\n objectArgs = !params,\n param;\n\n if (objectArgs) {\n params = [];\n }\n\n options.name = this.quotedString(helper);\n options.hash = this.popStack();\n\n if (this.trackIds) {\n options.hashIds = this.popStack();\n }\n if (this.stringParams) {\n options.hashTypes = this.popStack();\n options.hashContexts = this.popStack();\n }\n\n let inverse = this.popStack(),\n program = this.popStack();\n\n // Avoid setting fn and inverse if neither are set. This allows\n // helpers to do a check for `if (options.fn)`\n if (program || inverse) {\n options.fn = program || 'container.noop';\n options.inverse = inverse || 'container.noop';\n }\n\n // The parameters go on to the stack in order (making sure that they are evaluated in order)\n // so we need to pop them off the stack in reverse order\n let i = paramSize;\n while (i--) {\n param = this.popStack();\n params[i] = param;\n\n if (this.trackIds) {\n ids[i] = this.popStack();\n }\n if (this.stringParams) {\n types[i] = this.popStack();\n contexts[i] = this.popStack();\n }\n }\n\n if (objectArgs) {\n options.args = this.source.generateArray(params);\n }\n\n if (this.trackIds) {\n options.ids = this.source.generateArray(ids);\n }\n if (this.stringParams) {\n options.types = this.source.generateArray(types);\n options.contexts = this.source.generateArray(contexts);\n }\n\n if (this.options.data) {\n options.data = 'data';\n }\n if (this.useBlockParams) {\n options.blockParams = 'blockParams';\n }\n return options;\n },\n\n setupHelperArgs: function(helper, paramSize, params, useRegister) {\n let options = this.setupParams(helper, paramSize, params);\n options.loc = JSON.stringify(this.source.currentLocation);\n options = this.objectLiteral(options);\n if (useRegister) {\n this.useRegister('options');\n params.push('options');\n return ['options=', options];\n } else if (params) {\n params.push(options);\n return '';\n } else {\n return options;\n }\n }\n};\n\n(function() {\n const reservedWords = (\n 'break else new var' +\n ' case finally return void' +\n ' catch for switch while' +\n ' continue function this with' +\n ' default if throw' +\n ' delete in try' +\n ' do instanceof typeof' +\n ' abstract enum int short' +\n ' boolean export interface static' +\n ' byte extends long super' +\n ' char final native synchronized' +\n ' class float package throws' +\n ' const goto private transient' +\n ' debugger implements protected volatile' +\n ' double import public let yield await' +\n ' null true false'\n ).split(' ');\n\n const compilerWords = (JavaScriptCompiler.RESERVED_WORDS = {});\n\n for (let i = 0, l = reservedWords.length; i < l; i++) {\n compilerWords[reservedWords[i]] = true;\n }\n})();\n\n/**\n * @deprecated May be removed in the next major version\n */\nJavaScriptCompiler.isValidJavaScriptVariableName = function(name) {\n return (\n !JavaScriptCompiler.RESERVED_WORDS[name] &&\n /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name)\n );\n};\n\nfunction strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {\n let stack = compiler.popStack(),\n len = parts.length;\n if (requireTerminal) {\n len--;\n }\n\n for (let i = startPartIndex; i < len; i++) {\n stack = compiler.nameLookup(stack, parts[i], type);\n }\n\n if (requireTerminal) {\n return [\n compiler.aliasable('container.strict'),\n '(',\n stack,\n ', ',\n compiler.quotedString(parts[len]),\n ', ',\n JSON.stringify(compiler.source.currentLocation),\n ' )'\n ];\n } else {\n return stack;\n }\n}\n\nexport default JavaScriptCompiler;\n", "import runtime from './handlebars.runtime';\n\n// Compiler imports\nimport AST from './handlebars/compiler/ast';\nimport {\n parser as Parser,\n parse,\n parseWithoutProcessing\n} from './handlebars/compiler/base';\nimport { Compiler, compile, precompile } from './handlebars/compiler/compiler';\nimport JavaScriptCompiler from './handlebars/compiler/javascript-compiler';\nimport Visitor from './handlebars/compiler/visitor';\n\nimport noConflict from './handlebars/no-conflict';\n\nlet _create = runtime.create;\nfunction create() {\n let hb = _create();\n\n hb.compile = function(input, options) {\n return compile(input, options, hb);\n };\n hb.precompile = function(input, options) {\n return precompile(input, options, hb);\n };\n\n hb.AST = AST;\n hb.Compiler = Compiler;\n hb.JavaScriptCompiler = JavaScriptCompiler;\n hb.Parser = Parser;\n hb.parse = parse;\n hb.parseWithoutProcessing = parseWithoutProcessing;\n\n return hb;\n}\n\nlet inst = create();\ninst.create = create;\n\nnoConflict(inst);\n\ninst.Visitor = Visitor;\n\ninst['default'] = inst;\n\nexport default inst;\n", "/* eslint-disable new-cap */\nimport Visitor from './visitor';\n\nexport function print(ast) {\n return new PrintVisitor().accept(ast);\n}\n\nexport function PrintVisitor() {\n this.padding = 0;\n}\n\nPrintVisitor.prototype = new Visitor();\n\nPrintVisitor.prototype.pad = function(string) {\n let out = '';\n\n for (let i = 0, l = this.padding; i < l; i++) {\n out += ' ';\n }\n\n out += string + '\\n';\n return out;\n};\n\nPrintVisitor.prototype.Program = function(program) {\n let out = '',\n body = program.body,\n i,\n l;\n\n if (program.blockParams) {\n let blockParams = 'BLOCK PARAMS: [';\n for (i = 0, l = program.blockParams.length; i < l; i++) {\n blockParams += ' ' + program.blockParams[i];\n }\n blockParams += ' ]';\n out += this.pad(blockParams);\n }\n\n for (i = 0, l = body.length; i < l; i++) {\n out += this.accept(body[i]);\n }\n\n this.padding--;\n\n return out;\n};\n\nPrintVisitor.prototype.MustacheStatement = function(mustache) {\n return this.pad('{{ ' + this.SubExpression(mustache) + ' }}');\n};\nPrintVisitor.prototype.Decorator = function(mustache) {\n return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}');\n};\n\nPrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function(\n block\n) {\n let out = '';\n\n out += this.pad(\n (block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'\n );\n this.padding++;\n out += this.pad(this.SubExpression(block));\n if (block.program) {\n out += this.pad('PROGRAM:');\n this.padding++;\n out += this.accept(block.program);\n this.padding--;\n }\n if (block.inverse) {\n if (block.program) {\n this.padding++;\n }\n out += this.pad('{{^}}');\n this.padding++;\n out += this.accept(block.inverse);\n this.padding--;\n if (block.program) {\n this.padding--;\n }\n }\n this.padding--;\n\n return out;\n};\n\nPrintVisitor.prototype.PartialStatement = function(partial) {\n let content = 'PARTIAL:' + partial.name.original;\n if (partial.params[0]) {\n content += ' ' + this.accept(partial.params[0]);\n }\n if (partial.hash) {\n content += ' ' + this.accept(partial.hash);\n }\n return this.pad('{{> ' + content + ' }}');\n};\nPrintVisitor.prototype.PartialBlockStatement = function(partial) {\n let content = 'PARTIAL BLOCK:' + partial.name.original;\n if (partial.params[0]) {\n content += ' ' + this.accept(partial.params[0]);\n }\n if (partial.hash) {\n content += ' ' + this.accept(partial.hash);\n }\n\n content += ' ' + this.pad('PROGRAM:');\n this.padding++;\n content += this.accept(partial.program);\n this.padding--;\n\n return this.pad('{{> ' + content + ' }}');\n};\n\nPrintVisitor.prototype.ContentStatement = function(content) {\n return this.pad(\"CONTENT[ '\" + content.value + \"' ]\");\n};\n\nPrintVisitor.prototype.CommentStatement = function(comment) {\n return this.pad(\"{{! '\" + comment.value + \"' }}\");\n};\n\nPrintVisitor.prototype.SubExpression = function(sexpr) {\n let params = sexpr.params,\n paramStrings = [],\n hash;\n\n for (let i = 0, l = params.length; i < l; i++) {\n paramStrings.push(this.accept(params[i]));\n }\n\n params = '[' + paramStrings.join(', ') + ']';\n\n hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : '';\n\n return this.accept(sexpr.path) + ' ' + params + hash;\n};\n\nPrintVisitor.prototype.PathExpression = function(id) {\n let path = id.parts.join('/');\n return (id.data ? '@' : '') + 'PATH:' + path;\n};\n\nPrintVisitor.prototype.StringLiteral = function(string) {\n return '\"' + string.value + '\"';\n};\n\nPrintVisitor.prototype.NumberLiteral = function(number) {\n return 'NUMBER{' + number.value + '}';\n};\n\nPrintVisitor.prototype.BooleanLiteral = function(bool) {\n return 'BOOLEAN{' + bool.value + '}';\n};\n\nPrintVisitor.prototype.UndefinedLiteral = function() {\n return 'UNDEFINED';\n};\n\nPrintVisitor.prototype.NullLiteral = function() {\n return 'NULL';\n};\n\nPrintVisitor.prototype.Hash = function(hash) {\n let pairs = hash.pairs,\n joinedPairs = [];\n\n for (let i = 0, l = pairs.length; i < l; i++) {\n joinedPairs.push(this.accept(pairs[i]));\n }\n\n return 'HASH{' + joinedPairs.join(', ') + '}';\n};\nPrintVisitor.prototype.HashPair = function(pair) {\n return pair.key + '=' + this.accept(pair.value);\n};\n/* eslint-enable new-cap */\n", "// USAGE:\n// var handlebars = require('handlebars');\n/* eslint-env node */\n/* eslint-disable no-var */\n\n// var local = handlebars.create();\n\nvar handlebars = require('../dist/cjs/handlebars')['default'];\n\nvar printer = require('../dist/cjs/handlebars/compiler/printer');\nhandlebars.PrintVisitor = printer.PrintVisitor;\nhandlebars.print = printer.print;\n\nmodule.exports = handlebars;\n\n// Publish a Node.js require() handler for .handlebars and .hbs files\nfunction extension(module, filename) {\n var fs = require('fs');\n var templateString = fs.readFileSync(filename, 'utf8');\n module.exports = handlebars.compile(templateString);\n}\n/* istanbul ignore else */\nif (typeof require !== 'undefined' && require.extensions) {\n require.extensions['.handlebars'] = extension;\n require.extensions['.hbs'] = extension;\n}\n", null, null, "'use strict'\n\nconst NullObject = function NullObject () { }\nNullObject.prototype = Object.create(null)\n\n/**\n * RegExp to match *( \";\" parameter ) in RFC 7231 sec 3.1.1.1\n *\n * parameter = token \"=\" ( token / quoted-string )\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n * / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n * / DIGIT / ALPHA\n * ; any VCHAR, except delimiters\n * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\n * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text\n * obs-text = %x80-FF\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n */\nconst paramRE = /; *([!#$%&'*+.^\\w`|~-]+)=(\"(?:[\\v\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\v\\u0020-\\u00ff])*\"|[!#$%&'*+.^\\w`|~-]+) */gu\n\n/**\n * RegExp to match quoted-pair in RFC 7230 sec 3.2.6\n *\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n * obs-text = %x80-FF\n */\nconst quotedPairRE = /\\\\([\\v\\u0020-\\u00ff])/gu\n\n/**\n * RegExp to match type in RFC 7231 sec 3.1.1.1\n *\n * media-type = type \"/\" subtype\n * type = token\n * subtype = token\n */\nconst mediaTypeRE = /^[!#$%&'*+.^\\w|~-]+\\/[!#$%&'*+.^\\w|~-]+$/u\n\n// default ContentType to prevent repeated object creation\nconst defaultContentType = { type: '', parameters: new NullObject() }\nObject.freeze(defaultContentType.parameters)\nObject.freeze(defaultContentType)\n\n/**\n * Parse media type to object.\n *\n * @param {string|object} header\n * @return {Object}\n * @public\n */\n\nfunction parse (header) {\n if (typeof header !== 'string') {\n throw new TypeError('argument header is required and must be a string')\n }\n\n let index = header.indexOf(';')\n const type = index !== -1\n ? header.slice(0, index).trim()\n : header.trim()\n\n if (mediaTypeRE.test(type) === false) {\n throw new TypeError('invalid media type')\n }\n\n const result = {\n type: type.toLowerCase(),\n parameters: new NullObject()\n }\n\n // parse parameters\n if (index === -1) {\n return result\n }\n\n let key\n let match\n let value\n\n paramRE.lastIndex = index\n\n while ((match = paramRE.exec(header))) {\n if (match.index !== index) {\n throw new TypeError('invalid parameter format')\n }\n\n index += match[0].length\n key = match[1].toLowerCase()\n value = match[2]\n\n if (value[0] === '\"') {\n // remove quotes and escapes\n value = value\n .slice(1, value.length - 1)\n\n quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))\n }\n\n result.parameters[key] = value\n }\n\n if (index !== header.length) {\n throw new TypeError('invalid parameter format')\n }\n\n return result\n}\n\nfunction safeParse (header) {\n if (typeof header !== 'string') {\n return defaultContentType\n }\n\n let index = header.indexOf(';')\n const type = index !== -1\n ? header.slice(0, index).trim()\n : header.trim()\n\n if (mediaTypeRE.test(type) === false) {\n return defaultContentType\n }\n\n const result = {\n type: type.toLowerCase(),\n parameters: new NullObject()\n }\n\n // parse parameters\n if (index === -1) {\n return result\n }\n\n let key\n let match\n let value\n\n paramRE.lastIndex = index\n\n while ((match = paramRE.exec(header))) {\n if (match.index !== index) {\n return defaultContentType\n }\n\n index += match[0].length\n key = match[1].toLowerCase()\n value = match[2]\n\n if (value[0] === '\"') {\n // remove quotes and escapes\n value = value\n .slice(1, value.length - 1)\n\n quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'))\n }\n\n result.parameters[key] = value\n }\n\n if (index !== header.length) {\n return defaultContentType\n }\n\n return result\n}\n\nmodule.exports.default = { parse, safeParse }\nmodule.exports.parse = parse\nmodule.exports.safeParse = safeParse\nmodule.exports.defaultContentType = defaultContentType\n", "export const state = {\n warningEmitted: false,\n};\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !state.warningEmitted) {\n if (process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED === \"true\") {\n state.warningEmitted = true;\n return;\n }\n const userMajorVersion = parseInt(version.substring(1, version.indexOf(\".\")));\n const vv = 22;\n if (userMajorVersion < vv) {\n state.warningEmitted = true;\n process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)\nversions published after the first week of January 2027\nwill require node >=${vv}. You are running node ${version}.\n\nTo continue receiving updates to AWS services, bug fixes,\nand security updates please upgrade to node >=${vv}.\n\nMore information can be found at: https://a.co/c895JFp`);\n }\n }\n};\n", "export const longPollMiddleware = () => (next, context) => async (args) => {\n context.__retryLongPoll = true;\n return next(args);\n};\nexport const longPollMiddlewareOptions = {\n name: \"longPollMiddleware\",\n tags: [\"RETRY\"],\n step: \"initialize\",\n override: true,\n};\nexport const getLongPollPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);\n },\n});\n", "export function setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n", "import { Readable } from \"node:stream\";\nexport const isStreamingPayload = (request) => request?.body instanceof Readable ||\n (typeof ReadableStream !== \"undefined\" && request?.body instanceof ReadableStream);\n", "const getAllAliases = (name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n};\nconst getMiddlewareNameWithAliases = (name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n};\nexport const constructStack = () => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = new Set();\n const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||\n priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]);\n const removeByName = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const removeByReference = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const cloneTo = (toStack) => {\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n toStack.identifyOnResolve?.(stack.identifyOnResolve());\n return toStack;\n };\n const expandRelativeMiddlewareList = (from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n };\n const getMiddlewareList = (debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n if (debug) {\n return;\n }\n throw new Error(`${entry.toMiddleware} is not found when adding ` +\n `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` +\n `middleware ${entry.relation} ${entry.toMiddleware}`);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries)\n .map(expandRelativeMiddlewareList)\n .reduce((wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain;\n };\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ` +\n `${toOverride.priority} priority in ${toOverride.step} step cannot ` +\n `be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ` +\n `${entry.priority} priority in ${entry.step} step.`);\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ` +\n `${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden ` +\n `by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} ` +\n `\"${entry.toMiddleware}\" middleware.`);\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ??\n mw.relation +\n \" \" +\n mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList()\n .map((entry) => entry.middleware)\n .reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n },\n };\n return stack;\n};\nconst stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1,\n};\nconst priorityWeights = {\n high: 3,\n normal: 2,\n low: 1,\n};\n", "var HttpAuthLocation;\n(function (HttpAuthLocation) {\n HttpAuthLocation[\"HEADER\"] = \"header\";\n HttpAuthLocation[\"QUERY\"] = \"query\";\n})(HttpAuthLocation || (HttpAuthLocation = {}));\n\nvar HttpApiKeyAuthLocation;\n(function (HttpApiKeyAuthLocation) {\n HttpApiKeyAuthLocation[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation[\"QUERY\"] = \"query\";\n})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));\n\nvar EndpointURLScheme;\n(function (EndpointURLScheme) {\n EndpointURLScheme[\"HTTP\"] = \"http\";\n EndpointURLScheme[\"HTTPS\"] = \"https\";\n})(EndpointURLScheme || (EndpointURLScheme = {}));\n\nvar AlgorithmId;\n(function (AlgorithmId) {\n AlgorithmId[\"MD5\"] = \"md5\";\n AlgorithmId[\"CRC32\"] = \"crc32\";\n AlgorithmId[\"CRC32C\"] = \"crc32c\";\n AlgorithmId[\"SHA1\"] = \"sha1\";\n AlgorithmId[\"SHA256\"] = \"sha256\";\n})(AlgorithmId || (AlgorithmId = {}));\nconst getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.SHA256,\n checksumConstructor: () => runtimeConfig.sha256,\n });\n }\n if (runtimeConfig.md5 != undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.MD5,\n checksumConstructor: () => runtimeConfig.md5,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nconst resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n\nconst getDefaultClientConfiguration = (runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n};\nconst resolveDefaultRuntimeConfig = (config) => {\n return resolveChecksumRuntimeConfig(config);\n};\n\nvar FieldPosition;\n(function (FieldPosition) {\n FieldPosition[FieldPosition[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition[FieldPosition[\"TRAILER\"] = 1] = \"TRAILER\";\n})(FieldPosition || (FieldPosition = {}));\n\nconst SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\nvar IniSectionType;\n(function (IniSectionType) {\n IniSectionType[\"PROFILE\"] = \"profile\";\n IniSectionType[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType[\"SERVICES\"] = \"services\";\n})(IniSectionType || (IniSectionType = {}));\n\nvar RequestHandlerProtocol;\n(function (RequestHandlerProtocol) {\n RequestHandlerProtocol[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol[\"TDS_8_0\"] = \"tds/8.0\";\n})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));\n\nexports.AlgorithmId = AlgorithmId;\nexports.EndpointURLScheme = EndpointURLScheme;\nexports.FieldPosition = FieldPosition;\nexports.HttpApiKeyAuthLocation = HttpApiKeyAuthLocation;\nexports.HttpAuthLocation = HttpAuthLocation;\nexports.IniSectionType = IniSectionType;\nexports.RequestHandlerProtocol = RequestHandlerProtocol;\nexports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;\nexports.getDefaultClientConfiguration = getDefaultClientConfiguration;\nexports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "export class HttpRequest {\n method;\n protocol;\n hostname;\n port;\n path;\n query;\n headers;\n username;\n password;\n fragment;\n body;\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.slice(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static clone(request) {\n const cloned = new HttpRequest({\n ...request,\n headers: { ...request.headers },\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n return HttpRequest.clone(this);\n }\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n", "export class HttpResponse {\n statusCode;\n reason;\n headers;\n body;\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\n", "const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nexport const isValidHostLabel = (value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n};\n", "export function isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "export function parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n", "import { parseQueryString } from \"./parseQueryString\";\nexport const parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n", "import { parseUrl } from \"./parseUrl\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const name in endpoint.headers) {\n v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "export { getSmithyContext } from \"./getSmithyContext\";\nexport { HttpRequest } from \"./httpRequest\";\nexport { HttpResponse } from \"./httpResponse\";\nexport { isValidHostLabel } from \"./isValidHostLabel\";\nexport { isValidHostname } from \"./isValidHostname\";\nexport { normalizeProvider } from \"./normalizeProvider\";\nexport { parseQueryString } from \"./parseQueryString\";\nexport { parseUrl } from \"./parseUrl\";\nexport { toEndpointV1 } from \"./toEndpointV1\";\n", "export const invalidFunction = (message) => () => {\n throw new Error(message);\n};\n", "export const invalidProvider = (message) => () => Promise.reject(message);\n", "export const getCircularReplacer = () => {\n const seen = new WeakSet();\n return (key, value) => {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n };\n};\n", "export const sleep = (seconds) => {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nexport const waiterServiceDefaults = {\n minDelay: 2,\n maxDelay: 120,\n};\nexport var WaiterState;\n(function (WaiterState) {\n WaiterState[\"ABORTED\"] = \"ABORTED\";\n WaiterState[\"FAILURE\"] = \"FAILURE\";\n WaiterState[\"SUCCESS\"] = \"SUCCESS\";\n WaiterState[\"RETRY\"] = \"RETRY\";\n WaiterState[\"TIMEOUT\"] = \"TIMEOUT\";\n})(WaiterState || (WaiterState = {}));\nexport const checkExceptions = (result) => {\n if (result.state === WaiterState.ABORTED) {\n const abortError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Request was aborted\",\n }, getCircularReplacer())}`);\n abortError.name = \"AbortError\";\n throw abortError;\n }\n else if (result.state === WaiterState.TIMEOUT) {\n const timeoutError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Waiter has timed out\",\n }, getCircularReplacer())}`);\n timeoutError.name = \"TimeoutError\";\n throw timeoutError;\n }\n else if (result.state !== WaiterState.SUCCESS) {\n throw new Error(`${JSON.stringify(result, getCircularReplacer())}`);\n }\n return result;\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nimport { sleep } from \"./utils/sleep\";\nimport { WaiterState } from \"./waiter\";\nexport const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {\n const observedResponses = {};\n const [minDelayMs, maxDelayMs] = [minDelay * 1000, maxDelay * 1000];\n let currentAttempt = 0;\n const waitUntil = Date.now() + maxWaitTime * 1000;\n const warn403Time = Date.now() + 60_000;\n let didWarn403 = false;\n while (true) {\n if (currentAttempt > 0) {\n const delayMs = exponentialBackoffWithJitter(minDelayMs, maxDelayMs, currentAttempt, waitUntil);\n if (abortController?.signal?.aborted || abortSignal?.aborted) {\n const message = \"AbortController signal aborted.\";\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n return { state: WaiterState.ABORTED, observedResponses };\n }\n if (Date.now() + delayMs > waitUntil) {\n return { state: WaiterState.TIMEOUT, observedResponses };\n }\n await sleep(delayMs / 1_000);\n }\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== WaiterState.RETRY) {\n return { state, reason, final: reason, observedResponses };\n }\n currentAttempt += 1;\n if (!didWarn403 && Date.now() >= warn403Time) {\n checkWarn403(observedResponses, client);\n didWarn403 = true;\n }\n }\n};\nconst checkWarn403 = (observedResponses = {}, client) => {\n const orderedErrors = Object.keys(observedResponses);\n let maxCount = 0;\n let count403 = 0;\n for (const response of orderedErrors) {\n const n = observedResponses[response] | 0;\n maxCount = Math.max(n, maxCount);\n if (response.startsWith(\"403:\")) {\n count403 += n;\n }\n }\n const clientLogger = client?.config?.logger;\n const warningLogger = typeof clientLogger?.warn === \"function\" && !clientLogger.constructor?.name?.includes?.(\"NoOpLogger\")\n ? clientLogger\n : console;\n if (count403 >= 3 || orderedErrors[orderedErrors.length - 1]?.startsWith(\"403:\")) {\n warningLogger.warn(`@smithy/util-waiter WARN - 403 status code encountered during waiter polling.`);\n }\n};\nconst createMessageFromResponse = (reason) => {\n const status = reason?.$response?.statusCode ?? reason?.$metadata?.httpStatusCode;\n if (reason?.$responseBodyText) {\n return `${status ? status + \": \" : \"\"}Deserialization error for body: ${reason.$responseBodyText}`;\n }\n if (status) {\n if (reason?.$response || reason?.message) {\n return `${status ?? \"Unknown\"}: ${reason?.message}`;\n }\n return `${status}: OK`;\n }\n return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? \"Unknown\");\n};\nconst exponentialBackoffWithJitter = (minDelayMs, maxDelayMs, attempt, waitUntil) => {\n const attemptCountCeiling = Math.log(maxDelayMs / minDelayMs) / Math.log(2) + 1;\n if (attempt > attemptCountCeiling) {\n return maxDelayMs;\n }\n const delay = minDelayMs * 2 ** (attempt - 1);\n const capped = Math.min(delay, maxDelayMs);\n const waitFor = randomInRange(minDelayMs, capped);\n if (Date.now() + waitFor > waitUntil) {\n const timeRemaining = waitUntil - Date.now();\n return Math.max(0, timeRemaining - 500);\n }\n return waitFor;\n};\nconst randomInRange = (min, max) => min + Math.random() * (max - min);\n", "export const validateWaiterOptions = (options) => {\n if (options.maxWaitTime <= 0) {\n throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);\n }\n else if (options.minDelay <= 0) {\n throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);\n }\n else if (options.maxDelay <= 0) {\n throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);\n }\n else if (options.maxWaitTime <= options.minDelay) {\n throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n else if (options.maxDelay < options.minDelay) {\n throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n};\n", "import { runPolling } from \"./poller\";\nimport { validateWaiterOptions } from \"./utils/validate\";\nimport { WaiterState, waiterServiceDefaults } from \"./waiter\";\nconst abortTimeout = (abortSignal) => {\n let onAbort;\n const promise = new Promise((resolve) => {\n onAbort = () => resolve({ state: WaiterState.ABORTED });\n if (typeof abortSignal.addEventListener === \"function\") {\n abortSignal.addEventListener(\"abort\", onAbort);\n }\n else {\n abortSignal.onabort = onAbort;\n }\n });\n return {\n clearListener() {\n if (typeof abortSignal.removeEventListener === \"function\") {\n abortSignal.removeEventListener(\"abort\", onAbort);\n }\n },\n aborted: promise,\n };\n};\nexport const createWaiter = async (options, input, acceptorChecks) => {\n const params = {\n ...waiterServiceDefaults,\n ...options,\n };\n validateWaiterOptions(params);\n const exitConditions = [runPolling(params, input, acceptorChecks)];\n const finalize = [];\n if (options.abortSignal) {\n const { aborted, clearListener } = abortTimeout(options.abortSignal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n if (options.abortController?.signal) {\n const { aborted, clearListener } = abortTimeout(options.abortController.signal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n return Promise.race(exitConditions).then((result) => {\n for (const fn of finalize) {\n fn();\n }\n return result;\n });\n};\n", "import { constructStack } from \"../middleware-stack/MiddlewareStack\";\nexport class Client {\n config;\n middlewareStack = constructStack();\n initConfig;\n handlers;\n constructor(config) {\n this.config = config;\n const { protocol, protocolSettings } = config;\n if (protocolSettings) {\n if (typeof protocol === \"function\") {\n config.protocol = new protocol(protocolSettings);\n }\n }\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;\n let handler;\n if (useHandlerCache) {\n if (!this.handlers) {\n this.handlers = new WeakMap();\n }\n const handlers = this.handlers;\n if (handlers.has(command.constructor)) {\n handler = handlers.get(command.constructor);\n }\n else {\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n handlers.set(command.constructor, handler);\n }\n }\n else {\n delete this.handlers;\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n }\n if (callback) {\n handler(command)\n .then((result) => callback(null, result.output), (err) => callback(err))\n .catch(() => { });\n }\n else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n this.config?.requestHandler?.destroy?.();\n delete this.handlers;\n }\n}\n", "export const deref = (schemaRef) => {\n if (typeof schemaRef === \"function\") {\n return schemaRef();\n }\n return schemaRef;\n};\n", "export const operation = (namespace, name, traits, input, output) => ({\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { HttpResponse, getSmithyContext } from \"@smithy/core/transport\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {\n const { response } = await next(args);\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n try {\n const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {\n ...config,\n ...context,\n }, response);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (ignored) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {}, statusCode } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (ignored) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "import { getSmithyContext, toEndpointV1 } from \"@smithy/core/transport\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaSerializationMiddleware = (config) => (next, context) => async (args) => {\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : config.endpoint;\n const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {\n ...config,\n ...context,\n endpoint,\n });\n return next({\n ...args,\n request,\n });\n};\n", "import { schemaDeserializationMiddleware } from \"./schemaDeserializationMiddleware\";\nimport { schemaSerializationMiddleware } from \"./schemaSerializationMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSchemaSerdePlugin(config) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);\n commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);\n config.protocol.setSerdeContext(config);\n },\n };\n}\n", "export class Schema {\n name;\n namespace;\n traits;\n static assign(instance, values) {\n const schema = Object.assign(instance, values);\n return schema;\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const list = lhs;\n return list.symbol === this.symbol;\n }\n return isPrototype;\n }\n getName() {\n return this.namespace + \"#\" + this.name;\n }\n}\n", "import { Schema } from \"./Schema\";\nexport class ListSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/lis\");\n name;\n traits;\n valueSchema;\n symbol = ListSchema.symbol;\n}\nexport const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), {\n name,\n namespace,\n traits,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class MapSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/map\");\n name;\n traits;\n keySchema;\n valueSchema;\n symbol = MapSchema.symbol;\n}\nexport const map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), {\n name,\n namespace,\n traits,\n keySchema,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class OperationSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/ope\");\n name;\n traits;\n input;\n output;\n symbol = OperationSchema.symbol;\n}\nexport const op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), {\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { Schema } from \"./Schema\";\nexport class StructureSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/str\");\n name;\n traits;\n memberNames;\n memberList;\n symbol = StructureSchema.symbol;\n}\nexport const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n});\n", "import { Schema } from \"./Schema\";\nimport { StructureSchema } from \"./StructureSchema\";\nexport class ErrorSchema extends StructureSchema {\n static symbol = Symbol.for(\"@smithy/err\");\n ctor;\n symbol = ErrorSchema.symbol;\n}\nexport const error = (namespace, name, traits, memberNames, memberList, _ctor) => Schema.assign(new ErrorSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n ctor: null,\n});\n", "export const traitsCache = [];\nexport function translateTraits(indicator) {\n if (typeof indicator === \"object\") {\n return indicator;\n }\n indicator = indicator | 0;\n if (traitsCache[indicator]) {\n return traitsCache[indicator];\n }\n const traits = {};\n let i = 0;\n for (const trait of [\n \"httpLabel\",\n \"idempotent\",\n \"idempotencyToken\",\n \"sensitive\",\n \"httpPayload\",\n \"httpResponseCode\",\n \"httpQueryParams\",\n ]) {\n if (((indicator >> i++) & 1) === 1) {\n traits[trait] = 1;\n }\n }\n return (traitsCache[indicator] = traits);\n}\n", "import { deref } from \"../deref\";\nimport { translateTraits } from \"./translateTraits\";\nconst anno = {\n it: Symbol.for(\"@smithy/nor-struct-it\"),\n ns: Symbol.for(\"@smithy/ns\"),\n};\nexport const simpleSchemaCacheN = [];\nexport const simpleSchemaCacheS = {};\nexport class NormalizedSchema {\n ref;\n memberName;\n static symbol = Symbol.for(\"@smithy/nor\");\n symbol = NormalizedSchema.symbol;\n name;\n schema;\n _isMemberSchema;\n traits;\n memberTraits;\n normalizedTraits;\n constructor(ref, memberName) {\n this.ref = ref;\n this.memberName = memberName;\n const traitStack = [];\n let _ref = ref;\n let schema = ref;\n this._isMemberSchema = false;\n while (isMemberSchema(_ref)) {\n traitStack.push(_ref[1]);\n _ref = _ref[0];\n schema = deref(_ref);\n this._isMemberSchema = true;\n }\n if (traitStack.length > 0) {\n this.memberTraits = {};\n for (let i = traitStack.length - 1; i >= 0; --i) {\n const traitSet = traitStack[i];\n Object.assign(this.memberTraits, translateTraits(traitSet));\n }\n }\n else {\n this.memberTraits = 0;\n }\n if (schema instanceof NormalizedSchema) {\n const computedMemberTraits = this.memberTraits;\n Object.assign(this, schema);\n this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());\n this.normalizedTraits = void 0;\n this.memberName = memberName ?? schema.memberName;\n return;\n }\n this.schema = deref(schema);\n if (isStaticSchema(this.schema)) {\n this.name = `${this.schema[1]}#${this.schema[2]}`;\n this.traits = this.schema[3];\n }\n else {\n this.name = this.memberName ?? String(schema);\n this.traits = 0;\n }\n if (this._isMemberSchema && !memberName) {\n throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);\n }\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const ns = lhs;\n return ns.symbol === this.symbol;\n }\n return isPrototype;\n }\n static of(ref) {\n const keyAble = typeof ref === \"function\" || (typeof ref === \"object\" && ref !== null);\n if (typeof ref === \"number\") {\n if (simpleSchemaCacheN[ref]) {\n return simpleSchemaCacheN[ref];\n }\n }\n else if (typeof ref === \"string\") {\n if (simpleSchemaCacheS[ref]) {\n return simpleSchemaCacheS[ref];\n }\n }\n else if (keyAble) {\n if (ref[anno.ns]) {\n return ref[anno.ns];\n }\n }\n const sc = deref(ref);\n if (sc instanceof NormalizedSchema) {\n return sc;\n }\n if (isMemberSchema(sc)) {\n const [ns, traits] = sc;\n if (ns instanceof NormalizedSchema) {\n Object.assign(ns.getMergedTraits(), translateTraits(traits));\n return ns;\n }\n throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);\n }\n const ns = new NormalizedSchema(sc);\n if (keyAble) {\n return (ref[anno.ns] = ns);\n }\n if (typeof sc === \"string\") {\n return (simpleSchemaCacheS[sc] = ns);\n }\n if (typeof sc === \"number\") {\n return (simpleSchemaCacheN[sc] = ns);\n }\n return ns;\n }\n getSchema() {\n const sc = this.schema;\n if (Array.isArray(sc) && sc[0] === 0) {\n return sc[4];\n }\n return sc;\n }\n getName(withNamespace = false) {\n const { name } = this;\n const short = !withNamespace && name && name.includes(\"#\");\n return short ? name.split(\"#\")[1] : name || undefined;\n }\n getMemberName() {\n return this.memberName;\n }\n isMemberSchema() {\n return this._isMemberSchema;\n }\n isListSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 64 && sc < 128\n : sc[0] === 1;\n }\n isMapSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 128 && sc <= 0b1111_1111\n : sc[0] === 2;\n }\n isStructSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n const id = sc[0];\n return (id === 3 ||\n id === -3 ||\n id === 4);\n }\n isUnionSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n return sc[0] === 4;\n }\n isBlobSchema() {\n const sc = this.getSchema();\n return sc === 21 || sc === 42;\n }\n isTimestampSchema() {\n const sc = this.getSchema();\n return (typeof sc === \"number\" &&\n sc >= 4 &&\n sc <= 7);\n }\n isUnitSchema() {\n return this.getSchema() === \"unit\";\n }\n isDocumentSchema() {\n return this.getSchema() === 15;\n }\n isStringSchema() {\n return this.getSchema() === 0;\n }\n isBooleanSchema() {\n return this.getSchema() === 2;\n }\n isNumericSchema() {\n return this.getSchema() === 1;\n }\n isBigIntegerSchema() {\n return this.getSchema() === 17;\n }\n isBigDecimalSchema() {\n return this.getSchema() === 19;\n }\n isStreaming() {\n const { streaming } = this.getMergedTraits();\n return !!streaming || this.getSchema() === 42;\n }\n isIdempotencyToken() {\n return !!this.getMergedTraits().idempotencyToken;\n }\n getMergedTraits() {\n return (this.normalizedTraits ??\n (this.normalizedTraits = {\n ...this.getOwnTraits(),\n ...this.getMemberTraits(),\n }));\n }\n getMemberTraits() {\n return translateTraits(this.memberTraits);\n }\n getOwnTraits() {\n return translateTraits(this.traits);\n }\n getKeySchema() {\n const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];\n if (!isDoc && !isMap) {\n throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);\n }\n const schema = this.getSchema();\n const memberSchema = isDoc\n ? 15\n : (schema[4] ?? 0);\n return member([memberSchema, 0], \"key\");\n }\n getValueSchema() {\n const sc = this.getSchema();\n const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];\n const memberSchema = typeof sc === \"number\"\n ? 0b0011_1111 & sc\n : sc && typeof sc === \"object\" && (isMap || isList)\n ? sc[3 + sc[0]]\n : isDoc\n ? 15\n : void 0;\n if (memberSchema != null) {\n return member([memberSchema, 0], isMap ? \"value\" : \"member\");\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);\n }\n getMemberSchema(memberName) {\n const struct = this.getSchema();\n if (this.isStructSchema() && struct[4].includes(memberName)) {\n const i = struct[4].indexOf(memberName);\n const memberSchema = struct[5][i];\n return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);\n }\n if (this.isDocumentSchema()) {\n return member([15, 0], memberName);\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);\n }\n getMemberSchemas() {\n const buffer = {};\n try {\n for (const [k, v] of this.structIterator()) {\n buffer[k] = v;\n }\n }\n catch (ignored) { }\n return buffer;\n }\n getEventStreamMember() {\n if (this.isStructSchema()) {\n for (const [memberName, memberSchema] of this.structIterator()) {\n if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {\n return memberName;\n }\n }\n }\n return \"\";\n }\n *structIterator() {\n if (this.isUnitSchema()) {\n return;\n }\n if (!this.isStructSchema()) {\n throw new Error(\"@smithy/core/schema - cannot iterate non-struct schema.\");\n }\n const struct = this.getSchema();\n const z = struct[4].length;\n let it = struct[anno.it];\n if (it && z === it.length) {\n yield* it;\n return;\n }\n it = Array(z);\n for (let i = 0; i < z; ++i) {\n const k = struct[4][i];\n const v = member([struct[5][i], 0], k);\n yield (it[i] = [k, v]);\n }\n struct[anno.it] = it;\n }\n}\nfunction member(memberSchema, memberName) {\n if (memberSchema instanceof NormalizedSchema) {\n return Object.assign(memberSchema, {\n memberName,\n _isMemberSchema: true,\n });\n }\n const internalCtorAccess = NormalizedSchema;\n return new internalCtorAccess(memberSchema, memberName);\n}\nconst isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;\nexport const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;\n", "import { Schema } from \"./Schema\";\nexport class SimpleSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/sim\");\n name;\n schemaRef;\n traits;\n symbol = SimpleSchema.symbol;\n}\nexport const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\nexport const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\n", "export const SCHEMA = {\n BLOB: 0b0001_0101,\n STREAMING_BLOB: 0b0010_1010,\n BOOLEAN: 0b0000_0010,\n STRING: 0b0000_0000,\n NUMERIC: 0b0000_0001,\n BIG_INTEGER: 0b0001_0001,\n BIG_DECIMAL: 0b0001_0011,\n DOCUMENT: 0b0000_1111,\n TIMESTAMP_DEFAULT: 0b0000_0100,\n TIMESTAMP_DATE_TIME: 0b0000_0101,\n TIMESTAMP_HTTP_DATE: 0b0000_0110,\n TIMESTAMP_EPOCH_SECONDS: 0b0000_0111,\n LIST_MODIFIER: 0b0100_0000,\n MAP_MODIFIER: 0b1000_0000,\n};\n", "export class TypeRegistry {\n namespace;\n schemas;\n exceptions;\n static registries = new Map();\n constructor(namespace, schemas = new Map(), exceptions = new Map()) {\n this.namespace = namespace;\n this.schemas = schemas;\n this.exceptions = exceptions;\n }\n static for(namespace) {\n if (!TypeRegistry.registries.has(namespace)) {\n TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));\n }\n return TypeRegistry.registries.get(namespace);\n }\n copyFrom(other) {\n const { schemas, exceptions } = this;\n for (const [k, v] of other.schemas) {\n if (!schemas.has(k)) {\n schemas.set(k, v);\n }\n }\n for (const [k, v] of other.exceptions) {\n if (!exceptions.has(k)) {\n exceptions.set(k, v);\n }\n }\n }\n register(shapeId, schema) {\n const qualifiedName = this.normalizeShapeId(shapeId);\n for (const r of [this, TypeRegistry.for(qualifiedName.split(\"#\")[0])]) {\n r.schemas.set(qualifiedName, schema);\n }\n }\n getSchema(shapeId) {\n const id = this.normalizeShapeId(shapeId);\n if (!this.schemas.has(id)) {\n if (!shapeId.includes(\"#\")) {\n const suffix = \"#\" + shapeId;\n const candidates = [];\n for (const [shapeId, schema] of this.schemas.entries()) {\n if (shapeId.endsWith(suffix)) {\n candidates.push(schema);\n }\n }\n if (candidates.length === 1) {\n return candidates[0];\n }\n }\n throw new Error(`@smithy/core/schema - schema not found for ${id}`);\n }\n return this.schemas.get(id);\n }\n registerError(es, ctor) {\n const $error = es;\n const ns = $error[1];\n for (const r of [this, TypeRegistry.for(ns)]) {\n r.schemas.set(ns + \"#\" + $error[2], $error);\n r.exceptions.set($error, ctor);\n }\n }\n getErrorCtor(es) {\n const $error = es;\n if (this.exceptions.has($error)) {\n return this.exceptions.get($error);\n }\n const registry = TypeRegistry.for($error[1]);\n return registry.exceptions.get($error);\n }\n getBaseException() {\n for (const exceptionKey of this.exceptions.keys()) {\n if (Array.isArray(exceptionKey)) {\n const [, ns, name] = exceptionKey;\n const id = ns + \"#\" + name;\n if (id.startsWith(\"smithy.ts.sdk.synthetic.\") && id.endsWith(\"ServiceException\")) {\n return exceptionKey;\n }\n }\n }\n return undefined;\n }\n find(predicate) {\n for (const schema of this.schemas.values()) {\n if (predicate(schema)) {\n return schema;\n }\n }\n return undefined;\n }\n clear() {\n this.schemas.clear();\n this.exceptions.clear();\n }\n normalizeShapeId(shapeId) {\n if (shapeId.includes(\"#\")) {\n return shapeId;\n }\n return this.namespace + \"#\" + shapeId;\n }\n}\n", "export { deref } from \"./deref\";\nexport { deserializerMiddlewareOption, getSchemaSerdePlugin, serializerMiddlewareOption, } from \"./middleware/getSchemaSerdePlugin\";\nexport { ListSchema, list } from \"./schemas/ListSchema\";\nexport { MapSchema, map } from \"./schemas/MapSchema\";\nexport { OperationSchema, op } from \"./schemas/OperationSchema\";\nexport { operation } from \"./schemas/operation\";\nexport { ErrorSchema, error } from \"./schemas/ErrorSchema\";\nexport { NormalizedSchema, isStaticSchema, simpleSchemaCacheN, simpleSchemaCacheS } from \"./schemas/NormalizedSchema\";\nexport { Schema } from \"./schemas/Schema\";\nexport { SimpleSchema, sim, simAdapter } from \"./schemas/SimpleSchema\";\nexport { StructureSchema, struct } from \"./schemas/StructureSchema\";\nexport { SCHEMA } from \"./schemas/sentinels\";\nexport { traitsCache, translateTraits } from \"./schemas/translateTraits\";\nexport { TypeRegistry } from \"./TypeRegistry\";\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nconst SENSITIVE_STRING = \"***SensitiveInformation***\";\nexport function schemaLogFilter(schema, data) {\n if (data == null) {\n return data;\n }\n const ns = NormalizedSchema.of(schema);\n if (ns.getMergedTraits().sensitive) {\n return SENSITIVE_STRING;\n }\n if (ns.isListSchema()) {\n const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isMapSchema()) {\n const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isStructSchema() && typeof data === \"object\") {\n const object = data;\n const newObject = {};\n for (const [member, memberNs] of ns.structIterator()) {\n if (object[member] != null) {\n newObject[member] = schemaLogFilter(memberNs, object[member]);\n }\n }\n return newObject;\n }\n return data;\n}\n", "import { SMITHY_CONTEXT_KEY, } from \"@smithy/types\";\nimport { constructStack } from \"../middleware-stack/MiddlewareStack\";\nimport { schemaLogFilter } from \"./schemaLogFilter\";\nexport class Command {\n middlewareStack = constructStack();\n schema;\n static classBuilder() {\n return new ClassBuilder();\n }\n resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext,\n },\n ...additionalContext,\n };\n const { requestHandler } = configuration;\n let requestOptions = options ?? {};\n if (smithyContext.eventStream) {\n requestOptions = {\n isEventStream: true,\n ...requestOptions,\n };\n }\n return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext);\n }\n}\nclass ClassBuilder {\n _init = () => { };\n _ep = {};\n _middlewareFn = () => [];\n _commandName = \"\";\n _clientName = \"\";\n _additionalContext = {};\n _smithyContext = {};\n _inputFilterSensitiveLog = undefined;\n _outputFilterSensitiveLog = undefined;\n _serializer = null;\n _deserializer = null;\n _operationSchema;\n init(cb) {\n this._init = cb;\n }\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext,\n };\n return this;\n }\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n sc(operation) {\n this._operationSchema = operation;\n this._smithyContext.operationSchema = operation;\n return this;\n }\n build() {\n const closure = this;\n let CommandRef;\n return (CommandRef = class extends Command {\n input;\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n constructor(...[input]) {\n super();\n this.input = input ?? {};\n closure._init(this);\n this.schema = closure._operationSchema;\n }\n resolveMiddleware(stack, configuration, options) {\n const op = closure._operationSchema;\n const input = op?.[4] ?? op?.input;\n const output = op?.[5] ?? op?.output;\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext,\n });\n }\n serialize = closure._serializer;\n deserialize = closure._deserializer;\n });\n }\n}\n", "export const SENSITIVE_STRING = \"***SensitiveInformation***\";\n", "export const createAggregatedClient = (commands, Client, options) => {\n for (const [command, CommandCtor] of Object.entries(commands)) {\n const methodImpl = async function (args, optionsOrCb, cb) {\n const command = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n };\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client.prototype[methodName] = methodImpl;\n }\n const { paginators = {}, waiters = {} } = options ?? {};\n for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {\n if (Client.prototype[paginatorName] === void 0) {\n Client.prototype[paginatorName] = function (commandInput = {}, paginationConfiguration, ...rest) {\n return paginatorFn({\n ...paginationConfiguration,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n for (const [waiterName, waiterFn] of Object.entries(waiters)) {\n if (Client.prototype[waiterName] === void 0) {\n Client.prototype[waiterName] = async function (commandInput = {}, waiterConfiguration, ...rest) {\n let config = waiterConfiguration;\n if (typeof waiterConfiguration === \"number\") {\n config = {\n maxWaitTime: waiterConfiguration,\n };\n }\n return waiterFn({\n ...config,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n};\n", "export class ServiceException extends Error {\n $fault;\n $response;\n $retryable;\n $metadata;\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n static isInstance(value) {\n if (!value)\n return false;\n const candidate = value;\n return (ServiceException.prototype.isPrototypeOf(candidate) ||\n (Boolean(candidate.$fault) &&\n Boolean(candidate.$metadata) &&\n (candidate.$fault === \"client\" || candidate.$fault === \"server\")));\n }\n static [Symbol.hasInstance](instance) {\n if (!instance)\n return false;\n const candidate = instance;\n if (this === ServiceException) {\n return ServiceException.isInstance(instance);\n }\n if (ServiceException.isInstance(instance)) {\n if (candidate.name && this.name) {\n return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;\n }\n return this.prototype.isPrototypeOf(instance);\n }\n return false;\n }\n}\nexport const decorateServiceException = (exception, additions = {}) => {\n Object.entries(additions)\n .filter(([, v]) => v !== undefined)\n .forEach(([k, v]) => {\n if (exception[k] == undefined || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n};\n", "import { decorateServiceException } from \"./exceptions\";\nexport const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : undefined;\n const response = new exceptionCtor({\n name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata,\n });\n throw decorateServiceException(response, parsedBody);\n};\nexport const withBaseException = (ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\n", "export const loadConfigsForDefaultMode = (mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100,\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 30000,\n };\n default:\n return {};\n }\n};\n", "let warningEmitted = false;\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n }\n};\n", "import { AlgorithmId, } from \"@smithy/types\";\nexport { AlgorithmId };\nconst knownAlgorithms = Object.values(AlgorithmId);\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in AlgorithmId) {\n const algorithmId = AlgorithmId[id];\n if (runtimeConfig[algorithmId] === undefined) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId],\n });\n }\n for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {\n checksumAlgorithms.push({\n algorithmId: () => id,\n checksumConstructor: () => ChecksumCtor,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};\n const id = algo.algorithmId();\n const ctor = algo.checksumConstructor();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;\n }\n else {\n runtimeConfig.checksumAlgorithms[id] = ctor;\n }\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n const id = checksumAlgorithm.algorithmId();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig[id] = checksumAlgorithm.checksumConstructor();\n }\n });\n return runtimeConfig;\n};\n", "export const getRetryConfiguration = (runtimeConfig) => {\n return {\n setRetryStrategy(retryStrategy) {\n runtimeConfig.retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return runtimeConfig.retryStrategy;\n },\n };\n};\nexport const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n};\n", "import { getChecksumConfiguration, resolveChecksumRuntimeConfig, } from \"./checksum\";\nimport { getRetryConfiguration, resolveRetryRuntimeConfig } from \"./retry\";\nexport const getDefaultExtensionConfiguration = (runtimeConfig) => {\n return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));\n};\nexport const getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nexport const resolveDefaultRuntimeConfig = (config) => {\n return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));\n};\n", "export const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];\n", "export const getValueFromTextNode = (obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key][textNodeName] !== undefined) {\n obj[key] = obj[key][textNodeName];\n }\n else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n};\n", "export const isSerializableHeaderValue = (value) => {\n return value != null;\n};\n", "export class NoOpLogger {\n trace() { }\n debug() { }\n info() { }\n warn() { }\n error() { }\n}\n", "export function map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n }\n else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n }\n else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\nexport const convertMap = (target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n};\nexport const take = (source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n};\nconst mapWithFilter = (target, filter, instructions) => {\n return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n }\n else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n }\n else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n }, {}));\n};\nconst applyInstruction = (target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if ((typeof filter === \"function\" && filter(source[sourceKey])) || (typeof filter !== \"function\" && !!filter)) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === undefined && (_value = value()) != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(void 0)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n }\n else if (customFilterPassed) {\n target[targetKey] = value();\n }\n }\n else {\n const defaultFilterPassed = filter === undefined && value != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(value)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n};\nconst nonNullish = (_) => _ != null;\nconst pass = (_) => _;\n", "export const serializeFloat = (value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n};\nexport const serializeDateTime = (date) => date.toISOString().replace(\".000Z\", \"Z\");\n", "export const _json = (obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n};\n", "import { Command } from \"./command\";\nexport function makeBuilder(common, service, name, ep) {\n return function makeCommand(added, plugins, op, $, smithyContext = {}) {\n const epMerged = Object.assign({}, common, added);\n return Command.classBuilder()\n .ep(epMerged)\n .m(function (CommandCtor, clientStack, config, options) {\n const list = plugins.call(this, CommandCtor, clientStack, config, options);\n list.unshift(ep(config, CommandCtor.getEndpointParameterInstructions()));\n return list;\n })\n .s(service, op, smithyContext)\n .n(name, op.charAt(0).toUpperCase() + op.slice(1) + \"Command\")\n .sc($)\n .build();\n };\n}\n", "export { constructStack } from \"./middleware-stack/MiddlewareStack\";\nexport { getSmithyContext } from \"@smithy/core/transport\";\nexport { normalizeProvider } from \"@smithy/core/transport\";\nexport { invalidFunction } from \"./invalid-dependency/invalidFunction\";\nexport { invalidProvider } from \"./invalid-dependency/invalidProvider\";\nexport { createWaiter } from \"./util-waiter/createWaiter\";\nexport { waiterServiceDefaults, WaiterState, checkExceptions, } from \"./util-waiter/waiter\";\nexport { Client } from \"./smithy-client/client\";\nexport { Command } from \"./smithy-client/command\";\nexport { SENSITIVE_STRING } from \"./smithy-client/constants\";\nexport { createAggregatedClient } from \"./smithy-client/create-aggregated-client\";\nexport { throwDefaultError, withBaseException } from \"./smithy-client/default-error-handler\";\nexport { loadConfigsForDefaultMode, } from \"./smithy-client/defaults-mode\";\nexport { emitWarningIfUnsupportedVersion } from \"./smithy-client/emitWarningIfUnsupportedVersion\";\nexport { ServiceException, decorateServiceException, } from \"./smithy-client/exceptions\";\nexport { getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig, } from \"./smithy-client/extensions/defaultExtensionConfiguration\";\nexport { AlgorithmId, getChecksumConfiguration, resolveChecksumRuntimeConfig, } from \"./smithy-client/extensions/checksum\";\nexport { getRetryConfiguration, resolveRetryRuntimeConfig, } from \"./smithy-client/extensions/retry\";\nexport { getArrayIfSingleItem } from \"./smithy-client/get-array-if-single-item\";\nexport { getValueFromTextNode } from \"./smithy-client/get-value-from-text-node\";\nexport { isSerializableHeaderValue } from \"./smithy-client/is-serializable-header-value\";\nexport { NoOpLogger } from \"./smithy-client/NoOpLogger\";\nexport { map, convertMap, take, } from \"./smithy-client/object-mapping\";\nexport { schemaLogFilter } from \"./smithy-client/schemaLogFilter\";\nexport { serializeFloat, serializeDateTime } from \"./smithy-client/ser-utils\";\nexport { _json } from \"./smithy-client/serde-json\";\nexport { makeBuilder } from \"./smithy-client/client-command-builder\";\n", "export const isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n", "import { isArrayBuffer } from \"../is-array-buffer/is-array-buffer\";\nexport const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {\n if (!isArrayBuffer(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return Buffer.from(input, offset, length);\n};\nexport const fromString = (input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? Buffer.from(input, encoding) : Buffer.from(input);\n};\n", "import { fromString } from \"../util-buffer-from/buffer-from\";\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\nexport const fromBase64 = (input) => {\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = fromString(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n};\n", "import { fromString } from \"../util-buffer-from/buffer-from\";\nexport const fromUtf8 = (input) => {\n const buf = fromString(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n};\n", "import { fromArrayBuffer } from \"../util-buffer-from/buffer-from\";\nimport { fromUtf8 } from \"../util-utf8/fromUtf8\";\nexport const toBase64 = (_input) => {\n let input;\n if (typeof _input === \"string\") {\n input = fromUtf8(_input);\n }\n else {\n input = _input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n};\n", "export function bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {\n return class Uint8ArrayBlobAdapter extends Uint8Array {\n static fromString(source, encoding = \"utf-8\") {\n if (typeof source === \"string\") {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate(fromBase64(source));\n }\n return Uint8ArrayBlobAdapter.mutate(fromUtf8(source));\n }\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n static mutate(source) {\n Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n transformToString(encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return toBase64(this);\n }\n return toUtf8(this);\n }\n };\n}\n", "import { fromArrayBuffer } from \"../util-buffer-from/buffer-from\";\nexport const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n};\n", "const decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\nexport function bindV4(getRandomValues) {\n if (typeof crypto !== \"undefined\" && typeof crypto.randomUUID === \"function\") {\n return () => crypto.randomUUID();\n }\n return () => {\n const rnds = new Uint8Array(16);\n getRandomValues(rnds);\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n return (decimalToHex[rnds[0]] +\n decimalToHex[rnds[1]] +\n decimalToHex[rnds[2]] +\n decimalToHex[rnds[3]] +\n \"-\" +\n decimalToHex[rnds[4]] +\n decimalToHex[rnds[5]] +\n \"-\" +\n decimalToHex[rnds[6]] +\n decimalToHex[rnds[7]] +\n \"-\" +\n decimalToHex[rnds[8]] +\n decimalToHex[rnds[9]] +\n \"-\" +\n decimalToHex[rnds[10]] +\n decimalToHex[rnds[11]] +\n decimalToHex[rnds[12]] +\n decimalToHex[rnds[13]] +\n decimalToHex[rnds[14]] +\n decimalToHex[rnds[15]]);\n };\n}\n", "export const copyDocumentWithTransform = (source, _schemaRef, _transform = (_) => _) => source;\n", "export const parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nexport const expectBoolean = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nexport const expectNumber = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nconst MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nexport const expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nexport const expectLong = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nexport const expectInt = expectLong;\nexport const expectInt32 = (value) => expectSizedInt(value, 32);\nexport const expectShort = (value) => expectSizedInt(value, 16);\nexport const expectByte = (value) => expectSizedInt(value, 8);\nconst expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== undefined && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nconst castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nexport const expectNonNull = (value, location) => {\n if (value === null || value === undefined) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nexport const expectObject = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nexport const expectString = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nexport const expectUnion = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n const asObject = expectObject(value);\n const setKeys = [];\n for (const k in asObject) {\n if (asObject[k] != null) {\n setKeys.push(k);\n }\n }\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nexport const strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nexport const strictParseFloat = strictParseDouble;\nexport const strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nconst NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nconst parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nexport const limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nexport const handleFloat = limitedParseDouble;\nexport const limitedParseFloat = limitedParseDouble;\nexport const limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nconst parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nexport const strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nexport const strictParseInt = strictParseLong;\nexport const strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nexport const strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nexport const strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nconst stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message)\n .split(\"\\n\")\n .slice(0, 5)\n .filter((s) => !s.includes(\"stackTraceWarning\"))\n .join(\"\\n\");\n};\nexport const logger = {\n warn: console.warn,\n};\n", "import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n", "export const LazyJsonString = function LazyJsonString(val) {\n const str = Object.assign(new String(val), {\n deserializeJSON() {\n return JSON.parse(String(val));\n },\n toString() {\n return String(val);\n },\n toJSON() {\n return String(val);\n },\n });\n return str;\n};\nLazyJsonString.from = (object) => {\n if (object && typeof object === \"object\" && (object instanceof LazyJsonString || \"deserializeJSON\" in object)) {\n return object;\n }\n else if (typeof object === \"string\" || Object.getPrototypeOf(object) === String.prototype) {\n return LazyJsonString(String(object));\n }\n return LazyJsonString(JSON.stringify(object));\n};\nLazyJsonString.fromObject = LazyJsonString.from;\n", "export function quoteHeader(part) {\n if (part.includes(\",\") || part.includes('\"')) {\n part = `\"${part.replace(/\"/g, '\\\\\"')}\"`;\n }\n return part;\n}\n", "const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;\nconst mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;\nconst time = `(\\\\d?\\\\d):(\\\\d{2}):(\\\\d{2})(?:\\\\.(\\\\d+))?`;\nconst date = `(\\\\d?\\\\d)`;\nconst year = `(\\\\d{4})`;\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d\\d)-(\\d\\d)[tT](\\d\\d):(\\d\\d):(\\d\\d)(\\.(\\d+))?(([-+]\\d\\d:\\d\\d)|[zZ])$/);\nconst IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);\nconst RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\\\d\\\\d) ${time} GMT$`);\nconst ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\\\d\\\\d) ${time} ${year}$`);\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport const _parseEpochTimestamp = (value) => {\n if (value == null) {\n return void 0;\n }\n let num = NaN;\n if (typeof value === \"number\") {\n num = value;\n }\n else if (typeof value === \"string\") {\n if (!/^-?\\d*\\.?\\d+$/.test(value)) {\n throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);\n }\n num = Number.parseFloat(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n num = value.value;\n }\n if (isNaN(num) || Math.abs(num) === Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid finite numbers.\");\n }\n return new Date(Math.round(num * 1000));\n};\nexport const _parseRfc3339DateTimeWithOffset = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC3339 timestamps must be strings\");\n }\n const matches = RFC3339_WITH_OFFSET.exec(value);\n if (!matches) {\n throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);\n }\n const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;\n range(monthStr, 1, 12);\n range(dayStr, 1, 31);\n range(hours, 0, 23);\n range(minutes, 0, 59);\n range(seconds, 0, 60);\n const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));\n date.setUTCFullYear(Number(yearStr));\n if (offsetStr.toUpperCase() != \"Z\") {\n const [, sign, offsetH, offsetM] = /([+-])(\\d\\d):(\\d\\d)/.exec(offsetStr) || [void 0, \"+\", 0, 0];\n const scalar = sign === \"-\" ? 1 : -1;\n date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));\n }\n return date;\n};\nexport const _parseRfc7231DateTime = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC7231 timestamps must be strings.\");\n }\n let day;\n let month;\n let year;\n let hour;\n let minute;\n let second;\n let fraction;\n let matches;\n if ((matches = IMF_FIXDATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n }\n else if ((matches = RFC_850_DATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n year = (Number(year) + 1900).toString();\n }\n else if ((matches = ASC_TIME.exec(value))) {\n [, month, day, hour, minute, second, fraction, year] = matches;\n }\n if (year && second) {\n const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);\n range(day, 1, 31);\n range(hour, 0, 23);\n range(minute, 0, 59);\n range(second, 0, 60);\n const date = new Date(timestamp);\n date.setUTCFullYear(Number(year));\n return date;\n }\n throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);\n};\nfunction range(v, min, max) {\n const _v = Number(v);\n if (_v < min || _v > max) {\n throw new Error(`Value ${_v} out of range [${min}, ${max}]`);\n }\n}\n", "export function splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n }\n else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n", "export const splitHeader = (value) => {\n const z = value.length;\n const values = [];\n let withinQuotes = false;\n let prevChar = undefined;\n let anchor = 0;\n for (let i = 0; i < z; ++i) {\n const char = value[i];\n switch (char) {\n case `\"`:\n if (prevChar !== \"\\\\\") {\n withinQuotes = !withinQuotes;\n }\n break;\n case \",\":\n if (!withinQuotes) {\n values.push(value.slice(anchor, i));\n anchor = i + 1;\n }\n break;\n default:\n }\n prevChar = char;\n }\n values.push(value.slice(anchor));\n return values.map((v) => {\n v = v.trim();\n const z = v.length;\n if (z < 2) {\n return v;\n }\n if (v[0] === `\"` && v[z - 1] === `\"`) {\n v = v.slice(1, z - 1);\n }\n return v.replace(/\\\\\"/g, '\"');\n });\n};\n", "const format = /^-?\\d*(\\.\\d+)?$/;\nexport class NumericValue {\n string;\n type;\n constructor(string, type) {\n this.string = string;\n this.type = type;\n if (!format.test(string)) {\n throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point \".\", and an optional negation prefix \"-\".`);\n }\n }\n toString() {\n return this.string;\n }\n static [Symbol.hasInstance](object) {\n if (!object || typeof object !== \"object\") {\n return false;\n }\n const _nv = object;\n return NumericValue.prototype.isPrototypeOf(object) || (_nv.type === \"bigDecimal\" && format.test(_nv.string));\n }\n}\nexport function nv(input) {\n return new NumericValue(String(input), \"bigDecimal\");\n}\n", "const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n", "import { ReadStream, fstatSync, lstatSync } from \"node:fs\";\nexport const calculateBodyLength = (body) => {\n if (!body) {\n return 0;\n }\n if (typeof body === \"string\") {\n return Buffer.byteLength(body);\n }\n else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n }\n else if (typeof body.size === \"number\") {\n return body.size;\n }\n else if (typeof body.start === \"number\" && typeof body.end === \"number\") {\n return body.end + 1 - body.start;\n }\n else if (body instanceof ReadStream) {\n if (body.path != null) {\n return lstatSync(body.path).size;\n }\n else if (typeof body.fd === \"number\") {\n return fstatSync(body.fd).size;\n }\n }\n throw new Error(`Body Length computation failed for ${body}`);\n};\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (data instanceof Uint8Array) {\n return data;\n }\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export function concatBytes(arrays, length) {\n if (length === undefined) {\n length = 0;\n for (const bytes of arrays) {\n length += bytes.byteLength;\n }\n }\n const result = new Uint8Array(length);\n let offset = 0;\n for (const buf of arrays) {\n result.set(buf, offset);\n offset += buf.byteLength;\n }\n return result;\n}\n", "import { HttpResponse } from \"@smithy/core/transport\";\nexport const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (ignored) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (ignored) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "export class ProviderError extends Error {\n name = \"ProviderError\";\n tryNextLink;\n constructor(message, options = true) {\n let logger;\n let tryNextLink = true;\n if (typeof options === \"boolean\") {\n logger = undefined;\n tryNextLink = options;\n }\n else if (options != null && typeof options === \"object\") {\n logger = options.logger;\n tryNextLink = options.tryNextLink ?? true;\n }\n super(message);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, ProviderError.prototype);\n logger?.debug?.(`@smithy/property-provider ${tryNextLink ? \"->\" : \"(!)\"} ${message}`);\n }\n static from(error, options = true) {\n return Object.assign(new this(error.message, options), error);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class CredentialsProviderError extends ProviderError {\n name = \"CredentialsProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, CredentialsProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class TokenProviderError extends ProviderError {\n name = \"TokenProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, TokenProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport const chain = (...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n", "export const fromValue = (staticValue) => () => Promise.resolve(staticValue);\n", "export const memoize = (provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n};\n", "export const booleanSelector = (obj, key, type) => {\n if (!(key in obj))\n return undefined;\n if (obj[key] === \"true\")\n return true;\n if (obj[key] === \"false\")\n return false;\n throw new Error(`Cannot load ${type} \"${key}\". Expected \"true\" or \"false\", got ${obj[key]}.`);\n};\n", "export const numberSelector = (obj, key, type) => {\n if (!(key in obj))\n return undefined;\n const numberValue = parseInt(obj[key], 10);\n if (Number.isNaN(numberValue)) {\n throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);\n }\n return numberValue;\n};\n", "export var SelectorType;\n(function (SelectorType) {\n SelectorType[\"ENV\"] = \"env\";\n SelectorType[\"CONFIG\"] = \"shared config entry\";\n})(SelectorType || (SelectorType = {}));\n", "import { homedir } from \"node:os\";\nimport { sep } from \"node:path\";\nconst homeDirCache = {};\nconst getHomeDirCacheKey = () => {\n if (process && process.geteuid) {\n return `${process.geteuid()}`;\n }\n return \"DEFAULT\";\n};\nexport const getHomeDir = () => {\n const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep}` } = process.env;\n if (HOME)\n return HOME;\n if (USERPROFILE)\n return USERPROFILE;\n if (HOMEPATH)\n return `${HOMEDRIVE}${HOMEPATH}`;\n const homeDirCacheKey = getHomeDirCacheKey();\n if (!homeDirCache[homeDirCacheKey])\n homeDirCache[homeDirCacheKey] = homedir();\n return homeDirCache[homeDirCacheKey];\n};\n", "export const ENV_PROFILE = \"AWS_PROFILE\";\nexport const DEFAULT_PROFILE = \"default\";\nexport const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;\n", "import { createHash } from \"node:crypto\";\nimport { join } from \"node:path\";\nimport { getHomeDir } from \"./getHomeDir\";\nexport const getSSOTokenFilepath = (id) => {\n const hasher = createHash(\"sha1\");\n const cacheName = hasher.update(id).digest(\"hex\");\n return join(getHomeDir(), \".aws\", \"sso\", \"cache\", `${cacheName}.json`);\n};\n", "import { readFile } from \"node:fs/promises\";\nimport { getSSOTokenFilepath } from \"./getSSOTokenFilepath\";\nexport const tokenIntercept = {};\nexport const getSSOTokenFromFile = async (id) => {\n if (tokenIntercept[id]) {\n return tokenIntercept[id];\n }\n const ssoTokenFilepath = getSSOTokenFilepath(id);\n const ssoTokenText = await readFile(ssoTokenFilepath, \"utf8\");\n return JSON.parse(ssoTokenText);\n};\n", "export const CONFIG_PREFIX_SEPARATOR = \".\";\n", "import { IniSectionType } from \"@smithy/types\";\nimport { CONFIG_PREFIX_SEPARATOR } from \"./constants\";\nexport const getConfigData = (data) => Object.entries(data)\n .filter(([key]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n if (indexOfSeparator === -1) {\n return false;\n }\n return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator));\n})\n .reduce((acc, [key, value]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;\n acc[updatedKey] = value;\n return acc;\n}, {\n ...(data.default && { default: data.default }),\n});\n", "import { join } from \"node:path\";\nimport { getHomeDir } from \"./getHomeDir\";\nexport const ENV_CONFIG_PATH = \"AWS_CONFIG_FILE\";\nexport const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join(getHomeDir(), \".aws\", \"config\");\n", "import { join } from \"node:path\";\nimport { getHomeDir } from \"./getHomeDir\";\nexport const ENV_CREDENTIALS_PATH = \"AWS_SHARED_CREDENTIALS_FILE\";\nexport const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join(getHomeDir(), \".aws\", \"credentials\");\n", "import { IniSectionType } from \"@smithy/types\";\nimport { CONFIG_PREFIX_SEPARATOR } from \"./constants\";\nconst prefixKeyRegex = /^([\\w-]+)\\s([\"'])?([\\w-@+.%:/]+)\\2$/;\nconst profileNameBlockList = [\"__proto__\", \"profile __proto__\"];\nexport const parseIni = (iniData) => {\n const map = {};\n let currentSection;\n let currentSubSection;\n for (const iniLine of iniData.split(/\\r?\\n/)) {\n const trimmedLine = iniLine.split(/(^|\\s)[;#]/)[0].trim();\n const isSection = trimmedLine[0] === \"[\" && trimmedLine[trimmedLine.length - 1] === \"]\";\n if (isSection) {\n currentSection = undefined;\n currentSubSection = undefined;\n const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);\n const matches = prefixKeyRegex.exec(sectionName);\n if (matches) {\n const [, prefix, , name] = matches;\n if (Object.values(IniSectionType).includes(prefix)) {\n currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);\n }\n }\n else {\n currentSection = sectionName;\n }\n if (profileNameBlockList.includes(sectionName)) {\n throw new Error(`Found invalid profile name \"${sectionName}\"`);\n }\n }\n else if (currentSection) {\n const indexOfEqualsSign = trimmedLine.indexOf(\"=\");\n if (![0, -1].includes(indexOfEqualsSign)) {\n const [name, value] = [\n trimmedLine.substring(0, indexOfEqualsSign).trim(),\n trimmedLine.substring(indexOfEqualsSign + 1).trim(),\n ];\n if (value === \"\") {\n currentSubSection = name;\n }\n else {\n if (currentSubSection && iniLine.trimStart() === iniLine) {\n currentSubSection = undefined;\n }\n map[currentSection] = map[currentSection] || {};\n const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;\n map[currentSection][key] = value;\n }\n }\n }\n }\n return map;\n};\n", "import { readFile as fsReadFile } from \"node:fs/promises\";\nexport const filePromises = {};\nexport const fileIntercept = {};\nexport const readFile = (path, options) => {\n if (fileIntercept[path] !== undefined) {\n return fileIntercept[path];\n }\n if (!filePromises[path] || options?.ignoreCache) {\n filePromises[path] = fsReadFile(path, \"utf8\");\n }\n return filePromises[path];\n};\n", "import { join } from \"node:path\";\nimport { getConfigData } from \"./getConfigData\";\nimport { getConfigFilepath } from \"./getConfigFilepath\";\nimport { getCredentialsFilepath } from \"./getCredentialsFilepath\";\nimport { getHomeDir } from \"./getHomeDir\";\nimport { parseIni } from \"./parseIni\";\nimport { readFile } from \"./readFile\";\nconst swallowError = () => ({});\nexport { CONFIG_PREFIX_SEPARATOR } from \"./constants\";\nexport const loadSharedConfigFiles = async (init = {}) => {\n const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;\n const homeDir = getHomeDir();\n const relativeHomeDirPrefix = \"~/\";\n let resolvedFilepath = filepath;\n if (filepath.startsWith(relativeHomeDirPrefix)) {\n resolvedFilepath = join(homeDir, filepath.slice(2));\n }\n let resolvedConfigFilepath = configFilepath;\n if (configFilepath.startsWith(relativeHomeDirPrefix)) {\n resolvedConfigFilepath = join(homeDir, configFilepath.slice(2));\n }\n const parsedFiles = await Promise.all([\n readFile(resolvedConfigFilepath, {\n ignoreCache: init.ignoreCache,\n })\n .then(parseIni)\n .then(getConfigData)\n .catch(swallowError),\n readFile(resolvedFilepath, {\n ignoreCache: init.ignoreCache,\n })\n .then(parseIni)\n .catch(swallowError),\n ]);\n return {\n configFile: parsedFiles[0],\n credentialsFile: parsedFiles[1],\n };\n};\n", "import { IniSectionType } from \"@smithy/types\";\nimport { CONFIG_PREFIX_SEPARATOR } from \"./loadSharedConfigFiles\";\nexport const getSsoSessionData = (data) => Object.entries(data)\n .filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR))\n .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});\n", "import { getConfigFilepath } from \"./getConfigFilepath\";\nimport { getSsoSessionData } from \"./getSsoSessionData\";\nimport { parseIni } from \"./parseIni\";\nimport { readFile } from \"./readFile\";\nconst swallowError = () => ({});\nexport const loadSsoSessionData = async (init = {}) => readFile(init.configFilepath ?? getConfigFilepath())\n .then(parseIni)\n .then(getSsoSessionData)\n .catch(swallowError);\n", "export const mergeConfigFiles = (...files) => {\n const merged = {};\n for (const file of files) {\n for (const [key, values] of Object.entries(file)) {\n if (merged[key] !== undefined) {\n Object.assign(merged[key], values);\n }\n else {\n merged[key] = values;\n }\n }\n }\n return merged;\n};\n", "import { loadSharedConfigFiles } from \"./loadSharedConfigFiles\";\nimport { mergeConfigFiles } from \"./mergeConfigFiles\";\nexport const parseKnownFiles = async (init) => {\n const parsedFiles = await loadSharedConfigFiles(init);\n return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);\n};\n", "import { tokenIntercept } from \"./getSSOTokenFromFile\";\nimport { fileIntercept } from \"./readFile\";\nexport const externalDataInterceptor = {\n getFileRecord() {\n return fileIntercept;\n },\n interceptFile(path, contents) {\n fileIntercept[path] = Promise.resolve(contents);\n },\n getTokenRecord() {\n return tokenIntercept;\n },\n interceptToken(id, contents) {\n tokenIntercept[id] = contents;\n },\n};\n", "export function getSelectorName(functionString) {\n try {\n const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));\n constants.delete(\"CONFIG\");\n constants.delete(\"CONFIG_PREFIX_SEPARATOR\");\n constants.delete(\"ENV\");\n return [...constants].join(\", \");\n }\n catch (ignored) {\n return functionString;\n }\n}\n", "import { CredentialsProviderError } from \"../property-provider/CredentialsProviderError\";\nimport { getSelectorName } from \"./getSelectorName\";\nexport const fromEnv = (envVarSelector, options) => async () => {\n try {\n const config = envVarSelector(process.env, options);\n if (config === undefined) {\n throw new Error();\n }\n return config;\n }\n catch (e) {\n throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });\n }\n};\n", "import { CredentialsProviderError } from \"../property-provider/CredentialsProviderError\";\nimport { getProfileName } from \"../shared-ini-file-loader/getProfileName\";\nimport { loadSharedConfigFiles } from \"../shared-ini-file-loader/loadSharedConfigFiles\";\nimport { getSelectorName } from \"./getSelectorName\";\nexport const fromSharedConfigFiles = (configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const profile = getProfileName(init);\n const { configFile, credentialsFile } = await loadSharedConfigFiles(init);\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\"\n ? { ...profileFromCredentials, ...profileFromConfig }\n : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const cfgFile = preferredFile === \"config\" ? configFile : credentialsFile;\n const configValue = configSelector(mergedProfile, cfgFile);\n if (configValue === undefined) {\n throw new Error();\n }\n return configValue;\n }\n catch (e) {\n throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });\n }\n};\n", "import { fromValue } from \"../property-provider/fromValue\";\nconst isFunction = (func) => typeof func === \"function\";\nexport const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue);\n", "import { chain } from \"../property-provider/chain\";\nimport { memoize } from \"../property-provider/memoize\";\nimport { fromEnv } from \"./fromEnv\";\nimport { fromSharedConfigFiles } from \"./fromSharedConfigFiles\";\nimport { fromStatic } from \"./fromStatic\";\nexport const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {\n const { signingName, logger } = configuration;\n const envOptions = { signingName, logger };\n return memoize(chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));\n};\n", "import { booleanSelector } from \"../../util-config-provider/booleanSelector\";\nimport { SelectorType } from \"../../util-config-provider/types\";\nexport const ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nexport const CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nexport const DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nexport const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\nexport const nodeDualstackConfigSelectors = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),\n default: undefined,\n};\n", "import { booleanSelector } from \"../../util-config-provider/booleanSelector\";\nimport { SelectorType } from \"../../util-config-provider/types\";\nexport const ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nexport const CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nexport const DEFAULT_USE_FIPS_ENDPOINT = false;\nexport const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\nexport const nodeFipsConfigSelectors = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),\n default: undefined,\n};\n", "import { normalizeProvider } from \"@smithy/core/client\";\nexport const resolveCustomEndpointsConfig = (input) => {\n const { tls, endpoint, urlParser, useDualstackEndpoint } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n });\n};\n", "export const getEndpointFromRegion = async (input) => {\n const { tls = true } = input;\n const region = await input.region();\n const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n const useDualstackEndpoint = await input.useDualstackEndpoint();\n const useFipsEndpoint = await input.useFipsEndpoint();\n const { hostname } = (await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint })) ?? {};\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return input.urlParser(`${tls ? \"https:\" : \"http:\"}//${hostname}`);\n};\n", "import { normalizeProvider } from \"@smithy/core/client\";\nimport { getEndpointFromRegion } from \"./utils/getEndpointFromRegion\";\nexport const resolveEndpointsConfig = (input) => {\n const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser, tls } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: endpoint\n ? normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint)\n : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint,\n });\n};\n", "export const AWS_EXECUTION_ENV = \"AWS_EXECUTION_ENV\";\nexport const AWS_REGION_ENV = \"AWS_REGION\";\nexport const AWS_DEFAULT_REGION_ENV = \"AWS_DEFAULT_REGION\";\nexport const ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nexport const DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\nexport const IMDS_REGION_PATH = \"/latest/meta-data/placement/region\";\nexport const IMDS_TOKEN_PATH = \"/latest/api/token\";\nexport const X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const X_AWS_EC2_METADATA_TOKEN_TTL = \"x-aws-ec2-metadata-token-ttl-seconds\";\n", "import { ENV_IMDS_DISABLED, IMDS_REGION_PATH, IMDS_TOKEN_PATH, X_AWS_EC2_METADATA_TOKEN, X_AWS_EC2_METADATA_TOKEN_TTL, } from \"../../defaults-mode/constants\";\nconst TIMEOUT_MS = 1000;\nconst NEG_CACHE_TTL_MS = 60_000;\nlet negativeCacheUntil = 0;\nexport const getInstanceMetadataRegion = async () => {\n if (process.env[ENV_IMDS_DISABLED]) {\n return undefined;\n }\n if (Date.now() < negativeCacheUntil) {\n return undefined;\n }\n try {\n const endpoint = resolveImdsEndpoint();\n const token = (await imdsRequest({\n ...endpoint,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n [X_AWS_EC2_METADATA_TOKEN_TTL]: \"21600\",\n },\n })).toString();\n const region = (await imdsRequest({\n ...endpoint,\n path: IMDS_REGION_PATH,\n method: \"GET\",\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n }))\n .toString()\n .trim();\n return region || cacheNegativeAndReturnUndefined();\n }\n catch {\n return cacheNegativeAndReturnUndefined();\n }\n};\nconst cacheNegativeAndReturnUndefined = () => {\n negativeCacheUntil = Date.now() + NEG_CACHE_TTL_MS;\n return undefined;\n};\nconst resolveImdsEndpoint = () => {\n const envEndpoint = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;\n if (envEndpoint) {\n const url = new URL(envEndpoint);\n return {\n hostname: url.hostname.replace(/^\\[(.+)]$/, \"$1\"),\n port: url.port ? Number(url.port) : undefined,\n };\n }\n if (process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE === \"IPv6\") {\n return { hostname: \"fd00:ec2::254\" };\n }\n return { hostname: \"169.254.169.254\" };\n};\nconst imdsRequest = async (options) => {\n const { request } = await import(\"node:http\");\n return new Promise((resolve, reject) => {\n const req = request({\n hostname: options.hostname,\n port: options.port,\n path: options.path,\n method: options.method,\n headers: options.headers,\n timeout: TIMEOUT_MS,\n signal: AbortSignal.timeout(TIMEOUT_MS),\n });\n req.on(\"error\", (err) => {\n reject(err);\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new Error(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || statusCode >= 300) {\n reject(Object.assign(new Error(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n return;\n }\n const chunks = [];\n res.on(\"data\", (chunk) => chunks.push(chunk));\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n};\n", "import { getInstanceMetadataRegion } from \"./getInstanceMetadataRegion\";\nexport const REGION_ENV_NAME = \"AWS_REGION\";\nexport const REGION_INI_NAME = \"region\";\nexport const NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: async () => {\n const region = await getInstanceMetadataRegion();\n if (region) {\n return region;\n }\n throw new Error(\"Region is missing\");\n },\n};\nexport const NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\",\n};\n", "import { isValidHostLabel } from \"@smithy/core/transport\";\nconst validRegions = new Set();\nexport const checkRegion = (region, check = isValidHostLabel) => {\n if (!validRegions.has(region) && !check(region)) {\n if (region === \"*\") {\n console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of \"*\". See \"sigv4a\" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);\n }\n else {\n throw new Error(`Region not accepted: region=\"${region}\" is not a valid hostname component.`);\n }\n }\n else {\n validRegions.add(region);\n }\n};\n", "export const isFipsRegion = (region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\"));\n", "import { isFipsRegion } from \"./isFipsRegion\";\nexport const getRealRegion = (region) => isFipsRegion(region)\n ? [\"fips-aws-global\", \"aws-fips\"].includes(region)\n ? \"us-east-1\"\n : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\")\n : region;\n", "import { checkRegion } from \"./checkRegion\";\nimport { getRealRegion } from \"./getRealRegion\";\nimport { isFipsRegion } from \"./isFipsRegion\";\nexport const resolveRegionConfig = (input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: async () => {\n const providedRegion = typeof region === \"function\" ? await region() : region;\n const realRegion = getRealRegion(providedRegion);\n checkRegion(realRegion);\n return realRegion;\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n },\n });\n};\n", "export const getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes(\"fips\") && useDualstackEndpoint === tags.includes(\"dualstack\"))?.hostname;\n", "export const getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname\n ? regionHostname\n : partitionHostname\n ? partitionHostname.replace(\"{region}\", resolvedRegion)\n : undefined;\n", "export const getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? \"aws\";\n", "export const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {\n if (signingRegion) {\n return signingRegion;\n }\n else if (useFipsEndpoint) {\n const regionRegexJs = regionRegex.replace(\"\\\\\\\\\", \"\\\\\").replace(/^\\^/g, \"\\\\.\").replace(/\\$$/g, \"\\\\.\");\n const regionRegexmatchArray = hostname.match(regionRegexJs);\n if (regionRegexmatchArray) {\n return regionRegexmatchArray[0].slice(1, -1);\n }\n }\n};\n", "import { getHostnameFromVariants } from \"./getHostnameFromVariants\";\nimport { getResolvedHostname } from \"./getResolvedHostname\";\nimport { getResolvedPartition } from \"./getResolvedPartition\";\nimport { getResolvedSigningRegion } from \"./getResolvedSigningRegion\";\nexport const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => {\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : (partitionHash[partition]?.endpoint ?? region);\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === undefined) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: regionHash[resolvedRegion]?.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint,\n });\n return {\n partition,\n signingService,\n hostname,\n ...(signingRegion && { signingRegion }),\n ...(regionHash[resolvedRegion]?.signingService && {\n signingService: regionHash[resolvedRegion].signingService,\n }),\n };\n};\n", "const AWS_DEFAULTS_MODE_ENV = \"AWS_DEFAULTS_MODE\";\nconst AWS_DEFAULTS_MODE_CONFIG = \"defaults_mode\";\nexport const NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n return env[AWS_DEFAULTS_MODE_ENV];\n },\n configFileSelector: (profile) => {\n return profile[AWS_DEFAULTS_MODE_CONFIG];\n },\n default: \"legacy\",\n};\n", "import { NODE_REGION_CONFIG_OPTIONS } from \"../config-resolver/regionConfig/config\";\nimport { getInstanceMetadataRegion } from \"../config-resolver/regionConfig/getInstanceMetadataRegion\";\nimport { loadConfig } from \"../node-config-provider/configLoader\";\nimport { memoize } from \"../property-provider/memoize\";\nimport { AWS_DEFAULT_REGION_ENV, AWS_EXECUTION_ENV, AWS_REGION_ENV, DEFAULTS_MODE_OPTIONS } from \"./constants\";\nimport { NODE_DEFAULTS_MODE_CONFIG_OPTIONS } from \"./defaultsModeConfig\";\nexport const resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS), } = {}) => memoize(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode?.toLowerCase()) {\n case \"auto\":\n return resolveNodeDefaultsModeAuto(region);\n case \"in-region\":\n case \"cross-region\":\n case \"mobile\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode?.toLocaleLowerCase());\n case undefined:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(`Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`);\n }\n});\nconst resolveNodeDefaultsModeAuto = async (clientRegion) => {\n if (clientRegion) {\n const resolvedRegion = typeof clientRegion === \"function\" ? await clientRegion() : clientRegion;\n const inferredRegion = await inferPhysicalRegion();\n if (!inferredRegion) {\n return \"standard\";\n }\n if (resolvedRegion === inferredRegion) {\n return \"in-region\";\n }\n else {\n return \"cross-region\";\n }\n }\n return \"standard\";\n};\nconst inferPhysicalRegion = async () => {\n if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {\n return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];\n }\n return getInstanceMetadataRegion();\n};\n", "export { ProviderError } from \"./property-provider/ProviderError\";\nexport { CredentialsProviderError } from \"./property-provider/CredentialsProviderError\";\nexport { TokenProviderError } from \"./property-provider/TokenProviderError\";\nexport { chain } from \"./property-provider/chain\";\nexport { fromValue } from \"./property-provider/fromValue\";\nexport { memoize } from \"./property-provider/memoize\";\nexport { booleanSelector } from \"./util-config-provider/booleanSelector\";\nexport { numberSelector } from \"./util-config-provider/numberSelector\";\nexport { SelectorType } from \"./util-config-provider/types\";\nexport { getHomeDir } from \"./shared-ini-file-loader/getHomeDir\";\nexport { ENV_PROFILE, DEFAULT_PROFILE, getProfileName } from \"./shared-ini-file-loader/getProfileName\";\nexport { getSSOTokenFilepath } from \"./shared-ini-file-loader/getSSOTokenFilepath\";\nexport { getSSOTokenFromFile } from \"./shared-ini-file-loader/getSSOTokenFromFile\";\nexport { CONFIG_PREFIX_SEPARATOR } from \"./shared-ini-file-loader/constants\";\nexport { loadSharedConfigFiles } from \"./shared-ini-file-loader/loadSharedConfigFiles\";\nexport { loadSsoSessionData } from \"./shared-ini-file-loader/loadSsoSessionData\";\nexport { parseKnownFiles } from \"./shared-ini-file-loader/parseKnownFiles\";\nexport { externalDataInterceptor } from \"./shared-ini-file-loader/externalDataInterceptor\";\nexport { readFile } from \"./shared-ini-file-loader/readFile\";\nexport { loadConfig } from \"./node-config-provider/configLoader\";\nexport { fromStatic } from \"./node-config-provider/fromStatic\";\nexport { ENV_USE_DUALSTACK_ENDPOINT, CONFIG_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_DUALSTACK_ENDPOINT, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, nodeDualstackConfigSelectors, } from \"./config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions\";\nexport { ENV_USE_FIPS_ENDPOINT, CONFIG_USE_FIPS_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, nodeFipsConfigSelectors, } from \"./config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions\";\nexport { resolveCustomEndpointsConfig, } from \"./config-resolver/endpointsConfig/resolveCustomEndpointsConfig\";\nexport { resolveEndpointsConfig, } from \"./config-resolver/endpointsConfig/resolveEndpointsConfig\";\nexport { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from \"./config-resolver/regionConfig/config\";\nexport { resolveRegionConfig, } from \"./config-resolver/regionConfig/resolveRegionConfig\";\nexport { getRegionInfo } from \"./config-resolver/regionInfo/getRegionInfo\";\nexport { resolveDefaultsModeConfig, } from \"./defaults-mode/resolveDefaultsModeConfig\";\n", "import { CONFIG_PREFIX_SEPARATOR } from \"@smithy/core/config\";\nexport const ENV_ENDPOINT_URL = \"AWS_ENDPOINT_URL\";\nexport const CONFIG_ENDPOINT_URL = \"endpoint_url\";\nexport const getEndpointUrlConfig = (serviceId) => ({\n environmentVariableSelector: (env) => {\n const serviceSuffixParts = serviceId.split(\" \").map((w) => w.toUpperCase());\n const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join(\"_\")];\n if (serviceEndpointUrl)\n return serviceEndpointUrl;\n const endpointUrl = env[ENV_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n configFileSelector: (profile, config) => {\n if (profile.services) {\n const servicesSectionKey = [\"services\", profile.services].join(CONFIG_PREFIX_SEPARATOR);\n if (!config || !config[servicesSectionKey]) {\n throw new Error(`The services section \"${profile.services}\" specified in the profile is not present in the shared configuration file.`);\n }\n const servicesSection = config[servicesSectionKey];\n const servicePrefixParts = serviceId.split(\" \").map((w) => w.toLowerCase());\n const endpointUrl = servicesSection[[servicePrefixParts.join(\"_\"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)];\n if (endpointUrl)\n return endpointUrl;\n }\n const endpointUrl = profile[CONFIG_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n default: undefined,\n});\n", "import { booleanSelector, SelectorType } from \"@smithy/core/config\";\nexport const ENV_IGNORE_CONFIGURED_ENDPOINT_URLS = \"AWS_IGNORE_CONFIGURED_ENDPOINT_URLS\";\nexport const CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS = \"ignore_configured_endpoint_urls\";\nexport const ignoreConfiguredEndpointUrlsConfigSelectors = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.CONFIG),\n default: false,\n};\n", "import { loadConfig } from \"@smithy/core/config\";\nimport { getEndpointUrlConfig } from \"./getEndpointUrlConfig\";\nimport { ignoreConfiguredEndpointUrlsConfigSelectors } from \"./getIgnoreConfiguredEndpointUrls\";\nexport const getEndpointFromConfig = async (serviceId) => {\n const ignore = await loadConfig(ignoreConfiguredEndpointUrlsConfigSelectors)();\n if (ignore) {\n return undefined;\n }\n return loadConfig(getEndpointUrlConfig(serviceId ?? \"\"))();\n};\n", "export const resolveParamsForS3 = async (endpointParams) => {\n const bucket = endpointParams?.Bucket || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n }\n else if (!isDnsCompatibleBucketName(bucket) ||\n (bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\")) ||\n bucket.toLowerCase() !== bucket ||\n bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n};\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\nexport const DOT_PATTERN = /\\./;\nexport const S3_HOSTNAME_PATTERN = /^(.+\\.)?s3(-fips)?(\\.dualstack)?[.-]([a-z0-9-]+)\\./;\nexport const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);\nexport const isArnBucketName = (bucketName) => {\n const [arn, partition, service, , , bucket] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = Boolean(isArn && partition && service && bucket);\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return isValidArn;\n};\n", "export { DOT_PATTERN, S3_HOSTNAME_PATTERN, isArnBucketName, isDnsCompatibleBucketName, resolveParamsForS3 } from \"./s3\";\n", "export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {\n const configProvider = async () => {\n let configValue;\n if (isClientContextParam) {\n const clientContextParams = config.clientContextParams;\n const nestedValue = clientContextParams?.[configKey];\n configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];\n }\n else {\n configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n }\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n };\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;\n return configValue;\n };\n }\n if (configKey === \"accountId\" || canonicalEndpointParamKey === \"AccountId\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.accountId ?? credentials?.AccountId;\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n if (config.isCustomEndpoint === false) {\n return undefined;\n }\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n};\n", "export { toEndpointV1 } from \"@smithy/core/transport\";\n", "import { resolveParamsForS3 } from \"../service-customizations\";\nimport { createConfigValueProvider } from \"./createConfigValueProvider\";\nimport { toEndpointV1 } from \"./toEndpointV1\";\nexport function bindGetEndpointFromInstructions(getEndpointFromConfig) {\n return async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.isCustomEndpoint && !clientConfig.ignoreConfiguredEndpointUrls) {\n let endpointFromConfig;\n if (clientConfig.serviceConfiguredEndpoint) {\n endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();\n }\n else {\n endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);\n }\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n clientConfig.isCustomEndpoint = true;\n context?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${endpointFromConfig}`);\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {\n const customEndpoint = await clientConfig.endpoint();\n if (customEndpoint?.headers) {\n endpoint.headers ??= {};\n for (const [name, value] of Object.entries(customEndpoint.headers)) {\n endpoint.headers[name] = Array.isArray(value) ? value : [value];\n }\n }\n }\n return endpoint;\n };\n}\nexport const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {\n const endpointParams = {};\n const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== \"builtInParams\")();\n break;\n case \"operationContextParams\":\n endpointParams[name] = instruction.get(commandInput);\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n};\n", "import { getSmithyContext } from \"@smithy/core/transport\";\nimport { bindGetEndpointFromInstructions } from \"./adaptors/getEndpointFromInstructions\";\nfunction setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = { features: {} };\n }\n else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\nexport function bindEndpointMiddleware(getEndpointFromConfig) {\n const getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig);\n return ({ config, instructions, }) => {\n return (next, context) => async (args) => {\n if (config.isCustomEndpoint) {\n setFeature(context, \"ENDPOINT_OVERRIDE\", \"N\");\n }\n const endpoint = await getEndpointFromInstructions(args.input, {\n getEndpointParameterInstructions() {\n return instructions;\n },\n }, { ...config }, context);\n context.endpointV2 = endpoint;\n context.authSchemes = endpoint.properties?.authSchemes;\n const authScheme = context.authSchemes?.[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = getSmithyContext(context);\n const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet,\n }, authScheme.properties);\n }\n }\n return next({\n ...args,\n });\n };\n };\n}\n", "import { bindEndpointMiddleware } from \"./endpointMiddleware\";\nconst serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport const endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: serializerMiddlewareOption.name,\n};\nexport function bindGetEndpointPlugin(getEndpointFromConfig) {\n const endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);\n return (config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(endpointMiddleware({\n config,\n instructions,\n }), endpointMiddlewareOptions);\n },\n });\n}\n", "import { normalizeProvider } from \"@smithy/core/transport\";\nimport { toEndpointV1 } from \"./adaptors/toEndpointV1\";\nexport function bindResolveEndpointConfig(getEndpointFromConfig) {\n return (input) => {\n const tls = input.tls ?? true;\n const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined;\n const isCustomEndpoint = !!endpoint;\n const resolvedConfig = Object.assign(input, {\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false),\n ignoreConfiguredEndpointUrls: !!input.ignoreConfiguredEndpointUrls,\n });\n let configuredEndpointPromise = undefined;\n resolvedConfig.serviceConfiguredEndpoint = async () => {\n if (input.serviceId && !configuredEndpointPromise) {\n configuredEndpointPromise = getEndpointFromConfig(input.serviceId);\n }\n return configuredEndpointPromise;\n };\n return resolvedConfig;\n };\n}\n", "export class BinaryDecisionDiagram {\n nodes;\n root;\n conditions;\n results;\n constructor(bdd, root, conditions, results) {\n this.nodes = bdd;\n this.root = root;\n this.conditions = conditions;\n this.results = results;\n }\n static from(bdd, root, conditions, results) {\n return new BinaryDecisionDiagram(bdd, root, conditions, results);\n }\n}\n", "export class EndpointCache {\n capacity;\n data = new Map();\n parameters = [];\n constructor({ size, params }) {\n this.capacity = size ?? 50;\n if (params) {\n this.parameters = params;\n }\n }\n get(endpointParams, resolver) {\n const key = this.hash(endpointParams);\n if (key === false) {\n return resolver();\n }\n if (!this.data.has(key)) {\n if (this.data.size > this.capacity + 10) {\n const keys = this.data.keys();\n let i = 0;\n while (true) {\n const { value, done } = keys.next();\n this.data.delete(value);\n if (done || ++i > 10) {\n break;\n }\n }\n }\n this.data.set(key, resolver());\n }\n return this.data.get(key);\n }\n size() {\n return this.data.size;\n }\n hash(endpointParams) {\n let buffer = \"\";\n const { parameters } = this;\n if (parameters.length === 0) {\n return false;\n }\n for (const param of parameters) {\n const val = String(endpointParams[param] ?? \"\");\n if (val.includes(\"|;\")) {\n return false;\n }\n buffer += val + \"|;\";\n }\n return buffer;\n }\n}\n", "export class EndpointError extends Error {\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n}\n", "export { EndpointError } from \"./EndpointError\";\n", "export const debugId = \"endpoints\";\n", "export function toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n", "export { debugId } from \"./debugId\";\nexport { toDebugString } from \"./toDebugString\";\n", "export const customEndpointFunctions = {};\n", "export const booleanEquals = (value1, value2) => value1 === value2;\n", "export function coalesce(...args) {\n for (const arg of args) {\n if (arg != null) {\n return arg;\n }\n }\n return undefined;\n}\n", "import { EndpointError } from \"../types\";\nexport const getAttrPathList = (path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n }\n else {\n pathList.push(part);\n }\n }\n return pathList;\n};\n", "import { EndpointError } from \"../types\";\nimport { getAttrPathList } from \"./getAttrPathList\";\nexport const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n }\n else if (Array.isArray(acc)) {\n const i = parseInt(index);\n return acc[i < 0 ? acc.length + i : i];\n }\n return acc[index];\n}, value);\n", "export const isSet = (value) => value != null;\n", "export function ite(condition, trueValue, falseValue) {\n return condition ? trueValue : falseValue;\n}\n", "export const not = (value) => !value;\n", "const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`);\nexport const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith(\"[\") && value.endsWith(\"]\"));\n", "import { EndpointURLScheme } from \"@smithy/types\";\nimport { isIpAddress } from \"./isIpAddress\";\nconst DEFAULT_PORTS = {\n [EndpointURLScheme.HTTP]: 80,\n [EndpointURLScheme.HTTPS]: 443,\n};\nexport const parseURL = (value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname, port, protocol = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query)\n .map(([k, v]) => `${k}=${v}`)\n .join(\"&\");\n return url;\n }\n return new URL(value);\n }\n catch (ignored) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) ||\n (typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`));\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp,\n };\n};\n", "export function split(value, delimiter, limit) {\n if (limit === 1) {\n return [value];\n }\n if (value === \"\") {\n return [\"\"];\n }\n const parts = value.split(delimiter);\n if (limit === 0) {\n return parts;\n }\n return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter));\n}\n", "export const stringEquals = (value1, value2) => value1 === value2;\n", "export const substring = (input, start, stop, reverse) => {\n if (input == null || start >= stop || input.length < stop || /[^\\u0000-\\u007f]/.test(input)) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n};\n", "export const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n", "export { booleanEquals } from \"./booleanEquals\";\nexport { coalesce } from \"./coalesce\";\nexport { getAttr } from \"./getAttr\";\nexport { isSet } from \"./isSet\";\nexport { isValidHostLabel } from \"@smithy/core/transport\";\nexport { ite } from \"./ite\";\nexport { not } from \"./not\";\nexport { parseURL } from \"./parseURL\";\nexport { split } from \"./split\";\nexport { stringEquals } from \"./stringEquals\";\nexport { substring } from \"./substring\";\nexport { uriEncode } from \"./uriEncode\";\n", "import { booleanEquals, coalesce, getAttr, isSet, isValidHostLabel, ite, not, parseURL, split, stringEquals, substring, uriEncode, } from \"../lib\";\nexport const endpointFunctions = {\n booleanEquals,\n coalesce,\n getAttr,\n isSet,\n isValidHostLabel,\n ite,\n not,\n parseURL,\n split,\n stringEquals,\n substring,\n uriEncode,\n};\n", "import { getAttr } from \"../lib\";\nexport const evaluateTemplate = (template, options) => {\n const evaluatedTemplateArr = [];\n const { referenceRecord, endpointParams } = options;\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr((referenceRecord[refName] ?? endpointParams[refName]), attrName));\n }\n else {\n evaluatedTemplateArr.push((referenceRecord[parameterName] ?? endpointParams[parameterName]));\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n};\n", "export const getReferenceValue = ({ ref }, options) => {\n return options.referenceRecord[ref] ?? options.endpointParams[ref];\n};\n", "import { EndpointError, } from \"../types\";\nimport { customEndpointFunctions } from \"./customEndpointFunctions\";\nimport { endpointFunctions } from \"./endpointFunctions\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nimport { getReferenceValue } from \"./getReferenceValue\";\nexport const evaluateExpression = (obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n }\n else if (obj[\"fn\"]) {\n return group.callFunction(obj, options);\n }\n else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n};\nexport const callFunction = ({ fn, argv }, options) => {\n const evaluatedArgs = Array(argv.length);\n for (let i = 0; i < evaluatedArgs.length; ++i) {\n const arg = argv[i];\n if (typeof arg === \"boolean\" || typeof arg === \"number\") {\n evaluatedArgs[i] = arg;\n }\n else {\n evaluatedArgs[i] = group.evaluateExpression(arg, \"arg\", options);\n }\n }\n const namespaceSeparatorIndex = fn.indexOf(\".\");\n if (namespaceSeparatorIndex !== -1) {\n const namespaceFunctions = customEndpointFunctions[fn.slice(0, namespaceSeparatorIndex)];\n const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)];\n if (typeof customFunction === \"function\") {\n return customFunction(...evaluatedArgs);\n }\n }\n const callable = endpointFunctions[fn];\n if (typeof callable === \"function\") {\n return callable(...evaluatedArgs);\n }\n throw new Error(`function ${fn} not loaded in endpointFunctions.`);\n};\nexport const group = {\n evaluateExpression,\n callFunction,\n};\n", "export { callFunction } from \"./evaluateExpression\";\n", "import { debugId, toDebugString } from \"../debug\";\nimport { EndpointError } from \"../types\";\nimport { callFunction } from \"./callFunction\";\nexport const evaluateCondition = (condition, options) => {\n const { assign } = condition;\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(condition, options);\n options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`);\n const result = value === \"\" ? true : !!value;\n if (assign != null) {\n return { result, toAssign: { name: assign, value } };\n }\n return { result };\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointHeaders = (headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => {\n acc[headerKey] = headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n });\n return acc;\n}, {});\n", "import { EndpointError } from \"../types\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nexport const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => {\n acc[propertyKey] = group.getEndpointProperty(propertyVal, options);\n return acc;\n}, {});\nexport const getEndpointProperty = (property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return group.getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n};\nexport const group = {\n getEndpointProperty,\n getEndpointProperties,\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointUrl = (endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n }\n catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n};\n", "import { EndpointError } from \"./types\";\nimport { evaluateCondition } from \"./utils/evaluateCondition\";\nimport { evaluateExpression } from \"./utils/evaluateExpression\";\nimport { getEndpointHeaders } from \"./utils/getEndpointHeaders\";\nimport { getEndpointProperties } from \"./utils/getEndpointProperties\";\nimport { getEndpointUrl } from \"./utils/getEndpointUrl\";\nconst RESULT = 100_000_000;\nexport const decideEndpoint = (bdd, options) => {\n const { nodes, root, results, conditions } = bdd;\n let ref = root;\n const referenceRecord = {};\n const closure = {\n referenceRecord,\n endpointParams: options.endpointParams,\n logger: options.logger,\n };\n while (ref !== 1 && ref !== -1 && ref < RESULT) {\n const node_i = 3 * (Math.abs(ref) - 1);\n const [condition_i, highRef, lowRef] = [nodes[node_i], nodes[node_i + 1], nodes[node_i + 2]];\n const [fn, argv, assign] = conditions[condition_i];\n const evaluation = evaluateCondition({ fn, assign, argv }, closure);\n if (evaluation.toAssign) {\n const { name, value } = evaluation.toAssign;\n referenceRecord[name] = value;\n }\n ref = ref >= 0 === evaluation.result ? highRef : lowRef;\n }\n if (ref >= RESULT) {\n const result = results[ref - RESULT];\n if (result[0] === -1) {\n const [, errorExpression] = result;\n throw new EndpointError(evaluateExpression(errorExpression, \"Error\", closure));\n }\n const [url, properties, headers] = result;\n return {\n url: getEndpointUrl(url, closure),\n properties: getEndpointProperties(properties, closure),\n headers: getEndpointHeaders(headers ?? {}, closure),\n };\n }\n throw new EndpointError(`No matching endpoint.`);\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateCondition } from \"./evaluateCondition\";\nexport const evaluateConditions = (conditions = [], options) => {\n const conditionsReferenceRecord = {};\n const conditionOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord },\n };\n let didAssign = false;\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, conditionOptions);\n if (!result) {\n return { result };\n }\n if (toAssign) {\n didAssign = true;\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n conditionOptions.referenceRecord[toAssign.name] = toAssign.value;\n options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n if (didAssign) {\n return { result: true, referenceRecord: conditionsReferenceRecord };\n }\n return { result: true };\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { getEndpointHeaders } from \"./getEndpointHeaders\";\nimport { getEndpointProperties } from \"./getEndpointProperties\";\nimport { getEndpointUrl } from \"./getEndpointUrl\";\nexport const evaluateEndpointRule = (endpointRule, options) => {\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = referenceRecord\n ? {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n }\n : options;\n const { url, properties, headers } = endpoint;\n options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);\n const endpointToReturn = { url: getEndpointUrl(url, endpointRuleOptions) };\n if (headers != null) {\n endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions);\n }\n if (properties != null) {\n endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions);\n }\n return endpointToReturn;\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const evaluateErrorRule = (errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const errorRuleOptions = referenceRecord\n ? {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n }\n : options;\n throw new EndpointError(evaluateExpression(error, \"Error\", errorRuleOptions));\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateEndpointRule } from \"./evaluateEndpointRule\";\nimport { evaluateErrorRule } from \"./evaluateErrorRule\";\nexport const evaluateRules = (rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n }\n else if (rule.type === \"tree\") {\n const endpointOrUndefined = group.evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n};\nexport const evaluateTreeRule = (treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const treeRuleOptions = referenceRecord\n ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } }\n : options;\n return group.evaluateRules(rules, treeRuleOptions);\n};\nexport const group = {\n evaluateRules,\n evaluateTreeRule,\n};\n", "export { customEndpointFunctions } from \"./customEndpointFunctions\";\nexport { evaluateRules, evaluateTreeRule, group } from \"./evaluateRules\";\n", "import { debugId, toDebugString } from \"./debug\";\nimport { EndpointError } from \"./types\";\nimport { evaluateRules } from \"./utils\";\nexport const resolveEndpoint = (ruleSetObject, options) => {\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n for (const paramKey in parameters) {\n const parameter = parameters[paramKey];\n const endpointParam = endpointParams[paramKey];\n if (endpointParam == null && parameter.default != null) {\n endpointParams[paramKey] = parameter.default;\n continue;\n }\n if (parameter.required && endpointParam == null) {\n throw new EndpointError(`Missing required parameter: '${paramKey}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n};\n", "export const resolveEndpointRequiredConfig = (input) => {\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n throw new Error(\"@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.\");\n };\n }\n return input;\n};\n", "import { getEndpointFromConfig } from \"./middleware-endpoint/adaptors/getEndpointFromConfig\";\nimport { bindGetEndpointFromInstructions } from \"./middleware-endpoint/adaptors/getEndpointFromInstructions\";\nimport { bindEndpointMiddleware } from \"./middleware-endpoint/endpointMiddleware\";\nimport { bindGetEndpointPlugin } from \"./middleware-endpoint/getEndpointPlugin\";\nimport { bindResolveEndpointConfig } from \"./middleware-endpoint/resolveEndpointConfig\";\nexport { toEndpointV1 } from \"@smithy/core/transport\";\nexport { BinaryDecisionDiagram } from \"./util-endpoints/bdd/BinaryDecisionDiagram\";\nexport { EndpointCache } from \"./util-endpoints/cache/EndpointCache\";\nexport { decideEndpoint } from \"./util-endpoints/decideEndpoint\";\nexport { isIpAddress } from \"./util-endpoints/lib/isIpAddress\";\nexport { isValidHostLabel } from \"@smithy/core/transport\";\nexport { customEndpointFunctions } from \"./util-endpoints/utils/customEndpointFunctions\";\nexport { resolveEndpoint } from \"./util-endpoints/resolveEndpoint\";\nexport { EndpointError } from \"./util-endpoints/types\";\nexport const getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig);\nexport const resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig);\nexport const endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);\nexport const getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig);\nexport { resolveParams, } from \"./middleware-endpoint/adaptors/getEndpointFromInstructions\";\nexport { toEndpointV1 as middlewareEndpointToEndpointV1 } from \"./middleware-endpoint/adaptors/toEndpointV1\";\nexport { endpointMiddlewareOptions } from \"./middleware-endpoint/getEndpointPlugin\";\nexport { resolveEndpointRequiredConfig } from \"./middleware-endpoint/resolveEndpointRequiredConfig\";\n", "import { toEndpointV1 } from \"@smithy/core/endpoints\";\nexport const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {\n const endpointConfig = options;\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : endpointConfig.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request,\n });\n};\n", "import { deserializerMiddleware } from \"./deserializerMiddleware\";\nimport { serializerMiddleware } from \"./serializerMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n },\n };\n}\n", "import { createHash, createHmac } from \"node:crypto\";\nimport { fromArrayBuffer, fromString } from \"../util-buffer-from/buffer-from\";\nimport { toUint8Array } from \"../util-utf8/toUint8Array\";\nexport class Hash {\n algorithmIdentifier;\n secret;\n hash;\n constructor(algorithmIdentifier, secret) {\n this.algorithmIdentifier = algorithmIdentifier;\n this.secret = secret;\n this.reset();\n }\n update(toHash, encoding) {\n this.hash.update(toUint8Array(castSourceData(toHash, encoding)));\n }\n digest() {\n return Promise.resolve(this.hash.digest());\n }\n reset() {\n this.hash = this.secret\n ? createHmac(this.algorithmIdentifier, castSourceData(this.secret))\n : createHash(this.algorithmIdentifier);\n }\n}\nfunction castSourceData(toCast, encoding) {\n if (Buffer.isBuffer(toCast)) {\n return toCast;\n }\n if (typeof toCast === \"string\") {\n return fromString(toCast, encoding);\n }\n if (ArrayBuffer.isView(toCast)) {\n return fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);\n }\n return fromArrayBuffer(toCast);\n}\n", "import { Readable } from \"node:stream\";\nimport { toBase64 } from \"../../util-base64/toBase64\";\nexport class ChecksumStream extends Readable {\n expectedChecksum;\n checksumSourceLocation;\n checksum;\n source;\n base64Encoder;\n constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {\n super();\n if (typeof source.pipe !== \"function\") {\n throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);\n }\n this.source = source;\n this.base64Encoder = base64Encoder ?? toBase64;\n this.expectedChecksum = expectedChecksum;\n this.checksum = checksum;\n this.checksumSourceLocation = checksumSourceLocation;\n this.source.on(\"data\", this.onSourceData);\n this.source.on(\"end\", this.onSourceEnd);\n this.source.on(\"error\", this.onSourceError);\n this.source.on(\"close\", this.onSourceClose);\n this.source.pause();\n }\n onSourceData = (chunk) => {\n if (this.destroyed) {\n return;\n }\n try {\n this.checksum.update(chunk);\n }\n catch (e) {\n this.destroy(e);\n return;\n }\n if (!this.push(chunk)) {\n this.source.pause();\n }\n };\n onSourceEnd = async () => {\n if (this.destroyed) {\n return;\n }\n try {\n const digest = await this.checksum.digest();\n const received = this.base64Encoder(digest);\n if (this.expectedChecksum !== received) {\n this.destroy(new Error(`Checksum mismatch: expected \"${this.expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${this.checksumSourceLocation}\".`));\n return;\n }\n }\n catch (e) {\n this.destroy(e);\n return;\n }\n this.push(null);\n };\n onSourceError = (error) => {\n this.destroy(error);\n };\n onSourceClose = () => {\n if (!this.destroyed && !this.source.readableEnded) {\n this.destroy(new Error(\"Connection lost or stream closed before all data was received.\"));\n }\n };\n _read(_size) {\n this.source.resume();\n }\n _destroy(error, callback) {\n this.source?.removeListener(\"data\", this.onSourceData);\n this.source?.removeListener(\"end\", this.onSourceEnd);\n this.source?.removeListener(\"error\", this.onSourceError);\n this.source?.removeListener(\"close\", this.onSourceClose);\n this.source?.destroy();\n callback(error);\n }\n}\n", "export const isReadableStream = (stream) => typeof ReadableStream === \"function\" &&\n (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);\nexport const isBlob = (blob) => {\n return typeof Blob === \"function\" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);\n};\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;\nexport const alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {\n acc[c] = Number(i);\n return acc;\n}, {});\nexport const alphabetByValue = chars.split(\"\");\nexport const bitsPerLetter = 6;\nexport const bitsPerByte = 8;\nexport const maxLetterValue = 0b111111;\n", "import { fromUtf8 } from \"../util-utf8/fromUtf8.browser\";\nimport { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from \"./constants-for-browser\";\nexport function toBase64(_input) {\n let input;\n if (typeof _input === \"string\") {\n input = fromUtf8(_input);\n }\n else {\n input = _input;\n }\n const isArrayLike = typeof input === \"object\" && typeof input.length === \"number\";\n const isUint8Array = typeof input === \"object\" &&\n typeof input.byteOffset === \"number\" &&\n typeof input.byteLength === \"number\";\n if (!isArrayLike && !isUint8Array) {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n let str = \"\";\n for (let i = 0; i < input.length; i += 3) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << ((limit - j - 1) * bitsPerByte);\n bitLength += bitsPerByte;\n }\n const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (let k = 1; k <= bitClusterCount; k++) {\n const offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}\n", "const ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nexport class ChecksumStream extends ReadableStreamRef {\n}\n", "import { toBase64 } from \"../../util-base64/toBase64.browser\";\nimport { isReadableStream } from \"../stream-type-check\";\nimport { ChecksumStream } from \"./ChecksumStream.browser\";\nexport const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n if (!isReadableStream(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);\n }\n const encoder = base64Encoder ?? toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream.prototype);\n return readable;\n};\n", "import { isReadableStream } from \"../stream-type-check\";\nimport { ChecksumStream } from \"./ChecksumStream\";\nimport { createChecksumStream as createChecksumStreamWeb, } from \"./createChecksumStream.browser\";\nexport function createChecksumStream(init) {\n if (typeof ReadableStream === \"function\" && isReadableStream(init.source)) {\n return createChecksumStreamWeb(init);\n }\n return new ChecksumStream(init);\n}\n", "export class ByteArrayCollector {\n allocByteArray;\n byteLength = 0;\n byteArrays = [];\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\n", "import { ByteArrayCollector } from \"./ByteArrayCollector\";\nexport function createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexport const createBufferedReadable = createBufferedReadableStream;\nexport function merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nexport function flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nexport function sizeOf(chunk) {\n return chunk?.byteLength ?? chunk?.length ?? 0;\n}\nexport function modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\n", "import { Readable } from \"node:stream\";\nimport { ByteArrayCollector } from \"./ByteArrayCollector\";\nimport { createBufferedReadableStream, flush, merge, modeOf, sizeOf, } from \"./createBufferedReadable.browser\";\nimport { isReadableStream } from \"./stream-type-check\";\nexport function createBufferedReadable(upstream, size, logger) {\n if (isReadableStream(upstream)) {\n return createBufferedReadableStream(upstream, size, logger);\n }\n const downstream = new Readable({ read() { } });\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\n \"\",\n new ByteArrayCollector((size) => new Uint8Array(size)),\n new ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))),\n ];\n let mode = -1;\n upstream.on(\"data\", (chunk) => {\n const chunkMode = modeOf(chunk, true);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n downstream.push(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n downstream.push(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n downstream.push(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n downstream.push(flush(buffers, mode));\n }\n }\n });\n upstream.on(\"end\", () => {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n downstream.push(remainder);\n }\n }\n downstream.push(null);\n });\n return downstream;\n}\n", "export const getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n bodyLengthChecker !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const reader = readableStream.getReader();\n return new ReadableStream({\n async pull(controller) {\n const { value, done } = await reader.read();\n if (done) {\n controller.enqueue(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n controller.enqueue(`${checksumLocationName}:${checksum}\\r\\n`);\n controller.enqueue(`\\r\\n`);\n }\n controller.close();\n }\n else {\n controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\\r\\n${value}\\r\\n`);\n }\n },\n });\n};\n", "import { Readable } from \"node:stream\";\nimport { getAwsChunkedEncodingStream as getAwsChunkedEncodingStreamBrowser } from \"./getAwsChunkedEncodingStream.browser\";\nimport { isReadableStream } from \"./stream-type-check\";\nexport function getAwsChunkedEncodingStream(stream, options) {\n const readable = stream;\n const readableStream = stream;\n if (isReadableStream(readableStream)) {\n return getAwsChunkedEncodingStreamBrowser(readableStream, options);\n }\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined;\n const awsChunkedEncodingStream = new Readable({\n read: () => { },\n });\n readable.on(\"data\", (data) => {\n const length = bodyLengthChecker(data) || 0;\n if (length === 0) {\n return;\n }\n awsChunkedEncodingStream.push(`${length.toString(16)}\\r\\n`);\n awsChunkedEncodingStream.push(data);\n awsChunkedEncodingStream.push(\"\\r\\n\");\n });\n readable.on(\"end\", async () => {\n awsChunkedEncodingStream.push(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\\r\\n`);\n awsChunkedEncodingStream.push(`\\r\\n`);\n }\n awsChunkedEncodingStream.push(null);\n });\n return awsChunkedEncodingStream;\n}\n", "export async function headStream(stream, bytes) {\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += value?.byteLength ?? 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\n", "import { Writable } from \"node:stream\";\nimport { concatBytes } from \"../concatBytes\";\nimport { headStream as headWebStream } from \"./headStream.browser\";\nimport { isReadableStream } from \"./stream-type-check\";\nexport const headStream = (stream, bytes) => {\n if (isReadableStream(stream)) {\n return headWebStream(stream, bytes);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n collector.limit = bytes;\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = concatBytes(this.buffers);\n resolve(bytes);\n });\n });\n};\nclass Collector extends Writable {\n buffers = [];\n limit = Infinity;\n bytesBuffered = 0;\n _write(chunk, encoding, callback) {\n this.buffers.push(chunk);\n this.bytesBuffered += chunk.byteLength ?? 0;\n if (this.bytesBuffered >= this.limit) {\n const excess = this.bytesBuffered - this.limit;\n const tailBuffer = this.buffers[this.buffers.length - 1];\n this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);\n this.emit(\"finish\");\n }\n callback();\n }\n}\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "import { concatBytes } from \"../concatBytes\";\nimport { isBlob } from \"./stream-type-check\";\nexport const streamCollector = async (stream) => {\n if (isBlob(stream)) {\n return collectBlob(stream);\n }\n return collectReadableStream(stream);\n};\nexport async function collectBlob(blob) {\n return blob.arrayBuffer().then((ab) => new Uint8Array(ab));\n}\nexport async function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let length = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n if (done) {\n break;\n }\n }\n return concatBytes(chunks, length);\n}\n", "import { toBase64 } from \"../util-base64/toBase64.browser\";\nimport { toHex } from \"../util-hex-encoding/hex-encoding\";\nimport { toUtf8 } from \"../util-utf8/toUtf8.browser\";\nimport { streamCollector } from \"./stream-collector.browser\";\nimport { isReadableStream } from \"./stream-type-check\";\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nexport const sdkStreamMixin = (stream) => {\n if (!isBlobInstance(stream) && !isReadableStream(stream)) {\n const name = stream?.__proto__?.constructor?.name || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await streamCollector(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return toBase64(buf);\n }\n else if (encoding === \"hex\") {\n return toHex(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return toUtf8(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if (isReadableStream(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n", "import { Writable } from \"node:stream\";\nimport { concatBytes } from \"../concatBytes\";\nimport { collectBlob, collectReadableStream } from \"./stream-collector.browser\";\nimport { isBlob, isReadableStream } from \"./stream-type-check\";\nexport const streamCollector = (stream) => {\n if (isBlob(stream)) {\n return collectBlob(stream);\n }\n if (isReadableStream(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n const nodeStream = stream;\n nodeStream.pipe(collector);\n nodeStream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = concatBytes(this.bufferedBytes);\n resolve(bytes);\n });\n });\n};\nclass Collector extends Writable {\n bufferedBytes = [];\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n}\n", "import { Readable } from \"node:stream\";\nimport { fromArrayBuffer } from \"../util-buffer-from/buffer-from\";\nimport { sdkStreamMixin as sdkStreamMixinReadableStream } from \"./sdk-stream-mixin.browser\";\nimport { streamCollector } from \"./stream-collector\";\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nexport const sdkStreamMixin = (stream) => {\n if (!(stream instanceof Readable)) {\n try {\n return sdkStreamMixinReadableStream(stream);\n }\n catch (ignored) {\n const name = stream?.__proto__?.constructor?.name || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await streamCollector(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please ensure a polyfill is available.\");\n }\n transformed = true;\n return Readable.toWeb(stream);\n },\n });\n};\n", "export async function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\n", "import { PassThrough } from \"node:stream\";\nimport { splitStream as splitWebStream } from \"./splitStream.browser\";\nimport { isBlob, isReadableStream } from \"./stream-type-check\";\nexport async function splitStream(stream) {\n if (isReadableStream(stream) || isBlob(stream)) {\n return splitWebStream(stream);\n }\n const stream1 = new PassThrough();\n const stream2 = new PassThrough();\n stream.pipe(stream1);\n stream.pipe(stream2);\n return [stream1, stream2];\n}\n", "import { getRandomValues } from \"node:crypto\";\nimport { fromBase64 } from \"./util-base64/fromBase64\";\nimport { toBase64 } from \"./util-base64/toBase64\";\nimport { bindUint8ArrayBlobAdapter } from \"./util-stream/blob/Uint8ArrayBlobAdapter\";\nimport { fromUtf8 } from \"./util-utf8/fromUtf8\";\nimport { toUtf8 } from \"./util-utf8/toUtf8\";\nimport { bindV4 } from \"./uuid/v4\";\nexport { copyDocumentWithTransform } from \"./copyDocumentWithTransform\";\nexport { dateToUtcString, parseRfc3339DateTime, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, parseEpochTimestamp, } from \"./date-utils\";\nexport { LazyJsonString } from \"./lazy-json\";\nexport { logger, parseBoolean, expectBoolean, expectNumber, expectFloat32, expectInt, expectInt32, expectShort, expectByte, expectNonNull, expectObject, expectString, expectUnion, expectLong, strictParseDouble, strictParseFloat, strictParseFloat32, strictParseLong, strictParseInt, strictParseInt32, strictParseShort, strictParseByte, limitedParseDouble, handleFloat, limitedParseFloat, limitedParseFloat32, } from \"./parse-utils\";\nexport { quoteHeader } from \"./quote-header\";\nexport { _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime, } from \"./schema-serde-lib/schema-date-utils\";\nexport { splitEvery } from \"./split-every\";\nexport { splitHeader } from \"./split-header\";\nexport { NumericValue, nv } from \"./value/NumericValue\";\nexport { fromHex, toHex } from \"./util-hex-encoding/hex-encoding\";\nexport { toBase64, fromBase64 };\nexport { calculateBodyLength } from \"./util-body-length/calculateBodyLength\";\nexport { toUint8Array } from \"./util-utf8/toUint8Array\";\nexport { toUtf8, fromUtf8 };\nexport { concatBytes } from \"./concatBytes\";\nexport { fromArrayBuffer, fromString } from \"./util-buffer-from/buffer-from\";\nexport { isArrayBuffer } from \"./is-array-buffer/is-array-buffer\";\nexport { deserializerMiddleware } from \"./middleware-serde/deserializerMiddleware\";\nexport { deserializerMiddlewareOption, serializerMiddlewareOption, getSerdePlugin, } from \"./middleware-serde/serdePlugin\";\nexport { serializerMiddleware } from \"./middleware-serde/serializerMiddleware\";\nexport { Hash } from \"./hash-node/hash-node\";\nexport class Uint8ArrayBlobAdapter extends bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {\n}\nexport { ChecksumStream } from \"./util-stream/checksum/ChecksumStream\";\nexport { createChecksumStream } from \"./util-stream/checksum/createChecksumStream\";\nexport { createBufferedReadable } from \"./util-stream/createBufferedReadable\";\nexport { getAwsChunkedEncodingStream } from \"./util-stream/getAwsChunkedEncodingStream\";\nexport { headStream } from \"./util-stream/headStream\";\nexport { sdkStreamMixin } from \"./util-stream/sdk-stream-mixin\";\nexport { splitStream } from \"./util-stream/splitStream\";\nexport { isReadableStream, isBlob } from \"./util-stream/stream-type-check\";\nexport { streamCollector } from \"./util-stream/stream-collector\";\nconst _getRandomValues = getRandomValues;\nexport const v4 = bindV4(_getRandomValues);\nexport const generateIdempotencyToken = v4;\n", "import { Uint8ArrayBlobAdapter } from \"@smithy/core/serde\";\nexport const collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n", "export function extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n", "export class SerdeContext {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "export async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {\n const size = blob.size;\n let totalBytesRead = 0;\n while (totalBytesRead < size) {\n const slice = blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize));\n onChunk(new Uint8Array(await slice.arrayBuffer()));\n totalBytesRead += slice.size;\n }\n}\n", "import { blobReader } from \"../chunked-blob-reader/chunked-blob-reader\";\nexport const blobHasher = async function blobHasher(hashCtor, blob) {\n const hash = new hashCtor();\n await blobReader(blob, (chunk) => {\n hash.update(chunk);\n });\n return hash.digest();\n};\n", "import { Writable } from \"node:stream\";\nimport { toUint8Array } from \"@smithy/core/serde\";\nexport class HashCalculator extends Writable {\n hash;\n constructor(hash, options) {\n super(options);\n this.hash = hash;\n }\n _write(chunk, encoding, callback) {\n try {\n this.hash.update(toUint8Array(chunk));\n }\n catch (err) {\n return callback(err);\n }\n callback();\n }\n}\n", "import { createReadStream } from \"node:fs\";\nimport { HashCalculator } from \"./HashCalculator\";\nexport const fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve, reject) => {\n if (!isReadStream(fileStream)) {\n reject(new Error(\"Unable to calculate hash for non-file streams.\"));\n return;\n }\n const fileStreamTee = createReadStream(fileStream.path, {\n start: fileStream.start,\n end: fileStream.end,\n });\n const hash = new hashCtor();\n const hashCalculator = new HashCalculator(hash);\n fileStreamTee.pipe(hashCalculator);\n fileStreamTee.on(\"error\", (err) => {\n hashCalculator.end();\n reject(err);\n });\n hashCalculator.on(\"error\", reject);\n hashCalculator.on(\"finish\", function () {\n hash.digest().then(resolve).catch(reject);\n });\n});\nconst isReadStream = (stream) => typeof stream.path === \"string\";\n", "import { HashCalculator } from \"./HashCalculator\";\nexport const readableStreamHasher = (hashCtor, readableStream) => {\n if (readableStream.readableFlowing !== null) {\n throw new Error(\"Unable to calculate hash for flowing readable stream\");\n }\n const hash = new hashCtor();\n const hashCalculator = new HashCalculator(hash);\n readableStream.pipe(hashCalculator);\n return new Promise((resolve, reject) => {\n readableStream.on(\"error\", (err) => {\n hashCalculator.end();\n reject(err);\n });\n hashCalculator.on(\"error\", reject);\n hashCalculator.on(\"finish\", () => {\n hash.digest().then(resolve).catch(reject);\n });\n });\n};\n", "import { toUint8Array } from \"@smithy/core/serde\";\nexport class Md5Js {\n digestLength = 16;\n state = Uint32Array.from(INIT);\n writeBuffer = new DataView(new ArrayBuffer(64));\n bufferLength = 0;\n bytesHashed = 0;\n update(sourceData) {\n const data = toUint8Array(sourceData);\n let pos = 0;\n let len = data.byteLength;\n this.bytesHashed += len;\n while (len > 0) {\n this.writeBuffer.setUint8(this.bufferLength++, data[pos++]);\n --len;\n if (this.bufferLength === 64) {\n compress(this.state, this.writeBuffer);\n this.bufferLength = 0;\n }\n }\n }\n async digest() {\n const state = Uint32Array.from(this.state);\n const buf = new DataView(this.writeBuffer.buffer.slice(0));\n let bufLen = this.bufferLength;\n const bits = this.bytesHashed * 8;\n buf.setUint8(bufLen++, 0x80);\n if (this.bufferLength % 64 >= 56) {\n for (let i = bufLen; i < 64; ++i) {\n buf.setUint8(i, 0);\n }\n compress(state, buf);\n bufLen = 0;\n }\n for (let i = bufLen; i < 56; ++i) {\n buf.setUint8(i, 0);\n }\n buf.setUint32(56, bits >>> 0, true);\n buf.setUint32(60, Math.floor(bits / 2 ** 32), true);\n compress(state, buf);\n const out = new Uint8Array(16);\n const view = new DataView(out.buffer);\n for (let i = 0; i < 4; ++i) {\n view.setUint32(i * 4, state[i], true);\n }\n return out;\n }\n reset() {\n this.state.set(INIT);\n this.writeBuffer = new DataView(new ArrayBuffer(64));\n this.bufferLength = 0;\n this.bytesHashed = 0;\n }\n}\nconst INIT = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476];\nconst M = 0xffffffff;\nconst S = Uint8Array.of(7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21);\nconst T = Array.from({ length: 64 }, (_, i) => (Math.abs(Math.sin(i + 1)) * 2 ** 32) >>> 0);\nfunction compress(state, block) {\n let a = state[0], b = state[1], c = state[2], d = state[3];\n for (let i = 0; i < 64; ++i) {\n let f, g;\n if (i < 16) {\n f = (b & c) | (~b & d);\n g = i;\n }\n else if (i < 32) {\n f = (d & b) | (c & ~d);\n g = (5 * i + 1) % 16;\n }\n else if (i < 48) {\n f = b ^ c ^ d;\n g = (3 * i + 5) % 16;\n }\n else {\n f = c ^ (b | ~d);\n g = (7 * i) % 16;\n }\n const x = block.getUint32(g * 4, true);\n const tmp = d;\n d = c;\n c = b;\n const s = S[(i >> 4) * 4 + (i & 3)];\n const sum = (((a + f) & M) + ((x + T[i]) & M)) & M;\n b = (b + (((sum << s) | (sum >>> (32 - s))) >>> 0)) & M;\n a = tmp;\n }\n state[0] = (state[0] + a) & M;\n state[1] = (state[1] + b) & M;\n state[2] = (state[2] + c) & M;\n state[3] = (state[3] + d) & M;\n}\n", "import { createHash } from \"node:crypto\";\nimport { toUint8Array } from \"@smithy/core/serde\";\nimport { Md5Js } from \"./Md5Js\";\nconst hasNativeCrypto = (() => {\n try {\n createHash(\"md5\");\n return true;\n }\n catch {\n return false;\n }\n})();\nexport const Md5Node = hasNativeCrypto ? buildNativeClass() : Md5Js;\nfunction buildNativeClass() {\n return class Md5Node {\n digestLength = 16;\n hash = createHash(\"md5\");\n update(data) {\n this.hash.update(toUint8Array(data));\n }\n async digest() {\n const buf = this.hash.copy().digest();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n reset() {\n this.hash = createHash(\"md5\");\n }\n };\n}\n", "const CRC32_TABLE = new Uint32Array(256);\nfor (let i = 0; i < 256; ++i) {\n let c = i;\n for (let j = 0; j < 8; ++j) {\n c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;\n }\n CRC32_TABLE[i] = c >>> 0;\n}\nconst ONES = 0xffff_ffff;\nexport class Crc32Js {\n digestLength = 4;\n checksum = ONES;\n update(data) {\n for (let i = 0; i < data.length; ++i) {\n this.checksum = (this.checksum >>> 8) ^ CRC32_TABLE[(this.checksum ^ data[i]) & 0xff];\n }\n }\n digestSync() {\n return (this.checksum ^ ONES) >>> 0;\n }\n async digest() {\n const value = this.digestSync();\n const out = new Uint8Array(4);\n new DataView(out.buffer).setUint32(0, value, false);\n return out;\n }\n reset() {\n this.checksum = ONES;\n }\n}\n", "import * as zlib from \"node:zlib\";\nimport { Crc32Js } from \"./Crc32Js\";\nconst zlibCrc32 = typeof zlib.crc32 === \"function\" ? zlib.crc32 : undefined;\nexport const Crc32Node = zlibCrc32 ? buildNativeClass(zlibCrc32) : Crc32Js;\nfunction buildNativeClass(nativeCrc32) {\n return class Crc32Node {\n digestLength = 4;\n value = 0;\n update(data) {\n this.value = nativeCrc32(data, this.value);\n }\n digestSync() {\n return this.value >>> 0;\n }\n async digest() {\n const out = new Uint8Array(4);\n new DataView(out.buffer).setUint32(0, this.digestSync(), false);\n return out;\n }\n reset() {\n this.value = 0;\n }\n };\n}\n", "import { toUint8Array } from \"@smithy/core/serde\";\nconst BLOCK = 64;\nconst DIGEST_LENGTH = 32;\nconst MAX_HASHABLE_LENGTH = 2 ** 53 - 1;\nexport class Sha256Js {\n digestLength = DIGEST_LENGTH;\n state = Int32Array.from(INIT);\n w;\n buffer = new Uint8Array(64);\n bufferLength = 0;\n bytesHashed = 0;\n finished = false;\n inner;\n outer;\n constructor(secret) {\n if (secret) {\n const key = Sha256Js.normalizeKey(secret);\n this.inner = new Sha256Js();\n this.outer = new Sha256Js();\n const { inner, outer } = this;\n const pad = new Uint8Array(BLOCK * 2);\n for (let i = 0; i < BLOCK; ++i) {\n pad[i] = 0x36 ^ key[i];\n pad[i + BLOCK] = 0x5c ^ key[i];\n }\n inner.update(pad.subarray(0, BLOCK));\n outer.update(pad.subarray(BLOCK));\n }\n }\n update(data) {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished HMAC.\");\n }\n if (this.inner) {\n this.inner.update(data);\n return;\n }\n const chunk = toUint8Array(data);\n let position = 0;\n let { byteLength } = chunk;\n this.bytesHashed += byteLength;\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = chunk[position++];\n byteLength--;\n if (this.bufferLength === BLOCK) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n async digest() {\n const { inner, outer } = this;\n if (inner && outer) {\n if (this.finished) {\n throw new Error(\"Attempted to digest an already finished HMAC.\");\n }\n this.finished = true;\n const innerDigest = inner.digestSync();\n outer.update(innerDigest);\n return outer.digestSync();\n }\n return this.digestSync();\n }\n reset() {\n this.state = Int32Array.from(INIT);\n this.buffer = new Uint8Array(64);\n this.bufferLength = 0;\n this.bytesHashed = 0;\n }\n digestSync() {\n const state = this.state.slice();\n const buffer = this.buffer.slice();\n let bufferLength = this.bufferLength;\n const bitsHashed = this.bytesHashed * 8;\n const bufferView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n bufferView.setUint8(bufferLength++, 0x80);\n if ((bufferLength - 1) % BLOCK >= BLOCK - 8) {\n for (let i = bufferLength; i < BLOCK; ++i) {\n bufferView.setUint8(i, 0);\n }\n this.hashBufferWith(state, buffer);\n bufferLength = 0;\n }\n for (let i = bufferLength; i < BLOCK - 8; ++i) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(BLOCK - 8, Math.floor(bitsHashed / 0x100000000), false);\n bufferView.setUint32(BLOCK - 4, bitsHashed, false);\n this.hashBufferWith(state, buffer);\n const out = new Uint8Array(DIGEST_LENGTH);\n for (let i = 0; i < 8; ++i) {\n out[i * 4] = (state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (state[i] >>> 0) & 0xff;\n }\n return out;\n }\n static normalizeKey(secret) {\n const key = toUint8Array(secret);\n if (key.byteLength > BLOCK) {\n const h = new Sha256Js();\n h.update(key);\n const out = h.digestSync();\n const padded = new Uint8Array(BLOCK);\n padded.set(out);\n return padded;\n }\n if (key.byteLength < BLOCK) {\n const padded = new Uint8Array(BLOCK);\n padded.set(key);\n return padded;\n }\n return key;\n }\n hashBuffer() {\n this.hashBufferWith(this.state, this.buffer);\n }\n hashBufferWith(state, buffer) {\n const w = (this.w ??= new Int32Array(64));\n let s0 = state[0], s1 = state[1], s2 = state[2], s3 = state[3], s4 = state[4], s5 = state[5], s6 = state[6], s7 = state[7];\n for (let i = 0; i < BLOCK; ++i) {\n if (i < 16) {\n w[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n }\n else {\n let u = w[i - 2];\n const t1 = ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n u = w[i - 15];\n const t2 = ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n w[i] = ((t1 + w[i - 7]) | 0) + ((t2 + w[i - 16]) | 0);\n }\n const t1 = ((((((s4 >>> 6) | (s4 << 26)) ^ ((s4 >>> 11) | (s4 << 21)) ^ ((s4 >>> 25) | (s4 << 7))) +\n ((s4 & s5) ^ (~s4 & s6))) |\n 0) +\n ((s7 + ((K[i] + w[i]) | 0)) | 0)) |\n 0;\n const t2 = ((((s0 >>> 2) | (s0 << 30)) ^ ((s0 >>> 13) | (s0 << 19)) ^ ((s0 >>> 22) | (s0 << 10))) +\n ((s0 & s1) ^ (s0 & s2) ^ (s1 & s2))) |\n 0;\n s7 = s6;\n s6 = s5;\n s5 = s4;\n s4 = (s3 + t1) | 0;\n s3 = s2;\n s2 = s1;\n s1 = s0;\n s0 = (t1 + t2) | 0;\n }\n state[0] += s0;\n state[1] += s1;\n state[2] += s2;\n state[3] += s3;\n state[4] += s4;\n state[5] += s5;\n state[6] += s6;\n state[7] += s7;\n }\n}\nconst INIT = new Int32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,\n]);\nconst K = new Int32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n]);\n", "import { createHash, createHmac } from \"node:crypto\";\nimport { Sha256Js } from \"./Sha256Js\";\nconst hasNativeCrypto = (() => {\n try {\n createHash(\"sha256\");\n return true;\n }\n catch {\n return false;\n }\n})();\nexport const Sha256Node = hasNativeCrypto ? buildNativeClass() : Sha256Js;\nfunction buildNativeClass() {\n return class Sha256Node {\n digestLength = 32;\n secret;\n hash;\n isHmac;\n finished = false;\n constructor(secret) {\n this.secret = secret;\n this.isHmac = !!secret;\n this.hash = this.createHash();\n }\n update(data) {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n this.hash.update(data);\n }\n async digest() {\n let buf;\n if (this.isHmac) {\n this.finished = true;\n buf = this.hash.digest();\n }\n else {\n buf = this.hash.copy().digest();\n }\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n reset() {\n this.hash = this.createHash();\n this.finished = false;\n }\n createHash() {\n return this.secret ? createHmac(\"sha256\", toBuffer(this.secret)) : createHash(\"sha256\");\n }\n };\n}\nfunction toBuffer(data) {\n if (typeof data === \"string\") {\n return data;\n }\n if (ArrayBuffer.isView(data)) {\n return Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n }\n return Buffer.from(data);\n}\n", "import { concatBytes, toUint8Array } from \"@smithy/core/serde\";\nimport { Sha256Js } from \"./Sha256Js\";\nconst { digest, sign, importKey } = globalThis?.crypto?.subtle ?? {};\nconst subtle = typeof digest === \"function\" && typeof sign === \"function\" && typeof importKey === \"function\"\n ? globalThis.crypto.subtle\n : undefined;\nconst MAX_PENDING_BYTES = 8 * 1024 * 1024;\nexport class Sha256WebCrypto {\n digestLength = 32;\n secret;\n pending = [];\n pendingBytes = 0;\n fallback;\n finished = false;\n constructor(secret) {\n if (secret) {\n this.secret = toUint8Array(secret);\n }\n }\n update(data) {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished HMAC.\");\n }\n if (this.fallback) {\n this.fallback.update(data);\n return;\n }\n this.pending.push(data.slice());\n this.pendingBytes += data.byteLength;\n if (this.pendingBytes >= MAX_PENDING_BYTES) {\n this.switchToFallback();\n }\n }\n async digest() {\n if (this.fallback) {\n return this.fallback.digest();\n }\n if (this.secret && this.finished) {\n throw new Error(\"Attempted to digest an already finished HMAC.\");\n }\n const data = concatBytes(this.pending);\n if (subtle) {\n if (this.secret) {\n this.finished = true;\n const key = await subtle.importKey(\"raw\", this.secret, { name: \"HMAC\", hash: \"SHA-256\" }, false, [\"sign\"]);\n const sig = await subtle.sign(\"HMAC\", key, data);\n return new Uint8Array(sig);\n }\n const hash = await subtle.digest(\"SHA-256\", data);\n return new Uint8Array(hash);\n }\n const sha256 = new Sha256Js(this.secret);\n sha256.update(data);\n return sha256.digest();\n }\n reset() {\n this.pending = [];\n this.pendingBytes = 0;\n this.fallback = undefined;\n this.finished = false;\n }\n switchToFallback() {\n const sha256Js = new Sha256Js(this.secret);\n for (const chunk of this.pending) {\n sha256Js.update(chunk);\n }\n this.fallback = sha256Js;\n this.pending = [];\n this.pendingBytes = 0;\n }\n}\n", "export { blobHasher } from \"./hash-blob-browser/blobHasher\";\nexport { fileStreamHasher } from \"./hash-stream-node/fileStreamHasher\";\nexport { readableStreamHasher } from \"./hash-stream-node/readableStreamHasher\";\nexport { Md5Js } from \"./md5/Md5Js\";\nexport { Md5Node, Md5Node as Md5 } from \"./md5/Md5Node\";\nexport { Crc32Js } from \"./crc32/Crc32Js\";\nexport { Crc32Node, Crc32Node as Crc32 } from \"./crc32/Crc32Node\";\nexport { Sha256Js } from \"./sha256/Sha256Js\";\nexport { Sha256Node, Sha256Node as Sha256 } from \"./sha256/Sha256Node\";\nexport { Sha256WebCrypto } from \"./sha256/Sha256WebCrypto\";\nexport { blobReader } from \"./chunked-blob-reader/chunked-blob-reader\";\n", "import { toHex } from \"@smithy/core/serde\";\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "import { fromHex, toHex } from \"@smithy/core/serde\";\nimport { Int64 } from \"./Int64\";\nexport class HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? HEADER_VALUE_TYPE.boolTrue : HEADER_VALUE_TYPE.boolFalse]);\n case \"byte\":\n return Uint8Array.from([HEADER_VALUE_TYPE.byte, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, HEADER_VALUE_TYPE.short);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, HEADER_VALUE_TYPE.integer);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = HEADER_VALUE_TYPE.long;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, HEADER_VALUE_TYPE.byteArray);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, HEADER_VALUE_TYPE.string);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = HEADER_VALUE_TYPE.timestamp;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = HEADER_VALUE_TYPE.uuid;\n uuidBytes.set(fromHex(header.value.replace(/-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case HEADER_VALUE_TYPE.boolTrue:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case HEADER_VALUE_TYPE.boolFalse:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case HEADER_VALUE_TYPE.byte:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case HEADER_VALUE_TYPE.short:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case HEADER_VALUE_TYPE.integer:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case HEADER_VALUE_TYPE.long:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case HEADER_VALUE_TYPE.byteArray:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case HEADER_VALUE_TYPE.string:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case HEADER_VALUE_TYPE.timestamp:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case HEADER_VALUE_TYPE.uuid:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n", "import { Crc32 } from \"@smithy/core/checksum\";\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nexport function splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new Crc32();\n checksummer.update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digestSync()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digestSync()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digestSync()) {\n throw new Error(`The message checksum (${checksummer.digestSync()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n", "import { Crc32 } from \"@smithy/core/checksum\";\nimport { HeaderMarshaller } from \"./HeaderMarshaller\";\nimport { splitMessage } from \"./splitMessage\";\nexport class EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n checksum.update(out.subarray(0, 8));\n view.setUint32(8, checksum.digestSync(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n checksum.update(out.subarray(8, length - 4));\n view.setUint32(length - 4, checksum.digestSync(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n", "export class MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n", "export class MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n", "export class SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n", "export class SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n", "export function getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n", "export function getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nexport function getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n", "import { EventStreamCodec } from \"../eventstream-codec/EventStreamCodec\";\nimport { MessageDecoderStream } from \"../eventstream-codec/MessageDecoderStream\";\nimport { MessageEncoderStream } from \"../eventstream-codec/MessageEncoderStream\";\nimport { SmithyMessageDecoderStream } from \"../eventstream-codec/SmithyMessageDecoderStream\";\nimport { SmithyMessageEncoderStream } from \"../eventstream-codec/SmithyMessageEncoderStream\";\nimport { getChunkedStream } from \"./getChunkedStream\";\nimport { getMessageUnmarshaller } from \"./getUnmarshalledStream\";\nexport class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n}\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "import { Readable } from \"node:stream\";\nimport { EventStreamMarshaller as UniversalEventStreamMarshaller } from \"../eventstream-serde-universal/EventStreamMarshaller\";\nexport class EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new UniversalEventStreamMarshaller({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = typeof body[Symbol.asyncIterator] === \"function\" ? body : readableToIterable(body);\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n return Readable.from(this.universalMarshaller.serialize(input, serializer));\n }\n}\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\nexport async function* readableToIterable(readStream) {\n let streamEnded = false;\n let generationEnded = false;\n const records = new Array();\n readStream.on(\"error\", (err) => {\n if (!streamEnded) {\n streamEnded = true;\n }\n if (err) {\n throw err;\n }\n });\n readStream.on(\"data\", (data) => {\n records.push(data);\n });\n readStream.on(\"end\", () => {\n streamEnded = true;\n });\n while (!generationEnded) {\n const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));\n if (value) {\n yield value;\n }\n generationEnded = streamEnded && records.length === 0;\n }\n}\n", "export const readableStreamToIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nexport const iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n", "export const resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n", "import { fromUtf8, toUtf8 } from \"@smithy/core/serde\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n let unionMember = \"\";\n for (const key in event) {\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const key in firstEvent.value) {\n initialResponseContainer[key] = firstEvent.value[key];\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n", "export { EventStreamCodec } from \"./eventstream-codec/EventStreamCodec\";\nexport { HeaderMarshaller } from \"./eventstream-codec/HeaderMarshaller\";\nexport { Int64 } from \"./eventstream-codec/Int64\";\nexport { MessageDecoderStream } from \"./eventstream-codec/MessageDecoderStream\";\nexport { MessageEncoderStream } from \"./eventstream-codec/MessageEncoderStream\";\nexport { SmithyMessageDecoderStream } from \"./eventstream-codec/SmithyMessageDecoderStream\";\nexport { SmithyMessageEncoderStream } from \"./eventstream-codec/SmithyMessageEncoderStream\";\nexport { EventStreamMarshaller, eventStreamSerdeProvider } from \"./eventstream-serde/EventStreamMarshaller\";\nexport { readableStreamToIterable, iterableToReadableStream } from \"./eventstream-serde/utils\";\nexport { EventStreamMarshaller as UniversalEventStreamMarshaller, eventStreamSerdeProvider as universalEventStreamSerdeProvider, } from \"./eventstream-serde-universal/EventStreamMarshaller\";\nexport { getChunkedStream } from \"./eventstream-serde-universal/getChunkedStream\";\nexport { getUnmarshalledStream, getMessageUnmarshaller } from \"./eventstream-serde-universal/getUnmarshalledStream\";\nexport { resolveEventStreamSerdeConfig } from \"./eventstream-serde-config-resolver/EventStreamSerdeConfig\";\nexport { EventStreamSerde } from \"./EventStreamSerde\";\n", "import { NormalizedSchema, TypeRegistry, translateTraits } from \"@smithy/core/schema\";\nimport { HttpRequest, HttpResponse, isValidHostname } from \"@smithy/core/transport\";\nimport { SerdeContext } from \"./SerdeContext\";\nexport class HttpProtocol extends SerdeContext {\n options;\n compositeErrorRegistry;\n constructor(options) {\n super();\n this.options = options;\n this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);\n for (const etr of options.errorTypeRegistries ?? []) {\n this.compositeErrorRegistry.copyFrom(etr);\n }\n }\n getRequestType() {\n return HttpRequest;\n }\n getResponseType() {\n return HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n if (!request.query) {\n request.query = {};\n }\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n request.query[k] = v;\n }\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name].join(\", \");\n }\n }\n return request;\n }\n else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : undefined;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query,\n };\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n request.headers[name] = endpoint.headers[name];\n }\n }\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n if (this.serdeContext?.disableHostPrefix) {\n return;\n }\n const inputNs = NormalizedSchema.of(operationSchema.input);\n const opTraits = translateTraits(operationSchema.traits ?? {});\n if (opTraits.endpoint) {\n let hostPrefix = opTraits.endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n for (const [name, member] of inputNs.structIterator()) {\n if (!member.getMergedTraits().hostLabel) {\n continue;\n }\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n if (!isValidHostname(request.hostname)) {\n throw new Error(`[${request.hostname}] is not a valid hostname.`);\n }\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n };\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.serializeEventStream({\n eventStream,\n requestSchema,\n initialRequest,\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.deserializeEventStream({\n response,\n responseSchema,\n initialResponseContainer,\n });\n }\n async loadEventStreamCapability() {\n const { EventStreamSerde, eventStreamSerdeProvider } = await import(\"@smithy/core/event-streams\");\n const marshaller = this.resolveEventStreamMarshaller(eventStreamSerdeProvider);\n return new EventStreamSerde({\n marshaller,\n serializer: this.serializer,\n deserializer: this.deserializer,\n serdeContext: this.serdeContext,\n defaultContentType: this.getDefaultContentType(),\n });\n }\n resolveEventStreamMarshaller(importedProvider) {\n const context = this.serdeContext;\n if (context.eventStreamMarshaller) {\n return context.eventStreamMarshaller;\n }\n return importedProvider(this.serdeContext);\n }\n getDefaultContentType() {\n throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n void schema;\n void context;\n void response;\n void arg4;\n void arg5;\n return [];\n }\n getEventStreamMarshaller() {\n const context = this.serdeContext;\n if (!context.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n return context.eventStreamMarshaller;\n }\n}\n", "import { NormalizedSchema, translateTraits } from \"@smithy/core/schema\";\nimport { sdkStreamMixin, splitEvery, splitHeader } from \"@smithy/core/serde\";\nimport { HttpRequest } from \"@smithy/core/transport\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nimport { collectBody } from \"./collect-stream-body\";\nimport { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nexport class HttpBindingProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const input = _input && typeof _input === \"object\" ? _input : {};\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const payloadMemberNames = [];\n const payloadMemberSchemas = [];\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n }\n else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n for (const [key, value] of traitSearchParams) {\n query[key] = value;\n }\n }\n }\n for (const [memberName, memberNs] of ns.structIterator()) {\n const memberTraits = memberNs.getMergedTraits() ?? {};\n const inputMemberValue = input[memberName];\n if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {\n if (memberTraits.httpLabel) {\n if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {\n throw new Error(`No value provided for input HTTP label: ${memberName}.`);\n }\n }\n continue;\n }\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n if (input[memberName]) {\n payload = await this.serializeEventStream({\n eventStream: input[memberName],\n requestSchema: ns,\n });\n }\n }\n else {\n payload = inputMemberValue;\n }\n }\n else {\n serializer.write(memberNs, inputMemberValue);\n payload = serializer.flush();\n }\n }\n else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMemberValue);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(`{${memberName}+}`, replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\"));\n }\n else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n }\n else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMemberValue);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n }\n else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const key in inputMemberValue) {\n const val = inputMemberValue[key];\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n }\n else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMemberValue, query);\n }\n else {\n hasNonHttpBindingMember = true;\n payloadMemberNames.push(memberName);\n payloadMemberSchemas.push(memberNs);\n }\n }\n if (hasNonHttpBindingMember && input) {\n const [namespace, name] = (ns.getName(true) ?? \"#Unknown\").split(\"#\");\n const requiredMembers = ns.getSchema()[6];\n const payloadSchema = [\n 3,\n namespace,\n name,\n ns.getMergedTraits(),\n payloadMemberNames,\n payloadMemberSchemas,\n undefined,\n ];\n if (requiredMembers) {\n payloadSchema[6] = requiredMembers;\n }\n else {\n payloadSchema.pop();\n }\n serializer.write(payloadSchema, input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const key in data) {\n if (!(key in query)) {\n const val = data[key];\n const valueSchema = ns.getValueSchema();\n Object.assign(valueSchema.getMergedTraits(), {\n ...traits,\n httpQuery: key,\n httpQueryParams: undefined,\n });\n this.serializeQuery(valueSchema, val, query);\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== undefined) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n }\n else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n if (dataFromBody[member] != null) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n }\n else if (nonHttpBindingMembers.discardResponseBody) {\n await collectBody(response.body, context);\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n }\n else {\n dataObject = arg4;\n }\n let discardResponseBody = true;\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(schema);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n discardResponseBody = false;\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n dataObject[memberName] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n });\n }\n else {\n dataObject[memberName] = sdkStreamMixin(response.body);\n }\n }\n else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n }\n else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n headerListValueSchema.getMergedTraits().httpHeader = key;\n let sections;\n if (headerListValueSchema.isTimestampSchema() &&\n headerListValueSchema.getSchema() === 4) {\n sections = splitEvery(value, \",\", 2);\n }\n else {\n sections = splitHeader(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read(headerListValueSchema, section.trim()));\n }\n dataObject[memberName] = list;\n }\n else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n }\n else if (memberTraits.httpPrefixHeaders !== undefined) {\n dataObject[memberName] = {};\n for (const header in response.headers) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n const value = response.headers[header];\n const valueSchema = memberSchema.getValueSchema();\n valueSchema.getMergedTraits().httpHeader = header;\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);\n }\n }\n }\n else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n }\n else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n nonHttpBindingMembers.discardResponseBody = discardResponseBody;\n return nonHttpBindingMembers;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { HttpRequest } from \"@smithy/core/transport\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nimport { collectBody } from \"./collect-stream-body\";\nexport class RpcProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let payload;\n const input = _input && typeof _input === \"object\" ? _input : {};\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"/\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n if (input) {\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n if (input[eventStreamMember]) {\n const initialRequest = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n if (memberName !== eventStreamMember && input[memberName]) {\n serializer.write(memberSchema, input[memberName]);\n initialRequest[memberName] = serializer.flush();\n }\n }\n payload = await this.serializeEventStream({\n eventStream: input[eventStreamMember],\n requestSchema: ns,\n initialRequest,\n });\n }\n }\n else {\n serializer.write(schema, input);\n payload = serializer.flush();\n }\n }\n request.headers = Object.assign(request.headers, headers);\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n dataObject[eventStreamMember] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n initialResponseContainer: dataObject,\n });\n }\n else {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n}\n", "import { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nexport const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== undefined) {\n const labelValue = labelValueProvider();\n if (labelValue == null || labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel\n ? labelValue\n .split(\"/\")\n .map((segment) => extendedEncodeURIComponent(segment))\n .join(\"/\")\n : extendedEncodeURIComponent(labelValue));\n }\n else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath;\n};\n", "import { HttpRequest } from \"@smithy/core/transport\";\nimport { resolvedPath } from \"./resolve-path\";\nexport function requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nexport class RequestBuilder {\n input;\n context;\n query = {};\n method = \"\";\n headers = {};\n path = \"\";\n body = null;\n hostname = \"\";\n resolvePathStack = [];\n constructor(input, context) {\n this.input = input;\n this.context = context;\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n", "export function determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() &&\n (ns.getSchema() === 5 ||\n ns.getSchema() === 6 ||\n ns.getSchema() === 7)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings\n ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader)\n ? 6\n : Boolean(httpQuery) || Boolean(httpLabel)\n ? 5\n : undefined\n : undefined;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, NumericValue, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime, fromBase64, splitHeader, toUtf8, } from \"@smithy/core/serde\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class FromStringShapeDeserializer extends SerdeContext {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n read(_schema, data) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return _parseRfc3339DateTimeWithOffset(data);\n case 6:\n return _parseRfc7231DateTime(data);\n case 7:\n return _parseEpochTimestamp(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n if (ns.isNumericSchema()) {\n return Number(data);\n }\n if (ns.isBigIntegerSchema()) {\n return BigInt(data);\n }\n if (ns.isBigDecimalSchema()) {\n return new NumericValue(data, \"bigDecimal\");\n }\n if (ns.isBooleanSchema()) {\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { fromUtf8, toUtf8 } from \"@smithy/core/serde\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { FromStringShapeDeserializer } from \"./FromStringShapeDeserializer\";\nexport class HttpInterceptingShapeDeserializer extends SerdeContext {\n codecDeserializer;\n stringDeserializer;\n constructor(codecDeserializer, codecSettings) {\n super();\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema, data) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n }\n else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, dateToUtcString, generateIdempotencyToken, quoteHeader, toBase64 } from \"@smithy/core/serde\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class ToStringShapeSerializer extends SerdeContext {\n settings;\n stringBuffer = \"\";\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n this.stringBuffer = dateToUtcString(value);\n break;\n case 7:\n this.stringBuffer = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1000);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n if (ns.isIdempotencyToken()) {\n this.stringBuffer = generateIdempotencyToken();\n }\n else {\n this.stringBuffer = String(value);\n }\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { ToStringShapeSerializer } from \"./ToStringShapeSerializer\";\nexport class HttpInterceptingShapeSerializer {\n codecSerializer;\n stringSerializer;\n buffer;\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== undefined) {\n const buffer = this.buffer;\n this.buffer = undefined;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n}\n", "import { FieldPosition } from \"@smithy/types\";\nexport class Field {\n name;\n kind;\n values;\n constructor({ name, kind = FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n", "export class Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n", "export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nexport const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n", "import { HttpRequest } from \"@smithy/core/transport\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nexport function contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n catch (ignored) {\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexport const contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nexport const getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n});\n", "export const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n", "import { escapeUri } from \"./escape-uri\";\nexport const escapeUriPath = (uri) => uri.split(\"/\").map(escapeUri).join(\"/\");\n", "import { escapeUri } from \"../util-uri-escape/escape-uri\";\nexport function buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n", "export { collectBody } from \"./collect-stream-body\";\nexport { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nexport { HttpBindingProtocol } from \"./HttpBindingProtocol\";\nexport { HttpProtocol } from \"./HttpProtocol\";\nexport { RpcProtocol } from \"./RpcProtocol\";\nexport { RequestBuilder, requestBuilder } from \"./requestBuilder\";\nexport { resolvedPath } from \"./resolve-path\";\nexport { FromStringShapeDeserializer } from \"./serde/FromStringShapeDeserializer\";\nexport { HttpInterceptingShapeDeserializer } from \"./serde/HttpInterceptingShapeDeserializer\";\nexport { HttpInterceptingShapeSerializer } from \"./serde/HttpInterceptingShapeSerializer\";\nexport { ToStringShapeSerializer } from \"./serde/ToStringShapeSerializer\";\nexport { determineTimestampFormat } from \"./serde/determineTimestampFormat\";\nexport { SerdeContext } from \"./SerdeContext\";\nexport { Field } from \"./protocol-http/Field\";\nexport { Fields } from \"./protocol-http/Fields\";\nexport { HttpRequest } from \"@smithy/core/transport\";\nexport { HttpResponse } from \"@smithy/core/transport\";\nexport { isValidHostname } from \"@smithy/core/transport\";\nexport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from \"./protocol-http/extensions/httpExtensionConfiguration\";\nexport { contentLengthMiddleware, contentLengthMiddlewareOptions, getContentLengthPlugin, } from \"./middleware-content-length/contentLengthMiddleware\";\nexport { escapeUri } from \"./util-uri-escape/escape-uri\";\nexport { escapeUriPath } from \"./util-uri-escape/escape-uri-path\";\nexport { buildQueryString } from \"./querystring-builder/buildQueryString\";\nexport { parseQueryString } from \"@smithy/core/transport\";\nexport { parseUrl } from \"@smithy/core/transport\";\n", "export const CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\",\n];\nexport const THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\",\n];\nexport const TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nexport const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nexport const NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\nexport const NODEJS_NETWORK_ERROR_CODES = [\"EHOSTUNREACH\", \"ENETUNREACH\", \"ENOTFOUND\", \"EAI_AGAIN\"];\n", "import { CLOCK_SKEW_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from \"./constants\";\nexport const isRetryableByTrait = (error) => error?.$retryable !== undefined;\nexport const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name);\nexport const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;\nexport const isBrowserNetworkError = (error) => {\n const errorMessages = new Set([\n \"Failed to fetch\",\n \"NetworkError when attempting to fetch resource\",\n \"The Internet connection appears to be offline\",\n \"Load failed\",\n \"Network request failed\",\n ]);\n const isValid = error && error instanceof TypeError;\n if (!isValid) {\n return false;\n }\n return errorMessages.has(error.message);\n};\nexport const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||\n THROTTLING_ERROR_CODES.includes(error.name) ||\n error.$retryable?.throttling == true;\nexport const isTransientError = (error, depth = 0) => isRetryableByTrait(error) ||\n isClockSkewCorrectedError(error) ||\n (error.name === \"InvalidSignatureException\" && error.message?.includes(\"Signature expired\")) ||\n TRANSIENT_ERROR_CODES.includes(error.name) ||\n NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || \"\") ||\n NODEJS_NETWORK_ERROR_CODES.includes(error?.code || \"\") ||\n TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||\n isBrowserNetworkError(error) ||\n isNodeJsHttp2TransientError(error) ||\n (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));\nexport const isServerError = (error) => {\n if (error.$metadata?.httpStatusCode !== undefined) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n};\nexport function isNodeJsHttp2TransientError(error) {\n return error.code === \"ERR_HTTP2_STREAM_ERROR\" && error.message.includes(\"NGHTTP2_REFUSED_STREAM\");\n}\n", "export const DEFAULT_RETRY_DELAY_BASE = 100;\nexport const MAXIMUM_RETRY_DELAY = 20 * 1000;\nexport const THROTTLING_RETRY_DELAY_BASE = 500;\nexport const INITIAL_RETRY_TOKENS = 500;\nexport const RETRY_COST = 5;\nexport const TIMEOUT_RETRY_COST = 10;\nexport const NO_RETRY_INCREMENT = 1;\nexport const INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nexport const REQUEST_HEADER = \"amz-sdk-request\";\n", "import { HttpResponse } from \"@smithy/core/protocols\";\nimport { parseRfc7231DateTime } from \"@smithy/core/serde\";\nexport function parseRetryAfterHeader(response, logger) {\n if (!HttpResponse.isInstance(response)) {\n return;\n }\n for (const header of Object.keys(response.headers)) {\n const h = header.toLowerCase();\n if (h === \"retry-after\") {\n const retryAfter = response.headers[header];\n let retryAfterSeconds = NaN;\n if (retryAfter.endsWith(\"GMT\")) {\n try {\n const date = parseRfc7231DateTime(retryAfter);\n retryAfterSeconds = (date.getTime() - Date.now()) / 1000;\n }\n catch (e) {\n logger?.trace?.(\"Failed to parse retry-after header\");\n logger?.trace?.(e);\n }\n }\n else if (retryAfter.match(/ GMT, ((\\d+)|(\\d+\\.\\d+))$/)) {\n retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\\d.]+)$/)?.[1]);\n }\n else if (retryAfter.match(/^((\\d+)|(\\d+\\.\\d+))$/)) {\n retryAfterSeconds = Number(retryAfter);\n }\n else if (Date.parse(retryAfter) >= Date.now()) {\n retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1000;\n }\n if (isNaN(retryAfterSeconds)) {\n return;\n }\n return new Date(Date.now() + retryAfterSeconds * 1000);\n }\n else if (h === \"x-amz-retry-after\") {\n const v = response.headers[header];\n const backoffMilliseconds = Number(v);\n if (isNaN(backoffMilliseconds)) {\n logger?.trace?.(`Failed to parse x-amz-retry-after=${v}`);\n return;\n }\n return new Date(Date.now() + backoffMilliseconds);\n }\n }\n}\nexport function getRetryAfterHint(response, logger) {\n return parseRetryAfterHeader(response, logger);\n}\n", "export const asSdkError = (error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n};\n", "import { NoOpLogger } from \"@smithy/core/client\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nimport { v4 } from \"@smithy/core/serde\";\nimport { isServerError, isThrottlingError, isTransientError, } from \"../service-error-classification/service-error-classification\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"../util-retry/constants\";\nimport { parseRetryAfterHeader } from \"./parseRetryAfterHeader\";\nimport { asSdkError } from \"./util\";\nexport function bindRetryMiddleware(isStreamingPayload) {\n return (options) => (next, context) => async (args) => {\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken((context[\"partition_id\"] ?? \"\") + (context.__retryLongPoll ? \":longpoll\" : \"\"));\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n }\n catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e, options.logger);\n lastError = asSdkError(e);\n if (isRequest && isStreamingPayload(request)) {\n (context.logger instanceof NoOpLogger ? console : context.logger)?.warn(\"An error was encountered in a non-retryable streaming request.\");\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n }\n catch (ignoredRefreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay;\n if (delay > 0) {\n await cooldown(delay);\n }\n }\n }\n }\n else {\n retryStrategy = retryStrategy;\n if (retryStrategy?.mode) {\n context.userAgent = [...(context.userAgent || []), [\"cfg/retry-mode\", retryStrategy.mode]];\n }\n return retryStrategy.retry(next, args);\n }\n };\n}\nconst cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\nconst isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" &&\n typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" &&\n typeof retryStrategy.recordSuccess !== \"undefined\";\nconst getRetryErrorInfo = (error, logger) => {\n const errorInfo = {\n error,\n errorType: getRetryErrorType(error),\n };\n const retryAfterHint = parseRetryAfterHeader(error.$response, logger);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n};\nconst getRetryErrorType = (error) => {\n if (isThrottlingError(error))\n return \"THROTTLING\";\n if (isTransientError(error))\n return \"TRANSIENT\";\n if (isServerError(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n};\nexport const retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true,\n};\nexport function bindGetRetryPlugin(isStreamingPayload) {\n const retryMiddleware = bindRetryMiddleware(isStreamingPayload);\n return (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n },\n });\n}\n", "import { isThrottlingError } from \"../service-error-classification/service-error-classification\";\nexport class DefaultRateLimiter {\n static setTimeoutFn = (fn, delay) => setTimeout(fn, delay);\n beta;\n minCapacity;\n minFillRate;\n scaleConstant;\n smooth;\n enabled = false;\n availableTokens = 0;\n lastMaxRate = 0;\n measuredTxRate = 0;\n requestCount = 0;\n fillRate;\n lastThrottleTime;\n lastTimestamp = 0;\n lastTxRateBucket;\n maxCapacity;\n timeWindow = 0;\n constructor(options) {\n this.beta = options?.beta ?? 0.7;\n this.minCapacity = options?.minCapacity ?? 1;\n this.minFillRate = options?.minFillRate ?? 0.5;\n this.scaleConstant = options?.scaleConstant ?? 0.4;\n this.smooth = options?.smooth ?? 0.8;\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n const retryErrorInfo = response;\n const isThrottling = retryErrorInfo?.errorType === \"THROTTLING\" || isThrottlingError(retryErrorInfo?.error ?? response);\n if (isThrottling) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n }\n else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1000;\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n while (amount > this.availableTokens) {\n const delay = ((amount - this.availableTokens) / this.fillRate) * 1000;\n await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));\n this.refillTokenBucket();\n }\n this.availableTokens = this.availableTokens - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount);\n this.lastTimestamp = timestamp;\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.availableTokens = Math.min(this.availableTokens, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n}\n", "export class Retry {\n static v2026 = typeof process !== \"undefined\" && process.env?.SMITHY_NEW_RETRIES_2026 === \"true\";\n static delay() {\n return Retry.v2026 ? 50 : 100;\n }\n static throttlingDelay() {\n return Retry.v2026 ? 1_000 : 500;\n }\n static cost() {\n return Retry.v2026 ? 14 : 5;\n }\n static throttlingCost() {\n return Retry.v2026 ? 5 : 10;\n }\n static modifiedCostType() {\n return Retry.v2026 ? \"THROTTLING\" : \"TRANSIENT\";\n }\n}\n", "import { MAXIMUM_RETRY_DELAY } from \"./constants\";\nimport { Retry } from \"./retries-2026-config\";\nexport class DefaultRetryBackoffStrategy {\n x = Retry.delay();\n computeNextBackoffDelay(i) {\n const b = Math.random();\n const r = 2;\n const t_i = b * Math.min(this.x * r ** i, MAXIMUM_RETRY_DELAY);\n return Math.floor(t_i);\n }\n setDelayBase(delay) {\n this.x = delay;\n }\n}\n", "import { MAXIMUM_RETRY_DELAY } from \"./constants\";\nexport class DefaultRetryToken {\n delay;\n count;\n cost;\n longPoll;\n $retryLog = {\n acquisitionDelay: 0,\n };\n constructor(delay, count, cost, longPoll) {\n this.delay = delay;\n this.count = count;\n this.cost = cost;\n this.longPoll = longPoll;\n }\n getRetryCount() {\n return this.count;\n }\n getRetryDelay() {\n return Math.min(MAXIMUM_RETRY_DELAY, this.delay);\n }\n getRetryCost() {\n return this.cost;\n }\n isLongPoll() {\n return this.longPoll;\n }\n}\n", "export var RETRY_MODES;\n(function (RETRY_MODES) {\n RETRY_MODES[\"STANDARD\"] = \"standard\";\n RETRY_MODES[\"ADAPTIVE\"] = \"adaptive\";\n})(RETRY_MODES || (RETRY_MODES = {}));\nexport const DEFAULT_MAX_ATTEMPTS = 3;\nexport const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;\n", "import { DefaultRetryBackoffStrategy } from \"./DefaultRetryBackoffStrategy\";\nimport { DefaultRetryToken } from \"./DefaultRetryToken\";\nimport { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from \"./config\";\nimport { INITIAL_RETRY_TOKENS, NO_RETRY_INCREMENT } from \"./constants\";\nimport { Retry } from \"./retries-2026-config\";\nconst refusal = {\n incompatible: 1,\n attempts: 2,\n capacity: 3,\n};\nexport class StandardRetryStrategy {\n mode = RETRY_MODES.STANDARD;\n retryBackoffStrategy;\n capacity = INITIAL_RETRY_TOKENS;\n maxAttemptsProvider;\n baseDelay;\n constructor(arg1) {\n if (typeof arg1 === \"number\") {\n this.maxAttemptsProvider = async () => arg1;\n }\n else if (typeof arg1 === \"function\") {\n this.maxAttemptsProvider = arg1;\n }\n else if (arg1 && typeof arg1 === \"object\") {\n this.maxAttemptsProvider = async () => arg1.maxAttempts;\n this.baseDelay = arg1.baseDelay;\n this.retryBackoffStrategy = arg1.backoff;\n }\n this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS;\n this.baseDelay ??= Retry.delay();\n this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy();\n }\n async acquireInitialRetryToken(retryTokenScope) {\n return new DefaultRetryToken(Retry.delay(), 0, undefined, Retry.v2026 && retryTokenScope.includes(\":longpoll\"));\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n const retryCode = this.retryCode(token, errorInfo, maxAttempts);\n const shouldRetry = retryCode === 0;\n const isLongPoll = token.isLongPoll?.();\n if (shouldRetry || isLongPoll) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(errorType === \"THROTTLING\" ? Retry.throttlingDelay() : this.baseDelay);\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n let retryDelay = delayFromErrorType;\n if (errorInfo.retryAfterHint instanceof Date) {\n retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5_000));\n }\n if (!shouldRetry) {\n const longPollBackoff = Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0;\n if (longPollBackoff > 0) {\n await new Promise((r) => setTimeout(r, longPollBackoff));\n }\n }\n else {\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n const nextToken = new DefaultRetryToken(0, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);\n await new Promise((r) => setTimeout(r, retryDelay));\n nextToken.$retryLog.acquisitionDelay = retryDelay;\n return nextToken;\n }\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n getCapacity() {\n return this.capacity;\n }\n async maxAttempts() {\n return this.maxAttemptsProvider();\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n }\n catch (ignored) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n retryCode(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible;\n const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts;\n const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity;\n return retryableStatus || attemptStatus || capacityStatus;\n }\n getCapacityCost(errorType) {\n return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost();\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n}\n", "import { DefaultRateLimiter } from \"./DefaultRateLimiter\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nimport { RETRY_MODES } from \"./config\";\nexport class AdaptiveRetryStrategy {\n mode = RETRY_MODES.ADAPTIVE;\n rateLimiter;\n standardRetryStrategy;\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = options\n ? new StandardRetryStrategy({\n maxAttempts: typeof maxAttemptsProvider === \"number\" ? maxAttemptsProvider : 3,\n ...options,\n })\n : new StandardRetryStrategy(maxAttemptsProvider);\n }\n async acquireInitialRetryToken(retryTokenScope) {\n const token = await this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n await this.rateLimiter.getSendToken();\n return token;\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n const token = await this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n await this.rateLimiter.getSendToken();\n return token;\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n async maxAttemptsProvider() {\n return this.standardRetryStrategy.maxAttempts();\n }\n}\n", "import { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nimport { Retry } from \"./retries-2026-config\";\nexport class ConfiguredRetryStrategy extends StandardRetryStrategy {\n computeNextBackoffDelay;\n constructor(maxAttempts, computeNextBackoffDelay = Retry.delay()) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n }\n else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n this.retryBackoffStrategy.computeNextBackoffDelay = (completedAttempt) => {\n const nextAttempt = completedAttempt + 1;\n return this.computeNextBackoffDelay(nextAttempt);\n };\n }\n}\n", "import { NO_RETRY_INCREMENT, RETRY_COST, TIMEOUT_RETRY_COST } from \"../../util-retry/constants\";\nexport const getDefaultRetryQuota = (initialRetryTokens, options) => {\n const MAX_CAPACITY = initialRetryTokens;\n const noRetryIncrement = options?.noRetryIncrement ?? NO_RETRY_INCREMENT;\n const retryCost = options?.retryCost ?? RETRY_COST;\n const timeoutRetryCost = options?.timeoutRetryCost ?? TIMEOUT_RETRY_COST;\n let availableCapacity = initialRetryTokens;\n const getCapacityAmount = (error) => (error.name === \"TimeoutError\" ? timeoutRetryCost : retryCost);\n const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity;\n const retrieveRetryTokens = (error) => {\n if (!hasRetryTokens(error)) {\n throw new Error(\"No retry token available\");\n }\n const capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n };\n const releaseRetryTokens = (capacityReleaseAmount) => {\n availableCapacity += capacityReleaseAmount ?? noRetryIncrement;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n };\n return Object.freeze({\n hasRetryTokens,\n retrieveRetryTokens,\n releaseRetryTokens,\n });\n};\n", "import { MAXIMUM_RETRY_DELAY } from \"../../util-retry/constants\";\nexport const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n", "import { isClockSkewError, isRetryableByTrait, isThrottlingError, isTransientError, } from \"../../service-error-classification/service-error-classification\";\nexport const defaultRetryDecider = (error) => {\n if (!error) {\n return false;\n }\n return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error);\n};\n", "import { HttpRequest, HttpResponse } from \"@smithy/core/protocols\";\nimport { v4 } from \"@smithy/core/serde\";\nimport { isThrottlingError } from \"../../service-error-classification/service-error-classification\";\nimport { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from \"../../util-retry/config\";\nimport { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, INVOCATION_ID_HEADER, REQUEST_HEADER, THROTTLING_RETRY_DELAY_BASE, } from \"../../util-retry/constants\";\nimport { asSdkError } from \"../util\";\nimport { getDefaultRetryQuota } from \"./defaultRetryQuota\";\nimport { defaultDelayDecider } from \"./delayDecider\";\nimport { defaultRetryDecider } from \"./retryDecider\";\nexport class StandardRetryStrategy {\n maxAttemptsProvider;\n retryDecider;\n delayDecider;\n retryQuota;\n mode = RETRY_MODES.STANDARD;\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.retryDecider = options?.retryDecider ?? defaultRetryDecider;\n this.delayDecider = options?.delayDecider ?? defaultDelayDecider;\n this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS);\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n }\n catch (ignored) {\n maxAttempts = DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (HttpRequest.isInstance(request)) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options?.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options?.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n }\n catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts);\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n}\nconst getDelayFromRetryAfterHeader = (response) => {\n if (!HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return Math.min(retryAfterSeconds * 1000, 20_000);\n const retryAfterDate = new Date(retryAfter);\n return Math.min(retryAfterDate.getTime() - Date.now(), 20_000);\n};\n", "import { DefaultRateLimiter } from \"../../util-retry/DefaultRateLimiter\";\nimport { RETRY_MODES } from \"../../util-retry/config\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class AdaptiveRetryStrategy extends StandardRetryStrategy {\n rateLimiter;\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.mode = RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n },\n });\n }\n}\n", "import { normalizeProvider } from \"@smithy/core/client\";\nimport { AdaptiveRetryStrategy } from \"../util-retry/AdaptiveRetryStrategy\";\nimport { StandardRetryStrategy } from \"../util-retry/StandardRetryStrategy\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, RETRY_MODES } from \"../util-retry/config\";\nimport { Retry } from \"../util-retry/retries-2026-config\";\nexport const ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nexport const CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nexport const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: DEFAULT_MAX_ATTEMPTS,\n};\nexport const resolveRetryConfig = (input, defaults) => {\n const { retryStrategy, retryMode } = input;\n const { defaultMaxAttempts = DEFAULT_MAX_ATTEMPTS, defaultBaseDelay = Retry.delay() } = defaults ?? {};\n const maxAttemptsProvider = normalizeProvider(input.maxAttempts ?? defaultMaxAttempts);\n let controller = retryStrategy\n ? Promise.resolve(retryStrategy)\n : undefined;\n const getDefault = async () => {\n const maxAttempts = await maxAttemptsProvider();\n const adaptive = (await normalizeProvider(retryMode)()) === RETRY_MODES.ADAPTIVE;\n if (adaptive) {\n return new AdaptiveRetryStrategy(maxAttemptsProvider, {\n maxAttempts,\n baseDelay: defaultBaseDelay,\n });\n }\n return new StandardRetryStrategy({\n maxAttempts,\n baseDelay: defaultBaseDelay,\n });\n };\n return Object.assign(input, {\n maxAttempts: maxAttemptsProvider,\n retryStrategy: () => (controller ??= getDefault()),\n });\n};\nexport const ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nexport const CONFIG_RETRY_MODE = \"retry_mode\";\nexport const NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: DEFAULT_RETRY_MODE,\n};\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"../util-retry/constants\";\nexport const omitRetryHeadersMiddleware = () => (next) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n delete request.headers[INVOCATION_ID_HEADER];\n delete request.headers[REQUEST_HEADER];\n }\n return next(args);\n};\nexport const omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n};\nexport const getOmitRetryHeadersPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n },\n});\n", "import { isStreamingPayload } from \"./middleware-retry/isStreamingPayload/isStreamingPayload\";\nimport { bindGetRetryPlugin, bindRetryMiddleware } from \"./middleware-retry/retryMiddleware\";\nexport { isRetryableByTrait, isClockSkewError, isClockSkewCorrectedError, isBrowserNetworkError, isThrottlingError, isTransientError, isServerError, isNodeJsHttp2TransientError, } from \"./service-error-classification/service-error-classification\";\nexport { AdaptiveRetryStrategy } from \"./util-retry/AdaptiveRetryStrategy\";\nexport { ConfiguredRetryStrategy } from \"./util-retry/ConfiguredRetryStrategy\";\nexport { DefaultRateLimiter } from \"./util-retry/DefaultRateLimiter\";\nexport { StandardRetryStrategy } from \"./util-retry/StandardRetryStrategy\";\nexport { RETRY_MODES, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from \"./util-retry/config\";\nexport { DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY, THROTTLING_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, RETRY_COST, TIMEOUT_RETRY_COST, NO_RETRY_INCREMENT, INVOCATION_ID_HEADER, REQUEST_HEADER, } from \"./util-retry/constants\";\nexport { Retry } from \"./util-retry/retries-2026-config\";\nexport { AdaptiveRetryStrategy as DeprecatedAdaptiveRetryStrategy, } from \"./middleware-retry/retry-pre-sra-deprecated/AdaptiveRetryStrategy\";\nexport { StandardRetryStrategy as DeprecatedStandardRetryStrategy, } from \"./middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy\";\nexport { defaultDelayDecider } from \"./middleware-retry/retry-pre-sra-deprecated/delayDecider\";\nexport { defaultRetryDecider } from \"./middleware-retry/retry-pre-sra-deprecated/retryDecider\";\nexport { ENV_MAX_ATTEMPTS, CONFIG_MAX_ATTEMPTS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, ENV_RETRY_MODE, CONFIG_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, resolveRetryConfig, } from \"./middleware-retry/configurations\";\nexport { omitRetryHeadersMiddleware, omitRetryHeadersMiddlewareOptions, getOmitRetryHeadersPlugin, } from \"./middleware-retry/omitRetryHeadersMiddleware\";\nexport { retryMiddlewareOptions } from \"./middleware-retry/retryMiddleware\";\nexport { getRetryAfterHint } from \"./middleware-retry/parseRetryAfterHeader\";\nexport const retryMiddleware = bindRetryMiddleware(isStreamingPayload);\nexport const getRetryPlugin = bindGetRetryPlugin(isStreamingPayload);\n", "import { Retry } from \"@smithy/core/retry\";\nRetry.v2026 ||= typeof process === \"object\" && process.env?.AWS_NEW_RETRIES_2026 === \"true\";\nexport function setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {},\n };\n }\n else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n", "export function setTokenFeature(token, feature, value) {\n if (!token.$source) {\n token.$source = {};\n }\n token.$source[feature] = value;\n return token;\n}\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nexport function resolveHostHeaderConfig(input) {\n return input;\n}\nexport const hostHeaderMiddleware = (options) => (next) => async (args) => {\n if (!HttpRequest.isInstance(args.request))\n return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n }\n else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null)\n host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n};\nexport const hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true,\n};\nexport const getHostHeaderPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n },\n});\n", "export const loggerMiddleware = () => (next, context) => async (args) => {\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n logger?.info?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata,\n });\n return response;\n }\n catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n logger?.error?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata,\n });\n throw error;\n }\n};\nexport const loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true,\n};\nexport const getLoggerPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n },\n});\n", "export const recursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\", \"TRACE_CONTEXT_PROPAGATION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\",\n};\n", "const PROTECTED_KEYS = {\n REQUEST_ID: Symbol.for(\"_AWS_LAMBDA_REQUEST_ID\"),\n X_RAY_TRACE_ID: Symbol.for(\"_AWS_LAMBDA_X_RAY_TRACE_ID\"),\n TENANT_ID: Symbol.for(\"_AWS_LAMBDA_TENANT_ID\"),\n TRACEPARENT: Symbol.for(\"_AWS_LAMBDA_TRACEPARENT\"),\n TRACESTATE: Symbol.for(\"_AWS_LAMBDA_TRACESTATE\"),\n BAGGAGE: Symbol.for(\"_AWS_LAMBDA_BAGGAGE\"),\n};\nconst NO_GLOBAL_AWS_LAMBDA = [\"true\", \"1\"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? \"\");\nif (!NO_GLOBAL_AWS_LAMBDA) {\n globalThis.awslambda = globalThis.awslambda || {};\n}\nclass InvokeStoreBase {\n static PROTECTED_KEYS = PROTECTED_KEYS;\n isProtectedKey(key) {\n return Object.values(PROTECTED_KEYS).includes(key);\n }\n getRequestId() {\n return this.get(PROTECTED_KEYS.REQUEST_ID) ?? \"-\";\n }\n getXRayTraceId() {\n return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID);\n }\n getTenantId() {\n return this.get(PROTECTED_KEYS.TENANT_ID);\n }\n getTraceparent() {\n return this.get(PROTECTED_KEYS.TRACEPARENT);\n }\n getTracestate() {\n return this.get(PROTECTED_KEYS.TRACESTATE);\n }\n getBaggage() {\n return this.get(PROTECTED_KEYS.BAGGAGE);\n }\n}\nclass InvokeStoreSingle extends InvokeStoreBase {\n currentContext;\n getContext() {\n return this.currentContext;\n }\n hasContext() {\n return this.currentContext !== undefined;\n }\n get(key) {\n return this.currentContext?.[key];\n }\n set(key, value) {\n if (this.isProtectedKey(key)) {\n throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);\n }\n this.currentContext = this.currentContext || {};\n this.currentContext[key] = value;\n }\n run(context, fn) {\n this.currentContext = context;\n return fn();\n }\n}\nclass InvokeStoreMulti extends InvokeStoreBase {\n als;\n static async create() {\n const instance = new InvokeStoreMulti();\n const asyncHooks = await import('node:async_hooks');\n instance.als = new asyncHooks.AsyncLocalStorage();\n return instance;\n }\n getContext() {\n return this.als.getStore();\n }\n hasContext() {\n return this.als.getStore() !== undefined;\n }\n get(key) {\n return this.als.getStore()?.[key];\n }\n set(key, value) {\n if (this.isProtectedKey(key)) {\n throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);\n }\n const store = this.als.getStore();\n if (!store) {\n throw new Error(\"No context available\");\n }\n store[key] = value;\n }\n run(context, fn) {\n return this.als.run(context, fn);\n }\n}\nvar InvokeStore;\n(function (InvokeStore) {\n let instance = null;\n async function getInstanceAsync(forceInvokeStoreMulti) {\n if (!instance) {\n instance = (async () => {\n const isMulti = forceInvokeStoreMulti === true || \"AWS_LAMBDA_MAX_CONCURRENCY\" in process.env;\n const newInstance = isMulti\n ? await InvokeStoreMulti.create()\n : new InvokeStoreSingle();\n if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) {\n return globalThis.awslambda.InvokeStore;\n }\n else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) {\n globalThis.awslambda.InvokeStore = newInstance;\n return newInstance;\n }\n else {\n return newInstance;\n }\n })();\n }\n return instance;\n }\n InvokeStore.getInstanceAsync = getInstanceAsync;\n InvokeStore._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === \"1\"\n ? {\n reset: () => {\n instance = null;\n if (globalThis.awslambda?.InvokeStore) {\n delete globalThis.awslambda.InvokeStore;\n }\n globalThis.awslambda = { InvokeStore: undefined };\n },\n }\n : undefined;\n})(InvokeStore || (InvokeStore = {}));\n\nexport { InvokeStore, InvokeStoreBase };\n", "import { InvokeStore } from \"@aws/lambda-invoke-store\";\nimport { HttpRequest } from \"@smithy/core/protocols\";\nconst AWS_LAMBDA_FUNCTION_NAME = \"AWS_LAMBDA_FUNCTION_NAME\";\nconst _X_AMZN_TRACE_ID = \"_X_AMZN_TRACE_ID\";\nconst X_AMZN_TRACE_ID = \"X-Amzn-Trace-Id\";\nconst TRACEPARENT = \"traceparent\";\nconst TRACESTATE = \"tracestate\";\nconst BAGGAGE = \"baggage\";\nexport const recursionDetectionMiddleware = () => (next) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n return next(args);\n }\n let invokeStore;\n {\n const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === X_AMZN_TRACE_ID.toLowerCase()) ??\n X_AMZN_TRACE_ID;\n if (!request.headers.hasOwnProperty(traceIdHeader)) {\n const functionName = process.env[AWS_LAMBDA_FUNCTION_NAME];\n const traceIdFromEnv = process.env[_X_AMZN_TRACE_ID];\n invokeStore ??= await InvokeStore.getInstanceAsync();\n const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();\n const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;\n const nonEmptyString = (str) => typeof str === \"string\" && str.length > 0;\n if (nonEmptyString(functionName) && nonEmptyString(traceId)) {\n request.headers[X_AMZN_TRACE_ID] = traceId;\n }\n }\n }\n {\n sanitizeTraceHeaders(request.headers);\n const existingTraceparent = request.headers[TRACEPARENT];\n if (!existingTraceparent) {\n const traceparent = (invokeStore ??= await InvokeStore.getInstanceAsync())?.getTraceparent?.();\n if (traceparent) {\n request.headers[TRACEPARENT] = traceparent;\n const tracestate = invokeStore?.getTracestate?.();\n if (tracestate) {\n request.headers[TRACESTATE] = tracestate;\n }\n const baggage = invokeStore?.getBaggage?.();\n if (baggage) {\n request.headers[BAGGAGE] = baggage;\n }\n }\n }\n }\n return next(args);\n};\nfunction sanitizeTraceHeaders(headers) {\n for (const header of Object.keys(headers)) {\n const lower = header.toLowerCase();\n if (header !== lower && (lower === TRACEPARENT || lower === TRACESTATE || lower === BAGGAGE)) {\n headers[lower] = headers[header];\n delete headers[header];\n }\n }\n}\n", "import { recursionDetectionMiddlewareOptions } from \"./configuration\";\nimport { recursionDetectionMiddleware } from \"./recursionDetectionMiddleware\";\nexport const getRecursionDetectionPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);\n },\n});\n", "export const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {\n if (!authSchemePreference || authSchemePreference.length === 0) {\n return candidateAuthOptions;\n }\n const preferredAuthOptions = [];\n for (const preferredSchemeName of authSchemePreference) {\n for (const candidateAuthOption of candidateAuthOptions) {\n const candidateAuthSchemeName = candidateAuthOption.schemeId.split(\"#\")[1];\n if (candidateAuthSchemeName === preferredSchemeName) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n }\n for (const candidateAuthOption of candidateAuthOptions) {\n if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n return preferredAuthOptions;\n};\n", "import { getSmithyContext } from \"@smithy/core/transport\";\nimport { resolveAuthOptions } from \"./resolveAuthOptions\";\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\nexport const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {\n const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));\n const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];\n const resolvedOptions = resolveAuthOptions(options, authSchemePreference);\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = getSmithyContext(context);\n const failureReasons = [];\n for (const option of resolvedOptions) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer,\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n};\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\",\n};\nexport const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);\n },\n});\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"serializerMiddleware\",\n};\nexport const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeMiddlewareOptions);\n },\n});\n", "export { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport { getHttpAuthSchemeEndpointRuleSetPlugin, httpAuthSchemeEndpointRuleSetMiddlewareOptions, } from \"./getHttpAuthSchemeEndpointRuleSetPlugin\";\nexport { getHttpAuthSchemePlugin, httpAuthSchemeMiddlewareOptions } from \"./getHttpAuthSchemePlugin\";\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nimport { getSmithyContext } from \"@smithy/core/transport\";\nconst defaultErrorHandler = (signingProperties) => (error) => {\n throw error;\n};\nconst defaultSuccessHandler = (httpResponse, signingProperties) => { };\nexport const httpSigningMiddleware = (config) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = getSmithyContext(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties),\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n};\n", "import { httpSigningMiddleware } from \"./httpSigningMiddleware\";\nexport const httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: \"retryMiddleware\",\n};\nexport const getHttpSigningPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n },\n});\n", "export { httpSigningMiddleware } from \"./httpSigningMiddleware\";\nexport { getHttpSigningPlugin, httpSigningMiddlewareOptions } from \"./getHttpSigningMiddleware\";\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "const makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {\n let command = new CommandCtor(input);\n command = withCommand(command) ?? command;\n return await client.send(command, ...args);\n};\nexport function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return async function* paginateOperation(config, input, ...additionalArguments) {\n const _input = input;\n let token = config.startingToken ?? _input[inputTokenName];\n let hasNext = true;\n let page;\n while (hasNext) {\n _input[inputTokenName] = token;\n if (pageSizeTokenName) {\n _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);\n }\n else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return undefined;\n };\n}\nconst get = (fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return undefined;\n }\n cursor = cursor[step];\n }\n return cursor;\n};\n", "export function setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = {\n features: {},\n };\n }\n else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\n", "export class DefaultIdentityProviderConfig {\n authSchemes = new Map();\n constructor(config) {\n for (const key in config) {\n const value = config[key];\n if (value !== undefined) {\n this.authSchemes.set(key, value);\n }\n }\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n}\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nimport { HttpApiKeyAuthLocation, } from \"@smithy/types\";\nexport class HttpApiKeyAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\");\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n }\n else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme\n ? `${signingProperties.scheme} ${identity.apiKey}`\n : identity.apiKey;\n }\n else {\n throw new Error(\"request can only be signed with `apiKey` locations `query` or `header`, \" +\n \"but found: `\" +\n signingProperties.in +\n \"`\");\n }\n return clonedRequest;\n }\n}\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nexport class HttpBearerAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n}\n", "export class NoAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n}\n", "export { HttpApiKeyAuthSigner } from \"./httpApiKeyAuth\";\nexport { HttpBearerAuthSigner } from \"./httpBearerAuth\";\nexport { NoAuthSigner } from \"./noAuth\";\n", "export const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) {\n return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;\n};\nexport const EXPIRATION_MS = 300_000;\nexport const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nexport const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined;\nexport const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {\n if (provider === undefined) {\n return undefined;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n};\n", "export { DefaultIdentityProviderConfig } from \"./DefaultIdentityProviderConfig\";\nexport { HttpApiKeyAuthSigner, HttpBearerAuthSigner, NoAuthSigner } from \"./httpAuthSchemes\";\nexport { EXPIRATION_MS, createIsIdentityExpiredFunction, doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, } from \"./memoizeIdentityProvider\";\n", "export { getSmithyContext } from \"@smithy/core/transport\";\nexport { getHttpAuthSchemeEndpointRuleSetPlugin, getHttpAuthSchemePlugin, httpAuthSchemeEndpointRuleSetMiddlewareOptions, httpAuthSchemeMiddleware, httpAuthSchemeMiddlewareOptions, } from \"./legacy-root-exports/middleware-http-auth-scheme\";\nexport { getHttpSigningPlugin, httpSigningMiddleware, httpSigningMiddlewareOptions, } from \"./legacy-root-exports/middleware-http-signing\";\nexport { normalizeProvider } from \"./normalizeProvider\";\nexport { createPaginator } from \"./legacy-root-exports/pagination/createPaginator\";\nexport { requestBuilder } from \"@smithy/core/protocols\";\nexport { setFeature } from \"./setFeature\";\nexport { DefaultIdentityProviderConfig, EXPIRATION_MS, HttpApiKeyAuthSigner, HttpBearerAuthSigner, NoAuthSigner, createIsIdentityExpiredFunction, doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, } from \"./legacy-root-exports/util-identity-and-auth\";\n", "import { normalizeProvider } from \"@smithy/core\";\nexport const DEFAULT_UA_APP_ID = undefined;\nfunction isValidUserAgentAppId(appId) {\n if (appId === undefined) {\n return true;\n }\n return typeof appId === \"string\" && appId.length <= 50;\n}\nexport function resolveUserAgentConfig(input) {\n const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);\n const { customUserAgent } = input;\n return Object.assign(input, {\n customUserAgent: typeof customUserAgent === \"string\" ? [[customUserAgent]] : customUserAgent,\n userAgentAppId: async () => {\n const appId = await normalizedAppIdProvider();\n if (!isValidUserAgentAppId(appId)) {\n const logger = input.logger?.constructor?.name === \"NoOpLogger\" || !input.logger ? console : input.logger;\n if (typeof appId !== \"string\") {\n logger?.warn(\"userAgentAppId must be a string or undefined.\");\n }\n else if (appId.length > 50) {\n logger?.warn(\"The provided userAgentAppId exceeds the maximum length of 50 characters.\");\n }\n }\n return appId;\n },\n });\n}\n", "export const partitionsInfo = {\n \"partitions\": [\n {\n \"id\": \"aws\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-east-1\",\n \"name\": \"aws\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"af-south-1\": {\n \"description\": \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n \"description\": \"Asia Pacific (Hong Kong)\"\n },\n \"ap-east-2\": {\n \"description\": \"Asia Pacific (Taipei)\"\n },\n \"ap-northeast-1\": {\n \"description\": \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n \"description\": \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n \"description\": \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n \"description\": \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n \"description\": \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n \"description\": \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n \"description\": \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n \"description\": \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n \"description\": \"Asia Pacific (Melbourne)\"\n },\n \"ap-southeast-5\": {\n \"description\": \"Asia Pacific (Malaysia)\"\n },\n \"ap-southeast-6\": {\n \"description\": \"Asia Pacific (New Zealand)\"\n },\n \"ap-southeast-7\": {\n \"description\": \"Asia Pacific (Thailand)\"\n },\n \"aws-global\": {\n \"description\": \"aws global region\"\n },\n \"ca-central-1\": {\n \"description\": \"Canada (Central)\"\n },\n \"ca-west-1\": {\n \"description\": \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n \"description\": \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n \"description\": \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n \"description\": \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n \"description\": \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n \"description\": \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n \"description\": \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n \"description\": \"Europe (London)\"\n },\n \"eu-west-3\": {\n \"description\": \"Europe (Paris)\"\n },\n \"il-central-1\": {\n \"description\": \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n \"description\": \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n \"description\": \"Middle East (Bahrain)\"\n },\n \"mx-central-1\": {\n \"description\": \"Mexico (Central)\"\n },\n \"sa-east-1\": {\n \"description\": \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n \"description\": \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n \"description\": \"US East (Ohio)\"\n },\n \"us-west-1\": {\n \"description\": \"US West (N. California)\"\n },\n \"us-west-2\": {\n \"description\": \"US West (Oregon)\"\n }\n }\n },\n {\n \"id\": \"aws-cn\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com.cn\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.com.cn\",\n \"implicitGlobalRegion\": \"cn-northwest-1\",\n \"name\": \"aws-cn\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-cn-global\": {\n \"description\": \"aws-cn global region\"\n },\n \"cn-north-1\": {\n \"description\": \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n \"description\": \"China (Ningxia)\"\n }\n }\n },\n {\n \"id\": \"aws-eusc\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.eu\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.eu\",\n \"implicitGlobalRegion\": \"eusc-de-east-1\",\n \"name\": \"aws-eusc\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"eusc-de-east-1\": {\n \"description\": \"AWS European Sovereign Cloud (Germany)\"\n }\n }\n },\n {\n \"id\": \"aws-iso\",\n \"outputs\": {\n \"dnsSuffix\": \"c2s.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.ic.gov\",\n \"implicitGlobalRegion\": \"us-iso-east-1\",\n \"name\": \"aws-iso\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-global\": {\n \"description\": \"aws-iso global region\"\n },\n \"us-iso-east-1\": {\n \"description\": \"US ISO East\"\n },\n \"us-iso-west-1\": {\n \"description\": \"US ISO WEST\"\n }\n }\n },\n {\n \"id\": \"aws-iso-b\",\n \"outputs\": {\n \"dnsSuffix\": \"sc2s.sgov.gov\",\n \"dualStackDnsSuffix\": \"api.aws.scloud\",\n \"implicitGlobalRegion\": \"us-isob-east-1\",\n \"name\": \"aws-iso-b\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-b-global\": {\n \"description\": \"aws-iso-b global region\"\n },\n \"us-isob-east-1\": {\n \"description\": \"US ISOB East (Ohio)\"\n },\n \"us-isob-west-1\": {\n \"description\": \"US ISOB West\"\n }\n }\n },\n {\n \"id\": \"aws-iso-e\",\n \"outputs\": {\n \"dnsSuffix\": \"cloud.adc-e.uk\",\n \"dualStackDnsSuffix\": \"api.cloud-aws.adc-e.uk\",\n \"implicitGlobalRegion\": \"eu-isoe-west-1\",\n \"name\": \"aws-iso-e\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-e-global\": {\n \"description\": \"aws-iso-e global region\"\n },\n \"eu-isoe-west-1\": {\n \"description\": \"EU ISOE West\"\n }\n }\n },\n {\n \"id\": \"aws-iso-f\",\n \"outputs\": {\n \"dnsSuffix\": \"csp.hci.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.hci.ic.gov\",\n \"implicitGlobalRegion\": \"us-isof-south-1\",\n \"name\": \"aws-iso-f\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-f-global\": {\n \"description\": \"aws-iso-f global region\"\n },\n \"us-isof-east-1\": {\n \"description\": \"US ISOF EAST\"\n },\n \"us-isof-south-1\": {\n \"description\": \"US ISOF SOUTH\"\n }\n }\n },\n {\n \"id\": \"aws-us-gov\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-gov-west-1\",\n \"name\": \"aws-us-gov\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-us-gov-global\": {\n \"description\": \"aws-us-gov global region\"\n },\n \"us-gov-east-1\": {\n \"description\": \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n \"description\": \"AWS GovCloud (US-West)\"\n }\n }\n }\n ],\n \"version\": \"1.1\"\n};\n", "import { partitionsInfo } from \"./partitions\";\nlet selectedPartitionsInfo = partitionsInfo;\nlet selectedUserAgentPrefix = \"\";\nexport const partition = (value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition of partitions) {\n const { regions, outputs } = partition;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData,\n };\n }\n }\n }\n for (const partition of partitions) {\n const { regionRegex, outputs } = partition;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs,\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition) => partition.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\"Provided region was not found in the partition array or regex,\" +\n \" and default partition with id 'aws' doesn't exist.\");\n }\n return {\n ...DEFAULT_PARTITION.outputs,\n };\n};\nexport const setPartitionInfo = (partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n};\nexport const useDefaultPartitionInfo = () => {\n setPartitionInfo(partitionsInfo, \"\");\n};\nexport const getUserAgentPrefix = () => selectedUserAgentPrefix;\n", "import { RETRY_MODES } from \"@smithy/core/retry\";\nimport { setFeature } from \"../setFeature\";\nconst ACCOUNT_ID_ENDPOINT_REGEX = /\\d{12}\\.ddb/;\nexport async function checkFeatures(context, config, args) {\n const request = args.request;\n if (request?.headers?.[\"smithy-protocol\"] === \"rpc-v2-cbor\") {\n setFeature(context, \"PROTOCOL_RPC_V2_CBOR\", \"M\");\n }\n if (typeof config.retryStrategy === \"function\") {\n const retryStrategy = await config.retryStrategy();\n if (typeof retryStrategy.mode === \"string\") {\n switch (retryStrategy.mode) {\n case RETRY_MODES.ADAPTIVE:\n setFeature(context, \"RETRY_MODE_ADAPTIVE\", \"F\");\n break;\n case RETRY_MODES.STANDARD:\n setFeature(context, \"RETRY_MODE_STANDARD\", \"E\");\n break;\n }\n }\n }\n if (typeof config.accountIdEndpointMode === \"function\") {\n const endpointV2 = context.endpointV2;\n if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {\n setFeature(context, \"ACCOUNT_ID_ENDPOINT\", \"O\");\n }\n switch (await config.accountIdEndpointMode?.()) {\n case \"disabled\":\n setFeature(context, \"ACCOUNT_ID_MODE_DISABLED\", \"Q\");\n break;\n case \"preferred\":\n setFeature(context, \"ACCOUNT_ID_MODE_PREFERRED\", \"P\");\n break;\n case \"required\":\n setFeature(context, \"ACCOUNT_ID_MODE_REQUIRED\", \"R\");\n break;\n }\n }\n const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;\n if (identity?.$source) {\n const credentials = identity;\n if (credentials.accountId) {\n setFeature(context, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n for (const [key, value] of Object.entries(credentials.$source ?? {})) {\n setFeature(context, key, value);\n }\n }\n}\n", "export const USER_AGENT = \"user-agent\";\nexport const X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nexport const SPACE = \" \";\nexport const UA_NAME_SEPARATOR = \"/\";\nexport const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w]/g;\nexport const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w#]/g;\nexport const UA_ESCAPE_CHAR = \"-\";\n", "const BYTE_LIMIT = 1024;\nexport function encodeFeatures(features) {\n let buffer = \"\";\n for (const key in features) {\n const val = features[key];\n if (buffer.length + val.length + 1 <= BYTE_LIMIT) {\n if (buffer.length) {\n buffer += \",\" + val;\n }\n else {\n buffer += val;\n }\n continue;\n }\n break;\n }\n return buffer;\n}\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nimport { getUserAgentPrefix } from \"../util-endpoints/lib/aws/partition\";\nimport { checkFeatures } from \"./check-features\";\nimport { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from \"./constants\";\nimport { encodeFeatures } from \"./encode-features\";\nexport const userAgentMiddleware = (options) => (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n return next(args);\n }\n const { headers } = request;\n const userAgent = context?.userAgent?.map(escapeUserAgent) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n await checkFeatures(context, options, args);\n const awsContext = context;\n defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);\n const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];\n const appId = await options.userAgentAppId();\n if (appId) {\n defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));\n }\n const prefix = getUserAgentPrefix();\n const sdkUserAgentValue = (prefix ? [prefix] : [])\n .concat([...defaultUserAgent, ...userAgent, ...customUserAgent])\n .join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent,\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT]\n ? `${headers[USER_AGENT]} ${normalUAValue}`\n : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n }\n else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request,\n });\n};\nconst escapeUserAgent = (userAgentPair) => {\n const name = userAgentPair[0]\n .split(UA_NAME_SEPARATOR)\n .map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR))\n .join(UA_NAME_SEPARATOR);\n const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version]\n .filter((item) => item && item.length > 0)\n .reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n};\nexport const getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true,\n};\nexport const getUserAgentPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n },\n});\n", "import { versions } from \"node:process\";\nexport const getRuntimeUserAgentPair = () => {\n const runtimesToCheck = [\"deno\", \"bun\", \"llrt\"];\n for (const runtime of runtimesToCheck) {\n if (versions[runtime]) {\n return [`md/${runtime}`, versions[runtime]];\n }\n }\n return [\"md/nodejs\", versions.node];\n};\n", "export const crtAvailability = {\n isCrtAvailable: false,\n};\n", "import { crtAvailability } from \"./crt-availability\";\nexport const isCrtAvailable = () => {\n if (crtAvailability.isCrtAvailable) {\n return [\"md/crt-avail\"];\n }\n return null;\n};\n", "import { platform, release } from \"node:os\";\nimport { env } from \"node:process\";\nimport { getRuntimeUserAgentPair } from \"./getRuntimeUserAgentPair\";\nimport { isCrtAvailable } from \"./is-crt-available\";\nexport { crtAvailability } from \"./crt-availability\";\nexport const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {\n const runtimeUserAgentPair = getRuntimeUserAgentPair();\n return async (config) => {\n const sections = [\n [\"aws-sdk-js\", clientVersion],\n [\"ua\", \"2.1\"],\n [`os/${platform()}`, release()],\n [\"lang/js\"],\n runtimeUserAgentPair,\n ];\n const crtAvailable = isCrtAvailable();\n if (crtAvailable) {\n sections.push(crtAvailable);\n }\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n if (env.AWS_EXECUTION_ENV) {\n sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]);\n }\n const appId = await config?.userAgentAppId?.();\n const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];\n return resolvedUserAgent;\n };\n};\nexport const defaultUserAgent = createDefaultUserAgentProvider;\n", "import { DEFAULT_UA_APP_ID } from \"../middleware-user-agent/configurations\";\nexport const UA_APP_ID_ENV_NAME = \"AWS_SDK_UA_APP_ID\";\nexport const UA_APP_ID_INI_NAME = \"sdk_ua_app_id\";\nconst UA_APP_ID_INI_NAME_DEPRECATED = \"sdk-ua-app-id\";\nexport const NODE_APP_ID_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME],\n configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],\n default: DEFAULT_UA_APP_ID,\n};\n", "!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.bowser=t():e.bowser=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=90)}({17:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||\"\"},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||\"\"},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case\"NT\":return\"NT\";case\"XP\":return\"XP\";case\"NT 5.0\":return\"2000\";case\"NT 5.1\":return\"XP\";case\"NT 5.2\":return\"2003\";case\"NT 6.0\":return\"Vista\";case\"NT 6.1\":return\"7\";case\"NT 6.2\":return\"8\";case\"NT 6.3\":return\"8.1\";case\"NT 10.0\":return\"10\";default:return}},e.getMacOSVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return\"Leopard\";case 6:return\"Snow Leopard\";case 7:return\"Lion\";case 8:return\"Mountain Lion\";case 9:return\"Mavericks\";case 10:return\"Yosemite\";case 11:return\"El Capitan\";case 12:return\"Sierra\";case 13:return\"High Sierra\";case 14:return\"Mojave\";case 15:return\"Catalina\";default:return}},e.getAndroidVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?\"Cupcake\":1===t[0]&&t[1]>=6?\"Donut\":2===t[0]&&t[1]<2?\"Eclair\":2===t[0]&&2===t[1]?\"Froyo\":2===t[0]&&t[1]>2?\"Gingerbread\":3===t[0]?\"Honeycomb\":4===t[0]&&t[1]<1?\"Ice Cream Sandwich\":4===t[0]&&t[1]<4?\"Jelly Bean\":4===t[0]&&t[1]>=4?\"KitKat\":5===t[0]?\"Lollipop\":6===t[0]?\"Marshmallow\":7===t[0]?\"Nougat\":8===t[0]?\"Oreo\":9===t[0]?\"Pie\":void 0},e.getVersionPrecision=function(e){return e.split(\".\").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(r),a=Math.max(i,s),o=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(\".0\");return e.map(n.split(\".\"),(function(e){return new Array(20-e.length).join(\"0\")+e})).reverse()}));for(n&&(o=a-Math.min(i,s)),a-=1;a>=o;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===o)return 0;a-=1}else if(u[0][a]1?i-1:0),a=1;a0){var a=Object.keys(r),u=o.default.find(a,(function(e){return t.isOS(e)}));if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d}var c=o.default.find(a,(function(e){return t.isPlatform(e)}));if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f}}if(s>0){var l=Object.keys(i),h=o.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=o.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if(\"string\"==typeof i)return\">\"===e[0]||\"<\"===e[0]?(r=e.substr(1),\"=\"===e[1]?(n=!0,r=e.substr(2)):t=[],\">\"===e[0]?t.push(1):t.push(-1)):\"=\"===e[0]?r=e.substr(1):\"~\"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(o.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n};var s=/version\\/(\\d+(\\.?_?\\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:\"Googlebot\"},r=i.default.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:\"Opera\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\\/|opios/i],describe:function(e){var t={name:\"Opera\"},r=i.default.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:\"Samsung Internet for Android\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:\"NAVER Whale Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:\"MZ Browser\"},r=i.default.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:\"Focus\"},r=i.default.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:\"Swing\"},r=i.default.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:\"Opera Coast\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\\/\\d+(?:.?_?\\d+)+/i],describe:function(e){var t={name:\"Opera Touch\"},r=i.default.getFirstMatch(/(?:opt)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:\"Yandex Browser\"},r=i.default.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:\"UC Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:\"Maxthon\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:\"Epiphany\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:\"Puffin\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:\"Sleipnir\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:\"K-Meleon\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:\"WeChat\"},r=i.default.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?\"QQ Browser Lite\":\"QQ Browser\"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:\"Internet Explorer\"},r=i.default.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\\sedg\\//i],describe:function(e){var t={name:\"Microsoft Edge\"},r=i.default.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:\"Microsoft Edge\"},r=i.default.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:\"Vivaldi\"},r=i.default.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:\"SeaMonkey\"},r=i.default.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:\"Sailfish\"},r=i.default.getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:\"Amazon Silk\"},r=i.default.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:\"PhantomJS\"},r=i.default.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:\"SlimerJS\"},r=i.default.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t={name:\"BlackBerry\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:\"WebOS Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:\"Bada\"},r=i.default.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:\"Tizen\"},r=i.default.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:\"QupZilla\"},r=i.default.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:\"Firefox\"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:\"Electron\"},r=i.default.getFirstMatch(/(?:electron)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:\"Miui\"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:\"Chromium\"},r=i.default.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:\"Chrome\"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:\"Google Search\"},r=i.default.getFirstMatch(/(?:GSA)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:\"Android Browser\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:\"PlayStation 4\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:\"Safari\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search(\"\\\\(\")?/^(.*)\\/(.*)[ \\t]\\((.*)/:/^(.*)\\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/Roku\\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe:function(e){var t={name:s.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\\/)(\\d[\\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i,e).replace(/[_\\s]/g,\".\"),r=i.default.getMacOSVersionName(t),n={name:s.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i,e).replace(/[_\\s]/g,\".\");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:s.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i,e),r={name:s.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i,e)||i.default.getFirstMatch(/\\bbb(\\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/googlebot/i],describe:function(){return{type:\"bot\",vendor:\"Google\"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&\"Nova\",r={type:s.PLATFORMS_MAP.mobile,vendor:\"Huawei\"};return t&&(r.model=t),r}},{test:[/nexus\\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Nexus\"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Apple\",model:\"iPad\"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Apple\",model:\"iPad\"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\",model:\"Kindle Fire HD 7\"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:\"Apple\",model:t}}},{test:[/nexus\\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Nexus\"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"blackberry\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"BlackBerry\"}}},{test:function(e){return\"bada\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"windows phone\"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Microsoft\"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(\".\")[0]);return\"android\"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return\"android\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"macos\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:\"Apple\"}}},{test:function(e){return\"windows\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"linux\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"playstation 4\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return\"roku\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:function(e){return\"microsoft edge\"===e.getBrowserName(!0)},describe:function(e){if(/\\sedg\\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\\/537\\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})}));", "export const createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => {\n const module = await import(\"bowser\");\n const parse = module.parse ?? module.default.parse ?? (() => \"\");\n const parsedUA = typeof window !== \"undefined\" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined;\n const sections = [\n [\"aws-sdk-js\", clientVersion],\n [\"ua\", \"2.1\"],\n [`os/${parsedUA?.os?.name || \"other\"}`, parsedUA?.os?.version],\n [\"lang/js\"],\n [\"md/browser\", `${parsedUA?.browser?.name ?? \"unknown\"}_${parsedUA?.browser?.version ?? \"unknown\"}`],\n ];\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n const appId = await config?.userAgentAppId?.();\n if (appId) {\n sections.push([`app/${appId}`]);\n }\n return sections;\n};\n", "export { createUserAgentStringParsingProvider } from \"./createUserAgentStringParsingProvider\";\nexport const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => async (config) => {\n const navigator = typeof window !== \"undefined\" ? window.navigator : undefined;\n const uaString = navigator?.userAgent ?? \"\";\n const osName = navigator?.userAgentData?.platform ?? fallback.os(uaString) ?? \"other\";\n const osVersion = undefined;\n const brands = navigator?.userAgentData?.brands ?? [];\n const brand = brands[brands.length - 1];\n const browserName = brand?.brand ?? fallback.browser(uaString) ?? \"unknown\";\n const browserVersion = brand?.version ?? \"unknown\";\n const sections = [\n [\"aws-sdk-js\", clientVersion],\n [\"ua\", \"2.1\"],\n [`os/${osName}`, osVersion],\n [\"lang/js\"],\n [\"md/browser\", `${browserName}_${browserVersion}`],\n ];\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n const appId = await config?.userAgentAppId?.();\n if (appId) {\n sections.push([`app/${appId}`]);\n }\n return sections;\n};\nexport const fallback = {\n os(ua) {\n if (/iPhone|iPad|iPod/.test(ua))\n return \"iOS\";\n if (/Macintosh|Mac OS X/.test(ua))\n return \"macOS\";\n if (/Windows NT/.test(ua))\n return \"Windows\";\n if (/Android/.test(ua))\n return \"Android\";\n if (/Linux/.test(ua))\n return \"Linux\";\n return undefined;\n },\n browser(ua) {\n if (/EdgiOS|EdgA|Edg\\//.test(ua))\n return \"Microsoft Edge\";\n if (/Firefox\\//.test(ua))\n return \"Firefox\";\n if (/Chrome\\//.test(ua))\n return \"Chrome\";\n if (/Safari\\//.test(ua))\n return \"Safari\";\n return undefined;\n },\n};\nexport const defaultUserAgent = createDefaultUserAgentProvider;\n", "export { isIpAddress } from \"@smithy/core/endpoints\";\n", "import { isValidHostLabel } from \"@smithy/core/endpoints\";\nimport { isIpAddress } from \"../isIpAddress\";\nexport const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!isValidHostLabel(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if (isIpAddress(value)) {\n return false;\n }\n return true;\n};\n", "const ARN_DELIMITER = \":\";\nconst RESOURCE_DELIMITER = \"/\";\nexport const parseArn = (value) => {\n const segments = value.split(ARN_DELIMITER);\n if (segments.length < 6)\n return null;\n const [arn, partition, service, region, accountId, ...resourcePath] = segments;\n if (arn !== \"arn\" || partition === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\")\n return null;\n const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n return {\n partition,\n service,\n region,\n accountId,\n resourceId,\n };\n};\n", "import { customEndpointFunctions } from \"@smithy/core/endpoints\";\nimport { isVirtualHostableS3Bucket } from \"./lib/aws/isVirtualHostableS3Bucket\";\nimport { parseArn } from \"./lib/aws/parseArn\";\nimport { partition } from \"./lib/aws/partition\";\nexport const awsEndpointFunctions = {\n isVirtualHostableS3Bucket: isVirtualHostableS3Bucket,\n parseArn: parseArn,\n partition: partition,\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "export { resolveEndpoint } from \"@smithy/core/endpoints\";\n", "import { parseUrl } from \"@smithy/core/protocols\";\nexport const resolveDefaultAwsRegionalEndpointsConfig = (input) => {\n if (typeof input.endpointProvider !== \"function\") {\n throw new Error(\"@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.\");\n }\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n return toEndpointV1(input.endpointProvider({\n Region: typeof input.region === \"function\" ? await input.region() : input.region,\n UseDualStack: typeof input.useDualstackEndpoint === \"function\"\n ? await input.useDualstackEndpoint()\n : input.useDualstackEndpoint,\n UseFIPS: typeof input.useFipsEndpoint === \"function\" ? await input.useFipsEndpoint() : input.useFipsEndpoint,\n Endpoint: undefined,\n }, { logger: input.logger }));\n };\n }\n return input;\n};\nexport const toEndpointV1 = (endpoint) => parseUrl(endpoint.url);\n", "export { EndpointError } from \"@smithy/core/endpoints\";\n", "export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from \"@smithy/core/config\";\nexport { resolveRegionConfig } from \"@smithy/core/config\";\n", "import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, } from \"@smithy/core/config\";\nexport function stsRegionDefaultResolver(loaderConfig = {}) {\n return loadConfig({\n ...NODE_REGION_CONFIG_OPTIONS,\n async default() {\n if (!warning.silence) {\n console.warn(\"@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.\");\n }\n return \"us-east-1\";\n },\n }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });\n}\nexport const warning = {\n silence: false,\n};\n", "export const getAwsRegionExtensionConfiguration = (runtimeConfig) => {\n return {\n setRegion(region) {\n runtimeConfig.region = region;\n },\n region() {\n return runtimeConfig.region;\n },\n };\n};\nexport const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region(),\n };\n};\n", "export { emitWarningIfUnsupportedVersion, state } from \"./emitWarningIfUnsupportedVersion\";\nexport { getLongPollPlugin } from \"./longPollMiddleware\";\nexport { setCredentialFeature } from \"./setCredentialFeature\";\nexport { setFeature } from \"./setFeature\";\nexport { setTokenFeature } from \"./setTokenFeature\";\nexport { hostHeaderMiddleware, hostHeaderMiddlewareOptions, getHostHeaderPlugin, resolveHostHeaderConfig, } from \"./middleware-host-header/hostHeaderMiddleware\";\nexport { loggerMiddleware, loggerMiddlewareOptions, getLoggerPlugin } from \"./middleware-logger/loggerMiddleware\";\nexport { recursionDetectionMiddlewareOptions } from \"./middleware-recursion-detection/configuration\";\nexport { getRecursionDetectionPlugin } from \"./middleware-recursion-detection/getRecursionDetectionPlugin\";\nexport { recursionDetectionMiddleware } from \"./middleware-recursion-detection/recursionDetectionMiddleware\";\nexport { DEFAULT_UA_APP_ID, resolveUserAgentConfig } from \"./middleware-user-agent/configurations\";\nexport { userAgentMiddleware, getUserAgentMiddlewareOptions, getUserAgentPlugin, } from \"./middleware-user-agent/user-agent-middleware\";\nexport { createDefaultUserAgentProvider, defaultUserAgent, crtAvailability, } from \"./util-user-agent-node/defaultUserAgent\";\nexport { NODE_APP_ID_CONFIG_OPTIONS, UA_APP_ID_ENV_NAME, UA_APP_ID_INI_NAME, } from \"./util-user-agent-node/nodeAppIdConfigOptions\";\nexport { fallback } from \"./util-user-agent-browser/defaultUserAgent\";\nexport { createUserAgentStringParsingProvider } from \"./util-user-agent-browser/createUserAgentStringParsingProvider\";\nexport { awsEndpointFunctions } from \"./util-endpoints/aws\";\nexport { resolveEndpoint } from \"./util-endpoints/resolveEndpoint\";\nexport { resolveDefaultAwsRegionalEndpointsConfig, toEndpointV1, } from \"./util-endpoints/resolveDefaultAwsRegionalEndpointsConfig\";\nexport { isIpAddress } from \"./util-endpoints/lib/isIpAddress\";\nexport { isVirtualHostableS3Bucket } from \"./util-endpoints/lib/aws/isVirtualHostableS3Bucket\";\nexport { parseArn } from \"./util-endpoints/lib/aws/parseArn\";\nexport { partition, setPartitionInfo, useDefaultPartitionInfo, getUserAgentPrefix, } from \"./util-endpoints/lib/aws/partition\";\nexport { EndpointError } from \"./util-endpoints/types/EndpointError\";\nexport { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig, } from \"./region-config-resolver/awsRegionConfig\";\nexport { stsRegionDefaultResolver, warning as stsRegionWarning, } from \"./region-config-resolver/stsRegionDefaultResolver\";\nexport { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from \"./region-config-resolver/extensions\";\n", "import { HttpResponse } from \"@smithy/core/protocols\";\nexport const getDateHeader = (response) => HttpResponse.isInstance(response) ? (response.headers?.date ?? response.headers?.Date) : undefined;\n", "export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\n", "import { getSkewCorrectedDate } from \"./getSkewCorrectedDate\";\nexport const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;\n", "import { isClockSkewed } from \"./isClockSkewed\";\nexport const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n};\n", "export { getDateHeader } from \"./getDateHeader\";\nexport { getSkewCorrectedDate } from \"./getSkewCorrectedDate\";\nexport { getUpdatedSystemClockOffset } from \"./getUpdatedSystemClockOffset\";\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nimport { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from \"../utils\";\nconst throwSigningPropertyError = (name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n};\nexport const validateSigningProperties = async (signingProperties) => {\n const context = throwSigningPropertyError(\"context\", signingProperties.context);\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n const signerFunction = throwSigningPropertyError(\"signer\", config.signer);\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties?.signingRegion;\n const signingRegionSet = signingProperties?.signingRegionSet;\n const signingName = signingProperties?.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingRegionSet,\n signingName,\n };\n};\nexport class AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const validatedProps = await validateSigningProperties(signingProperties);\n const { config, signer } = validatedProps;\n let { signingRegion, signingName } = validatedProps;\n const handlerExecutionContext = signingProperties.context;\n if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n const [first, second] = handlerExecutionContext.authSchemes;\n if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n signingRegion = second?.signingRegion ?? signingRegion;\n signingName = second?.signingName ?? signingName;\n }\n }\n signingProperties._preRequestSystemClockOffset = config.systemClockOffset;\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: signingRegion,\n signingService: signingName,\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const errorException = error;\n const serverTime = errorException.ServerTime ?? getDateHeader(errorException.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const preRequestOffset = signingProperties._preRequestSystemClockOffset;\n const newOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const isLocalCorrection = newOffset !== config.systemClockOffset;\n const isConcurrentCorrection = preRequestOffset !== undefined && preRequestOffset !== newOffset;\n const clockSkewCorrected = isLocalCorrection || isConcurrentCorrection;\n if (clockSkewCorrected && errorException.$metadata) {\n config.systemClockOffset = newOffset;\n errorException.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n}\nexport const AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n", "import { HttpRequest } from \"@smithy/core/protocols\";\nimport { getSkewCorrectedDate } from \"../utils\";\nimport { AwsSdkSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);\n const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();\n const multiRegionOverride = (configResolvedSigningRegionSet ??\n signingRegionSet ?? [signingRegion]).join(\",\");\n signingProperties._preRequestSystemClockOffset = config.systemClockOffset;\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: multiRegionOverride,\n signingService: signingName,\n });\n return signedRequest;\n }\n}\n", "export const getArrayForCommaSeparatedString = (str) => typeof str === \"string\" && str.length > 0 ? str.split(\",\").map((item) => item.trim()) : [];\n", "export const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\\s-]/g, \"_\").toUpperCase()}`;\n", "import { getArrayForCommaSeparatedString } from \"../utils/getArrayForCommaSeparatedString\";\nimport { getBearerTokenEnvKey } from \"../utils/getBearerTokenEnvKey\";\nconst NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = \"AWS_AUTH_SCHEME_PREFERENCE\";\nconst NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = \"auth_scheme_preference\";\nexport const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {\n environmentVariableSelector: (env, options) => {\n if (options?.signingName) {\n const bearerTokenKey = getBearerTokenEnvKey(options.signingName);\n if (bearerTokenKey in env)\n return [\"httpBearerAuth\"];\n }\n if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))\n return undefined;\n return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);\n },\n configFileSelector: (profile) => {\n if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))\n return undefined;\n return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);\n },\n default: [],\n};\n", "import { normalizeProvider } from \"@smithy/core\";\nimport { ProviderError } from \"@smithy/core/config\";\nexport const resolveAwsSdkSigV4AConfig = (config) => {\n config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);\n return config;\n};\nexport const NODE_SIGV4A_CONFIG_OPTIONS = {\n environmentVariableSelector(env) {\n if (env.AWS_SIGV4A_SIGNING_REGION_SET) {\n return env.AWS_SIGV4A_SIGNING_REGION_SET.split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"AWS_SIGV4A_SIGNING_REGION_SET not set in env.\", {\n tryNextLink: true,\n });\n },\n configFileSelector(profile) {\n if (profile.sigv4a_signing_region_set) {\n return (profile.sigv4a_signing_region_set ?? \"\").split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"sigv4a_signing_region_set not set in profile.\", {\n tryNextLink: true,\n });\n },\n default: undefined,\n};\n", "const { fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require(\"@smithy/core/serde\");\nconst { normalizeProvider } = require(\"@smithy/core/client\");\nconst { escapeUri, HttpRequest } = require(\"@smithy/core/protocols\");\n\nclass HeaderFormatter {\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? HEADER_VALUE_TYPE.boolTrue : HEADER_VALUE_TYPE.boolFalse]);\n case \"byte\":\n return Uint8Array.from([HEADER_VALUE_TYPE.byte, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, HEADER_VALUE_TYPE.short);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, HEADER_VALUE_TYPE.integer);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = HEADER_VALUE_TYPE.long;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, HEADER_VALUE_TYPE.byteArray);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, HEADER_VALUE_TYPE.string);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = HEADER_VALUE_TYPE.timestamp;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = HEADER_VALUE_TYPE.uuid;\n uuidBytes.set(fromHex(header.value.replace(/-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\nclass Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n\nconst ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nconst CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nconst AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nconst SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nconst EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nconst SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nconst TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nconst REGION_SET_PARAM = \"X-Amz-Region-Set\";\nconst AUTH_HEADER = \"authorization\";\nconst AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nconst DATE_HEADER = \"date\";\nconst GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nconst SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nconst SHA256_HEADER = \"x-amz-content-sha256\";\nconst TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nconst HOST_HEADER = \"host\";\nconst ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true,\n};\nconst PROXY_HEADER_PATTERN = /^proxy-/;\nconst SEC_HEADER_PATTERN = /^sec-/;\nconst UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nconst ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nconst ALGORITHM_IDENTIFIER_V4A = \"AWS4-ECDSA-P256-SHA256\";\nconst EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nconst UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nconst MAX_CACHE_SIZE = 50;\nconst KEY_TYPE_IDENTIFIER = \"aws4_request\";\nconst MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n\nconst getCanonicalQuery = ({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query)) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n const encodedKey = escapeUri(key);\n keys.push(encodedKey);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;\n }\n else if (Array.isArray(value)) {\n serialized[encodedKey] = value\n .slice(0)\n .reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), [])\n .sort()\n .join(\"&\");\n }\n }\n return keys\n .sort()\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join(\"&\");\n};\n\nconst iso8601 = (time) => toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, \"Z\");\nconst toDate = (time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n};\n\nclass SignatureV4Base {\n service;\n regionProvider;\n credentialProvider;\n sha256;\n uriEscapePath;\n applyChecksum;\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeProvider(region);\n this.credentialProvider = normalizeProvider(credentials);\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {\n const hash = new this.sha256();\n hash.update(toUint8Array(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${algorithmIdentifier}\n${longDate}\n${credentialScope}\n${toHex(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if (pathSegment?.length === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n }\n else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${path?.startsWith(\"/\") ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && path?.endsWith(\"/\") ? \"/\" : \"\"}`;\n const doubleEncoded = escapeUri(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" ||\n typeof credentials.accessKeyId !== \"string\" ||\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n formatDate(now) {\n const longDate = iso8601(now).replace(/[-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n };\n }\n getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n }\n}\n\nconst signingKeyCache = {};\nconst cacheQueue = [];\nconst createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;\nconst getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return (signingKeyCache[cacheKey] = key);\n};\nconst clearCredentialCache = () => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n};\nconst hmac = (ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update(toUint8Array(data));\n return hash.digest();\n};\n\nconst getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName) ||\n PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||\n SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n};\n\nconst getPayloadHash = async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == undefined) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n }\n else if (typeof body === \"string\" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update(toUint8Array(body));\n return toHex(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n};\n\nconst hasHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\n\nconst moveHeadersToQuery = (request, options = {}) => {\n const { headers, query = {} } = HttpRequest.clone(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if ((lname.slice(0, 6) === \"x-amz-\" && !options.unhoistableHeaders?.has(lname)) ||\n options.hoistableHeaders?.has(lname)) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query,\n };\n};\n\nconst prepareRequest = (request) => {\n request = HttpRequest.clone(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n};\n\nclass SignatureV4 extends SignatureV4Base {\n headerFormatter = new HeaderFormatter();\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n super({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath,\n });\n }\n async presign(originalRequest, options = {}) {\n const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { longDate, shortDate } = this.formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\");\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n }\n else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n }\n else if (toSign.message) {\n return this.signMessage(toSign, options);\n }\n else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService, eventStreamCredentials, }) {\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate, longDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = toHex(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload,\n ].join(\"\\n\");\n return this.signString(stringToSign, {\n signingDate,\n signingRegion: region,\n signingService,\n eventStreamCredentials,\n });\n }\n async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService, eventStreamCredentials }) {\n const promise = this.signEvent({\n headers: this.headerFormatter.format(signableMessage.message.headers),\n payload: signableMessage.message.body,\n }, {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature,\n eventStreamCredentials,\n });\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService, eventStreamCredentials, } = {}) {\n const credentials = eventStreamCredentials ?? (await this.credentialProvider());\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate } = this.formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));\n request.headers[AUTH_HEADER] =\n `${ALGORITHM_IDENTIFIER} ` +\n `Credential=${credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` +\n `Signature=${signature}`;\n return request;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);\n const hash = new this.sha256(await keyPromise);\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n}\n\nconst signatureV4aContainer = {\n SignatureV4a: null,\n};\n\nexports.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER;\nexports.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A;\nexports.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM;\nexports.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS;\nexports.AMZ_DATE_HEADER = AMZ_DATE_HEADER;\nexports.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM;\nexports.AUTH_HEADER = AUTH_HEADER;\nexports.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM;\nexports.DATE_HEADER = DATE_HEADER;\nexports.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER;\nexports.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM;\nexports.GENERATED_HEADERS = GENERATED_HEADERS;\nexports.HOST_HEADER = HOST_HEADER;\nexports.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER;\nexports.MAX_CACHE_SIZE = MAX_CACHE_SIZE;\nexports.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL;\nexports.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN;\nexports.REGION_SET_PARAM = REGION_SET_PARAM;\nexports.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN;\nexports.SHA256_HEADER = SHA256_HEADER;\nexports.SIGNATURE_HEADER = SIGNATURE_HEADER;\nexports.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM;\nexports.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM;\nexports.SignatureV4 = SignatureV4;\nexports.SignatureV4Base = SignatureV4Base;\nexports.TOKEN_HEADER = TOKEN_HEADER;\nexports.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM;\nexports.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS;\nexports.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD;\nexports.clearCredentialCache = clearCredentialCache;\nexports.createScope = createScope;\nexports.getCanonicalHeaders = getCanonicalHeaders;\nexports.getCanonicalQuery = getCanonicalQuery;\nexports.getPayloadHash = getPayloadHash;\nexports.getSigningKey = getSigningKey;\nexports.hasHeader = hasHeader;\nexports.moveHeadersToQuery = moveHeadersToQuery;\nexports.prepareRequest = prepareRequest;\nexports.signatureV4aContainer = signatureV4aContainer;\n", "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from \"@smithy/core\";\nimport { SignatureV4 } from \"@smithy/signature-v4\";\nexport const resolveAwsSdkSigV4Config = (config) => {\n let inputCredentials = config.credentials;\n let isUserSupplied = !!config.credentials;\n let resolvedCredentials = undefined;\n Object.defineProperty(config, \"credentials\", {\n set(credentials) {\n if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n isUserSupplied = true;\n }\n inputCredentials = credentials;\n const memoizedProvider = normalizeCredentialProvider(config, {\n credentials: inputCredentials,\n credentialDefaultProvider: config.credentialDefaultProvider,\n });\n const boundProvider = bindCallerConfig(config, memoizedProvider);\n if (isUserSupplied && !boundProvider.attributed) {\n const isCredentialObject = typeof inputCredentials === \"object\" && inputCredentials !== null;\n resolvedCredentials = async (options) => {\n const creds = await boundProvider(options);\n const attributedCreds = creds;\n if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {\n return setCredentialFeature(attributedCreds, \"CREDENTIALS_CODE\", \"e\");\n }\n return attributedCreds;\n };\n resolvedCredentials.memoized = boundProvider.memoized;\n resolvedCredentials.configBound = boundProvider.configBound;\n resolvedCredentials.attributed = true;\n }\n else {\n resolvedCredentials = boundProvider;\n }\n },\n get() {\n return resolvedCredentials;\n },\n enumerable: true,\n configurable: true,\n });\n config.credentials = inputCredentials;\n const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;\n let signer;\n if (config.signer) {\n signer = normalizeProvider(config.signer);\n }\n else if (config.regionInfoProvider) {\n signer = () => normalizeProvider(config.region)()\n .then(async (region) => [\n (await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint(),\n })) || {},\n region,\n ])\n .then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n });\n }\n else {\n signer = async (authScheme) => {\n authScheme = Object.assign({}, {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await normalizeProvider(config.region)(),\n properties: {},\n }, authScheme);\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n };\n }\n const resolvedConfig = Object.assign(config, {\n systemClockOffset,\n signingEscapePath,\n signer,\n });\n return resolvedConfig;\n};\nexport const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {\n let credentialsProvider;\n if (credentials) {\n if (!credentials?.memoized) {\n credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);\n }\n else {\n credentialsProvider = credentials;\n }\n }\n else {\n if (credentialDefaultProvider) {\n credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {\n parentClientConfig: config,\n })));\n }\n else {\n credentialsProvider = async () => {\n throw new Error(\"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\");\n };\n }\n }\n credentialsProvider.memoized = true;\n return credentialsProvider;\n}\nfunction bindCallerConfig(config, credentialsProvider) {\n if (credentialsProvider.configBound) {\n return credentialsProvider;\n }\n const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });\n fn.memoized = credentialsProvider.memoized;\n fn.configBound = true;\n return fn;\n}\n", "export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport { AwsSdkSigV4ASigner } from \"./AwsSdkSigV4ASigner\";\nexport { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from \"./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS\";\nexport { resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS } from \"./resolveAwsSdkSigV4AConfig\";\nexport { resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config } from \"./resolveAwsSdkSigV4Config\";\n", "export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties, AwsSdkSigV4ASigner, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config, } from \"./aws_sdk\";\nexport { getBearerTokenEnvKey } from \"./utils/getBearerTokenEnvKey\";\n", "const { setCredentialFeature } = require(\"@aws-sdk/core/client\");\nconst { CredentialsProviderError } = require(\"@smithy/core/config\");\n\nconst ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nconst ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nconst ENV_SESSION = \"AWS_SESSION_TOKEN\";\nconst ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nconst ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nconst ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nconst fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n\nexports.ENV_ACCOUNT_ID = ENV_ACCOUNT_ID;\nexports.ENV_CREDENTIAL_SCOPE = ENV_CREDENTIAL_SCOPE;\nexports.ENV_EXPIRATION = ENV_EXPIRATION;\nexports.ENV_KEY = ENV_KEY;\nexports.ENV_SECRET = ENV_SECRET;\nexports.ENV_SESSION = ENV_SESSION;\nexports.fromEnv = fromEnv;\n", "const { ProviderError, CredentialsProviderError, loadConfig } = require(\"@smithy/core/config\");\nconst node_http = require(\"node:http\");\nconst { parseUrl } = require(\"@smithy/core/protocols\");\n\nconst isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nconst fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...(creds.AccountId && { accountId: creds.AccountId }),\n});\n\nconst DEFAULT_TIMEOUT = 1000;\nconst DEFAULT_MAX_RETRIES = 0;\nconst providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n\nfunction httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = node_http.request({\n method: \"GET\",\n ...options,\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n\nconst retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\n\nconst ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nconst fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = new Set([\"localhost\", \"127.0.0.1\"]);\nconst GREENGRASS_PROTOCOLS = new Set([\"http:\", \"https:\"]);\nconst getCmdsUri = async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n let parsed;\n try {\n parsed = new URL(process.env[ENV_CMDS_FULL_URI]);\n }\n catch {\n throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });\n }\n if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {\n throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger,\n });\n }\n if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {\n throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger,\n });\n }\n return {\n protocol: parsed.protocol,\n hostname: parsed.hostname,\n path: parsed.pathname + parsed.search,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", {\n tryNextLink: false,\n logger,\n });\n};\n\nclass InstanceMetadataV1FallbackError extends CredentialsProviderError {\n tryNextLink;\n name = \"InstanceMetadataV1FallbackError\";\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);\n }\n}\n\nvar Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint || (Endpoint = {}));\n\nconst ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nconst CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nconst ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n\nvar EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n\nconst ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nconst CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nconst ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode.IPv4,\n};\n\nconst getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nconst getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return Endpoint.IPv4;\n case EndpointMode.IPv6:\n return Endpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);\n }\n};\n\nconst STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nconst STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nconst STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nconst getExtendedInstanceMetadataCredentials = (credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS +\n Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1000);\n logger.warn(\"Attempting credential expiration extension due to a credential service availability issue. A refresh of these \" +\n `credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: ` +\n STATIC_STABILITY_DOC_URL);\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...(originalExpiration ? { originalExpiration } : {}),\n expiration: newExpiration,\n };\n};\n\nconst staticStabilityProvider = (provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n }\n catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n }\n else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n};\n\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nconst fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n\nexports.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES;\nexports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;\nexports.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN;\nexports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI;\nexports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI;\nexports.Endpoint = Endpoint;\nexports.fromContainerMetadata = fromContainerMetadata;\nexports.fromInstanceMetadata = fromInstanceMetadata;\nexports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;\nexports.httpRequest = httpRequest;\nexports.providerConfigFromInit = providerConfigFromInit;\n", "const { buildQueryString, HttpResponse } = require(\"@smithy/core/protocols\");\nconst node_https = require(\"node:https\");\nconst { Readable } = require(\"node:stream\");\nconst http2 = require(\"node:http2\");\nconst { streamCollector } = require(\"@smithy/core/serde\");\nexports.streamCollector = streamCollector;\n\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n\nconst NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\nconst getTransformedHeaders = (headers) => {\n const transformedHeaders = {};\n for (const name in headers) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n};\n\nconst timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n};\n\nconst DEFER_EVENT_LISTENER_TIME$2 = 1000;\nconst setConnectionTimeout = (request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = (offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {\n name: \"TimeoutError\",\n }));\n }, timeoutInMs - offset);\n const doWithSocket = (socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n }\n else {\n timing.clearTimeout(timeoutId);\n }\n };\n if (request.socket) {\n doWithSocket(request.socket);\n }\n else {\n request.on(\"socket\", doWithSocket);\n }\n };\n if (timeoutInMs < 2000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);\n};\n\nconst setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {\n if (timeoutInMs) {\n return timing.setTimeout(() => {\n let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? \"ERROR\" : \"WARN\"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;\n if (throwOnRequestTimeout) {\n const error = Object.assign(new Error(msg), {\n name: \"TimeoutError\",\n code: \"ETIMEDOUT\",\n });\n req.destroy(error);\n reject(error);\n }\n else {\n msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;\n logger?.warn?.(msg);\n }\n }, timeoutInMs);\n }\n return -1;\n};\n\nconst DEFER_EVENT_LISTENER_TIME$1 = 3000;\nconst setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = () => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n }\n else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n };\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n};\n\nconst DEFER_EVENT_LISTENER_TIME = 3000;\nconst setSocketTimeout = (request, reject, timeoutInMs = 0) => {\n const registerTimeout = (offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = () => {\n request.destroy();\n reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: \"TimeoutError\" }));\n };\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n }\n else {\n request.setTimeout(timeout, onTimeout);\n }\n };\n if (0 < timeoutInMs && timeoutInMs < 6000) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n};\n\nconst MIN_WAIT_TIME = 6_000;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {\n const headers = request.headers;\n const expect = headers ? headers.Expect || headers.expect : undefined;\n let timeoutId = -1;\n let sendBody = true;\n if (!externalAgent && expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n }),\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\nfunction writeBody(httpRequest, body) {\n if (body instanceof Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n const isBuffer = Buffer.isBuffer(body);\n const isString = typeof body === \"string\";\n if (isBuffer || isString) {\n if (isBuffer && body.byteLength === 0) {\n httpRequest.end();\n }\n else {\n httpRequest.end(body);\n }\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" &&\n uint8.buffer &&\n typeof uint8.byteOffset === \"number\" &&\n typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n\nconst DEFAULT_REQUEST_TIMEOUT = 0;\nlet hAgent = undefined;\nlet hRequest = undefined;\nclass NodeHttpHandler {\n config;\n configProvider;\n socketWarningTimestamp = 0;\n externalAgent = false;\n metadata = { handlerProtocol: \"http/1.1\" };\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttpHandler(instanceOrOptions);\n }\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15_000;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n })\n .catch(reject);\n }\n else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const config = this.config;\n const isSSL = request.protocol === \"https:\";\n if (!isSSL && !this.config.httpAgent) {\n this.config.httpAgent = await this.config.httpAgentProvider();\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = undefined;\n let socketWarningTimeoutId = -1;\n let connectionTimeoutId = -1;\n let requestTimeoutId = -1;\n let socketTimeoutId = -1;\n let keepAliveTimeoutId = -1;\n const clearTimeouts = () => {\n timing.clearTimeout(socketWarningTimeoutId);\n timing.clearTimeout(connectionTimeoutId);\n timing.clearTimeout(requestTimeoutId);\n timing.clearTimeout(socketTimeoutId);\n timing.clearTimeout(keepAliveTimeoutId);\n };\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n clearTimeouts();\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const headers = request.headers;\n const expectContinue = headers ? (headers.Expect ?? headers.expect) === \"100-continue\" : false;\n let agent = isSSL ? config.httpsAgent : config.httpAgent;\n if (expectContinue && !this.externalAgent) {\n agent = new (isSSL ? node_https.Agent : hAgent)({\n keepAlive: false,\n maxSockets: Infinity,\n });\n }\n socketWarningTimeoutId = timing.setTimeout(() => {\n this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);\n }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));\n const queryString = request.query ? buildQueryString(request.query) : \"\";\n let auth = undefined;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n }\n else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth,\n };\n const requestFunc = isSSL ? node_https.request : hRequest;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res,\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n }\n else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = () => {\n req.destroy();\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;\n connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);\n requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console);\n socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n keepAliveTimeoutId = setSocketKeepAlive(req, {\n keepAlive: httpAgent.keepAlive,\n keepAliveMsecs: httpAgent.keepAliveMsecs,\n });\n }\n writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {\n clearTimeouts();\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout,\n socketTimeout,\n socketAcquisitionWarningTimeout,\n throwOnRequestTimeout,\n httpAgentProvider: async () => {\n const node_http = require('node:http');\n const { Agent, request } = node_http.default ?? node_http;\n hRequest = request;\n hAgent = Agent;\n if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpAgent;\n }\n return new hAgent({ keepAlive, maxSockets, ...httpAgent });\n },\n httpsAgent: (() => {\n if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n this.externalAgent = true;\n return httpsAgent;\n }\n return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger,\n };\n }\n}\n\nconst ids = new Uint16Array(1);\nclass ClientHttp2SessionRef {\n id = ids[0]++;\n total = 0;\n max = 0;\n session;\n refs = 0;\n constructor(session) {\n session.unref();\n this.session = session;\n }\n retain() {\n if (this.session.destroyed) {\n throw new Error(\"@smithy/node-http-handler - cannot acquire reference to destroyed session.\");\n }\n this.refs += 1;\n this.total += 1;\n this.max = Math.max(this.refs, this.max);\n this.session.ref();\n }\n free() {\n if (this.session.destroyed) {\n return;\n }\n this.refs -= 1;\n if (this.refs === 0) {\n this.session.unref();\n }\n if (this.refs < 0) {\n throw new Error(\"@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.\");\n }\n }\n deref() {\n return this.session;\n }\n close() {\n if (!this.session.closed) {\n this.session.close();\n }\n }\n destroy() {\n this.refs = 0;\n if (!this.session.destroyed) {\n this.session.destroy();\n }\n }\n useCount() {\n return this.refs;\n }\n}\n\nclass NodeHttp2ConnectionPool {\n sessions = [];\n maxConcurrency = 0;\n constructor(sessions) {\n this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));\n }\n poll() {\n let cleanup = false;\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n cleanup = true;\n continue;\n }\n if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {\n return session;\n }\n }\n if (cleanup) {\n for (const session of this.sessions) {\n if (session.deref().destroyed) {\n this.remove(session);\n }\n }\n }\n }\n offerLast(ref) {\n this.sessions.push(ref);\n }\n remove(ref) {\n const ix = this.sessions.indexOf(ref);\n if (ix > -1) {\n this.sessions.splice(ix, 1);\n }\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n setMaxConcurrency(maxConcurrency) {\n this.maxConcurrency = maxConcurrency;\n }\n destroy(ref) {\n this.remove(ref);\n ref.destroy();\n }\n}\n\nclass NodeHttp2ConnectionManager {\n config;\n connectOptions;\n connectionPools = new Map();\n constructor(config) {\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const pool = this.getPool(url);\n if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {\n const available = pool.poll();\n if (available) {\n available.retain();\n return available;\n }\n }\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\"Fail to set maxConcurrentStreams to \" +\n this.config.maxConcurrency +\n \"when creating new session for \" +\n requestContext.destination.toString());\n }\n });\n }\n const graceful = () => {\n this.removeFromPoolAndClose(url, ref);\n };\n const ensureDestroyed = () => {\n this.removeFromPoolAndCheckedDestroy(url, ref);\n };\n session.on(\"goaway\", graceful);\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n pool.offerLast(ref);\n ref.retain();\n return ref;\n }\n release(_requestContext, ref) {\n ref.free();\n }\n createIsolatedSession(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const ref = new ClientHttp2SessionRef(this.connect(url));\n const session = ref.deref();\n session.settings({ maxConcurrentStreams: 1 });\n const ensureDestroyed = () => {\n ref.destroy();\n };\n session.on(\"error\", ensureDestroyed);\n session.on(\"frameError\", ensureDestroyed);\n session.on(\"close\", ensureDestroyed);\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);\n }\n ref.retain();\n return ref;\n }\n destroy() {\n for (const [url, connectionPool] of this.connectionPools) {\n for (const session of [...connectionPool]) {\n session.destroy();\n }\n this.connectionPools.delete(url);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n for (const pool of this.connectionPools.values()) {\n pool.setMaxConcurrency(maxConcurrentStreams);\n }\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) {\n this.connectOptions = nodeHttp2ConnectOptions;\n }\n debug() {\n const pools = {};\n for (const [url, pool] of this.connectionPools) {\n const sessions = [];\n for (const ref of pool) {\n sessions.push({\n id: ref.id,\n active: ref.useCount(),\n maxConcurrent: ref.max,\n totalRequests: ref.total,\n });\n }\n pools[url] = { sessions };\n }\n return pools;\n }\n removeFromPoolAndClose(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.close();\n }\n removeFromPoolAndCheckedDestroy(authority, ref) {\n this.connectionPools.get(authority)?.remove(ref);\n ref.destroy();\n }\n getPool(url) {\n if (!this.connectionPools.has(url)) {\n const pool = new NodeHttp2ConnectionPool();\n if (this.config.maxConcurrency) {\n pool.setMaxConcurrency(this.config.maxConcurrency);\n }\n this.connectionPools.set(url, pool);\n }\n return this.connectionPools.get(url);\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n connect(url) {\n return this.connectOptions === undefined ? http2.connect(url) : http2.connect(url, this.connectOptions);\n }\n}\n\nconst { constants } = http2;\nclass NodeHttp2Handler {\n config;\n configProvider;\n metadata = { handlerProtocol: \"h2\" };\n connectionManager = new NodeHttp2ConnectionManager({});\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttp2Handler(instanceOrOptions);\n }\n constructor(options) {\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((opts) => {\n resolve(opts || {});\n })\n .catch(reject);\n }\n else {\n resolve(options || {});\n }\n });\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;\n this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);\n if (maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);\n }\n if (nodeHttp2ConnectOptions) {\n this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);\n }\n }\n const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;\n const useIsolatedSession = disableConcurrentStreams || isEventStream;\n const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = undefined;\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n };\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const connectConfig = {\n requestTimeout: this.config?.sessionTimeout,\n isEventStream,\n };\n const ref = useIsolatedSession\n ? this.connectionManager.createIsolatedSession(requestContext, connectConfig)\n : this.connectionManager.lease(requestContext, connectConfig);\n const session = ref.deref();\n const rejectWithDestroy = (err) => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n fulfilled = true;\n reject(err);\n };\n const queryString = query ? buildQueryString(query) : \"\";\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const clientHttp2Stream = session.request({\n ...request.headers,\n [constants.HTTP2_HEADER_PATH]: path,\n [constants.HTTP2_HEADER_METHOD]: method,\n });\n if (effectiveRequestTimeout) {\n clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {\n clientHttp2Stream.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = () => {\n clientHttp2Stream.close();\n const abortError = buildAbortError(abortSignal);\n rejectWithDestroy(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n clientHttp2Stream.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n clientHttp2Stream.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n clientHttp2Stream.on(\"error\", rejectWithDestroy);\n clientHttp2Stream.on(\"aborted\", () => {\n rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));\n });\n clientHttp2Stream.on(\"response\", (headers) => {\n const httpResponse = new HttpResponse({\n statusCode: headers[\":status\"] ?? -1,\n headers: getTransformedHeaders(headers),\n body: clientHttp2Stream,\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (useIsolatedSession) {\n session.close();\n }\n });\n clientHttp2Stream.on(\"close\", () => {\n if (useIsolatedSession) {\n ref.destroy();\n }\n else {\n this.connectionManager.release(requestContext, ref);\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\n\nexports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;\nexports.NodeHttp2Handler = NodeHttp2Handler;\nexports.NodeHttpHandler = NodeHttpHandler;\n", "const { setCredentialFeature } = require(\"@aws-sdk/core/client\");\nconst { CredentialsProviderError } = require(\"@smithy/core/config\");\nconst { NodeHttpHandler } = require(\"@smithy/node-http-handler\");\nconst fs = require(\"node:fs/promises\");\nconst { HttpRequest } = require(\"@smithy/core/protocols\");\nconst { sdkStreamMixin, parseRfc3339DateTime } = require(\"@smithy/core/serde\");\n\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nconst checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\n\nfunction createGetRequest(url) {\n return new HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nasync function getCredentials(response, logger) {\n const stream = sdkStreamMixin(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: parseRfc3339DateTime(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n\nconst retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nconst fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger?.warn\n ? console.warn\n : options.logger.warn.bind(options.logger);\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsRelativeUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationTokenFile will take precedence.\");\n }\n if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else if (full) {\n host = full;\n }\n else {\n throw new CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n checkUrl(url, options.logger);\n const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1000 });\n const requestTimeout = options.timeout ?? 1000;\n const provider = retryWrapper(async () => {\n const request = createGetRequest(url);\n if (tokenFile) {\n request.headers.Authorization = validateToken((await fs.readFile(tokenFile)).toString());\n }\n else if (token) {\n request.headers.Authorization = validateToken(token);\n }\n try {\n const result = await requestHandler.handle(request, { requestTimeout });\n return getCredentials(result.response).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n return async () => {\n try {\n return await provider();\n }\n finally {\n requestHandler.destroy?.();\n }\n };\n};\nconst validateToken = (token) => {\n if (token.includes(\"\\r\\n\")) {\n throw new CredentialsProviderError(\"Authorization token contains invalid \\\\r\\\\n sequence.\");\n }\n return token;\n};\n\nexports.fromHttp = fromHttp;\n", "import { resolveAwsSdkSigV4Config, } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/core/client\";\nexport const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nexport const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n ;\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "export const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\",\n });\n};\nexport const commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "{\n \"name\": \"@aws-sdk/nested-clients\",\n \"version\": \"3.997.33\",\n \"description\": \"Nested clients for AWS SDK packages.\",\n \"homepage\": \"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients\",\n \"license\": \"Apache-2.0\",\n \"author\": {\n \"name\": \"AWS SDK for JavaScript Team\",\n \"url\": \"https://aws.amazon.com/sdk-for-javascript/\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/aws/aws-sdk-js-v3.git\",\n \"directory\": \"packages/nested-clients\"\n },\n \"files\": [\n \"./cognito-identity.d.ts\",\n \"./cognito-identity.js\",\n \"./signin.d.ts\",\n \"./signin.js\",\n \"./sso-oidc.d.ts\",\n \"./sso-oidc.js\",\n \"./sso.d.ts\",\n \"./sso.js\",\n \"./sts.d.ts\",\n \"./sts.js\",\n \"dist-*/**\"\n ],\n \"sideEffects\": false,\n \"main\": \"./dist-cjs/index.js\",\n \"module\": \"./dist-es/index.js\",\n \"browser\": {\n \"./dist-es/submodules/cognito-identity/runtimeConfig\": \"./dist-es/submodules/cognito-identity/runtimeConfig.browser\",\n \"./dist-es/submodules/signin/runtimeConfig\": \"./dist-es/submodules/signin/runtimeConfig.browser\",\n \"./dist-es/submodules/sso-oidc/runtimeConfig\": \"./dist-es/submodules/sso-oidc/runtimeConfig.browser\",\n \"./dist-es/submodules/sso/runtimeConfig\": \"./dist-es/submodules/sso/runtimeConfig.browser\",\n \"./dist-es/submodules/sts/runtimeConfig\": \"./dist-es/submodules/sts/runtimeConfig.browser\"\n },\n \"types\": \"./dist-types/index.d.ts\",\n \"typesVersions\": {\n \"<4.5\": {\n \"dist-types/*\": [\n \"dist-types/ts3.4/*\"\n ],\n \"*\": [\n \"dist-types/ts3.4/submodules/*/index.d.ts\"\n ]\n }\n },\n \"react-native\": {},\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \"./sso-oidc\": {\n \"types\": \"./dist-types/submodules/sso-oidc/index.d.ts\",\n \"module\": \"./dist-es/submodules/sso-oidc/index.js\",\n \"node\": \"./dist-cjs/submodules/sso-oidc/index.js\",\n \"import\": \"./dist-es/submodules/sso-oidc/index.js\",\n \"require\": \"./dist-cjs/submodules/sso-oidc/index.js\"\n },\n \"./sts\": {\n \"types\": \"./dist-types/submodules/sts/index.d.ts\",\n \"module\": \"./dist-es/submodules/sts/index.js\",\n \"node\": \"./dist-cjs/submodules/sts/index.js\",\n \"import\": \"./dist-es/submodules/sts/index.js\",\n \"require\": \"./dist-cjs/submodules/sts/index.js\"\n },\n \"./signin\": {\n \"types\": \"./dist-types/submodules/signin/index.d.ts\",\n \"module\": \"./dist-es/submodules/signin/index.js\",\n \"node\": \"./dist-cjs/submodules/signin/index.js\",\n \"import\": \"./dist-es/submodules/signin/index.js\",\n \"require\": \"./dist-cjs/submodules/signin/index.js\"\n },\n \"./cognito-identity\": {\n \"types\": \"./dist-types/submodules/cognito-identity/index.d.ts\",\n \"module\": \"./dist-es/submodules/cognito-identity/index.js\",\n \"node\": \"./dist-cjs/submodules/cognito-identity/index.js\",\n \"import\": \"./dist-es/submodules/cognito-identity/index.js\",\n \"require\": \"./dist-cjs/submodules/cognito-identity/index.js\"\n },\n \"./sso\": {\n \"types\": \"./dist-types/submodules/sso/index.d.ts\",\n \"module\": \"./dist-es/submodules/sso/index.js\",\n \"node\": \"./dist-cjs/submodules/sso/index.js\",\n \"import\": \"./dist-es/submodules/sso/index.js\",\n \"require\": \"./dist-cjs/submodules/sso/index.js\"\n }\n },\n \"scripts\": {\n \"build\": \"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs\",\n \"build:cjs\": \"node ../../scripts/compilation/inline\",\n \"build:es\": \"premove dist-es && tsc -p tsconfig.es.json\",\n \"build:include:deps\": \"yarn g:turbo run build -F=\\\"$npm_package_name\\\"\",\n \"build:types\": \"premove dist-types && tsc -p tsconfig.types.json\",\n \"build:types:downlevel\": \"downlevel-dts dist-types dist-types/ts3.4\",\n \"clean\": \"premove dist-cjs dist-es dist-types\",\n \"lint\": \"node ../../scripts/validation/submodules-linter.js\",\n \"prebuild\": \"yarn lint\",\n \"test\": \"yarn g:vitest run\",\n \"test:watch\": \"yarn g:vitest watch\"\n },\n \"dependencies\": {\n \"@aws-sdk/core\": \"^3.975.3\",\n \"@aws-sdk/signature-v4-multi-region\": \"^3.996.41\",\n \"@aws-sdk/types\": \"^3.974.2\",\n \"@smithy/core\": \"^3.29.4\",\n \"@smithy/fetch-http-handler\": \"^5.6.6\",\n \"@smithy/node-http-handler\": \"^4.9.6\",\n \"@smithy/types\": \"^4.16.1\",\n \"tslib\": \"^2.6.2\"\n },\n \"devDependencies\": {\n \"concurrently\": \"7.0.0\",\n \"downlevel-dts\": \"0.10.1\",\n \"premove\": \"4.0.0\",\n \"typescript\": \"~5.8.3\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n }\n}\n", "export const majorUint64 = 0;\nexport const majorNegativeInt64 = 1;\nexport const majorUnstructuredByteString = 2;\nexport const majorUtf8String = 3;\nexport const majorList = 4;\nexport const majorMap = 5;\nexport const majorTag = 6;\nexport const majorSpecial = 7;\nexport const specialFalse = 20;\nexport const specialTrue = 21;\nexport const specialNull = 22;\nexport const specialUndefined = 23;\nexport const extendedOneByte = 24;\nexport const extendedFloat16 = 25;\nexport const extendedFloat32 = 26;\nexport const extendedFloat64 = 27;\nexport const minorIndefinite = 31;\nexport function alloc(size) {\n return typeof Buffer !== \"undefined\" ? Buffer.alloc(size) : new Uint8Array(size);\n}\nexport const tagSymbol = Symbol(\"@smithy/core/cbor::tagSymbol\");\nexport function tag(data) {\n data[tagSymbol] = true;\n return data;\n}\n", "import { nv } from \"@smithy/core/serde\";\nimport { alloc, extendedFloat16, extendedFloat32, extendedFloat64, extendedOneByte, majorList, majorMap, majorNegativeInt64, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, minorIndefinite, specialFalse, specialNull, specialTrue, specialUndefined, tag, } from \"./cbor-types\";\nconst USE_BUFFER = typeof Buffer !== \"undefined\";\nconst textDecoder = new TextDecoder();\nlet payload = alloc(0);\nlet isBuffer = false;\nlet dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);\nlet _offset = 0;\nexport function setPayload(bytes) {\n payload = bytes;\n isBuffer = USE_BUFFER && payload instanceof Buffer;\n dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);\n}\nexport function decode(at, to) {\n if (at >= to) {\n throw new Error(\"unexpected end of (decode) payload.\");\n }\n const major = (payload[at] & 0b1110_0000) >> 5;\n const minor = payload[at] & 0b0001_1111;\n if (minor === minorIndefinite && 2 <= major && major <= 5) {\n return decodeIndefinite(at, to);\n }\n switch (major) {\n case majorUint64:\n case majorNegativeInt64:\n case majorTag: {\n let unsignedInt;\n let offset;\n if (minor < 24) {\n unsignedInt = minor;\n offset = 1;\n }\n else {\n switch (minor) {\n case extendedOneByte:\n if (to - at < 2) {\n overflow(1);\n }\n unsignedInt = payload[at + 1];\n offset = 2;\n break;\n case extendedFloat16:\n if (to - at < 3) {\n overflow(2);\n }\n unsignedInt = dataView.getUint16(at + 1);\n offset = 3;\n break;\n case extendedFloat32:\n if (to - at < 5) {\n overflow(4);\n }\n unsignedInt = dataView.getUint32(at + 1);\n offset = 5;\n break;\n case extendedFloat64:\n if (to - at < 9) {\n overflow(8);\n }\n {\n const hi = dataView.getUint32(at + 1);\n if (hi < 0x00200000) {\n unsignedInt = hi * 4294967296 + dataView.getUint32(at + 5);\n }\n else {\n unsignedInt = dataView.getBigUint64(at + 1);\n }\n }\n offset = 9;\n break;\n default:\n unexpectedMinor(minor);\n }\n }\n if (major === majorUint64) {\n _offset = offset;\n return castBigInt(unsignedInt);\n }\n else if (major === majorNegativeInt64) {\n let negativeInt;\n if (typeof unsignedInt === \"bigint\") {\n negativeInt = BigInt(-1) - unsignedInt;\n }\n else {\n negativeInt = -1 - unsignedInt;\n }\n _offset = offset;\n return castBigInt(negativeInt);\n }\n else {\n return decodeTagValue(at, to, minor, unsignedInt, offset);\n }\n }\n case majorUtf8String:\n return decodeUtf8String(at, to);\n case majorMap:\n return decodeMap(at, to);\n case majorList:\n return decodeList(at, to);\n case majorUnstructuredByteString:\n return decodeUnstructuredByteString(at, to);\n default:\n return decodeSpecial(at, to);\n }\n}\nfunction decodeIndefinite(at, to) {\n const major = (payload[at] & 0b1110_0000) >> 5;\n const minor = payload[at] & 0b0001_1111;\n if (minor === minorIndefinite) {\n switch (major) {\n case majorUtf8String:\n return decodeUtf8StringIndefinite(at, to);\n case majorMap:\n return decodeMapIndefinite(at, to);\n case majorList:\n return decodeListIndefinite(at, to);\n case majorUnstructuredByteString:\n return decodeUnstructuredByteStringIndefinite(at, to);\n default:\n }\n }\n}\nexport function bytesToFloat16(a, b) {\n const sign = a >> 7;\n const exponent = (a & 0b0111_1100) >> 2;\n const fraction = ((a & 0b0000_0011) << 8) | b;\n const scalar = sign === 0 ? 1 : -1;\n if (exponent === 0b00000) {\n if (fraction === 0) {\n return 0;\n }\n return scalar * (Math.pow(2, 1 - 15) * (fraction / 1024));\n }\n else if (exponent === 0b11111) {\n if (fraction === 0) {\n return scalar * Infinity;\n }\n return NaN;\n }\n return scalar * (Math.pow(2, exponent - 15) * (1 + fraction / 1024));\n}\nfunction decodeMap(at, to) {\n const mapDataLength = decodeCount(at, to);\n if (mapDataLength < 15) {\n return decodeMapSmall(at, to, mapDataLength);\n }\n return decodeMapLarge(at, to, mapDataLength);\n}\nfunction decodeMapLarge(at, to, mapDataLength) {\n const offset = _offset;\n at += offset;\n const base = at;\n const map = Object.create(null);\n for (let i = 0; i < mapDataLength; ++i) {\n const key = decodeUtf8String(at, to);\n at += _offset;\n const valMajor = (payload[at] & 0b1110_0000) >> 5;\n if (valMajor === majorUtf8String) {\n map[key] = decodeUtf8String(at, to);\n }\n else {\n map[key] = decode(at, to);\n }\n at += _offset;\n }\n _offset = offset + (at - base);\n Object.setPrototypeOf(map, Object.prototype);\n return map;\n}\nfunction decodeMapSmall(at, to, mapDataLength) {\n const offset = _offset;\n at += offset;\n const base = at;\n const map = {};\n for (let i = 0; i < mapDataLength; ++i) {\n const key = decodeUtf8String(at, to);\n at += _offset;\n map[key] = decode(at, to);\n at += _offset;\n }\n _offset = offset + (at - base);\n return map;\n}\nfunction decodeList(at, to) {\n const listDataLength = decodeCount(at, to);\n const offset = _offset;\n at += offset;\n const base = at;\n const list = Array(listDataLength);\n for (let i = 0; i < listDataLength; ++i) {\n list[i] = decode(at, to);\n at += _offset;\n }\n _offset = offset + (at - base);\n return list;\n}\nfunction decodeUtf8String(at, to) {\n const length = decodeCount(at, to);\n const offset = _offset;\n at += offset;\n if (to - at < length) {\n overflow(length);\n }\n _offset = offset + length;\n if (length < 24) {\n return decodeUtf8StringCached(at, length);\n }\n if (isBuffer) {\n return payload.toString(\"utf-8\", at, at + length);\n }\n return textDecoder.decode(payload.subarray(at, at + length));\n}\nconst stringCache = new Array(2048);\nconst stringCacheEpochs = new Uint16Array(2048);\nlet cacheEpoch = 0;\nexport function advanceDecodingEpoch() {\n cacheEpoch = (cacheEpoch + 1) & 0b1111_1111_1111_1111;\n}\nfunction decodeUtf8StringCached(at, length) {\n let h = length;\n for (let i = 0; i < length; ++i) {\n h = (h * 31 + payload[at + i]) | 0;\n }\n const slot = (h >>> 0) & 2047;\n const cached = stringCache[slot];\n if (cached !== undefined) {\n if (cached.length === length) {\n let match = true;\n for (let i = 0; i < length; ++i) {\n if (cached.charCodeAt(i) !== payload[at + i]) {\n match = false;\n break;\n }\n }\n if (match) {\n stringCacheEpochs[slot] = cacheEpoch;\n return cached;\n }\n }\n }\n const result = isBuffer\n ? payload.toString(\"utf-8\", at, at + length)\n : textDecoder.decode(payload.subarray(at, at + length));\n if (stringCacheEpochs[slot] !== cacheEpoch) {\n stringCache[slot] = result;\n stringCacheEpochs[slot] = cacheEpoch;\n }\n return result;\n}\nfunction decodeUnstructuredByteString(at, to) {\n const length = decodeCount(at, to);\n const offset = _offset;\n at += offset;\n if (to - at < length) {\n overflow(length);\n }\n const value = payload.subarray(at, at + length);\n _offset = offset + length;\n return value;\n}\nfunction decodeTagValue(at, to, minor, unsignedInt, offset) {\n if (minor === 2 || minor === 3) {\n const length = decodeCount(at + offset, to);\n let b = BigInt(0);\n const start = at + offset + _offset;\n for (let i = start; i < start + length; ++i) {\n b = (b << BigInt(8)) | BigInt(payload[i]);\n }\n _offset = offset + _offset + length;\n return minor === 3 ? -b - BigInt(1) : b;\n }\n else if (minor === 4) {\n const decimalFraction = decode(at + offset, to);\n const [exponent, mantissa] = decimalFraction;\n const normalizer = mantissa < 0 ? -1 : 1;\n const mantissaStr = \"0\".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa));\n let numericString;\n const sign = mantissa < 0 ? \"-\" : \"\";\n numericString =\n exponent === 0\n ? mantissaStr\n : mantissaStr.slice(0, mantissaStr.length + exponent) + \".\" + mantissaStr.slice(exponent);\n numericString = numericString.replace(/^0+/g, \"\");\n if (numericString === \"\") {\n numericString = \"0\";\n }\n if (numericString[0] === \".\") {\n numericString = \"0\" + numericString;\n }\n numericString = sign + numericString;\n _offset = offset + _offset;\n return nv(numericString);\n }\n else {\n const value = decode(at + offset, to);\n const valueOffset = _offset;\n _offset = offset + valueOffset;\n return tag({ tag: castBigInt(unsignedInt), value });\n }\n}\nfunction decodeSpecial(at, to) {\n const minor = payload[at] & 0b0001_1111;\n switch (minor) {\n case specialTrue:\n case specialFalse:\n _offset = 1;\n return minor === specialTrue;\n case specialNull:\n _offset = 1;\n return null;\n case specialUndefined:\n _offset = 1;\n return null;\n case extendedFloat16:\n if (to - at < 3) {\n throw new Error(\"incomplete float16 at end of buf.\");\n }\n _offset = 3;\n return bytesToFloat16(payload[at + 1], payload[at + 2]);\n case extendedFloat32:\n if (to - at < 5) {\n throw new Error(\"incomplete float32 at end of buf.\");\n }\n _offset = 5;\n return dataView.getFloat32(at + 1);\n case extendedFloat64:\n if (to - at < 9) {\n throw new Error(\"incomplete float64 at end of buf.\");\n }\n _offset = 9;\n return dataView.getFloat64(at + 1);\n default:\n unexpectedMinor(minor);\n }\n}\nfunction decodeCount(at, to) {\n const minor = payload[at] & 0b0001_1111;\n if (minor < 24) {\n _offset = 1;\n return minor;\n }\n switch (minor) {\n case extendedOneByte:\n if (to - at < 2) {\n overflow(1);\n }\n _offset = 2;\n return payload[at + 1];\n case extendedFloat16:\n if (to - at < 3) {\n overflow(2);\n }\n _offset = 3;\n return dataView.getUint16(at + 1);\n case extendedFloat32:\n if (to - at < 5) {\n overflow(4);\n }\n _offset = 5;\n return dataView.getUint32(at + 1);\n case extendedFloat64:\n if (to - at < 9) {\n overflow(8);\n }\n _offset = 9;\n return demote(dataView.getBigUint64(at + 1));\n default:\n unexpectedMinor(minor);\n }\n}\nfunction decodeMapIndefinite(at, to) {\n at += 1;\n const base = at;\n const map = {};\n for (; at < to;) {\n if (payload[at] === 0b1111_1111) {\n _offset = at - base + 2;\n return map;\n }\n const key = decodeUtf8String(at, to);\n at += _offset;\n map[key] = decode(at, to);\n at += _offset;\n }\n throw new Error(\"expected break marker.\");\n}\nfunction decodeListIndefinite(at, to) {\n at += 1;\n const list = [];\n for (const base = at; at < to;) {\n if (payload[at] === 0b1111_1111) {\n _offset = at - base + 2;\n return list;\n }\n list.push(decode(at, to));\n at += _offset;\n }\n throw new Error(\"expected break marker.\");\n}\nfunction decodeUtf8StringIndefinite(at, to) {\n at += 1;\n const vector = [];\n for (const base = at; at < to;) {\n if (payload[at] === 0b1111_1111) {\n const data = alloc(vector.length);\n data.set(vector, 0);\n _offset = at - base + 2;\n if (USE_BUFFER) {\n return data.toString(\"utf-8\", 0, data.length);\n }\n return textDecoder.decode(data);\n }\n const major = (payload[at] & 0b1110_0000) >> 5;\n const minor = payload[at] & 0b0001_1111;\n if (major !== majorUtf8String) {\n unexpectedMajorInIndefiniteString(major);\n }\n if (minor === minorIndefinite) {\n throw new Error(\"nested indefinite string.\");\n }\n const bytes = decodeUnstructuredByteString(at, to);\n const length = _offset;\n at += length;\n for (let i = 0; i < bytes.length; ++i) {\n vector.push(bytes[i]);\n }\n }\n throw new Error(\"expected break marker.\");\n}\nfunction decodeUnstructuredByteStringIndefinite(at, to) {\n at += 1;\n const vector = [];\n for (const base = at; at < to;) {\n if (payload[at] === 0b1111_1111) {\n const data = alloc(vector.length);\n data.set(vector, 0);\n _offset = at - base + 2;\n return data;\n }\n const major = (payload[at] & 0b1110_0000) >> 5;\n const minor = payload[at] & 0b0001_1111;\n if (major !== majorUnstructuredByteString) {\n unexpectedMajorInIndefiniteString(major);\n }\n if (minor === minorIndefinite) {\n throw new Error(\"nested indefinite string.\");\n }\n const bytes = decodeUnstructuredByteString(at, to);\n const length = _offset;\n at += length;\n for (let i = 0; i < bytes.length; ++i) {\n vector.push(bytes[i]);\n }\n }\n throw new Error(\"expected break marker.\");\n}\nfunction castBigInt(bigInt) {\n if (typeof bigInt === \"number\") {\n return bigInt;\n }\n const num = Number(bigInt);\n if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) {\n return num;\n }\n return bigInt;\n}\nfunction demote(bigInteger) {\n const num = Number(bigInteger);\n if (num < Number.MIN_SAFE_INTEGER || Number.MAX_SAFE_INTEGER < num) {\n console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${bigInteger}) to ${num} with loss of precision.`));\n }\n return num;\n}\nfunction overflow(n) {\n throw new Error(`length ${n} greater than remaining buf len.`);\n}\nfunction unexpectedMinor(minor) {\n throw new Error(`unexpected minor value ${minor}.`);\n}\nfunction unexpectedMajorInIndefiniteString(major) {\n throw new Error(`unexpected major type ${major} in indefinite string.`);\n}\n", "import { NumericValue } from \"@smithy/core/serde\";\nimport { alloc, extendedFloat16, extendedFloat32, extendedFloat64, majorList, majorMap, majorNegativeInt64, majorSpecial, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, specialFalse, specialNull, specialTrue, tagSymbol, } from \"./cbor-types\";\nconst USE_BUFFER = typeof Buffer !== \"undefined\";\nconst encodeStringCache = new Map();\nlet encodeCacheEpoch = 0;\nlet encodeCacheSaturated = false;\nconst initialSize = 2048;\nlet data = alloc(initialSize);\nlet dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\nlet cursor = 0;\nexport function encode(_input) {\n const encodeStack = [_input];\n while (encodeStack.length) {\n const input = encodeStack.pop();\n if (typeof input === \"string\") {\n const len = input.length;\n if (USE_BUFFER) {\n ensureSpace(len * 3 + 9);\n if (len > 23) {\n encodeHeader(majorUtf8String, Buffer.byteLength(input));\n cursor += data.write(input, cursor);\n }\n else {\n encodeStringCached(input);\n }\n }\n else {\n const maxBytes = len * 3;\n ensureSpace(maxBytes + 9);\n const headerPos = cursor;\n const result = new TextEncoder().encodeInto(input, data.subarray(cursor + 9));\n const byteLen = result.written;\n let headerSize;\n if (byteLen < 24) {\n headerSize = 1;\n }\n else if (byteLen < 256) {\n headerSize = 2;\n }\n else if (byteLen < 65536) {\n headerSize = 3;\n }\n else if (byteLen < 4294967296) {\n headerSize = 5;\n }\n else {\n headerSize = 9;\n }\n if (headerSize < 9) {\n data.copyWithin(headerPos + headerSize, headerPos + 9, headerPos + 9 + byteLen);\n }\n cursor = headerPos;\n encodeInteger(majorUtf8String, byteLen);\n cursor += byteLen;\n }\n continue;\n }\n if (data.byteLength - cursor < 9) {\n ensureSpace(64);\n }\n if (typeof input === \"number\") {\n if (Number.isInteger(input)) {\n const nonNegative = input >= 0;\n const major = nonNegative ? majorUint64 : majorNegativeInt64;\n const value = nonNegative ? input : -input - 1;\n if (value < 24) {\n data[cursor++] = (major << 5) | value;\n }\n else if (value < 256) {\n data[cursor++] = (major << 5) | 24;\n data[cursor++] = value;\n }\n else if (value < 65536) {\n data[cursor++] = (major << 5) | extendedFloat16;\n data[cursor++] = value >> 8;\n data[cursor++] = value & 0xff;\n }\n else if (value < 4294967296) {\n data[cursor++] = (major << 5) | extendedFloat32;\n dataView.setUint32(cursor, value);\n cursor += 4;\n }\n else {\n data[cursor++] = (major << 5) | extendedFloat64;\n const hi = (value / 4294967296) | 0;\n const lo = (value - hi * 4294967296) | 0;\n dataView.setUint32(cursor, hi);\n dataView.setUint32(cursor + 4, lo);\n cursor += 8;\n }\n continue;\n }\n data[cursor++] = (majorSpecial << 5) | extendedFloat64;\n dataView.setFloat64(cursor, input);\n cursor += 8;\n continue;\n }\n else if (typeof input === \"bigint\") {\n const nonNegative = input >= 0;\n const major = nonNegative ? majorUint64 : majorNegativeInt64;\n const value = nonNegative ? input : -input - BigInt(1);\n if (value < BigInt(\"18446744073709551616\")) {\n const n = Number(value);\n if (n < 4294967296) {\n encodeInteger(major, n);\n }\n else {\n data[cursor++] = (major << 5) | extendedFloat64;\n dataView.setBigUint64(cursor, value);\n cursor += 8;\n }\n }\n else {\n const binaryBigInt = value.toString(2);\n const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));\n let b = value;\n let i = 0;\n while (bigIntBytes.byteLength - ++i >= 0) {\n bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));\n b >>= BigInt(8);\n }\n ensureSpace(bigIntBytes.byteLength * 2 + 16);\n data[cursor++] = nonNegative ? 0b110_00010 : 0b110_00011;\n encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);\n data.set(bigIntBytes, cursor);\n cursor += bigIntBytes.byteLength;\n }\n continue;\n }\n else if (input === null) {\n data[cursor++] = (majorSpecial << 5) | specialNull;\n continue;\n }\n else if (typeof input === \"boolean\") {\n data[cursor++] = (majorSpecial << 5) | (input ? specialTrue : specialFalse);\n continue;\n }\n else if (typeof input === \"undefined\") {\n throw new Error(\"@smithy/core/cbor: client may not serialize undefined value.\");\n }\n else if (Array.isArray(input)) {\n encodeInteger(majorList, input.length);\n ensureSpace(input.length * 9 + 64);\n for (let i = input.length - 1; i >= 0; --i) {\n encodeStack.push(input[i]);\n }\n continue;\n }\n else if (typeof input.byteLength === \"number\") {\n ensureSpace(input.length * 2 + 9);\n encodeInteger(majorUnstructuredByteString, input.length);\n data.set(input, cursor);\n cursor += input.byteLength;\n continue;\n }\n else if (typeof input === \"object\") {\n if (input instanceof NumericValue) {\n const decimalIndex = input.string.indexOf(\".\");\n const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;\n const mantissa = BigInt(input.string.replace(\".\", \"\"));\n data[cursor++] = 0b110_00100;\n encodeInteger(majorList, 2);\n encodeStack.push(mantissa);\n encodeStack.push(exponent);\n continue;\n }\n if (input[tagSymbol]) {\n if (\"tag\" in input && \"value\" in input) {\n encodeStack.push(input.value);\n encodeHeader(majorTag, input.tag);\n continue;\n }\n else {\n throw new Error(\"tag encountered with missing fields, need 'tag' and 'value', found: \" + JSON.stringify(input));\n }\n }\n const keys = Object.keys(input);\n const len = keys.length;\n encodeInteger(majorMap, len);\n for (let i = len - 1; i >= 0; --i) {\n encodeStack.push(input[keys[i]]);\n encodeStack.push(keys[i]);\n }\n continue;\n }\n throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`);\n }\n}\nexport function advanceEncodingEpoch() {\n encodeCacheEpoch = (encodeCacheEpoch + 1) & 0b1111_1111_1111_1111;\n encodeCacheSaturated = false;\n}\nexport function toUint8Array() {\n const out = alloc(cursor);\n out.set(data.subarray(0, cursor), 0);\n cursor = 0;\n return out;\n}\nexport function resize(size) {\n const old = data;\n data = alloc(size);\n if (old) {\n if (old.copy) {\n old.copy(data, 0, 0, old.byteLength);\n }\n else {\n data.set(old, 0);\n }\n }\n dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\n}\nfunction encodeStringCached(input) {\n const cached = encodeStringCache.get(input);\n if (cached !== undefined) {\n data.set(cached.bytes, cursor);\n cursor += cached.bytes.length;\n cached.epoch = encodeCacheEpoch;\n return;\n }\n const start = cursor;\n const byteLen = Buffer.byteLength(input);\n encodeInteger(majorUtf8String, byteLen);\n cursor += data.write(input, cursor);\n const bytes = Uint8Array.prototype.slice.call(data, start, cursor);\n if (encodeStringCache.size >= 2048) {\n if (encodeCacheSaturated) {\n return;\n }\n let evicted = 0;\n for (const [key, entry] of encodeStringCache) {\n if (evicted >= 1024) {\n break;\n }\n if (entry.epoch !== encodeCacheEpoch) {\n encodeStringCache.delete(key);\n evicted++;\n }\n }\n if (evicted === 0) {\n encodeCacheSaturated = true;\n return;\n }\n }\n if (encodeStringCache.size < 2048) {\n encodeStringCache.set(input, { epoch: encodeCacheEpoch, bytes });\n }\n}\nfunction ensureSpace(bytes) {\n const remaining = data.byteLength - cursor;\n if (remaining < bytes) {\n if (cursor < 16_000_000) {\n resize(Math.max(data.byteLength * 4, data.byteLength + bytes));\n }\n else {\n resize(data.byteLength + bytes + 16_000_000);\n }\n }\n}\nfunction encodeHeader(major, value) {\n if (value < 24) {\n data[cursor++] = (major << 5) | value;\n }\n else if (value < 256) {\n data[cursor++] = (major << 5) | 24;\n data[cursor++] = value;\n }\n else if (value < 65536) {\n data[cursor++] = (major << 5) | extendedFloat16;\n dataView.setUint16(cursor, value);\n cursor += 2;\n }\n else if (value < 4294967296) {\n data[cursor++] = (major << 5) | extendedFloat32;\n dataView.setUint32(cursor, value);\n cursor += 4;\n }\n else {\n data[cursor++] = (major << 5) | extendedFloat64;\n dataView.setBigUint64(cursor, typeof value === \"bigint\" ? value : BigInt(value));\n cursor += 8;\n }\n}\nfunction encodeInteger(major, value) {\n if (value < 24) {\n data[cursor++] = (major << 5) | value;\n }\n else if (value < 256) {\n data[cursor++] = (major << 5) | 24;\n data[cursor++] = value;\n }\n else if (value < 65536) {\n data[cursor++] = (major << 5) | extendedFloat16;\n data[cursor++] = value >> 8;\n data[cursor++] = value & 0xff;\n }\n else if (value < 4294967296) {\n data[cursor++] = (major << 5) | extendedFloat32;\n dataView.setUint32(cursor, value);\n cursor += 4;\n }\n else {\n data[cursor++] = (major << 5) | extendedFloat64;\n const hi = (value / 4294967296) | 0;\n const lo = (value - hi * 4294967296) | 0;\n dataView.setUint32(cursor, hi);\n dataView.setUint32(cursor + 4, lo);\n cursor += 8;\n }\n}\n", "import { advanceDecodingEpoch, decode, setPayload } from \"./cbor-decode\";\nimport { advanceEncodingEpoch, encode, resize, toUint8Array } from \"./cbor-encode\";\nexport const cbor = {\n deserialize(payload) {\n advanceDecodingEpoch();\n setPayload(payload);\n return decode(0, payload.length);\n },\n serialize(input) {\n advanceEncodingEpoch();\n try {\n encode(input);\n return toUint8Array();\n }\n catch (e) {\n toUint8Array();\n throw e;\n }\n },\n resizeEncodingBuffer(size) {\n resize(size);\n },\n};\n", "import { HttpRequest as __HttpRequest, collectBody } from \"@smithy/core/protocols\";\nimport { calculateBodyLength } from \"@smithy/core/serde\";\nimport { cbor } from \"./cbor\";\nimport { tag } from \"./cbor-types\";\nexport const parseCborBody = (streamBody, context) => {\n return collectBody(streamBody, context).then(async (bytes) => {\n if (bytes.length) {\n try {\n return cbor.deserialize(bytes);\n }\n catch (e) {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: context.utf8Encoder(bytes),\n });\n throw e;\n }\n }\n return {};\n });\n};\nexport const dateToTag = (date) => {\n return tag({\n tag: 1,\n value: date.getTime() / 1000,\n });\n};\nexport const parseCborErrorBody = async (errorBody, context) => {\n const value = await parseCborBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n};\nexport const loadSmithyRpcV2CborErrorCode = (output, data) => {\n const sanitizeErrorCode = (rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n };\n if (data[\"__type\"] !== undefined) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n let codeKey;\n for (const key in data) {\n if (key.toLowerCase() === \"code\") {\n codeKey = key;\n break;\n }\n }\n if (codeKey && data[codeKey] !== undefined) {\n return sanitizeErrorCode(data[codeKey]);\n }\n};\nexport const checkCborResponse = (response) => {\n if (String(response.headers[\"smithy-protocol\"]).toLowerCase() !== \"rpc-v2-cbor\") {\n throw new Error(\"Malformed RPCv2 CBOR response, status: \" + response.statusCode);\n }\n};\nexport const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {\n const endpoint = await context.endpoint();\n const { hostname, protocol = \"https\", port, path: basePath } = endpoint;\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers: {\n ...headers,\n },\n };\n if (resolvedHostname !== undefined) {\n contents.hostname = resolvedHostname;\n }\n if (endpoint.headers) {\n for (const name in endpoint.headers) {\n contents.headers[name] = endpoint.headers[name];\n }\n }\n if (body !== undefined) {\n contents.body = body;\n try {\n contents.headers[\"content-length\"] = String(calculateBodyLength(body));\n }\n catch (ignored) { }\n }\n return new __HttpRequest(contents);\n};\n", "import { SerdeContext } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { NumericValue, _parseEpochTimestamp, fromBase64, generateIdempotencyToken } from \"@smithy/core/serde\";\nimport { cbor } from \"./cbor\";\nimport { dateToTag } from \"./parseCborBody\";\nexport class CborCodec extends SerdeContext {\n createSerializer() {\n const serializer = new CborShapeSerializer();\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new CborShapeDeserializer();\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\nexport class CborShapeSerializer extends SerdeContext {\n value;\n write(schema, value) {\n this.value = this.serialize(schema, value);\n }\n serialize(schema, source) {\n const ns = NormalizedSchema.of(schema);\n if (source == null) {\n if (ns.isIdempotencyToken()) {\n return generateIdempotencyToken();\n }\n return source;\n }\n if (ns.isBlobSchema()) {\n if (typeof source === \"string\") {\n return (this.serdeContext?.base64Decoder ?? fromBase64)(source);\n }\n return source;\n }\n if (ns.isTimestampSchema()) {\n if (typeof source === \"number\" || typeof source === \"bigint\") {\n return dateToTag(new Date((Number(source) / 1000) | 0));\n }\n return dateToTag(source);\n }\n if (typeof source === \"function\" || typeof source === \"object\") {\n const sourceObject = source;\n if (ns.isListSchema() && Array.isArray(sourceObject)) {\n const sparse = !!ns.getMergedTraits().sparse;\n const newArray = [];\n let i = 0;\n for (const item of sourceObject) {\n const value = this.serialize(ns.getValueSchema(), item);\n if (value != null || sparse) {\n newArray[i++] = value;\n }\n }\n return newArray;\n }\n if (sourceObject instanceof Date) {\n return dateToTag(sourceObject);\n }\n const newObject = {};\n if (ns.isMapSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n for (const key in sourceObject) {\n const value = this.serialize(ns.getValueSchema(), sourceObject[key]);\n if (value != null || sparse) {\n newObject[key] = value;\n }\n }\n }\n else if (ns.isStructSchema()) {\n for (const [key, memberSchema] of ns.structIterator()) {\n const value = this.serialize(memberSchema, sourceObject[key]);\n if (value != null) {\n newObject[key] = value;\n }\n }\n const isUnion = ns.isUnionSchema();\n if (isUnion && Array.isArray(sourceObject.$unknown)) {\n const [k, v] = sourceObject.$unknown;\n newObject[k] = v;\n }\n else if (typeof sourceObject.__type === \"string\") {\n for (const k in sourceObject) {\n if (!(k in newObject)) {\n newObject[k] = this.serialize(15, sourceObject[k]);\n }\n }\n }\n }\n else if (ns.isDocumentSchema()) {\n for (const key in sourceObject) {\n newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);\n }\n }\n else if (ns.isBigDecimalSchema()) {\n return sourceObject;\n }\n return newObject;\n }\n return source;\n }\n flush() {\n const buffer = cbor.serialize(this.value);\n this.value = undefined;\n return buffer;\n }\n}\nexport class CborShapeDeserializer extends SerdeContext {\n read(schema, bytes) {\n const data = cbor.deserialize(bytes);\n return this.readValue(schema, data);\n }\n readValue(_schema, value) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isTimestampSchema()) {\n if (typeof value === \"number\") {\n return _parseEpochTimestamp(value);\n }\n if (typeof value === \"object\") {\n if (value.tag === 1 && \"value\" in value) {\n return _parseEpochTimestamp(value.value);\n }\n }\n }\n if (ns.isBlobSchema()) {\n if (typeof value === \"string\") {\n return (this.serdeContext?.base64Decoder ?? fromBase64)(value);\n }\n return value;\n }\n if (typeof value === \"undefined\" ||\n typeof value === \"boolean\" ||\n typeof value === \"number\" ||\n typeof value === \"string\" ||\n typeof value === \"bigint\" ||\n typeof value === \"symbol\") {\n return value;\n }\n else if (typeof value === \"object\") {\n if (value === null) {\n return null;\n }\n if (\"byteLength\" in value) {\n return value;\n }\n if (value instanceof Date) {\n return value;\n }\n if (ns.isDocumentSchema()) {\n return value;\n }\n if (ns.isListSchema()) {\n const newArray = [];\n const memberSchema = ns.getValueSchema();\n for (const item of value) {\n const itemValue = this.readValue(memberSchema, item);\n newArray.push(itemValue);\n }\n return newArray;\n }\n const newObject = {};\n if (ns.isMapSchema()) {\n const targetSchema = ns.getValueSchema();\n for (const key in value) {\n const itemValue = this.readValue(targetSchema, value[key]);\n newObject[key] = itemValue;\n }\n }\n else if (ns.isStructSchema()) {\n const isUnion = ns.isUnionSchema();\n let keys;\n if (isUnion) {\n keys = new Set();\n for (const k in value) {\n if (k !== \"__type\") {\n keys.add(k);\n }\n }\n }\n for (const [key, memberSchema] of ns.structIterator()) {\n if (isUnion) {\n keys.delete(key);\n }\n if (value[key] != null) {\n newObject[key] = this.readValue(memberSchema, value[key]);\n }\n }\n if (isUnion && keys?.size === 1) {\n let newObjectEmpty = true;\n for (const _ in newObject) {\n newObjectEmpty = false;\n break;\n }\n if (newObjectEmpty) {\n const k = keys.values().next().value;\n newObject.$unknown = [k, value[k]];\n }\n }\n else if (typeof value.__type === \"string\") {\n for (const k in value) {\n if (!(k in newObject)) {\n newObject[k] = value[k];\n }\n }\n }\n }\n else if (value instanceof NumericValue) {\n return value;\n }\n return newObject;\n }\n else {\n return value;\n }\n }\n}\n", "import { RpcProtocol } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry, deref } from \"@smithy/core/schema\";\nimport { getSmithyContext } from \"@smithy/core/transport\";\nimport { CborCodec } from \"./CborCodec\";\nimport { loadSmithyRpcV2CborErrorCode } from \"./parseCborBody\";\nexport class SmithyRpcV2CborProtocol extends RpcProtocol {\n codec = new CborCodec();\n serializer = this.codec.createSerializer();\n deserializer = this.codec.createDeserializer();\n constructor({ defaultNamespace, errorTypeRegistries, }) {\n super({ defaultNamespace, errorTypeRegistries });\n }\n getShapeId() {\n return \"smithy.protocols#rpcv2Cbor\";\n }\n getPayloadCodec() {\n return this.codec;\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n Object.assign(request.headers, {\n \"content-type\": this.getDefaultContentType(),\n \"smithy-protocol\": \"rpc-v2-cbor\",\n accept: this.getDefaultContentType(),\n });\n if (deref(operationSchema.input) === \"unit\") {\n delete request.body;\n delete request.headers[\"content-type\"];\n }\n else {\n if (!request.body) {\n this.serializer.write(15, {});\n request.body = this.serializer.flush();\n }\n try {\n request.headers[\"content-length\"] = String(request.body.byteLength);\n }\n catch (ignored) { }\n }\n const { service, operation } = getSmithyContext(context);\n const path = `/service/${service}/operation/${operation}`;\n if (request.path.endsWith(\"/\")) {\n request.path += path.slice(1);\n }\n else {\n request.path += path;\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n return super.deserializeResponse(operationSchema, context, response);\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? \"Unknown\";\n const errorMetadata = {\n $metadata: metadata,\n $fault: response.statusCode <= 500 ? \"client\" : \"server\",\n };\n let namespace = this.options.defaultNamespace;\n if (errorName.includes(\"#\")) {\n [namespace] = errorName.split(\"#\");\n }\n const registry = this.compositeErrorRegistry;\n const nsRegistry = TypeRegistry.for(namespace);\n registry.copyFrom(nsRegistry);\n let errorSchema;\n try {\n errorSchema = registry.getSchema(errorName);\n }\n catch (ignored) {\n if (dataObject.Message) {\n dataObject.message = dataObject.Message;\n }\n const syntheticRegistry = TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace);\n registry.copyFrom(syntheticRegistry);\n const baseExceptionSchema = registry.getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = registry.getErrorCtor(baseExceptionSchema);\n throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject);\n }\n throw Object.assign(new Error(errorName), errorMetadata, dataObject);\n }\n const ns = NormalizedSchema.of(errorSchema);\n const ErrorCtor = registry.getErrorCtor(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const exception = new ErrorCtor({});\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n output[name] = this.deserializer.readValue(member, dataObject[name]);\n }\n throw Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output);\n }\n getDefaultContentType() {\n return \"application/cbor\";\n }\n}\n", "export { cbor } from \"./cbor\";\nexport { tag, tagSymbol } from \"./cbor-types\";\nexport { buildHttpRpcRequest, checkCborResponse, dateToTag, loadSmithyRpcV2CborErrorCode, parseCborBody, parseCborErrorBody, } from \"./parseCborBody\";\nexport { SmithyRpcV2CborProtocol } from \"./SmithyRpcV2CborProtocol\";\nexport { CborCodec, CborShapeDeserializer, CborShapeSerializer } from \"./CborCodec\";\n", "import { decorateServiceException } from \"@smithy/core/client\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nexport class ProtocolLib {\n queryCompat;\n errorRegistry;\n constructor(queryCompat = false) {\n this.queryCompat = queryCompat;\n }\n resolveRestContentType(defaultContentType, inputSchema) {\n const members = inputSchema.getMemberSchemas();\n const httpPayloadMember = Object.values(members).find((m) => {\n return !!m.getMergedTraits().httpPayload;\n });\n if (httpPayloadMember) {\n const mediaType = httpPayloadMember.getMergedTraits().mediaType;\n if (mediaType) {\n return mediaType;\n }\n else if (httpPayloadMember.isStringSchema()) {\n return \"text/plain\";\n }\n else if (httpPayloadMember.isBlobSchema()) {\n return \"application/octet-stream\";\n }\n else {\n return defaultContentType;\n }\n }\n else if (!inputSchema.isUnitSchema()) {\n const hasBody = Object.values(members).find((m) => {\n const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();\n const noPrefixHeaders = httpPrefixHeaders === void 0;\n return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;\n });\n if (hasBody) {\n return defaultContentType;\n }\n }\n }\n async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [, errorName] = errorIdentifier.split(\"#\");\n }\n const errorMetadata = {\n $metadata: metadata,\n $fault: response.statusCode < 500 ? \"client\" : \"server\",\n };\n if (!this.errorRegistry) {\n throw new Error(\"@aws-sdk/core/protocols - error handler not initialized.\");\n }\n try {\n const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ??\n this.errorRegistry.getSchema(errorIdentifier);\n return { errorSchema, errorMetadata };\n }\n catch (e) {\n dataObject.message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n const synthetic = this.errorRegistry;\n const baseExceptionSchema = synthetic.getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;\n throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);\n }\n const d = dataObject;\n const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message;\n throw this.decorateServiceException(Object.assign(new Error(message), {\n name: errorName,\n }, errorMetadata), dataObject);\n }\n }\n compose(composite, errorIdentifier, defaultNamespace) {\n let namespace = defaultNamespace;\n if (errorIdentifier.includes(\"#\")) {\n [namespace] = errorIdentifier.split(\"#\");\n }\n const staticRegistry = TypeRegistry.for(namespace);\n const defaultSyntheticRegistry = TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + defaultNamespace);\n composite.copyFrom(staticRegistry);\n composite.copyFrom(defaultSyntheticRegistry);\n this.errorRegistry = composite;\n }\n decorateServiceException(exception, additions = {}) {\n if (this.queryCompat) {\n const msg = exception.Message ?? additions.Message;\n const error = decorateServiceException(exception, additions);\n if (msg) {\n error.message = msg;\n }\n const errorObj = error.Error ?? {};\n errorObj.Type = error.Error?.Type;\n errorObj.Code = error.Error?.Code;\n errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;\n error.Error = errorObj;\n const reqId = error.$metadata.requestId;\n if (reqId) {\n error.RequestId = reqId;\n }\n return error;\n }\n return decorateServiceException(exception, additions);\n }\n setQueryCompatError(output, response) {\n const queryErrorHeader = response.headers?.[\"x-amzn-query-error\"];\n if (output !== undefined && queryErrorHeader != null) {\n const [Code, Type] = queryErrorHeader.split(\";\");\n const keys = Object.keys(output);\n const Error = {\n Code,\n Type,\n };\n output.Code = Code;\n output.Type = Type;\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n Error[k === \"message\" ? \"Message\" : k] = output[k];\n }\n delete Error.__type;\n output.Error = Error;\n }\n }\n queryCompatOutput(queryCompatErrorData, errorData) {\n if (queryCompatErrorData.Error) {\n errorData.Error = queryCompatErrorData.Error;\n }\n if (queryCompatErrorData.Type) {\n errorData.Type = queryCompatErrorData.Type;\n }\n if (queryCompatErrorData.Code) {\n errorData.Code = queryCompatErrorData.Code;\n }\n }\n findQueryCompatibleError(registry, errorName) {\n try {\n return registry.getSchema(errorName);\n }\n catch (e) {\n return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);\n }\n }\n}\n", "import { loadSmithyRpcV2CborErrorCode, SmithyRpcV2CborProtocol } from \"@smithy/core/cbor\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nexport class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {\n awsQueryCompatible;\n mixin;\n constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible, }) {\n super({ defaultNamespace, errorTypeRegistries });\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n return request;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n if (this.awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorName = (() => {\n const compatHeader = response.headers[\"x-amzn-query-error\"];\n if (compatHeader && this.awsQueryCompatible) {\n return compatHeader.split(\";\")[0];\n }\n return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? \"Unknown\";\n })();\n this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor({});\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = this.deserializer.readValue(member, dataObject[name]);\n }\n }\n if (this.awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "export const _toStr = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n};\nexport const _toBool = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n};\nexport const _toNum = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n};\n", "export class SerdeContextConfig {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "export class UnionSerde {\n from;\n to;\n keys;\n constructor(from, to) {\n this.from = from;\n this.to = to;\n const keys = Object.keys(this.from);\n const set = new Set(keys);\n set.delete(\"__type\");\n this.keys = set;\n }\n mark(key) {\n this.keys.delete(key);\n }\n hasUnknown() {\n return this.keys.size === 1 && Object.keys(this.to).length === 0;\n }\n writeUnknown() {\n if (this.hasUnknown()) {\n const k = this.keys.values().next().value;\n const v = this.from[k];\n this.to.$unknown = [k, v];\n }\n }\n}\n", "import { NumericValue } from \"@smithy/core/serde\";\nexport function jsonReviver(key, value, context) {\n if (context?.source) {\n const numericString = context.source;\n if (typeof value === \"number\") {\n if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {\n const isFractional = numericString.includes(\".\");\n if (isFractional) {\n return new NumericValue(numericString, \"bigDecimal\");\n }\n else {\n return BigInt(numericString);\n }\n }\n }\n }\n return value;\n}\n", "import { collectBody } from \"@smithy/core/protocols\";\nimport { toUtf8 } from \"@smithy/core/serde\";\nexport const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body));\n", "import { collectBodyString } from \"../common\";\nexport const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n }\n catch (e) {\n if (e?.name === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n }\n return {};\n});\nexport const parseJsonErrorBody = async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n};\nconst findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());\nconst sanitizeErrorCode = (rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n};\nexport const loadRestJsonErrorCode = (output, data) => {\n return loadErrorCode(output, data, [\"header\", \"code\", \"type\"]);\n};\nexport const loadJsonRpcErrorCode = (output, data, queryCompat = false) => {\n return loadErrorCode(output, data, queryCompat ? [\"code\", \"header\", \"type\"] : [\"type\", \"code\", \"header\"]);\n};\nconst loadErrorCode = ({ headers }, data, order) => {\n while (order.length > 0) {\n const location = order.shift();\n switch (location) {\n case \"header\":\n const headerKey = findKey(headers ?? {}, \"x-amzn-errortype\");\n if (headerKey !== undefined) {\n return sanitizeErrorCode(headers[headerKey]);\n }\n break;\n case \"code\":\n const codeKey = findKey(data ?? {}, \"code\");\n if (codeKey && data[codeKey] !== undefined) {\n return sanitizeErrorCode(data[codeKey]);\n }\n break;\n case \"type\":\n if (data?.__type !== undefined) {\n return sanitizeErrorCode(data.__type);\n }\n break;\n }\n }\n};\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/core/serde\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nimport { jsonReviver } from \"./jsonReviver\";\nimport { parseJsonBody } from \"./parseJsonBody\";\nexport class JsonShapeDeserializer extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n async read(schema, data) {\n return this._read(schema, typeof data === \"string\" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));\n }\n readObject(schema, data) {\n return this._read(schema, data);\n }\n _read(schema, value) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const union = ns.isUnionSchema();\n const out = {};\n let nameMap = void 0;\n const { jsonName } = this.settings;\n if (jsonName) {\n nameMap = {};\n }\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(record, out);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n let fromKey = memberName;\n if (jsonName) {\n fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;\n nameMap[fromKey] = memberName;\n }\n if (union) {\n unionSerde.mark(fromKey);\n }\n if (record[fromKey] != null) {\n out[memberName] = this._read(memberSchema, record[fromKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n else if (typeof record.__type === \"string\") {\n for (const k in record) {\n const v = record[k];\n const t = jsonName ? (nameMap[k] ?? k) : k;\n if (!(t in out)) {\n out[t] = v;\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n for (const item of value) {\n out.push(this._read(listMember, item));\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n for (const _k in value) {\n out[_k] = this._read(mapMember, value[_k]);\n }\n return out;\n }\n }\n if (ns.isBlobSchema() && typeof value === \"string\") {\n return fromBase64(value);\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n return value;\n }\n if (ns.isTimestampSchema() && value != null) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return parseRfc3339DateTimeWithOffset(value);\n case 6:\n return parseRfc7231DateTime(value);\n case 7:\n return parseEpochTimestamp(value);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", value);\n return new Date(value);\n }\n }\n if (ns.isBigIntegerSchema() && (typeof value === \"number\" || typeof value === \"string\")) {\n return BigInt(value);\n }\n if (ns.isBigDecimalSchema() && value != undefined) {\n if (value instanceof NumericValue) {\n return value;\n }\n const untyped = value;\n if (untyped.type === \"bigDecimal\" && \"string\" in untyped) {\n return new NumericValue(untyped.string, untyped.type);\n }\n return new NumericValue(String(value), \"bigDecimal\");\n }\n if (ns.isNumericSchema() && typeof value === \"string\") {\n switch (value) {\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n case \"NaN\":\n return NaN;\n }\n return value;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const k in value) {\n const v = value[k];\n if (v instanceof NumericValue) {\n out[k] = v;\n }\n else {\n out[k] = this._read(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { NumericValue } from \"@smithy/core/serde\";\nconst NUMERIC_CONTROL_CHAR = String.fromCharCode(925);\nexport class JsonReplacer {\n values = new Map();\n counter = 0;\n stage = 0;\n createReplacer() {\n if (this.stage === 1) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer already created.\");\n }\n if (this.stage === 2) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n }\n this.stage = 1;\n return (key, value) => {\n if (value instanceof NumericValue) {\n const v = `${NUMERIC_CONTROL_CHAR + \"nv\" + this.counter++}_` + value.string;\n this.values.set(`\"${v}\"`, value.string);\n return v;\n }\n if (typeof value === \"bigint\") {\n const s = value.toString();\n const v = `${NUMERIC_CONTROL_CHAR + \"b\" + this.counter++}_` + s;\n this.values.set(`\"${v}\"`, s);\n return v;\n }\n return value;\n };\n }\n replaceInJson(json) {\n if (this.stage === 0) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer not created yet.\");\n }\n if (this.stage === 2) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n }\n this.stage = 2;\n if (this.counter === 0) {\n return json;\n }\n for (const [key, value] of this.values) {\n json = json.replace(key, value);\n }\n return json;\n }\n}\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from \"@smithy/core/serde\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonReplacer } from \"./jsonReplacer\";\nexport class JsonShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n useReplacer = false;\n rootSchema;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n this.rootSchema = NormalizedSchema.of(schema);\n this.buffer = this._write(this.rootSchema, value);\n }\n flush() {\n const { rootSchema, useReplacer } = this;\n this.rootSchema = undefined;\n this.useReplacer = false;\n if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {\n if (!useReplacer) {\n return JSON.stringify(this.buffer);\n }\n const replacer = new JsonReplacer();\n return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));\n }\n return this.buffer;\n }\n writeDiscriminatedDocument(schema, value) {\n this.write(schema, value);\n if (typeof this.buffer === \"object\") {\n this.buffer.__type = NormalizedSchema.of(schema).getName(true);\n }\n }\n _write(schema, value, container) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const out = {};\n const { jsonName } = this.settings;\n let nameMap = void 0;\n if (jsonName) {\n nameMap = {};\n }\n let outCount = 0;\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const serializableValue = this._write(memberSchema, record[memberName], ns);\n if (serializableValue !== undefined) {\n let targetKey = memberName;\n if (jsonName) {\n targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;\n nameMap[memberName] = targetKey;\n }\n out[targetKey] = serializableValue;\n outCount++;\n }\n }\n if (ns.isUnionSchema() && outCount === 0) {\n const { $unknown } = record;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n out[k] = this._write(15, v);\n }\n }\n else if (typeof record.__type === \"string\") {\n for (const k in record) {\n const v = record[k];\n const targetKey = jsonName ? (nameMap[k] ?? k) : k;\n if (!(targetKey in out)) {\n out[targetKey] = this._write(15, v);\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n const sparse = !!ns.getMergedTraits().sparse;\n for (const item of value) {\n if (sparse || item != null) {\n out.push(this._write(listMember, item));\n }\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n const sparse = !!ns.getMergedTraits().sparse;\n for (const _k in value) {\n const _v = value[_k];\n if (sparse || _v != null) {\n out[_k] = this._write(mapMember, _v);\n }\n }\n return out;\n }\n if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return value.toISOString().replace(\".000Z\", \"Z\");\n case 6:\n return dateToUtcString(value);\n case 7:\n return value.getTime() / 1000;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n return value.getTime() / 1000;\n }\n }\n if (value instanceof NumericValue) {\n this.useReplacer = true;\n }\n }\n if (value === null && container?.isStructSchema()) {\n return void 0;\n }\n if (ns.isStringSchema()) {\n if (typeof value === \"undefined\" && ns.isIdempotencyToken()) {\n return generateIdempotencyToken();\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (value != null && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n }\n return value;\n }\n if (typeof value === \"number\" && ns.isNumericSchema()) {\n if (Math.abs(value) === Infinity || isNaN(value)) {\n return String(value);\n }\n return value;\n }\n if (typeof value === \"string\" && ns.isBlobSchema()) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (typeof value === \"bigint\") {\n this.useReplacer = true;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const k in value) {\n const v = value[k];\n if (v instanceof NumericValue) {\n this.useReplacer = true;\n out[k] = v;\n }\n else {\n out[k] = this._write(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonShapeDeserializer } from \"./JsonShapeDeserializer\";\nimport { JsonShapeSerializer } from \"./JsonShapeSerializer\";\nexport class JsonCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new JsonShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new JsonShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadJsonRpcErrorCode } from \"./parseJsonBody\";\nexport class AwsJsonRpcProtocol extends RpcProtocol {\n serializer;\n deserializer;\n serviceTarget;\n codec;\n mixin;\n awsQueryCompatible;\n constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n errorTypeRegistries,\n });\n this.serviceTarget = serviceTarget;\n this.codec =\n jsonCodec ??\n new JsonCodec({\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n jsonName: false,\n });\n this.serializer = this.codec.createSerializer();\n this.deserializer = this.codec.createDeserializer();\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n request.headers[\"content-type\"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;\n request.headers[\"x-amz-target\"] = `${this.serviceTarget}.${operationSchema.name}`;\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"{}\";\n }\n return request;\n }\n getPayloadCodec() {\n return this.codec;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const { awsQueryCompatible } = this;\n if (awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorIdentifier = loadJsonRpcErrorCode(response, dataObject, awsQueryCompatible) ?? \"Unknown\";\n this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor({});\n const output = {};\n const errorDeserializer = this.codec.createDeserializer();\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = errorDeserializer.readObject(member, dataObject[name]);\n }\n }\n if (awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_0Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n errorTypeRegistries,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_0\";\n }\n getJsonRpcVersion() {\n return \"1.0\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.0\";\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_1Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, errorTypeRegistries, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n errorTypeRegistries,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_1\";\n }\n getJsonRpcVersion() {\n return \"1.1\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.1\";\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsRestJsonProtocol extends HttpBindingProtocol {\n serializer;\n deserializer;\n codec;\n mixin = new ProtocolLib();\n constructor({ defaultNamespace, errorTypeRegistries, }) {\n super({\n defaultNamespace,\n errorTypeRegistries,\n });\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n httpBindings: true,\n jsonName: true,\n };\n this.codec = new JsonCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getShapeId() {\n return \"aws.protocols#restJson1\";\n }\n getPayloadCodec() {\n return this.codec;\n }\n setSerdeContext(serdeContext) {\n this.codec.setSerdeContext(serdeContext);\n super.setSerdeContext(serdeContext);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (request.body == null && request.headers[\"content-type\"] === this.getDefaultContentType()) {\n request.body = \"{}\";\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const output = await super.deserializeResponse(operationSchema, context, response);\n const outputSchema = NormalizedSchema.of(operationSchema.output);\n for (const [name, member] of outputSchema.structIterator()) {\n if (member.getMemberTraits().httpPayload && !(name in output)) {\n output[name] = null;\n }\n }\n return output;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor({});\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n const errorDeserializer = this.codec.createDeserializer();\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().jsonName ?? name;\n output[name] = errorDeserializer.readObject(member, dataObject[target]);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/json\";\n }\n}\n", "import { expectUnion } from \"@smithy/core/serde\";\nexport const awsExpectUnion = (value) => {\n if (value == null) {\n return undefined;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return expectUnion(value);\n};\n", "const ATTR_ESCAPE_RE = /[&<>\"]/g;\nconst ATTR_ESCAPE_MAP = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\",\n '\"': \""\",\n};\nfunction escapeAttribute(value) {\n return value.replace(ATTR_ESCAPE_RE, (ch) => ATTR_ESCAPE_MAP[ch]);\n}\n\nconst ELEMENT_ESCAPE_RE = /[&\"'<>\\r\\n\\u0085\\u2028]/g;\nconst ELEMENT_ESCAPE_MAP = {\n \"&\": \"&\",\n '\"': \""\",\n \"'\": \"'\",\n \"<\": \"<\",\n \">\": \">\",\n \"\\r\": \" \",\n \"\\n\": \" \",\n \"\\u0085\": \"…\",\n \"\\u2028\": \"
\",\n};\nfunction escapeElement(value) {\n return value.replace(ELEMENT_ESCAPE_RE, (ch) => ELEMENT_ESCAPE_MAP[ch]);\n}\n\nclass XmlText {\n value;\n constructor(value) {\n this.value = value;\n }\n toString() {\n return escapeElement(\"\" + this.value);\n }\n}\n\nclass XmlNode {\n name;\n children;\n attributes = {};\n static of(name, childText, withName) {\n const node = new XmlNode(name);\n if (childText !== undefined) {\n node.addChildNode(new XmlText(childText));\n }\n if (withName !== undefined) {\n node.withName(withName);\n }\n return node;\n }\n constructor(name, children = []) {\n this.name = name;\n this.children = children;\n }\n withName(name) {\n this.name = name;\n return this;\n }\n addAttribute(name, value) {\n this.attributes[name] = value;\n return this;\n }\n addChildNode(child) {\n this.children.push(child);\n return this;\n }\n removeAttribute(name) {\n delete this.attributes[name];\n return this;\n }\n n(name) {\n this.name = name;\n return this;\n }\n c(child) {\n this.children.push(child);\n return this;\n }\n a(name, value) {\n if (value != null) {\n this.attributes[name] = value;\n }\n return this;\n }\n cc(input, field, withName = field) {\n if (input[field] != null) {\n const node = XmlNode.of(field, input[field]).withName(withName);\n this.c(node);\n }\n }\n l(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n nodes.map((node) => {\n node.withName(memberName);\n this.c(node);\n });\n }\n }\n lc(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n const containerNode = new XmlNode(memberName);\n nodes.map((node) => {\n containerNode.c(node);\n });\n this.c(containerNode);\n }\n }\n toString() {\n const hasChildren = Boolean(this.children.length);\n let xmlText = `<${this.name}`;\n const attributes = this.attributes;\n for (const attributeName of Object.keys(attributes)) {\n const attribute = attributes[attributeName];\n if (attribute != null) {\n xmlText += ` ${attributeName}=\"${escapeAttribute(\"\" + attribute)}\"`;\n }\n }\n return (xmlText += !hasChildren ? \"/>\" : `>${this.children.map((c) => c.toString()).join(\"\")}`);\n }\n}\n\nfunction parseXML(xml) {\n const state = new AwsXmlParser(xml);\n return state.parse();\n}\nclass AwsXmlParser {\n x;\n i = 0;\n z;\n constructor(x) {\n this.x = x;\n this.x = x.replace(/\\r\\n?/g, \"\\n\");\n this.z = this.x.length;\n }\n parse() {\n const p = this;\n const { z } = p;\n while (p.i < z) {\n p.trim();\n if (p.i >= z) {\n break;\n }\n if (p.isNext(\"\");\n p.trim();\n }\n else if (p.isNext(\"\");\n p.trim();\n }\n else if (p.isNext(\"/\".includes(p.x[p.i])) {\n tag += p.x[p.i++];\n }\n let hasAttrs = false;\n const attrs = Object.create(null);\n while (p.i < p.z) {\n p.trim();\n if (\">/\".includes(p.x[p.i])) {\n break;\n }\n let name = \"\";\n while (p.i < p.z && !\"= \\t\\r\\n>/?\".includes(p.x[p.i])) {\n name += p.x[p.i++];\n }\n p.trim();\n if (p.x[p.i] !== \"=\") {\n break;\n }\n ++p.i;\n p.trim();\n attrs[name] = p.readAttrValue();\n hasAttrs = true;\n }\n if (p.i >= p.z) {\n throw new Error(\"@aws-sdk XML parse error: unexpected end of input.\");\n }\n if (p.x[p.i] === \"/\") {\n ++p.i;\n if (p.i >= p.z || p.x[p.i] !== \">\") {\n throw new Error(\"@aws-sdk XML parse error: expected > at the end of self-closing tag.\");\n }\n ++p.i;\n Object.setPrototypeOf(attrs, Object.prototype);\n return { tag, value: hasAttrs ? attrs : \"\" };\n }\n if (p.x[p.i] !== \">\") {\n throw new Error(\"@aws-sdk XML parse error: expected > at the end of opening tag.\");\n }\n ++p.i;\n const textParts = [];\n const childTags = [];\n let hasElementChild = false;\n while (p.i < p.z) {\n if (p.isNext(\"\");\n }\n else if (p.isNext(\"\"));\n }\n else if (p.isNext(\"\");\n }\n else {\n hasElementChild = true;\n childTags.push(p.parseTag());\n }\n }\n else {\n let text = \"\";\n while (p.i < p.z && p.x[p.i] !== \"<\") {\n text += p.x[p.i++];\n }\n textParts.push(p.decodeEntities(text));\n }\n }\n if (!p.isNext(\".`);\n }\n p.i += 2;\n const closeTag = p.readTo(\">\").trim();\n if (closeTag !== tag) {\n throw new Error(`@aws-sdk XML parse error: mismatched tags <${tag}> and .`);\n }\n if (!hasAttrs && textParts.length === 0 && !hasElementChild) {\n return { tag, value: \"\" };\n }\n if (!hasAttrs && !hasElementChild) {\n const text = textParts.length === 1 ? textParts[0] : textParts.join(\"\");\n if (text.trim() === \"\" && text.includes(\"\\n\")) {\n return { tag, value: \"\" };\n }\n return { tag, value: text };\n }\n const obj = Object.create(null);\n for (const text of textParts) {\n if (text.trim() === \"\" && text.includes(\"\\n\")) {\n continue;\n }\n obj[\"#text\"] = \"#text\" in obj ? obj[\"#text\"] + text : text;\n }\n for (const child of childTags) {\n if (child.tag in obj) {\n if (Array.isArray(obj[child.tag])) {\n obj[child.tag].push(child.value);\n }\n else {\n obj[child.tag] = [obj[child.tag], child.value];\n }\n }\n else {\n obj[child.tag] = child.value;\n }\n }\n for (const [k, v] of Object.entries(attrs)) {\n obj[k] = v;\n }\n Object.setPrototypeOf(obj, Object.prototype);\n return { tag, value: obj };\n }\n static ENTITIES = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n };\n skipDoctype() {\n const p = this;\n p.i += 9;\n let depth = 0;\n while (p.i < p.z) {\n const c = p.x[p.i];\n if (c === \"[\") {\n ++depth;\n }\n else if (c === \"]\") {\n --depth;\n }\n else if (c === \">\" && depth === 0) {\n ++p.i;\n return;\n }\n ++p.i;\n }\n throw new Error(\"@aws-sdk XML parse error: unclosed DOCTYPE.\");\n }\n decodeEntities(s) {\n return s.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g, (_, hex, dec, named) => {\n if (hex) {\n return String.fromCharCode(parseInt(hex, 16));\n }\n if (dec) {\n return String.fromCharCode(parseInt(dec, 10));\n }\n return AwsXmlParser.ENTITIES[named] ?? \"\";\n });\n }\n}\n\nexports.XmlNode = XmlNode;\nexports.XmlText = XmlText;\nexports.parseXML = parseXML;\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { getValueFromTextNode } from \"@smithy/core/client\";\nimport { FromStringShapeDeserializer } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { toUtf8 } from \"@smithy/core/serde\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nexport class XmlShapeDeserializer extends SerdeContextConfig {\n settings;\n stringDeserializer;\n constructor(settings) {\n super();\n this.settings = settings;\n this.stringDeserializer = new FromStringShapeDeserializer(settings);\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.stringDeserializer.setSerdeContext(serdeContext);\n }\n read(schema, bytes, key) {\n const ns = NormalizedSchema.of(schema);\n const memberSchemas = ns.getMemberSchemas();\n const isEventPayload = ns.isStructSchema() &&\n ns.isMemberSchema() &&\n !!Object.values(memberSchemas).find((memberNs) => {\n return !!memberNs.getMemberTraits().eventPayload;\n });\n if (isEventPayload) {\n const output = {};\n const memberName = Object.keys(memberSchemas)[0];\n const eventMemberSchema = memberSchemas[memberName];\n if (eventMemberSchema.isBlobSchema()) {\n output[memberName] = bytes;\n }\n else {\n output[memberName] = this.read(memberSchemas[memberName], bytes);\n }\n return output;\n }\n const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);\n const parsedObject = this.parseXml(xmlString);\n return this.readSchema(schema, key ? parsedObject[key] : parsedObject);\n }\n readSchema(_schema, value) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isUnitSchema()) {\n return;\n }\n const traits = ns.getMergedTraits();\n if (ns.isListSchema() && !Array.isArray(value)) {\n return this.readSchema(ns, [value]);\n }\n if (value == null) {\n return value;\n }\n if (typeof value === \"object\") {\n const flat = !!traits.xmlFlattened;\n if (ns.isListSchema()) {\n const listValue = ns.getValueSchema();\n const buffer = [];\n const sourceKey = listValue.getMergedTraits().xmlName ?? \"member\";\n const source = flat ? value : (value[0] ?? value)[sourceKey];\n if (source == null) {\n return buffer;\n }\n const sourceArray = Array.isArray(source) ? source : [source];\n for (const v of sourceArray) {\n buffer.push(this.readSchema(listValue, v));\n }\n return buffer;\n }\n const buffer = {};\n if (ns.isMapSchema()) {\n const keyNs = ns.getKeySchema();\n const memberNs = ns.getValueSchema();\n let entries;\n if (flat) {\n entries = Array.isArray(value) ? value : [value];\n }\n else {\n entries = Array.isArray(value.entry) ? value.entry : [value.entry];\n }\n const keyProperty = keyNs.getMergedTraits().xmlName ?? \"key\";\n const valueProperty = memberNs.getMergedTraits().xmlName ?? \"value\";\n for (const entry of entries) {\n const key = entry[keyProperty];\n const value = entry[valueProperty];\n buffer[key] = this.readSchema(memberNs, value);\n }\n return buffer;\n }\n if (ns.isStructSchema()) {\n const union = ns.isUnionSchema();\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(value, buffer);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMergedTraits();\n const xmlObjectKey = !memberTraits.httpPayload\n ? (memberSchema.getMemberTraits().xmlName ?? memberName)\n : (memberTraits.xmlName ?? memberSchema.getName());\n if (union) {\n unionSerde.mark(xmlObjectKey);\n }\n if (value[xmlObjectKey] != null) {\n buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n return buffer;\n }\n if (ns.isDocumentSchema()) {\n return value;\n }\n throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);\n }\n if (ns.isListSchema()) {\n return [];\n }\n if (ns.isMapSchema() || ns.isStructSchema()) {\n return {};\n }\n return this.stringDeserializer.read(ns, value);\n }\n parseXml(xml) {\n if (xml.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(xml);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: xml,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n }\n}\n", "import { determineTimestampFormat, extendedEncodeURIComponent } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString } from \"@smithy/core/serde\";\nimport { generateIdempotencyToken, NumericValue, toBase64 } from \"@smithy/core/serde\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class QueryShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value, prefix = \"\") {\n if (this.buffer === undefined) {\n this.buffer = \"\";\n }\n const ns = NormalizedSchema.of(schema);\n if (prefix && !prefix.endsWith(\".\")) {\n prefix += \".\";\n }\n if (ns.isBlobSchema()) {\n if (typeof value === \"string\" || value instanceof Uint8Array) {\n this.writeKey(prefix);\n this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));\n }\n }\n else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n else if (ns.isIdempotencyToken()) {\n this.writeKey(prefix);\n this.writeValue(generateIdempotencyToken());\n }\n }\n else if (ns.isBigIntegerSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isBigDecimalSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(value instanceof NumericValue ? value.string : String(value));\n }\n }\n else if (ns.isTimestampSchema()) {\n if (value instanceof Date) {\n this.writeKey(prefix);\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.writeValue(value.toISOString().replace(\".000Z\", \"Z\"));\n break;\n case 6:\n this.writeValue(dateToUtcString(value));\n break;\n case 7:\n this.writeValue(String(value.getTime() / 1000));\n break;\n }\n }\n }\n else if (ns.isDocumentSchema()) {\n if (Array.isArray(value)) {\n this.write(64 | 15, value, prefix);\n }\n else if (value instanceof Date) {\n this.write(4, value, prefix);\n }\n else if (value instanceof Uint8Array) {\n this.write(21, value, prefix);\n }\n else if (value && typeof value === \"object\") {\n this.write(128 | 15, value, prefix);\n }\n else {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isListSchema()) {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n if (this.settings.serializeEmptyLists) {\n this.writeKey(prefix);\n this.writeValue(\"\");\n }\n }\n else {\n const member = ns.getValueSchema();\n const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const item of value) {\n if (item == null) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(\"member\", traits.xmlName, traits.ec2QueryName);\n const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;\n this.write(member, item, key);\n ++i;\n }\n }\n }\n }\n else if (ns.isMapSchema()) {\n if (value && typeof value === \"object\") {\n const keySchema = ns.getKeySchema();\n const memberSchema = ns.getValueSchema();\n const flat = ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const k in value) {\n const v = value[k];\n if (v == null) {\n continue;\n }\n const keyTraits = keySchema.getMergedTraits();\n const keySuffix = this.getKey(\"key\", keyTraits.xmlName, keyTraits.ec2QueryName);\n const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;\n const valTraits = memberSchema.getMergedTraits();\n const valueSuffix = this.getKey(\"value\", valTraits.xmlName, valTraits.ec2QueryName);\n const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;\n this.write(keySchema, k, key);\n this.write(memberSchema, v, valueKey);\n ++i;\n }\n }\n }\n else if (ns.isStructSchema()) {\n if (value && typeof value === \"object\") {\n let didWriteMember = false;\n for (const [memberName, member] of ns.structIterator()) {\n if (value[memberName] == null && !member.isIdempotencyToken()) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, \"struct\");\n const key = `${prefix}${suffix}`;\n this.write(member, value[memberName], key);\n didWriteMember = true;\n }\n if (!didWriteMember && ns.isUnionSchema()) {\n const { $unknown } = value;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n const key = `${prefix}${k}`;\n this.write(15, v, key);\n }\n }\n }\n }\n else if (ns.isUnitSchema()) {\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);\n }\n }\n flush() {\n if (this.buffer === undefined) {\n throw new Error(\"@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.\");\n }\n const str = this.buffer;\n delete this.buffer;\n return str;\n }\n getKey(memberName, xmlName, ec2QueryName, keySource) {\n const { ec2, capitalizeKeys } = this.settings;\n if (ec2 && ec2QueryName) {\n return ec2QueryName;\n }\n const key = xmlName ?? memberName;\n if (capitalizeKeys && keySource === \"struct\") {\n return key[0].toUpperCase() + key.slice(1);\n }\n return key;\n }\n writeKey(key) {\n if (key.endsWith(\".\")) {\n key = key.slice(0, key.length - 1);\n }\n this.buffer += `&${extendedEncodeURIComponent(key)}=`;\n }\n writeValue(value) {\n this.buffer += extendedEncodeURIComponent(value);\n }\n}\n", "import { collectBody, RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { XmlShapeDeserializer } from \"../xml/XmlShapeDeserializer\";\nimport { QueryShapeSerializer } from \"./QueryShapeSerializer\";\nexport class AwsQueryProtocol extends RpcProtocol {\n options;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super({\n defaultNamespace: options.defaultNamespace,\n errorTypeRegistries: options.errorTypeRegistries,\n });\n this.options = options;\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: false,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n serializeEmptyLists: true,\n };\n this.serializer = new QueryShapeSerializer(settings);\n this.deserializer = new XmlShapeDeserializer(settings);\n }\n getShapeId() {\n return \"aws.protocols#awsQuery\";\n }\n setSerdeContext(serdeContext) {\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n }\n getPayloadCodec() {\n throw new Error(\"AWSQuery protocol has no payload codec.\");\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n request.headers[\"content-type\"] = \"application/x-www-form-urlencoded\";\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"\";\n }\n const action = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n request.body = `Action=${action}&Version=${this.options.version}` + request.body;\n if (request.body.endsWith(\"&\")) {\n request.body = request.body.slice(-1);\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const shortName = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + \"Result\" : undefined;\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n useNestedResult() {\n return true;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? \"Unknown\";\n this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);\n const errorData = this.loadQueryError(dataObject) ?? {};\n const message = this.loadQueryErrorMessage(dataObject);\n errorData.message = message;\n errorData.Error = {\n Type: errorData.Type,\n Code: errorData.Code,\n Message: message,\n };\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);\n const ns = NormalizedSchema.of(errorSchema);\n const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor({});\n const output = {\n Type: errorData.Error.Type,\n Code: errorData.Error.Code,\n Error: errorData.Error,\n };\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = errorData[target] ?? dataObject[target];\n output[name] = this.deserializer.readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n loadQueryErrorCode(output, data) {\n const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;\n if (code !== undefined) {\n return code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n }\n loadQueryError(data) {\n return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;\n }\n loadQueryErrorMessage(data) {\n const errorData = this.loadQueryError(data);\n return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? \"Unknown\";\n }\n getDefaultContentType() {\n return \"application/x-www-form-urlencoded\";\n }\n}\n", "import { AwsQueryProtocol } from \"./AwsQueryProtocol\";\nexport class AwsEc2QueryProtocol extends AwsQueryProtocol {\n options;\n constructor(options) {\n super(options);\n this.options = options;\n const ec2Settings = {\n capitalizeKeys: true,\n flattenLists: true,\n serializeEmptyLists: false,\n ec2: true,\n };\n Object.assign(this.serializer.settings, ec2Settings);\n }\n getShapeId() {\n return \"aws.protocols#ec2Query\";\n }\n useNestedResult() {\n return false;\n }\n}\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { getValueFromTextNode } from \"@smithy/core/client\";\nimport { collectBodyString } from \"../common\";\nexport const parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(encoded);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n});\nexport const parseXmlErrorBody = async (errorBody, context) => {\n const value = await parseXmlBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n};\nexport const loadRestXmlErrorCode = (output, data) => {\n if (data?.Error?.Code !== undefined) {\n return data.Error.Code;\n }\n if (data?.Code !== undefined) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n};\n", "import { XmlNode, XmlText } from \"@aws-sdk/xml-builder\";\nimport { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString } from \"@smithy/core/serde\";\nimport { fromBase64, generateIdempotencyToken, NumericValue, toBase64 } from \"@smithy/core/serde\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class XmlShapeSerializer extends SerdeContextConfig {\n settings;\n stringBuffer;\n byteBuffer;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n if (ns.isStringSchema() && typeof value === \"string\") {\n this.stringBuffer = value;\n }\n else if (ns.isBlobSchema()) {\n this.byteBuffer =\n \"byteLength\" in value\n ? value\n : (this.serdeContext?.base64Decoder ?? fromBase64)(value);\n }\n else {\n this.buffer = this.writeStruct(ns, value, undefined);\n const traits = ns.getMergedTraits();\n if (traits.httpPayload && !traits.xmlName) {\n this.buffer.withName(ns.getName());\n }\n }\n }\n flush() {\n if (this.byteBuffer !== undefined) {\n const bytes = this.byteBuffer;\n delete this.byteBuffer;\n return bytes;\n }\n if (this.stringBuffer !== undefined) {\n const str = this.stringBuffer;\n delete this.stringBuffer;\n return str;\n }\n const buffer = this.buffer;\n if (this.settings.xmlNamespace) {\n if (!buffer?.attributes?.[\"xmlns\"]) {\n buffer.addAttribute(\"xmlns\", this.settings.xmlNamespace);\n }\n }\n delete this.buffer;\n return buffer.toString();\n }\n writeStruct(ns, value, parentXmlns) {\n const traits = ns.getMergedTraits();\n const name = ns.isMemberSchema() && !traits.httpPayload\n ? (ns.getMemberTraits().xmlName ?? ns.getMemberName())\n : (traits.xmlName ?? ns.getName());\n if (!name || !ns.isStructSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`);\n }\n const structXmlNode = XmlNode.of(name);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const val = value[memberName];\n if (val != null || memberSchema.isIdempotencyToken()) {\n if (memberSchema.getMergedTraits().xmlAttribute) {\n structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));\n continue;\n }\n if (memberSchema.isListSchema()) {\n this.writeList(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isMapSchema()) {\n this.writeMap(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isStructSchema()) {\n structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));\n }\n else {\n const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());\n this.writeSimpleInto(memberSchema, val, memberNode, xmlns);\n structXmlNode.addChildNode(memberNode);\n }\n }\n }\n const { $unknown } = value;\n if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) {\n const [k, v] = $unknown;\n const node = XmlNode.of(k);\n if (typeof v !== \"string\") {\n if (value instanceof XmlNode || value instanceof XmlText) {\n structXmlNode.addChildNode(value);\n }\n else {\n throw new Error(`@aws-sdk - $unknown union member in XML requires ` +\n `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);\n }\n }\n this.writeSimpleInto(0, v, node, xmlns);\n structXmlNode.addChildNode(node);\n }\n if (xmlns) {\n structXmlNode.addAttribute(xmlnsAttr, xmlns);\n }\n return structXmlNode;\n }\n writeList(listMember, array, container, parentXmlns) {\n if (!listMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`);\n }\n const listTraits = listMember.getMergedTraits();\n const listValueSchema = listMember.getValueSchema();\n const listValueTraits = listValueSchema.getMergedTraits();\n const sparse = !!listValueTraits.sparse;\n const flat = !!listTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);\n const writeItem = (container, value) => {\n if (listValueSchema.isListSchema()) {\n this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container, xmlns);\n }\n else if (listValueSchema.isMapSchema()) {\n this.writeMap(listValueSchema, value, container, xmlns);\n }\n else if (listValueSchema.isStructSchema()) {\n const struct = this.writeStruct(listValueSchema, value, xmlns);\n container.addChildNode(struct.withName(flat ? (listTraits.xmlName ?? listMember.getMemberName()) : (listValueTraits.xmlName ?? \"member\")));\n }\n else {\n const listItemNode = XmlNode.of(flat ? (listTraits.xmlName ?? listMember.getMemberName()) : (listValueTraits.xmlName ?? \"member\"));\n this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);\n container.addChildNode(listItemNode);\n }\n };\n if (flat) {\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(container, value);\n }\n }\n }\n else {\n const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());\n if (xmlns) {\n listNode.addAttribute(xmlnsAttr, xmlns);\n }\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(listNode, value);\n }\n }\n container.addChildNode(listNode);\n }\n }\n writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) {\n if (!mapMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);\n }\n const mapTraits = mapMember.getMergedTraits();\n const mapKeySchema = mapMember.getKeySchema();\n const mapKeyTraits = mapKeySchema.getMergedTraits();\n const keyTag = mapKeyTraits.xmlName ?? \"key\";\n const mapValueSchema = mapMember.getValueSchema();\n const mapValueTraits = mapValueSchema.getMergedTraits();\n const valueTag = mapValueTraits.xmlName ?? \"value\";\n const sparse = !!mapValueTraits.sparse;\n const flat = !!mapTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);\n const addKeyValue = (entry, key, val) => {\n const keyNode = XmlNode.of(keyTag, key);\n const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);\n if (keyXmlns) {\n keyNode.addAttribute(keyXmlnsAttr, keyXmlns);\n }\n entry.addChildNode(keyNode);\n let valueNode = XmlNode.of(valueTag);\n if (mapValueSchema.isListSchema()) {\n this.writeList(mapValueSchema, val, valueNode, xmlns);\n }\n else if (mapValueSchema.isMapSchema()) {\n this.writeMap(mapValueSchema, val, valueNode, xmlns, true);\n }\n else if (mapValueSchema.isStructSchema()) {\n valueNode = this.writeStruct(mapValueSchema, val, xmlns);\n }\n else {\n this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);\n }\n entry.addChildNode(valueNode);\n };\n if (flat) {\n for (const key in map) {\n const val = map[key];\n if (sparse || val != null) {\n const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n addKeyValue(entry, key, val);\n container.addChildNode(entry);\n }\n }\n }\n else {\n let mapNode;\n if (!containerIsMap) {\n mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n if (xmlns) {\n mapNode.addAttribute(xmlnsAttr, xmlns);\n }\n container.addChildNode(mapNode);\n }\n for (const key in map) {\n const val = map[key];\n if (sparse || val != null) {\n const entry = XmlNode.of(\"entry\");\n addKeyValue(entry, key, val);\n (containerIsMap ? container : mapNode).addChildNode(entry);\n }\n }\n }\n }\n writeSimple(_schema, value) {\n if (null === value) {\n throw new Error(\"@aws-sdk/core/protocols - (XML serializer) cannot write null value.\");\n }\n const ns = NormalizedSchema.of(_schema);\n let nodeContents = null;\n if (value && typeof value === \"object\") {\n if (ns.isBlobSchema()) {\n nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n else if (ns.isTimestampSchema() && value instanceof Date) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n nodeContents = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n nodeContents = dateToUtcString(value);\n break;\n case 7:\n nodeContents = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using http date\", value);\n nodeContents = dateToUtcString(value);\n break;\n }\n }\n else if (ns.isBigDecimalSchema() && value) {\n if (value instanceof NumericValue) {\n return value.string;\n }\n return String(value);\n }\n else if (ns.isMapSchema() || ns.isListSchema()) {\n throw new Error(\"@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.\");\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);\n }\n }\n if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {\n nodeContents = String(value);\n }\n if (ns.isStringSchema()) {\n if (value === undefined && ns.isIdempotencyToken()) {\n nodeContents = generateIdempotencyToken();\n }\n else {\n nodeContents = String(value);\n }\n }\n if (nodeContents === null) {\n throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);\n }\n return nodeContents;\n }\n writeSimpleInto(_schema, value, into, parentXmlns) {\n const nodeContents = this.writeSimple(_schema, value);\n const ns = NormalizedSchema.of(_schema);\n const content = new XmlText(nodeContents);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n if (xmlns) {\n into.addAttribute(xmlnsAttr, xmlns);\n }\n into.addChildNode(content);\n }\n getXmlnsAttribute(ns, parentXmlns) {\n const traits = ns.getMergedTraits();\n const [prefix, xmlns] = traits.xmlNamespace ?? [];\n if (xmlns && xmlns !== parentXmlns) {\n return [prefix ? `xmlns:${prefix}` : \"xmlns\", xmlns];\n }\n return [void 0, void 0];\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { XmlShapeDeserializer } from \"./XmlShapeDeserializer\";\nimport { XmlShapeSerializer } from \"./XmlShapeSerializer\";\nexport class XmlCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new XmlShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new XmlShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { loadRestXmlErrorCode } from \"./parseXmlBody\";\nimport { XmlCodec } from \"./XmlCodec\";\nexport class AwsRestXmlProtocol extends HttpBindingProtocol {\n codec;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super(options);\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: true,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n };\n this.codec = new XmlCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getPayloadCodec() {\n return this.codec;\n }\n getShapeId() {\n return \"aws.protocols#restXml\";\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (typeof request.body === \"string\" &&\n request.headers[\"content-type\"] === this.getDefaultContentType() &&\n !request.body.startsWith(\"' + request.body;\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n return super.deserializeResponse(operationSchema, context, response);\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? \"Unknown\";\n this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);\n if (dataObject.Error && typeof dataObject.Error === \"object\") {\n for (const key of Object.keys(dataObject.Error)) {\n dataObject[key] = dataObject.Error[key];\n if (key.toLowerCase() === \"message\") {\n dataObject.message = dataObject.Error[key];\n }\n }\n }\n if (dataObject.RequestId && !metadata.requestId) {\n metadata.requestId = dataObject.RequestId;\n }\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.Error?.message ??\n dataObject.Error?.Message ??\n dataObject.message ??\n dataObject.Message ??\n \"UnknownError\";\n const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor({});\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n const errorDeserializer = this.codec.createDeserializer();\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = dataObject.Error?.[target] ?? dataObject[target];\n output[name] = errorDeserializer.readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/xml\";\n }\n hasUnstructuredPayloadBinding(ns) {\n for (const [, member] of ns.structIterator()) {\n if (member.getMergedTraits().httpPayload) {\n return !(member.isStructSchema() || member.isMapSchema() || member.isListSchema());\n }\n }\n return false;\n }\n}\n", "export { AwsSmithyRpcV2CborProtocol } from \"./cbor/AwsSmithyRpcV2CborProtocol\";\nexport { _toStr, _toBool, _toNum } from \"./coercing-serializers\";\nexport { AwsJson1_0Protocol } from \"./json/AwsJson1_0Protocol\";\nexport { AwsJson1_1Protocol } from \"./json/AwsJson1_1Protocol\";\nexport { AwsJsonRpcProtocol } from \"./json/AwsJsonRpcProtocol\";\nexport { AwsRestJsonProtocol } from \"./json/AwsRestJsonProtocol\";\nexport { JsonCodec } from \"./json/JsonCodec\";\nexport { JsonShapeDeserializer } from \"./json/JsonShapeDeserializer\";\nexport { JsonShapeSerializer } from \"./json/JsonShapeSerializer\";\nexport { awsExpectUnion } from \"./json/awsExpectUnion\";\nexport { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode, loadJsonRpcErrorCode } from \"./json/parseJsonBody\";\nexport { AwsEc2QueryProtocol } from \"./query/AwsEc2QueryProtocol\";\nexport { AwsQueryProtocol } from \"./query/AwsQueryProtocol\";\nexport { QueryShapeSerializer } from \"./query/QueryShapeSerializer\";\nexport { AwsRestXmlProtocol } from \"./xml/AwsRestXmlProtocol\";\nexport { XmlCodec } from \"./xml/XmlCodec\";\nexport { XmlShapeDeserializer } from \"./xml/XmlShapeDeserializer\";\nexport { XmlShapeSerializer } from \"./xml/XmlShapeSerializer\";\nexport { parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode } from \"./xml/parseXmlBody\";\n", "import { BinaryDecisionDiagram } from \"@smithy/core/endpoints\";\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]]\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://oidc.{Region}.amazonaws.com\", i],\n [\"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 13, 3,\n 1, 4, r + 12,\n 2, 5, r + 12,\n 3, 8, 6,\n 4, 7, r + 11,\n 5, r + 9, r + 10,\n 4, 11, 9,\n 6, 10, r + 8,\n 7, r + 6, r + 7,\n 5, 12, r + 5,\n 6, r + 4, r + 5,\n 3, r + 1, 14,\n 4, r + 2, r + 3,\n]);\nexport const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n", "import { awsEndpointFunctions } from \"@aws-sdk/core/client\";\nimport { customEndpointFunctions, decideEndpoint, EndpointCache } from \"@smithy/core/endpoints\";\nimport { bdd } from \"./bdd\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { ServiceException as __ServiceException, } from \"@smithy/core/client\";\nexport { __ServiceException };\nexport class SSOOIDCServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);\n }\n}\n", "import { SSOOIDCServiceException as __BaseException } from \"./SSOOIDCServiceException\";\nexport class AccessDeniedException extends __BaseException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nexport class AuthorizationPendingException extends __BaseException {\n name = \"AuthorizationPendingException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class ExpiredTokenException extends __BaseException {\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class InternalServerException extends __BaseException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class InvalidClientException extends __BaseException {\n name = \"InvalidClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class InvalidGrantException extends __BaseException {\n name = \"InvalidGrantException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class InvalidRequestException extends __BaseException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n error;\n reason;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n this.error = opts.error;\n this.reason = opts.reason;\n this.error_description = opts.error_description;\n }\n}\nexport class InvalidScopeException extends __BaseException {\n name = \"InvalidScopeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class SlowDownException extends __BaseException {\n name = \"SlowDownException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class UnauthorizedClientException extends __BaseException {\n name = \"UnauthorizedClientException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\nexport class UnsupportedGrantTypeException extends __BaseException {\n name = \"UnsupportedGrantTypeException\";\n $fault = \"client\";\n error;\n error_description;\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n}\n", "const _ADE = \"AccessDeniedException\";\nconst _APE = \"AuthorizationPendingException\";\nconst _AT = \"AccessToken\";\nconst _CS = \"ClientSecret\";\nconst _CT = \"CreateToken\";\nconst _CTR = \"CreateTokenRequest\";\nconst _CTRr = \"CreateTokenResponse\";\nconst _CV = \"CodeVerifier\";\nconst _ETE = \"ExpiredTokenException\";\nconst _ICE = \"InvalidClientException\";\nconst _IGE = \"InvalidGrantException\";\nconst _IRE = \"InvalidRequestException\";\nconst _ISE = \"InternalServerException\";\nconst _ISEn = \"InvalidScopeException\";\nconst _IT = \"IdToken\";\nconst _RT = \"RefreshToken\";\nconst _SDE = \"SlowDownException\";\nconst _UCE = \"UnauthorizedClientException\";\nconst _UGTE = \"UnsupportedGrantTypeException\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cS = \"clientSecret\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _dC = \"deviceCode\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _ed = \"error_description\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _r = \"reason\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.ssooidc\";\nconst _sc = \"scope\";\nconst _se = \"server\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.ssooidc\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, } from \"../models/errors\";\nimport { SSOOIDCServiceException } from \"../models/SSOOIDCServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var SSOOIDCServiceException$ = [-3, _s, \"SSOOIDCServiceException\", 0, [], []];\n_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var AccessDeniedException$ = [-3, n0, _ADE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0]\n];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nexport var AuthorizationPendingException$ = [-3, n0, _APE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);\nexport var ExpiredTokenException$ = [-3, n0, _ETE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);\nexport var InternalServerException$ = [-3, n0, _ISE,\n { [_e]: _se, [_hE]: 500 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nexport var InvalidClientException$ = [-3, n0, _ICE,\n { [_e]: _c, [_hE]: 401 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InvalidClientException$, InvalidClientException);\nexport var InvalidGrantException$ = [-3, n0, _IGE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InvalidGrantException$, InvalidGrantException);\nexport var InvalidRequestException$ = [-3, n0, _IRE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _r, _ed],\n [0, 0, 0]\n];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nexport var InvalidScopeException$ = [-3, n0, _ISEn,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(InvalidScopeException$, InvalidScopeException);\nexport var SlowDownException$ = [-3, n0, _SDE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(SlowDownException$, SlowDownException);\nexport var UnauthorizedClientException$ = [-3, n0, _UCE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);\nexport var UnsupportedGrantTypeException$ = [-3, n0, _UGTE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _ed],\n [0, 0]\n];\nn0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar AccessToken = [0, n0, _AT, 8, 0];\nvar ClientSecret = [0, n0, _CS, 8, 0];\nvar CodeVerifier = [0, n0, _CV, 8, 0];\nvar IdToken = [0, n0, _IT, 8, 0];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nexport var CreateTokenRequest$ = [3, n0, _CTR,\n 0,\n [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],\n [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]], 3\n];\nexport var CreateTokenResponse$ = [3, n0, _CTRr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]]\n];\nvar Scopes = 64 | 0;\nexport var CreateToken$ = [9, n0, _CT,\n { [_h]: [\"POST\", \"/token\", 200] }, () => CreateTokenRequest$, () => CreateTokenResponse$\n];\n", "import { AwsSdkSigV4Signer } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { AwsRestJsonProtocol } from \"@aws-sdk/core/protocols\";\nimport { NoAuthSigner } from \"@smithy/core\";\nimport { Sha256 } from \"@smithy/core/checksum\";\nimport { NoOpLogger } from \"@smithy/core/client\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { fromBase64, fromUtf8, toBase64, toUtf8 } from \"@smithy/core/serde\";\nimport { defaultSSOOIDCHttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.ssooidc\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"AWSSSOOIDCService\",\n },\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../../../package.json\";\nimport { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from \"@aws-sdk/core/client\";\nimport { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from \"@smithy/core/client\";\nimport { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from \"@smithy/core/config\";\nimport { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from \"@smithy/core/retry\";\nimport { calculateBodyLength } from \"@smithy/core/serde\";\nimport { NodeHttpHandler as RequestHandler, streamCollector } from \"@smithy/node-http-handler\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n awsCheckVersion(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadNodeConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from \"@aws-sdk/core/client\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/core/client\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/core/protocols\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from \"@aws-sdk/core/client\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { Client as __Client, } from \"@smithy/core/client\";\nimport { resolveRegionConfig } from \"@smithy/core/config\";\nimport { resolveEndpointConfig } from \"@smithy/core/endpoints\";\nimport { getContentLengthPlugin } from \"@smithy/core/protocols\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/core/retry\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { defaultSSOOIDCHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class SSOOIDCClient extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { makeBuilder } from \"@smithy/core/client\";\nimport { getEndpointPlugin } from \"@smithy/core/endpoints\";\nimport { commonParams } from \"./endpoint/EndpointParameters\";\nexport const command = makeBuilder(commonParams, \"AWSSSOOIDCService\", \"SSOOIDCClient\", getEndpointPlugin);\nexport const _ep0 = {};\nexport const _mw0 = (Command, cs, config, o) => [];\n", "import { _ep0, _mw0, command } from \"../commandBuilder\";\nimport { CreateToken$ } from \"../schemas/schemas_0\";\nexport class CreateTokenCommand extends command(_ep0, _mw0, \"CreateToken\", CreateToken$) {\n}\n", "import { createAggregatedClient } from \"@smithy/core/client\";\nimport { CreateTokenCommand, } from \"./commands/CreateTokenCommand\";\nimport { SSOOIDCClient } from \"./SSOOIDCClient\";\nconst commands = {\n CreateTokenCommand,\n};\nexport class SSOOIDC extends SSOOIDCClient {\n}\ncreateAggregatedClient(commands, SSOOIDC);\n", "export * from \"./CreateTokenCommand\";\n", "export const AccessDeniedExceptionReason = {\n KMS_ACCESS_DENIED: \"KMS_AccessDeniedException\",\n};\nexport const InvalidRequestExceptionReason = {\n KMS_DISABLED_KEY: \"KMS_DisabledException\",\n KMS_INVALID_KEY_USAGE: \"KMS_InvalidKeyUsageException\",\n KMS_INVALID_STATE: \"KMS_InvalidStateException\",\n KMS_KEY_NOT_FOUND: \"KMS_NotFoundException\",\n};\n", "export {};\n", "export * from \"./SSOOIDCClient\";\nexport * from \"./SSOOIDC\";\nexport * from \"./commands\";\nexport { Command as $Command } from \"@smithy/core/client\";\nexport * from \"./schemas/schemas_0\";\nexport * from \"./models/enums\";\nexport * from \"./models/errors\";\nexport * from \"./models/models_0\";\nexport { SSOOIDCServiceException } from \"./models/SSOOIDCServiceException\";\n", "const { setTokenFeature } = require(\"@aws-sdk/core/client\");\nconst { getBearerTokenEnvKey } = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst { TokenProviderError, getSSOTokenFilepath, parseKnownFiles, getProfileName, loadSsoSessionData, getSSOTokenFromFile, memoize, chain } = require(\"@smithy/core/config\");\nconst { promises } = require(\"node:fs\");\n\nconst fromEnvSigningName = ({ logger, signingName } = {}) => async () => {\n logger?.debug?.(\"@aws-sdk/token-providers - fromEnvSigningName\");\n if (!signingName) {\n throw new TokenProviderError(\"Please pass 'signingName' to compute environment variable key\", { logger });\n }\n const bearerTokenKey = getBearerTokenEnvKey(signingName);\n if (!(bearerTokenKey in process.env)) {\n throw new TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });\n }\n const token = { token: process.env[bearerTokenKey] };\n setTokenFeature(token, \"BEARER_SERVICE_ENV_VARS\", \"3\");\n return token;\n};\n\nconst EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nconst REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n\nconst getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {\n const { SSOOIDCClient } = require('@aws-sdk/nested-clients/sso-oidc');\n const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: coalesce(\"logger\"),\n userAgentAppId: coalesce(\"userAgentAppId\"),\n }));\n return ssoOidcClient;\n};\n\nconst getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {\n const { CreateTokenCommand } = require('@aws-sdk/nested-clients/sso-oidc');\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n\nconst validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n\nconst validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n\nconst { writeFile } = promises;\nconst writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n\nconst lastRefreshAttemptTime = new Date(0);\nconst fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await parseKnownFiles(init);\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n\nconst fromStatic = ({ token, logger }) => async () => {\n logger?.debug(\"@aws-sdk/token-providers - fromStatic\");\n if (!token || !token.token) {\n throw new TokenProviderError(`Please pass a valid token to fromStatic`, false);\n }\n return token;\n};\n\nconst nodeProvider = (init = {}) => memoize(chain(fromSso(init), async () => {\n throw new TokenProviderError(\"Could not load token from any providers\", false);\n}), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined);\n\nexports.fromEnvSigningName = fromEnvSigningName;\nexports.fromSso = fromSso;\nexports.fromStatic = fromStatic;\nexports.nodeProvider = nodeProvider;\n", "import { resolveAwsSdkSigV4Config, } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/core/client\";\nexport const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nexport const defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n ;\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "export const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\",\n });\n};\nexport const commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "import { BinaryDecisionDiagram } from \"@smithy/core/endpoints\";\nconst k = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = { [k]: \"Endpoint\" }, h = { [k]: d }, i = {}, j = [{ [k]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [g]],\n [c, j],\n [\"aws.partition\", j, d],\n [e, [{ [k]: \"UseFIPS\" }, b]],\n [e, [{ [k]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [h, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [h, \"supportsFIPS\"] }, b]],\n [\"stringEquals\", [{ fn: f, argv: [h, \"name\"] }, \"aws-us-gov\"]]\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [g, i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://portal.sso.{Region}.amazonaws.com\", i],\n [\"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", i],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", i],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 13, 3,\n 1, 4, r + 12,\n 2, 5, r + 12,\n 3, 8, 6,\n 4, 7, r + 11,\n 5, r + 9, r + 10,\n 4, 11, 9,\n 6, 10, r + 8,\n 7, r + 6, r + 7,\n 5, 12, r + 5,\n 6, r + 4, r + 5,\n 3, r + 1, 14,\n 4, r + 2, r + 3,\n]);\nexport const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n", "import { awsEndpointFunctions } from \"@aws-sdk/core/client\";\nimport { customEndpointFunctions, decideEndpoint, EndpointCache } from \"@smithy/core/endpoints\";\nimport { bdd } from \"./bdd\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { ServiceException as __ServiceException, } from \"@smithy/core/client\";\nexport { __ServiceException };\nexport class SSOServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOServiceException.prototype);\n }\n}\n", "import { SSOServiceException as __BaseException } from \"./SSOServiceException\";\nexport class InvalidRequestException extends __BaseException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n }\n}\nexport class ResourceNotFoundException extends __BaseException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nexport class TooManyRequestsException extends __BaseException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nexport class UnauthorizedException extends __BaseException {\n name = \"UnauthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedException.prototype);\n }\n}\n", "const _ATT = \"AccessTokenType\";\nconst _GRC = \"GetRoleCredentials\";\nconst _GRCR = \"GetRoleCredentialsRequest\";\nconst _GRCRe = \"GetRoleCredentialsResponse\";\nconst _IRE = \"InvalidRequestException\";\nconst _RC = \"RoleCredentials\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SAKT = \"SecretAccessKeyType\";\nconst _STT = \"SessionTokenType\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _UE = \"UnauthorizedException\";\nconst _aI = \"accountId\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _ex = \"expiration\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hQ = \"httpQuery\";\nconst _m = \"message\";\nconst _rC = \"roleCredentials\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.sso\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\nconst n0 = \"com.amazonaws.sso\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from \"../models/errors\";\nimport { SSOServiceException } from \"../models/SSOServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var SSOServiceException$ = [-3, _s, \"SSOServiceException\", 0, [], []];\n_s_registry.registerError(SSOServiceException$, SSOServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var InvalidRequestException$ = [-3, n0, _IRE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(InvalidRequestException$, InvalidRequestException);\nexport var ResourceNotFoundException$ = [-3, n0, _RNFE,\n { [_e]: _c, [_hE]: 404 },\n [_m],\n [0]\n];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nexport var TooManyRequestsException$ = [-3, n0, _TMRE,\n { [_e]: _c, [_hE]: 429 },\n [_m],\n [0]\n];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nexport var UnauthorizedException$ = [-3, n0, _UE,\n { [_e]: _c, [_hE]: 401 },\n [_m],\n [0]\n];\nn0_registry.registerError(UnauthorizedException$, UnauthorizedException);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar AccessTokenType = [0, n0, _ATT, 8, 0];\nvar SecretAccessKeyType = [0, n0, _SAKT, 8, 0];\nvar SessionTokenType = [0, n0, _STT, 8, 0];\nexport var GetRoleCredentialsRequest$ = [3, n0, _GRCR,\n 0,\n [_rN, _aI, _aT],\n [[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3\n];\nexport var GetRoleCredentialsResponse$ = [3, n0, _GRCRe,\n 0,\n [_rC],\n [[() => RoleCredentials$, 0]]\n];\nexport var RoleCredentials$ = [3, n0, _RC,\n 0,\n [_aKI, _sAK, _sT, _ex],\n [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]\n];\nexport var GetRoleCredentials$ = [9, n0, _GRC,\n { [_h]: [\"GET\", \"/federation/credentials\", 200] }, () => GetRoleCredentialsRequest$, () => GetRoleCredentialsResponse$\n];\n", "import { AwsSdkSigV4Signer } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { AwsRestJsonProtocol } from \"@aws-sdk/core/protocols\";\nimport { NoAuthSigner } from \"@smithy/core\";\nimport { Sha256 } from \"@smithy/core/checksum\";\nimport { NoOpLogger } from \"@smithy/core/client\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { fromBase64, fromUtf8, toBase64, toUtf8 } from \"@smithy/core/serde\";\nimport { defaultSSOHttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.sso\",\n errorTypeRegistries,\n version: \"2019-06-10\",\n serviceTarget: \"SWBPortalService\",\n },\n serviceId: config?.serviceId ?? \"SSO\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../../../package.json\";\nimport { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from \"@aws-sdk/core/client\";\nimport { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from \"@smithy/core/client\";\nimport { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from \"@smithy/core/config\";\nimport { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from \"@smithy/core/retry\";\nimport { calculateBodyLength } from \"@smithy/core/serde\";\nimport { NodeHttpHandler as RequestHandler, streamCollector } from \"@smithy/node-http-handler\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n awsCheckVersion(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadNodeConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from \"@aws-sdk/core/client\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/core/client\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/core/protocols\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from \"@aws-sdk/core/client\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { Client as __Client, } from \"@smithy/core/client\";\nimport { resolveRegionConfig } from \"@smithy/core/config\";\nimport { resolveEndpointConfig } from \"@smithy/core/endpoints\";\nimport { getContentLengthPlugin } from \"@smithy/core/protocols\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/core/retry\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { defaultSSOHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class SSOClient extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { makeBuilder } from \"@smithy/core/client\";\nimport { getEndpointPlugin } from \"@smithy/core/endpoints\";\nimport { commonParams } from \"./endpoint/EndpointParameters\";\nexport const command = makeBuilder(commonParams, \"SWBPortalService\", \"SSOClient\", getEndpointPlugin);\nexport const _ep0 = {};\nexport const _mw0 = (Command, cs, config, o) => [];\n", "import { _ep0, _mw0, command } from \"../commandBuilder\";\nimport { GetRoleCredentials$ } from \"../schemas/schemas_0\";\nexport class GetRoleCredentialsCommand extends command(_ep0, _mw0, \"GetRoleCredentials\", GetRoleCredentials$) {\n}\n", "import { createAggregatedClient } from \"@smithy/core/client\";\nimport { GetRoleCredentialsCommand, } from \"./commands/GetRoleCredentialsCommand\";\nimport { SSOClient } from \"./SSOClient\";\nconst commands = {\n GetRoleCredentialsCommand,\n};\nexport class SSO extends SSOClient {\n}\ncreateAggregatedClient(commands, SSO);\n", "export * from \"./GetRoleCredentialsCommand\";\n", "export {};\n", "export * from \"./SSOClient\";\nexport * from \"./SSO\";\nexport * from \"./commands\";\nexport { Command as $Command } from \"@smithy/core/client\";\nexport * from \"./schemas/schemas_0\";\nexport * from \"./models/errors\";\nexport * from \"./models/models_0\";\nexport { SSOServiceException } from \"./models/SSOServiceException\";\n", "const { GetRoleCredentialsCommand, SSOClient } = require(\"@aws-sdk/nested-clients/sso\");\nexports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;\nexports.SSOClient = SSOClient;\n", "const { CredentialsProviderError, getSSOTokenFromFile, getProfileName, parseKnownFiles, loadSsoSessionData } = require(\"@smithy/core/config\");\nconst { setCredentialFeature } = require(\"@aws-sdk/core/client\");\nconst { fromSso } = require(\"@aws-sdk/token-providers\");\n\nconst isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nconst resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await fromSso({\n profile,\n filepath,\n configFilepath,\n ignoreCache,\n clientConfig,\n parentClientConfig,\n logger,\n })({ callerClientConfig });\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = require('./loadSso-BGYXHf8s.js');\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n\nconst validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n\nconst fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n};\n\nexports.fromSSO = fromSSO;\nexports.isSsoProfile = isSsoProfile;\nexports.validateSsoProfile = validateSsoProfile;\n", "const { SignatureV4, signatureV4aContainer } = require(\"@smithy/signature-v4\");\n\nconst signatureV4CrtContainer = {\n CrtSignerV4: null,\n};\n\nconst SESSION_TOKEN_QUERY_PARAM = \"X-Amz-S3session-Token\";\nconst SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();\nclass SignatureV4SignWithCredentials extends SignatureV4 {\n async signWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return privateAccess.signRequest(requestToSign, options ?? {});\n }\n async presignWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n delete requestToSign.headers[SESSION_TOKEN_HEADER];\n requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n requestToSign.query = requestToSign.query ?? {};\n requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return this.presign(requestToSign, options);\n }\n}\nfunction getCredentialsWithoutSessionToken(credentials) {\n return {\n accessKeyId: credentials.accessKeyId,\n secretAccessKey: credentials.secretAccessKey,\n expiration: credentials.expiration,\n };\n}\nfunction setSingleOverride(privateAccess, credentialsWithoutSessionToken) {\n const currentCredentialProvider = privateAccess.credentialProvider;\n privateAccess.credentialProvider = () => {\n privateAccess.credentialProvider = currentCredentialProvider;\n return Promise.resolve(credentialsWithoutSessionToken);\n };\n}\n\nclass SignatureV4MultiRegion {\n sigv4aSigner;\n sigv4Signer;\n signerOptions;\n static sigv4aDependency() {\n if (typeof signatureV4CrtContainer.CrtSignerV4 === \"function\") {\n return \"crt\";\n }\n else if (typeof signatureV4aContainer.SignatureV4a === \"function\") {\n return \"js\";\n }\n return \"none\";\n }\n constructor(options) {\n this.sigv4Signer = new SignatureV4SignWithCredentials(options);\n this.signerOptions = options;\n }\n async sign(requestToSign, options = {}) {\n if (options.signingRegion === \"*\") {\n return this.getSigv4aSigner().sign(requestToSign, options);\n }\n return this.sigv4Signer.sign(requestToSign, options);\n }\n async signWithCredentials(requestToSign, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.signWithCredentials(requestToSign, credentials, options);\n }\n else {\n throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);\n }\n async presign(originalRequest, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.presign(originalRequest, options);\n }\n else {\n throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.presign(originalRequest, options);\n }\n async presignWithCredentials(originalRequest, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n throw new Error(\"Method presignWithCredentials is not supported for [signingRegion=*].\");\n }\n return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);\n }\n getSigv4aSigner() {\n if (!this.sigv4aSigner) {\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;\n if (this.signerOptions.runtime === \"node\") {\n if (!CrtSignerV4 && !JsSigV4aSigner) {\n throw new Error(\"Neither CRT nor JS SigV4a implementation is available. \" +\n \"Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n if (CrtSignerV4 && typeof CrtSignerV4 === \"function\") {\n this.sigv4aSigner = new CrtSignerV4({\n ...this.signerOptions,\n signingAlgorithm: 1,\n });\n }\n else if (JsSigV4aSigner && typeof JsSigV4aSigner === \"function\") {\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n else {\n throw new Error(\"Available SigV4a implementation is not a valid constructor. \" +\n \"Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.\" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n }\n else {\n if (!JsSigV4aSigner || typeof JsSigV4aSigner !== \"function\") {\n throw new Error(\"JS SigV4a implementation is not available or not a valid constructor. \" +\n \"Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. \" +\n \"You must also register the package by calling [require('@aws-sdk/signature-v4a');] \" +\n \"or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a\");\n }\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n }\n return this.sigv4aSigner;\n }\n}\n\nexports.SignatureV4MultiRegion = SignatureV4MultiRegion;\nexports.SignatureV4SignWithCredentials = SignatureV4SignWithCredentials;\nexports.signatureV4CrtContainer = signatureV4CrtContainer;\n", "import { BinaryDecisionDiagram } from \"@smithy/core/endpoints\";\nconst q = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"stringEquals\", g = \"getAttr\", h = \"us-east-1\", i = \"sigv4\", j = \"sts\", k = \"https://sts.{Region}.{PartitionResult#dnsSuffix}\", l = { [q]: \"Endpoint\" }, m = { [q]: \"Region\" }, n = { [q]: d }, o = {}, p = [m];\nconst _data = {\n conditions: [\n [c, [l]],\n [c, p],\n [\"aws.partition\", p, d],\n [e, [{ [q]: \"UseFIPS\" }, b]],\n [e, [{ [q]: \"UseDualStack\" }, b]],\n [f, [m, \"aws-global\"]],\n [e, [{ [q]: \"UseGlobalEndpoint\" }, b]],\n [f, [m, \"eu-central-1\"]],\n [e, [{ fn: g, argv: [n, \"supportsDualStack\"] }, b]],\n [e, [{ fn: g, argv: [n, \"supportsFIPS\"] }, b]],\n [f, [m, \"ap-south-1\"]],\n [f, [m, \"eu-north-1\"]],\n [f, [m, \"eu-west-1\"]],\n [f, [m, \"eu-west-2\"]],\n [f, [m, \"eu-west-3\"]],\n [f, [m, \"sa-east-1\"]],\n [f, [m, h]],\n [f, [m, \"us-east-2\"]],\n [f, [m, \"us-west-2\"]],\n [f, [m, \"us-west-1\"]],\n [f, [m, \"ca-central-1\"]],\n [f, [m, \"ap-southeast-1\"]],\n [f, [m, \"ap-northeast-1\"]],\n [f, [m, \"ap-southeast-2\"]],\n [f, [{ fn: g, argv: [n, \"name\"] }, \"aws-us-gov\"]]\n ],\n results: [\n [a],\n [\"https://sts.amazonaws.com\", { authSchemes: [{ name: i, signingName: j, signingRegion: h }] }],\n [k, { authSchemes: [{ name: i, signingName: j, signingRegion: \"{Region}\" }] }],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [l, o],\n [\"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", o],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://sts.{Region}.amazonaws.com\", o],\n [\"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}\", o],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}\", o],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [k, o],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 30, 3,\n 1, 4, r + 14,\n 2, 5, r + 14,\n 3, 25, 6,\n 4, 24, 7,\n 5, r + 1, 8,\n 6, 9, r + 13,\n 7, r + 1, 10,\n 10, r + 1, 11,\n 11, r + 1, 12,\n 12, r + 1, 13,\n 13, r + 1, 14,\n 14, r + 1, 15,\n 15, r + 1, 16,\n 16, r + 1, 17,\n 17, r + 1, 18,\n 18, r + 1, 19,\n 19, r + 1, 20,\n 20, r + 1, 21,\n 21, r + 1, 22,\n 22, r + 1, 23,\n 23, r + 1, r + 2,\n 8, r + 11, r + 12,\n 4, 28, 26,\n 9, 27, r + 10,\n 24, r + 8, r + 9,\n 8, 29, r + 7,\n 9, r + 6, r + 7,\n 3, r + 3, 31,\n 4, r + 4, r + 5,\n]);\nexport const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n", "import { awsEndpointFunctions } from \"@aws-sdk/core/client\";\nimport { customEndpointFunctions, decideEndpoint, EndpointCache } from \"@smithy/core/endpoints\";\nimport { bdd } from \"./bdd\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\", \"UseGlobalEndpoint\"],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/core/client\";\nimport { resolveParams } from \"@smithy/core/endpoints\";\nimport { defaultEndpointResolver } from \"../endpoint/endpointResolver\";\nconst createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {\n if (!input) {\n throw new Error(\"Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`\");\n }\n const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);\n const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor\n ?.getEndpointParameterInstructions;\n if (!instructionsFn) {\n throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);\n }\n const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);\n return Object.assign(defaultParameters, endpointParameters);\n};\nconst _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexport const defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createAwsAuthSigv4aHttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4a\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {\n const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {\n const endpoint = defaultEndpointResolver(authParameters);\n const authSchemes = endpoint.properties?.authSchemes;\n if (!authSchemes) {\n return defaultHttpAuthSchemeResolver(authParameters);\n }\n const options = [];\n for (const scheme of authSchemes) {\n const { name: resolvedName, properties = {}, ...rest } = scheme;\n const name = resolvedName.toLowerCase();\n if (resolvedName !== name) {\n console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);\n }\n let schemeId;\n if (name === \"sigv4a\") {\n schemeId = \"aws.auth#sigv4a\";\n const sigv4Present = authSchemes.find((s) => {\n const name = s.name.toLowerCase();\n return name !== \"sigv4a\" && name.startsWith(\"sigv4\");\n });\n if (SignatureV4MultiRegion.sigv4aDependency() === \"none\" && sigv4Present) {\n continue;\n }\n }\n else if (name.startsWith(\"sigv4\")) {\n schemeId = \"aws.auth#sigv4\";\n }\n else {\n throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);\n }\n const createOption = createHttpAuthOptionFunctions[schemeId];\n if (!createOption) {\n throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);\n }\n const option = createOption(authParameters);\n option.schemeId = schemeId;\n option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };\n options.push(option);\n }\n return options;\n };\n return endpointRuleSetHttpAuthSchemeProvider;\n};\nconst _defaultSTSHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"AssumeRoleWithWebIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {\n \"aws.auth#sigv4\": createAwsAuthSigv4HttpAuthOption,\n \"aws.auth#sigv4a\": createAwsAuthSigv4aHttpAuthOption,\n \"smithy.api#noAuth\": createSmithyApiNoAuthHttpAuthOption,\n});\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n const config_1 = resolveAwsSdkSigV4AConfig(config_0);\n return Object.assign(config_1, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "export const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n defaultSigningName: \"sts\",\n });\n};\nexport const commonParams = {\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "import { ServiceException as __ServiceException, } from \"@smithy/core/client\";\nexport { __ServiceException };\nexport class STSServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, STSServiceException.prototype);\n }\n}\n", "import { STSServiceException as __BaseException } from \"./STSServiceException\";\nexport class ExpiredTokenException extends __BaseException {\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExpiredTokenException.prototype);\n }\n}\nexport class MalformedPolicyDocumentException extends __BaseException {\n name = \"MalformedPolicyDocumentException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);\n }\n}\nexport class PackedPolicyTooLargeException extends __BaseException {\n name = \"PackedPolicyTooLargeException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);\n }\n}\nexport class RegionDisabledException extends __BaseException {\n name = \"RegionDisabledException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"RegionDisabledException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, RegionDisabledException.prototype);\n }\n}\nexport class IDPRejectedClaimException extends __BaseException {\n name = \"IDPRejectedClaimException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);\n }\n}\nexport class InvalidIdentityTokenException extends __BaseException {\n name = \"InvalidIdentityTokenException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);\n }\n}\nexport class IDPCommunicationErrorException extends __BaseException {\n name = \"IDPCommunicationErrorException\";\n $fault = \"client\";\n $retryable = {};\n constructor(opts) {\n super({\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);\n }\n}\n", "const _A = \"Arn\";\nconst _AKI = \"AccessKeyId\";\nconst _AR = \"AssumeRole\";\nconst _ARI = \"AssumedRoleId\";\nconst _ARR = \"AssumeRoleRequest\";\nconst _ARRs = \"AssumeRoleResponse\";\nconst _ARU = \"AssumedRoleUser\";\nconst _ARWWI = \"AssumeRoleWithWebIdentity\";\nconst _ARWWIR = \"AssumeRoleWithWebIdentityRequest\";\nconst _ARWWIRs = \"AssumeRoleWithWebIdentityResponse\";\nconst _Au = \"Audience\";\nconst _C = \"Credentials\";\nconst _CA = \"ContextAssertion\";\nconst _DS = \"DurationSeconds\";\nconst _E = \"Expiration\";\nconst _EI = \"ExternalId\";\nconst _ETE = \"ExpiredTokenException\";\nconst _IDPCEE = \"IDPCommunicationErrorException\";\nconst _IDPRCE = \"IDPRejectedClaimException\";\nconst _IITE = \"InvalidIdentityTokenException\";\nconst _K = \"Key\";\nconst _MPDE = \"MalformedPolicyDocumentException\";\nconst _P = \"Policy\";\nconst _PA = \"PolicyArns\";\nconst _PAr = \"ProviderArn\";\nconst _PC = \"ProvidedContexts\";\nconst _PCLT = \"ProvidedContextsListType\";\nconst _PCr = \"ProvidedContext\";\nconst _PDT = \"PolicyDescriptorType\";\nconst _PI = \"ProviderId\";\nconst _PPS = \"PackedPolicySize\";\nconst _PPTLE = \"PackedPolicyTooLargeException\";\nconst _Pr = \"Provider\";\nconst _RA = \"RoleArn\";\nconst _RDE = \"RegionDisabledException\";\nconst _RSN = \"RoleSessionName\";\nconst _SAK = \"SecretAccessKey\";\nconst _SFWIT = \"SubjectFromWebIdentityToken\";\nconst _SI = \"SourceIdentity\";\nconst _SN = \"SerialNumber\";\nconst _ST = \"SessionToken\";\nconst _T = \"Tags\";\nconst _TC = \"TokenCode\";\nconst _TTK = \"TransitiveTagKeys\";\nconst _Ta = \"Tag\";\nconst _V = \"Value\";\nconst _WIT = \"WebIdentityToken\";\nconst _a = \"arn\";\nconst _aKST = \"accessKeySecretType\";\nconst _aQE = \"awsQueryError\";\nconst _c = \"client\";\nconst _cTT = \"clientTokenType\";\nconst _e = \"error\";\nconst _hE = \"httpError\";\nconst _m = \"message\";\nconst _pDLT = \"policyDescriptorListType\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.sts\";\nconst _tLT = \"tagListType\";\nconst n0 = \"com.amazonaws.sts\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, } from \"../models/errors\";\nimport { STSServiceException } from \"../models/STSServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var STSServiceException$ = [-3, _s, \"STSServiceException\", 0, [], []];\n_s_registry.registerError(STSServiceException$, STSServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var ExpiredTokenException$ = [-3, n0, _ETE,\n { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);\nexport var IDPCommunicationErrorException$ = [-3, n0, _IDPCEE,\n { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);\nexport var IDPRejectedClaimException$ = [-3, n0, _IDPRCE,\n { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },\n [_m],\n [0]\n];\nn0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);\nexport var InvalidIdentityTokenException$ = [-3, n0, _IITE,\n { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);\nexport var MalformedPolicyDocumentException$ = [-3, n0, _MPDE,\n { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);\nexport var PackedPolicyTooLargeException$ = [-3, n0, _PPTLE,\n { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);\nexport var RegionDisabledException$ = [-3, n0, _RDE,\n { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },\n [_m],\n [0]\n];\nn0_registry.registerError(RegionDisabledException$, RegionDisabledException);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar accessKeySecretType = [0, n0, _aKST, 8, 0];\nvar clientTokenType = [0, n0, _cTT, 8, 0];\nexport var AssumedRoleUser$ = [3, n0, _ARU,\n 0,\n [_ARI, _A],\n [0, 0], 2\n];\nexport var AssumeRoleRequest$ = [3, n0, _ARR,\n 0,\n [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],\n [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType], 2\n];\nexport var AssumeRoleResponse$ = [3, n0, _ARRs,\n 0,\n [_C, _ARU, _PPS, _SI],\n [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]\n];\nexport var AssumeRoleWithWebIdentityRequest$ = [3, n0, _ARWWIR,\n 0,\n [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],\n [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1], 3\n];\nexport var AssumeRoleWithWebIdentityResponse$ = [3, n0, _ARWWIRs,\n 0,\n [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],\n [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]\n];\nexport var Credentials$ = [3, n0, _C,\n 0,\n [_AKI, _SAK, _ST, _E],\n [0, [() => accessKeySecretType, 0], 0, 4], 4\n];\nexport var PolicyDescriptorType$ = [3, n0, _PDT,\n 0,\n [_a],\n [0]\n];\nexport var ProvidedContext$ = [3, n0, _PCr,\n 0,\n [_PAr, _CA],\n [0, 0]\n];\nexport var Tag$ = [3, n0, _Ta,\n 0,\n [_K, _V],\n [0, 0], 2\n];\nvar policyDescriptorListType = [1, n0, _pDLT,\n 0, () => PolicyDescriptorType$\n];\nvar ProvidedContextsListType = [1, n0, _PCLT,\n 0, () => ProvidedContext$\n];\nvar tagKeyListType = 64 | 0;\nvar tagListType = [1, n0, _tLT,\n 0, () => Tag$\n];\nexport var AssumeRole$ = [9, n0, _AR,\n 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$\n];\nexport var AssumeRoleWithWebIdentity$ = [9, n0, _ARWWI,\n 0, () => AssumeRoleWithWebIdentityRequest$, () => AssumeRoleWithWebIdentityResponse$\n];\n", "import { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { AwsQueryProtocol } from \"@aws-sdk/core/protocols\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { NoAuthSigner } from \"@smithy/core\";\nimport { Sha256 } from \"@smithy/core/checksum\";\nimport { NoOpLogger } from \"@smithy/core/client\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { fromBase64, fromUtf8, toBase64, toUtf8 } from \"@smithy/core/serde\";\nimport { defaultSTSHttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2011-06-15\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"aws.auth#sigv4a\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4a\"),\n signer: new AwsSdkSigV4ASigner(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsQueryProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.sts\",\n errorTypeRegistries,\n xmlNamespace: \"https://sts.amazonaws.com/doc/2011-06-15/\",\n version: \"2011-06-15\",\n serviceTarget: \"AWSSecurityTokenServiceV20110615\",\n },\n serviceId: config?.serviceId ?? \"STS\",\n sha256: config?.sha256 ?? Sha256,\n signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../../../package.json\";\nimport { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from \"@aws-sdk/core/client\";\nimport { AwsSdkSigV4ASigner, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS, } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { NoAuthSigner } from \"@smithy/core\";\nimport { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from \"@smithy/core/client\";\nimport { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from \"@smithy/core/config\";\nimport { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from \"@smithy/core/retry\";\nimport { calculateBodyLength } from \"@smithy/core/serde\";\nimport { NodeHttpHandler as RequestHandler, streamCollector } from \"@smithy/node-http-handler\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n awsCheckVersion(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"aws.auth#sigv4a\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4a\"),\n signer: new AwsSdkSigV4ASigner(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadNodeConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from \"@aws-sdk/core/client\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/core/client\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/core/protocols\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from \"@aws-sdk/core/client\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { Client as __Client, } from \"@smithy/core/client\";\nimport { resolveRegionConfig } from \"@smithy/core/config\";\nimport { resolveEndpointConfig } from \"@smithy/core/endpoints\";\nimport { getContentLengthPlugin } from \"@smithy/core/protocols\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/core/retry\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { defaultSTSHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class STSClient extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n \"aws.auth#sigv4a\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { makeBuilder } from \"@smithy/core/client\";\nimport { getEndpointPlugin } from \"@smithy/core/endpoints\";\nimport { commonParams } from \"./endpoint/EndpointParameters\";\nexport const command = makeBuilder(commonParams, \"AWSSecurityTokenServiceV20110615\", \"STSClient\", getEndpointPlugin);\nexport const _ep0 = {};\nexport const _mw0 = (Command, cs, config, o) => [];\n", "import { _ep0, _mw0, command } from \"../commandBuilder\";\nimport { AssumeRole$ } from \"../schemas/schemas_0\";\nexport class AssumeRoleCommand extends command(_ep0, _mw0, \"AssumeRole\", AssumeRole$) {\n}\n", "import { _ep0, _mw0, command } from \"../commandBuilder\";\nimport { AssumeRoleWithWebIdentity$ } from \"../schemas/schemas_0\";\nexport class AssumeRoleWithWebIdentityCommand extends command(_ep0, _mw0, \"AssumeRoleWithWebIdentity\", AssumeRoleWithWebIdentity$) {\n}\n", "import { createAggregatedClient } from \"@smithy/core/client\";\nimport { AssumeRoleCommand, } from \"./commands/AssumeRoleCommand\";\nimport { AssumeRoleWithWebIdentityCommand, } from \"./commands/AssumeRoleWithWebIdentityCommand\";\nimport { STSClient } from \"./STSClient\";\nconst commands = {\n AssumeRoleCommand,\n AssumeRoleWithWebIdentityCommand,\n};\nexport class STS extends STSClient {\n}\ncreateAggregatedClient(commands, STS);\n", "export * from \"./AssumeRoleCommand\";\nexport * from \"./AssumeRoleWithWebIdentityCommand\";\n", "export {};\n", "import { setCredentialFeature, stsRegionDefaultResolver } from \"@aws-sdk/core/client\";\nimport { AssumeRoleCommand } from \"./commands/AssumeRoleCommand\";\nimport { AssumeRoleWithWebIdentityCommand, } from \"./commands/AssumeRoleWithWebIdentityCommand\";\nconst getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {\n if (typeof assumedRoleUser?.Arn === \"string\") {\n const arnComponents = assumedRoleUser.Arn.split(\":\");\n if (arnComponents.length > 4 && arnComponents[4] !== \"\") {\n return arnComponents[4];\n }\n }\n return undefined;\n};\nconst resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n let stsDefaultRegion = \"\";\n const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());\n credentialProviderLogger?.debug?.(\"@aws-sdk/client-sts::resolveRegion\", \"accepting first of:\", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);\n return resolvedRegion;\n};\nexport const getDefaultRoleAssumer = (stsOptions, STSClient) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;\n const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {\n logger,\n profile,\n });\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient({\n ...stsOptions,\n userAgentAppId,\n profile,\n credentialDefaultProvider: () => async () => closureSourceCreds,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,\n logger: logger,\n });\n }\n const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);\n const credentials = {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n ...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_STS_ASSUME_ROLE\", \"i\");\n return credentials;\n };\n};\nexport const getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;\n const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {\n logger,\n profile,\n });\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient({\n ...stsOptions,\n userAgentAppId,\n profile,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,\n logger: logger,\n });\n }\n const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);\n const credentials = {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n ...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),\n ...(accountId && { accountId }),\n };\n if (accountId) {\n setCredentialFeature(credentials, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n setCredentialFeature(credentials, \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\", \"k\");\n return credentials;\n };\n};\nconst isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n};\n", "import { getDefaultRoleAssumer as StsGetDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity as StsGetDefaultRoleAssumerWithWebIdentity, } from \"./defaultStsRoleAssumers\";\nimport { STSClient } from \"./STSClient\";\nconst getCustomizableStsClientCtor = (baseCtor, customizations) => {\n if (!customizations)\n return baseCtor;\n else\n return class CustomizableSTSClient extends baseCtor {\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n };\n};\nexport const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => StsGetDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));\nexport const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => StsGetDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));\nexport const decorateDefaultCredentialProvider = (provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),\n ...input,\n});\n", "export * from \"./STSClient\";\nexport * from \"./STS\";\nexport * from \"./commands\";\nexport { Command as $Command } from \"@smithy/core/client\";\nexport * from \"./schemas/schemas_0\";\nexport * from \"./models/errors\";\nexport * from \"./models/models_0\";\nexport * from \"./defaultRoleAssumers\";\nexport { STSServiceException } from \"./models/STSServiceException\";\n", "import { resolveAwsSdkSigV4Config, } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/core/client\";\nexport const defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"signin\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nexport const defaultSigninHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateOAuth2Token\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n ;\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "export const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\n });\n};\nexport const commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "import { BinaryDecisionDiagram } from \"@smithy/core/endpoints\";\nconst s = \"ref\";\nconst a = -1, b = false, c = true, d = \"isSet\", e = \"booleanEquals\", f = \"coalesce\", g = \"PartitionResult\", h = \"stringEquals\", i = \"getAttr\", j = \"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}\", k = { [s]: \"Endpoint\" }, l = { \"fn\": i, \"argv\": [{ [s]: g }, \"name\"] }, m = { [s]: \"Region\" }, n = { [s]: g }, o = { \"authSchemes\": [{ \"name\": \"sigv4\", \"signingName\": \"signin\", \"signingRegion\": \"{Region}\" }] }, p = {}, q = [m];\nconst _data = {\n conditions: [\n [d, q],\n [e, [{ fn: f, argv: [{ [s]: \"IsControlPlane\" }, b] }, c]],\n [d, [k]],\n [\"aws.partition\", q, g],\n [e, [{ [s]: \"UseFIPS\" }, c]],\n [h, [l, \"aws\"]],\n [e, [{ fn: f, argv: [{ [s]: \"IsOAuthEndpoint\" }, b] }, c]],\n [e, [{ [s]: \"UseDualStack\" }, c]],\n [h, [l, \"aws-cn\"]],\n [h, [m, \"us-gov-west-1\"]],\n [h, [l, \"aws-us-gov\"]],\n [e, [{ fn: i, argv: [n, \"supportsFIPS\"] }, c]],\n [h, [l, \"aws-iso\"]],\n [h, [l, \"aws-iso-b\"]],\n [h, [l, \"aws-iso-f\"]],\n [h, [l, \"aws-iso-e\"]],\n [h, [l, \"aws-eusc\"]],\n [e, [{ fn: i, argv: [n, \"supportsDualStack\"] }, c]]\n ],\n results: [\n [a],\n [\"https://signin.{Region}.api.aws\", o],\n [\"https://signin.{Region}.api.amazonwebservices.com.cn\", o],\n [j, o],\n [a, \"FIPS endpoints are not supported for OAuth operations. Disable FIPS or use a non-OAuth operation.\"],\n [\"https://{Region}.oauth.signin.aws\", o],\n [\"https://{Region}.signin.aws.amazon.com\", p],\n [\"https://{Region}.signin.amazonaws.cn\", p],\n [\"https://{Region}.signin.amazonaws-us-gov.com\", p],\n [\"https://{Region}.signin.c2shome.ic.gov\", p],\n [\"https://{Region}.signin.sc2shome.sgov.gov\", p],\n [\"https://{Region}.signin.csphome.hci.ic.gov\", p],\n [\"https://{Region}.signin.csphome.adc-e.uk\", p],\n [\"https://{Region}.signin.amazonaws-eusc.eu\", p],\n [\"https://signin-fips.amazonaws-us-gov.com\", p],\n [\"https://{Region}.signin-fips.amazonaws-us-gov.com\", p],\n [\"https://{Region}.signin.{PartitionResult#dnsSuffix}\", p],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [k, p],\n [\"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", p],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}\", p],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [j, p],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://signin.{Region}.{PartitionResult#dnsSuffix}\", p],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 6, 3,\n 2, 36, 4,\n 4, 5, r + 27,\n 6, r + 4, r + 27,\n 1, 29, 7,\n 2, 36, 8,\n 3, 9, 31,\n 4, 22, 10,\n 5, 19, 11,\n 7, 21, 12,\n 8, r + 7, 13,\n 10, r + 8, 14,\n 12, r + 9, 15,\n 13, r + 10, 16,\n 14, r + 11, 17,\n 15, r + 12, 18,\n 16, r + 13, r + 16,\n 6, r + 5, 20,\n 7, 21, r + 6,\n 17, r + 24, r + 25,\n 6, r + 4, 23,\n 7, 27, 24,\n 9, r + 14, 25,\n 10, r + 15, 26,\n 11, r + 22, r + 23,\n 11, 28, r + 21,\n 17, r + 20, r + 21,\n 2, 35, 30,\n 3, 39, 31,\n 4, 32, r + 27,\n 6, r + 4, 33,\n 7, r + 27, 34,\n 9, r + 14, r + 27,\n 3, 39, 36,\n 4, 38, 37,\n 7, r + 18, r + 19,\n 6, r + 4, r + 17,\n 5, r + 1, 40,\n 8, r + 2, r + 3,\n]);\nexport const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n", "import { awsEndpointFunctions } from \"@aws-sdk/core/client\";\nimport { customEndpointFunctions, decideEndpoint, EndpointCache } from \"@smithy/core/endpoints\";\nimport { bdd } from \"./bdd\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"IsControlPlane\", \"IsOAuthEndpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { ServiceException as __ServiceException, } from \"@smithy/core/client\";\nexport { __ServiceException };\nexport class SigninServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SigninServiceException.prototype);\n }\n}\n", "import { SigninServiceException as __BaseException } from \"./SigninServiceException\";\nexport class AccessDeniedException extends __BaseException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n }\n}\nexport class InternalServerException extends __BaseException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n }\n}\nexport class TooManyRequestsError extends __BaseException {\n name = \"TooManyRequestsError\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"TooManyRequestsError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsError.prototype);\n this.error = opts.error;\n }\n}\nexport class ValidationException extends __BaseException {\n name = \"ValidationException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n this.error = opts.error;\n }\n}\n", "const _ADE = \"AccessDeniedException\";\nconst _AT = \"AccessToken\";\nconst _COAT = \"CreateOAuth2Token\";\nconst _COATR = \"CreateOAuth2TokenRequest\";\nconst _COATRB = \"CreateOAuth2TokenRequestBody\";\nconst _COATRBr = \"CreateOAuth2TokenResponseBody\";\nconst _COATRr = \"CreateOAuth2TokenResponse\";\nconst _COATWIAM = \"CreateOAuth2TokenWithIAM\";\nconst _COATWIAMR = \"CreateOAuth2TokenWithIAMRequest\";\nconst _COATWIAMRr = \"CreateOAuth2TokenWithIAMResponse\";\nconst _ISE = \"InternalServerException\";\nconst _OAAT = \"OAuthAccessToken\";\nconst _RT = \"RefreshToken\";\nconst _TMRE = \"TooManyRequestsError\";\nconst _VE = \"ValidationException\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _at = \"access_token\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _ei = \"expires_in\";\nconst _gT = \"grantType\";\nconst _gt = \"grant_type\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _jN = \"jsonName\";\nconst _m = \"message\";\nconst _r = \"resource\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.signin\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _se = \"server\";\nconst _tI = \"tokenInput\";\nconst _tO = \"tokenOutput\";\nconst _tT = \"tokenType\";\nconst _tt = \"token_type\";\nconst n0 = \"com.amazonaws.signin\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { AccessDeniedException, InternalServerException, TooManyRequestsError, ValidationException, } from \"../models/errors\";\nimport { SigninServiceException } from \"../models/SigninServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var SigninServiceException$ = [-3, _s, \"SigninServiceException\", 0, [], []];\n_s_registry.registerError(SigninServiceException$, SigninServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var AccessDeniedException$ = [-3, n0, _ADE,\n { [_e]: _c },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nexport var InternalServerException$ = [-3, n0, _ISE,\n { [_e]: _se, [_hE]: 500 },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nexport var TooManyRequestsError$ = [-3, n0, _TMRE,\n { [_e]: _c, [_hE]: 429 },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);\nexport var ValidationException$ = [-3, n0, _VE,\n { [_e]: _c, [_hE]: 400 },\n [_e, _m],\n [0, 0], 2\n];\nn0_registry.registerError(ValidationException$, ValidationException);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar OAuthAccessToken = [0, n0, _OAAT, 8, 0];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nexport var AccessToken$ = [3, n0, _AT,\n 8,\n [_aKI, _sAK, _sT],\n [[0, { [_jN]: _aKI }], [0, { [_jN]: _sAK }], [0, { [_jN]: _sT }]], 3\n];\nexport var CreateOAuth2TokenRequest$ = [3, n0, _COATR,\n 0,\n [_tI],\n [[() => CreateOAuth2TokenRequestBody$, 16]], 1\n];\nexport var CreateOAuth2TokenRequestBody$ = [3, n0, _COATRB,\n 0,\n [_cI, _gT, _co, _rU, _cV, _rT],\n [[0, { [_jN]: _cI }], [0, { [_jN]: _gT }], 0, [0, { [_jN]: _rU }], [0, { [_jN]: _cV }], [() => RefreshToken, { [_jN]: _rT }]], 2\n];\nexport var CreateOAuth2TokenResponse$ = [3, n0, _COATRr,\n 0,\n [_tO],\n [[() => CreateOAuth2TokenResponseBody$, 16]], 1\n];\nexport var CreateOAuth2TokenResponseBody$ = [3, n0, _COATRBr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [[() => AccessToken$, { [_jN]: _aT }], [0, { [_jN]: _tT }], [1, { [_jN]: _eI }], [() => RefreshToken, { [_jN]: _rT }], [0, { [_jN]: _iT }]], 4\n];\nexport var CreateOAuth2TokenWithIAMRequest$ = [3, n0, _COATWIAMR,\n 0,\n [_gT, _r],\n [[0, { [_jN]: _gt }], 0], 2\n];\nexport var CreateOAuth2TokenWithIAMResponse$ = [3, n0, _COATWIAMRr,\n 0,\n [_aT, _tT, _eI],\n [[() => OAuthAccessToken, { [_jN]: _at }], [0, { [_jN]: _tt }], [1, { [_jN]: _ei }]], 3\n];\nexport var CreateOAuth2Token$ = [9, n0, _COAT,\n { [_h]: [\"POST\", \"/v1/token\", 200] }, () => CreateOAuth2TokenRequest$, () => CreateOAuth2TokenResponse$\n];\nexport var CreateOAuth2TokenWithIAM$ = [9, n0, _COATWIAM,\n { [_h]: [\"POST\", \"/v1/token?x-amz-client-auth-method=iam\", 200] }, () => CreateOAuth2TokenWithIAMRequest$, () => CreateOAuth2TokenWithIAMResponse$\n];\n", "import { AwsSdkSigV4Signer } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { AwsRestJsonProtocol } from \"@aws-sdk/core/protocols\";\nimport { NoAuthSigner } from \"@smithy/core\";\nimport { Sha256 } from \"@smithy/core/checksum\";\nimport { NoOpLogger } from \"@smithy/core/client\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { fromBase64, fromUtf8, toBase64, toUtf8 } from \"@smithy/core/serde\";\nimport { defaultSigninHttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2023-01-01\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.signin\",\n errorTypeRegistries,\n version: \"2023-01-01\",\n serviceTarget: \"Signin\",\n },\n serviceId: config?.serviceId ?? \"Signin\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../../../package.json\";\nimport { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from \"@aws-sdk/core/client\";\nimport { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from \"@smithy/core/client\";\nimport { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from \"@smithy/core/config\";\nimport { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from \"@smithy/core/retry\";\nimport { calculateBodyLength } from \"@smithy/core/serde\";\nimport { NodeHttpHandler as RequestHandler, streamCollector } from \"@smithy/node-http-handler\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n awsCheckVersion(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadNodeConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from \"@aws-sdk/core/client\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/core/client\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/core/protocols\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from \"@aws-sdk/core/client\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { Client as __Client, } from \"@smithy/core/client\";\nimport { resolveRegionConfig } from \"@smithy/core/config\";\nimport { resolveEndpointConfig } from \"@smithy/core/endpoints\";\nimport { getContentLengthPlugin } from \"@smithy/core/protocols\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/core/retry\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { defaultSigninHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class SigninClient extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { makeBuilder } from \"@smithy/core/client\";\nimport { getEndpointPlugin } from \"@smithy/core/endpoints\";\nimport { commonParams } from \"./endpoint/EndpointParameters\";\nexport const command = makeBuilder(commonParams, \"Signin\", \"SigninClient\", getEndpointPlugin);\nexport const _ep0 = {\n IsControlPlane: { type: \"staticContextParams\", value: false },\n};\nexport const _ep1 = {\n IsOAuthEndpoint: { type: \"staticContextParams\", value: true },\n};\nexport const _mw0 = (Command, cs, config, o) => [];\n", "import { _ep0, _mw0, command } from \"../commandBuilder\";\nimport { CreateOAuth2Token$ } from \"../schemas/schemas_0\";\nexport class CreateOAuth2TokenCommand extends command(_ep0, _mw0, \"CreateOAuth2Token\", CreateOAuth2Token$) {\n}\n", "import { _ep1, _mw0, command } from \"../commandBuilder\";\nimport { CreateOAuth2TokenWithIAM$ } from \"../schemas/schemas_0\";\nexport class CreateOAuth2TokenWithIAMCommand extends command(_ep1, _mw0, \"CreateOAuth2TokenWithIAM\", CreateOAuth2TokenWithIAM$) {\n}\n", "import { createAggregatedClient } from \"@smithy/core/client\";\nimport { CreateOAuth2TokenCommand, } from \"./commands/CreateOAuth2TokenCommand\";\nimport { CreateOAuth2TokenWithIAMCommand, } from \"./commands/CreateOAuth2TokenWithIAMCommand\";\nimport { SigninClient } from \"./SigninClient\";\nconst commands = {\n CreateOAuth2TokenCommand,\n CreateOAuth2TokenWithIAMCommand,\n};\nexport class Signin extends SigninClient {\n}\ncreateAggregatedClient(commands, Signin);\n", "export * from \"./CreateOAuth2TokenCommand\";\nexport * from \"./CreateOAuth2TokenWithIAMCommand\";\n", "export const OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n CONFLICT: \"CONFLICT\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n RESOURCE_NOT_FOUND: \"RESOURCE_NOT_FOUND\",\n SERVER_ERROR: \"server_error\",\n SERVICE_QUOTA_EXCEEDED: \"SERVICE_QUOTA_EXCEEDED\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n", "export {};\n", "export * from \"./SigninClient\";\nexport * from \"./Signin\";\nexport * from \"./commands\";\nexport { Command as $Command } from \"@smithy/core/client\";\nexport * from \"./schemas/schemas_0\";\nexport * from \"./models/enums\";\nexport * from \"./models/errors\";\nexport * from \"./models/models_0\";\nexport { SigninServiceException } from \"./models/SigninServiceException\";\n", "const { setCredentialFeature } = require(\"@aws-sdk/core/client\");\nconst { CredentialsProviderError, readFile, parseKnownFiles, getProfileName } = require(\"@smithy/core/config\");\nconst { HttpRequest } = require(\"@smithy/core/protocols\");\nconst { createHash, createPrivateKey, createPublicKey, sign } = require(\"node:crypto\");\nconst { promises } = require(\"node:fs\");\nconst { homedir } = require(\"node:os\");\nconst { dirname, join } = require(\"node:path\");\n\nclass LoginCredentialsFetcher {\n profileData;\n init;\n callerClientConfig;\n static REFRESH_THRESHOLD = 5 * 60 * 1000;\n constructor(profileData, init, callerClientConfig) {\n this.profileData = profileData;\n this.init = init;\n this.callerClientConfig = callerClientConfig;\n }\n async loadCredentials() {\n const token = await this.loadToken();\n if (!token) {\n throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });\n }\n const accessToken = token.accessToken;\n const now = Date.now();\n const expiryTime = new Date(accessToken.expiresAt).getTime();\n const timeUntilExpiry = expiryTime - now;\n if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {\n return this.refresh(token);\n }\n return {\n accessKeyId: accessToken.accessKeyId,\n secretAccessKey: accessToken.secretAccessKey,\n sessionToken: accessToken.sessionToken,\n accountId: accessToken.accountId,\n expiration: new Date(accessToken.expiresAt),\n };\n }\n get logger() {\n return this.init?.logger;\n }\n get loginSession() {\n return this.profileData.login_session;\n }\n async refresh(token) {\n const { SigninClient, CreateOAuth2TokenCommand } = require('@aws-sdk/nested-clients/signin');\n const { logger, userAgentAppId } = this.callerClientConfig ?? {};\n const isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n };\n const requestHandler = isH2(this.callerClientConfig?.requestHandler)\n ? undefined\n : this.callerClientConfig?.requestHandler;\n const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;\n const client = new SigninClient({\n credentials: {\n accessKeyId: \"\",\n secretAccessKey: \"\",\n },\n region,\n requestHandler,\n logger,\n userAgentAppId,\n ...this.init?.clientConfig,\n });\n this.createDPoPInterceptor(client.middlewareStack);\n const commandInput = {\n tokenInput: {\n clientId: token.clientId,\n refreshToken: token.refreshToken,\n grantType: \"refresh_token\",\n },\n };\n try {\n const response = await client.send(new CreateOAuth2TokenCommand(commandInput));\n const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};\n const { refreshToken, expiresIn } = response.tokenOutput ?? {};\n if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {\n throw new CredentialsProviderError(\"Token refresh response missing required fields\", {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n const expiresInMs = (expiresIn ?? 900) * 1000;\n const expiration = new Date(Date.now() + expiresInMs);\n const updatedToken = {\n ...token,\n accessToken: {\n ...token.accessToken,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiresAt: expiration.toISOString(),\n },\n refreshToken,\n };\n await this.saveToken(updatedToken);\n const newAccessToken = updatedToken.accessToken;\n return {\n accessKeyId: newAccessToken.accessKeyId,\n secretAccessKey: newAccessToken.secretAccessKey,\n sessionToken: newAccessToken.sessionToken,\n accountId: newAccessToken.accountId,\n expiration,\n };\n }\n catch (error) {\n if (error.name === \"AccessDeniedException\") {\n const errorType = error.error;\n let message;\n switch (errorType) {\n case \"TOKEN_EXPIRED\":\n message = \"Your session has expired. Please reauthenticate.\";\n break;\n case \"USER_CREDENTIALS_CHANGED\":\n message =\n \"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.\";\n break;\n case \"INSUFFICIENT_PERMISSIONS\":\n message =\n \"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.\";\n break;\n default:\n message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \\`aws login\\``;\n }\n throw new CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });\n }\n throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });\n }\n }\n async loadToken() {\n const tokenFilePath = this.getTokenFilePath();\n try {\n let tokenData;\n try {\n tokenData = await readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });\n }\n catch {\n tokenData = await promises.readFile(tokenFilePath, \"utf8\");\n }\n const token = JSON.parse(tokenData);\n const missingFields = [\"accessToken\", \"clientId\", \"refreshToken\", \"dpopKey\"].filter((k) => !token[k]);\n if (!token.accessToken?.accountId) {\n missingFields.push(\"accountId\");\n }\n if (missingFields.length > 0) {\n throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(\", \")}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n return token;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n }\n async saveToken(token) {\n const tokenFilePath = this.getTokenFilePath();\n const directory = dirname(tokenFilePath);\n try {\n await promises.mkdir(directory, { recursive: true });\n }\n catch (error) {\n }\n await promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), \"utf8\");\n }\n getTokenFilePath() {\n const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join(homedir(), \".aws\", \"login\", \"cache\");\n const loginSessionBytes = Buffer.from(this.loginSession, \"utf8\");\n const loginSessionSha256 = createHash(\"sha256\").update(loginSessionBytes).digest(\"hex\");\n return join(directory, `${loginSessionSha256}.json`);\n }\n derToRawSignature(derSignature) {\n let offset = 2;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const rLength = derSignature[offset++];\n let r = derSignature.subarray(offset, offset + rLength);\n offset += rLength;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const sLength = derSignature[offset++];\n let s = derSignature.subarray(offset, offset + sLength);\n r = r[0] === 0x00 ? r.subarray(1) : r;\n s = s[0] === 0x00 ? s.subarray(1) : s;\n const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);\n const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);\n return Buffer.concat([rPadded, sPadded]);\n }\n createDPoPInterceptor(middlewareStack) {\n middlewareStack.add((next) => async (args) => {\n if (HttpRequest.isInstance(args.request)) {\n const request = args.request;\n const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : \"\"}${request.path}`;\n const dpop = await this.generateDpop(request.method, actualEndpoint);\n request.headers = {\n ...request.headers,\n DPoP: dpop,\n };\n }\n return next(args);\n }, {\n step: \"finalizeRequest\",\n name: \"dpopInterceptor\",\n override: true,\n });\n }\n async generateDpop(method = \"POST\", endpoint) {\n const token = await this.loadToken();\n try {\n const privateKey = createPrivateKey({\n key: token.dpopKey,\n format: \"pem\",\n type: \"sec1\",\n });\n const publicKey = createPublicKey(privateKey);\n const publicDer = publicKey.export({ format: \"der\", type: \"spki\" });\n let pointStart = -1;\n for (let i = 0; i < publicDer.length; i++) {\n if (publicDer[i] === 0x04) {\n pointStart = i;\n break;\n }\n }\n const x = publicDer.slice(pointStart + 1, pointStart + 33);\n const y = publicDer.slice(pointStart + 33, pointStart + 65);\n const header = {\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: {\n kty: \"EC\",\n crv: \"P-256\",\n x: x.toString(\"base64url\"),\n y: y.toString(\"base64url\"),\n },\n };\n const payload = {\n jti: crypto.randomUUID(),\n htm: method,\n htu: endpoint,\n iat: Math.floor(Date.now() / 1000),\n };\n const headerB64 = Buffer.from(JSON.stringify(header)).toString(\"base64url\");\n const payloadB64 = Buffer.from(JSON.stringify(payload)).toString(\"base64url\");\n const message = `${headerB64}.${payloadB64}`;\n const asn1Signature = sign(\"sha256\", Buffer.from(message), privateKey);\n const rawSignature = this.derToRawSignature(asn1Signature);\n const signatureB64 = rawSignature.toString(\"base64url\");\n return `${message}.${signatureB64}`;\n }\n catch (error) {\n throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });\n }\n }\n}\n\nconst fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {\n init?.logger?.debug?.(\"@aws-sdk/credential-providers - fromLoginCredentials\");\n const profiles = await parseKnownFiles(init || {});\n const profileName = getProfileName({\n profile: init?.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile?.login_session) {\n throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {\n tryNextLink: true,\n logger: init?.logger,\n });\n }\n const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);\n const credentials = await fetcher.loadCredentials();\n return setCredentialFeature(credentials, \"CREDENTIALS_LOGIN\", \"AD\");\n};\n\nexports.fromLoginCredentials = fromLoginCredentials;\n", "const { externalDataInterceptor, CredentialsProviderError, parseKnownFiles, getProfileName } = require(\"@smithy/core/config\");\nconst { exec } = require(\"node:child_process\");\nconst { promisify } = require(\"node:util\");\nconst { setCredentialFeature } = require(\"@aws-sdk/core/client\");\n\nconst getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n};\n\nconst resolveProcessCredentials = async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n }\n catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n }\n catch (error) {\n throw new CredentialsProviderError(error.message, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger,\n });\n }\n};\n\nconst fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await parseKnownFiles(init);\n return resolveProcessCredentials(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init.logger);\n};\n\nexports.fromProcess = fromProcess;\n", "const { setCredentialFeature } = require(\"@aws-sdk/core/client\");\nconst { CredentialsProviderError, externalDataInterceptor } = require(\"@smithy/core/config\");\nconst { readFileSync } = require(\"node:fs\");\n\nconst fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = require('@aws-sdk/nested-clients/sts');\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nconst fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await fromWebToken({\n ...init,\n webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\n\nexports.fromTokenFile = fromTokenFile;\nexports.fromWebToken = fromWebToken;\n", "const { CredentialsProviderError, chain, getProfileName, parseKnownFiles } = require(\"@smithy/core/config\");\nconst { setCredentialFeature } = require(\"@aws-sdk/core/client\");\n\nconst resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = require('@aws-sdk/credential-provider-http');\n const { fromContainerMetadata } = require('@smithy/credential-provider-imds');\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = require('@smithy/credential-provider-imds');\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = require('@aws-sdk/credential-provider-env');\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n\nconst isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nconst resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = require('@aws-sdk/nested-clients/sts');\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...callerClientConfig,\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n\nconst isLoginProfile = (data) => {\n return Boolean(data && data.login_session);\n};\nconst resolveLoginCredentials = async (profileName, options, callerClientConfig) => {\n const { fromLoginCredentials } = require('@aws-sdk/credential-provider-login');\n const credentials = await fromLoginCredentials({\n ...options,\n profile: profileName,\n })({ callerClientConfig });\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_LOGIN\", \"AC\");\n};\n\nconst isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nconst resolveProcessCredentials = async (options, profile) => {\n const { fromProcess } = require('@aws-sdk/credential-provider-process');\n const credentials = await fromProcess({\n ...options,\n profile,\n })();\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_PROCESS\", \"v\");\n};\n\nconst resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {\n const { fromSSO } = require('@aws-sdk/credential-provider-sso');\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })({\n callerClientConfig,\n }).then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nconst isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n\nconst isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nconst resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n\nconst isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nconst resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {\n const { fromTokenFile } = require('@aws-sdk/credential-provider-web-identity');\n const credentials = await fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n })({\n callerClientConfig,\n });\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\");\n};\n\nconst resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options, callerClientConfig);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options, callerClientConfig);\n }\n if (isLoginProfile(data)) {\n return resolveLoginCredentials(profileName, options, callerClientConfig);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n\nconst fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init, callerClientConfig);\n};\n\nexports.fromIni = fromIni;\n", "const { ENV_KEY, ENV_SECRET, fromEnv } = require(\"@aws-sdk/credential-provider-env\");\nconst { chain, CredentialsProviderError, ENV_PROFILE } = require(\"@smithy/core/config\");\n\nconst ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nconst remoteProvider = async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = require('@smithy/credential-provider-imds');\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = require('@aws-sdk/credential-provider-http');\n return chain(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== \"false\") {\n return async () => {\n throw new CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n};\n\nfunction memoizeChain(providers, treatAsExpired) {\n const chain = internalCreateChain(providers);\n let activeLock;\n let passiveLock;\n let credentials;\n let forceRefreshLock;\n const provider = async (options) => {\n if (options?.forceRefresh) {\n if (!forceRefreshLock) {\n forceRefreshLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n forceRefreshLock = undefined;\n });\n }\n await forceRefreshLock;\n return credentials;\n }\n if (credentials?.expiration) {\n if (credentials?.expiration?.getTime() < Date.now()) {\n credentials = undefined;\n }\n }\n if (activeLock) {\n await activeLock;\n }\n else if (!credentials || treatAsExpired?.(credentials)) {\n if (credentials) {\n if (!passiveLock) {\n passiveLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n passiveLock = undefined;\n });\n }\n }\n else {\n activeLock = chain(options)\n .then((c) => {\n credentials = c;\n })\n .finally(() => {\n activeLock = undefined;\n });\n return provider(options);\n }\n }\n return credentials;\n };\n return provider;\n}\nconst internalCreateChain = (providers) => async (awsIdentityProperties) => {\n let lastProviderError;\n for (const provider of providers) {\n try {\n return await provider(awsIdentityProperties);\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n\nlet multipleCredentialSourceWarningEmitted = false;\nconst defaultProvider = (init = {}) => memoizeChain([\n async () => {\n const profile = init.profile ?? process.env[ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\"\n ? init.logger.warn.bind(init.logger)\n : console.warn;\n warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true,\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return fromEnv(init)();\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new CredentialsProviderError(\"Skipping SSO provider in default chain (inputs do not include SSO fields).\", { logger: init.logger });\n }\n const { fromSSO } = require('@aws-sdk/credential-provider-sso');\n return fromSSO(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = require('@aws-sdk/credential-provider-ini');\n return fromIni(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = require('@aws-sdk/credential-provider-process');\n return fromProcess(init)(awsIdentityProperties);\n },\n async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = require('@aws-sdk/credential-provider-web-identity');\n return fromTokenFile(init)(awsIdentityProperties);\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger,\n });\n },\n], credentialsTreatedAsExpired);\nconst credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;\nconst credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;\n\nexports.credentialsTreatedAsExpired = credentialsTreatedAsExpired;\nexports.credentialsWillNeedRefresh = credentialsWillNeedRefresh;\nexports.defaultProvider = defaultProvider;\n", "const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require(\"@aws-sdk/core/client\");\nconst { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require(\"@smithy/core\");\nconst { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createWaiter, checkExceptions, WaiterState, createAggregatedClient } = require(\"@smithy/core/client\");\nconst { Command: $Command } = require(\"@smithy/core/client\");\nexports.$Command = $Command;\nexports.__Client = Client;\nconst { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require(\"@smithy/core/config\");\nconst { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require(\"@smithy/core/endpoints\");\nconst { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require(\"@smithy/core/protocols\");\nconst { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require(\"@smithy/core/retry\");\nconst { TypeRegistry, getSchemaSerdePlugin } = require(\"@smithy/core/schema\");\nconst { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst { defaultProvider } = require(\"@aws-sdk/credential-provider-node\");\nconst { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require(\"@smithy/core/serde\");\nconst { streamCollector, NodeHttpHandler } = require(\"@smithy/node-http-handler\");\nconst { AwsJson1_1Protocol } = require(\"@aws-sdk/core/protocols\");\nconst { Sha256 } = require(\"@smithy/core/checksum\");\n\nconst defaultECRHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"ecr\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nconst defaultECRHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"ecr\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nvar version = \"3.1090.0\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"stringEquals\", f = \"booleanEquals\", g = \"getAttr\", h = { [m]: \"Endpoint\" }, i = { \"fn\": g, \"argv\": [{ [m]: d }, \"name\"] }, j = { [m]: d }, k = {}, l = [{ [m]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [i, \"aws-eusc\"]],\n [e, [i, \"aws-iso-f\"]],\n [e, [i, \"aws-iso-e\"]],\n [e, [i, \"aws-iso-b\"]],\n [e, [i, \"aws-iso\"]],\n [e, [i, \"aws-cn\"]],\n [e, [i, \"aws-us-gov\"]],\n [e, [i, \"aws\"]],\n [f, [{ [m]: \"UseFIPS\" }, b]],\n [f, [{ fn: g, argv: [j, \"supportsFIPS\"] }, b]],\n [f, [{ [m]: \"UseDualStack\" }, b]],\n [f, [{ fn: g, argv: [j, \"supportsDualStack\"] }, b]]\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}\", k],\n [\"https://ecr.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [\"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [\"https://ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [\"https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 23, 3,\n 1, 4, r + 13,\n 2, 5, r + 13,\n 3, 20, 6,\n 4, 20, 7,\n 5, 20, 8,\n 6, 20, 9,\n 7, 20, 10,\n 8, 20, 11,\n 9, 20, 12,\n 10, 20, 13,\n 11, 16, 14,\n 13, 15, r + 4,\n 14, r + 11, r + 12,\n 12, 18, 17,\n 13, r + 9, r + 10,\n 13, 19, r + 6,\n 14, r + 8, r + 9,\n 11, 22, 21,\n 13, r + 5, r + 4,\n 13, r + 7, r + 6,\n 11, r + 1, 24,\n 13, r + 2, r + 3,\n]);\nconst bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n\nclass ECRServiceException extends ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, ECRServiceException.prototype);\n }\n}\n\nclass InvalidParameterException extends ECRServiceException {\n name = \"InvalidParameterException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidParameterException.prototype);\n }\n}\nclass RepositoryNotFoundException extends ECRServiceException {\n name = \"RepositoryNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"RepositoryNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, RepositoryNotFoundException.prototype);\n }\n}\nclass ServerException extends ECRServiceException {\n name = \"ServerException\";\n $fault = \"server\";\n constructor(opts) {\n super({\n name: \"ServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, ServerException.prototype);\n }\n}\nclass LimitExceededException extends ECRServiceException {\n name = \"LimitExceededException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LimitExceededException.prototype);\n }\n}\nclass UnableToGetUpstreamImageException extends ECRServiceException {\n name = \"UnableToGetUpstreamImageException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnableToGetUpstreamImageException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnableToGetUpstreamImageException.prototype);\n }\n}\nclass ValidationException extends ECRServiceException {\n name = \"ValidationException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n }\n}\nclass EmptyUploadException extends ECRServiceException {\n name = \"EmptyUploadException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"EmptyUploadException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, EmptyUploadException.prototype);\n }\n}\nclass InvalidLayerException extends ECRServiceException {\n name = \"InvalidLayerException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidLayerException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidLayerException.prototype);\n }\n}\nclass KmsException extends ECRServiceException {\n name = \"KmsException\";\n $fault = \"client\";\n kmsError;\n constructor(opts) {\n super({\n name: \"KmsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, KmsException.prototype);\n this.kmsError = opts.kmsError;\n }\n}\nclass LayerAlreadyExistsException extends ECRServiceException {\n name = \"LayerAlreadyExistsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LayerAlreadyExistsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LayerAlreadyExistsException.prototype);\n }\n}\nclass LayerPartTooSmallException extends ECRServiceException {\n name = \"LayerPartTooSmallException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LayerPartTooSmallException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LayerPartTooSmallException.prototype);\n }\n}\nclass UploadNotFoundException extends ECRServiceException {\n name = \"UploadNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UploadNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UploadNotFoundException.prototype);\n }\n}\nclass PullThroughCacheRuleAlreadyExistsException extends ECRServiceException {\n name = \"PullThroughCacheRuleAlreadyExistsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"PullThroughCacheRuleAlreadyExistsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, PullThroughCacheRuleAlreadyExistsException.prototype);\n }\n}\nclass SecretNotFoundException extends ECRServiceException {\n name = \"SecretNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"SecretNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, SecretNotFoundException.prototype);\n }\n}\nclass UnableToAccessSecretException extends ECRServiceException {\n name = \"UnableToAccessSecretException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnableToAccessSecretException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnableToAccessSecretException.prototype);\n }\n}\nclass UnableToDecryptSecretValueException extends ECRServiceException {\n name = \"UnableToDecryptSecretValueException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnableToDecryptSecretValueException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnableToDecryptSecretValueException.prototype);\n }\n}\nclass UnsupportedUpstreamRegistryException extends ECRServiceException {\n name = \"UnsupportedUpstreamRegistryException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnsupportedUpstreamRegistryException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnsupportedUpstreamRegistryException.prototype);\n }\n}\nclass InvalidTagParameterException extends ECRServiceException {\n name = \"InvalidTagParameterException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidTagParameterException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidTagParameterException.prototype);\n }\n}\nclass RepositoryAlreadyExistsException extends ECRServiceException {\n name = \"RepositoryAlreadyExistsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"RepositoryAlreadyExistsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, RepositoryAlreadyExistsException.prototype);\n }\n}\nclass TooManyTagsException extends ECRServiceException {\n name = \"TooManyTagsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyTagsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyTagsException.prototype);\n }\n}\nclass TemplateAlreadyExistsException extends ECRServiceException {\n name = \"TemplateAlreadyExistsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TemplateAlreadyExistsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TemplateAlreadyExistsException.prototype);\n }\n}\nclass LifecyclePolicyNotFoundException extends ECRServiceException {\n name = \"LifecyclePolicyNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LifecyclePolicyNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LifecyclePolicyNotFoundException.prototype);\n }\n}\nclass PullThroughCacheRuleNotFoundException extends ECRServiceException {\n name = \"PullThroughCacheRuleNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"PullThroughCacheRuleNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, PullThroughCacheRuleNotFoundException.prototype);\n }\n}\nclass RegistryPolicyNotFoundException extends ECRServiceException {\n name = \"RegistryPolicyNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"RegistryPolicyNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, RegistryPolicyNotFoundException.prototype);\n }\n}\nclass RepositoryNotEmptyException extends ECRServiceException {\n name = \"RepositoryNotEmptyException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"RepositoryNotEmptyException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, RepositoryNotEmptyException.prototype);\n }\n}\nclass TemplateNotFoundException extends ECRServiceException {\n name = \"TemplateNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TemplateNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TemplateNotFoundException.prototype);\n }\n}\nclass RepositoryPolicyNotFoundException extends ECRServiceException {\n name = \"RepositoryPolicyNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"RepositoryPolicyNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, RepositoryPolicyNotFoundException.prototype);\n }\n}\nclass SigningConfigurationNotFoundException extends ECRServiceException {\n name = \"SigningConfigurationNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"SigningConfigurationNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, SigningConfigurationNotFoundException.prototype);\n }\n}\nclass ExclusionNotFoundException extends ECRServiceException {\n name = \"ExclusionNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ExclusionNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExclusionNotFoundException.prototype);\n }\n}\nclass ImageNotFoundException extends ECRServiceException {\n name = \"ImageNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ImageNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ImageNotFoundException.prototype);\n }\n}\nclass ScanNotFoundException extends ECRServiceException {\n name = \"ScanNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ScanNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ScanNotFoundException.prototype);\n }\n}\nclass LayerInaccessibleException extends ECRServiceException {\n name = \"LayerInaccessibleException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LayerInaccessibleException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LayerInaccessibleException.prototype);\n }\n}\nclass LayersNotFoundException extends ECRServiceException {\n name = \"LayersNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LayersNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LayersNotFoundException.prototype);\n }\n}\nclass UnableToGetUpstreamLayerException extends ECRServiceException {\n name = \"UnableToGetUpstreamLayerException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnableToGetUpstreamLayerException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnableToGetUpstreamLayerException.prototype);\n }\n}\nclass LifecyclePolicyPreviewNotFoundException extends ECRServiceException {\n name = \"LifecyclePolicyPreviewNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LifecyclePolicyPreviewNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LifecyclePolicyPreviewNotFoundException.prototype);\n }\n}\nclass UnableToListUpstreamImageReferrersException extends ECRServiceException {\n name = \"UnableToListUpstreamImageReferrersException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnableToListUpstreamImageReferrersException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnableToListUpstreamImageReferrersException.prototype);\n }\n}\nclass ImageAlreadyExistsException extends ECRServiceException {\n name = \"ImageAlreadyExistsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ImageAlreadyExistsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ImageAlreadyExistsException.prototype);\n }\n}\nclass ImageDigestDoesNotMatchException extends ECRServiceException {\n name = \"ImageDigestDoesNotMatchException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ImageDigestDoesNotMatchException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ImageDigestDoesNotMatchException.prototype);\n }\n}\nclass ImageTagAlreadyExi