From 497af3c933e8ee3c2e256cccc6b608ed4bc7d869 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Thu, 12 Dec 2024 11:49:56 +0800 Subject: [PATCH] feat: ability to specify all release channels --- .github/workflows/test-ghcup.yaml | 29 ++++++++++++++++++++++++++++- ghcup/action.yml | 4 +++- ghcup/dist/index.js | 2 +- ghcup/src/index.ts | 2 +- ghcup/src/main.ts | 8 ++++---- 5 files changed, 37 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-ghcup.yaml b/.github/workflows/test-ghcup.yaml index 5764f91..d610b52 100644 --- a/.github/workflows/test-ghcup.yaml +++ b/.github/workflows/test-ghcup.yaml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: - build: + simple: strategy: matrix: runs-on: @@ -47,3 +47,30 @@ jobs: - run: ghcup whereis hls latest - run: which haskell-language-server-wrapper - run: haskell-language-server-wrapper --version + + vanilla_channel: + strategy: + matrix: + runs-on: + - ubuntu-latest + - macos-latest + - windows-latest + runs-on: ${{ matrix.runs-on }} + steps: + - uses: actions/checkout@v4 + + - uses: ./ghcup + with: + release-channels: | + GHCupURL + https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/develop/ghcup-vanilla-0.0.8.yaml + + - run: ghcup config + - run: ghcup debug-info + - run: ghcup tool-requirements + - run: ghcup list + + - run: ghcup install ghc latest --set + - run: ghcup whereis ghc latest + - run: which ghc + - run: ghc --version diff --git a/ghcup/action.yml b/ghcup/action.yml index d2ad59c..cbac303 100644 --- a/ghcup/action.yml +++ b/ghcup/action.yml @@ -9,8 +9,10 @@ inputs: version: description: Version to install default: latest - extra-release-channels: + release-channels: description: Additional release-channels + default: | + GHCupURL outputs: path: diff --git a/ghcup/dist/index.js b/ghcup/dist/index.js index 073bba0..eed625b 100644 --- a/ghcup/dist/index.js +++ b/ghcup/dist/index.js @@ -6,4 +6,4 @@ ${B.count} ${B.noun} ${B.is} pending: ${A.format(Q)} `.trim())}}nR.exports=iR});var Q2=L((Ix,A2)=>{var{kProxy:x1,kClose:j1,kDestroy:T1,kInterceptors:$1}=CA(),{URL:oR}=G("url"),sR=yE(),h1=qI(),y1=VE(),{InvalidArgumentError:fE,RequestAbortedError:q1}=QA(),rR=WE(),kE=Symbol("proxy agent"),Ig=Symbol("proxy client"),_E=Symbol("proxy headers"),YF=Symbol("request tls settings"),O1=Symbol("proxy tls settings"),tR=Symbol("connect endpoint function");function P1(A){return A==="https:"?443:80}function k1(A){if(typeof A==="string")A={uri:A};if(!A||!A.uri)throw new fE("Proxy opts.uri is mandatory");return{uri:A.uri,protocol:A.protocol||"https"}}function _1(A,Q){return new h1(A,Q)}class eR extends y1{constructor(A){super(A);if(this[x1]=k1(A),this[kE]=new sR(A),this[$1]=A.interceptors&&A.interceptors.ProxyAgent&&Array.isArray(A.interceptors.ProxyAgent)?A.interceptors.ProxyAgent:[],typeof A==="string")A={uri:A};if(!A||!A.uri)throw new fE("Proxy opts.uri is mandatory");let{clientFactory:Q=_1}=A;if(typeof Q!=="function")throw new fE("Proxy opts.clientFactory must be a function.");this[YF]=A.requestTls,this[O1]=A.proxyTls,this[_E]=A.headers||{};let B=new oR(A.uri),{origin:I,port:E,host:C,username:g,password:D}=B;if(A.auth&&A.token)throw new fE("opts.auth cannot be used in combination with opts.token");else if(A.auth)this[_E]["proxy-authorization"]=`Basic ${A.auth}`;else if(A.token)this[_E]["proxy-authorization"]=A.token;else if(g&&D)this[_E]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(g)}:${decodeURIComponent(D)}`).toString("base64")}`;let F=rR({...A.proxyTls});this[tR]=rR({...A.requestTls}),this[Ig]=Q(B,{connect:F}),this[kE]=new sR({...A,connect:async(Y,N)=>{let J=Y.host;if(!Y.port)J+=`:${P1(Y.protocol)}`;try{let{socket:U,statusCode:w}=await this[Ig].connect({origin:I,port:E,path:J,signal:Y.signal,headers:{...this[_E],host:C}});if(w!==200)U.on("error",()=>{}).destroy(),N(new q1(`Proxy response (${w}) !== 200 when HTTP Tunneling`));if(Y.protocol!=="https:"){N(null,U);return}let M;if(this[YF])M=this[YF].servername;else M=Y.servername;this[tR]({...Y,servername:M,httpSocket:U},N)}catch(U){N(U)}}})}dispatch(A,Q){let{host:B}=new oR(A.origin),I=f1(A.headers);return v1(I),this[kE].dispatch({...A,headers:{...I,host:B}},Q)}async[j1](){await this[kE].close(),await this[Ig].close()}async[T1](){await this[kE].destroy(),await this[Ig].destroy()}}function f1(A){if(Array.isArray(A)){let Q={};for(let B=0;BB.toLowerCase()==="proxy-authorization"))throw new fE("Proxy-Authorization should be sent in ProxyAgent constructor")}A2.exports=eR});var g2=L((Ex,C2)=>{var CI=G("assert"),{kRetryHandlerDefaultRetry:B2}=CA(),{RequestRetryError:Eg}=QA(),{isDisturbed:I2,parseHeaders:b1,parseRangeHeader:E2}=p();function m1(A){let Q=Date.now();return new Date(A).getTime()-Q}class JF{constructor(A,Q){let{retryOptions:B,...I}=A,{retry:E,maxRetries:C,maxTimeout:g,minTimeout:D,timeoutFactor:F,methods:Y,errorCodes:N,retryAfter:J,statusCodes:U}=B??{};this.dispatch=Q.dispatch,this.handler=Q.handler,this.opts=I,this.abort=null,this.aborted=!1,this.retryOpts={retry:E??JF[B2],retryAfter:J??!0,maxTimeout:g??30000,timeout:D??500,timeoutFactor:F??2,maxRetries:C??5,methods:Y??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:U??[500,502,503,504,429],errorCodes:N??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect((w)=>{if(this.aborted=!0,this.abort)this.abort(w);else this.reason=w})}onRequestSent(){if(this.handler.onRequestSent)this.handler.onRequestSent()}onUpgrade(A,Q,B){if(this.handler.onUpgrade)this.handler.onUpgrade(A,Q,B)}onConnect(A){if(this.aborted)A(this.reason);else this.abort=A}onBodySent(A){if(this.handler.onBodySent)return this.handler.onBodySent(A)}static[B2](A,{state:Q,opts:B},I){let{statusCode:E,code:C,headers:g}=A,{method:D,retryOptions:F}=B,{maxRetries:Y,timeout:N,maxTimeout:J,timeoutFactor:U,statusCodes:w,errorCodes:M,methods:V}=F,{counter:Z,currentTimeout:H}=Q;if(H=H!=null&&H>0?H:N,C&&C!=="UND_ERR_REQ_RETRY"&&C!=="UND_ERR_SOCKET"&&!M.includes(C)){I(A);return}if(Array.isArray(V)&&!V.includes(D)){I(A);return}if(E!=null&&Array.isArray(w)&&!w.includes(E)){I(A);return}if(Z>Y){I(A);return}let j=g!=null&&g["retry-after"];if(j)j=Number(j),j=isNaN(j)?m1(j):j*1000;let P=j>0?Math.min(j,J):Math.min(H*U**Z,J);Q.currentTimeout=P,setTimeout(()=>I(null),P)}onHeaders(A,Q,B,I){let E=b1(Q);if(this.retryCount+=1,A>=300)return this.abort(new Eg("Request failed",A,{headers:E,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,A!==206)return!0;let g=E2(E["content-range"]);if(!g)return this.abort(new Eg("Content-Range mismatch",A,{headers:E,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==E.etag)return this.abort(new Eg("ETag mismatch",A,{headers:E,count:this.retryCount})),!1;let{start:D,size:F,end:Y=F}=g;return CI(this.start===D,"content-range mismatch"),CI(this.end==null||this.end===Y,"content-range mismatch"),this.resume=B,!0}if(this.end==null){if(A===206){let g=E2(E["content-range"]);if(g==null)return this.handler.onHeaders(A,Q,B,I);let{start:D,size:F,end:Y=F}=g;CI(D!=null&&Number.isFinite(D)&&this.start!==D,"content-range mismatch"),CI(Number.isFinite(D)),CI(Y!=null&&Number.isFinite(Y)&&this.end!==Y,"invalid content-length"),this.start=D,this.end=Y}if(this.end==null){let g=E["content-length"];this.end=g!=null?Number(g):null}return CI(Number.isFinite(this.start)),CI(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=B,this.etag=E.etag!=null?E.etag:null,this.handler.onHeaders(A,Q,B,I)}let C=new Eg("Request failed",A,{headers:E,count:this.retryCount});return this.abort(C),!1}onData(A){return this.start+=A.length,this.handler.onData(A)}onComplete(A){return this.retryCount=0,this.handler.onComplete(A)}onError(A){if(this.aborted||I2(this.opts.body))return this.handler.onError(A);this.retryOpts.retry(A,{state:{counter:this.retryCount++,currentTimeout:this.retryAfter},opts:{retryOptions:this.retryOpts,...this.opts}},Q.bind(this));function Q(B){if(B!=null||this.aborted||I2(this.opts.body))return this.handler.onError(B);if(this.start!==0)this.opts={...this.opts,headers:{...this.opts.headers,range:`bytes=${this.start}-${this.end??""}`}};try{this.dispatch(this.opts,this)}catch(I){this.handler.onError(I)}}}}C2.exports=JF});var mI=L((Cx,Y2)=>{var D2=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:c1}=QA(),u1=yE();if(N2()===void 0)F2(new u1);function F2(A){if(!A||typeof A.dispatch!=="function")throw new c1("Argument agent must implement Agent");Object.defineProperty(globalThis,D2,{value:A,writable:!0,enumerable:!1,configurable:!1})}function N2(){return globalThis[D2]}Y2.exports={setGlobalDispatcher:F2,getGlobalDispatcher:N2}});var U2=L((gx,J2)=>{J2.exports=class A{constructor(Q){this.handler=Q}onConnect(...Q){return this.handler.onConnect(...Q)}onError(...Q){return this.handler.onError(...Q)}onUpgrade(...Q){return this.handler.onUpgrade(...Q)}onHeaders(...Q){return this.handler.onHeaders(...Q)}onData(...Q){return this.handler.onData(...Q)}onComplete(...Q){return this.handler.onComplete(...Q)}onBodySent(...Q){return this.handler.onBodySent(...Q)}}});var gI=L((Dx,L2)=>{var{kHeadersList:BQ,kConstruct:d1}=CA(),{kGuard:AB}=UB(),{kEnumerableProperty:eQ}=p(),{makeIterator:cI,isValidHeaderName:vE,isValidHeaderValue:R2}=xQ(),{webidl:b}=bA(),p1=G("assert"),QQ=Symbol("headers map"),qA=Symbol("headers map sorted");function G2(A){return A===10||A===13||A===9||A===32}function w2(A){let Q=0,B=A.length;while(B>Q&&G2(A.charCodeAt(B-1)))--B;while(B>Q&&G2(A.charCodeAt(Q)))++Q;return Q===0&&B===A.length?A:A.substring(Q,B)}function M2(A,Q){if(Array.isArray(Q))for(let B=0;B>","record"]})}function UF(A,Q,B){if(B=w2(B),!vE(Q))throw b.errors.invalidArgument({prefix:"Headers.append",value:Q,type:"header name"});else if(!R2(B))throw b.errors.invalidArgument({prefix:"Headers.append",value:B,type:"header value"});if(A[AB]==="immutable")throw new TypeError("immutable");else if(A[AB]==="request-no-cors");return A[BQ].append(Q,B)}class Cg{cookies=null;constructor(A){if(A instanceof Cg)this[QQ]=new Map(A[QQ]),this[qA]=A[qA],this.cookies=A.cookies===null?null:[...A.cookies];else this[QQ]=new Map(A),this[qA]=null}contains(A){return A=A.toLowerCase(),this[QQ].has(A)}clear(){this[QQ].clear(),this[qA]=null,this.cookies=null}append(A,Q){this[qA]=null;let B=A.toLowerCase(),I=this[QQ].get(B);if(I){let E=B==="cookie"?"; ":", ";this[QQ].set(B,{name:I.name,value:`${I.value}${E}${Q}`})}else this[QQ].set(B,{name:A,value:Q});if(B==="set-cookie")this.cookies??=[],this.cookies.push(Q)}set(A,Q){this[qA]=null;let B=A.toLowerCase();if(B==="set-cookie")this.cookies=[Q];this[QQ].set(B,{name:A,value:Q})}delete(A){if(this[qA]=null,A=A.toLowerCase(),A==="set-cookie")this.cookies=null;this[QQ].delete(A)}get(A){let Q=this[QQ].get(A.toLowerCase());return Q===void 0?null:Q.value}*[Symbol.iterator](){for(let[A,{value:Q}]of this[QQ])yield[A,Q]}get entries(){let A={};if(this[QQ].size)for(let{name:Q,value:B}of this[QQ].values())A[Q]=B;return A}}class kA{constructor(A=void 0){if(A===d1)return;if(this[BQ]=new Cg,this[AB]="none",A!==void 0)A=b.converters.HeadersInit(A),M2(this,A)}append(A,Q){return b.brandCheck(this,kA),b.argumentLengthCheck(arguments,2,{header:"Headers.append"}),A=b.converters.ByteString(A),Q=b.converters.ByteString(Q),UF(this,A,Q)}delete(A){if(b.brandCheck(this,kA),b.argumentLengthCheck(arguments,1,{header:"Headers.delete"}),A=b.converters.ByteString(A),!vE(A))throw b.errors.invalidArgument({prefix:"Headers.delete",value:A,type:"header name"});if(this[AB]==="immutable")throw new TypeError("immutable");else if(this[AB]==="request-no-cors");if(!this[BQ].contains(A))return;this[BQ].delete(A)}get(A){if(b.brandCheck(this,kA),b.argumentLengthCheck(arguments,1,{header:"Headers.get"}),A=b.converters.ByteString(A),!vE(A))throw b.errors.invalidArgument({prefix:"Headers.get",value:A,type:"header name"});return this[BQ].get(A)}has(A){if(b.brandCheck(this,kA),b.argumentLengthCheck(arguments,1,{header:"Headers.has"}),A=b.converters.ByteString(A),!vE(A))throw b.errors.invalidArgument({prefix:"Headers.has",value:A,type:"header name"});return this[BQ].contains(A)}set(A,Q){if(b.brandCheck(this,kA),b.argumentLengthCheck(arguments,2,{header:"Headers.set"}),A=b.converters.ByteString(A),Q=b.converters.ByteString(Q),Q=w2(Q),!vE(A))throw b.errors.invalidArgument({prefix:"Headers.set",value:A,type:"header name"});else if(!R2(Q))throw b.errors.invalidArgument({prefix:"Headers.set",value:Q,type:"header value"});if(this[AB]==="immutable")throw new TypeError("immutable");else if(this[AB]==="request-no-cors");this[BQ].set(A,Q)}getSetCookie(){b.brandCheck(this,kA);let A=this[BQ].cookies;if(A)return[...A];return[]}get[qA](){if(this[BQ][qA])return this[BQ][qA];let A=[],Q=[...this[BQ]].sort((I,E)=>I[0]A,"Headers","key")}return cI(()=>[...this[qA].values()],"Headers","key")}values(){if(b.brandCheck(this,kA),this[AB]==="immutable"){let A=this[qA];return cI(()=>A,"Headers","value")}return cI(()=>[...this[qA].values()],"Headers","value")}entries(){if(b.brandCheck(this,kA),this[AB]==="immutable"){let A=this[qA];return cI(()=>A,"Headers","key+value")}return cI(()=>[...this[qA].values()],"Headers","key+value")}forEach(A,Q=globalThis){if(b.brandCheck(this,kA),b.argumentLengthCheck(arguments,1,{header:"Headers.forEach"}),typeof A!=="function")throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(let[B,I]of this)A.apply(Q,[I,B,this])}[Symbol.for("nodejs.util.inspect.custom")](){return b.brandCheck(this,kA),this[BQ]}}kA.prototype[Symbol.iterator]=kA.prototype.entries;Object.defineProperties(kA.prototype,{append:eQ,delete:eQ,get:eQ,has:eQ,set:eQ,getSetCookie:eQ,keys:eQ,values:eQ,entries:eQ,forEach:eQ,[Symbol.iterator]:{enumerable:!1},[Symbol.toStringTag]:{value:"Headers",configurable:!0}});b.converters.HeadersInit=function(A){if(b.util.Type(A)==="Object"){if(A[Symbol.iterator])return b.converters["sequence>"](A);return b.converters["record"](A)}throw b.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};L2.exports={fill:M2,Headers:kA,HeadersList:Cg}});var Ng=L((Fx,H2)=>{var{Headers:l1,HeadersList:V2,fill:i1}=gI(),{extractBody:W2,cloneBody:n1,mixinBody:a1}=wE(),wF=p(),{kEnumerableProperty:ZQ}=wF,{isValidReasonPhrase:o1,isCancelled:s1,isAborted:r1,isBlobLike:t1,serializeJavascriptValueToJSONString:e1,isErrorLike:AS,isomorphicEncode:QS}=xQ(),{redirectStatusSet:BS,nullBodyStatus:IS,DOMException:Z2}=hB(),{kState:JA,kHeaders:TA,kGuard:uI,kRealm:WQ}=UB(),{webidl:_}=bA(),{FormData:ES}=SC(),{getGlobalOrigin:CS}=ZI(),{URLSerializer:X2}=vQ(),{kHeadersList:GF,kConstruct:gS}=CA(),MF=G("assert"),{types:RF}=G("util"),S2=globalThis.ReadableStream||G("stream/web").ReadableStream,DS=new TextEncoder("utf-8");class HA{static error(){let A={settingsObject:{}},Q=new HA;return Q[JA]=Dg(),Q[WQ]=A,Q[TA][GF]=Q[JA].headersList,Q[TA][uI]="immutable",Q[TA][WQ]=A,Q}static json(A,Q={}){if(_.argumentLengthCheck(arguments,1,{header:"Response.json"}),Q!==null)Q=_.converters.ResponseInit(Q);let B=DS.encode(e1(A)),I=W2(B),E={settingsObject:{}},C=new HA;return C[WQ]=E,C[TA][uI]="response",C[TA][WQ]=E,K2(C,Q,{body:I[0],type:"application/json"}),C}static redirect(A,Q=302){let B={settingsObject:{}};_.argumentLengthCheck(arguments,1,{header:"Response.redirect"}),A=_.converters.USVString(A),Q=_.converters["unsigned short"](Q);let I;try{I=new URL(A,CS())}catch(g){throw Object.assign(new TypeError("Failed to parse URL from "+A),{cause:g})}if(!BS.has(Q))throw new RangeError("Invalid status code "+Q);let E=new HA;E[WQ]=B,E[TA][uI]="immutable",E[TA][WQ]=B,E[JA].status=Q;let C=QS(X2(I));return E[JA].headersList.append("location",C),E}constructor(A=null,Q={}){if(A!==null)A=_.converters.BodyInit(A);Q=_.converters.ResponseInit(Q),this[WQ]={settingsObject:{}},this[JA]=Fg({}),this[TA]=new l1(gS),this[TA][uI]="response",this[TA][GF]=this[JA].headersList,this[TA][WQ]=this[WQ];let B=null;if(A!=null){let[I,E]=W2(A);B={body:I,type:E}}K2(this,Q,B)}get type(){return _.brandCheck(this,HA),this[JA].type}get url(){_.brandCheck(this,HA);let A=this[JA].urlList,Q=A[A.length-1]??null;if(Q===null)return"";return X2(Q,!0)}get redirected(){return _.brandCheck(this,HA),this[JA].urlList.length>1}get status(){return _.brandCheck(this,HA),this[JA].status}get ok(){return _.brandCheck(this,HA),this[JA].status>=200&&this[JA].status<=299}get statusText(){return _.brandCheck(this,HA),this[JA].statusText}get headers(){return _.brandCheck(this,HA),this[TA]}get body(){return _.brandCheck(this,HA),this[JA].body?this[JA].body.stream:null}get bodyUsed(){return _.brandCheck(this,HA),!!this[JA].body&&wF.isDisturbed(this[JA].body.stream)}clone(){if(_.brandCheck(this,HA),this.bodyUsed||this.body&&this.body.locked)throw _.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let A=LF(this[JA]),Q=new HA;return Q[JA]=A,Q[WQ]=this[WQ],Q[TA][GF]=A.headersList,Q[TA][uI]=this[TA][uI],Q[TA][WQ]=this[TA][WQ],Q}}a1(HA);Object.defineProperties(HA.prototype,{type:ZQ,url:ZQ,status:ZQ,ok:ZQ,redirected:ZQ,statusText:ZQ,headers:ZQ,clone:ZQ,body:ZQ,bodyUsed:ZQ,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(HA,{json:ZQ,redirect:ZQ,error:ZQ});function LF(A){if(A.internalResponse)return z2(LF(A.internalResponse),A.type);let Q=Fg({...A,body:null});if(A.body!=null)Q.body=n1(A.body);return Q}function Fg(A){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...A,headersList:A.headersList?new V2(A.headersList):new V2,urlList:A.urlList?[...A.urlList]:[]}}function Dg(A){let Q=AS(A);return Fg({type:"error",status:0,error:Q?A:new Error(A?String(A):A),aborted:A&&A.name==="AbortError"})}function gg(A,Q){return Q={internalResponse:A,...Q},new Proxy(A,{get(B,I){return I in Q?Q[I]:B[I]},set(B,I,E){return MF(!(I in Q)),B[I]=E,!0}})}function z2(A,Q){if(Q==="basic")return gg(A,{type:"basic",headersList:A.headersList});else if(Q==="cors")return gg(A,{type:"cors",headersList:A.headersList});else if(Q==="opaque")return gg(A,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});else if(Q==="opaqueredirect")return gg(A,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});else MF(!1)}function FS(A,Q=null){return MF(s1(A)),r1(A)?Dg(Object.assign(new Z2("The operation was aborted.","AbortError"),{cause:Q})):Dg(Object.assign(new Z2("Request was cancelled."),{cause:Q}))}function K2(A,Q,B){if(Q.status!==null&&(Q.status<200||Q.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in Q&&Q.statusText!=null){if(!o1(String(Q.statusText)))throw new TypeError("Invalid statusText")}if("status"in Q&&Q.status!=null)A[JA].status=Q.status;if("statusText"in Q&&Q.statusText!=null)A[JA].statusText=Q.statusText;if("headers"in Q&&Q.headers!=null)i1(A[TA],Q.headers);if(B){if(IS.includes(A.status))throw _.errors.exception({header:"Response constructor",message:"Invalid response status code "+A.status});if(A[JA].body=B.body,B.type!=null&&!A[JA].headersList.contains("Content-Type"))A[JA].headersList.append("content-type",B.type)}}_.converters.ReadableStream=_.interfaceConverter(S2);_.converters.FormData=_.interfaceConverter(ES);_.converters.URLSearchParams=_.interfaceConverter(URLSearchParams);_.converters.XMLHttpRequestBodyInit=function(A){if(typeof A==="string")return _.converters.USVString(A);if(t1(A))return _.converters.Blob(A,{strict:!1});if(RF.isArrayBuffer(A)||RF.isTypedArray(A)||RF.isDataView(A))return _.converters.BufferSource(A);if(wF.isFormDataLike(A))return _.converters.FormData(A,{strict:!1});if(A instanceof URLSearchParams)return _.converters.URLSearchParams(A);return _.converters.DOMString(A)};_.converters.BodyInit=function(A){if(A instanceof S2)return _.converters.ReadableStream(A);if(A?.[Symbol.asyncIterator])return A;return _.converters.XMLHttpRequestBodyInit(A)};_.converters.ResponseInit=_.dictionaryConverter([{key:"status",converter:_.converters["unsigned short"],defaultValue:200},{key:"statusText",converter:_.converters.ByteString,defaultValue:""},{key:"headers",converter:_.converters.HeadersInit}]);H2.exports={makeNetworkError:Dg,makeResponse:Fg,makeAppropriateNetworkError:FS,filterResponse:z2,Response:HA,cloneResponse:LF}});var cE=L((Nx,y2)=>{var{extractBody:NS,mixinBody:YS,cloneBody:JS}=wE(),{Headers:x2,fill:US,HeadersList:Gg}=gI(),{FinalizationRegistry:GS}=b0()(),mE=p(),{isValidHTTPToken:RS,sameOrigin:j2,normalizeMethod:wS,makePolicyContainer:MS,normalizeMethodRecord:LS}=xQ(),{forbiddenMethodsSet:VS,corsSafeListedMethodsSet:WS,referrerPolicy:ZS,requestRedirect:XS,requestMode:KS,requestCredentials:SS,requestCache:zS,requestDuplex:HS}=hB(),{kEnumerableProperty:KA}=mE,{kHeaders:_A,kSignal:bE,kState:YA,kGuard:Yg,kRealm:XQ}=UB(),{webidl:y}=bA(),{getGlobalOrigin:xS}=ZI(),{URLSerializer:jS}=vQ(),{kHeadersList:Jg,kConstruct:Ug}=CA(),TS=G("assert"),{getMaxListeners:T2,setMaxListeners:$2,getEventListeners:$S,defaultMaxListeners:h2}=G("events"),VF=globalThis.TransformStream,hS=Symbol("abortController"),yS=new GS(({signal:A,abort:Q})=>{A.removeEventListener("abort",Q)});class BA{constructor(A,Q={}){if(A===Ug)return;y.argumentLengthCheck(arguments,1,{header:"Request constructor"}),A=y.converters.RequestInfo(A),Q=y.converters.RequestInit(Q),this[XQ]={settingsObject:{baseUrl:xS(),get origin(){return this.baseUrl?.origin},policyContainer:MS()}};let B=null,I=null,E=this[XQ].settingsObject.baseUrl,C=null;if(typeof A==="string"){let V;try{V=new URL(A,E)}catch(Z){throw new TypeError("Failed to parse URL from "+A,{cause:Z})}if(V.username||V.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+A);B=Rg({urlList:[V]}),I="cors"}else TS(A instanceof BA),B=A[YA],C=A[bE];let g=this[XQ].settingsObject.origin,D="client";if(B.window?.constructor?.name==="EnvironmentSettingsObject"&&j2(B.window,g))D=B.window;if(Q.window!=null)throw new TypeError(`'window' option '${D}' must be null`);if("window"in Q)D="no-window";B=Rg({method:B.method,headersList:B.headersList,unsafeRequest:B.unsafeRequest,client:this[XQ].settingsObject,window:D,priority:B.priority,origin:B.origin,referrer:B.referrer,referrerPolicy:B.referrerPolicy,mode:B.mode,credentials:B.credentials,cache:B.cache,redirect:B.redirect,integrity:B.integrity,keepalive:B.keepalive,reloadNavigation:B.reloadNavigation,historyNavigation:B.historyNavigation,urlList:[...B.urlList]});let F=Object.keys(Q).length!==0;if(F){if(B.mode==="navigate")B.mode="same-origin";B.reloadNavigation=!1,B.historyNavigation=!1,B.origin="client",B.referrer="client",B.referrerPolicy="",B.url=B.urlList[B.urlList.length-1],B.urlList=[B.url]}if(Q.referrer!==void 0){let V=Q.referrer;if(V==="")B.referrer="no-referrer";else{let Z;try{Z=new URL(V,E)}catch(H){throw new TypeError(`Referrer "${V}" is not a valid URL.`,{cause:H})}if(Z.protocol==="about:"&&Z.hostname==="client"||g&&!j2(Z,this[XQ].settingsObject.baseUrl))B.referrer="client";else B.referrer=Z}}if(Q.referrerPolicy!==void 0)B.referrerPolicy=Q.referrerPolicy;let Y;if(Q.mode!==void 0)Y=Q.mode;else Y=I;if(Y==="navigate")throw y.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(Y!=null)B.mode=Y;if(Q.credentials!==void 0)B.credentials=Q.credentials;if(Q.cache!==void 0)B.cache=Q.cache;if(B.cache==="only-if-cached"&&B.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(Q.redirect!==void 0)B.redirect=Q.redirect;if(Q.integrity!=null)B.integrity=String(Q.integrity);if(Q.keepalive!==void 0)B.keepalive=Boolean(Q.keepalive);if(Q.method!==void 0){let V=Q.method;if(!RS(V))throw new TypeError(`'${V}' is not a valid HTTP method.`);if(VS.has(V.toUpperCase()))throw new TypeError(`'${V}' HTTP method is unsupported.`);V=LS[V]??wS(V),B.method=V}if(Q.signal!==void 0)C=Q.signal;this[YA]=B;let N=new AbortController;if(this[bE]=N.signal,this[bE][XQ]=this[XQ],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)N.abort(C.reason);else{this[hS]=N;let V=new WeakRef(N),Z=function(){let H=V.deref();if(H!==void 0)H.abort(this.reason)};try{if(typeof T2==="function"&&T2(C)===h2)$2(100,C);else if($S(C,"abort").length>=h2)$2(100,C)}catch{}mE.addAbortListener(C,Z),yS.register(N,{signal:C,abort:Z})}}if(this[_A]=new x2(Ug),this[_A][Jg]=B.headersList,this[_A][Yg]="request",this[_A][XQ]=this[XQ],Y==="no-cors"){if(!WS.has(B.method))throw new TypeError(`'${B.method} is unsupported in no-cors mode.`);this[_A][Yg]="request-no-cors"}if(F){let V=this[_A][Jg],Z=Q.headers!==void 0?Q.headers:new Gg(V);if(V.clear(),Z instanceof Gg){for(let[H,j]of Z)V.append(H,j);V.cookies=Z.cookies}else US(this[_A],Z)}let J=A instanceof BA?A[YA].body:null;if((Q.body!=null||J!=null)&&(B.method==="GET"||B.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let U=null;if(Q.body!=null){let[V,Z]=NS(Q.body,B.keepalive);if(U=V,Z&&!this[_A][Jg].contains("content-type"))this[_A].append("content-type",Z)}let w=U??J;if(w!=null&&w.source==null){if(U!=null&&Q.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(B.mode!=="same-origin"&&B.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');B.useCORSPreflightFlag=!0}let M=w;if(U==null&&J!=null){if(mE.isDisturbed(J.stream)||J.stream.locked)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");if(!VF)VF=G("stream/web").TransformStream;let V=new VF;J.stream.pipeThrough(V),M={source:J.source,length:J.length,stream:V.readable}}this[YA].body=M}get method(){return y.brandCheck(this,BA),this[YA].method}get url(){return y.brandCheck(this,BA),jS(this[YA].url)}get headers(){return y.brandCheck(this,BA),this[_A]}get destination(){return y.brandCheck(this,BA),this[YA].destination}get referrer(){if(y.brandCheck(this,BA),this[YA].referrer==="no-referrer")return"";if(this[YA].referrer==="client")return"about:client";return this[YA].referrer.toString()}get referrerPolicy(){return y.brandCheck(this,BA),this[YA].referrerPolicy}get mode(){return y.brandCheck(this,BA),this[YA].mode}get credentials(){return this[YA].credentials}get cache(){return y.brandCheck(this,BA),this[YA].cache}get redirect(){return y.brandCheck(this,BA),this[YA].redirect}get integrity(){return y.brandCheck(this,BA),this[YA].integrity}get keepalive(){return y.brandCheck(this,BA),this[YA].keepalive}get isReloadNavigation(){return y.brandCheck(this,BA),this[YA].reloadNavigation}get isHistoryNavigation(){return y.brandCheck(this,BA),this[YA].historyNavigation}get signal(){return y.brandCheck(this,BA),this[bE]}get body(){return y.brandCheck(this,BA),this[YA].body?this[YA].body.stream:null}get bodyUsed(){return y.brandCheck(this,BA),!!this[YA].body&&mE.isDisturbed(this[YA].body.stream)}get duplex(){return y.brandCheck(this,BA),"half"}clone(){if(y.brandCheck(this,BA),this.bodyUsed||this.body?.locked)throw new TypeError("unusable");let A=qS(this[YA]),Q=new BA(Ug);Q[YA]=A,Q[XQ]=this[XQ],Q[_A]=new x2(Ug),Q[_A][Jg]=A.headersList,Q[_A][Yg]=this[_A][Yg],Q[_A][XQ]=this[_A][XQ];let B=new AbortController;if(this.signal.aborted)B.abort(this.signal.reason);else mE.addAbortListener(this.signal,()=>{B.abort(this.signal.reason)});return Q[bE]=B.signal,Q}}YS(BA);function Rg(A){let Q={method:"GET",localURLsOnly:!1,unsafeRequest:!1,body:null,client:null,reservedClient:null,replacesClientId:"",window:"client",keepalive:!1,serviceWorkers:"all",initiator:"",destination:"",priority:null,origin:"client",policyContainer:"client",referrer:"client",referrerPolicy:"",mode:"no-cors",useCORSPreflightFlag:!1,credentials:"same-origin",useCredentials:!1,cache:"default",redirect:"follow",integrity:"",cryptoGraphicsNonceMetadata:"",parserMetadata:"",reloadNavigation:!1,historyNavigation:!1,userActivation:!1,taintedOrigin:!1,redirectCount:0,responseTainting:"basic",preventNoCacheCacheControlHeaderModification:!1,done:!1,timingAllowFailed:!1,...A,headersList:A.headersList?new Gg(A.headersList):new Gg};return Q.url=Q.urlList[0],Q}function qS(A){let Q=Rg({...A,body:null});if(A.body!=null)Q.body=JS(A.body);return Q}Object.defineProperties(BA.prototype,{method:KA,url:KA,headers:KA,redirect:KA,clone:KA,signal:KA,duplex:KA,destination:KA,body:KA,bodyUsed:KA,isHistoryNavigation:KA,isReloadNavigation:KA,keepalive:KA,integrity:KA,cache:KA,credentials:KA,attribute:KA,referrerPolicy:KA,referrer:KA,mode:KA,[Symbol.toStringTag]:{value:"Request",configurable:!0}});y.converters.Request=y.interfaceConverter(BA);y.converters.RequestInfo=function(A){if(typeof A==="string")return y.converters.USVString(A);if(A instanceof BA)return y.converters.Request(A);return y.converters.USVString(A)};y.converters.AbortSignal=y.interfaceConverter(AbortSignal);y.converters.RequestInit=y.dictionaryConverter([{key:"method",converter:y.converters.ByteString},{key:"headers",converter:y.converters.HeadersInit},{key:"body",converter:y.nullableConverter(y.converters.BodyInit)},{key:"referrer",converter:y.converters.USVString},{key:"referrerPolicy",converter:y.converters.DOMString,allowedValues:ZS},{key:"mode",converter:y.converters.DOMString,allowedValues:KS},{key:"credentials",converter:y.converters.DOMString,allowedValues:SS},{key:"cache",converter:y.converters.DOMString,allowedValues:zS},{key:"redirect",converter:y.converters.DOMString,allowedValues:XS},{key:"integrity",converter:y.converters.DOMString},{key:"keepalive",converter:y.converters.boolean},{key:"signal",converter:y.nullableConverter((A)=>y.converters.AbortSignal(A,{strict:!1}))},{key:"window",converter:y.converters.any},{key:"duplex",converter:y.converters.DOMString,allowedValues:HS}]);y2.exports={Request:BA,makeRequest:Rg}});var Zg=L((Yx,l2)=>{var{Response:OS,makeNetworkError:IA,makeAppropriateNetworkError:wg,filterResponse:WF,makeResponse:Mg}=Ng(),{Headers:q2}=gI(),{Request:PS,makeRequest:kS}=cE(),uE=G("zlib"),{bytesMatch:_S,makePolicyContainer:fS,clonePolicyContainer:vS,requestBadPort:bS,TAOCheck:mS,appendRequestOriginHeader:cS,responseLocationURL:uS,requestCurrentURL:QB,setRequestReferrerPolicyOnRedirect:dS,tryUpgradeRequestToAPotentiallyTrustworthyURL:pS,createOpaqueTimingInfo:TF,appendFetchMetadata:lS,corsCheck:iS,crossOriginResourcePolicyCheck:nS,determineRequestsReferrer:aS,coarsenedSharedCurrentTime:$F,createDeferredPromise:oS,isBlobLike:sS,sameOrigin:HF,isCancelled:pI,isAborted:O2,isErrorLike:rS,fullyReadBody:f2,readableStreamClose:tS,isomorphicEncode:xF,urlIsLocal:eS,urlIsHttpHttpsScheme:hF,urlHasHttpsScheme:A8}=xQ(),{kState:jF,kHeaders:ZF,kGuard:Q8,kRealm:P2}=UB(),lI=G("assert"),{safelyExtractBody:Lg}=wE(),{redirectStatusSet:v2,nullBodyStatus:b2,safeMethodsSet:B8,requestBodyHeader:I8,subresourceSet:E8,DOMException:Vg}=hB(),{kHeadersList:dI}=CA(),C8=G("events"),{Readable:g8,pipeline:D8}=G("stream"),{addAbortListener:F8,isErrored:N8,isReadable:Wg,nodeMajor:k2,nodeMinor:Y8}=p(),{dataURLProcessor:J8,serializeAMimeType:U8}=vQ(),{TransformStream:G8}=G("stream/web"),{getGlobalDispatcher:R8}=mI(),{webidl:w8}=bA(),{STATUS_CODES:M8}=G("http"),L8=["GET","HEAD"],XF,KF=globalThis.ReadableStream;class yF extends C8{constructor(A){super();this.dispatcher=A,this.connection=null,this.dump=!1,this.state="ongoing",this.setMaxListeners(21)}terminate(A){if(this.state!=="ongoing")return;this.state="terminated",this.connection?.destroy(A),this.emit("terminated",A)}abort(A){if(this.state!=="ongoing")return;if(this.state="aborted",!A)A=new Vg("The operation was aborted.","AbortError");this.serializedAbortReason=A,this.connection?.destroy(A),this.emit("terminated",A)}}function V8(A,Q={}){w8.argumentLengthCheck(arguments,1,{header:"globalThis.fetch"});let B=oS(),I;try{I=new PS(A,Q)}catch(U){return B.reject(U),B.promise}let E=I[jF];if(I.signal.aborted)return SF(B,E,null,I.signal.reason),B.promise;if(E.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope")E.serviceWorkers="none";let g=null,D=null,F=!1,Y=null;return F8(I.signal,()=>{F=!0,lI(Y!=null),Y.abort(I.signal.reason),SF(B,E,g,I.signal.reason)}),Y=c2({request:E,processResponseEndOfBody:(U)=>m2(U,"fetch"),processResponse:(U)=>{if(F)return Promise.resolve();if(U.aborted)return SF(B,E,g,Y.serializedAbortReason),Promise.resolve();if(U.type==="error")return B.reject(Object.assign(new TypeError("fetch failed"),{cause:U.error})),Promise.resolve();g=new OS,g[jF]=U,g[P2]=D,g[ZF][dI]=U.headersList,g[ZF][Q8]="immutable",g[ZF][P2]=D,B.resolve(g)},dispatcher:Q.dispatcher??R8()}),B.promise}function m2(A,Q="other"){if(A.type==="error"&&A.aborted)return;if(!A.urlList?.length)return;let B=A.urlList[0],I=A.timingInfo,E=A.cacheState;if(!hF(B))return;if(I===null)return;if(!A.timingAllowPassed)I=TF({startTime:I.startTime}),E="";I.endTime=$F(),A.timingInfo=I,W8(I,B,Q,globalThis,E)}function W8(A,Q,B,I,E){if(k2>18||k2===18&&Y8>=2)performance.markResourceTiming(A,Q.href,B,I,E)}function SF(A,Q,B,I){if(!I)I=new Vg("The operation was aborted.","AbortError");if(A.reject(I),Q.body!=null&&Wg(Q.body?.stream))Q.body.stream.cancel(I).catch((C)=>{if(C.code==="ERR_INVALID_STATE")return;throw C});if(B==null)return;let E=B[jF];if(E.body!=null&&Wg(E.body?.stream))E.body.stream.cancel(I).catch((C)=>{if(C.code==="ERR_INVALID_STATE")return;throw C})}function c2({request:A,processRequestBodyChunkLength:Q,processRequestEndOfBody:B,processResponse:I,processResponseEndOfBody:E,processResponseConsumeBody:C,useParallelQueue:g=!1,dispatcher:D}){let F=null,Y=!1;if(A.client!=null)F=A.client.globalObject,Y=A.client.crossOriginIsolatedCapability;let N=$F(Y),J=TF({startTime:N}),U={controller:new yF(D),request:A,timingInfo:J,processRequestBodyChunkLength:Q,processRequestEndOfBody:B,processResponse:I,processResponseConsumeBody:C,processResponseEndOfBody:E,taskDestination:F,crossOriginIsolatedCapability:Y};if(lI(!A.body||A.body.stream),A.window==="client")A.window=A.client?.globalObject?.constructor?.name==="Window"?A.client:"no-window";if(A.origin==="client")A.origin=A.client?.origin;if(A.policyContainer==="client")if(A.client!=null)A.policyContainer=vS(A.client.policyContainer);else A.policyContainer=fS();if(!A.headersList.contains("accept"))A.headersList.append("accept","*/*");if(!A.headersList.contains("accept-language"))A.headersList.append("accept-language","*");if(A.priority===null);if(E8.has(A.destination));return u2(U).catch((w)=>{U.controller.terminate(w)}),U.controller}async function u2(A,Q=!1){let B=A.request,I=null;if(B.localURLsOnly&&!eS(QB(B)))I=IA("local URLs only");if(pS(B),bS(B)==="blocked")I=IA("bad port");if(B.referrerPolicy==="")B.referrerPolicy=B.policyContainer.referrerPolicy;if(B.referrer!=="no-referrer")B.referrer=aS(B);if(I===null)I=await(async()=>{let C=QB(B);if(HF(C,B.url)&&B.responseTainting==="basic"||C.protocol==="data:"||(B.mode==="navigate"||B.mode==="websocket"))return B.responseTainting="basic",await _2(A);if(B.mode==="same-origin")return IA('request mode cannot be "same-origin"');if(B.mode==="no-cors"){if(B.redirect!=="follow")return IA('redirect mode cannot be "follow" for "no-cors" request');return B.responseTainting="opaque",await _2(A)}if(!hF(QB(B)))return IA("URL scheme must be a HTTP(S) scheme");return B.responseTainting="cors",await d2(A)})();if(Q)return I;if(I.status!==0&&!I.internalResponse){if(B.responseTainting==="cors");if(B.responseTainting==="basic")I=WF(I,"basic");else if(B.responseTainting==="cors")I=WF(I,"cors");else if(B.responseTainting==="opaque")I=WF(I,"opaque");else lI(!1)}let E=I.status===0?I:I.internalResponse;if(E.urlList.length===0)E.urlList.push(...B.urlList);if(!B.timingAllowFailed)I.timingAllowPassed=!0;if(I.type==="opaque"&&E.status===206&&E.rangeRequested&&!B.headers.contains("range"))I=E=IA();if(I.status!==0&&(B.method==="HEAD"||B.method==="CONNECT"||b2.includes(E.status)))E.body=null,A.controller.dump=!0;if(B.integrity){let C=(D)=>zF(A,IA(D));if(B.responseTainting==="opaque"||I.body==null){C(I.error);return}let g=(D)=>{if(!_S(D,B.integrity)){C("integrity mismatch");return}I.body=Lg(D)[0],zF(A,I)};await f2(I.body,g,C)}else zF(A,I)}function _2(A){if(pI(A)&&A.request.redirectCount===0)return Promise.resolve(wg(A));let{request:Q}=A,{protocol:B}=QB(Q);switch(B){case"about:":return Promise.resolve(IA("about scheme is not supported"));case"blob:":{if(!XF)XF=G("buffer").resolveObjectURL;let I=QB(Q);if(I.search.length!==0)return Promise.resolve(IA("NetworkError when attempting to fetch resource."));let E=XF(I.toString());if(Q.method!=="GET"||!sS(E))return Promise.resolve(IA("invalid method"));let C=Lg(E),g=C[0],D=xF(`${g.length}`),F=C[1]??"",Y=Mg({statusText:"OK",headersList:[["content-length",{name:"Content-Length",value:D}],["content-type",{name:"Content-Type",value:F}]]});return Y.body=g,Promise.resolve(Y)}case"data:":{let I=QB(Q),E=J8(I);if(E==="failure")return Promise.resolve(IA("failed to fetch the data URL"));let C=U8(E.mimeType);return Promise.resolve(Mg({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:C}]],body:Lg(E.body)[0]}))}case"file:":return Promise.resolve(IA("not implemented... yet..."));case"http:":case"https:":return d2(A).catch((I)=>IA(I));default:return Promise.resolve(IA("unknown scheme"))}}function Z8(A,Q){if(A.request.done=!0,A.processResponseDone!=null)queueMicrotask(()=>A.processResponseDone(Q))}function zF(A,Q){if(Q.type==="error")Q.urlList=[A.request.urlList[0]],Q.timingInfo=TF({startTime:A.timingInfo.startTime});let B=()=>{if(A.request.done=!0,A.processResponseEndOfBody!=null)queueMicrotask(()=>A.processResponseEndOfBody(Q))};if(A.processResponse!=null)queueMicrotask(()=>A.processResponse(Q));if(Q.body==null)B();else{let E=new G8({start(){},transform:(C,g)=>{g.enqueue(C)},flush:B},{size(){return 1}},{size(){return 1}});Q.body={stream:Q.body.stream.pipeThrough(E)}}if(A.processResponseConsumeBody!=null){let I=(C)=>A.processResponseConsumeBody(Q,C),E=(C)=>A.processResponseConsumeBody(Q,C);if(Q.body==null)queueMicrotask(()=>I(null));else return f2(Q.body,I,E);return Promise.resolve()}}async function d2(A){let Q=A.request,B=null,I=null,E=A.timingInfo;if(Q.serviceWorkers==="all");if(B===null){if(Q.redirect==="follow")Q.serviceWorkers="none";if(I=B=await p2(A),Q.responseTainting==="cors"&&iS(Q,B)==="failure")return IA("cors failure");if(mS(Q,B)==="failure")Q.timingAllowFailed=!0}if((Q.responseTainting==="opaque"||B.type==="opaque")&&nS(Q.origin,Q.client,Q.destination,I)==="blocked")return IA("blocked");if(v2.has(I.status)){if(Q.redirect!=="manual")A.controller.connection.destroy();if(Q.redirect==="error")B=IA("unexpected redirect");else if(Q.redirect==="manual")B=I;else if(Q.redirect==="follow")B=await X8(A,B);else lI(!1)}return B.timingInfo=E,B}function X8(A,Q){let B=A.request,I=Q.internalResponse?Q.internalResponse:Q,E;try{if(E=uS(I,QB(B).hash),E==null)return Q}catch(g){return Promise.resolve(IA(g))}if(!hF(E))return Promise.resolve(IA("URL scheme must be a HTTP(S) scheme"));if(B.redirectCount===20)return Promise.resolve(IA("redirect count exceeded"));if(B.redirectCount+=1,B.mode==="cors"&&(E.username||E.password)&&!HF(B,E))return Promise.resolve(IA('cross origin not allowed for request mode "cors"'));if(B.responseTainting==="cors"&&(E.username||E.password))return Promise.resolve(IA('URL cannot contain credentials for request mode "cors"'));if(I.status!==303&&B.body!=null&&B.body.source==null)return Promise.resolve(IA());if([301,302].includes(I.status)&&B.method==="POST"||I.status===303&&!L8.includes(B.method)){B.method="GET",B.body=null;for(let g of I8)B.headersList.delete(g)}if(!HF(QB(B),E))B.headersList.delete("authorization"),B.headersList.delete("proxy-authorization",!0),B.headersList.delete("cookie"),B.headersList.delete("host");if(B.body!=null)lI(B.body.source!=null),B.body=Lg(B.body.source)[0];let C=A.timingInfo;if(C.redirectEndTime=C.postRedirectStartTime=$F(A.crossOriginIsolatedCapability),C.redirectStartTime===0)C.redirectStartTime=C.startTime;return B.urlList.push(E),dS(B,I),u2(A,!0)}async function p2(A,Q=!1,B=!1){let I=A.request,E=null,C=null,g=null,D=null,F=!1;if(I.window==="no-window"&&I.redirect==="error")E=A,C=I;else C=kS(I),E={...A},E.request=C;let Y=I.credentials==="include"||I.credentials==="same-origin"&&I.responseTainting==="basic",N=C.body?C.body.length:null,J=null;if(C.body==null&&["POST","PUT"].includes(C.method))J="0";if(N!=null)J=xF(`${N}`);if(J!=null)C.headersList.append("content-length",J);if(N!=null&&C.keepalive);if(C.referrer instanceof URL)C.headersList.append("referer",xF(C.referrer.href));if(cS(C),lS(C),!C.headersList.contains("user-agent"))C.headersList.append("user-agent",typeof esbuildDetection==="undefined"?"undici":"node");if(C.cache==="default"&&(C.headersList.contains("if-modified-since")||C.headersList.contains("if-none-match")||C.headersList.contains("if-unmodified-since")||C.headersList.contains("if-match")||C.headersList.contains("if-range")))C.cache="no-store";if(C.cache==="no-cache"&&!C.preventNoCacheCacheControlHeaderModification&&!C.headersList.contains("cache-control"))C.headersList.append("cache-control","max-age=0");if(C.cache==="no-store"||C.cache==="reload"){if(!C.headersList.contains("pragma"))C.headersList.append("pragma","no-cache");if(!C.headersList.contains("cache-control"))C.headersList.append("cache-control","no-cache")}if(C.headersList.contains("range"))C.headersList.append("accept-encoding","identity");if(!C.headersList.contains("accept-encoding"))if(A8(QB(C)))C.headersList.append("accept-encoding","br, gzip, deflate");else C.headersList.append("accept-encoding","gzip, deflate");if(C.headersList.delete("host"),D==null)C.cache="no-store";if(C.mode!=="no-store"&&C.mode!=="reload");if(g==null){if(C.mode==="only-if-cached")return IA("only if cached");let U=await K8(E,Y,B);if(!B8.has(C.method)&&U.status>=200&&U.status<=399);if(F&&U.status===304);if(g==null)g=U}if(g.urlList=[...C.urlList],C.headersList.contains("range"))g.rangeRequested=!0;if(g.requestIncludesCredentials=Y,g.status===407){if(I.window==="no-window")return IA();if(pI(A))return wg(A);return IA("proxy authentication required")}if(g.status===421&&!B&&(I.body==null||I.body.source!=null)){if(pI(A))return wg(A);A.controller.connection.destroy(),g=await p2(A,Q,!0)}return g}async function K8(A,Q=!1,B=!1){lI(!A.controller.connection||A.controller.connection.destroyed),A.controller.connection={abort:null,destroyed:!1,destroy(M){if(!this.destroyed)this.destroyed=!0,this.abort?.(M??new Vg("The operation was aborted.","AbortError"))}};let I=A.request,E=null,C=A.timingInfo;if(!0)I.cache="no-store";let D=B?"yes":"no";if(I.mode==="websocket");let F=null;if(I.body==null&&A.processRequestEndOfBody)queueMicrotask(()=>A.processRequestEndOfBody());else if(I.body!=null){let M=async function*(H){if(pI(A))return;yield H,A.processRequestBodyChunkLength?.(H.byteLength)},V=()=>{if(pI(A))return;if(A.processRequestEndOfBody)A.processRequestEndOfBody()},Z=(H)=>{if(pI(A))return;if(H.name==="AbortError")A.controller.abort();else A.controller.terminate(H)};F=async function*(){try{for await(let H of I.body.stream)yield*M(H);V()}catch(H){Z(H)}}()}try{let{body:M,status:V,statusText:Z,headersList:H,socket:j}=await w({body:F});if(j)E=Mg({status:V,statusText:Z,headersList:H,socket:j});else{let P=M[Symbol.asyncIterator]();A.controller.next=()=>P.next(),E=Mg({status:V,statusText:Z,headersList:H})}}catch(M){if(M.name==="AbortError")return A.controller.connection.destroy(),wg(A,M);return IA(M)}let Y=()=>{A.controller.resume()},N=(M)=>{A.controller.abort(M)};if(!KF)KF=G("stream/web").ReadableStream;let J=new KF({async start(M){A.controller.controller=M},async pull(M){await Y(M)},async cancel(M){await N(M)}},{highWaterMark:0,size(){return 1}});E.body={stream:J},A.controller.on("terminated",U),A.controller.resume=async()=>{while(!0){let M,V;try{let{done:Z,value:H}=await A.controller.next();if(O2(A))break;M=Z?void 0:H}catch(Z){if(A.controller.ended&&!C.encodedBodySize)M=void 0;else M=Z,V=!0}if(M===void 0){tS(A.controller.controller),Z8(A,E);return}if(C.decodedBodySize+=M?.byteLength??0,V){A.controller.terminate(M);return}if(A.controller.controller.enqueue(new Uint8Array(M)),N8(J)){A.controller.terminate();return}if(!A.controller.controller.desiredSize)return}};function U(M){if(O2(A)){if(E.aborted=!0,Wg(J))A.controller.controller.error(A.controller.serializedAbortReason)}else if(Wg(J))A.controller.controller.error(new TypeError("terminated",{cause:rS(M)?M:void 0}));A.controller.connection.destroy()}return E;async function w({body:M}){let V=QB(I),Z=A.controller.dispatcher;return new Promise((H,j)=>Z.dispatch({path:V.pathname+V.search,origin:V.origin,method:I.method,body:A.controller.dispatcher.isMockActive?I.body&&(I.body.source||I.body.stream):M,headers:I.headersList.entries,maxRedirections:0,upgrade:I.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(P){let{connection:c}=A.controller;if(c.destroyed)P(new Vg("The operation was aborted.","AbortError"));else A.controller.on("terminated",P),this.abort=c.abort=P},onHeaders(P,c,YQ,xA){if(P<200)return;let SA=[],JQ="",sA=new q2;if(Array.isArray(c))for(let EA=0;EAxB.trim());else if(RA.toLowerCase()==="location")JQ=tA;sA[dI].append(RA,tA)}else{let EA=Object.keys(c);for(let RA of EA){let tA=c[RA];if(RA.toLowerCase()==="content-encoding")SA=tA.toLowerCase().split(",").map((xB)=>xB.trim()).reverse();else if(RA.toLowerCase()==="location")JQ=tA;sA[dI].append(RA,tA)}}this.body=new g8({read:YQ});let UQ=[],rA=I.redirect==="follow"&&JQ&&v2.has(P);if(I.method!=="HEAD"&&I.method!=="CONNECT"&&!b2.includes(P)&&!rA)for(let EA of SA)if(EA==="x-gzip"||EA==="gzip")UQ.push(uE.createGunzip({flush:uE.constants.Z_SYNC_FLUSH,finishFlush:uE.constants.Z_SYNC_FLUSH}));else if(EA==="deflate")UQ.push(uE.createInflate());else if(EA==="br")UQ.push(uE.createBrotliDecompress());else{UQ.length=0;break}return H({status:P,statusText:xA,headersList:sA[dI],body:UQ.length?D8(this.body,...UQ,()=>{}):this.body.on("error",()=>{})}),!0},onData(P){if(A.controller.dump)return;let c=P;return C.encodedBodySize+=c.byteLength,this.body.push(c)},onComplete(){if(this.abort)A.controller.off("terminated",this.abort);A.controller.ended=!0,this.body.push(null)},onError(P){if(this.abort)A.controller.off("terminated",this.abort);this.body?.destroy(P),A.controller.terminate(P),j(P)},onUpgrade(P,c,YQ){if(P!==101)return;let xA=new q2;for(let SA=0;SA{i2.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 a2=L((Ux,n2)=>{var{webidl:KQ}=bA(),Xg=Symbol("ProgressEvent state");class dE extends Event{constructor(A,Q={}){A=KQ.converters.DOMString(A),Q=KQ.converters.ProgressEventInit(Q??{});super(A,Q);this[Xg]={lengthComputable:Q.lengthComputable,loaded:Q.loaded,total:Q.total}}get lengthComputable(){return KQ.brandCheck(this,dE),this[Xg].lengthComputable}get loaded(){return KQ.brandCheck(this,dE),this[Xg].loaded}get total(){return KQ.brandCheck(this,dE),this[Xg].total}}KQ.converters.ProgressEventInit=KQ.dictionaryConverter([{key:"lengthComputable",converter:KQ.converters.boolean,defaultValue:!1},{key:"loaded",converter:KQ.converters["unsigned long long"],defaultValue:0},{key:"total",converter:KQ.converters["unsigned long long"],defaultValue:0},{key:"bubbles",converter:KQ.converters.boolean,defaultValue:!1},{key:"cancelable",converter:KQ.converters.boolean,defaultValue:!1},{key:"composed",converter:KQ.converters.boolean,defaultValue:!1}]);n2.exports={ProgressEvent:dE}});var s2=L((Gx,o2)=>{function S8(A){if(!A)return"failure";switch(A.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"}}o2.exports={getEncoding:S8}});var Ew=L((Rx,Iw)=>{var{kState:iI,kError:OF,kResult:r2,kAborted:pE,kLastProgressEventFired:PF}=qF(),{ProgressEvent:z8}=a2(),{getEncoding:t2}=s2(),{DOMException:H8}=hB(),{serializeAMimeType:x8,parseMIMEType:e2}=vQ(),{types:j8}=G("util"),{StringDecoder:Aw}=G("string_decoder"),{btoa:Qw}=G("buffer"),T8={enumerable:!0,writable:!1,configurable:!1};function $8(A,Q,B,I){if(A[iI]==="loading")throw new H8("Invalid state","InvalidStateError");A[iI]="loading",A[r2]=null,A[OF]=null;let C=Q.stream().getReader(),g=[],D=C.read(),F=!0;(async()=>{while(!A[pE])try{let{done:Y,value:N}=await D;if(F&&!A[pE])queueMicrotask(()=>{vB("loadstart",A)});if(F=!1,!Y&&j8.isUint8Array(N)){if(g.push(N),(A[PF]===void 0||Date.now()-A[PF]>=50)&&!A[pE])A[PF]=Date.now(),queueMicrotask(()=>{vB("progress",A)});D=C.read()}else if(Y){queueMicrotask(()=>{A[iI]="done";try{let J=h8(g,B,Q.type,I);if(A[pE])return;A[r2]=J,vB("load",A)}catch(J){A[OF]=J,vB("error",A)}if(A[iI]!=="loading")vB("loadend",A)});break}}catch(Y){if(A[pE])return;queueMicrotask(()=>{if(A[iI]="done",A[OF]=Y,vB("error",A),A[iI]!=="loading")vB("loadend",A)});break}})()}function vB(A,Q){let B=new z8(A,{bubbles:!1,cancelable:!1});Q.dispatchEvent(B)}function h8(A,Q,B,I){switch(Q){case"DataURL":{let E="data:",C=e2(B||"application/octet-stream");if(C!=="failure")E+=x8(C);E+=";base64,";let g=new Aw("latin1");for(let D of A)E+=Qw(g.write(D));return E+=Qw(g.end()),E}case"Text":{let E="failure";if(I)E=t2(I);if(E==="failure"&&B){let C=e2(B);if(C!=="failure")E=t2(C.parameters.get("charset"))}if(E==="failure")E="UTF-8";return y8(A,E)}case"ArrayBuffer":return Bw(A).buffer;case"BinaryString":{let E="",C=new Aw("latin1");for(let g of A)E+=C.write(g);return E+=C.end(),E}}}function y8(A,Q){let B=Bw(A),I=q8(B),E=0;if(I!==null)Q=I,E=I==="UTF-8"?3:2;let C=B.slice(E);return new TextDecoder(Q).decode(C)}function q8(A){let[Q,B,I]=A;if(Q===239&&B===187&&I===191)return"UTF-8";else if(Q===254&&B===255)return"UTF-16BE";else if(Q===255&&B===254)return"UTF-16LE";return null}function Bw(A){let Q=A.reduce((I,E)=>{return I+E.byteLength},0),B=0;return A.reduce((I,E)=>{return I.set(E,B),B+=E.byteLength,I},new Uint8Array(Q))}Iw.exports={staticPropertyDescriptors:T8,readOperation:$8,fireAProgressEvent:vB}});var Fw=L((wx,Dw)=>{var{staticPropertyDescriptors:nI,readOperation:Kg,fireAProgressEvent:Cw}=Ew(),{kState:DI,kError:gw,kResult:Sg,kEvents:n,kAborted:O8}=qF(),{webidl:AA}=bA(),{kEnumerableProperty:IQ}=p();class e extends EventTarget{constructor(){super();this[DI]="empty",this[Sg]=null,this[gw]=null,this[n]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(A){AA.brandCheck(this,e),AA.argumentLengthCheck(arguments,1,{header:"FileReader.readAsArrayBuffer"}),A=AA.converters.Blob(A,{strict:!1}),Kg(this,A,"ArrayBuffer")}readAsBinaryString(A){AA.brandCheck(this,e),AA.argumentLengthCheck(arguments,1,{header:"FileReader.readAsBinaryString"}),A=AA.converters.Blob(A,{strict:!1}),Kg(this,A,"BinaryString")}readAsText(A,Q=void 0){if(AA.brandCheck(this,e),AA.argumentLengthCheck(arguments,1,{header:"FileReader.readAsText"}),A=AA.converters.Blob(A,{strict:!1}),Q!==void 0)Q=AA.converters.DOMString(Q);Kg(this,A,"Text",Q)}readAsDataURL(A){AA.brandCheck(this,e),AA.argumentLengthCheck(arguments,1,{header:"FileReader.readAsDataURL"}),A=AA.converters.Blob(A,{strict:!1}),Kg(this,A,"DataURL")}abort(){if(this[DI]==="empty"||this[DI]==="done"){this[Sg]=null;return}if(this[DI]==="loading")this[DI]="done",this[Sg]=null;if(this[O8]=!0,Cw("abort",this),this[DI]!=="loading")Cw("loadend",this)}get readyState(){switch(AA.brandCheck(this,e),this[DI]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return AA.brandCheck(this,e),this[Sg]}get error(){return AA.brandCheck(this,e),this[gw]}get onloadend(){return AA.brandCheck(this,e),this[n].loadend}set onloadend(A){if(AA.brandCheck(this,e),this[n].loadend)this.removeEventListener("loadend",this[n].loadend);if(typeof A==="function")this[n].loadend=A,this.addEventListener("loadend",A);else this[n].loadend=null}get onerror(){return AA.brandCheck(this,e),this[n].error}set onerror(A){if(AA.brandCheck(this,e),this[n].error)this.removeEventListener("error",this[n].error);if(typeof A==="function")this[n].error=A,this.addEventListener("error",A);else this[n].error=null}get onloadstart(){return AA.brandCheck(this,e),this[n].loadstart}set onloadstart(A){if(AA.brandCheck(this,e),this[n].loadstart)this.removeEventListener("loadstart",this[n].loadstart);if(typeof A==="function")this[n].loadstart=A,this.addEventListener("loadstart",A);else this[n].loadstart=null}get onprogress(){return AA.brandCheck(this,e),this[n].progress}set onprogress(A){if(AA.brandCheck(this,e),this[n].progress)this.removeEventListener("progress",this[n].progress);if(typeof A==="function")this[n].progress=A,this.addEventListener("progress",A);else this[n].progress=null}get onload(){return AA.brandCheck(this,e),this[n].load}set onload(A){if(AA.brandCheck(this,e),this[n].load)this.removeEventListener("load",this[n].load);if(typeof A==="function")this[n].load=A,this.addEventListener("load",A);else this[n].load=null}get onabort(){return AA.brandCheck(this,e),this[n].abort}set onabort(A){if(AA.brandCheck(this,e),this[n].abort)this.removeEventListener("abort",this[n].abort);if(typeof A==="function")this[n].abort=A,this.addEventListener("abort",A);else this[n].abort=null}}e.EMPTY=e.prototype.EMPTY=0;e.LOADING=e.prototype.LOADING=1;e.DONE=e.prototype.DONE=2;Object.defineProperties(e.prototype,{EMPTY:nI,LOADING:nI,DONE:nI,readAsArrayBuffer:IQ,readAsBinaryString:IQ,readAsText:IQ,readAsDataURL:IQ,abort:IQ,readyState:IQ,result:IQ,error:IQ,onloadstart:IQ,onprogress:IQ,onload:IQ,onabort:IQ,onerror:IQ,onloadend:IQ,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(e,{EMPTY:nI,LOADING:nI,DONE:nI});Dw.exports={FileReader:e}});var zg=L((Mx,Nw)=>{Nw.exports={kConstruct:CA().kConstruct}});var Uw=L((Lx,Jw)=>{var P8=G("assert"),{URLSerializer:Yw}=vQ(),{isValidHeaderName:k8}=xQ();function _8(A,Q,B=!1){let I=Yw(A,B),E=Yw(Q,B);return I===E}function f8(A){P8(A!==null);let Q=[];for(let B of A.split(",")){if(B=B.trim(),!B.length)continue;else if(!k8(B))continue;Q.push(B)}return Q}Jw.exports={urlEquals:_8,fieldValues:f8}});var Vw=L((Vx,Lw)=>{var{kConstruct:v8}=zg(),{urlEquals:b8,fieldValues:kF}=Uw(),{kEnumerableProperty:FI,isDisturbed:m8}=p(),{kHeadersList:Gw}=CA(),{webidl:$}=bA(),{Response:ww,cloneResponse:c8}=Ng(),{Request:BB}=cE(),{kState:lA,kHeaders:Hg,kGuard:Rw,kRealm:u8}=UB(),{fetching:d8}=Zg(),{urlIsHttpHttpsScheme:xg,createDeferredPromise:aI,readAllBytes:p8}=xQ(),_F=G("assert"),{getGlobalDispatcher:l8}=mI();class IB{#A;constructor(){if(arguments[0]!==v8)$.illegalConstructor();this.#A=arguments[1]}async match(A,Q={}){$.brandCheck(this,IB),$.argumentLengthCheck(arguments,1,{header:"Cache.match"}),A=$.converters.RequestInfo(A),Q=$.converters.CacheQueryOptions(Q);let B=await this.matchAll(A,Q);if(B.length===0)return;return B[0]}async matchAll(A=void 0,Q={}){if($.brandCheck(this,IB),A!==void 0)A=$.converters.RequestInfo(A);Q=$.converters.CacheQueryOptions(Q);let B=null;if(A!==void 0){if(A instanceof BB){if(B=A[lA],B.method!=="GET"&&!Q.ignoreMethod)return[]}else if(typeof A==="string")B=new BB(A)[lA]}let I=[];if(A===void 0)for(let C of this.#A)I.push(C[1]);else{let C=this.#I(B,Q);for(let g of C)I.push(g[1])}let E=[];for(let C of I){let g=new ww(C.body?.source??null),D=g[lA].body;g[lA]=C,g[lA].body=D,g[Hg][Gw]=C.headersList,g[Hg][Rw]="immutable",E.push(g)}return Object.freeze(E)}async add(A){$.brandCheck(this,IB),$.argumentLengthCheck(arguments,1,{header:"Cache.add"}),A=$.converters.RequestInfo(A);let Q=[A];return await this.addAll(Q)}async addAll(A){$.brandCheck(this,IB),$.argumentLengthCheck(arguments,1,{header:"Cache.addAll"}),A=$.converters["sequence"](A);let Q=[],B=[];for(let N of A){if(typeof N==="string")continue;let J=N[lA];if(!xg(J.url)||J.method!=="GET")throw $.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme when method is not GET."})}let I=[];for(let N of A){let J=new BB(N)[lA];if(!xg(J.url))throw $.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme."});J.initiator="fetch",J.destination="subresource",B.push(J);let U=aI();I.push(d8({request:J,dispatcher:l8(),processResponse(w){if(w.type==="error"||w.status===206||w.status<200||w.status>299)U.reject($.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(w.headersList.contains("vary")){let M=kF(w.headersList.get("vary"));for(let V of M)if(V==="*"){U.reject($.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let Z of I)Z.abort();return}}},processResponseEndOfBody(w){if(w.aborted){U.reject(new DOMException("aborted","AbortError"));return}U.resolve(w)}})),Q.push(U.promise)}let C=await Promise.all(Q),g=[],D=0;for(let N of C){let J={type:"put",request:B[D],response:N};g.push(J),D++}let F=aI(),Y=null;try{this.#B(g)}catch(N){Y=N}return queueMicrotask(()=>{if(Y===null)F.resolve(void 0);else F.reject(Y)}),F.promise}async put(A,Q){$.brandCheck(this,IB),$.argumentLengthCheck(arguments,2,{header:"Cache.put"}),A=$.converters.RequestInfo(A),Q=$.converters.Response(Q);let B=null;if(A instanceof BB)B=A[lA];else B=new BB(A)[lA];if(!xg(B.url)||B.method!=="GET")throw $.errors.exception({header:"Cache.put",message:"Expected an http/s scheme when method is not GET"});let I=Q[lA];if(I.status===206)throw $.errors.exception({header:"Cache.put",message:"Got 206 status"});if(I.headersList.contains("vary")){let J=kF(I.headersList.get("vary"));for(let U of J)if(U==="*")throw $.errors.exception({header:"Cache.put",message:"Got * vary field value"})}if(I.body&&(m8(I.body.stream)||I.body.stream.locked))throw $.errors.exception({header:"Cache.put",message:"Response body is locked or disturbed"});let E=c8(I),C=aI();if(I.body!=null){let U=I.body.stream.getReader();p8(U).then(C.resolve,C.reject)}else C.resolve(void 0);let g=[],D={type:"put",request:B,response:E};g.push(D);let F=await C.promise;if(E.body!=null)E.body.source=F;let Y=aI(),N=null;try{this.#B(g)}catch(J){N=J}return queueMicrotask(()=>{if(N===null)Y.resolve();else Y.reject(N)}),Y.promise}async delete(A,Q={}){$.brandCheck(this,IB),$.argumentLengthCheck(arguments,1,{header:"Cache.delete"}),A=$.converters.RequestInfo(A),Q=$.converters.CacheQueryOptions(Q);let B=null;if(A instanceof BB){if(B=A[lA],B.method!=="GET"&&!Q.ignoreMethod)return!1}else _F(typeof A==="string"),B=new BB(A)[lA];let I=[],E={type:"delete",request:B,options:Q};I.push(E);let C=aI(),g=null,D;try{D=this.#B(I)}catch(F){g=F}return queueMicrotask(()=>{if(g===null)C.resolve(!!D?.length);else C.reject(g)}),C.promise}async keys(A=void 0,Q={}){if($.brandCheck(this,IB),A!==void 0)A=$.converters.RequestInfo(A);Q=$.converters.CacheQueryOptions(Q);let B=null;if(A!==void 0){if(A instanceof BB){if(B=A[lA],B.method!=="GET"&&!Q.ignoreMethod)return[]}else if(typeof A==="string")B=new BB(A)[lA]}let I=aI(),E=[];if(A===void 0)for(let C of this.#A)E.push(C[0]);else{let C=this.#I(B,Q);for(let g of C)E.push(g[0])}return queueMicrotask(()=>{let C=[];for(let g of E){let D=new BB("https://a");D[lA]=g,D[Hg][Gw]=g.headersList,D[Hg][Rw]="immutable",D[u8]=g.client,C.push(D)}I.resolve(Object.freeze(C))}),I.promise}#B(A){let Q=this.#A,B=[...Q],I=[],E=[];try{for(let C of A){if(C.type!=="delete"&&C.type!=="put")throw $.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(C.type==="delete"&&C.response!=null)throw $.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#I(C.request,C.options,I).length)throw new DOMException("???","InvalidStateError");let g;if(C.type==="delete"){if(g=this.#I(C.request,C.options),g.length===0)return[];for(let D of g){let F=Q.indexOf(D);_F(F!==-1),Q.splice(F,1)}}else if(C.type==="put"){if(C.response==null)throw $.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let D=C.request;if(!xg(D.url))throw $.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(D.method!=="GET")throw $.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(C.options!=null)throw $.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});g=this.#I(C.request);for(let F of g){let Y=Q.indexOf(F);_F(Y!==-1),Q.splice(Y,1)}Q.push([C.request,C.response]),I.push([C.request,C.response])}E.push([C.request,C.response])}return E}catch(C){throw this.#A.length=0,this.#A=B,C}}#I(A,Q,B){let I=[],E=B??this.#A;for(let C of E){let[g,D]=C;if(this.#Q(A,g,D,Q))I.push(C)}return I}#Q(A,Q,B=null,I){let E=new URL(A.url),C=new URL(Q.url);if(I?.ignoreSearch)C.search="",E.search="";if(!b8(E,C,!0))return!1;if(B==null||I?.ignoreVary||!B.headersList.contains("vary"))return!0;let g=kF(B.headersList.get("vary"));for(let D of g){if(D==="*")return!1;let F=Q.headersList.get(D),Y=A.headersList.get(D);if(F!==Y)return!1}return!0}}Object.defineProperties(IB.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:FI,matchAll:FI,add:FI,addAll:FI,put:FI,delete:FI,keys:FI});var Mw=[{key:"ignoreSearch",converter:$.converters.boolean,defaultValue:!1},{key:"ignoreMethod",converter:$.converters.boolean,defaultValue:!1},{key:"ignoreVary",converter:$.converters.boolean,defaultValue:!1}];$.converters.CacheQueryOptions=$.dictionaryConverter(Mw);$.converters.MultiCacheQueryOptions=$.dictionaryConverter([...Mw,{key:"cacheName",converter:$.converters.DOMString}]);$.converters.Response=$.interfaceConverter(ww);$.converters["sequence"]=$.sequenceConverter($.converters.RequestInfo);Lw.exports={Cache:IB}});var Zw=L((Wx,Ww)=>{var{kConstruct:lE}=zg(),{Cache:jg}=Vw(),{webidl:iA}=bA(),{kEnumerableProperty:iE}=p();class bB{#A=new Map;constructor(){if(arguments[0]!==lE)iA.illegalConstructor()}async match(A,Q={}){if(iA.brandCheck(this,bB),iA.argumentLengthCheck(arguments,1,{header:"CacheStorage.match"}),A=iA.converters.RequestInfo(A),Q=iA.converters.MultiCacheQueryOptions(Q),Q.cacheName!=null){if(this.#A.has(Q.cacheName)){let B=this.#A.get(Q.cacheName);return await new jg(lE,B).match(A,Q)}}else for(let B of this.#A.values()){let E=await new jg(lE,B).match(A,Q);if(E!==void 0)return E}}async has(A){return iA.brandCheck(this,bB),iA.argumentLengthCheck(arguments,1,{header:"CacheStorage.has"}),A=iA.converters.DOMString(A),this.#A.has(A)}async open(A){if(iA.brandCheck(this,bB),iA.argumentLengthCheck(arguments,1,{header:"CacheStorage.open"}),A=iA.converters.DOMString(A),this.#A.has(A)){let B=this.#A.get(A);return new jg(lE,B)}let Q=[];return this.#A.set(A,Q),new jg(lE,Q)}async delete(A){return iA.brandCheck(this,bB),iA.argumentLengthCheck(arguments,1,{header:"CacheStorage.delete"}),A=iA.converters.DOMString(A),this.#A.delete(A)}async keys(){return iA.brandCheck(this,bB),[...this.#A.keys()]}}Object.defineProperties(bB.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:iE,has:iE,open:iE,delete:iE,keys:iE});Ww.exports={CacheStorage:bB}});var Kw=L((Zx,Xw)=>{Xw.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var fF=L((Xx,Hw)=>{var Sw=G("assert"),{kHeadersList:zw}=CA();function i8(A){if(A.length===0)return!1;for(let Q of A){let B=Q.charCodeAt(0);if(B>=0||B<=8||(B>=10||B<=31)||B===127)return!1}}function n8(A){for(let Q of A){let B=Q.charCodeAt(0);if(B<=32||B>127||Q==="("||Q===")"||Q===">"||Q==="<"||Q==="@"||Q===","||Q===";"||Q===":"||Q==="\\"||Q==='"'||Q==="/"||Q==="["||Q==="]"||Q==="?"||Q==="="||Q==="{"||Q==="}")throw new Error("Invalid cookie name")}}function a8(A){for(let Q of A){let B=Q.charCodeAt(0);if(B<33||B===34||B===44||B===59||B===92||B>126)throw new Error("Invalid header value")}}function o8(A){for(let Q of A)if(Q.charCodeAt(0)<33||Q===";")throw new Error("Invalid cookie path")}function s8(A){if(A.startsWith("-")||A.endsWith(".")||A.endsWith("-"))throw new Error("Invalid cookie domain")}function r8(A){if(typeof A==="number")A=new Date(A);let Q=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],I=Q[A.getUTCDay()],E=A.getUTCDate().toString().padStart(2,"0"),C=B[A.getUTCMonth()],g=A.getUTCFullYear(),D=A.getUTCHours().toString().padStart(2,"0"),F=A.getUTCMinutes().toString().padStart(2,"0"),Y=A.getUTCSeconds().toString().padStart(2,"0");return`${I}, ${E} ${C} ${g} ${D}:${F}:${Y} GMT`}function t8(A){if(A<0)throw new Error("Invalid cookie max-age")}function e8(A){if(A.name.length===0)return null;n8(A.name),a8(A.value);let Q=[`${A.name}=${A.value}`];if(A.name.startsWith("__Secure-"))A.secure=!0;if(A.name.startsWith("__Host-"))A.secure=!0,A.domain=null,A.path="/";if(A.secure)Q.push("Secure");if(A.httpOnly)Q.push("HttpOnly");if(typeof A.maxAge==="number")t8(A.maxAge),Q.push(`Max-Age=${A.maxAge}`);if(A.domain)s8(A.domain),Q.push(`Domain=${A.domain}`);if(A.path)o8(A.path),Q.push(`Path=${A.path}`);if(A.expires&&A.expires.toString()!=="Invalid Date")Q.push(`Expires=${r8(A.expires)}`);if(A.sameSite)Q.push(`SameSite=${A.sameSite}`);for(let B of A.unparsed){if(!B.includes("="))throw new Error("Invalid unparsed");let[I,...E]=B.split("=");Q.push(`${I.trim()}=${E.join("=")}`)}return Q.join("; ")}var Tg;function A5(A){if(A[zw])return A[zw];if(!Tg)Tg=Object.getOwnPropertySymbols(A).find((B)=>B.description==="headers list"),Sw(Tg,"Headers cannot be parsed");let Q=A[Tg];return Sw(Q),Q}Hw.exports={isCTLExcludingHtab:i8,stringify:e8,getHeadersList:A5}});var jw=L((Kx,xw)=>{var{maxNameValuePairSize:Q5,maxAttributeValueSize:B5}=Kw(),{isCTLExcludingHtab:I5}=fF(),{collectASequenceOfCodePointsFast:$g}=vQ(),E5=G("assert");function C5(A){if(I5(A))return null;let Q="",B="",I="",E="";if(A.includes(";")){let C={position:0};Q=$g(";",A,C),B=A.slice(C.position)}else Q=A;if(!Q.includes("="))E=Q;else{let C={position:0};I=$g("=",Q,C),E=Q.slice(C.position+1)}if(I=I.trim(),E=E.trim(),I.length+E.length>Q5)return null;return{name:I,value:E,...oI(B)}}function oI(A,Q={}){if(A.length===0)return Q;E5(A[0]===";"),A=A.slice(1);let B="";if(A.includes(";"))B=$g(";",A,{position:0}),A=A.slice(B.length);else B=A,A="";let I="",E="";if(B.includes("=")){let g={position:0};I=$g("=",B,g),E=B.slice(g.position+1)}else I=B;if(I=I.trim(),E=E.trim(),E.length>B5)return oI(A,Q);let C=I.toLowerCase();if(C==="expires"){let g=new Date(E);Q.expires=g}else if(C==="max-age"){let g=E.charCodeAt(0);if((g<48||g>57)&&E[0]!=="-")return oI(A,Q);if(!/^\d+$/.test(E))return oI(A,Q);let D=Number(E);Q.maxAge=D}else if(C==="domain"){let g=E;if(g[0]===".")g=g.slice(1);g=g.toLowerCase(),Q.domain=g}else if(C==="path"){let g="";if(E.length===0||E[0]!=="/")g="/";else g=E;Q.path=g}else if(C==="secure")Q.secure=!0;else if(C==="httponly")Q.httpOnly=!0;else if(C==="samesite"){let g="Default",D=E.toLowerCase();if(D.includes("none"))g="None";if(D.includes("strict"))g="Strict";if(D.includes("lax"))g="Lax";Q.sameSite=g}else Q.unparsed??=[],Q.unparsed.push(`${I}=${E}`);return oI(A,Q)}xw.exports={parseSetCookie:C5,parseUnparsedAttributes:oI}});var yw=L((Sx,hw)=>{var{parseSetCookie:g5}=jw(),{stringify:Tw,getHeadersList:D5}=fF(),{webidl:u}=bA(),{Headers:hg}=gI();function F5(A){u.argumentLengthCheck(arguments,1,{header:"getCookies"}),u.brandCheck(A,hg,{strict:!1});let Q=A.get("cookie"),B={};if(!Q)return B;for(let I of Q.split(";")){let[E,...C]=I.split("=");B[E.trim()]=C.join("=")}return B}function N5(A,Q,B){u.argumentLengthCheck(arguments,2,{header:"deleteCookie"}),u.brandCheck(A,hg,{strict:!1}),Q=u.converters.DOMString(Q),B=u.converters.DeleteCookieAttributes(B),$w(A,{name:Q,value:"",expires:new Date(0),...B})}function Y5(A){u.argumentLengthCheck(arguments,1,{header:"getSetCookies"}),u.brandCheck(A,hg,{strict:!1});let Q=D5(A).cookies;if(!Q)return[];return Q.map((B)=>g5(Array.isArray(B)?B[1]:B))}function $w(A,Q){if(u.argumentLengthCheck(arguments,2,{header:"setCookie"}),u.brandCheck(A,hg,{strict:!1}),Q=u.converters.Cookie(Q),Tw(Q))A.append("Set-Cookie",Tw(Q))}u.converters.DeleteCookieAttributes=u.dictionaryConverter([{converter:u.nullableConverter(u.converters.DOMString),key:"path",defaultValue:null},{converter:u.nullableConverter(u.converters.DOMString),key:"domain",defaultValue:null}]);u.converters.Cookie=u.dictionaryConverter([{converter:u.converters.DOMString,key:"name"},{converter:u.converters.DOMString,key:"value"},{converter:u.nullableConverter((A)=>{if(typeof A==="number")return u.converters["unsigned long long"](A);return new Date(A)}),key:"expires",defaultValue:null},{converter:u.nullableConverter(u.converters["long long"]),key:"maxAge",defaultValue:null},{converter:u.nullableConverter(u.converters.DOMString),key:"domain",defaultValue:null},{converter:u.nullableConverter(u.converters.DOMString),key:"path",defaultValue:null},{converter:u.nullableConverter(u.converters.boolean),key:"secure",defaultValue:null},{converter:u.nullableConverter(u.converters.boolean),key:"httpOnly",defaultValue:null},{converter:u.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:u.sequenceConverter(u.converters.DOMString),key:"unparsed",defaultValue:[]}]);hw.exports={getCookies:F5,deleteCookie:N5,getSetCookies:Y5,setCookie:$w}});var sI=L((zx,qw)=>{var J5={enumerable:!0,writable:!1,configurable:!1},U5={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},G5={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},R5={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},w5=Buffer.allocUnsafe(0);qw.exports={uid:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",staticPropertyDescriptors:J5,states:U5,opcodes:G5,maxUnsigned16Bit:65535,parserStates:R5,emptyBuffer:w5}});var nE=L((Hx,Ow)=>{Ow.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 bF=L((xx,Pw)=>{var{webidl:h}=bA(),{kEnumerableProperty:EQ}=p(),{MessagePort:M5}=G("worker_threads");class EB extends Event{#A;constructor(A,Q={}){h.argumentLengthCheck(arguments,1,{header:"MessageEvent constructor"}),A=h.converters.DOMString(A),Q=h.converters.MessageEventInit(Q);super(A,Q);this.#A=Q}get data(){return h.brandCheck(this,EB),this.#A.data}get origin(){return h.brandCheck(this,EB),this.#A.origin}get lastEventId(){return h.brandCheck(this,EB),this.#A.lastEventId}get source(){return h.brandCheck(this,EB),this.#A.source}get ports(){if(h.brandCheck(this,EB),!Object.isFrozen(this.#A.ports))Object.freeze(this.#A.ports);return this.#A.ports}initMessageEvent(A,Q=!1,B=!1,I=null,E="",C="",g=null,D=[]){return h.brandCheck(this,EB),h.argumentLengthCheck(arguments,1,{header:"MessageEvent.initMessageEvent"}),new EB(A,{bubbles:Q,cancelable:B,data:I,origin:E,lastEventId:C,source:g,ports:D})}}class rI extends Event{#A;constructor(A,Q={}){h.argumentLengthCheck(arguments,1,{header:"CloseEvent constructor"}),A=h.converters.DOMString(A),Q=h.converters.CloseEventInit(Q);super(A,Q);this.#A=Q}get wasClean(){return h.brandCheck(this,rI),this.#A.wasClean}get code(){return h.brandCheck(this,rI),this.#A.code}get reason(){return h.brandCheck(this,rI),this.#A.reason}}class mB extends Event{#A;constructor(A,Q){h.argumentLengthCheck(arguments,1,{header:"ErrorEvent constructor"});super(A,Q);A=h.converters.DOMString(A),Q=h.converters.ErrorEventInit(Q??{}),this.#A=Q}get message(){return h.brandCheck(this,mB),this.#A.message}get filename(){return h.brandCheck(this,mB),this.#A.filename}get lineno(){return h.brandCheck(this,mB),this.#A.lineno}get colno(){return h.brandCheck(this,mB),this.#A.colno}get error(){return h.brandCheck(this,mB),this.#A.error}}Object.defineProperties(EB.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:EQ,origin:EQ,lastEventId:EQ,source:EQ,ports:EQ,initMessageEvent:EQ});Object.defineProperties(rI.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:EQ,code:EQ,wasClean:EQ});Object.defineProperties(mB.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:EQ,filename:EQ,lineno:EQ,colno:EQ,error:EQ});h.converters.MessagePort=h.interfaceConverter(M5);h.converters["sequence"]=h.sequenceConverter(h.converters.MessagePort);var vF=[{key:"bubbles",converter:h.converters.boolean,defaultValue:!1},{key:"cancelable",converter:h.converters.boolean,defaultValue:!1},{key:"composed",converter:h.converters.boolean,defaultValue:!1}];h.converters.MessageEventInit=h.dictionaryConverter([...vF,{key:"data",converter:h.converters.any,defaultValue:null},{key:"origin",converter:h.converters.USVString,defaultValue:""},{key:"lastEventId",converter:h.converters.DOMString,defaultValue:""},{key:"source",converter:h.nullableConverter(h.converters.MessagePort),defaultValue:null},{key:"ports",converter:h.converters["sequence"],get defaultValue(){return[]}}]);h.converters.CloseEventInit=h.dictionaryConverter([...vF,{key:"wasClean",converter:h.converters.boolean,defaultValue:!1},{key:"code",converter:h.converters["unsigned short"],defaultValue:0},{key:"reason",converter:h.converters.USVString,defaultValue:""}]);h.converters.ErrorEventInit=h.dictionaryConverter([...vF,{key:"message",converter:h.converters.DOMString,defaultValue:""},{key:"filename",converter:h.converters.USVString,defaultValue:""},{key:"lineno",converter:h.converters["unsigned long"],defaultValue:0},{key:"colno",converter:h.converters["unsigned long"],defaultValue:0},{key:"error",converter:h.converters.any}]);Pw.exports={MessageEvent:EB,CloseEvent:rI,ErrorEvent:mB}});var Og=L((jx,fw)=>{var{kReadyState:yg,kController:L5,kResponse:V5,kBinaryType:W5,kWebSocketURL:Z5}=nE(),{states:qg,opcodes:kw}=sI(),{MessageEvent:X5,ErrorEvent:K5}=bF();function S5(A){return A[yg]===qg.OPEN}function z5(A){return A[yg]===qg.CLOSING}function H5(A){return A[yg]===qg.CLOSED}function mF(A,Q,B=Event,I){let E=new B(A,I);Q.dispatchEvent(E)}function x5(A,Q,B){if(A[yg]!==qg.OPEN)return;let I;if(Q===kw.TEXT)try{I=new TextDecoder("utf-8",{fatal:!0}).decode(B)}catch{_w(A,"Received invalid UTF-8 in text frame.");return}else if(Q===kw.BINARY)if(A[W5]==="blob")I=new Blob([B]);else I=new Uint8Array(B).buffer;mF("message",A,X5,{origin:A[Z5].origin,data:I})}function j5(A){if(A.length===0)return!1;for(let Q of A){let B=Q.charCodeAt(0);if(B<33||B>126||Q==="("||Q===")"||Q==="<"||Q===">"||Q==="@"||Q===","||Q===";"||Q===":"||Q==="\\"||Q==='"'||Q==="/"||Q==="["||Q==="]"||Q==="?"||Q==="="||Q==="{"||Q==="}"||B===32||B===9)return!1}return!0}function T5(A){if(A>=1000&&A<1015)return A!==1004&&A!==1005&&A!==1006;return A>=3000&&A<=4999}function _w(A,Q){let{[L5]:B,[V5]:I}=A;if(B.abort(),I?.socket&&!I.socket.destroyed)I.socket.destroy();if(Q)mF("error",A,K5,{error:new Error(Q)})}fw.exports={isEstablished:S5,isClosing:z5,isClosed:H5,fireEvent:mF,isValidSubprotocol:j5,isValidStatusCode:T5,failWebsocketConnection:_w,websocketMessageReceived:x5}});var dw=L((Tx,uw)=>{var uF=G("diagnostics_channel"),{uid:$5,states:bw}=sI(),{kReadyState:mw,kSentClose:vw,kByteParser:cw,kReceivedClose:h5}=nE(),{fireEvent:y5,failWebsocketConnection:NI}=Og(),{CloseEvent:q5}=bF(),{makeRequest:O5}=cE(),{fetching:P5}=Zg(),{Headers:k5}=gI(),{getGlobalDispatcher:_5}=mI(),{kHeadersList:f5}=CA(),XB={};XB.open=uF.channel("undici:websocket:open");XB.close=uF.channel("undici:websocket:close");XB.socketError=uF.channel("undici:websocket:socket_error");var cF;try{cF=G("crypto")}catch{}function v5(A,Q,B,I,E){let C=A;C.protocol=A.protocol==="ws:"?"http:":"https:";let g=O5({urlList:[C],serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(E.headers){let N=new k5(E.headers)[f5];g.headersList=N}let D=cF.randomBytes(16).toString("base64");g.headersList.append("sec-websocket-key",D),g.headersList.append("sec-websocket-version","13");for(let N of Q)g.headersList.append("sec-websocket-protocol",N);let F="";return P5({request:g,useParallelQueue:!0,dispatcher:E.dispatcher??_5(),processResponse(N){if(N.type==="error"||N.status!==101){NI(B,"Received network error or non-101 status code.");return}if(Q.length!==0&&!N.headersList.get("Sec-WebSocket-Protocol")){NI(B,"Server did not respond with sent protocols.");return}if(N.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){NI(B,'Server did not set Upgrade header to "websocket".');return}if(N.headersList.get("Connection")?.toLowerCase()!=="upgrade"){NI(B,'Server did not set Connection header to "upgrade".');return}let J=N.headersList.get("Sec-WebSocket-Accept"),U=cF.createHash("sha1").update(D+$5).digest("base64");if(J!==U){NI(B,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let w=N.headersList.get("Sec-WebSocket-Extensions");if(w!==null&&w!==F){NI(B,"Received different permessage-deflate than the one set.");return}let M=N.headersList.get("Sec-WebSocket-Protocol");if(M!==null&&M!==g.headersList.get("Sec-WebSocket-Protocol")){NI(B,"Protocol was not set in the opening handshake.");return}if(N.socket.on("data",b5),N.socket.on("close",m5),N.socket.on("error",c5),XB.open.hasSubscribers)XB.open.publish({address:N.socket.address(),protocol:M,extensions:w});I(N)}})}function b5(A){if(!this.ws[cw].write(A))this.pause()}function m5(){let{ws:A}=this,Q=A[vw]&&A[h5],B=1005,I="",E=A[cw].closingInfo;if(E)B=E.code??1005,I=E.reason;else if(!A[vw])B=1006;if(A[mw]=bw.CLOSED,y5("close",A,q5,{wasClean:Q,code:B,reason:I}),XB.close.hasSubscribers)XB.close.publish({websocket:A,code:B,reason:I})}function c5(A){let{ws:Q}=this;if(Q[mw]=bw.CLOSING,XB.socketError.hasSubscribers)XB.socketError.publish(A);this.destroy()}uw.exports={establishWebSocketConnection:v5}});var dF=L(($x,iw)=>{var{maxUnsigned16Bit:u5}=sI(),pw;try{pw=G("crypto")}catch{}class lw{constructor(A){this.frameData=A,this.maskKey=pw.randomBytes(4)}createFrame(A){let Q=this.frameData?.byteLength??0,B=Q,I=6;if(Q>u5)I+=8,B=127;else if(Q>125)I+=2,B=126;let E=Buffer.allocUnsafe(Q+I);E[0]=E[1]=0,E[0]|=128,E[0]=(E[0]&240)+A;/*! ws. MIT License. Einar Otto Stangvik */if(E[I-4]=this.maskKey[0],E[I-3]=this.maskKey[1],E[I-2]=this.maskKey[2],E[I-1]=this.maskKey[3],E[1]=B,B===126)E.writeUInt16BE(Q,2);else if(B===127)E[2]=E[3]=0,E.writeUIntBE(Q,4,6);E[1]|=128;for(let C=0;C{var{Writable:d5}=G("stream"),tw=G("diagnostics_channel"),{parserStates:$Q,opcodes:hQ,states:p5,emptyBuffer:l5}=sI(),{kReadyState:i5,kSentClose:nw,kResponse:aw,kReceivedClose:ow}=nE(),{isValidStatusCode:sw,failWebsocketConnection:aE,websocketMessageReceived:n5}=Og(),{WebsocketFrameSend:rw}=dF(),tI={};tI.ping=tw.channel("undici:websocket:ping");tI.pong=tw.channel("undici:websocket:pong");class ew extends d5{#A=[];#B=0;#I=$Q.INFO;#Q={};#E=[];constructor(A){super();this.ws=A}_write(A,Q,B){this.#A.push(A),this.#B+=A.length,this.run(B)}run(A){while(!0){if(this.#I===$Q.INFO){if(this.#B<2)return A();let Q=this.consume(2);if(this.#Q.fin=(Q[0]&128)!==0,this.#Q.opcode=Q[0]&15,this.#Q.originalOpcode??=this.#Q.opcode,this.#Q.fragmented=!this.#Q.fin&&this.#Q.opcode!==hQ.CONTINUATION,this.#Q.fragmented&&this.#Q.opcode!==hQ.BINARY&&this.#Q.opcode!==hQ.TEXT){aE(this.ws,"Invalid frame type was fragmented.");return}let B=Q[1]&127;if(B<=125)this.#Q.payloadLength=B,this.#I=$Q.READ_DATA;else if(B===126)this.#I=$Q.PAYLOADLENGTH_16;else if(B===127)this.#I=$Q.PAYLOADLENGTH_64;if(this.#Q.fragmented&&B>125){aE(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#Q.opcode===hQ.PING||this.#Q.opcode===hQ.PONG||this.#Q.opcode===hQ.CLOSE)&&B>125){aE(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#Q.opcode===hQ.CLOSE){if(B===1){aE(this.ws,"Received close frame with a 1-byte body.");return}let I=this.consume(B);if(this.#Q.closeInfo=this.parseCloseBody(!1,I),!this.ws[nw]){let E=Buffer.allocUnsafe(2);E.writeUInt16BE(this.#Q.closeInfo.code,0);let C=new rw(E);this.ws[aw].socket.write(C.createFrame(hQ.CLOSE),(g)=>{if(!g)this.ws[nw]=!0})}this.ws[i5]=p5.CLOSING,this.ws[ow]=!0,this.end();return}else if(this.#Q.opcode===hQ.PING){let I=this.consume(B);if(!this.ws[ow]){let E=new rw(I);if(this.ws[aw].socket.write(E.createFrame(hQ.PONG)),tI.ping.hasSubscribers)tI.ping.publish({payload:I})}if(this.#I=$Q.INFO,this.#B>0)continue;else{A();return}}else if(this.#Q.opcode===hQ.PONG){let I=this.consume(B);if(tI.pong.hasSubscribers)tI.pong.publish({payload:I});if(this.#B>0)continue;else{A();return}}}else if(this.#I===$Q.PAYLOADLENGTH_16){if(this.#B<2)return A();let Q=this.consume(2);this.#Q.payloadLength=Q.readUInt16BE(0),this.#I=$Q.READ_DATA}else if(this.#I===$Q.PAYLOADLENGTH_64){if(this.#B<8)return A();let Q=this.consume(8),B=Q.readUInt32BE(0);if(B>2147483647){aE(this.ws,"Received payload length > 2^31 bytes.");return}let I=Q.readUInt32BE(4);this.#Q.payloadLength=(B<<8)+I,this.#I=$Q.READ_DATA}else if(this.#I===$Q.READ_DATA){if(this.#B=this.#Q.payloadLength){let Q=this.consume(this.#Q.payloadLength);if(this.#E.push(Q),!this.#Q.fragmented||this.#Q.fin&&this.#Q.opcode===hQ.CONTINUATION){let B=Buffer.concat(this.#E);n5(this.ws,this.#Q.originalOpcode,B),this.#Q={},this.#E.length=0}this.#I=$Q.INFO}}if(this.#B>0)continue;else{A();break}}}consume(A){if(A>this.#B)return null;else if(A===0)return l5;if(this.#A[0].length===A)return this.#B-=this.#A[0].length,this.#A.shift();let Q=Buffer.allocUnsafe(A),B=0;while(B!==A){let I=this.#A[0],{length:E}=I;if(E+B===A){Q.set(this.#A.shift(),B);break}else if(E+B>A){Q.set(I.subarray(0,A-B),B),this.#A[0]=I.subarray(A-B);break}else Q.set(this.#A.shift(),B),B+=I.length}return this.#B-=A,Q}parseCloseBody(A,Q){let B;if(Q.length>=2)B=Q.readUInt16BE(0);if(A){if(!sw(B))return null;return{code:B}}let I=Q.subarray(2);if(I[0]===239&&I[1]===187&&I[2]===191)I=I.subarray(3);if(B!==void 0&&!sw(B))return null;try{I=new TextDecoder("utf-8",{fatal:!0}).decode(I)}catch{return null}return{code:B,reason:I}}get closingInfo(){return this.#Q.closeInfo}}AM.exports={ByteParser:ew}});var NM=L((yx,FM)=>{var{webidl:O}=bA(),{DOMException:cB}=hB(),{URLSerializer:a5}=vQ(),{getGlobalOrigin:o5}=ZI(),{staticPropertyDescriptors:uB,states:eI,opcodes:oE,emptyBuffer:s5}=sI(),{kWebSocketURL:BM,kReadyState:KB,kController:r5,kBinaryType:Pg,kResponse:kg,kSentClose:t5,kByteParser:e5}=nE(),{isEstablished:IM,isClosing:EM,isValidSubprotocol:Az,failWebsocketConnection:Qz,fireEvent:Bz}=Og(),{establishWebSocketConnection:Iz}=dw(),{WebsocketFrameSend:sE}=dF(),{ByteParser:Ez}=QM(),{kEnumerableProperty:yQ,isBlobLike:gM}=p(),{getGlobalDispatcher:Cz}=mI(),{types:DM}=G("util"),CM=!1;class d extends EventTarget{#A={open:null,error:null,close:null,message:null};#B=0;#I="";#Q="";constructor(A,Q=[]){super();if(O.argumentLengthCheck(arguments,1,{header:"WebSocket constructor"}),!CM)CM=!0,process.emitWarning("WebSockets are experimental, expect them to change at any time.",{code:"UNDICI-WS"});let B=O.converters["DOMString or sequence or WebSocketInit"](Q);A=O.converters.USVString(A),Q=B.protocols;let I=o5(),E;try{E=new URL(A,I)}catch(C){throw new cB(C,"SyntaxError")}if(E.protocol==="http:")E.protocol="ws:";else if(E.protocol==="https:")E.protocol="wss:";if(E.protocol!=="ws:"&&E.protocol!=="wss:")throw new cB(`Expected a ws: or wss: protocol, got ${E.protocol}`,"SyntaxError");if(E.hash||E.href.endsWith("#"))throw new cB("Got fragment","SyntaxError");if(typeof Q==="string")Q=[Q];if(Q.length!==new Set(Q.map((C)=>C.toLowerCase())).size)throw new cB("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(Q.length>0&&!Q.every((C)=>Az(C)))throw new cB("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[BM]=new URL(E.href),this[r5]=Iz(E,Q,this,(C)=>this.#E(C),B),this[KB]=d.CONNECTING,this[Pg]="blob"}close(A=void 0,Q=void 0){if(O.brandCheck(this,d),A!==void 0)A=O.converters["unsigned short"](A,{clamp:!0});if(Q!==void 0)Q=O.converters.USVString(Q);if(A!==void 0){if(A!==1000&&(A<3000||A>4999))throw new cB("invalid code","InvalidAccessError")}let B=0;if(Q!==void 0){if(B=Buffer.byteLength(Q),B>123)throw new cB(`Reason must be less than 123 bytes; received ${B}`,"SyntaxError")}if(this[KB]===d.CLOSING||this[KB]===d.CLOSED);else if(!IM(this))Qz(this,"Connection was closed before it was established."),this[KB]=d.CLOSING;else if(!EM(this)){let I=new sE;if(A!==void 0&&Q===void 0)I.frameData=Buffer.allocUnsafe(2),I.frameData.writeUInt16BE(A,0);else if(A!==void 0&&Q!==void 0)I.frameData=Buffer.allocUnsafe(2+B),I.frameData.writeUInt16BE(A,0),I.frameData.write(Q,2,"utf-8");else I.frameData=s5;this[kg].socket.write(I.createFrame(oE.CLOSE),(C)=>{if(!C)this[t5]=!0}),this[KB]=eI.CLOSING}else this[KB]=d.CLOSING}send(A){if(O.brandCheck(this,d),O.argumentLengthCheck(arguments,1,{header:"WebSocket.send"}),A=O.converters.WebSocketSendData(A),this[KB]===d.CONNECTING)throw new cB("Sent before connected.","InvalidStateError");if(!IM(this)||EM(this))return;let Q=this[kg].socket;if(typeof A==="string"){let B=Buffer.from(A),E=new sE(B).createFrame(oE.TEXT);this.#B+=B.byteLength,Q.write(E,()=>{this.#B-=B.byteLength})}else if(DM.isArrayBuffer(A)){let B=Buffer.from(A),E=new sE(B).createFrame(oE.BINARY);this.#B+=B.byteLength,Q.write(E,()=>{this.#B-=B.byteLength})}else if(ArrayBuffer.isView(A)){let B=Buffer.from(A,A.byteOffset,A.byteLength),E=new sE(B).createFrame(oE.BINARY);this.#B+=B.byteLength,Q.write(E,()=>{this.#B-=B.byteLength})}else if(gM(A)){let B=new sE;A.arrayBuffer().then((I)=>{let E=Buffer.from(I);B.frameData=E;let C=B.createFrame(oE.BINARY);this.#B+=E.byteLength,Q.write(C,()=>{this.#B-=E.byteLength})})}}get readyState(){return O.brandCheck(this,d),this[KB]}get bufferedAmount(){return O.brandCheck(this,d),this.#B}get url(){return O.brandCheck(this,d),a5(this[BM])}get extensions(){return O.brandCheck(this,d),this.#Q}get protocol(){return O.brandCheck(this,d),this.#I}get onopen(){return O.brandCheck(this,d),this.#A.open}set onopen(A){if(O.brandCheck(this,d),this.#A.open)this.removeEventListener("open",this.#A.open);if(typeof A==="function")this.#A.open=A,this.addEventListener("open",A);else this.#A.open=null}get onerror(){return O.brandCheck(this,d),this.#A.error}set onerror(A){if(O.brandCheck(this,d),this.#A.error)this.removeEventListener("error",this.#A.error);if(typeof A==="function")this.#A.error=A,this.addEventListener("error",A);else this.#A.error=null}get onclose(){return O.brandCheck(this,d),this.#A.close}set onclose(A){if(O.brandCheck(this,d),this.#A.close)this.removeEventListener("close",this.#A.close);if(typeof A==="function")this.#A.close=A,this.addEventListener("close",A);else this.#A.close=null}get onmessage(){return O.brandCheck(this,d),this.#A.message}set onmessage(A){if(O.brandCheck(this,d),this.#A.message)this.removeEventListener("message",this.#A.message);if(typeof A==="function")this.#A.message=A,this.addEventListener("message",A);else this.#A.message=null}get binaryType(){return O.brandCheck(this,d),this[Pg]}set binaryType(A){if(O.brandCheck(this,d),A!=="blob"&&A!=="arraybuffer")this[Pg]="blob";else this[Pg]=A}#E(A){this[kg]=A;let Q=new Ez(this);Q.on("drain",function E(){this.ws[kg].socket.resume()}),A.socket.ws=this,this[e5]=Q,this[KB]=eI.OPEN;let B=A.headersList.get("sec-websocket-extensions");if(B!==null)this.#Q=B;let I=A.headersList.get("sec-websocket-protocol");if(I!==null)this.#I=I;Bz("open",this)}}d.CONNECTING=d.prototype.CONNECTING=eI.CONNECTING;d.OPEN=d.prototype.OPEN=eI.OPEN;d.CLOSING=d.prototype.CLOSING=eI.CLOSING;d.CLOSED=d.prototype.CLOSED=eI.CLOSED;Object.defineProperties(d.prototype,{CONNECTING:uB,OPEN:uB,CLOSING:uB,CLOSED:uB,url:yQ,readyState:yQ,bufferedAmount:yQ,onopen:yQ,onerror:yQ,onclose:yQ,close:yQ,onmessage:yQ,binaryType:yQ,send:yQ,extensions:yQ,protocol:yQ,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(d,{CONNECTING:uB,OPEN:uB,CLOSING:uB,CLOSED:uB});O.converters["sequence"]=O.sequenceConverter(O.converters.DOMString);O.converters["DOMString or sequence"]=function(A){if(O.util.Type(A)==="Object"&&Symbol.iterator in A)return O.converters["sequence"](A);return O.converters.DOMString(A)};O.converters.WebSocketInit=O.dictionaryConverter([{key:"protocols",converter:O.converters["DOMString or sequence"],get defaultValue(){return[]}},{key:"dispatcher",converter:(A)=>A,get defaultValue(){return Cz()}},{key:"headers",converter:O.nullableConverter(O.converters.HeadersInit)}]);O.converters["DOMString or sequence or WebSocketInit"]=function(A){if(O.util.Type(A)==="Object"&&!(Symbol.iterator in A))return O.converters.WebSocketInit(A);return{protocols:O.converters["DOMString or sequence"](A)}};O.converters.WebSocketSendData=function(A){if(O.util.Type(A)==="Object"){if(gM(A))return O.converters.Blob(A,{strict:!1});if(ArrayBuffer.isView(A)||DM.isAnyArrayBuffer(A))return O.converters.BufferSource(A)}return O.converters.USVString(A)};FM.exports={WebSocket:d}});var GM=L((Xz,k)=>{var gz=jE(),YM=jC(),JM=QA(),Dz=qI(),Fz=NG(),Nz=yE(),YI=p(),{InvalidArgumentError:_g}=JM,AE=DR(),Yz=WE(),Jz=CF(),Uz=aR(),Gz=DF(),Rz=o0(),wz=Q2(),Mz=g2(),{getGlobalDispatcher:UM,setGlobalDispatcher:Lz}=mI(),Vz=U2(),Wz=R0(),Zz=yC(),pF;try{G("crypto"),pF=!0}catch{pF=!1}Object.assign(YM.prototype,AE);Xz.Dispatcher=YM;Xz.Client=gz;Xz.Pool=Dz;Xz.BalancedPool=Fz;Xz.Agent=Nz;Xz.ProxyAgent=wz;Xz.RetryHandler=Mz;Xz.DecoratorHandler=Vz;Xz.RedirectHandler=Wz;Xz.createRedirectInterceptor=Zz;Xz.buildConnector=Yz;Xz.errors=JM;function rE(A){return(Q,B,I)=>{if(typeof B==="function")I=B,B=null;if(!Q||typeof Q!=="string"&&typeof Q!=="object"&&!(Q instanceof URL))throw new _g("invalid url");if(B!=null&&typeof B!=="object")throw new _g("invalid opts");if(B&&B.path!=null){if(typeof B.path!=="string")throw new _g("invalid opts.path");let g=B.path;if(!B.path.startsWith("/"))g=`/${g}`;Q=new URL(YI.parseOrigin(Q).origin+g)}else{if(!B)B=typeof Q==="object"?Q:{};Q=YI.parseURL(Q)}let{agent:E,dispatcher:C=UM()}=B;if(E)throw new _g("unsupported opts.agent. Did you mean opts.client?");return A.call(C,{...B,origin:Q.origin,path:Q.search?`${Q.pathname}${Q.search}`:Q.pathname,method:B.method||(B.body?"PUT":"GET")},I)}}Xz.setGlobalDispatcher=Lz;Xz.getGlobalDispatcher=UM;if(YI.nodeMajor>16||YI.nodeMajor===16&&YI.nodeMinor>=8){let A=null;Xz.fetch=async function C(g){if(!A)A=Zg().fetch;try{return await A(...arguments)}catch(D){if(typeof D==="object")Error.captureStackTrace(D,this);throw D}},Xz.Headers=gI().Headers,Xz.Response=Ng().Response,Xz.Request=cE().Request,Xz.FormData=SC().FormData,Xz.File=XC().File,Xz.FileReader=Fw().FileReader;let{setGlobalOrigin:Q,getGlobalOrigin:B}=ZI();Xz.setGlobalOrigin=Q,Xz.getGlobalOrigin=B;let{CacheStorage:I}=Zw(),{kConstruct:E}=zg();Xz.caches=new I(E)}if(YI.nodeMajor>=16){let{deleteCookie:A,getCookies:Q,getSetCookies:B,setCookie:I}=yw();Xz.deleteCookie=A,Xz.getCookies=Q,Xz.getSetCookies=B,Xz.setCookie=I;let{parseMIMEType:E,serializeAMimeType:C}=vQ();Xz.parseMIMEType=E,Xz.serializeAMimeType=C}if(YI.nodeMajor>=18&&pF){let{WebSocket:A}=NM();Xz.WebSocket=A}Xz.request=rE(AE.request);Xz.stream=rE(AE.stream);Xz.pipeline=rE(AE.pipeline);Xz.connect=rE(AE.connect);Xz.upgrade=rE(AE.upgrade);Xz.MockClient=Jz;Xz.MockPool=Gz;Xz.MockAgent=Uz;Xz.mockErrors=Rz});var aF=L((DA)=>{var lz=DA&&DA.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),iz=DA&&DA.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),bg=DA&&DA.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))lz(Q,A,B)}return iz(Q,A),Q},WA=DA&&DA.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(DA,"__esModule",{value:!0});DA.HttpClient=DA.isHttps=DA.HttpClientResponse=DA.HttpClientError=DA.getProxyUrl=DA.MediaTypes=DA.Headers=DA.HttpCodes=void 0;var lF=bg(G("http")),RM=bg(G("https")),iF=bg(fN()),fg=bg(cN()),nz=GM(),qQ;(function(A){A[A.OK=200]="OK",A[A.MultipleChoices=300]="MultipleChoices",A[A.MovedPermanently=301]="MovedPermanently",A[A.ResourceMoved=302]="ResourceMoved",A[A.SeeOther=303]="SeeOther",A[A.NotModified=304]="NotModified",A[A.UseProxy=305]="UseProxy",A[A.SwitchProxy=306]="SwitchProxy",A[A.TemporaryRedirect=307]="TemporaryRedirect",A[A.PermanentRedirect=308]="PermanentRedirect",A[A.BadRequest=400]="BadRequest",A[A.Unauthorized=401]="Unauthorized",A[A.PaymentRequired=402]="PaymentRequired",A[A.Forbidden=403]="Forbidden",A[A.NotFound=404]="NotFound",A[A.MethodNotAllowed=405]="MethodNotAllowed",A[A.NotAcceptable=406]="NotAcceptable",A[A.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",A[A.RequestTimeout=408]="RequestTimeout",A[A.Conflict=409]="Conflict",A[A.Gone=410]="Gone",A[A.TooManyRequests=429]="TooManyRequests",A[A.InternalServerError=500]="InternalServerError",A[A.NotImplemented=501]="NotImplemented",A[A.BadGateway=502]="BadGateway",A[A.ServiceUnavailable=503]="ServiceUnavailable",A[A.GatewayTimeout=504]="GatewayTimeout"})(qQ||(DA.HttpCodes=qQ={}));var fA;(function(A){A.Accept="accept",A.ContentType="content-type"})(fA||(DA.Headers=fA={}));var SB;(function(A){A.ApplicationJson="application/json"})(SB||(DA.MediaTypes=SB={}));function az(A){let Q=iF.getProxyUrl(new URL(A));return Q?Q.href:""}DA.getProxyUrl=az;var oz=[qQ.MovedPermanently,qQ.ResourceMoved,qQ.SeeOther,qQ.TemporaryRedirect,qQ.PermanentRedirect],sz=[qQ.BadGateway,qQ.ServiceUnavailable,qQ.GatewayTimeout],rz=["OPTIONS","GET","DELETE","HEAD"],tz=10,ez=5;class mg extends Error{constructor(A,Q){super(A);this.name="HttpClientError",this.statusCode=Q,Object.setPrototypeOf(this,mg.prototype)}}DA.HttpClientError=mg;class nF{constructor(A){this.message=A}readBody(){return WA(this,void 0,void 0,function*(){return new Promise((A)=>WA(this,void 0,void 0,function*(){let Q=Buffer.alloc(0);this.message.on("data",(B)=>{Q=Buffer.concat([Q,B])}),this.message.on("end",()=>{A(Q.toString())})}))})}readBodyBuffer(){return WA(this,void 0,void 0,function*(){return new Promise((A)=>WA(this,void 0,void 0,function*(){let Q=[];this.message.on("data",(B)=>{Q.push(B)}),this.message.on("end",()=>{A(Buffer.concat(Q))})}))})}}DA.HttpClientResponse=nF;function AH(A){return new URL(A).protocol==="https:"}DA.isHttps=AH;class wM{constructor(A,Q,B){if(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=A,this.handlers=Q||[],this.requestOptions=B,B){if(B.ignoreSslError!=null)this._ignoreSslError=B.ignoreSslError;if(this._socketTimeout=B.socketTimeout,B.allowRedirects!=null)this._allowRedirects=B.allowRedirects;if(B.allowRedirectDowngrade!=null)this._allowRedirectDowngrade=B.allowRedirectDowngrade;if(B.maxRedirects!=null)this._maxRedirects=Math.max(B.maxRedirects,0);if(B.keepAlive!=null)this._keepAlive=B.keepAlive;if(B.allowRetries!=null)this._allowRetries=B.allowRetries;if(B.maxRetries!=null)this._maxRetries=B.maxRetries}}options(A,Q){return WA(this,void 0,void 0,function*(){return this.request("OPTIONS",A,null,Q||{})})}get(A,Q){return WA(this,void 0,void 0,function*(){return this.request("GET",A,null,Q||{})})}del(A,Q){return WA(this,void 0,void 0,function*(){return this.request("DELETE",A,null,Q||{})})}post(A,Q,B){return WA(this,void 0,void 0,function*(){return this.request("POST",A,Q,B||{})})}patch(A,Q,B){return WA(this,void 0,void 0,function*(){return this.request("PATCH",A,Q,B||{})})}put(A,Q,B){return WA(this,void 0,void 0,function*(){return this.request("PUT",A,Q,B||{})})}head(A,Q){return WA(this,void 0,void 0,function*(){return this.request("HEAD",A,null,Q||{})})}sendStream(A,Q,B,I){return WA(this,void 0,void 0,function*(){return this.request(A,Q,B,I)})}getJson(A,Q={}){return WA(this,void 0,void 0,function*(){Q[fA.Accept]=this._getExistingOrDefaultHeader(Q,fA.Accept,SB.ApplicationJson);let B=yield this.get(A,Q);return this._processResponse(B,this.requestOptions)})}postJson(A,Q,B={}){return WA(this,void 0,void 0,function*(){let I=JSON.stringify(Q,null,2);B[fA.Accept]=this._getExistingOrDefaultHeader(B,fA.Accept,SB.ApplicationJson),B[fA.ContentType]=this._getExistingOrDefaultHeader(B,fA.ContentType,SB.ApplicationJson);let E=yield this.post(A,I,B);return this._processResponse(E,this.requestOptions)})}putJson(A,Q,B={}){return WA(this,void 0,void 0,function*(){let I=JSON.stringify(Q,null,2);B[fA.Accept]=this._getExistingOrDefaultHeader(B,fA.Accept,SB.ApplicationJson),B[fA.ContentType]=this._getExistingOrDefaultHeader(B,fA.ContentType,SB.ApplicationJson);let E=yield this.put(A,I,B);return this._processResponse(E,this.requestOptions)})}patchJson(A,Q,B={}){return WA(this,void 0,void 0,function*(){let I=JSON.stringify(Q,null,2);B[fA.Accept]=this._getExistingOrDefaultHeader(B,fA.Accept,SB.ApplicationJson),B[fA.ContentType]=this._getExistingOrDefaultHeader(B,fA.ContentType,SB.ApplicationJson);let E=yield this.patch(A,I,B);return this._processResponse(E,this.requestOptions)})}request(A,Q,B,I){return WA(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let E=new URL(Q),C=this._prepareRequest(A,E,I),g=this._allowRetries&&rz.includes(A)?this._maxRetries+1:1,D=0,F;do{if(F=yield this.requestRaw(C,B),F&&F.message&&F.message.statusCode===qQ.Unauthorized){let N;for(let J of this.handlers)if(J.canHandleAuthentication(F)){N=J;break}if(N)return N.handleAuthentication(this,C,B);else return F}let Y=this._maxRedirects;while(F.message.statusCode&&oz.includes(F.message.statusCode)&&this._allowRedirects&&Y>0){let N=F.message.headers.location;if(!N)break;let J=new URL(N);if(E.protocol==="https:"&&E.protocol!==J.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 F.readBody(),J.hostname!==E.hostname){for(let U in I)if(U.toLowerCase()==="authorization")delete I[U]}C=this._prepareRequest(A,J,I),F=yield this.requestRaw(C,B),Y--}if(!F.message.statusCode||!sz.includes(F.message.statusCode))return F;if(D+=1,D{function E(C,g){if(C)I(C);else if(!g)I(new Error("Unknown error"));else B(g)}this.requestRawWithCallback(A,Q,E)})})}requestRawWithCallback(A,Q,B){if(typeof Q==="string"){if(!A.options.headers)A.options.headers={};A.options.headers["Content-Length"]=Buffer.byteLength(Q,"utf8")}let I=!1;function E(D,F){if(!I)I=!0,B(D,F)}let C=A.httpModule.request(A.options,(D)=>{let F=new nF(D);E(void 0,F)}),g;if(C.on("socket",(D)=>{g=D}),C.setTimeout(this._socketTimeout||180000,()=>{if(g)g.end();E(new Error(`Request timeout: ${A.options.path}`))}),C.on("error",function(D){E(D)}),Q&&typeof Q==="string")C.write(Q,"utf8");if(Q&&typeof Q!=="string")Q.on("close",function(){C.end()}),Q.pipe(C);else C.end()}getAgent(A){let Q=new URL(A);return this._getAgent(Q)}getAgentDispatcher(A){let Q=new URL(A),B=iF.getProxyUrl(Q);if(!(B&&B.hostname))return;return this._getProxyAgentDispatcher(Q,B)}_prepareRequest(A,Q,B){let I={};I.parsedUrl=Q;let E=I.parsedUrl.protocol==="https:";I.httpModule=E?RM:lF;let C=E?443:80;if(I.options={},I.options.host=I.parsedUrl.hostname,I.options.port=I.parsedUrl.port?parseInt(I.parsedUrl.port):C,I.options.path=(I.parsedUrl.pathname||"")+(I.parsedUrl.search||""),I.options.method=A,I.options.headers=this._mergeHeaders(B),this.userAgent!=null)I.options.headers["user-agent"]=this.userAgent;if(I.options.agent=this._getAgent(I.parsedUrl),this.handlers)for(let g of this.handlers)g.prepareRequest(I.options);return I}_mergeHeaders(A){if(this.requestOptions&&this.requestOptions.headers)return Object.assign({},vg(this.requestOptions.headers),vg(A||{}));return vg(A||{})}_getExistingOrDefaultHeader(A,Q,B){let I;if(this.requestOptions&&this.requestOptions.headers)I=vg(this.requestOptions.headers)[Q];return A[Q]||I||B}_getAgent(A){let Q,B=iF.getProxyUrl(A),I=B&&B.hostname;if(this._keepAlive&&I)Q=this._proxyAgent;if(!I)Q=this._agent;if(Q)return Q;let E=A.protocol==="https:",C=100;if(this.requestOptions)C=this.requestOptions.maxSockets||lF.globalAgent.maxSockets;if(B&&B.hostname){let g={maxSockets:C,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(B.username||B.password)&&{proxyAuth:`${B.username}:${B.password}`}),{host:B.hostname,port:B.port})},D,F=B.protocol==="https:";if(E)D=F?fg.httpsOverHttps:fg.httpsOverHttp;else D=F?fg.httpOverHttps:fg.httpOverHttp;Q=D(g),this._proxyAgent=Q}if(!Q){let g={keepAlive:this._keepAlive,maxSockets:C};Q=E?new RM.Agent(g):new lF.Agent(g),this._agent=Q}if(E&&this._ignoreSslError)Q.options=Object.assign(Q.options||{},{rejectUnauthorized:!1});return Q}_getProxyAgentDispatcher(A,Q){let B;if(this._keepAlive)B=this._proxyAgentDispatcher;if(B)return B;let I=A.protocol==="https:";if(B=new nz.ProxyAgent(Object.assign({uri:Q.href,pipelining:!this._keepAlive?0:1},(Q.username||Q.password)&&{token:`Basic ${Buffer.from(`${Q.username}:${Q.password}`).toString("base64")}`})),this._proxyAgentDispatcher=B,I&&this._ignoreSslError)B.options=Object.assign(B.options.requestTls||{},{rejectUnauthorized:!1});return B}_performExponentialBackoff(A){return WA(this,void 0,void 0,function*(){A=Math.min(tz,A);let Q=ez*Math.pow(2,A);return new Promise((B)=>setTimeout(()=>B(),Q))})}_processResponse(A,Q){return WA(this,void 0,void 0,function*(){return new Promise((B,I)=>WA(this,void 0,void 0,function*(){let E=A.message.statusCode||0,C={statusCode:E,result:null,headers:{}};if(E===qQ.NotFound)B(C);function g(Y,N){if(typeof N==="string"){let J=new Date(N);if(!isNaN(J.valueOf()))return J}return N}let D,F;try{if(F=yield A.readBody(),F&&F.length>0){if(Q&&Q.deserializeDates)D=JSON.parse(F,g);else D=JSON.parse(F);C.result=D}C.headers=A.message.headers}catch(Y){}if(E>299){let Y;if(D&&D.message)Y=D.message;else if(F&&F.length>0)Y=F;else Y=`Failed request: (${E})`;let N=new mg(Y,E);N.result=C.result,I(N)}else B(C)}))})}}DA.HttpClient=wM;var vg=(A)=>Object.keys(A).reduce((Q,B)=>(Q[B.toLowerCase()]=A[B],Q),{})});var WM=L((CB)=>{var oF=CB&&CB.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(CB,"__esModule",{value:!0});CB.PersonalAccessTokenCredentialHandler=CB.BearerCredentialHandler=CB.BasicCredentialHandler=void 0;class MM{constructor(A,Q){this.username=A,this.password=Q}prepareRequest(A){if(!A.headers)throw Error("The request has no headers");A.headers.Authorization=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return!1}handleAuthentication(){return oF(this,void 0,void 0,function*(){throw new Error("not implemented")})}}CB.BasicCredentialHandler=MM;class LM{constructor(A){this.token=A}prepareRequest(A){if(!A.headers)throw Error("The request has no headers");A.headers.Authorization=`Bearer ${this.token}`}canHandleAuthentication(){return!1}handleAuthentication(){return oF(this,void 0,void 0,function*(){throw new Error("not implemented")})}}CB.BearerCredentialHandler=LM;class VM{constructor(A){this.token=A}prepareRequest(A){if(!A.headers)throw Error("The request has no headers");A.headers.Authorization=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return!1}handleAuthentication(){return oF(this,void 0,void 0,function*(){throw new Error("not implemented")})}}CB.PersonalAccessTokenCredentialHandler=VM});var KM=L((BE)=>{var ZM=BE&&BE.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(BE,"__esModule",{value:!0});BE.OidcClient=void 0;var QH=aF(),BH=WM(),XM=JI();class QE{static createHttpClient(A=!0,Q=10){let B={allowRetries:A,maxRetries:Q};return new QH.HttpClient("actions/oidc-client",[new BH.BearerCredentialHandler(QE.getRequestToken())],B)}static getRequestToken(){let A=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!A)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return A}static getIDTokenUrl(){let A=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!A)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return A}static getCall(A){var Q;return ZM(this,void 0,void 0,function*(){let E=(Q=(yield QE.createHttpClient().getJson(A).catch((C)=>{throw new Error(`Failed to get ID Token. \n Error Code : ${C.statusCode}\n - Error Message: ${C.message}`)})).result)===null||Q===void 0?void 0:Q.value;if(!E)throw new Error("Response json body do not have ID Token field");return E})}static getIDToken(A){return ZM(this,void 0,void 0,function*(){try{let Q=QE.getIDTokenUrl();if(A){let I=encodeURIComponent(A);Q=`${Q}&audience=${I}`}XM.debug(`ID token url is ${Q}`);let B=yield QE.getCall(Q);return XM.setSecret(B),B}catch(Q){throw new Error(`Error message: ${Q.message}`)}})}}BE.OidcClient=QE});var tF=L((CQ)=>{var sF=CQ&&CQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(CQ,"__esModule",{value:!0});CQ.summary=CQ.markdownSummary=CQ.SUMMARY_DOCS_URL=CQ.SUMMARY_ENV_VAR=void 0;var IH=G("os"),rF=G("fs"),{access:EH,appendFile:CH,writeFile:gH}=rF.promises;CQ.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";CQ.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class SM{constructor(){this._buffer=""}filePath(){return sF(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let A=process.env[CQ.SUMMARY_ENV_VAR];if(!A)throw new Error(`Unable to find environment variable for \$${CQ.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield EH(A,rF.constants.R_OK|rF.constants.W_OK)}catch(Q){throw new Error(`Unable to access summary file: '${A}'. Check if the file has correct read/write permissions.`)}return this._filePath=A,this._filePath})}wrap(A,Q,B={}){let I=Object.entries(B).map(([E,C])=>` ${E}="${C}"`).join("");if(!Q)return`<${A}${I}>`;return`<${A}${I}>${Q}`}write(A){return sF(this,void 0,void 0,function*(){let Q=!!(A===null||A===void 0?void 0:A.overwrite),B=yield this.filePath();return yield(Q?gH:CH)(B,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return sF(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(A,Q=!1){return this._buffer+=A,Q?this.addEOL():this}addEOL(){return this.addRaw(IH.EOL)}addCodeBlock(A,Q){let B=Object.assign({},Q&&{lang:Q}),I=this.wrap("pre",this.wrap("code",A),B);return this.addRaw(I).addEOL()}addList(A,Q=!1){let B=Q?"ol":"ul",I=A.map((C)=>this.wrap("li",C)).join(""),E=this.wrap(B,I);return this.addRaw(E).addEOL()}addTable(A){let Q=A.map((I)=>{let E=I.map((C)=>{if(typeof C==="string")return this.wrap("td",C);let{header:g,data:D,colspan:F,rowspan:Y}=C,N=g?"th":"td",J=Object.assign(Object.assign({},F&&{colspan:F}),Y&&{rowspan:Y});return this.wrap(N,D,J)}).join("");return this.wrap("tr",E)}).join(""),B=this.wrap("table",Q);return this.addRaw(B).addEOL()}addDetails(A,Q){let B=this.wrap("details",this.wrap("summary",A)+Q);return this.addRaw(B).addEOL()}addImage(A,Q,B){let{width:I,height:E}=B||{},C=Object.assign(Object.assign({},I&&{width:I}),E&&{height:E}),g=this.wrap("img",null,Object.assign({src:A,alt:Q},C));return this.addRaw(g).addEOL()}addHeading(A,Q){let B=`h${Q}`,I=["h1","h2","h3","h4","h5","h6"].includes(B)?B:"h1",E=this.wrap(I,A);return this.addRaw(E).addEOL()}addSeparator(){let A=this.wrap("hr",null);return this.addRaw(A).addEOL()}addBreak(){let A=this.wrap("br",null);return this.addRaw(A).addEOL()}addQuote(A,Q){let B=Object.assign({},Q&&{cite:Q}),I=this.wrap("blockquote",A,B);return this.addRaw(I).addEOL()}addLink(A,Q){let B=this.wrap("a",A,{href:Q});return this.addRaw(B).addEOL()}}var zM=new SM;CQ.markdownSummary=zM;CQ.summary=zM});var HM=L((gQ)=>{var DH=gQ&&gQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),FH=gQ&&gQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),NH=gQ&&gQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))DH(Q,A,B)}return FH(Q,A),Q};Object.defineProperty(gQ,"__esModule",{value:!0});gQ.toPlatformPath=gQ.toWin32Path=gQ.toPosixPath=void 0;var YH=NH(G("path"));function JH(A){return A.replace(/[\\]/g,"/")}gQ.toPosixPath=JH;function UH(A){return A.replace(/[/]/g,"\\")}gQ.toWin32Path=UH;function GH(A){return A.replace(/[/\\]/g,YH.sep)}gQ.toPlatformPath=GH});var AN=L((z)=>{var RH=z&&z.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),wH=z&&z.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),jM=z&&z.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))RH(Q,A,B)}return wH(Q,A),Q},eF=z&&z.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},DQ;Object.defineProperty(z,"__esModule",{value:!0});z.getCmdPath=z.tryGetExecutablePath=z.isRooted=z.isDirectory=z.exists=z.READONLY=z.UV_FS_O_EXLOCK=z.IS_WINDOWS=z.unlink=z.symlink=z.stat=z.rmdir=z.rm=z.rename=z.readlink=z.readdir=z.open=z.mkdir=z.lstat=z.copyFile=z.chmod=void 0;var TM=jM(G("fs")),cg=jM(G("path"));DQ=TM.promises,z.chmod=DQ.chmod,z.copyFile=DQ.copyFile,z.lstat=DQ.lstat,z.mkdir=DQ.mkdir,z.open=DQ.open,z.readdir=DQ.readdir,z.readlink=DQ.readlink,z.rename=DQ.rename,z.rm=DQ.rm,z.rmdir=DQ.rmdir,z.stat=DQ.stat,z.symlink=DQ.symlink,z.unlink=DQ.unlink;z.IS_WINDOWS=process.platform==="win32";z.UV_FS_O_EXLOCK=268435456;z.READONLY=TM.constants.O_RDONLY;function MH(A){return eF(this,void 0,void 0,function*(){try{yield z.stat(A)}catch(Q){if(Q.code==="ENOENT")return!1;throw Q}return!0})}z.exists=MH;function LH(A,Q=!1){return eF(this,void 0,void 0,function*(){return(Q?yield z.stat(A):yield z.lstat(A)).isDirectory()})}z.isDirectory=LH;function VH(A){if(A=ZH(A),!A)throw new Error('isRooted() parameter "p" cannot be empty');if(z.IS_WINDOWS)return A.startsWith("\\")||/^[A-Z]:/i.test(A);return A.startsWith("/")}z.isRooted=VH;function WH(A,Q){return eF(this,void 0,void 0,function*(){let B=void 0;try{B=yield z.stat(A)}catch(E){if(E.code!=="ENOENT")console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${E}`)}if(B&&B.isFile()){if(z.IS_WINDOWS){let E=cg.extname(A).toUpperCase();if(Q.some((C)=>C.toUpperCase()===E))return A}else if(xM(B))return A}let I=A;for(let E of Q){A=I+E,B=void 0;try{B=yield z.stat(A)}catch(C){if(C.code!=="ENOENT")console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${C}`)}if(B&&B.isFile()){if(z.IS_WINDOWS){try{let C=cg.dirname(A),g=cg.basename(A).toUpperCase();for(let D of yield z.readdir(C))if(g===D.toUpperCase()){A=cg.join(C,D);break}}catch(C){console.log(`Unexpected error attempting to determine the actual case of the file '${A}': ${C}`)}return A}else if(xM(B))return A}}return""})}z.tryGetExecutablePath=WH;function ZH(A){if(A=A||"",z.IS_WINDOWS)return A=A.replace(/\//g,"\\"),A.replace(/\\\\+/g,"\\");return A.replace(/\/\/+/g,"/")}function xM(A){return(A.mode&1)>0||(A.mode&8)>0&&A.gid===process.getgid()||(A.mode&64)>0&&A.uid===process.getuid()}function XH(){var A;return(A=process.env.COMSPEC)!==null&&A!==void 0?A:"cmd.exe"}z.getCmdPath=XH});var BN=L((LA)=>{var KH=LA&&LA.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),SH=LA&&LA.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),$M=LA&&LA.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))KH(Q,A,B)}return SH(Q,A),Q},dB=LA&&LA.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(LA,"__esModule",{value:!0});LA.findInPath=LA.which=LA.mkdirP=LA.rmRF=LA.mv=LA.cp=void 0;var zH=G("assert"),gB=$M(G("path")),o=$M(AN());function HH(A,Q,B={}){return dB(this,void 0,void 0,function*(){let{force:I,recursive:E,copySourceDirectory:C}=jH(B),g=(yield o.exists(Q))?yield o.stat(Q):null;if(g&&g.isFile()&&!I)return;let D=g&&g.isDirectory()&&C?gB.join(Q,gB.basename(A)):Q;if(!(yield o.exists(A)))throw new Error(`no such file or directory: ${A}`);if((yield o.stat(A)).isDirectory())if(!E)throw new Error(`Failed to copy. ${A} is a directory, but tried to copy without recursive flag.`);else yield OM(A,D,0,I);else{if(gB.relative(A,D)==="")throw new Error(`'${D}' and '${A}' are the same file`);yield PM(A,D,I)}})}LA.cp=HH;function xH(A,Q,B={}){return dB(this,void 0,void 0,function*(){if(yield o.exists(Q)){let I=!0;if(yield o.isDirectory(Q))Q=gB.join(Q,gB.basename(A)),I=yield o.exists(Q);if(I)if(B.force==null||B.force)yield hM(Q);else throw new Error("Destination already exists")}yield QN(gB.dirname(Q)),yield o.rename(A,Q)})}LA.mv=xH;function hM(A){return dB(this,void 0,void 0,function*(){if(o.IS_WINDOWS){if(/[*"<>|]/.test(A))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{yield o.rm(A,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(Q){throw new Error(`File was unable to be removed ${Q}`)}})}LA.rmRF=hM;function QN(A){return dB(this,void 0,void 0,function*(){zH.ok(A,"a path argument must be provided"),yield o.mkdir(A,{recursive:!0})})}LA.mkdirP=QN;function yM(A,Q){return dB(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");if(Q){let I=yield yM(A,!1);if(!I)if(o.IS_WINDOWS)throw new Error(`Unable to locate executable file: ${A}. 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.`);else throw new Error(`Unable to locate executable file: ${A}. 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 I}let B=yield qM(A);if(B&&B.length>0)return B[0];return""})}LA.which=yM;function qM(A){return dB(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");let Q=[];if(o.IS_WINDOWS&&process.env.PATHEXT){for(let E of process.env.PATHEXT.split(gB.delimiter))if(E)Q.push(E)}if(o.isRooted(A)){let E=yield o.tryGetExecutablePath(A,Q);if(E)return[E];return[]}if(A.includes(gB.sep))return[];let B=[];if(process.env.PATH){for(let E of process.env.PATH.split(gB.delimiter))if(E)B.push(E)}let I=[];for(let E of B){let C=yield o.tryGetExecutablePath(gB.join(E,A),Q);if(C)I.push(C)}return I})}LA.findInPath=qM;function jH(A){let Q=A.force==null?!0:A.force,B=Boolean(A.recursive),I=A.copySourceDirectory==null?!0:Boolean(A.copySourceDirectory);return{force:Q,recursive:B,copySourceDirectory:I}}function OM(A,Q,B,I){return dB(this,void 0,void 0,function*(){if(B>=255)return;B++,yield QN(Q);let E=yield o.readdir(A);for(let C of E){let g=`${A}/${C}`,D=`${Q}/${C}`;if((yield o.lstat(g)).isDirectory())yield OM(g,D,B,I);else yield PM(g,D,I)}yield o.chmod(Q,(yield o.stat(A)).mode)})}function PM(A,Q,B){return dB(this,void 0,void 0,function*(){if((yield o.lstat(A)).isSymbolicLink()){try{yield o.lstat(Q),yield o.unlink(Q)}catch(E){if(E.code==="EPERM")yield o.chmod(Q,"0666"),yield o.unlink(Q)}let I=yield o.readlink(A);yield o.symlink(I,Q,o.IS_WINDOWS?"junction":null)}else if(!(yield o.exists(Q))||B)yield o.copyFile(A,Q)})}});var bM=L((FQ)=>{var TH=FQ&&FQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),$H=FQ&&FQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),IE=FQ&&FQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))TH(Q,A,B)}return $H(Q,A),Q},kM=FQ&&FQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(FQ,"__esModule",{value:!0});FQ.argStringToArray=FQ.ToolRunner=void 0;var ug=IE(G("os")),fM=IE(G("events")),hH=IE(G("child_process")),yH=IE(G("path")),qH=IE(BN()),_M=IE(AN()),OH=G("timers"),dg=process.platform==="win32";class vM extends fM.EventEmitter{constructor(A,Q,B){super();if(!A)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=A,this.args=Q||[],this.options=B||{}}_debug(A){if(this.options.listeners&&this.options.listeners.debug)this.options.listeners.debug(A)}_getCommandString(A,Q){let B=this._getSpawnFileName(),I=this._getSpawnArgs(A),E=Q?"":"[command]";if(dg)if(this._isCmdFile()){E+=B;for(let C of I)E+=` ${C}`}else if(A.windowsVerbatimArguments){E+=`"${B}"`;for(let C of I)E+=` ${C}`}else{E+=this._windowsQuoteCmdArg(B);for(let C of I)E+=` ${this._windowsQuoteCmdArg(C)}`}else{E+=B;for(let C of I)E+=` ${C}`}return E}_processLineBuffer(A,Q,B){try{let I=Q+A.toString(),E=I.indexOf(ug.EOL);while(E>-1){let C=I.substring(0,E);B(C),I=I.substring(E+ug.EOL.length),E=I.indexOf(ug.EOL)}return I}catch(I){return this._debug(`error processing line. Failed with error ${I}`),""}}_getSpawnFileName(){if(dg){if(this._isCmdFile())return process.env.COMSPEC||"cmd.exe"}return this.toolPath}_getSpawnArgs(A){if(dg){if(this._isCmdFile()){let Q=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let B of this.args)Q+=" ",Q+=A.windowsVerbatimArguments?B:this._windowsQuoteCmdArg(B);return Q+='"',[Q]}}return this.args}_endsWith(A,Q){return A.endsWith(Q)}_isCmdFile(){let A=this.toolPath.toUpperCase();return this._endsWith(A,".CMD")||this._endsWith(A,".BAT")}_windowsQuoteCmdArg(A){if(!this._isCmdFile())return this._uvQuoteCmdArg(A);if(!A)return'""';let Q=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],B=!1;for(let C of A)if(Q.some((g)=>g===C)){B=!0;break}if(!B)return A;let I='"',E=!0;for(let C=A.length;C>0;C--)if(I+=A[C-1],E&&A[C-1]==="\\")I+="\\";else if(A[C-1]==='"')E=!0,I+='"';else E=!1;return I+='"',I.split("").reverse().join("")}_uvQuoteCmdArg(A){if(!A)return'""';if(!A.includes(" ")&&!A.includes("\t")&&!A.includes('"'))return A;if(!A.includes('"')&&!A.includes("\\"))return`"${A}"`;let Q='"',B=!0;for(let I=A.length;I>0;I--)if(Q+=A[I-1],B&&A[I-1]==="\\")Q+="\\";else if(A[I-1]==='"')B=!0,Q+="\\";else B=!1;return Q+='"',Q.split("").reverse().join("")}_cloneExecOptions(A){A=A||{};let Q={cwd:A.cwd||process.cwd(),env:A.env||process.env,silent:A.silent||!1,windowsVerbatimArguments:A.windowsVerbatimArguments||!1,failOnStdErr:A.failOnStdErr||!1,ignoreReturnCode:A.ignoreReturnCode||!1,delay:A.delay||1e4};return Q.outStream=A.outStream||process.stdout,Q.errStream=A.errStream||process.stderr,Q}_getSpawnOptions(A,Q){A=A||{};let B={};if(B.cwd=A.cwd,B.env=A.env,B.windowsVerbatimArguments=A.windowsVerbatimArguments||this._isCmdFile(),A.windowsVerbatimArguments)B.argv0=`"${Q}"`;return B}exec(){return kM(this,void 0,void 0,function*(){if(!_M.isRooted(this.toolPath)&&(this.toolPath.includes("/")||dg&&this.toolPath.includes("\\")))this.toolPath=yH.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath);return this.toolPath=yield qH.which(this.toolPath,!0),new Promise((A,Q)=>kM(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let F of this.args)this._debug(` ${F}`);let B=this._cloneExecOptions(this.options);if(!B.silent&&B.outStream)B.outStream.write(this._getCommandString(B)+ug.EOL);let I=new IN(B,this.toolPath);if(I.on("debug",(F)=>{this._debug(F)}),this.options.cwd&&!(yield _M.exists(this.options.cwd)))return Q(new Error(`The cwd: ${this.options.cwd} does not exist!`));let E=this._getSpawnFileName(),C=hH.spawn(E,this._getSpawnArgs(B),this._getSpawnOptions(this.options,E)),g="";if(C.stdout)C.stdout.on("data",(F)=>{if(this.options.listeners&&this.options.listeners.stdout)this.options.listeners.stdout(F);if(!B.silent&&B.outStream)B.outStream.write(F);g=this._processLineBuffer(F,g,(Y)=>{if(this.options.listeners&&this.options.listeners.stdline)this.options.listeners.stdline(Y)})});let D="";if(C.stderr)C.stderr.on("data",(F)=>{if(I.processStderr=!0,this.options.listeners&&this.options.listeners.stderr)this.options.listeners.stderr(F);if(!B.silent&&B.errStream&&B.outStream)(B.failOnStdErr?B.errStream:B.outStream).write(F);D=this._processLineBuffer(F,D,(Y)=>{if(this.options.listeners&&this.options.listeners.errline)this.options.listeners.errline(Y)})});if(C.on("error",(F)=>{I.processError=F.message,I.processExited=!0,I.processClosed=!0,I.CheckComplete()}),C.on("exit",(F)=>{I.processExitCode=F,I.processExited=!0,this._debug(`Exit code ${F} received from tool '${this.toolPath}'`),I.CheckComplete()}),C.on("close",(F)=>{I.processExitCode=F,I.processExited=!0,I.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),I.CheckComplete()}),I.on("done",(F,Y)=>{if(g.length>0)this.emit("stdline",g);if(D.length>0)this.emit("errline",D);if(C.removeAllListeners(),F)Q(F);else A(Y)}),this.options.input){if(!C.stdin)throw new Error("child process missing stdin");C.stdin.end(this.options.input)}}))})}}FQ.ToolRunner=vM;function PH(A){let Q=[],B=!1,I=!1,E="";function C(g){if(I&&g!=='"')E+="\\";E+=g,I=!1}for(let g=0;g0)Q.push(E),E="";continue}C(D)}if(E.length>0)Q.push(E.trim());return Q}FQ.argStringToArray=PH;class IN extends fM.EventEmitter{constructor(A,Q){super();if(this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!Q)throw new Error("toolPath must not be empty");if(this.options=A,this.toolPath=Q,A.delay)this.delay=A.delay}CheckComplete(){if(this.done)return;if(this.processClosed)this._setResult();else if(this.processExited)this.timeout=OH.setTimeout(IN.HandleTimeout,this.delay,this)}_debug(A){this.emit("debug",A)}_setResult(){let A;if(this.processExited){if(this.processError)A=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}`);else if(this.processExitCode!==0&&!this.options.ignoreReturnCode)A=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);else if(this.processStderr&&this.options.failOnStdErr)A=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}if(this.timeout)clearTimeout(this.timeout),this.timeout=null;this.done=!0,this.emit("done",A,this.processExitCode)}static HandleTimeout(A){if(A.done)return;if(!A.processClosed&&A.processExited){let Q=`The STDIO streams did not close within ${A.delay/1000} seconds of the exit event from process '${A.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;A._debug(Q)}A._setResult()}}});var pg=L((NQ)=>{var kH=NQ&&NQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),_H=NQ&&NQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),fH=NQ&&NQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))kH(Q,A,B)}return _H(Q,A),Q},uM=NQ&&NQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(NQ,"__esModule",{value:!0});NQ.getExecOutput=NQ.exec=void 0;var mM=G("string_decoder"),cM=fH(bM());function dM(A,Q,B){return uM(this,void 0,void 0,function*(){let I=cM.argStringToArray(A);if(I.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let E=I[0];return Q=I.slice(1).concat(Q||[]),new cM.ToolRunner(E,Q,B).exec()})}NQ.exec=dM;function vH(A,Q,B){var I,E;return uM(this,void 0,void 0,function*(){let C="",g="",D=new mM.StringDecoder("utf8"),F=new mM.StringDecoder("utf8"),Y=(I=B===null||B===void 0?void 0:B.listeners)===null||I===void 0?void 0:I.stdout,N=(E=B===null||B===void 0?void 0:B.listeners)===null||E===void 0?void 0:E.stderr,J=(V)=>{if(g+=F.write(V),N)N(V)},U=(V)=>{if(C+=D.write(V),Y)Y(V)},w=Object.assign(Object.assign({},B===null||B===void 0?void 0:B.listeners),{stdout:U,stderr:J}),M=yield dM(A,Q,Object.assign(Object.assign({},B),{listeners:w}));return C+=D.end(),g+=F.end(),{exitCode:M,stdout:C,stderr:g}})}NQ.getExecOutput=vH});var lM=L((l)=>{var bH=l&&l.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),mH=l&&l.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),cH=l&&l.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))bH(Q,A,B)}return mH(Q,A),Q},ig=l&&l.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},uH=l&&l.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(l,"__esModule",{value:!0});l.getDetails=l.isLinux=l.isMacOS=l.isWindows=l.arch=l.platform=void 0;var pM=uH(G("os")),lg=cH(pg()),dH=()=>ig(void 0,void 0,void 0,function*(){let{stdout:A}=yield lg.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:Q}=yield lg.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:Q.trim(),version:A.trim()}}),pH=()=>ig(void 0,void 0,void 0,function*(){var A,Q,B,I;let{stdout:E}=yield lg.getExecOutput("sw_vers",void 0,{silent:!0}),C=(Q=(A=E.match(/ProductVersion:\s*(.+)/))===null||A===void 0?void 0:A[1])!==null&&Q!==void 0?Q:"";return{name:(I=(B=E.match(/ProductName:\s*(.+)/))===null||B===void 0?void 0:B[1])!==null&&I!==void 0?I:"",version:C}}),lH=()=>ig(void 0,void 0,void 0,function*(){let{stdout:A}=yield lg.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[Q,B]=A.trim().split("\n");return{name:Q,version:B}});l.platform=pM.default.platform();l.arch=pM.default.arch();l.isWindows=l.platform==="win32";l.isMacOS=l.platform==="darwin";l.isLinux=l.platform==="linux";function iH(){return ig(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield l.isWindows?dH():l.isMacOS?pH():lH()),{platform:l.platform,arch:l.arch,isWindows:l.isWindows,isMacOS:l.isMacOS,isLinux:l.isLinux})})}l.getDetails=iH});var JI=L((S)=>{var nH=S&&S.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),aH=S&&S.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),CN=S&&S.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))nH(Q,A,B)}return aH(Q,A),Q},iM=S&&S.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.platform=S.toPlatformPath=S.toWin32Path=S.toPosixPath=S.markdownSummary=S.summary=S.getIDToken=S.getState=S.saveState=S.group=S.endGroup=S.startGroup=S.info=S.notice=S.warning=S.error=S.debug=S.isDebug=S.setFailed=S.setCommandEcho=S.setOutput=S.getBooleanInput=S.getMultilineInput=S.getInput=S.addPath=S.setSecret=S.exportVariable=S.ExitCode=void 0;var OQ=hN(),UI=ON(),EE=gC(),nM=CN(G("os")),oH=CN(G("path")),sH=KM(),EN;(function(A){A[A.Success=0]="Success",A[A.Failure=1]="Failure"})(EN||(S.ExitCode=EN={}));function rH(A,Q){let B=EE.toCommandValue(Q);if(process.env[A]=B,process.env.GITHUB_ENV||"")return UI.issueFileCommand("ENV",UI.prepareKeyValueMessage(A,Q));OQ.issueCommand("set-env",{name:A},B)}S.exportVariable=rH;function tH(A){OQ.issueCommand("add-mask",{},A)}S.setSecret=tH;function eH(A){if(process.env.GITHUB_PATH||"")UI.issueFileCommand("PATH",A);else OQ.issueCommand("add-path",{},A);process.env.PATH=`${A}${oH.delimiter}${process.env.PATH}`}S.addPath=eH;function gN(A,Q){let B=process.env[`INPUT_${A.replace(/ /g,"_").toUpperCase()}`]||"";if(Q&&Q.required&&!B)throw new Error(`Input required and not supplied: ${A}`);if(Q&&Q.trimWhitespace===!1)return B;return B.trim()}S.getInput=gN;function A3(A,Q){let B=gN(A,Q).split("\n").filter((I)=>I!=="");if(Q&&Q.trimWhitespace===!1)return B;return B.map((I)=>I.trim())}S.getMultilineInput=A3;function Q3(A,Q){let B=["true","True","TRUE"],I=["false","False","FALSE"],E=gN(A,Q);if(B.includes(E))return!0;if(I.includes(E))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${A}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)}S.getBooleanInput=Q3;function B3(A,Q){if(process.env.GITHUB_OUTPUT||"")return UI.issueFileCommand("OUTPUT",UI.prepareKeyValueMessage(A,Q));process.stdout.write(nM.EOL),OQ.issueCommand("set-output",{name:A},EE.toCommandValue(Q))}S.setOutput=B3;function I3(A){OQ.issue("echo",A?"on":"off")}S.setCommandEcho=I3;function E3(A){process.exitCode=EN.Failure,aM(A)}S.setFailed=E3;function C3(){return process.env.RUNNER_DEBUG==="1"}S.isDebug=C3;function g3(A){OQ.issueCommand("debug",{},A)}S.debug=g3;function aM(A,Q={}){OQ.issueCommand("error",EE.toCommandProperties(Q),A instanceof Error?A.toString():A)}S.error=aM;function D3(A,Q={}){OQ.issueCommand("warning",EE.toCommandProperties(Q),A instanceof Error?A.toString():A)}S.warning=D3;function F3(A,Q={}){OQ.issueCommand("notice",EE.toCommandProperties(Q),A instanceof Error?A.toString():A)}S.notice=F3;function N3(A){process.stdout.write(A+nM.EOL)}S.info=N3;function oM(A){OQ.issue("group",A)}S.startGroup=oM;function sM(){OQ.issue("endgroup")}S.endGroup=sM;function Y3(A,Q){return iM(this,void 0,void 0,function*(){oM(A);let B;try{B=yield Q()}finally{sM()}return B})}S.group=Y3;function J3(A,Q){if(process.env.GITHUB_STATE||"")return UI.issueFileCommand("STATE",UI.prepareKeyValueMessage(A,Q));OQ.issueCommand("save-state",{name:A},EE.toCommandValue(Q))}S.saveState=J3;function U3(A){return process.env[`STATE_${A}`]||""}S.getState=U3;function G3(A){return iM(this,void 0,void 0,function*(){return yield sH.OidcClient.getIDToken(A)})}S.getIDToken=G3;var R3=tF();Object.defineProperty(S,"summary",{enumerable:!0,get:function(){return R3.summary}});var w3=tF();Object.defineProperty(S,"markdownSummary",{enumerable:!0,get:function(){return w3.markdownSummary}});var DN=HM();Object.defineProperty(S,"toPosixPath",{enumerable:!0,get:function(){return DN.toPosixPath}});Object.defineProperty(S,"toWin32Path",{enumerable:!0,get:function(){return DN.toWin32Path}});Object.defineProperty(S,"toPlatformPath",{enumerable:!0,get:function(){return DN.toPlatformPath}});S.platform=CN(lM())});var wN=L((q,QL)=>{q=QL.exports=f;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG))r=function(){var A=Array.prototype.slice.call(arguments,0);A.unshift("SEMVER"),console.log.apply(console,A)};else r=function(){};q.SEMVER_SPEC_VERSION="2.0.0";var tE=256,ng=Number.MAX_SAFE_INTEGER||9007199254740991,FN=16,M3=tE-6,CE=q.re=[],s=q.safeRe=[],W=q.src=[],R=q.tokens={},eM=0;function m(A){R[A]=eM++}var YN="[a-zA-Z0-9-]",NN=[["\\s",1],["\\d",tE],[YN,M3]];function AC(A){for(var Q=0;Q)?=?)";m("XRANGEIDENTIFIERLOOSE");W[R.XRANGEIDENTIFIERLOOSE]=W[R.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";m("XRANGEIDENTIFIER");W[R.XRANGEIDENTIFIER]=W[R.NUMERICIDENTIFIER]+"|x|X|\\*";m("XRANGEPLAIN");W[R.XRANGEPLAIN]="[v=\\s]*("+W[R.XRANGEIDENTIFIER]+")(?:\\.("+W[R.XRANGEIDENTIFIER]+")(?:\\.("+W[R.XRANGEIDENTIFIER]+")(?:"+W[R.PRERELEASE]+")?"+W[R.BUILD]+"?)?)?";m("XRANGEPLAINLOOSE");W[R.XRANGEPLAINLOOSE]="[v=\\s]*("+W[R.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+W[R.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+W[R.XRANGEIDENTIFIERLOOSE]+")(?:"+W[R.PRERELEASELOOSE]+")?"+W[R.BUILD]+"?)?)?";m("XRANGE");W[R.XRANGE]="^"+W[R.GTLT]+"\\s*"+W[R.XRANGEPLAIN]+"$";m("XRANGELOOSE");W[R.XRANGELOOSE]="^"+W[R.GTLT]+"\\s*"+W[R.XRANGEPLAINLOOSE]+"$";m("COERCE");W[R.COERCE]="(^|[^\\d])(\\d{1,"+FN+"})(?:\\.(\\d{1,"+FN+"}))?(?:\\.(\\d{1,"+FN+"}))?(?:$|[^\\d])";m("COERCERTL");CE[R.COERCERTL]=new RegExp(W[R.COERCE],"g");s[R.COERCERTL]=new RegExp(AC(W[R.COERCE]),"g");m("LONETILDE");W[R.LONETILDE]="(?:~>?)";m("TILDETRIM");W[R.TILDETRIM]="(\\s*)"+W[R.LONETILDE]+"\\s+";CE[R.TILDETRIM]=new RegExp(W[R.TILDETRIM],"g");s[R.TILDETRIM]=new RegExp(AC(W[R.TILDETRIM]),"g");var L3="$1~";m("TILDE");W[R.TILDE]="^"+W[R.LONETILDE]+W[R.XRANGEPLAIN]+"$";m("TILDELOOSE");W[R.TILDELOOSE]="^"+W[R.LONETILDE]+W[R.XRANGEPLAINLOOSE]+"$";m("LONECARET");W[R.LONECARET]="(?:\\^)";m("CARETTRIM");W[R.CARETTRIM]="(\\s*)"+W[R.LONECARET]+"\\s+";CE[R.CARETTRIM]=new RegExp(W[R.CARETTRIM],"g");s[R.CARETTRIM]=new RegExp(AC(W[R.CARETTRIM]),"g");var V3="$1^";m("CARET");W[R.CARET]="^"+W[R.LONECARET]+W[R.XRANGEPLAIN]+"$";m("CARETLOOSE");W[R.CARETLOOSE]="^"+W[R.LONECARET]+W[R.XRANGEPLAINLOOSE]+"$";m("COMPARATORLOOSE");W[R.COMPARATORLOOSE]="^"+W[R.GTLT]+"\\s*("+W[R.LOOSEPLAIN]+")$|^$";m("COMPARATOR");W[R.COMPARATOR]="^"+W[R.GTLT]+"\\s*("+W[R.FULLPLAIN]+")$|^$";m("COMPARATORTRIM");W[R.COMPARATORTRIM]="(\\s*)"+W[R.GTLT]+"\\s*("+W[R.LOOSEPLAIN]+"|"+W[R.XRANGEPLAIN]+")";CE[R.COMPARATORTRIM]=new RegExp(W[R.COMPARATORTRIM],"g");s[R.COMPARATORTRIM]=new RegExp(AC(W[R.COMPARATORTRIM]),"g");var W3="$1$2$3";m("HYPHENRANGE");W[R.HYPHENRANGE]="^\\s*("+W[R.XRANGEPLAIN]+")\\s+-\\s+("+W[R.XRANGEPLAIN]+")\\s*$";m("HYPHENRANGELOOSE");W[R.HYPHENRANGELOOSE]="^\\s*("+W[R.XRANGEPLAINLOOSE]+")\\s+-\\s+("+W[R.XRANGEPLAINLOOSE]+")\\s*$";m("STAR");W[R.STAR]="(<|>)?=?\\s*\\*";for(DB=0;DBtE)return null;var B=Q.loose?s[R.LOOSE]:s[R.FULL];if(!B.test(A))return null;try{return new f(A,Q)}catch(I){return null}}q.valid=Z3;function Z3(A,Q){var B=RI(A,Q);return B?B.version:null}q.clean=X3;function X3(A,Q){var B=RI(A.trim().replace(/^[=v]+/,""),Q);return B?B.version:null}q.SemVer=f;function f(A,Q){if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};if(A instanceof f)if(A.loose===Q.loose)return A;else A=A.version;else if(typeof A!=="string")throw new TypeError("Invalid Version: "+A);if(A.length>tE)throw new TypeError("version is longer than "+tE+" characters");if(!(this instanceof f))return new f(A,Q);r("SemVer",A,Q),this.options=Q,this.loose=!!Q.loose;var B=A.trim().match(Q.loose?s[R.LOOSE]:s[R.FULL]);if(!B)throw new TypeError("Invalid Version: "+A);if(this.raw=A,this.major=+B[1],this.minor=+B[2],this.patch=+B[3],this.major>ng||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ng||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ng||this.patch<0)throw new TypeError("Invalid patch version");if(!B[4])this.prerelease=[];else this.prerelease=B[4].split(".").map(function(I){if(/^[0-9]+$/.test(I)){var E=+I;if(E>=0&&E=0)if(typeof this.prerelease[B]==="number")this.prerelease[B]++,B=-2;if(B===-1)this.prerelease.push(0)}if(Q)if(this.prerelease[0]===Q){if(isNaN(this.prerelease[1]))this.prerelease=[Q,0]}else this.prerelease=[Q,0];break;default:throw new Error("invalid increment argument: "+A)}return this.format(),this.raw=this.version,this};q.inc=K3;function K3(A,Q,B,I){if(typeof B==="string")I=B,B=void 0;try{return new f(A,B).inc(Q,I).version}catch(E){return null}}q.diff=S3;function S3(A,Q){if(JN(A,Q))return null;else{var B=RI(A),I=RI(Q),E="";if(B.prerelease.length||I.prerelease.length){E="pre";var C="prerelease"}for(var g in B)if(g==="major"||g==="minor"||g==="patch"){if(B[g]!==I[g])return E+g}return C}}q.compareIdentifiers=GI;var rM=/^[0-9]+$/;function GI(A,Q){var B=rM.test(A),I=rM.test(Q);if(B&&I)A=+A,Q=+Q;return A===Q?0:B&&!I?-1:I&&!B?1:A0}q.lt=ag;function ag(A,Q,B){return zB(A,Q,B)<0}q.eq=JN;function JN(A,Q,B){return zB(A,Q,B)===0}q.neq=AL;function AL(A,Q,B){return zB(A,Q,B)!==0}q.gte=UN;function UN(A,Q,B){return zB(A,Q,B)>=0}q.lte=GN;function GN(A,Q,B){return zB(A,Q,B)<=0}q.cmp=og;function og(A,Q,B,I){switch(Q){case"===":if(typeof A==="object")A=A.version;if(typeof B==="object")B=B.version;return A===B;case"!==":if(typeof A==="object")A=A.version;if(typeof B==="object")B=B.version;return A!==B;case"":case"=":case"==":return JN(A,B,I);case"!=":return AL(A,B,I);case">":return eE(A,B,I);case">=":return UN(A,B,I);case"<":return ag(A,B,I);case"<=":return GN(A,B,I);default:throw new TypeError("Invalid operator: "+Q)}}q.Comparator=PQ;function PQ(A,Q){if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};if(A instanceof PQ)if(A.loose===!!Q.loose)return A;else A=A.value;if(!(this instanceof PQ))return new PQ(A,Q);if(A=A.trim().split(/\s+/).join(" "),r("comparator",A,Q),this.options=Q,this.loose=!!Q.loose,this.parse(A),this.semver===gE)this.value="";else this.value=this.operator+this.semver.version;r("comp",this)}var gE={};PQ.prototype.parse=function(A){var Q=this.options.loose?s[R.COMPARATORLOOSE]:s[R.COMPARATOR],B=A.match(Q);if(!B)throw new TypeError("Invalid comparator: "+A);if(this.operator=B[1]!==void 0?B[1]:"",this.operator==="=")this.operator="";if(!B[2])this.semver=gE;else this.semver=new f(B[2],this.options.loose)};PQ.prototype.toString=function(){return this.value};PQ.prototype.test=function(A){if(r("Comparator.test",A,this.options.loose),this.semver===gE||A===gE)return!0;if(typeof A==="string")try{A=new f(A,this.options)}catch(Q){return!1}return og(A,this.operator,this.semver,this.options)};PQ.prototype.intersects=function(A,Q){if(!(A instanceof PQ))throw new TypeError("a Comparator is required");if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};var B;if(this.operator===""){if(this.value==="")return!0;return B=new GA(A.value,Q),sg(this.value,B,Q)}else if(A.operator===""){if(A.value==="")return!0;return B=new GA(this.value,Q),sg(A.semver,B,Q)}var I=(this.operator===">="||this.operator===">")&&(A.operator===">="||A.operator===">"),E=(this.operator==="<="||this.operator==="<")&&(A.operator==="<="||A.operator==="<"),C=this.semver.version===A.semver.version,g=(this.operator===">="||this.operator==="<=")&&(A.operator===">="||A.operator==="<="),D=og(this.semver,"<",A.semver,Q)&&((this.operator===">="||this.operator===">")&&(A.operator==="<="||A.operator==="<")),F=og(this.semver,">",A.semver,Q)&&((this.operator==="<="||this.operator==="<")&&(A.operator===">="||A.operator===">"));return I||E||C&&g||D||F};q.Range=GA;function GA(A,Q){if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};if(A instanceof GA)if(A.loose===!!Q.loose&&A.includePrerelease===!!Q.includePrerelease)return A;else return new GA(A.raw,Q);if(A instanceof PQ)return new GA(A.value,Q);if(!(this instanceof GA))return new GA(A,Q);if(this.options=Q,this.loose=!!Q.loose,this.includePrerelease=!!Q.includePrerelease,this.raw=A.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(B){return this.parseRange(B.trim())},this).filter(function(B){return B.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}GA.prototype.format=function(){return this.range=this.set.map(function(A){return A.join(" ").trim()}).join("||").trim(),this.range};GA.prototype.toString=function(){return this.range};GA.prototype.parseRange=function(A){var Q=this.options.loose,B=Q?s[R.HYPHENRANGELOOSE]:s[R.HYPHENRANGE];A=A.replace(B,u3),r("hyphen replace",A),A=A.replace(s[R.COMPARATORTRIM],W3),r("comparator trim",A,s[R.COMPARATORTRIM]),A=A.replace(s[R.TILDETRIM],L3),A=A.replace(s[R.CARETTRIM],V3),A=A.split(/\s+/).join(" ");var I=Q?s[R.COMPARATORLOOSE]:s[R.COMPARATOR],E=A.split(" ").map(function(C){return P3(C,this.options)},this).join(" ").split(/\s+/);if(this.options.loose)E=E.filter(function(C){return!!C.match(I)});return E=E.map(function(C){return new PQ(C,this.options)},this),E};GA.prototype.intersects=function(A,Q){if(!(A instanceof GA))throw new TypeError("a Range is required");return this.set.some(function(B){return tM(B,Q)&&A.set.some(function(I){return tM(I,Q)&&B.every(function(E){return I.every(function(C){return E.intersects(C,Q)})})})})};function tM(A,Q){var B=!0,I=A.slice(),E=I.pop();while(B&&I.length)B=I.every(function(C){return E.intersects(C,Q)}),E=I.pop();return B}q.toComparators=O3;function O3(A,Q){return new GA(A,Q).set.map(function(B){return B.map(function(I){return I.value}).join(" ").trim().split(" ")})}function P3(A,Q){return r("comp",A,Q),A=f3(A,Q),r("caret",A),A=k3(A,Q),r("tildes",A),A=b3(A,Q),r("xrange",A),A=c3(A,Q),r("stars",A),A}function nA(A){return!A||A.toLowerCase()==="x"||A==="*"}function k3(A,Q){return A.trim().split(/\s+/).map(function(B){return _3(B,Q)}).join(" ")}function _3(A,Q){var B=Q.loose?s[R.TILDELOOSE]:s[R.TILDE];return A.replace(B,function(I,E,C,g,D){r("tilde",A,I,E,C,g,D);var F;if(nA(E))F="";else if(nA(C))F=">="+E+".0.0 <"+(+E+1)+".0.0";else if(nA(g))F=">="+E+"."+C+".0 <"+E+"."+(+C+1)+".0";else if(D)r("replaceTilde pr",D),F=">="+E+"."+C+"."+g+"-"+D+" <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+"."+g+" <"+E+"."+(+C+1)+".0";return r("tilde return",F),F})}function f3(A,Q){return A.trim().split(/\s+/).map(function(B){return v3(B,Q)}).join(" ")}function v3(A,Q){r("caret",A,Q);var B=Q.loose?s[R.CARETLOOSE]:s[R.CARET];return A.replace(B,function(I,E,C,g,D){r("caret",A,I,E,C,g,D);var F;if(nA(E))F="";else if(nA(C))F=">="+E+".0.0 <"+(+E+1)+".0.0";else if(nA(g))if(E==="0")F=">="+E+"."+C+".0 <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+".0 <"+(+E+1)+".0.0";else if(D)if(r("replaceCaret pr",D),E==="0")if(C==="0")F=">="+E+"."+C+"."+g+"-"+D+" <"+E+"."+C+"."+(+g+1);else F=">="+E+"."+C+"."+g+"-"+D+" <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+"."+g+"-"+D+" <"+(+E+1)+".0.0";else if(r("no pr"),E==="0")if(C==="0")F=">="+E+"."+C+"."+g+" <"+E+"."+C+"."+(+g+1);else F=">="+E+"."+C+"."+g+" <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+"."+g+" <"+(+E+1)+".0.0";return r("caret return",F),F})}function b3(A,Q){return r("replaceXRanges",A,Q),A.split(/\s+/).map(function(B){return m3(B,Q)}).join(" ")}function m3(A,Q){A=A.trim();var B=Q.loose?s[R.XRANGELOOSE]:s[R.XRANGE];return A.replace(B,function(I,E,C,g,D,F){r("xRange",A,I,E,C,g,D,F);var Y=nA(C),N=Y||nA(g),J=N||nA(D),U=J;if(E==="="&&U)E="";if(F=Q.includePrerelease?"-0":"",Y)if(E===">"||E==="<")I="<0.0.0-0";else I="*";else if(E&&U){if(N)g=0;if(D=0,E===">")if(E=">=",N)C=+C+1,g=0,D=0;else g=+g+1,D=0;else if(E==="<=")if(E="<",N)C=+C+1;else g=+g+1;I=E+C+"."+g+"."+D+F}else if(N)I=">="+C+".0.0"+F+" <"+(+C+1)+".0.0"+F;else if(J)I=">="+C+"."+g+".0"+F+" <"+C+"."+(+g+1)+".0"+F;return r("xRange return",I),I})}function c3(A,Q){return r("replaceStars",A,Q),A.trim().replace(s[R.STAR],"")}function u3(A,Q,B,I,E,C,g,D,F,Y,N,J,U){if(nA(B))Q="";else if(nA(I))Q=">="+B+".0.0";else if(nA(E))Q=">="+B+"."+I+".0";else Q=">="+Q;if(nA(F))D="";else if(nA(Y))D="<"+(+F+1)+".0.0";else if(nA(N))D="<"+F+"."+(+Y+1)+".0";else if(J)D="<="+F+"."+Y+"."+N+"-"+J;else D="<="+D;return(Q+" "+D).trim()}GA.prototype.test=function(A){if(!A)return!1;if(typeof A==="string")try{A=new f(A,this.options)}catch(B){return!1}for(var Q=0;Q0){var E=A[I].semver;if(E.major===Q.major&&E.minor===Q.minor&&E.patch===Q.patch)return!0}}return!1}return!0}q.satisfies=sg;function sg(A,Q,B){try{Q=new GA(Q,B)}catch(I){return!1}return Q.test(A)}q.maxSatisfying=p3;function p3(A,Q,B){var I=null,E=null;try{var C=new GA(Q,B)}catch(g){return null}return A.forEach(function(g){if(C.test(g)){if(!I||E.compare(g)===-1)I=g,E=new f(I,B)}}),I}q.minSatisfying=l3;function l3(A,Q,B){var I=null,E=null;try{var C=new GA(Q,B)}catch(g){return null}return A.forEach(function(g){if(C.test(g)){if(!I||E.compare(g)===1)I=g,E=new f(I,B)}}),I}q.minVersion=i3;function i3(A,Q){A=new GA(A,Q);var B=new f("0.0.0");if(A.test(B))return B;if(B=new f("0.0.0-0"),A.test(B))return B;B=null;for(var I=0;I":if(g.prerelease.length===0)g.patch++;else g.prerelease.push(0);g.raw=g.format();case"":case">=":if(!B||eE(B,g))B=g;break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+C.operator)}})}if(B&&A.test(B))return B;return null}q.validRange=n3;function n3(A,Q){try{return new GA(A,Q).range||"*"}catch(B){return null}}q.ltr=a3;function a3(A,Q,B){return RN(A,Q,"<",B)}q.gtr=o3;function o3(A,Q,B){return RN(A,Q,">",B)}q.outside=RN;function RN(A,Q,B,I){A=new f(A,I),Q=new GA(Q,I);var E,C,g,D,F;switch(B){case">":E=eE,C=GN,g=ag,D=">",F=">=";break;case"<":E=ag,C=UN,g=eE,D="<",F="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sg(A,Q,I))return!1;for(var Y=0;Y=0.0.0");if(J=J||w,U=U||w,E(w.semver,J.semver,I))J=w;else if(g(w.semver,U.semver,I))U=w}),J.operator===D||J.operator===F)return!1;if((!U.operator||U.operator===D)&&C(A,U.semver))return!1;else if(U.operator===F&&g(A,U.semver))return!1}return!0}q.prerelease=s3;function s3(A,Q){var B=RI(A,Q);return B&&B.prerelease.length?B.prerelease:null}q.intersects=r3;function r3(A,Q,B){return A=new GA(A,B),Q=new GA(Q,B),A.intersects(Q)}q.coerce=t3;function t3(A,Q){if(A instanceof f)return A;if(typeof A==="number")A=String(A);if(typeof A!=="string")return null;Q=Q||{};var B=null;if(!Q.rtl)B=A.match(s[R.COERCE]);else{var I;while((I=s[R.COERCERTL].exec(A))&&(!B||B.index+B[0].length!==A.length)){if(!B||I.index+I[0].length!==B.index+B[0].length)B=I;s[R.COERCERTL].lastIndex=I.index+I[1].length+I[2].length}s[R.COERCERTL].lastIndex=-1}if(B===null)return null;return RI(B[2]+"."+(B[3]||"0")+"."+(B[4]||"0"),Q)}});var EL=L((vA,LN)=>{var e3=vA&&vA.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),A6=vA&&vA.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),Q6=vA&&vA.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))e3(Q,A,B)}return A6(Q,A),Q},B6=vA&&vA.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(vA,"__esModule",{value:!0});vA._readLinuxVersionFile=vA._getOsVersion=vA._findMatch=void 0;var BL=Q6(wN()),MN=JI(),IL=G("os"),I6=G("child_process"),rg=G("fs");function E6(A,Q,B,I){return B6(this,void 0,void 0,function*(){let E=IL.platform(),C,g,D;for(let F of B){let Y=F.version;if(MN.debug(`check ${Y} satisfies ${A}`),BL.satisfies(Y,A)&&(!Q||F.stable===Q)){if(D=F.files.find((N)=>{MN.debug(`${N.arch}===${I} && ${N.platform}===${E}`);let J=N.arch===I&&N.platform===E;if(J&&N.platform_version){let U=LN.exports._getOsVersion();if(U===N.platform_version)J=!0;else J=BL.satisfies(U,N.platform_version)}return J}),D){MN.debug(`matched ${F.version}`),g=F;break}}}if(g&&D)C=Object.assign({},g),C.files=[D];return C})}vA._findMatch=E6;function C6(){let A=IL.platform(),Q="";if(A==="darwin")Q=I6.execSync("sw_vers -productVersion").toString();else if(A==="linux"){let B=LN.exports._readLinuxVersionFile();if(B){let I=B.split("\n");for(let E of I){let C=E.split("=");if(C.length===2&&(C[0].trim()==="VERSION_ID"||C[0].trim()==="DISTRIB_RELEASE")){Q=C[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return Q}vA._getOsVersion=C6;function g6(){let B="";if(rg.existsSync("/etc/lsb-release"))B=rg.readFileSync("/etc/lsb-release").toString();else if(rg.existsSync("/etc/os-release"))B=rg.readFileSync("/etc/os-release").toString();return B}vA._readLinuxVersionFile=g6});var gL=L((gj,CL)=>{var D6=G("crypto");CL.exports=function A(){return D6.randomBytes(16)}});var NL=L((Dj,FL)=>{var DL=[];for(QC=0;QC<256;++QC)DL[QC]=(QC+256).toString(16).substr(1);var QC;function F6(A,Q){var B=Q||0,I=DL;return[I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]]].join("")}FL.exports=F6});var JL=L((Fj,YL)=>{var N6=gL(),Y6=NL();function J6(A,Q,B){var I=Q&&B||0;if(typeof A=="string")Q=A==="binary"?new Array(16):null,A=null;A=A||{};var E=A.random||(A.rng||N6)();if(E[6]=E[6]&15|64,E[8]=E[8]&63|128,Q)for(var C=0;C<16;++C)Q[I+C]=E[C];return Q||Y6(E)}YL.exports=J6});var wL=L((kQ)=>{var U6=kQ&&kQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),G6=kQ&&kQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),R6=kQ&&kQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))U6(Q,A,B)}return G6(Q,A),Q},UL=kQ&&kQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(kQ,"__esModule",{value:!0});kQ.RetryHelper=void 0;var GL=R6(JI());class RL{constructor(A,Q,B){if(A<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=A,this.minSeconds=Math.floor(Q),this.maxSeconds=Math.floor(B),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(A,Q){return UL(this,void 0,void 0,function*(){let B=1;while(BsetTimeout(Q,A*1000))})}}kQ.RetryHelper=RL});var SL=L((v)=>{var __dirname="/home/andrea/code/haskell/haskell-actions/ghcup/node_modules/@actions/tool-cache/lib",w6=v&&v.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),M6=v&&v.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),FB=v&&v.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))w6(Q,A,B)}return M6(Q,A),Q},aA=v&&v.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},L6=v&&v.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(v,"__esModule",{value:!0});v.evaluateVersions=v.isExplicitVersion=v.findFromManifest=v.getManifestFromRepo=v.findAllVersions=v.find=v.cacheFile=v.cacheDir=v.extractZip=v.extractXar=v.extractTar=v.extract7z=v.downloadTool=v.HTTPError=void 0;var i=FB(JI()),SQ=FB(BN()),_Q=FB(G("fs")),V6=FB(EL()),BC=FB(G("os")),uQ=FB(G("path")),ML=FB(aF()),HB=FB(wN()),W6=FB(G("stream")),Z6=FB(G("util")),DE=G("assert"),LL=L6(JL()),pB=pg(),X6=wL();class tg extends Error{constructor(A){super(`Unexpected HTTP response: ${A}`);this.httpStatusCode=A,Object.setPrototypeOf(this,new.target.prototype)}}v.HTTPError=tg;var WN=process.platform==="win32",K6=process.platform==="darwin",S6="actions/tool-cache";function z6(A,Q,B,I){return aA(this,void 0,void 0,function*(){Q=Q||uQ.join(KL(),LL.default()),yield SQ.mkdirP(uQ.dirname(Q)),i.debug(`Downloading ${A}`),i.debug(`Destination ${Q}`);let E=3,C=VN("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),g=VN("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new X6.RetryHelper(E,C,g).execute(()=>aA(this,void 0,void 0,function*(){return yield H6(A,Q||"",B,I)}),(F)=>{if(F instanceof tg&&F.httpStatusCode){if(F.httpStatusCode<500&&F.httpStatusCode!==408&&F.httpStatusCode!==429)return!1}return!0})})}v.downloadTool=z6;function H6(A,Q,B,I){return aA(this,void 0,void 0,function*(){if(_Q.existsSync(Q))throw new Error(`Destination file path ${Q} already exists`);let E=new ML.HttpClient(S6,[],{allowRetries:!1});if(B){if(i.debug("set auth"),I===void 0)I={};I.authorization=B}let C=yield E.get(A,I);if(C.message.statusCode!==200){let N=new tg(C.message.statusCode);throw i.debug(`Failed to download from "${A}". Code(${C.message.statusCode}) Message(${C.message.statusMessage})`),N}let g=Z6.promisify(W6.pipeline),F=VN("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>C.message)(),Y=!1;try{return yield g(F,_Q.createWriteStream(Q)),i.debug("download complete"),Y=!0,Q}finally{if(!Y){i.debug("download failed");try{yield SQ.rmRF(Q)}catch(N){i.debug(`Failed to delete '${Q}'. ${N.message}`)}}}})}function x6(A,Q,B){return aA(this,void 0,void 0,function*(){DE.ok(WN,"extract7z() not supported on current OS"),DE.ok(A,'parameter "file" is required'),Q=yield eg(Q);let I=process.cwd();if(process.chdir(Q),B)try{let C=["x",i.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",A],g={silent:!0};yield pB.exec(`"${B}"`,C,g)}finally{process.chdir(I)}else{let E=uQ.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,""),C=A.replace(/'/g,"''").replace(/"|\n|\r/g,""),g=Q.replace(/'/g,"''").replace(/"|\n|\r/g,""),F=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${E}' -Source '${C}' -Target '${g}'`],Y={silent:!0};try{let N=yield SQ.which("powershell",!0);yield pB.exec(`"${N}"`,F,Y)}finally{process.chdir(I)}}return Q})}v.extract7z=x6;function j6(A,Q,B="xz"){return aA(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'file' is required");Q=yield eg(Q),i.debug("Checking tar --version");let I="";yield pB.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:(F)=>I+=F.toString(),stderr:(F)=>I+=F.toString()}}),i.debug(I.trim());let E=I.toUpperCase().includes("GNU TAR"),C;if(B instanceof Array)C=B;else C=[B];if(i.isDebug()&&!B.includes("v"))C.push("-v");let g=Q,D=A;if(WN&&E)C.push("--force-local"),g=Q.replace(/\\/g,"/"),D=A.replace(/\\/g,"/");if(E)C.push("--warning=no-unknown-keyword"),C.push("--overwrite");return C.push("-C",g,"-f",D),yield pB.exec("tar",C),Q})}v.extractTar=j6;function T6(A,Q,B=[]){return aA(this,void 0,void 0,function*(){DE.ok(K6,"extractXar() not supported on current OS"),DE.ok(A,'parameter "file" is required'),Q=yield eg(Q);let I;if(B instanceof Array)I=B;else I=[B];if(I.push("-x","-C",Q,"-f",A),i.isDebug())I.push("-v");let E=yield SQ.which("xar",!0);return yield pB.exec(`"${E}"`,f6(I)),Q})}v.extractXar=T6;function $6(A,Q){return aA(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'file' is required");if(Q=yield eg(Q),WN)yield h6(A,Q);else yield y6(A,Q);return Q})}v.extractZip=$6;function h6(A,Q){return aA(this,void 0,void 0,function*(){let B=A.replace(/'/g,"''").replace(/"|\n|\r/g,""),I=Q.replace(/'/g,"''").replace(/"|\n|\r/g,""),E=yield SQ.which("pwsh",!1);if(E){let g=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${B}', '${I}', \$true) }`,`catch { if ((\$_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or (\$_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${B}' -DestinationPath '${I}' -Force } else { throw \$_ } } ;`].join(" ")];i.debug(`Using pwsh at path: ${E}`),yield pB.exec(`"${E}"`,g)}else{let g=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${B}' -DestinationPath '${I}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${B}', '${I}', \$true) }`].join(" ")],D=yield SQ.which("powershell",!0);i.debug(`Using powershell at path: ${D}`),yield pB.exec(`"${D}"`,g)}})}function y6(A,Q){return aA(this,void 0,void 0,function*(){let B=yield SQ.which("unzip",!0),I=[A];if(!i.isDebug())I.unshift("-q");I.unshift("-o"),yield pB.exec(`"${B}"`,I,{cwd:Q})})}function q6(A,Q,B,I){return aA(this,void 0,void 0,function*(){if(B=HB.clean(B)||B,I=I||BC.arch(),i.debug(`Caching tool ${Q} ${B} ${I}`),i.debug(`source dir: ${A}`),!_Q.statSync(A).isDirectory())throw new Error("sourceDir is not a directory");let E=yield WL(Q,B,I);for(let C of _Q.readdirSync(A)){let g=uQ.join(A,C);yield SQ.cp(g,E,{recursive:!0})}return ZL(Q,B,I),E})}v.cacheDir=q6;function O6(A,Q,B,I,E){return aA(this,void 0,void 0,function*(){if(I=HB.clean(I)||I,E=E||BC.arch(),i.debug(`Caching tool ${B} ${I} ${E}`),i.debug(`source file: ${A}`),!_Q.statSync(A).isFile())throw new Error("sourceFile is not a file");let C=yield WL(B,I,E),g=uQ.join(C,Q);return i.debug(`destination file ${g}`),yield SQ.cp(A,g),ZL(B,I,E),C})}v.cacheFile=O6;function P6(A,Q,B){if(!A)throw new Error("toolName parameter is required");if(!Q)throw new Error("versionSpec parameter is required");if(B=B||BC.arch(),!ZN(Q)){let E=VL(A,B);Q=XL(E,Q)}let I="";if(Q){Q=HB.clean(Q)||"";let E=uQ.join(AD(),A,Q,B);if(i.debug(`checking cache: ${E}`),_Q.existsSync(E)&&_Q.existsSync(`${E}.complete`))i.debug(`Found tool in cache ${A} ${Q} ${B}`),I=E;else i.debug("not found")}return I}v.find=P6;function VL(A,Q){let B=[];Q=Q||BC.arch();let I=uQ.join(AD(),A);if(_Q.existsSync(I)){let E=_Q.readdirSync(I);for(let C of E)if(ZN(C)){let g=uQ.join(I,C,Q||"");if(_Q.existsSync(g)&&_Q.existsSync(`${g}.complete`))B.push(C)}}return B}v.findAllVersions=VL;function k6(A,Q,B,I="master"){return aA(this,void 0,void 0,function*(){let E=[],C=`https://api.github.com/repos/${A}/${Q}/git/trees/${I}`,g=new ML.HttpClient("tool-cache"),D={};if(B)i.debug("set auth"),D.authorization=B;let F=yield g.getJson(C,D);if(!F.result)return E;let Y="";for(let J of F.result.tree)if(J.path==="versions-manifest.json"){Y=J.url;break}D.accept="application/vnd.github.VERSION.raw";let N=yield(yield g.get(Y,D)).readBody();if(N){N=N.replace(/^\uFEFF/,"");try{E=JSON.parse(N)}catch(J){i.debug("Invalid json")}}return E})}v.getManifestFromRepo=k6;function _6(A,Q,B,I=BC.arch()){return aA(this,void 0,void 0,function*(){return yield V6._findMatch(A,Q,B,I)})}v.findFromManifest=_6;function eg(A){return aA(this,void 0,void 0,function*(){if(!A)A=uQ.join(KL(),LL.default());return yield SQ.mkdirP(A),A})}function WL(A,Q,B){return aA(this,void 0,void 0,function*(){let I=uQ.join(AD(),A,HB.clean(Q)||Q,B||"");i.debug(`destination ${I}`);let E=`${I}.complete`;return yield SQ.rmRF(I),yield SQ.rmRF(E),yield SQ.mkdirP(I),I})}function ZL(A,Q,B){let E=`${uQ.join(AD(),A,HB.clean(Q)||Q,B||"")}.complete`;_Q.writeFileSync(E,""),i.debug("finished caching tool")}function ZN(A){let Q=HB.clean(A)||"";i.debug(`isExplicit: ${Q}`);let B=HB.valid(Q)!=null;return i.debug(`explicit? ${B}`),B}v.isExplicitVersion=ZN;function XL(A,Q){let B="";i.debug(`evaluating ${A.length} versions`),A=A.sort((I,E)=>{if(HB.gt(I,E))return 1;return-1});for(let I=A.length-1;I>=0;I--){let E=A[I];if(HB.satisfies(E,Q)){B=E;break}}if(B)i.debug(`matched: ${B}`);else i.debug("match not found");return B}v.evaluateVersions=XL;function AD(){let A=process.env.RUNNER_TOOL_CACHE||"";return DE.ok(A,"Expected RUNNER_TOOL_CACHE to be defined"),A}function KL(){let A=process.env.RUNNER_TEMP||"";return DE.ok(A,"Expected RUNNER_TEMP to be defined"),A}function VN(A,Q){let B=global[A];return B!==void 0?B:Q}function f6(A){return Array.from(new Set(A))}});var QD=CC(SL(),1),oA=CC(JI(),1),BD=CC(pg(),1);import*as XN from"path";import{chmod as v6}from"fs/promises";var KN=oA.platform.isWindows?".exe":"",b6=new Map([["arm64","aarch64"],["arm","armv7"],["ia32","i386"],["x64","x86_64"]]),m6=new Map([["darwin","apple-darwin"],["linux","linux"],["win32","mingw64"]]);function c6(A,Q,B){if(A=="latest")return`https://downloads.haskell.org/ghcup/${Q}-${B}-ghcup${KN}`;else return`https://downloads.haskell.org/ghcup/${A}/${Q}-${B}-ghcup-${A}${KN}`}async function u6(A){let Q=QD.default.find("ghcup",A);if(Q)return Q;else{let B=b6.get(oA.platform.arch);if(B==null)throw`GHCup does not support architecture ${oA.platform.arch}`;let I=m6.get(oA.platform.platform);if(I==null)throw`GHCup does not support platform ${oA.platform.platform}`;let E=c6(A,B,I),C=process.env.RUNNER_TEMP||"",g=`ghcup${KN}`,D=XN.join(C,g),F=await QD.default.downloadTool(E,D);if(oA.platform.isLinux||oA.platform.isMacOS)await v6(F,"0765");let Y=await QD.default.cacheFile(F,g,"ghcup",A);return oA.default.addPath(Y),XN.join(Y,g)}}async function zL(A){let Q=await u6(A.version);oA.default.debug(`ghcup is at ${Q}`);var{stdout:I}=await BD.default.getExecOutput(Q,["--numeric-version"]);let B=I.trim();oA.default.setOutput("version",B),oA.default.setOutput("path",Q);var{stdout:I}=await BD.default.getExecOutput(Q,["whereis","bindir"]);let E=I.trim();oA.default.debug(`ghcup bindir is ${E}`),oA.default.addPath(E);for(let C in A.extra_release_channels)await BD.default.exec(Q,["config","add-release-channel",C])}var ID=CC(JI(),1);try{zL({version:ID.default.getInput("version"),extra_release_channels:ID.default.getMultilineInput("extra-release-channels")})}catch(A){ID.default.setFailed(A.message)} + Error Message: ${C.message}`)})).result)===null||Q===void 0?void 0:Q.value;if(!E)throw new Error("Response json body do not have ID Token field");return E})}static getIDToken(A){return ZM(this,void 0,void 0,function*(){try{let Q=QE.getIDTokenUrl();if(A){let I=encodeURIComponent(A);Q=`${Q}&audience=${I}`}XM.debug(`ID token url is ${Q}`);let B=yield QE.getCall(Q);return XM.setSecret(B),B}catch(Q){throw new Error(`Error message: ${Q.message}`)}})}}BE.OidcClient=QE});var tF=L((CQ)=>{var sF=CQ&&CQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(CQ,"__esModule",{value:!0});CQ.summary=CQ.markdownSummary=CQ.SUMMARY_DOCS_URL=CQ.SUMMARY_ENV_VAR=void 0;var IH=G("os"),rF=G("fs"),{access:EH,appendFile:CH,writeFile:gH}=rF.promises;CQ.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";CQ.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class SM{constructor(){this._buffer=""}filePath(){return sF(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let A=process.env[CQ.SUMMARY_ENV_VAR];if(!A)throw new Error(`Unable to find environment variable for \$${CQ.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield EH(A,rF.constants.R_OK|rF.constants.W_OK)}catch(Q){throw new Error(`Unable to access summary file: '${A}'. Check if the file has correct read/write permissions.`)}return this._filePath=A,this._filePath})}wrap(A,Q,B={}){let I=Object.entries(B).map(([E,C])=>` ${E}="${C}"`).join("");if(!Q)return`<${A}${I}>`;return`<${A}${I}>${Q}`}write(A){return sF(this,void 0,void 0,function*(){let Q=!!(A===null||A===void 0?void 0:A.overwrite),B=yield this.filePath();return yield(Q?gH:CH)(B,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return sF(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(A,Q=!1){return this._buffer+=A,Q?this.addEOL():this}addEOL(){return this.addRaw(IH.EOL)}addCodeBlock(A,Q){let B=Object.assign({},Q&&{lang:Q}),I=this.wrap("pre",this.wrap("code",A),B);return this.addRaw(I).addEOL()}addList(A,Q=!1){let B=Q?"ol":"ul",I=A.map((C)=>this.wrap("li",C)).join(""),E=this.wrap(B,I);return this.addRaw(E).addEOL()}addTable(A){let Q=A.map((I)=>{let E=I.map((C)=>{if(typeof C==="string")return this.wrap("td",C);let{header:g,data:D,colspan:F,rowspan:Y}=C,N=g?"th":"td",J=Object.assign(Object.assign({},F&&{colspan:F}),Y&&{rowspan:Y});return this.wrap(N,D,J)}).join("");return this.wrap("tr",E)}).join(""),B=this.wrap("table",Q);return this.addRaw(B).addEOL()}addDetails(A,Q){let B=this.wrap("details",this.wrap("summary",A)+Q);return this.addRaw(B).addEOL()}addImage(A,Q,B){let{width:I,height:E}=B||{},C=Object.assign(Object.assign({},I&&{width:I}),E&&{height:E}),g=this.wrap("img",null,Object.assign({src:A,alt:Q},C));return this.addRaw(g).addEOL()}addHeading(A,Q){let B=`h${Q}`,I=["h1","h2","h3","h4","h5","h6"].includes(B)?B:"h1",E=this.wrap(I,A);return this.addRaw(E).addEOL()}addSeparator(){let A=this.wrap("hr",null);return this.addRaw(A).addEOL()}addBreak(){let A=this.wrap("br",null);return this.addRaw(A).addEOL()}addQuote(A,Q){let B=Object.assign({},Q&&{cite:Q}),I=this.wrap("blockquote",A,B);return this.addRaw(I).addEOL()}addLink(A,Q){let B=this.wrap("a",A,{href:Q});return this.addRaw(B).addEOL()}}var zM=new SM;CQ.markdownSummary=zM;CQ.summary=zM});var HM=L((gQ)=>{var DH=gQ&&gQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),FH=gQ&&gQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),NH=gQ&&gQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))DH(Q,A,B)}return FH(Q,A),Q};Object.defineProperty(gQ,"__esModule",{value:!0});gQ.toPlatformPath=gQ.toWin32Path=gQ.toPosixPath=void 0;var YH=NH(G("path"));function JH(A){return A.replace(/[\\]/g,"/")}gQ.toPosixPath=JH;function UH(A){return A.replace(/[/]/g,"\\")}gQ.toWin32Path=UH;function GH(A){return A.replace(/[/\\]/g,YH.sep)}gQ.toPlatformPath=GH});var AN=L((z)=>{var RH=z&&z.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),wH=z&&z.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),jM=z&&z.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))RH(Q,A,B)}return wH(Q,A),Q},eF=z&&z.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},DQ;Object.defineProperty(z,"__esModule",{value:!0});z.getCmdPath=z.tryGetExecutablePath=z.isRooted=z.isDirectory=z.exists=z.READONLY=z.UV_FS_O_EXLOCK=z.IS_WINDOWS=z.unlink=z.symlink=z.stat=z.rmdir=z.rm=z.rename=z.readlink=z.readdir=z.open=z.mkdir=z.lstat=z.copyFile=z.chmod=void 0;var TM=jM(G("fs")),cg=jM(G("path"));DQ=TM.promises,z.chmod=DQ.chmod,z.copyFile=DQ.copyFile,z.lstat=DQ.lstat,z.mkdir=DQ.mkdir,z.open=DQ.open,z.readdir=DQ.readdir,z.readlink=DQ.readlink,z.rename=DQ.rename,z.rm=DQ.rm,z.rmdir=DQ.rmdir,z.stat=DQ.stat,z.symlink=DQ.symlink,z.unlink=DQ.unlink;z.IS_WINDOWS=process.platform==="win32";z.UV_FS_O_EXLOCK=268435456;z.READONLY=TM.constants.O_RDONLY;function MH(A){return eF(this,void 0,void 0,function*(){try{yield z.stat(A)}catch(Q){if(Q.code==="ENOENT")return!1;throw Q}return!0})}z.exists=MH;function LH(A,Q=!1){return eF(this,void 0,void 0,function*(){return(Q?yield z.stat(A):yield z.lstat(A)).isDirectory()})}z.isDirectory=LH;function VH(A){if(A=ZH(A),!A)throw new Error('isRooted() parameter "p" cannot be empty');if(z.IS_WINDOWS)return A.startsWith("\\")||/^[A-Z]:/i.test(A);return A.startsWith("/")}z.isRooted=VH;function WH(A,Q){return eF(this,void 0,void 0,function*(){let B=void 0;try{B=yield z.stat(A)}catch(E){if(E.code!=="ENOENT")console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${E}`)}if(B&&B.isFile()){if(z.IS_WINDOWS){let E=cg.extname(A).toUpperCase();if(Q.some((C)=>C.toUpperCase()===E))return A}else if(xM(B))return A}let I=A;for(let E of Q){A=I+E,B=void 0;try{B=yield z.stat(A)}catch(C){if(C.code!=="ENOENT")console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${C}`)}if(B&&B.isFile()){if(z.IS_WINDOWS){try{let C=cg.dirname(A),g=cg.basename(A).toUpperCase();for(let D of yield z.readdir(C))if(g===D.toUpperCase()){A=cg.join(C,D);break}}catch(C){console.log(`Unexpected error attempting to determine the actual case of the file '${A}': ${C}`)}return A}else if(xM(B))return A}}return""})}z.tryGetExecutablePath=WH;function ZH(A){if(A=A||"",z.IS_WINDOWS)return A=A.replace(/\//g,"\\"),A.replace(/\\\\+/g,"\\");return A.replace(/\/\/+/g,"/")}function xM(A){return(A.mode&1)>0||(A.mode&8)>0&&A.gid===process.getgid()||(A.mode&64)>0&&A.uid===process.getuid()}function XH(){var A;return(A=process.env.COMSPEC)!==null&&A!==void 0?A:"cmd.exe"}z.getCmdPath=XH});var BN=L((LA)=>{var KH=LA&&LA.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),SH=LA&&LA.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),$M=LA&&LA.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))KH(Q,A,B)}return SH(Q,A),Q},dB=LA&&LA.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(LA,"__esModule",{value:!0});LA.findInPath=LA.which=LA.mkdirP=LA.rmRF=LA.mv=LA.cp=void 0;var zH=G("assert"),gB=$M(G("path")),o=$M(AN());function HH(A,Q,B={}){return dB(this,void 0,void 0,function*(){let{force:I,recursive:E,copySourceDirectory:C}=jH(B),g=(yield o.exists(Q))?yield o.stat(Q):null;if(g&&g.isFile()&&!I)return;let D=g&&g.isDirectory()&&C?gB.join(Q,gB.basename(A)):Q;if(!(yield o.exists(A)))throw new Error(`no such file or directory: ${A}`);if((yield o.stat(A)).isDirectory())if(!E)throw new Error(`Failed to copy. ${A} is a directory, but tried to copy without recursive flag.`);else yield OM(A,D,0,I);else{if(gB.relative(A,D)==="")throw new Error(`'${D}' and '${A}' are the same file`);yield PM(A,D,I)}})}LA.cp=HH;function xH(A,Q,B={}){return dB(this,void 0,void 0,function*(){if(yield o.exists(Q)){let I=!0;if(yield o.isDirectory(Q))Q=gB.join(Q,gB.basename(A)),I=yield o.exists(Q);if(I)if(B.force==null||B.force)yield hM(Q);else throw new Error("Destination already exists")}yield QN(gB.dirname(Q)),yield o.rename(A,Q)})}LA.mv=xH;function hM(A){return dB(this,void 0,void 0,function*(){if(o.IS_WINDOWS){if(/[*"<>|]/.test(A))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{yield o.rm(A,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(Q){throw new Error(`File was unable to be removed ${Q}`)}})}LA.rmRF=hM;function QN(A){return dB(this,void 0,void 0,function*(){zH.ok(A,"a path argument must be provided"),yield o.mkdir(A,{recursive:!0})})}LA.mkdirP=QN;function yM(A,Q){return dB(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");if(Q){let I=yield yM(A,!1);if(!I)if(o.IS_WINDOWS)throw new Error(`Unable to locate executable file: ${A}. 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.`);else throw new Error(`Unable to locate executable file: ${A}. 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 I}let B=yield qM(A);if(B&&B.length>0)return B[0];return""})}LA.which=yM;function qM(A){return dB(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");let Q=[];if(o.IS_WINDOWS&&process.env.PATHEXT){for(let E of process.env.PATHEXT.split(gB.delimiter))if(E)Q.push(E)}if(o.isRooted(A)){let E=yield o.tryGetExecutablePath(A,Q);if(E)return[E];return[]}if(A.includes(gB.sep))return[];let B=[];if(process.env.PATH){for(let E of process.env.PATH.split(gB.delimiter))if(E)B.push(E)}let I=[];for(let E of B){let C=yield o.tryGetExecutablePath(gB.join(E,A),Q);if(C)I.push(C)}return I})}LA.findInPath=qM;function jH(A){let Q=A.force==null?!0:A.force,B=Boolean(A.recursive),I=A.copySourceDirectory==null?!0:Boolean(A.copySourceDirectory);return{force:Q,recursive:B,copySourceDirectory:I}}function OM(A,Q,B,I){return dB(this,void 0,void 0,function*(){if(B>=255)return;B++,yield QN(Q);let E=yield o.readdir(A);for(let C of E){let g=`${A}/${C}`,D=`${Q}/${C}`;if((yield o.lstat(g)).isDirectory())yield OM(g,D,B,I);else yield PM(g,D,I)}yield o.chmod(Q,(yield o.stat(A)).mode)})}function PM(A,Q,B){return dB(this,void 0,void 0,function*(){if((yield o.lstat(A)).isSymbolicLink()){try{yield o.lstat(Q),yield o.unlink(Q)}catch(E){if(E.code==="EPERM")yield o.chmod(Q,"0666"),yield o.unlink(Q)}let I=yield o.readlink(A);yield o.symlink(I,Q,o.IS_WINDOWS?"junction":null)}else if(!(yield o.exists(Q))||B)yield o.copyFile(A,Q)})}});var bM=L((FQ)=>{var TH=FQ&&FQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),$H=FQ&&FQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),IE=FQ&&FQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))TH(Q,A,B)}return $H(Q,A),Q},kM=FQ&&FQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(FQ,"__esModule",{value:!0});FQ.argStringToArray=FQ.ToolRunner=void 0;var ug=IE(G("os")),fM=IE(G("events")),hH=IE(G("child_process")),yH=IE(G("path")),qH=IE(BN()),_M=IE(AN()),OH=G("timers"),dg=process.platform==="win32";class vM extends fM.EventEmitter{constructor(A,Q,B){super();if(!A)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=A,this.args=Q||[],this.options=B||{}}_debug(A){if(this.options.listeners&&this.options.listeners.debug)this.options.listeners.debug(A)}_getCommandString(A,Q){let B=this._getSpawnFileName(),I=this._getSpawnArgs(A),E=Q?"":"[command]";if(dg)if(this._isCmdFile()){E+=B;for(let C of I)E+=` ${C}`}else if(A.windowsVerbatimArguments){E+=`"${B}"`;for(let C of I)E+=` ${C}`}else{E+=this._windowsQuoteCmdArg(B);for(let C of I)E+=` ${this._windowsQuoteCmdArg(C)}`}else{E+=B;for(let C of I)E+=` ${C}`}return E}_processLineBuffer(A,Q,B){try{let I=Q+A.toString(),E=I.indexOf(ug.EOL);while(E>-1){let C=I.substring(0,E);B(C),I=I.substring(E+ug.EOL.length),E=I.indexOf(ug.EOL)}return I}catch(I){return this._debug(`error processing line. Failed with error ${I}`),""}}_getSpawnFileName(){if(dg){if(this._isCmdFile())return process.env.COMSPEC||"cmd.exe"}return this.toolPath}_getSpawnArgs(A){if(dg){if(this._isCmdFile()){let Q=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let B of this.args)Q+=" ",Q+=A.windowsVerbatimArguments?B:this._windowsQuoteCmdArg(B);return Q+='"',[Q]}}return this.args}_endsWith(A,Q){return A.endsWith(Q)}_isCmdFile(){let A=this.toolPath.toUpperCase();return this._endsWith(A,".CMD")||this._endsWith(A,".BAT")}_windowsQuoteCmdArg(A){if(!this._isCmdFile())return this._uvQuoteCmdArg(A);if(!A)return'""';let Q=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],B=!1;for(let C of A)if(Q.some((g)=>g===C)){B=!0;break}if(!B)return A;let I='"',E=!0;for(let C=A.length;C>0;C--)if(I+=A[C-1],E&&A[C-1]==="\\")I+="\\";else if(A[C-1]==='"')E=!0,I+='"';else E=!1;return I+='"',I.split("").reverse().join("")}_uvQuoteCmdArg(A){if(!A)return'""';if(!A.includes(" ")&&!A.includes("\t")&&!A.includes('"'))return A;if(!A.includes('"')&&!A.includes("\\"))return`"${A}"`;let Q='"',B=!0;for(let I=A.length;I>0;I--)if(Q+=A[I-1],B&&A[I-1]==="\\")Q+="\\";else if(A[I-1]==='"')B=!0,Q+="\\";else B=!1;return Q+='"',Q.split("").reverse().join("")}_cloneExecOptions(A){A=A||{};let Q={cwd:A.cwd||process.cwd(),env:A.env||process.env,silent:A.silent||!1,windowsVerbatimArguments:A.windowsVerbatimArguments||!1,failOnStdErr:A.failOnStdErr||!1,ignoreReturnCode:A.ignoreReturnCode||!1,delay:A.delay||1e4};return Q.outStream=A.outStream||process.stdout,Q.errStream=A.errStream||process.stderr,Q}_getSpawnOptions(A,Q){A=A||{};let B={};if(B.cwd=A.cwd,B.env=A.env,B.windowsVerbatimArguments=A.windowsVerbatimArguments||this._isCmdFile(),A.windowsVerbatimArguments)B.argv0=`"${Q}"`;return B}exec(){return kM(this,void 0,void 0,function*(){if(!_M.isRooted(this.toolPath)&&(this.toolPath.includes("/")||dg&&this.toolPath.includes("\\")))this.toolPath=yH.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath);return this.toolPath=yield qH.which(this.toolPath,!0),new Promise((A,Q)=>kM(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let F of this.args)this._debug(` ${F}`);let B=this._cloneExecOptions(this.options);if(!B.silent&&B.outStream)B.outStream.write(this._getCommandString(B)+ug.EOL);let I=new IN(B,this.toolPath);if(I.on("debug",(F)=>{this._debug(F)}),this.options.cwd&&!(yield _M.exists(this.options.cwd)))return Q(new Error(`The cwd: ${this.options.cwd} does not exist!`));let E=this._getSpawnFileName(),C=hH.spawn(E,this._getSpawnArgs(B),this._getSpawnOptions(this.options,E)),g="";if(C.stdout)C.stdout.on("data",(F)=>{if(this.options.listeners&&this.options.listeners.stdout)this.options.listeners.stdout(F);if(!B.silent&&B.outStream)B.outStream.write(F);g=this._processLineBuffer(F,g,(Y)=>{if(this.options.listeners&&this.options.listeners.stdline)this.options.listeners.stdline(Y)})});let D="";if(C.stderr)C.stderr.on("data",(F)=>{if(I.processStderr=!0,this.options.listeners&&this.options.listeners.stderr)this.options.listeners.stderr(F);if(!B.silent&&B.errStream&&B.outStream)(B.failOnStdErr?B.errStream:B.outStream).write(F);D=this._processLineBuffer(F,D,(Y)=>{if(this.options.listeners&&this.options.listeners.errline)this.options.listeners.errline(Y)})});if(C.on("error",(F)=>{I.processError=F.message,I.processExited=!0,I.processClosed=!0,I.CheckComplete()}),C.on("exit",(F)=>{I.processExitCode=F,I.processExited=!0,this._debug(`Exit code ${F} received from tool '${this.toolPath}'`),I.CheckComplete()}),C.on("close",(F)=>{I.processExitCode=F,I.processExited=!0,I.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),I.CheckComplete()}),I.on("done",(F,Y)=>{if(g.length>0)this.emit("stdline",g);if(D.length>0)this.emit("errline",D);if(C.removeAllListeners(),F)Q(F);else A(Y)}),this.options.input){if(!C.stdin)throw new Error("child process missing stdin");C.stdin.end(this.options.input)}}))})}}FQ.ToolRunner=vM;function PH(A){let Q=[],B=!1,I=!1,E="";function C(g){if(I&&g!=='"')E+="\\";E+=g,I=!1}for(let g=0;g0)Q.push(E),E="";continue}C(D)}if(E.length>0)Q.push(E.trim());return Q}FQ.argStringToArray=PH;class IN extends fM.EventEmitter{constructor(A,Q){super();if(this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!Q)throw new Error("toolPath must not be empty");if(this.options=A,this.toolPath=Q,A.delay)this.delay=A.delay}CheckComplete(){if(this.done)return;if(this.processClosed)this._setResult();else if(this.processExited)this.timeout=OH.setTimeout(IN.HandleTimeout,this.delay,this)}_debug(A){this.emit("debug",A)}_setResult(){let A;if(this.processExited){if(this.processError)A=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}`);else if(this.processExitCode!==0&&!this.options.ignoreReturnCode)A=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);else if(this.processStderr&&this.options.failOnStdErr)A=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}if(this.timeout)clearTimeout(this.timeout),this.timeout=null;this.done=!0,this.emit("done",A,this.processExitCode)}static HandleTimeout(A){if(A.done)return;if(!A.processClosed&&A.processExited){let Q=`The STDIO streams did not close within ${A.delay/1000} seconds of the exit event from process '${A.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;A._debug(Q)}A._setResult()}}});var pg=L((NQ)=>{var kH=NQ&&NQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),_H=NQ&&NQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),fH=NQ&&NQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))kH(Q,A,B)}return _H(Q,A),Q},uM=NQ&&NQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(NQ,"__esModule",{value:!0});NQ.getExecOutput=NQ.exec=void 0;var mM=G("string_decoder"),cM=fH(bM());function dM(A,Q,B){return uM(this,void 0,void 0,function*(){let I=cM.argStringToArray(A);if(I.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let E=I[0];return Q=I.slice(1).concat(Q||[]),new cM.ToolRunner(E,Q,B).exec()})}NQ.exec=dM;function vH(A,Q,B){var I,E;return uM(this,void 0,void 0,function*(){let C="",g="",D=new mM.StringDecoder("utf8"),F=new mM.StringDecoder("utf8"),Y=(I=B===null||B===void 0?void 0:B.listeners)===null||I===void 0?void 0:I.stdout,N=(E=B===null||B===void 0?void 0:B.listeners)===null||E===void 0?void 0:E.stderr,J=(V)=>{if(g+=F.write(V),N)N(V)},U=(V)=>{if(C+=D.write(V),Y)Y(V)},w=Object.assign(Object.assign({},B===null||B===void 0?void 0:B.listeners),{stdout:U,stderr:J}),M=yield dM(A,Q,Object.assign(Object.assign({},B),{listeners:w}));return C+=D.end(),g+=F.end(),{exitCode:M,stdout:C,stderr:g}})}NQ.getExecOutput=vH});var lM=L((l)=>{var bH=l&&l.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),mH=l&&l.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),cH=l&&l.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))bH(Q,A,B)}return mH(Q,A),Q},ig=l&&l.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},uH=l&&l.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(l,"__esModule",{value:!0});l.getDetails=l.isLinux=l.isMacOS=l.isWindows=l.arch=l.platform=void 0;var pM=uH(G("os")),lg=cH(pg()),dH=()=>ig(void 0,void 0,void 0,function*(){let{stdout:A}=yield lg.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:Q}=yield lg.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:Q.trim(),version:A.trim()}}),pH=()=>ig(void 0,void 0,void 0,function*(){var A,Q,B,I;let{stdout:E}=yield lg.getExecOutput("sw_vers",void 0,{silent:!0}),C=(Q=(A=E.match(/ProductVersion:\s*(.+)/))===null||A===void 0?void 0:A[1])!==null&&Q!==void 0?Q:"";return{name:(I=(B=E.match(/ProductName:\s*(.+)/))===null||B===void 0?void 0:B[1])!==null&&I!==void 0?I:"",version:C}}),lH=()=>ig(void 0,void 0,void 0,function*(){let{stdout:A}=yield lg.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[Q,B]=A.trim().split("\n");return{name:Q,version:B}});l.platform=pM.default.platform();l.arch=pM.default.arch();l.isWindows=l.platform==="win32";l.isMacOS=l.platform==="darwin";l.isLinux=l.platform==="linux";function iH(){return ig(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield l.isWindows?dH():l.isMacOS?pH():lH()),{platform:l.platform,arch:l.arch,isWindows:l.isWindows,isMacOS:l.isMacOS,isLinux:l.isLinux})})}l.getDetails=iH});var JI=L((S)=>{var nH=S&&S.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;var E=Object.getOwnPropertyDescriptor(Q,B);if(!E||("get"in E?!Q.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return Q[B]}};Object.defineProperty(A,I,E)}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),aH=S&&S.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),CN=S&&S.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.prototype.hasOwnProperty.call(A,B))nH(Q,A,B)}return aH(Q,A),Q},iM=S&&S.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.platform=S.toPlatformPath=S.toWin32Path=S.toPosixPath=S.markdownSummary=S.summary=S.getIDToken=S.getState=S.saveState=S.group=S.endGroup=S.startGroup=S.info=S.notice=S.warning=S.error=S.debug=S.isDebug=S.setFailed=S.setCommandEcho=S.setOutput=S.getBooleanInput=S.getMultilineInput=S.getInput=S.addPath=S.setSecret=S.exportVariable=S.ExitCode=void 0;var OQ=hN(),UI=ON(),EE=gC(),nM=CN(G("os")),oH=CN(G("path")),sH=KM(),EN;(function(A){A[A.Success=0]="Success",A[A.Failure=1]="Failure"})(EN||(S.ExitCode=EN={}));function rH(A,Q){let B=EE.toCommandValue(Q);if(process.env[A]=B,process.env.GITHUB_ENV||"")return UI.issueFileCommand("ENV",UI.prepareKeyValueMessage(A,Q));OQ.issueCommand("set-env",{name:A},B)}S.exportVariable=rH;function tH(A){OQ.issueCommand("add-mask",{},A)}S.setSecret=tH;function eH(A){if(process.env.GITHUB_PATH||"")UI.issueFileCommand("PATH",A);else OQ.issueCommand("add-path",{},A);process.env.PATH=`${A}${oH.delimiter}${process.env.PATH}`}S.addPath=eH;function gN(A,Q){let B=process.env[`INPUT_${A.replace(/ /g,"_").toUpperCase()}`]||"";if(Q&&Q.required&&!B)throw new Error(`Input required and not supplied: ${A}`);if(Q&&Q.trimWhitespace===!1)return B;return B.trim()}S.getInput=gN;function A3(A,Q){let B=gN(A,Q).split("\n").filter((I)=>I!=="");if(Q&&Q.trimWhitespace===!1)return B;return B.map((I)=>I.trim())}S.getMultilineInput=A3;function Q3(A,Q){let B=["true","True","TRUE"],I=["false","False","FALSE"],E=gN(A,Q);if(B.includes(E))return!0;if(I.includes(E))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${A}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)}S.getBooleanInput=Q3;function B3(A,Q){if(process.env.GITHUB_OUTPUT||"")return UI.issueFileCommand("OUTPUT",UI.prepareKeyValueMessage(A,Q));process.stdout.write(nM.EOL),OQ.issueCommand("set-output",{name:A},EE.toCommandValue(Q))}S.setOutput=B3;function I3(A){OQ.issue("echo",A?"on":"off")}S.setCommandEcho=I3;function E3(A){process.exitCode=EN.Failure,aM(A)}S.setFailed=E3;function C3(){return process.env.RUNNER_DEBUG==="1"}S.isDebug=C3;function g3(A){OQ.issueCommand("debug",{},A)}S.debug=g3;function aM(A,Q={}){OQ.issueCommand("error",EE.toCommandProperties(Q),A instanceof Error?A.toString():A)}S.error=aM;function D3(A,Q={}){OQ.issueCommand("warning",EE.toCommandProperties(Q),A instanceof Error?A.toString():A)}S.warning=D3;function F3(A,Q={}){OQ.issueCommand("notice",EE.toCommandProperties(Q),A instanceof Error?A.toString():A)}S.notice=F3;function N3(A){process.stdout.write(A+nM.EOL)}S.info=N3;function oM(A){OQ.issue("group",A)}S.startGroup=oM;function sM(){OQ.issue("endgroup")}S.endGroup=sM;function Y3(A,Q){return iM(this,void 0,void 0,function*(){oM(A);let B;try{B=yield Q()}finally{sM()}return B})}S.group=Y3;function J3(A,Q){if(process.env.GITHUB_STATE||"")return UI.issueFileCommand("STATE",UI.prepareKeyValueMessage(A,Q));OQ.issueCommand("save-state",{name:A},EE.toCommandValue(Q))}S.saveState=J3;function U3(A){return process.env[`STATE_${A}`]||""}S.getState=U3;function G3(A){return iM(this,void 0,void 0,function*(){return yield sH.OidcClient.getIDToken(A)})}S.getIDToken=G3;var R3=tF();Object.defineProperty(S,"summary",{enumerable:!0,get:function(){return R3.summary}});var w3=tF();Object.defineProperty(S,"markdownSummary",{enumerable:!0,get:function(){return w3.markdownSummary}});var DN=HM();Object.defineProperty(S,"toPosixPath",{enumerable:!0,get:function(){return DN.toPosixPath}});Object.defineProperty(S,"toWin32Path",{enumerable:!0,get:function(){return DN.toWin32Path}});Object.defineProperty(S,"toPlatformPath",{enumerable:!0,get:function(){return DN.toPlatformPath}});S.platform=CN(lM())});var wN=L((q,QL)=>{q=QL.exports=f;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG))r=function(){var A=Array.prototype.slice.call(arguments,0);A.unshift("SEMVER"),console.log.apply(console,A)};else r=function(){};q.SEMVER_SPEC_VERSION="2.0.0";var tE=256,ng=Number.MAX_SAFE_INTEGER||9007199254740991,FN=16,M3=tE-6,CE=q.re=[],s=q.safeRe=[],W=q.src=[],R=q.tokens={},eM=0;function m(A){R[A]=eM++}var YN="[a-zA-Z0-9-]",NN=[["\\s",1],["\\d",tE],[YN,M3]];function AC(A){for(var Q=0;Q)?=?)";m("XRANGEIDENTIFIERLOOSE");W[R.XRANGEIDENTIFIERLOOSE]=W[R.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";m("XRANGEIDENTIFIER");W[R.XRANGEIDENTIFIER]=W[R.NUMERICIDENTIFIER]+"|x|X|\\*";m("XRANGEPLAIN");W[R.XRANGEPLAIN]="[v=\\s]*("+W[R.XRANGEIDENTIFIER]+")(?:\\.("+W[R.XRANGEIDENTIFIER]+")(?:\\.("+W[R.XRANGEIDENTIFIER]+")(?:"+W[R.PRERELEASE]+")?"+W[R.BUILD]+"?)?)?";m("XRANGEPLAINLOOSE");W[R.XRANGEPLAINLOOSE]="[v=\\s]*("+W[R.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+W[R.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+W[R.XRANGEIDENTIFIERLOOSE]+")(?:"+W[R.PRERELEASELOOSE]+")?"+W[R.BUILD]+"?)?)?";m("XRANGE");W[R.XRANGE]="^"+W[R.GTLT]+"\\s*"+W[R.XRANGEPLAIN]+"$";m("XRANGELOOSE");W[R.XRANGELOOSE]="^"+W[R.GTLT]+"\\s*"+W[R.XRANGEPLAINLOOSE]+"$";m("COERCE");W[R.COERCE]="(^|[^\\d])(\\d{1,"+FN+"})(?:\\.(\\d{1,"+FN+"}))?(?:\\.(\\d{1,"+FN+"}))?(?:$|[^\\d])";m("COERCERTL");CE[R.COERCERTL]=new RegExp(W[R.COERCE],"g");s[R.COERCERTL]=new RegExp(AC(W[R.COERCE]),"g");m("LONETILDE");W[R.LONETILDE]="(?:~>?)";m("TILDETRIM");W[R.TILDETRIM]="(\\s*)"+W[R.LONETILDE]+"\\s+";CE[R.TILDETRIM]=new RegExp(W[R.TILDETRIM],"g");s[R.TILDETRIM]=new RegExp(AC(W[R.TILDETRIM]),"g");var L3="$1~";m("TILDE");W[R.TILDE]="^"+W[R.LONETILDE]+W[R.XRANGEPLAIN]+"$";m("TILDELOOSE");W[R.TILDELOOSE]="^"+W[R.LONETILDE]+W[R.XRANGEPLAINLOOSE]+"$";m("LONECARET");W[R.LONECARET]="(?:\\^)";m("CARETTRIM");W[R.CARETTRIM]="(\\s*)"+W[R.LONECARET]+"\\s+";CE[R.CARETTRIM]=new RegExp(W[R.CARETTRIM],"g");s[R.CARETTRIM]=new RegExp(AC(W[R.CARETTRIM]),"g");var V3="$1^";m("CARET");W[R.CARET]="^"+W[R.LONECARET]+W[R.XRANGEPLAIN]+"$";m("CARETLOOSE");W[R.CARETLOOSE]="^"+W[R.LONECARET]+W[R.XRANGEPLAINLOOSE]+"$";m("COMPARATORLOOSE");W[R.COMPARATORLOOSE]="^"+W[R.GTLT]+"\\s*("+W[R.LOOSEPLAIN]+")$|^$";m("COMPARATOR");W[R.COMPARATOR]="^"+W[R.GTLT]+"\\s*("+W[R.FULLPLAIN]+")$|^$";m("COMPARATORTRIM");W[R.COMPARATORTRIM]="(\\s*)"+W[R.GTLT]+"\\s*("+W[R.LOOSEPLAIN]+"|"+W[R.XRANGEPLAIN]+")";CE[R.COMPARATORTRIM]=new RegExp(W[R.COMPARATORTRIM],"g");s[R.COMPARATORTRIM]=new RegExp(AC(W[R.COMPARATORTRIM]),"g");var W3="$1$2$3";m("HYPHENRANGE");W[R.HYPHENRANGE]="^\\s*("+W[R.XRANGEPLAIN]+")\\s+-\\s+("+W[R.XRANGEPLAIN]+")\\s*$";m("HYPHENRANGELOOSE");W[R.HYPHENRANGELOOSE]="^\\s*("+W[R.XRANGEPLAINLOOSE]+")\\s+-\\s+("+W[R.XRANGEPLAINLOOSE]+")\\s*$";m("STAR");W[R.STAR]="(<|>)?=?\\s*\\*";for(DB=0;DBtE)return null;var B=Q.loose?s[R.LOOSE]:s[R.FULL];if(!B.test(A))return null;try{return new f(A,Q)}catch(I){return null}}q.valid=Z3;function Z3(A,Q){var B=RI(A,Q);return B?B.version:null}q.clean=X3;function X3(A,Q){var B=RI(A.trim().replace(/^[=v]+/,""),Q);return B?B.version:null}q.SemVer=f;function f(A,Q){if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};if(A instanceof f)if(A.loose===Q.loose)return A;else A=A.version;else if(typeof A!=="string")throw new TypeError("Invalid Version: "+A);if(A.length>tE)throw new TypeError("version is longer than "+tE+" characters");if(!(this instanceof f))return new f(A,Q);r("SemVer",A,Q),this.options=Q,this.loose=!!Q.loose;var B=A.trim().match(Q.loose?s[R.LOOSE]:s[R.FULL]);if(!B)throw new TypeError("Invalid Version: "+A);if(this.raw=A,this.major=+B[1],this.minor=+B[2],this.patch=+B[3],this.major>ng||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ng||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ng||this.patch<0)throw new TypeError("Invalid patch version");if(!B[4])this.prerelease=[];else this.prerelease=B[4].split(".").map(function(I){if(/^[0-9]+$/.test(I)){var E=+I;if(E>=0&&E=0)if(typeof this.prerelease[B]==="number")this.prerelease[B]++,B=-2;if(B===-1)this.prerelease.push(0)}if(Q)if(this.prerelease[0]===Q){if(isNaN(this.prerelease[1]))this.prerelease=[Q,0]}else this.prerelease=[Q,0];break;default:throw new Error("invalid increment argument: "+A)}return this.format(),this.raw=this.version,this};q.inc=K3;function K3(A,Q,B,I){if(typeof B==="string")I=B,B=void 0;try{return new f(A,B).inc(Q,I).version}catch(E){return null}}q.diff=S3;function S3(A,Q){if(JN(A,Q))return null;else{var B=RI(A),I=RI(Q),E="";if(B.prerelease.length||I.prerelease.length){E="pre";var C="prerelease"}for(var g in B)if(g==="major"||g==="minor"||g==="patch"){if(B[g]!==I[g])return E+g}return C}}q.compareIdentifiers=GI;var rM=/^[0-9]+$/;function GI(A,Q){var B=rM.test(A),I=rM.test(Q);if(B&&I)A=+A,Q=+Q;return A===Q?0:B&&!I?-1:I&&!B?1:A0}q.lt=ag;function ag(A,Q,B){return zB(A,Q,B)<0}q.eq=JN;function JN(A,Q,B){return zB(A,Q,B)===0}q.neq=AL;function AL(A,Q,B){return zB(A,Q,B)!==0}q.gte=UN;function UN(A,Q,B){return zB(A,Q,B)>=0}q.lte=GN;function GN(A,Q,B){return zB(A,Q,B)<=0}q.cmp=og;function og(A,Q,B,I){switch(Q){case"===":if(typeof A==="object")A=A.version;if(typeof B==="object")B=B.version;return A===B;case"!==":if(typeof A==="object")A=A.version;if(typeof B==="object")B=B.version;return A!==B;case"":case"=":case"==":return JN(A,B,I);case"!=":return AL(A,B,I);case">":return eE(A,B,I);case">=":return UN(A,B,I);case"<":return ag(A,B,I);case"<=":return GN(A,B,I);default:throw new TypeError("Invalid operator: "+Q)}}q.Comparator=PQ;function PQ(A,Q){if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};if(A instanceof PQ)if(A.loose===!!Q.loose)return A;else A=A.value;if(!(this instanceof PQ))return new PQ(A,Q);if(A=A.trim().split(/\s+/).join(" "),r("comparator",A,Q),this.options=Q,this.loose=!!Q.loose,this.parse(A),this.semver===gE)this.value="";else this.value=this.operator+this.semver.version;r("comp",this)}var gE={};PQ.prototype.parse=function(A){var Q=this.options.loose?s[R.COMPARATORLOOSE]:s[R.COMPARATOR],B=A.match(Q);if(!B)throw new TypeError("Invalid comparator: "+A);if(this.operator=B[1]!==void 0?B[1]:"",this.operator==="=")this.operator="";if(!B[2])this.semver=gE;else this.semver=new f(B[2],this.options.loose)};PQ.prototype.toString=function(){return this.value};PQ.prototype.test=function(A){if(r("Comparator.test",A,this.options.loose),this.semver===gE||A===gE)return!0;if(typeof A==="string")try{A=new f(A,this.options)}catch(Q){return!1}return og(A,this.operator,this.semver,this.options)};PQ.prototype.intersects=function(A,Q){if(!(A instanceof PQ))throw new TypeError("a Comparator is required");if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};var B;if(this.operator===""){if(this.value==="")return!0;return B=new GA(A.value,Q),sg(this.value,B,Q)}else if(A.operator===""){if(A.value==="")return!0;return B=new GA(this.value,Q),sg(A.semver,B,Q)}var I=(this.operator===">="||this.operator===">")&&(A.operator===">="||A.operator===">"),E=(this.operator==="<="||this.operator==="<")&&(A.operator==="<="||A.operator==="<"),C=this.semver.version===A.semver.version,g=(this.operator===">="||this.operator==="<=")&&(A.operator===">="||A.operator==="<="),D=og(this.semver,"<",A.semver,Q)&&((this.operator===">="||this.operator===">")&&(A.operator==="<="||A.operator==="<")),F=og(this.semver,">",A.semver,Q)&&((this.operator==="<="||this.operator==="<")&&(A.operator===">="||A.operator===">"));return I||E||C&&g||D||F};q.Range=GA;function GA(A,Q){if(!Q||typeof Q!=="object")Q={loose:!!Q,includePrerelease:!1};if(A instanceof GA)if(A.loose===!!Q.loose&&A.includePrerelease===!!Q.includePrerelease)return A;else return new GA(A.raw,Q);if(A instanceof PQ)return new GA(A.value,Q);if(!(this instanceof GA))return new GA(A,Q);if(this.options=Q,this.loose=!!Q.loose,this.includePrerelease=!!Q.includePrerelease,this.raw=A.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(B){return this.parseRange(B.trim())},this).filter(function(B){return B.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}GA.prototype.format=function(){return this.range=this.set.map(function(A){return A.join(" ").trim()}).join("||").trim(),this.range};GA.prototype.toString=function(){return this.range};GA.prototype.parseRange=function(A){var Q=this.options.loose,B=Q?s[R.HYPHENRANGELOOSE]:s[R.HYPHENRANGE];A=A.replace(B,u3),r("hyphen replace",A),A=A.replace(s[R.COMPARATORTRIM],W3),r("comparator trim",A,s[R.COMPARATORTRIM]),A=A.replace(s[R.TILDETRIM],L3),A=A.replace(s[R.CARETTRIM],V3),A=A.split(/\s+/).join(" ");var I=Q?s[R.COMPARATORLOOSE]:s[R.COMPARATOR],E=A.split(" ").map(function(C){return P3(C,this.options)},this).join(" ").split(/\s+/);if(this.options.loose)E=E.filter(function(C){return!!C.match(I)});return E=E.map(function(C){return new PQ(C,this.options)},this),E};GA.prototype.intersects=function(A,Q){if(!(A instanceof GA))throw new TypeError("a Range is required");return this.set.some(function(B){return tM(B,Q)&&A.set.some(function(I){return tM(I,Q)&&B.every(function(E){return I.every(function(C){return E.intersects(C,Q)})})})})};function tM(A,Q){var B=!0,I=A.slice(),E=I.pop();while(B&&I.length)B=I.every(function(C){return E.intersects(C,Q)}),E=I.pop();return B}q.toComparators=O3;function O3(A,Q){return new GA(A,Q).set.map(function(B){return B.map(function(I){return I.value}).join(" ").trim().split(" ")})}function P3(A,Q){return r("comp",A,Q),A=f3(A,Q),r("caret",A),A=k3(A,Q),r("tildes",A),A=b3(A,Q),r("xrange",A),A=c3(A,Q),r("stars",A),A}function nA(A){return!A||A.toLowerCase()==="x"||A==="*"}function k3(A,Q){return A.trim().split(/\s+/).map(function(B){return _3(B,Q)}).join(" ")}function _3(A,Q){var B=Q.loose?s[R.TILDELOOSE]:s[R.TILDE];return A.replace(B,function(I,E,C,g,D){r("tilde",A,I,E,C,g,D);var F;if(nA(E))F="";else if(nA(C))F=">="+E+".0.0 <"+(+E+1)+".0.0";else if(nA(g))F=">="+E+"."+C+".0 <"+E+"."+(+C+1)+".0";else if(D)r("replaceTilde pr",D),F=">="+E+"."+C+"."+g+"-"+D+" <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+"."+g+" <"+E+"."+(+C+1)+".0";return r("tilde return",F),F})}function f3(A,Q){return A.trim().split(/\s+/).map(function(B){return v3(B,Q)}).join(" ")}function v3(A,Q){r("caret",A,Q);var B=Q.loose?s[R.CARETLOOSE]:s[R.CARET];return A.replace(B,function(I,E,C,g,D){r("caret",A,I,E,C,g,D);var F;if(nA(E))F="";else if(nA(C))F=">="+E+".0.0 <"+(+E+1)+".0.0";else if(nA(g))if(E==="0")F=">="+E+"."+C+".0 <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+".0 <"+(+E+1)+".0.0";else if(D)if(r("replaceCaret pr",D),E==="0")if(C==="0")F=">="+E+"."+C+"."+g+"-"+D+" <"+E+"."+C+"."+(+g+1);else F=">="+E+"."+C+"."+g+"-"+D+" <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+"."+g+"-"+D+" <"+(+E+1)+".0.0";else if(r("no pr"),E==="0")if(C==="0")F=">="+E+"."+C+"."+g+" <"+E+"."+C+"."+(+g+1);else F=">="+E+"."+C+"."+g+" <"+E+"."+(+C+1)+".0";else F=">="+E+"."+C+"."+g+" <"+(+E+1)+".0.0";return r("caret return",F),F})}function b3(A,Q){return r("replaceXRanges",A,Q),A.split(/\s+/).map(function(B){return m3(B,Q)}).join(" ")}function m3(A,Q){A=A.trim();var B=Q.loose?s[R.XRANGELOOSE]:s[R.XRANGE];return A.replace(B,function(I,E,C,g,D,F){r("xRange",A,I,E,C,g,D,F);var Y=nA(C),N=Y||nA(g),J=N||nA(D),U=J;if(E==="="&&U)E="";if(F=Q.includePrerelease?"-0":"",Y)if(E===">"||E==="<")I="<0.0.0-0";else I="*";else if(E&&U){if(N)g=0;if(D=0,E===">")if(E=">=",N)C=+C+1,g=0,D=0;else g=+g+1,D=0;else if(E==="<=")if(E="<",N)C=+C+1;else g=+g+1;I=E+C+"."+g+"."+D+F}else if(N)I=">="+C+".0.0"+F+" <"+(+C+1)+".0.0"+F;else if(J)I=">="+C+"."+g+".0"+F+" <"+C+"."+(+g+1)+".0"+F;return r("xRange return",I),I})}function c3(A,Q){return r("replaceStars",A,Q),A.trim().replace(s[R.STAR],"")}function u3(A,Q,B,I,E,C,g,D,F,Y,N,J,U){if(nA(B))Q="";else if(nA(I))Q=">="+B+".0.0";else if(nA(E))Q=">="+B+"."+I+".0";else Q=">="+Q;if(nA(F))D="";else if(nA(Y))D="<"+(+F+1)+".0.0";else if(nA(N))D="<"+F+"."+(+Y+1)+".0";else if(J)D="<="+F+"."+Y+"."+N+"-"+J;else D="<="+D;return(Q+" "+D).trim()}GA.prototype.test=function(A){if(!A)return!1;if(typeof A==="string")try{A=new f(A,this.options)}catch(B){return!1}for(var Q=0;Q0){var E=A[I].semver;if(E.major===Q.major&&E.minor===Q.minor&&E.patch===Q.patch)return!0}}return!1}return!0}q.satisfies=sg;function sg(A,Q,B){try{Q=new GA(Q,B)}catch(I){return!1}return Q.test(A)}q.maxSatisfying=p3;function p3(A,Q,B){var I=null,E=null;try{var C=new GA(Q,B)}catch(g){return null}return A.forEach(function(g){if(C.test(g)){if(!I||E.compare(g)===-1)I=g,E=new f(I,B)}}),I}q.minSatisfying=l3;function l3(A,Q,B){var I=null,E=null;try{var C=new GA(Q,B)}catch(g){return null}return A.forEach(function(g){if(C.test(g)){if(!I||E.compare(g)===1)I=g,E=new f(I,B)}}),I}q.minVersion=i3;function i3(A,Q){A=new GA(A,Q);var B=new f("0.0.0");if(A.test(B))return B;if(B=new f("0.0.0-0"),A.test(B))return B;B=null;for(var I=0;I":if(g.prerelease.length===0)g.patch++;else g.prerelease.push(0);g.raw=g.format();case"":case">=":if(!B||eE(B,g))B=g;break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+C.operator)}})}if(B&&A.test(B))return B;return null}q.validRange=n3;function n3(A,Q){try{return new GA(A,Q).range||"*"}catch(B){return null}}q.ltr=a3;function a3(A,Q,B){return RN(A,Q,"<",B)}q.gtr=o3;function o3(A,Q,B){return RN(A,Q,">",B)}q.outside=RN;function RN(A,Q,B,I){A=new f(A,I),Q=new GA(Q,I);var E,C,g,D,F;switch(B){case">":E=eE,C=GN,g=ag,D=">",F=">=";break;case"<":E=ag,C=UN,g=eE,D="<",F="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sg(A,Q,I))return!1;for(var Y=0;Y=0.0.0");if(J=J||w,U=U||w,E(w.semver,J.semver,I))J=w;else if(g(w.semver,U.semver,I))U=w}),J.operator===D||J.operator===F)return!1;if((!U.operator||U.operator===D)&&C(A,U.semver))return!1;else if(U.operator===F&&g(A,U.semver))return!1}return!0}q.prerelease=s3;function s3(A,Q){var B=RI(A,Q);return B&&B.prerelease.length?B.prerelease:null}q.intersects=r3;function r3(A,Q,B){return A=new GA(A,B),Q=new GA(Q,B),A.intersects(Q)}q.coerce=t3;function t3(A,Q){if(A instanceof f)return A;if(typeof A==="number")A=String(A);if(typeof A!=="string")return null;Q=Q||{};var B=null;if(!Q.rtl)B=A.match(s[R.COERCE]);else{var I;while((I=s[R.COERCERTL].exec(A))&&(!B||B.index+B[0].length!==A.length)){if(!B||I.index+I[0].length!==B.index+B[0].length)B=I;s[R.COERCERTL].lastIndex=I.index+I[1].length+I[2].length}s[R.COERCERTL].lastIndex=-1}if(B===null)return null;return RI(B[2]+"."+(B[3]||"0")+"."+(B[4]||"0"),Q)}});var EL=L((vA,LN)=>{var e3=vA&&vA.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),A6=vA&&vA.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),Q6=vA&&vA.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))e3(Q,A,B)}return A6(Q,A),Q},B6=vA&&vA.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(vA,"__esModule",{value:!0});vA._readLinuxVersionFile=vA._getOsVersion=vA._findMatch=void 0;var BL=Q6(wN()),MN=JI(),IL=G("os"),I6=G("child_process"),rg=G("fs");function E6(A,Q,B,I){return B6(this,void 0,void 0,function*(){let E=IL.platform(),C,g,D;for(let F of B){let Y=F.version;if(MN.debug(`check ${Y} satisfies ${A}`),BL.satisfies(Y,A)&&(!Q||F.stable===Q)){if(D=F.files.find((N)=>{MN.debug(`${N.arch}===${I} && ${N.platform}===${E}`);let J=N.arch===I&&N.platform===E;if(J&&N.platform_version){let U=LN.exports._getOsVersion();if(U===N.platform_version)J=!0;else J=BL.satisfies(U,N.platform_version)}return J}),D){MN.debug(`matched ${F.version}`),g=F;break}}}if(g&&D)C=Object.assign({},g),C.files=[D];return C})}vA._findMatch=E6;function C6(){let A=IL.platform(),Q="";if(A==="darwin")Q=I6.execSync("sw_vers -productVersion").toString();else if(A==="linux"){let B=LN.exports._readLinuxVersionFile();if(B){let I=B.split("\n");for(let E of I){let C=E.split("=");if(C.length===2&&(C[0].trim()==="VERSION_ID"||C[0].trim()==="DISTRIB_RELEASE")){Q=C[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return Q}vA._getOsVersion=C6;function g6(){let B="";if(rg.existsSync("/etc/lsb-release"))B=rg.readFileSync("/etc/lsb-release").toString();else if(rg.existsSync("/etc/os-release"))B=rg.readFileSync("/etc/os-release").toString();return B}vA._readLinuxVersionFile=g6});var gL=L((gj,CL)=>{var D6=G("crypto");CL.exports=function A(){return D6.randomBytes(16)}});var NL=L((Dj,FL)=>{var DL=[];for(QC=0;QC<256;++QC)DL[QC]=(QC+256).toString(16).substr(1);var QC;function F6(A,Q){var B=Q||0,I=DL;return[I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],"-",I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]],I[A[B++]]].join("")}FL.exports=F6});var JL=L((Fj,YL)=>{var N6=gL(),Y6=NL();function J6(A,Q,B){var I=Q&&B||0;if(typeof A=="string")Q=A==="binary"?new Array(16):null,A=null;A=A||{};var E=A.random||(A.rng||N6)();if(E[6]=E[6]&15|64,E[8]=E[8]&63|128,Q)for(var C=0;C<16;++C)Q[I+C]=E[C];return Q||Y6(E)}YL.exports=J6});var wL=L((kQ)=>{var U6=kQ&&kQ.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),G6=kQ&&kQ.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),R6=kQ&&kQ.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))U6(Q,A,B)}return G6(Q,A),Q},UL=kQ&&kQ.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})};Object.defineProperty(kQ,"__esModule",{value:!0});kQ.RetryHelper=void 0;var GL=R6(JI());class RL{constructor(A,Q,B){if(A<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=A,this.minSeconds=Math.floor(Q),this.maxSeconds=Math.floor(B),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(A,Q){return UL(this,void 0,void 0,function*(){let B=1;while(BsetTimeout(Q,A*1000))})}}kQ.RetryHelper=RL});var SL=L((v)=>{var __dirname="/home/andrea/code/haskell/haskell-actions/ghcup/node_modules/@actions/tool-cache/lib",w6=v&&v.__createBinding||(Object.create?function(A,Q,B,I){if(I===void 0)I=B;Object.defineProperty(A,I,{enumerable:!0,get:function(){return Q[B]}})}:function(A,Q,B,I){if(I===void 0)I=B;A[I]=Q[B]}),M6=v&&v.__setModuleDefault||(Object.create?function(A,Q){Object.defineProperty(A,"default",{enumerable:!0,value:Q})}:function(A,Q){A.default=Q}),FB=v&&v.__importStar||function(A){if(A&&A.__esModule)return A;var Q={};if(A!=null){for(var B in A)if(B!=="default"&&Object.hasOwnProperty.call(A,B))w6(Q,A,B)}return M6(Q,A),Q},aA=v&&v.__awaiter||function(A,Q,B,I){function E(C){return C instanceof B?C:new B(function(g){g(C)})}return new(B||(B=Promise))(function(C,g){function D(N){try{Y(I.next(N))}catch(J){g(J)}}function F(N){try{Y(I.throw(N))}catch(J){g(J)}}function Y(N){N.done?C(N.value):E(N.value).then(D,F)}Y((I=I.apply(A,Q||[])).next())})},L6=v&&v.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(v,"__esModule",{value:!0});v.evaluateVersions=v.isExplicitVersion=v.findFromManifest=v.getManifestFromRepo=v.findAllVersions=v.find=v.cacheFile=v.cacheDir=v.extractZip=v.extractXar=v.extractTar=v.extract7z=v.downloadTool=v.HTTPError=void 0;var i=FB(JI()),SQ=FB(BN()),_Q=FB(G("fs")),V6=FB(EL()),BC=FB(G("os")),uQ=FB(G("path")),ML=FB(aF()),HB=FB(wN()),W6=FB(G("stream")),Z6=FB(G("util")),DE=G("assert"),LL=L6(JL()),pB=pg(),X6=wL();class tg extends Error{constructor(A){super(`Unexpected HTTP response: ${A}`);this.httpStatusCode=A,Object.setPrototypeOf(this,new.target.prototype)}}v.HTTPError=tg;var WN=process.platform==="win32",K6=process.platform==="darwin",S6="actions/tool-cache";function z6(A,Q,B,I){return aA(this,void 0,void 0,function*(){Q=Q||uQ.join(KL(),LL.default()),yield SQ.mkdirP(uQ.dirname(Q)),i.debug(`Downloading ${A}`),i.debug(`Destination ${Q}`);let E=3,C=VN("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),g=VN("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new X6.RetryHelper(E,C,g).execute(()=>aA(this,void 0,void 0,function*(){return yield H6(A,Q||"",B,I)}),(F)=>{if(F instanceof tg&&F.httpStatusCode){if(F.httpStatusCode<500&&F.httpStatusCode!==408&&F.httpStatusCode!==429)return!1}return!0})})}v.downloadTool=z6;function H6(A,Q,B,I){return aA(this,void 0,void 0,function*(){if(_Q.existsSync(Q))throw new Error(`Destination file path ${Q} already exists`);let E=new ML.HttpClient(S6,[],{allowRetries:!1});if(B){if(i.debug("set auth"),I===void 0)I={};I.authorization=B}let C=yield E.get(A,I);if(C.message.statusCode!==200){let N=new tg(C.message.statusCode);throw i.debug(`Failed to download from "${A}". Code(${C.message.statusCode}) Message(${C.message.statusMessage})`),N}let g=Z6.promisify(W6.pipeline),F=VN("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>C.message)(),Y=!1;try{return yield g(F,_Q.createWriteStream(Q)),i.debug("download complete"),Y=!0,Q}finally{if(!Y){i.debug("download failed");try{yield SQ.rmRF(Q)}catch(N){i.debug(`Failed to delete '${Q}'. ${N.message}`)}}}})}function x6(A,Q,B){return aA(this,void 0,void 0,function*(){DE.ok(WN,"extract7z() not supported on current OS"),DE.ok(A,'parameter "file" is required'),Q=yield eg(Q);let I=process.cwd();if(process.chdir(Q),B)try{let C=["x",i.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",A],g={silent:!0};yield pB.exec(`"${B}"`,C,g)}finally{process.chdir(I)}else{let E=uQ.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,""),C=A.replace(/'/g,"''").replace(/"|\n|\r/g,""),g=Q.replace(/'/g,"''").replace(/"|\n|\r/g,""),F=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${E}' -Source '${C}' -Target '${g}'`],Y={silent:!0};try{let N=yield SQ.which("powershell",!0);yield pB.exec(`"${N}"`,F,Y)}finally{process.chdir(I)}}return Q})}v.extract7z=x6;function j6(A,Q,B="xz"){return aA(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'file' is required");Q=yield eg(Q),i.debug("Checking tar --version");let I="";yield pB.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:(F)=>I+=F.toString(),stderr:(F)=>I+=F.toString()}}),i.debug(I.trim());let E=I.toUpperCase().includes("GNU TAR"),C;if(B instanceof Array)C=B;else C=[B];if(i.isDebug()&&!B.includes("v"))C.push("-v");let g=Q,D=A;if(WN&&E)C.push("--force-local"),g=Q.replace(/\\/g,"/"),D=A.replace(/\\/g,"/");if(E)C.push("--warning=no-unknown-keyword"),C.push("--overwrite");return C.push("-C",g,"-f",D),yield pB.exec("tar",C),Q})}v.extractTar=j6;function T6(A,Q,B=[]){return aA(this,void 0,void 0,function*(){DE.ok(K6,"extractXar() not supported on current OS"),DE.ok(A,'parameter "file" is required'),Q=yield eg(Q);let I;if(B instanceof Array)I=B;else I=[B];if(I.push("-x","-C",Q,"-f",A),i.isDebug())I.push("-v");let E=yield SQ.which("xar",!0);return yield pB.exec(`"${E}"`,f6(I)),Q})}v.extractXar=T6;function $6(A,Q){return aA(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'file' is required");if(Q=yield eg(Q),WN)yield h6(A,Q);else yield y6(A,Q);return Q})}v.extractZip=$6;function h6(A,Q){return aA(this,void 0,void 0,function*(){let B=A.replace(/'/g,"''").replace(/"|\n|\r/g,""),I=Q.replace(/'/g,"''").replace(/"|\n|\r/g,""),E=yield SQ.which("pwsh",!1);if(E){let g=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${B}', '${I}', \$true) }`,`catch { if ((\$_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or (\$_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${B}' -DestinationPath '${I}' -Force } else { throw \$_ } } ;`].join(" ")];i.debug(`Using pwsh at path: ${E}`),yield pB.exec(`"${E}"`,g)}else{let g=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${B}' -DestinationPath '${I}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${B}', '${I}', \$true) }`].join(" ")],D=yield SQ.which("powershell",!0);i.debug(`Using powershell at path: ${D}`),yield pB.exec(`"${D}"`,g)}})}function y6(A,Q){return aA(this,void 0,void 0,function*(){let B=yield SQ.which("unzip",!0),I=[A];if(!i.isDebug())I.unshift("-q");I.unshift("-o"),yield pB.exec(`"${B}"`,I,{cwd:Q})})}function q6(A,Q,B,I){return aA(this,void 0,void 0,function*(){if(B=HB.clean(B)||B,I=I||BC.arch(),i.debug(`Caching tool ${Q} ${B} ${I}`),i.debug(`source dir: ${A}`),!_Q.statSync(A).isDirectory())throw new Error("sourceDir is not a directory");let E=yield WL(Q,B,I);for(let C of _Q.readdirSync(A)){let g=uQ.join(A,C);yield SQ.cp(g,E,{recursive:!0})}return ZL(Q,B,I),E})}v.cacheDir=q6;function O6(A,Q,B,I,E){return aA(this,void 0,void 0,function*(){if(I=HB.clean(I)||I,E=E||BC.arch(),i.debug(`Caching tool ${B} ${I} ${E}`),i.debug(`source file: ${A}`),!_Q.statSync(A).isFile())throw new Error("sourceFile is not a file");let C=yield WL(B,I,E),g=uQ.join(C,Q);return i.debug(`destination file ${g}`),yield SQ.cp(A,g),ZL(B,I,E),C})}v.cacheFile=O6;function P6(A,Q,B){if(!A)throw new Error("toolName parameter is required");if(!Q)throw new Error("versionSpec parameter is required");if(B=B||BC.arch(),!ZN(Q)){let E=VL(A,B);Q=XL(E,Q)}let I="";if(Q){Q=HB.clean(Q)||"";let E=uQ.join(AD(),A,Q,B);if(i.debug(`checking cache: ${E}`),_Q.existsSync(E)&&_Q.existsSync(`${E}.complete`))i.debug(`Found tool in cache ${A} ${Q} ${B}`),I=E;else i.debug("not found")}return I}v.find=P6;function VL(A,Q){let B=[];Q=Q||BC.arch();let I=uQ.join(AD(),A);if(_Q.existsSync(I)){let E=_Q.readdirSync(I);for(let C of E)if(ZN(C)){let g=uQ.join(I,C,Q||"");if(_Q.existsSync(g)&&_Q.existsSync(`${g}.complete`))B.push(C)}}return B}v.findAllVersions=VL;function k6(A,Q,B,I="master"){return aA(this,void 0,void 0,function*(){let E=[],C=`https://api.github.com/repos/${A}/${Q}/git/trees/${I}`,g=new ML.HttpClient("tool-cache"),D={};if(B)i.debug("set auth"),D.authorization=B;let F=yield g.getJson(C,D);if(!F.result)return E;let Y="";for(let J of F.result.tree)if(J.path==="versions-manifest.json"){Y=J.url;break}D.accept="application/vnd.github.VERSION.raw";let N=yield(yield g.get(Y,D)).readBody();if(N){N=N.replace(/^\uFEFF/,"");try{E=JSON.parse(N)}catch(J){i.debug("Invalid json")}}return E})}v.getManifestFromRepo=k6;function _6(A,Q,B,I=BC.arch()){return aA(this,void 0,void 0,function*(){return yield V6._findMatch(A,Q,B,I)})}v.findFromManifest=_6;function eg(A){return aA(this,void 0,void 0,function*(){if(!A)A=uQ.join(KL(),LL.default());return yield SQ.mkdirP(A),A})}function WL(A,Q,B){return aA(this,void 0,void 0,function*(){let I=uQ.join(AD(),A,HB.clean(Q)||Q,B||"");i.debug(`destination ${I}`);let E=`${I}.complete`;return yield SQ.rmRF(I),yield SQ.rmRF(E),yield SQ.mkdirP(I),I})}function ZL(A,Q,B){let E=`${uQ.join(AD(),A,HB.clean(Q)||Q,B||"")}.complete`;_Q.writeFileSync(E,""),i.debug("finished caching tool")}function ZN(A){let Q=HB.clean(A)||"";i.debug(`isExplicit: ${Q}`);let B=HB.valid(Q)!=null;return i.debug(`explicit? ${B}`),B}v.isExplicitVersion=ZN;function XL(A,Q){let B="";i.debug(`evaluating ${A.length} versions`),A=A.sort((I,E)=>{if(HB.gt(I,E))return 1;return-1});for(let I=A.length-1;I>=0;I--){let E=A[I];if(HB.satisfies(E,Q)){B=E;break}}if(B)i.debug(`matched: ${B}`);else i.debug("match not found");return B}v.evaluateVersions=XL;function AD(){let A=process.env.RUNNER_TOOL_CACHE||"";return DE.ok(A,"Expected RUNNER_TOOL_CACHE to be defined"),A}function KL(){let A=process.env.RUNNER_TEMP||"";return DE.ok(A,"Expected RUNNER_TEMP to be defined"),A}function VN(A,Q){let B=global[A];return B!==void 0?B:Q}function f6(A){return Array.from(new Set(A))}});var QD=CC(SL(),1),oA=CC(JI(),1),BD=CC(pg(),1);import*as XN from"path";import{chmod as v6}from"fs/promises";var KN=oA.platform.isWindows?".exe":"",b6=new Map([["arm64","aarch64"],["arm","armv7"],["ia32","i386"],["x64","x86_64"]]),m6=new Map([["darwin","apple-darwin"],["linux","linux"],["win32","mingw64"]]);function c6(A,Q,B){if(A=="latest")return`https://downloads.haskell.org/ghcup/${Q}-${B}-ghcup${KN}`;else return`https://downloads.haskell.org/ghcup/${A}/${Q}-${B}-ghcup-${A}${KN}`}async function u6(A){let Q=QD.default.find("ghcup",A);if(Q)return Q;else{let B=b6.get(oA.platform.arch);if(B==null)throw`GHCup does not support architecture ${oA.platform.arch}`;let I=m6.get(oA.platform.platform);if(I==null)throw`GHCup does not support platform ${oA.platform.platform}`;let E=c6(A,B,I),C=process.env.RUNNER_TEMP||"",g=`ghcup${KN}`,D=XN.join(C,g),F=await QD.default.downloadTool(E,D);if(oA.platform.isLinux||oA.platform.isMacOS)await v6(F,"0765");let Y=await QD.default.cacheFile(F,g,"ghcup",A);return oA.default.addPath(Y),XN.join(Y,g)}}async function zL(A){let Q=await u6(A.version);oA.default.debug(`ghcup is at ${Q}`);var{stdout:I}=await BD.default.getExecOutput(Q,["--numeric-version"]);let B=I.trim();oA.default.setOutput("version",B),oA.default.setOutput("path",Q);var{stdout:I}=await BD.default.getExecOutput(Q,["whereis","bindir"]);let E=I.trim();oA.default.debug(`ghcup bindir is ${E}`),oA.default.addPath(E),await BD.default.exec(Q,["config","set","url-source",`'${JSON.stringify(A.release_channels)}'`])}var ID=CC(JI(),1);try{zL({version:ID.default.getInput("version"),release_channels:ID.default.getMultilineInput("release-channels")})}catch(A){ID.default.setFailed(A.message)} diff --git a/ghcup/src/index.ts b/ghcup/src/index.ts index b788f61..0604575 100644 --- a/ghcup/src/index.ts +++ b/ghcup/src/index.ts @@ -4,7 +4,7 @@ import core from "@actions/core"; try { main({ version: core.getInput("version"), - extra_release_channels: core.getMultilineInput("extra-release-channels") + release_channels: core.getMultilineInput("release-channels") }) } catch (error) { core.setFailed((error as Error).message); diff --git a/ghcup/src/main.ts b/ghcup/src/main.ts index 3754d1c..b4328db 100644 --- a/ghcup/src/main.ts +++ b/ghcup/src/main.ts @@ -70,7 +70,7 @@ async function ghcup(version: string) { export type Opts = { version: string, - extra_release_channels: string[] + release_channels: string[] } export async function main(opts: Opts) { @@ -87,7 +87,7 @@ export async function main(opts: Opts) { core.debug(`ghcup bindir is ${bindir}`) core.addPath(bindir); - for (const channel in opts.extra_release_channels) { - await exec.exec(ghcupPath, ['config', 'add-release-channel', channel]); - } + await exec.exec(ghcupPath, [ + 'config', 'set', 'url-source', `'${JSON.stringify(opts.release_channels)}'` + ]); }