varJde=Object.create;varVE=Object.defineProperty;varYde=Object.getOwnPropertyDescriptor;varWde=Object.getOwnPropertyNames;varjde=Object.getPrototypeOf,Kde=Object.prototype.hasOwnProperty;varo=(t,e)=>VE(t,"name",{value:e,configurable:!0});varg=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xde=(t,e)=>{for(varrine)VE(t,r,{get:e[r],enumerable:!0})},Zde=(t,e,r,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letsofWde(e))!Kde.call(t,s)&&s!==r&&VE(t,s,{get:()=>e[s],enumerable:!(n=Yde(e,s))||n.enumerable});returnt};varw=(t,e,r)=>(r=t!=null?Jde(jde(t)):{},Zde(e||!t||!t.__esModule?VE(r,"default",{value:t,enumerable:!0}):r,t));varEH=g(Qd=>{"use strict";varpZe=require("net"),Cfe=require("tls"),Jx=require("http"),hH=require("https"),Ife=require("events"),fZe=require("assert"),Bfe=require("util");Qd.httpOverHttp=bfe;Qd.httpsOverHttp=wfe;Qd.httpOverHttps=Sfe;Qd.httpsOverHttps=Nfe;functionbfe(t){vare=newoa(t);returne.request=Jx.request,e}o(bfe,"httpOverHttp");functionwfe(t){vare=newoa(t);returne.request=Jx.request,e.createSocket=mH,e.defaultPort=443,e}o(wfe,"httpsOverHttp");functionSfe(t){vare=newoa(t);returne.request=hH.request,e}o(Sfe,"httpOverHttps");functionNfe(t){vare=newoa(t);returne.request=hH.request,e.createSocket=mH,e.defaultPort=443,e}o(Nfe,"httpsOverHttps");functionoa(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Jx.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(n,s,i,a){for(varc=gH(s,i,a),l=0,u=e.requests.length;l<u;++l){vard=e.requests[l];if(d.host===c.host&&d.port===c.port){e.requests.splice(l,1),d.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}o(oa,"TunnelingAgent");Bfe.inherits(oa,Ife.EventEmitter);oa.prototype.addRequest=o(function(e,r,n,s){vari=this,a=Yx({request:e},i.options,gH(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);functionl(){i.emit("free",c,a)}o(l,"onFree");functionu(d){i.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}o(u,"onCloseOrRemove")})},"addRequest");oa.prototype.createSocket=o(function(e,r){varn=this,s={};n.sockets.push(s);vari=Yx({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),oc("making CONNECT request");vara=n.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",d),a.end();functionc(A){A.upgrade=!0}o(c,"onResponse");functionl(A,p,f){process.nextTick(function(){u(A,p,f)})}o(l,"onUpgrade");functionu(A,p,f){if(a.removeAllListeners(),p.removeAllListeners(),A.statusCode!==200){oc("tunneling socket could not be established, statusCode=%d",A.statusCode),p.destroy();varh=newError("tunneling socket could not be established, statusCode="+A.statusCode);h.code="ECONNRESET",e.request.emit("error",h),n.removeSocket(s);return}if(f.length>0){oc("got illegal response body from proxy"),p.destroy();varh=newError("got illegal response body from proxy");h.code="ECONNRESET",e.request.emit("error",h),n.removeSocket(s);return}returnoc("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=p,r(p)}o(u,"onConnect");functiond(A){a.removeAllListeners(),oc(`tunneling socket could not be established, cause=%s
`);p.push(m),i+=m.byteLength,h&&(i=null),s=t,n=o(async function*(){for(let y of p)y.stream?yield*y.stream():yield y},"action"),a=`multipart/form-data; boundary=${l}`}else if(Sz(t))s=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(rh.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Vge(t)}if((typeof s=="string"||rh.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:d,done:A}=await l.next();if(A)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!Rz(r)){let p=new Uint8Array(d);p.byteLength&&u.enqueue(p)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:s,length:i},a]}o(_z,"extractBody");function nEe(t,e=!1){return t instanceof ReadableStream&&(XQ(!rh.isDisturbed(t),"The body has already been consumed."),XQ(!t.locked,"The stream is locked.")),_z(t,e)}o(nEe,"safelyExtractBody");function sEe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}o(sEe,"cloneBody");function iEe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(iEe,"throwIfAborted");function oEe(t){return{blob(){return qd(this,r=>{let n=xz(this);return n===null?n="":n&&(n=eEe(n)),new Kge([r],{type:n})},t)},arrayBuffer(){return qd(this,r=>new Uint8Array(r).buffer,t)},text(){return qd(this,Qz,t)},json(){return qd(this,cEe,t)},formData(){return qd(this,r=>{let n=xz(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=tEe(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Nz;return i[Gd]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new Nz;for(let[a,c]of s)i.append(a,c);return i}}throw new TypeError('Content-Typewasnotoneof"multipart/form-data"or"application/x-www-form-urlencoded".')},t)},bytes(){returnqd(this,r=>newUint8Array(r),t)}}}o(oEe,"bodyMixinMethods");functionaEe(t){Object.assign(t.prototype,oEe(t))}o(aEe,"mixinBody");asyncfunctionqd(t,e,r){if(jge.brandCheck(t,r),Pz(t))thrownewTypeError("Body is unusable: Body has already been read");iEe(t[Gd]);letn=Jge(),s=o(a=>n.reject(a),"errorSteps"),i=o(a=>{try{n.resolve(e(a))}catch(c){s(c)}},"successSteps");returnt[Gd].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(awaitYge(t[Gd].body,i,s),n.promise)}o(qd,"consumeBody");functionPz(t){lete=t[Gd].body;returne!=null&&(e.stream.locked||rh.isDisturbed(e.stream))}o(Pz,"bodyUnusable");functioncEe(t){returnJSON.parse(Qz(t))}o(cEe,"parseJSONFromBytes");functionxz(t){lete=t[Gd].headersList,r=Wge(e);returnr==="failure"?null:r}o(xz,"bodyMimeType");kz.exports={extractBody:_z,safelyExtractBody:nEe,cloneBody:sEe,mixinBody:aEe,streamRegistry:vz,hasFinalizationRegistry:Tz,bodyUnusable:Pz}});varjz=g((a7e,Wz)=>{"use strict";varX=require("node:assert"),te=Ce(),{channels:Dz}=Td(),eR=DQ(),{RequestContentLengthMismatchError:_l,ResponseContentLengthMismatchError:Oz,RequestAbortedError:Vz,InvalidArgumentError:lEe,HeadersTimeoutError:uEe,HeadersOverflowError:dEe,SocketError:Vd,InformationalError:zd,BodyTimeoutError:AEe,HTTPParserError:pEe,ResponseExceededMaxSizeError:fEe}=_e(),{kUrl:zz,kReset:pn,kClient:vy,kParser:st,kBlocking:ih,kRunning:zt,kPending:$z,kSize:Mz,kWriting:cc,kQueue:ci,kNoRef:nh,kKeepAliveDefaultTimeout:hEe,kHostHeader:mEe,kPendingIdx:gEe,kRunningIdx:gs,kError:$r,kPipelining:_y,kSocket:kl,kKeepAliveTimeoutValue:ky,kMaxHeadersSize:tR,kKeepAliveMaxTimeout:EEe,kKeepAliveTimeoutThreshold:yEe,kHeadersTimeout:CEe,kBodyTimeout:IEe,kStrictContentLength:sR,kMaxRequests:Lz,kCounter:BEe,kMaxResponseSize:bEe,kOnError:Fz,kResume:Aa,kHTTPContext:Jz}=dt(),Hn=vV(),Uz=Buffer.alloc(0),Qy=Buffer[Symbol.species],Ry=te.addListener,wEe=te.removeAllListeners,Dl=Symbol("kIdleSocketValidation"),Pl=Symbol("kIdleSocketValidationTimeout"),cR=Symbol("kSocketUsed"),rR;asyncfunctionSEe(){lett=process.en
`}return Dz.sendHeaders.hasSubscribers&&Dz.sendHeaders.publish({request:e,headers:m,socket:f}),!l||p===0?Gz(h,null,t,e,f,d,m,A):te.isBuffer(l)?Gz(h,l,t,e,f,d,m,A):te.isBlobLike(l)?typeof l.stream=="function"?Hz(h,l.stream(),t,e,f,d,m,A):PEe(h,l,t,e,f,d,m,A):te.isStream(l)?_Ee(h,l,t,e,f,d,m,A):te.isIterable(l)?Hz(h,l,t,e,f,d,m,A):X(!1),!0}o(vEe,"writeH1");function _Ee(t,e,r,n,s,i,a,c){X(i!==0||r[zt]===0,"stream body cannot be pipelined");let l=!1,u=new Dy({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a}),d=o(function(h){if(!l)try{!u.write(h)&&this.pause&&this.pause()}catch(m){te.destroy(this,m)}},"onData"),A=o(function(){l||e.resume&&e.resume()},"onDrain"),p=o(function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!l){let h=new Vz;queueMicrotask(()=>f(h))}},"onClose"),f=o(function(h){if(!l){if(l=!0,X(s.destroyed||s[cc]&&r[zt]<=1),s.off("drain",A).off("error",f),e.removeListener("data",d).removeListener("end",f).removeListener("close",p),!h)try{u.end()}catch(m){h=m}u.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?te.destroy(e,h):te.destroy(e)}},"onFinished");e.on("data",d).on("end",f).on("error",f).on("close",p),e.resume&&e.resume(),s.on("drain",A).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(p)}o(_Ee,"writeStream");function Gz(t,e,r,n,s,i,a,c){try{e?te.isBuffer(e)&&(X(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${a}content-length:${i}\r
`,"latin1")),n.onRequestSent(),r[Aa]()}catch(l){t(l)}}o(Gz,"writeBuffer");async function PEe(t,e,r,n,s,i,a,c){X(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new _l;let l=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${a}content-length:${i}\r
`,"latin1"),s.write(l),s.uncork(),n.onBodySent(l),n.onRequestSent(),!c&&n.reset!==!1&&(s[pn]=!0),r[Aa]()}catch(l){t(l)}}o(PEe,"writeBlob");async function Hz(t,e,r,n,s,i,a,c){X(i!==0||r[zt]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let p=l;l=null,p()}}o(u,"onDrain");let d=o(()=>new Promise((p,f)=>{X(l===null),s[$r]?f(s[$r]):l=p}),"waitForDrain");s.on("close",u).on("drain",u);let A=new Dy({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let p of e){if(s[$r])throw s[$r];A.write(p)||await d()}A.end()}catch(p){A.destroy(p)}finally{s.off("close",u).off("drain",u)}}o(Hz,"writeIterable");var Dy=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[cc]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[$r])throw r[$r];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(s!==null&&a+u>s){if(i[sR])throw new _l;process.emitWarning(new _l)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[pn]=!0),s===null?r.write(`${l}transfer-encoding:chunked\r
`,"latin1"),r!==null&&s!==r){if(n[sR])throw new _l;process.emitWarning(new _l)}e[st].timeout&&e[st].timeoutType===$d&&e[st].timeout.refresh&&e[st].timeout.refresh(),n[Aa]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[cc]=!1,e&&(X(n[zt]<=1,"pipeline should only contain this request"),s(e))}};Wz.exports=xEe});var s$=g((l7e,n$)=>{"use strict";var Es=require("node:assert"),{pipeline:kEe}=require("node:stream"),Se=Ce(),{RequestContentLengthMismatchError:lR,RequestAbortedError:Kz,SocketError:oh,InformationalError:uR}=_e(),{kUrl:Oy,kReset:Ly,kClient:Jd,kRunning:Fy,kPending:DEe,kQueue:lc,kPendingIdx:dR,kRunningIdx:li,kError:di,kSocket:dr,kStrictContentLength:OEe,kOnError:AR,kMaxConcurrentStreams:r$,kHTTP2Session:ui,kResume:uc,kSize:MEe,kHTTPContext:LEe}=dt(),pa=Symbol("open streams"),Xz,Zz=!1,My;try{My=require("node:http2")}catch{My={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:FEe,HTTP2_HEADER_METHOD:UEe,HTTP2_HEADER_PATH:qEe,HTTP2_HEADER_SCHEME:GEe,HTTP2_HEADER_CONTENT_LENGTH:HEe,HTTP2_HEADER_EXPECT:VEe,HTTP2_HEADER_STATUS:zEe}}=My;function $Ee(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}o($Ee,"parseH2Headers");async function JEe(t,e){t[dr]=e,Zz||(Zz=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=My.connect(t[Oy],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[r$]});r[pa]=0,r[Jd]=t,r[dr]=e,Se.addListener(r,"error",WEe),Se.addListener(r,"frameError",jEe),Se.addListener(r,"end",KEe),Se.addListener(r,"goaway",XEe),Se.addListener(r,"close",function(){let{[Jd]:s}=this,{[dr]:i}=s,a=this[dr][di]||this[di]||new oh("closed",Se.getSocketInfo(i));if(s[ui]=null,s.destroyed){Es(s[DEe]===0);let c=s[lc].splice(s[li]);for(let l=0;l<c.length;l++){let u=c[l];Se.errorRequest(s,u,a)}}}),r.unref(),t[ui]=r,e[ui]=r,Se.addListener(e,"error",function(s){Es(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[di]=s,this[Jd][AR](s)}),Se.addListener(e,"end",function(){Se.destroy(this,new oh("other side closed",Se.getSocketInfo(this)))}),Se.addListener(e,"close",function(){let s=this[di]||new oh("closed",Se.getSocketInfo(this));t[dr]=null,this[ui]!=null&&this[ui].destroy(s),t[dR]=t[li],Es(t[Fy]===0),t.emit("disconnect",t[Oy],[t],s),t[uc]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return eye(t,...s)},resume(){YEe(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}o(JEe,"connectH2");function YEe(t){let e=t[dr];e?.destroyed===!1&&(t[MEe]===0&&t[r$]===0?(e.unref(),t[ui].unref()):(e.ref(),t[ui].ref()))}o(YEe,"resumeH2");function WEe(t){Es(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[dr][di]=t,this[Jd][AR](t)}o(WEe,"onHttp2SessionError");function jEe(t,e,r){if(r===0){let n=new uR(`HTTP/2:"frameError"received-type${t},code${e}`);this[dr][di]=n,this[Jd][AR](n)}}o(jEe,"onHttp2FrameError");function KEe(){let t=new oh("other side closed",Se.getSocketInfo(this[dr]));this.destroy(t),Se.destroy(this[dr],t)}o(KEe,"onHttp2SessionEnd");function XEe(t){let e=this[di]||new oh(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,Se.getSocketInfo(this)),r=this[Jd];if(r[dr]=null,r[LEe]=null,this[ui]!=null&&(this[ui].destroy(e),this[ui]=null),Se.destroy(this[dr],e),r[li]<r[lc].length){let n=r[lc][r[li]];r[lc][r[li]++]=null,Se.errorRequest(r,n,e),r[dR]=r[li]}Es(r[Fy]===0),r.emit("disconnect",r[Oy],[r],e),r[uc]()}o(XEe,"onHTTP2GoAway");function ZEe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(ZEe,"shouldSendContentLength");function eye(t,e){let r=t[ui],{method:n,path:s,host:i,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:d}=e;if(a)return Se.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let A={};for(let b=0;b<u.length;b+=2){let N=u[b+0],R=u[b+1];if(Array.isArray(R))for(let D=0;D<R.length;D++)A[N]?A[N]+=`,${R[D]}`:A[N]=R[D];else A[N]=R}let p,{hostname:f,port:h}=t[Oy];A[FEe]=i||`${f}$
`.trim())}};LY.exports=NT});varcC=g((Iet,HY)=>{"use strict";varUY=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:NBe}=_e(),xBe=Xd();GY()===void0&&qY(newxBe);functionqY(t){if(!t||typeoft.dispatch!="function")thrownewNBe("Argument agent must implement Agent");Object.defineProperty(globalThis,UY,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(qY,"setGlobalDispatcher");functionGY(){returnglobalThis[UY]}o(GY,"getGlobalDispatcher");HY.exports={setGlobalDispatcher:qY,getGlobalDispatcher:GY}});varlC=g((wet,VY)=>{"use strict";VY.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeofe!="object"||e===null)thrownewTypeError("handler must be an object");this.#e=e}onConnect(...e){returnthis.#e.onConnect?.(...e)}onError(...e){returnthis.#e.onError?.(...e)}onUpgrade(...e){returnthis.#e.onUpgrade?.(...e)}onResponseStarted(...e){returnthis.#e.onResponseStarted?.(...e)}onHeaders(...e){returnthis.#e.onHeaders?.(...e)}onData(...e){returnthis.#e.onData?.(...e)}onComplete(...e){returnthis.#e.onComplete?.(...e)}onBodySent(...e){returnthis.#e.onBodySent?.(...e)}}});var$Y=g((xet,zY)=>{"use strict";varQBe=qy();zY.exports=t=>{lete=t?.maxRedirections;returnr=>o(function(s,i){let{maxRedirections:a=e,...c}=s;if(!a)returnr(s,i);letl=newQBe(r,a,s,i);returnr(c,l)},"redirectInterceptor")}});varYY=g((Ret,JY)=>{"use strict";varRBe=Xy();JY.exports=t=>e=>o(function(n,s){returne(n,newRBe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))},"retryInterceptor")});varjY=g((vet,WY)=>{"use strict";varTBe=Ce(),{InvalidArgumentError:vBe,RequestAbortedError:_Be}=_e(),PBe=lC(),xT=classextendsPBe{static{o(this,"DumpHandler")}#e=1024*1024;#r=null;#s=!1;#t=!1;#n=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))thrownewvBe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#r=e,this.#a.onConnect(this.#o.bind(this))}#o(e){this.#t=!0,this.#i=e}onHeaders(e,r,n,s){leta=TBe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)thrownew_Be(`Response size (${a}) larger than maxSize (${this.#e})`);returnthis.#t?!0:this.#a.onHeaders(e,r,n,s)}onError(e){this.#s||(e=this.#i??e,this.#a.onError(e))}onData(e){returnthis.#n=this.#n+e.length,this.#n>=this.#e&&(this.#s=!0,this.#t?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#s){if(this.#t){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};functionkBe({maxSize:t}={maxSize:1024*1024}){returne=>o(function(n,s){let{dumpMaxSize:i=t}=n,a=newxT({maxSize:i},s);returne(n,a)},"Intercept")}o(kBe,"createDumpInterceptor");WY.exports=kBe});varZY=g((Pet,XY)=>{"use strict";var{isIP:DBe}=require("node:net"),{lookup:OBe}=require("node:dns"),MBe=lC(),{InvalidArgumentError:lA,InformationalError:LBe}=_e(),KY=Math.pow(2,31)-1,QT=class{static{o(this,"DNSInstance")}#e=0;#r=0;#s=newMap;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#r=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#t,this.pick=e.pick??this.#n}getfull(){returnthis.#s.size===this.#r}runLookup(e,r,n){lets=this.#s.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}leti={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#r};if(s==null)this.lookup(e,i,(a,c)=>{if(a||c==null||c.length===0){n(a??newLBe("No DNS entries found"));return}this.setRecords(e,c);letl=this.#s.get(e.hostname),u=this.pick(e,l,i.affinity),d;typeofu.port=="number"?d=`:${u.port}`:e.port!==""?d=`:${e.port}`:d="",n(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${d}`)});else{leta=this.pick(e,s,i.affinity);if(a==null){this.#s.delete(e.hostname),this.runLookup(e,r,n);return}letc;typeofa.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#t(e,r,n){OBe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,i)=>
${i}`;break;case"retry":vj(i)&&(r[s]=i);break;case"id":_j(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&vj(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&_j(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};Pj.exports={EventSourceStream:Ev}});var Gj=g((Ott,qj)=>{"use strict";var{pipeline:$Se}=require("node:stream"),{fetching:JSe}=xh(),{makeRequest:YSe}=AA(),{webidl:Ca}=Ir(),{EventSourceStream:WSe}=kj(),{parseMIMEType:jSe}=An(),{createFastMessageEvent:KSe}=EA(),{isNetworkError:Dj}=Sh(),{delay:XSe}=mv(),{kEnumerableProperty:Zl}=Ce(),{environmentSettingsObject:Oj}=Gn(),Mj=!1,Lj=3e3,qh=0,Fj=1,Gh=2,ZSe="anonymous",eNe="use-credentials",bA=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#r=null;#s=!1;#t=qh;#n=null;#i=null;#a;#o;constructor(e,r={}){super(),Ca.util.markAsUncloneable(this);let n="EventSource constructor";Ca.argumentLengthCheck(arguments,1,n),Mj||(Mj=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Ca.converters.USVString(e,n,"url"),r=Ca.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:Lj};let s=Oj,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#r=i.href;let a=ZSe;r.withCredentials&&(a=eNe,this.#s=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=Oj.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#r)],this.#n=YSe(c),this.#l()}get readyState(){return this.#t}get url(){return this.#r}get withCredentials(){return this.#s}#l(){if(this.#t===Gh)return;this.#t=qh;let e={request:this.#n,dispatcher:this.#a},r=o(n=>{Dj(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(Dj(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),i=s!==null?jSe(s):"failure",a=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#t=Fj,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let c=new WSe({eventSourceSettings:this.#o,push:o(l=>{this.dispatchEvent(KSe(l.type,l.options))},"push")});$Se(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=JSe(e)}async#c(){this.#t!==Gh&&(this.#t=qh,this.dispatchEvent(new Event("error")),await XSe(this.#o.reconnectionTime),this.#t===qh&&(this.#o.lastEventId.length&&this.#n.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#l()))}close(){Ca.brandCheck(this,t),this.#t!==Gh&&(this.#t=Gh,this.#i.abort(),this.#n=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},Uj={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:qh,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Fj,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Gh,writable:!1}};Obj
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)returnnull;this.sockets[e]||(this.sockets[e]=[]);letr=newWDe.Socket({writable:!1});returnthis.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;letn=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&deletethis.sockets[e])}getName(e){returnthis.isSecureEndpoint(e)?jDe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){lets={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(i,a),cinstanceofGK.Agent)try{returnc.addRequest(e,s)}catch(l){returnn(l)}this[no].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){lete=this[no].currentSocket;if(this[no].currentSocket=void0,!e)thrownewError("No socket was returned in the `connect()` function");returne}getdefaultPort(){returnthis[no].defaultPort??(this.protocol==="https:"?443:80)}setdefaultPort(e){this[no]&&(this[no].defaultPort=e)}getprotocol(){returnthis[no].protocol??(this.isSecureEndpoint()?"https:":"http:")}setprotocol(e){this[no]&&(this[no].protocol=e)}};ns.Agent=BP});var$K=g(JA=>{"use strict";varKDe=JA&&JA.__importDefault||function(t){returnt&&t.__esModule?t:{default:t}};Object.defineProperty(JA,"__esModule",{value:!0});JA.parseProxyResponse=void0;varXDe=KDe(cB()),lB=(0,XDe.default)("https-proxy-agent:parse-proxy-response");functionZDe(t){returnnewPromise((e,r)=>{letn=0,s=[];functioni(){letd=t.read();d?u(d):t.once("readable",i)}o(i,"read");functiona(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",i)}o(a,"cleanup");functionc(){a(),lB("onend"),r(newError("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");functionl(d){a(),lB("onerror %o",d),r(d)}o(l,"onerror");functionu(d){s.push(d),n+=d.length;letA=Buffer.concat(s,n),p=A.indexOf(`\r
`);let{connect:u,buffered:d}=awaitl;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)returne.once("socket",aOe),r.secureEndpoint?(Tm("Upgrading socket connection to TLS"),JK.connect({...WK(YK(r),"host","path","port"),socket:s})):s;s.destroy();letA=newuB.Socket({writable:!1});returnA.readable=!0,e.once("socket",p=>{Tm("Replaying proxy buffer for failed request"),(0,rOe.default)(p.listenerCount("data")>0),p.push(d),p.push(null)}),A}};dB.protocols=["http","https"];Ps.HttpsProxyAgent=dB;functionaOe(t){t.resume()}o(aOe,"resume");functionWK(t,...e){letr={},n;for(nint)e.includes(n)||(r[n]=t[n]);returnr}o(WK,"omit")});vartX=g(Bn=>{"use strict";varcOe=Bn&&Bn.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);vars=Object.getOwnPropertyDescriptor(e,r);(!s||("get"ins?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){returne[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),lOe=Bn&&Bn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ZK=Bn&&Bn.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cOe(e,t,r);returnlOe(e,t),e};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.req=Bn.json=Bn.toBuffer=void0;varuOe=ZK(require("http")),dOe=ZK(require("https"));asyncfunctioneX(t){lete=0,r=[];forawait(letnoft)e+=n.length,r.push(n);returnBuffer.concat(r,e)}o(eX,"toBuffer");Bn.toBuffer=eX;asyncfunctionAOe(t){letr=(awaiteX(t)).toString("utf8");try{returnJSON.parse(r)}catch(n){lets=n;throws.message+=` (input: ${r})`,s}}o(AOe,"json");Bn.json=AOe;functionpOe(t,e={}){letn=((typeoft=="string"?t:t.href).startsWith("https:")?dOe:uOe).request(t,e),s=newPromise((i,a)=>{n.once("response",i).once("error",a).end()});returnn.then=s.then.bind(s),n}o(pOe,"req");Bn.req=pOe});variX=g(ss=>{"use strict";varnX=ss&&ss.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);vars=Object.getOwnPropertyDescriptor(e,r);(!s||("get"ins?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){returne[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),fOe=ss&&ss.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),sX=ss&&ss.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nX(e,t,r);returnfOe(e,t),e},hOe=ss&&ss.__exportStar||function(t,e){for(varrint)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&nX(e,t,r)};Object.defineProperty(ss,"__esModule",{value:!0});ss.Agent=void0;varmOe=sX(require("net")),rX=sX(require("http")),gOe=require("https");hOe(tX(),ss);varso=Symbol("AgentBaseInternalState"),bP=classextendsrX.Agent{static{o(this,"Agent")}constructor(e){super(e),this[so]={}}isSecureEndpoint(e){if(e){if(typeofe.secureEndpoint=="boolean")returne.secureEndpoint;if(typeofe.protocol=="string")returne.protocol==="https:"}let{stack:r}=newError;returntypeofr!="string"?!1:r.split(`
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)returnnull;this.sockets[e]||(this.sockets[e]=[]);letr=newmOe.Socket({writable:!1});returnthis.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;letn=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&deletethis.sockets[e])}getName(e){return(typeofe.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?gOe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){lets={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(i,a),cinstanceofrX.Agent)returnc.addRequest(e,s);this[so].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){lete=this[so].currentSocket;if(this[so].currentSocket=void0,!e)thrownewError("No socket was returned in the `connect()` function");returne}getdefaultPort(){returnthis[so].defaultPort??(this.protocol==="https:"?443:80)}setdefaultPort(e){this[so]&&(this[so].defaultPort=e)}getprotocol(){returnthis[so].protocol??(this.isSecureEndpoint()?"https:":"http:")}setprotocol(e){this[so]&&(this[so].protocol=e)}};ss.Agent=bP});varcX=g(ks=>{"use strict";varEOe=ks&&ks.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);vars=Object.getOwnPropertyDescriptor(e,r);(!s||("get"ins?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){returne[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),yOe=ks&&ks.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aX=ks&&ks.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&EOe(e,t,r);returnyOe(e,t),e},COe=ks&&ks.__importDefault||function(t){returnt&&t.__esModule?t:{default:t}};Object.defineProperty(ks,"__esModule",{value:!0});ks.HttpProxyAgent=void0;varIOe=aX(require("net")),BOe=aX(require("tls")),bOe=COe(cB()),wOe=require("events"),SOe=iX(),oX=require("url"),YA=(0,bOe.default)("http-proxy-agent"),AB=classextendsSOe.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeofe=="string"?newoX.URL(e):e,this.proxyHeaders=r?.headers??{},YA("Creating new HttpProxyAgent instance: %o",this.proxy.href);letn=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?NOe(r,"headers"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",a=`${s}//${i}`,c=newoX.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);letl=typeofthis.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){letu=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(letuofObject.keys(l)){letd=l[u];d&&e.setHeader(u,d)}}asyncconnect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);letn,s;YA("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(YA("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
`)+4,e.outputData[0].data=e._header+n.substring(s),YA("Output buffer: %o",e.outputData[0].data));leti;returnthis.proxy.protocol==="https:"?(YA("Creating `tls.Socket`: %o",this.connectOpts),i=BOe.connect(this.connectOpts)):(YA("Creating `net.Socket`: %o",this.connectOpts),i=IOe.connect(this.connectOpts)),await(0,wOe.once)(i,"connect"),i}};AB.protocols=["http","https"];ks.HttpProxyAgent=AB;functionNOe(t,...e){letr={},n;for(nint)e.includes(n)||(r[n]=t[n]);returnr}o(NOe,"omit")});varTX=g(NB=>{"use strict";Object.defineProperty(NB,"__esModule",{value:!0});NB.state=void0;NB.state={instrumenterImplementation:void0}});varJX=g(vB=>{"use strict";Object.defineProperty(vB,"__esModule",{value:!0});vB.state=void0;vB.state={operationRequestMap:newWeakMap}});varSee=g(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});var$Ue=require("os"),JUe=require("util");functionYUe(t){returnt&&typeoft=="object"&&"default"int?t:{default:t}}o(YUe,"_interopDefaultLegacy");varWUe=YUe(JUe);functionjUe(t,...e){process.stderr.write(`${WUe.default.format(t,...e)}${$Ue.EOL}`)}o(jUe,"log");varhee=typeofprocess<"u"&&process.env&&process.env.DEBUG||void0,gee,tL=[],rL=[],jb=[];hee&&nL(hee);varEee=Object.assign(t=>yee(t),{enable:nL,enabled:sL,disable:KUe,log:jUe});functionnL(t){gee=t,tL=[],rL=[];lete=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(letnofr)n.startsWith("-")?rL.push(newRegExp(`^${n.substr(1)}$`)):tL.push(newRegExp(`^${n}$`));for(letnofjb)n.enabled=sL(n.namespace)}o(nL,"enable");functionsL(t){if(t.endsWith("*"))return!0;for(leteofrL)if(e.test(t))return!1;for(leteoftL)if(e.test(t))return!0;return!1}o(sL,"enabled");functionKUe(){lett=gee||"";returnnL(""),t}o(KUe,"disable");functionyee(t){lete=Object.assign(r,{enabled:sL(t),destroy:XUe,log:Eee.log,namespace:t,extend:ZUe});functionr(...n){e.enabled&&(n.length>0&&(n[0]=`${t}${n[0]}`),e.log(...n))}returno(r,"debug"),jb.push(e),e}o(yee,"createDebugger");functionXUe(){lett=jb.indexOf(this);returnt>=0?(jb.splice(t,1),!0):!1}o(XUe,"destroy");functionZUe(t){lete=yee(`${this.namespace}:${t}`);returne.log=this.log,e}o(ZUe,"extend");vargg=Eee,Cee=newSet,Yb=typeofprocess<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void0,Kb,Xb=gg("azure");Xb.log=(...t)=>{gg.log(...t)};variL=["verbose","info","warning","error"];Yb&&(wee(Yb)?Iee(Yb):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Yb}'; logging is not enabled. Acceptable values: ${iL.join(", ")}.`));functionIee(t){if(t&&!wee(t))thrownewError(`Unknown log level '${t}'. Acceptable values: ${iL.join(",")}`);Kb=t;lete=[];for(letrofCee)bee(r)&&e.push(r.namespace);gg.enable(e.join(","))}o(Iee,"setLogLevel");functione2e(){returnKb}o(e2e,"getLogLevel");varmee={verbose:400,info:300,warning:200,error:100};functiont2e(t){lete=Xb.extend(t);returnBee(Xb,e),{error:Wb(e,"error"),warning:Wb(e,"warning"),info:Wb(e,"info"),verbose:Wb(e,"verbose")}}o(t2e,"createClientLogger");functionBee(t,e){e.log=(...r)=>{t.log(...r)}}o(Bee,"patchLogMethod");functionWb(t,e){letr=Object.assign(t.extend(e),{level:e});if(Bee(t,r),bee(r)){letn=gg.disable();gg.enable(n+","+r.namespace)}returnCee.add(r),r}o(Wb,"createLogger");functionbee(t){return!!(Kb&&mee[t.level]<=mee[Kb])}o(bee,"shouldEnable");functionwee(t){returniL.includes(t)}o(wee,"isAzureLogLevel");Ap.AzureLogger=Xb;Ap.createClientLogger=t2e;Ap.getLogLevel=e2e;Ap.setLogLevel=Iee});varcL=g(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});varpp=newWeakMap,Zb=newWeakMap,Eg=classt{static{o(this,"AbortSignal")}constructor(){this.onabort=null,pp.set(this,[]),Zb.set(this,!1)}getaborted(){if(!Zb.has(this))thrownewTypeError("Expected `this` to be an instance of AbortSignal.");returnZb.get(this)}staticgetnone(){returnnewt}addEventListener(e,r){if(!pp.has(this))thrownewTypeError("Expected `this` to be an instance of AbortSignal.");pp.get(this).push(r)}removeEventListener(e,r){if(!pp.has(this))thrownewTypeError("Expected `this` to be an instance of AbortSignal.");letn=pp.get(this),s=n.indexOf(r);s>-1&
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(YJe,"logUnexpecedPropertyAccessOnce");function WJe(){Object.keys(_0).forEach(function(t){delete _0[t]})}o(WJe,"resetLoggedProperties")});var k0=g(Fo=>{"usestrict";Fo.__esModule=!0;Fo.HandlebarsEnvironment=TF;function bie(t){return t&&t.__esModule?t:{default:t}}o(bie,"_interopRequireDefault");var $u=Fr(),jJe=Js(),QF=bie(jJe),KJe=wF(),XJe=yie(),ZJe=NF(),P0=bie(ZJe),eYe=xF(),tYe="4.7.10";Fo.VERSION=tYe;var rYe=8;Fo.COMPILER_REVISION=rYe;var nYe=7;Fo.LAST_COMPATIBLE_COMPILER_REVISION=nYe;var sYe={1:"<=1.0.rc.2",2:"==1.0.0-rc.3",3:"==1.0.0-rc.4",4:"==1.x.x",5:"==2.0.0-alpha.x",6:">=2.0.0-beta.1",7:">=4.0.0<4.3.0",8:">=4.3.0"};Fo.REVISION_CHANGES=sYe;var RF="[objectObject]";function TF(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},KJe.registerDefaultHelpers(this),XJe.registerDefaultDecorators(this)}o(TF,"HandlebarsEnvironment");TF.prototype={constructor:TF,logger:P0.default,log:P0.default.log,registerHelper:o(function(e,r){if($u.toString.call(e)===RF){if(r)throw new QF.default("Argnotsupportedwithmultiplehelpers");$u.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if($u.toString.call(e)===RF)$u.extend(this.partials,e);else{if(typeof r>"u")throw new QF.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if($u.toString.call(e)===RF){if(r)throw new QF.default("Argnotsupportedwithmultipledecorators");$u.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){eYe.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var iYe=P0.default.log;Fo.log=iYe;Fo.createFrame=$u.createFrame;Fo.logger=P0.default});var Sie=g((D0,wie)=>{"usestrict";D0.__esModule=!0;function vF(t){this.string=t}o(vF,"SafeString");vF.prototype.toString=vF.prototype.toHTML=function(){return""+this.string};D0.default=vF;wie.exports=D0.default});var Nie=g(_F=>{"usestrict";_F.__esModule=!0;_F.wrapHelper=oYe;function oYe(t,e){if(typeof t!="function")return t;var r=o(function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)},"wrapper");return r}o(oYe,"wrapHelper")});var vie=g(Xc=>{"usestrict";Xc.__esModule=!0;Xc.checkRevision=AYe;Xc.template=pYe;Xc.wrapProgram=O0;Xc.resolvePartial=fYe;Xc.invokePartial=hYe;Xc.noop=Rie;function aYe(t){return t&&t.__esModule?t:{default:t}}o(aYe,"_interopRequireDefault");function cYe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(cYe,"_interopRequireWildcard");var lYe=Fr(),Ju=cYe(lYe),uYe=Js(),_i=aYe(uYe),Va=k0(),xie=wF(),dYe=Nie(),PF=xF();function AYe(t){var e=t&&t[0]||1,r=Va.COMPILER_REVISION;if(!(e>=Va.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Va.COMPILER_REVISION))if(e<Va.LAST_COMPATIBLE_COMPILER_REVISION){var n=Va.REVISION_CHANGES[r],s=Va.REVISION_CHANGES[e];throw new _i.default("TemplatewasprecompiledwithanolderversionofHandlebarsthanthecurrentruntime.Pleaseupdateyourprecompilertoanewerversion("+n+")ordowngradeyourruntimetoanolderversion("+s+").")}else throw new _i.default("TemplatewasprecompiledwithanewerversionofHandlebarsthanthecurrentruntime.Pleaseupdateyourruntimetoanewerversion("+t[1]+").")}o(AYe,"checkRevision");function pYe(t,e){if(!e)throw new _i.default("Noenvironmentpassedtotemplate");if(!t||!t.main)throw new _i.default("Unknowntemplateobject:"+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(a,c,l){l.hash&&(c=Ju.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.res
`)}o(E6e,"fromDER")});varvN=g(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.SHA2_HASH_ALGOS=ml.RSA_SIGNATURE_ALGOS=ml.ECDSA_SIGNATURE_ALGOS=void0;ml.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};ml.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};ml.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});varNq=g(_N=>{"use strict";Object.defineProperty(_N,"__esModule",{value:!0});_N.RFC3161TimestampVerificationError=void0;varSq=classextendsError{static{o(this,"RFC3161TimestampVerificationError")}};_N.RFC3161TimestampVerificationError=Sq});varCue=g(Jo=>{"use strict";vary6e=Jo&&Jo.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);vars=Object.getOwnPropertyDescriptor(e,r);(!s||("get"ins?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){returne[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),C6e=Jo&&Jo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),I6e=Jo&&Jo.__importStar||(function(){vart=o(function(e){returnt=Object.getOwnPropertyNames||function(r){varn=[];for(varsinr)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);returnn},t(e)},"ownKeys");returnfunction(e){if(e&&e.__esModule)returne;varr={};if(e!=null)for(varn=t(e),s=0;s<n.length;s++)n[s]!=="default"&&y6e(r,e,n[s]);returnC6e(r,e),r}})();Object.defineProperty(Jo,"__esModule",{value:!0});Jo.TSTInfo=void0;varyue=I6e(Sf()),B6e=vN(),b6e=Nq(),xq=class{static{o(this,"TSTInfo")}root;constructor(e){this.root=e}getversion(){returnthis.root.subs[0].toInteger()}getgenTime(){returnthis.root.subs[4].toDate()}getmessageImprintHashAlgorithm(){lete=this.messageImprintObj.subs[0].subs[0].toOID();returnB6e.SHA2_HASH_ALGOS[e]}getmessageImprintHashedMessage(){returnthis.messageImprintObj.subs[1].value}getraw(){returnthis.root.toDER()}verify(e){letr=yue.digest(this.messageImprintHashAlgorithm,e);if(!yue.bufferEqual(r,this.messageImprintHashedMessage))thrownewb6e.RFC3161TimestampVerificationError("message imprint does not match artifact")}getmessageImprintObj(){returnthis.root.subs[2]}};Jo.TSTInfo=xq});varBue=g(Yo=>{"use strict";varw6e=Yo&&Yo.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);vars=Object.getOwnPropertyDescriptor(e,r);(!s||("get"ins?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){returne[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),S6e=Yo&&Yo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),N6e=Yo&&Yo.__importStar||(function(){vart=o(function(e){returnt=Object.getOwnPropertyNames||function(r){varn=[];for(varsinr)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);returnn},t(e)},"ownKeys");returnfunction(e){if(e&&e.__esModule)returne;varr={};if(e!=null)for(varn=t(e),s=0;s<n.length;s++)n[s]!=="default"&&w6e(r,e,n[s]);returnS6e(r,e),r}})();Object.defineProperty(Yo,"__esModule",{value:!0});Yo.RFC3161Timestamp=void0;varx6e=QN(),Qq=N6e(Sf()),Iue=vN(),_E=Nq(),Q6e=Cue(),R6e="1.2.840.113549.1.7.2",T6e="1.2.840.113549.1.9.16.1.4",v6e="1.2.840.113549.1.9.4",Rq=classt{static{o(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}staticparse(e){letr=x6e.ASN1Obj.parseBuffer(e);returnnewt(r)}getstatus(){returnthis.pkiStatusInfoObj.subs[0].toInteger()}getcontentType(){returnthis.contentTypeObj.toOID()}geteContentType(){returnthis.eContentTypeObj.toOID()}getsigningTime(){returnthis.tstInfo.genTime}getsignerIssuer(){returnthis.signerSidObj.subs[0].value}getsignerSerialNumber(){returnthis.signerSidObj.subs[1].value}getsignerDigestAlgorith
`,KKe=/\u2014 (\S+) (\S+)\n/g;function XKe(t,e){let r=t.inclusionProof,n=iG.fromString(r.checkpoint.envelope),s=XN.fromString(n.note);if(!ZKe(n,e))throw new _f.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return s}o(XKe,"verifyCheckpoint");function ZKe(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let s=e.find(i=>rde.crypto.bufferEqual(i.logID.subarray(0,4),n.keyHint)&&i.baseURL.includes(n.name));return s?rde.crypto.verify(r,s.publicKey,n.signature):!1})}o(ZKe,"verifySignedNote");var iG=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(sG))throw new _f.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(sG),n=e.slice(0,r+1),i=e.slice(r+sG.length).matchAll(KKe),a=Array.from(i,c=>{let[,l,u]=c,d=Buffer.from(u,"base64");if(d.length<5)throw new _f.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:l,keyHint:d.subarray(0,4),signature:d.subarray(4)}});if(a.length===0)throw new _f.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},XN=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,s){this.origin=e,this.logSize=r,this.logHash=n,this.rest=s}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new _f.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],s;try{s=BigInt(r[1])}catch{throw new _f.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint log size"})}let i=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,s,i,a)}};ME.LogCheckpoint=XN});var sde=g(cG=>{"use strict";Object.defineProperty(cG,"__esModule",{value:!0});cG.verifyMerkleInclusion=rXe;var aG=Di(),ZN=Hr(),eXe=Buffer.from([0]),tXe=Buffer.from([1]);function rXe(t,e){let r=t.inclusionProof,n;try{n=BigInt(r.logIndex)}catch{throw new ZN.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid inclusion proof log index"})}let s=BigInt(e.logSize);if(n<0n||n>=s)throw new ZN.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${n}`});let{inner:i,border:a}=nXe(n,s);if(r.hashes.length!==i+a)throw new ZN.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),l=r.hashes.slice(i),u=lXe(t.canonicalizedBody),d=iXe(sXe(u,c,n),l);if(!aG.crypto.bufferEqual(d,e.logHash))throw new ZN.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(rXe,"verifyMerkleInclusion");function nXe(t,e){let r=oXe(t,e),n=aXe(t>>BigInt(r));return{inner:r,border:n}}o(nXe,"decompInclProof");function sXe(t,e,r){return e.reduce((n,s,i)=>r>>BigInt(i)&BigInt(1)?oG(s,n):oG(n,s),t)}o(sXe,"chainInner");function iXe(t,e){return e.reduce((r,n)=>oG(n,r),t)}o(iXe,"chainBorderRight");function oXe(t,e){return cXe(t^e-BigInt(1))}o(oXe,"innerProofSize");function aXe(t){return t.toString(2).split("1").length-1}o(aXe,"onesCount");function cXe(t){return t===0n?0:t.toString(2).length}o(cXe,"bitLength");function oG(t,e){return aG.crypto.digest("sha256",tXe,t,e)}o(oG,"hashChildren");function lXe(t){return aG.crypto.digest("sha256",eXe,t)}o(lXe,"hashLeaf")});var ode=g(lG=>{"use strict";Object.defineProperty(lG,"__esModule",{value:!0});lG.verifyTLogSET=AXe;var ide=Di(),uXe=Hr(),dXe=Qf();function AXe(t,e){if(!(0,dXe.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(s=>{let i=pXe(t),a=Buffer.from(ide.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return ide.crypto.verify(a,s.publicKey,c)}))throw new uXe.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(AXe,"verifyTLogSET");function pXe(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:s}=t;return{body:s.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}o(pXe,"toVerificationPayload")});var cde=g(tx=>{"use strict";Object.defineProperty(tx,"__esModule",{value:!0});tx.verifyTLogBody=EXe;tx.verifyTLogInclusion=yXe;var ade=Xue(),ex=Hr(),uG=Zue(),dG=ede(),fXe=tde(),hXe=nde(),mXe=sde(),gXe=ode();function EXe(t,e){let{kind:r,version:n}=t.kindVersion,s;try{s=JSON.parse(t.canonicalizedBody.toString("utf8"))}catch{throw new ex.VerificationError({code:"TLOG_BODY_ERROR",message:"invalid canonicalized body"})}if(r!==s.kind||n!==s.apiVersion)throw new ex.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${n},received:${s.kind}/${s.apiVersion}`});switch(r){case"dsse":if(n==uG.DSSE_API_VERSION_V1)return(0,uG.verifyDSSETLogBody)(s,e);{let i=ade.Entry.fromJSON(s);return(0,uG.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,fXe.verifyIntotoTLogBody)(s,e);case"hashedrekord":if(n==dG.HASHEDREKORD_API_VERSION_V1)return(0,dG.verifyHashedRekordTLogBody)(s,e);{let i=ade.Entry.fromJSON(s);return(0,dG.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new ex.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}o(EXe,"verifyTLogBody");function yXe(t,e){let r=!1;if(CXe(t)&&((0,gXe.verifyTLogSET)(t,e),r=!0),IXe(t)){let n=(0,hXe.verifyCheckpoint)(t,e);(0,mXe.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new ex.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion c
`),u}o(TG,"getBlockValue");functionhpe(t,e){if(e.valueStart===cpe)return"";let{valueStart:r,valueEnd:n}=e;if(e.fast)returnt.slice(r,n);switch(e.style){caseBe.SINGLE_QUOTED:returnppe(t,r,n);caseBe.DOUBLE_QUOTED:returnfpe(t,r,n);caseBe.LITERAL_BLOCK:returnTG(t,r,n,e.indent,e.chomping,!1);caseBe.FOLDED_BLOCK:returnTG(t,r,n,e.indent,e.chomping,!0);default:returnApe(t,r,n)}}o(hpe,"getScalarValue");varmpe=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});functionzG(t,e){if(t.startsWith("!<")&&t.endsWith(">"))returndecodeURIComponent(t.slice(2,-1));letr=t.indexOf("!",1),n=r===-1?"!":t.slice(0,r+1),s=e?.[n]??mpe[n]??n;returndecodeURIComponent(s)+decodeURIComponent(t.slice(n.length))}o(zG,"tagNameFull");varBd=-1,gpe="tag:yaml.org,2002:merge",Lx={filename:"",schema:npe,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};functionEpe(t){return"tagStart"int&&t.tagStart!==Bd?t.tagStart:"anchorStart"int&&t.anchorStart!==Bd?t.anchorStart:"valueStart"int&&t.valueStart!==Bd?t.valueStart:"start"int?t.start:0}o(Epe,"eventPosition$1");functionCr(t,e){Sl.throwAt(t.source,t.position,e,t.filename)}o(Cr,"throwError$1");function$G(t,e,r,n){try{returnr.finalize(n)}catch(s){if(sinstanceofSl)throws;Sl.throwAt(t.source,e,sinstanceofError?s.message:String(s),t.filename)}}o($G,"finalizeCollection");functionype(t,e){letr=hpe(t.source,e),n=e.tagStart===Bd?"":t.source.slice(e.tagStart,e.tagEnd),s=t.schema.defaultScalarTag;if(n!==""){if(n==="!")return{value:r,tag:s};leti=zG(n,t.tagHandlers),a=t.schema.lookupScalarTag(i);if(a){letl=a.resolve(r,!0,i);returnl===ve&&Cr(t,`cannot resolve a node with !<${i}> explicit tag`),{value:l,tag:a}}letc=t.schema.lookupMappingTag(i)??t.schema.lookupSequenceTag(i);if(c){r!==""&&Cr(t,`cannot resolve a node with !<${i}> explicit tag`);letl=c.create(i);return{value:c.carrierIsResult?l:$G(t,t.position,c,l),tag:c}}Cr(t,`unknown scalar tag !<${i}>`)}returne.style===Be.PLAIN?t.schema.resolveImplicitScalarTag(r):{value:s.resolve(r,!1,s.tagName),tag:s}}o(ype,"constructScalar");functionvG(t,e,r){letn=e.tagStart===Bd?"":t.source.slice(e.tagStart,e.tagEnd);returnn===""||n==="!"?r:zG(n,t.tagHandlers)}o(vG,"collectionTagName");functionJG(t){returnt.nodeKind==="mapping"}o(JG,"isMappingTag");function_G(t){t.totalMergeKeys++,t.maxTotalMergeKeys!==-1&&t.totalMergeKeys>t.maxTotalMergeKeys&&Cr(t,`merge keys exceeded maxTotalMergeKeys (${t.maxTotalMergeKeys})`)}o(_G,"chargeMergeWork");functionPG(t,e,r,n){_G(t);for(letsofn.keys(r)){if(_G(t),e.tag.has(e.value,s))continue;leti=e.tag.addPair(e.value,s,n.get(r,s));i&&Cr(t,i),e.overridable??=newSet,e.overridable.add(s)}}o(PG,"mergeKeys");functionCpe(t,e,r,n){if(t.position=e.keyPosition,JG(n))PG(t,e,r,n);elseif(n.nodeKind==="sequence"&&Array.isArray(r)){r.length>100&&Cr(t,"abnormal merge sequence size");for(letsofr){leti=t.nodeTags.get(s);i||Cr(t,"cannot merge mappings; the provided source object is unacceptable"),PG(t,e,s,i)}}elseCr(t,"cannot merge mappings; the provided source object is unacceptable")}o(Cpe,"mergeSource");functionIpe(t,e,r,n,s){if(t.position=e.keyPosition,e.keyIsMerge){Cpe(t,e,n,s);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&Cr(t,"duplicated mapping key");leti=e.tag.addPair(e.value,r,n);i&&Cr(t,i),e.overridable?.delete(r)}o(Ipe,"addMappingValue");functionwx(t,e,r){letn=t.frames[t.frames.length-1];if(n.kind==="document")n.value=e,n.hasValue=!0;elseif(n.kind==="sequence"){JG(r)&&t.nodeTags.set(e,r);lets=n.tag.addItem(n.value,e,n.index++);s&&Cr(t,s)}elseif(n.hasKey){lets=n.key;n.key=void0,n.hasKey=!1,Ipe(t,n,s,e,r)}elsen.key=e,n.keyPosition=t.position,n.hasKey=!0,n.keyIsMerge=r.tagName===gpe}o(wx,"addValue");functionSx(t,e,r,n,s){if(e.anchorStart!==Bd){leti={value:r,tag:n,isValueFinal:s};returnt.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),i),i}returnnull}o(Sx,"storeAnchor");functionBpe(t,e){letr={...Lx,...e,events:t,documents:[],eventIndex:0,position:0,frames:[],anchors:newMap,nodeTags:newMap,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;r.eventInd
`,"utf-8")],s=UOe(n);s&&t.headers.set("Content-Length",s),t.body=awaitEX(n)}o(qOe,"buildRequestBody");varvm="multipartPolicy",GOe=70,HOe=newSet("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");functionVOe(t){if(t.length>GOe)thrownewError(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!HOe.has(e)))thrownewError(`Multipart boundary "${t}" contains invalid characters`)}o(VOe,"assertValidBoundary");functionyB(){return{name:vm,asyncsendRequest(t,e){if(!t.multipartBody)returne(t);if(t.body)thrownewError("multipartBody and regular body cannot be set at the same time");letr=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)thrownewError(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,a]=s;if(a&&r&&a!==r)thrownewError(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);returnr??=a,r?VOe(r):r=MOe(),t.headers.set("Content-Type",`${i}; boundary=${r}`),awaitqOe(t,t.multipartBody.parts,r),t.multipartBody=void0,e(t)}}}o(yB,"multipartPolicy");functionCB(){returnHI()}o(CB,"createEmptyPipeline");varyX=UI({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),fpt=yX.logger;functionio(t){returnyX.createClientLogger(t)}o(io,"createClientLogger");varoo=io("core-rest-pipeline");functionTP(t={}){returnWI({logger:oo.info,...t})}o(TP,"logPolicy");varvP=jI;function_P(t={}){returnKI(t)}o(_P,"redirectPolicy");varIB=w(require("node:os"),1),BB=w(require("node:process"),1);functionCX(){return"User-Agent"}o(CX,"getHeaderName");asyncfunctionIX(t){if(BB.default&&BB.default.versions){lete=`${IB.default.type()}${IB.default.release()}; ${IB.default.arch()}`,r=BB.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}o(IX,"setPlatformSpecificData");varbB="1.22.2";functionXOe(t){lete=[];for(let[r,n]oft){lets=n?`${r}/${n}`:r;e.push(s)}returne.join(" ")}o(XOe,"getUserAgentString");functionBX(){returnCX()}o(BX,"getUserAgentHeaderName");asyncfunctionwB(t){lete=newMap;e.set("core-rest-pipeline",bB),awaitIX(e);letr=XOe(e);returnt?`${t}${r}`:r}o(wB,"getUserAgentValue");varbX=BX(),wX="userAgentPolicy";functionPP(t={}){lete=wB(t.userAgentPrefix);return{name:wX,asyncsendRequest(r,n){returnr.headers.has(bX)||r.headers.set(bX,awaite),n(r)}}}o(PP,"userAgentPolicy");varis=classextendsError{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};functionkP(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};returnnewPromise((i,a)=>{functionc(){a(newis(s??"The operation was aborted."))}o(c,"rejectOnAbort");functionl(){n?.removeEventListener("abort",u)}o(l,"removeListeners");functionu(){r?.(),l(),c()}if(o(u,"onAbort"),n?.aborted)returnc();try{t(d=>{l(),i(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}o(kP,"createAbortablePromise");varnMe="The delay was aborted.";function_m(t,e){letr,{abortSignal:n,abortErrorMsg:s}=e??{};returnkP(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??nMe})}o(_m,"delay");functionOc(t){if(du(t))returnt.message;{lete;try{typeoft=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}o(Oc,"getErrorMessage");functionSX(t){returndu(t)}o(SX,"isError");functionWA(){returnuu()}o(WA,"randomUUID");varLe=fu;varNX=Symbol("rawContent");functionOP(t){returntypeoft[NX]=="function"}o(OP,"hasRawContent");functionxX(t){returnOP(t)?t[NX]():t}o(xX,"getRawContent");varSB=vm;functionMP(){lett=yB();return{name:SB,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(letnofe.multipartBody.parts)OP(n.body)&&(n.body=xX(n.body));returnt.sendRequest(e,r)},"sendRequest")}}o(MP,"multipartPolicy");varLP=XI;functionFP(){returnZI()}o(FP,"decompressResponsePolicy");functionUP(t={}){returnrB(t
`&&t[i]!=="\r";i++)l+=t[i];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),i--),!xLe(l)){let A;return l.trim().length===0?A="Invalid space after '<'.":A="Tag '"+l+"' is an invalid name.",Mt("InvalidTag",A,rn(t,i))}let u=BLe(t,i);if(u===!1)return Mt("InvalidAttr","Attributes for '"+l+"' have open quote.",rn(t,i));let d=u.value;if(i=u.index,d[d.length-1]==="/"){let A=i-d.length;d=d.substring(0,d.length-1);let p=AZ(d,e);if(p===!0)n=!0;else return Mt(p.err.code,p.err.msg,rn(t,A+p.err.line))}else if(c)if(u.tagClosed){if(d.trim().length>0)return Mt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",rn(t,a));if(r.length===0)return Mt("InvalidTag","Closing tag '"+l+"' has not been opened.",rn(t,a));{let A=r.pop();if(l!==A.tagName){let p=rn(t,A.tagStartPos);return Mt("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",rn(t,a))}r.length==0&&(s=!0)}}else return Mt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",rn(t,i));else{let A=AZ(d,e);if(A!==!0)return Mt(A.err.code,A.err.msg,rn(t,i-d.length+A.err.line));if(s===!0)return Mt("InvalidXml","Multiple possible root nodes found.",rn(t,i));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=dZ(t,i);continue}else if(t[i+1]==="?"){if(i=uZ(t,++i),i.err)return i}else break;else if(t[i]==="&"){let A=SLe(t,i);if(A==-1)return Mt("InvalidChar","char '&' is not expected.",rn(t,i));i=A}else if(s===!0&&!lZ(t[i]))return Mt("InvalidXml","Extra text at the end",rn(t,i));t[i]==="<"&&i--}}else{if(lZ(t[i]))continue;return Mt("InvalidChar","char '"+t[i]+"' is not expected.",rn(t,i))}if(n){if(r.length==1)return Mt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",rn(t,r[0].tagStartPos));if(r.length>0)return Mt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Mt("InvalidXml","Start tag expected.",1);return!0}o(LB,"validate");function lZ(t){return t===" "||t===" "||t===`
`||t==="\r"}o(lZ,"isWhiteSpace");function uZ(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return Mt("InvalidXml","XML declaration allowed only at the start of the document.",rn(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(uZ,"readPI");function dZ(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}o(dZ,"readCommentAndCDATA");var CLe='"',ILe="'";function BLe(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===CLe||t[e]===ILe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}o(BLe,"readAttributeStr");var bLe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function AZ(t,e){let r=OB(t,bLe),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return Mt("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",Vm(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return Mt("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",Vm(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return Mt("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",Vm(r[s]));let i=r[s][2];if(!NLe(i))return Mt("InvalidAttr","Attribute '"+i+"' is an invalid name.",Vm(r[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return Mt("InvalidAttr","Attribute '"+i+"' is repeated.",Vm(r[s]))}return!0}o(AZ,"validateAttributeString");function wLe(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}o(wLe,"validateNumberAmpersand");function SLe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,wLe(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}o(SLe,"validateAmpersand");function Mt(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(Mt,"getErrorObject");function NLe(t){return uk(t)}o(NLe,"validateAttrName");function xLe(t){return uk(t)}o(xLe,"validateTagName");function rn(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(rn,"getLineNumberForPosition");function Vm(t){return t.startIndex+t[1].length}o(Vm,"getPositionFromMatch");var pZ={amp:"&",AMP:"&",lt:"<",LT:"<",gt:">",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},fZ={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1"
`);let e=new wn("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,i=new Jm(s.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let u=t.charCodeAt(c+1);if(u===47){let d=tp(t,">",c,"ClosingTagisnotclosed."),A=t.substring(c+2,d).trim();if(s.removeNSPrefix){let f=A.indexOf(":");f!==-1&&(A=A.substr(f+1))}A=Ek(s.transformTagName,A,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let p=this.matcher.getCurrentTag();if(A&&s.unpairedTagsSet.has(A))throw new Error(`Unpaired tag can not be used as closing tag: </${A}>`);p&&s.unpairedTagsSet.has(p)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=d}else if(u===63){let d=yk(t,c,!1,"?>");if(!d)throw new Error("PiTagisnotclosed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let A=this.buildAttributesMap(d.tagExp,this.matcher,d.tagName,!0);if(A){let p=A[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(p)||1),i.setXmlVersion(Number(p)||1)}if(!(s.ignoreDeclaration&&d.tagName==="?xml"||s.ignorePiTags)){let p=new wn(d.tagName);p.add(s.textNodeName,""),d.tagName!==d.tagExp&&d.attrExpPresent&&s.ignoreAttributes!==!0&&(p[":@"]=A),this.addChild(r,p,this.readonlyMatcher,c)}c=d.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let d=tp(t,"-->",c+4,"Commentisnotclosed.");if(s.commentPropName){let A=t.substring(c+4,d-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:A}])}c=d}else if(u===33&&t.charCodeAt(c+2)===68){let d=i.readDocType(t,c);this.entityDecoder.addInputEntities(d.entities),c=d.i}else if(u===33&&t.charCodeAt(c+2)===91){let d=tp(t,"]]>",c,"CDATAisnotclosed.")-2,A=t.substring(c+9,d);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let p=this.parseTextData(A,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);p==null&&(p=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:A}]):r.add(s.textNodeName,p),c=d+2}else{let d=yk(t,c,s.removeNSPrefix);if(!d){let R=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${R}"`)}let A=d.tagName,p=d.rawTagName,f=d.tagExp,h=d.attrExpPresent,m=d.closeIndex;if({tagName:A,tagExp:f}=Ek(s.transformTagName,A,f,s),s.strictReservedNames&&(A===s.commentPropName||A===s.cdataPropName||A===s.textNodeName||A===s.attributesGroupName))throw new Error(`Invalid tag name: ${A}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let y=r;y&&s.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(E=!0,A[A.length-1]==="/"?(A=A.substr(0,A.length-1),f=A):f=f.substr(0,f.length-1),h=A!==f);let C=null,I={},b;b=jLe(p),A!==e.tagname&&this.matcher.push(A,{},b),A!==f&&h&&(C=this.buildAttributesMap(f,this.matcher,A),C&&(I=WLe(C,s))),A!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let R="";if(E)c=d.closeIndex;else if(s.unpairedTagsSet.has(A))c=d.closeIndex;else{let xe=this.readStopNodeData(t,p,m+1);if(!xe)throw new Error(`Unexpected end of ${p}`);c=xe.i,R=xe.tagContent}let D=new wn(A);C&&(D[":@"]=C),D.add(s.textNodeName,R),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,D,this.readonlyMatcher,N)}else{if(E){({tagName:A,tagExp:f}=Ek(s.transformTagName,A,f,s));let R=new wn(A);C&&(R[":@"]=C),this.addChild(r,R,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(A)){let R=new wn(A);C&&(R[":@"]=C),this.addChild(r,R,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=d.closeIndex;continue}else{let R=new wn(A);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),C&&(R[":@"]=C),this.addChild(r,R,this.readonlyMatcher,N),r=R}n="",c=m}}}else n+=t[c];return e.child},"parse
${c}:${decodeURIComponent(i[c])}`}returnn}};varSt=classextendsBu{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){returnnewXm(e,r,this)}computeHMACSHA256(e){return(0,zZ.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};varrr=io("storage-common");varDs;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Ds||(Ds={}));varGc={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Ds.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void0},R1e=newis("The operation was aborted."),Zm=classextendsuo{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=Gc){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Gc.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Gc.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Gc.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Gc.maxRetryDelayInMs):Gc.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Gc.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Gc.secondaryHost}}asyncsendRequest(e){returnthis.attemptSendRequest(e,!1,1)}asyncattemptSendRequest(e,r,n){lets=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=jB(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=qc(s.url,_a.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));leta;try{if(rr.info(`RetryPolicy: =====> Try=${n}${i?"Primary":"Secondary"}`),a=awaitthis._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,a))returna;r=r||!i&&a.status===404}catch(c){if(rr.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(i,n,a,c))throwc}returnawaitthis.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)returnrr.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;leti=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(letaofi)if(s.name.toUpperCase().includes(a)||s.message.toUpperCase().includes(a)||s.code&&s.code.toString().toUpperCase()===a)returnrr.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||s){leta=n?n.status:s?s.statusCode:0;if(!e&&a===404)returnrr.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)returnrr.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){leta=n.headers.get(ae.X_MS_CopySourceErrorCode);if(a!==void0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}returns?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(rr.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}asyncdelay(e,r,n){lets=0;if(e)switch(this.retryOptions.retryPolicyType){caseDs.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;caseDs.FIXED:s=this.retryOptions.retryDelayInMs;break}elses=Math.random()*1e3;returnrr.info(`RetryPolicy: Delay for ${s}ms`),ZB(s,n,R1e)}};vareg=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){returnnewZm(e,r,this.retryOptions)}};varT1e="storageBrowserPolicy";function$Z(){return{name:T1e,asyncsendRequest(t,e){returnLe||((t.method==="GET"||t.method==="HEAD")&&(t.url=qc(t.url,_a.Parameters.FORCE_BROWSER_NO_CACHE,newDate().getTime().toString())),t.headers.delete(ae.COOKIE),t.headers.delete(ae.CONTENT_LENGTH)),e(t)}}}o($Z,"storageBrowserPolicy");varv1e="StorageCorrectContentLengthPolicy";functionJZ(){functiont(e){e.body&&(type
`}),c}o(n,"getCanonicalizedHeadersString");function s(i){let a=KB(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=XB(i.url),u={};if(l){let d=[];for(let A in l)if(Object.prototype.hasOwnProperty.call(l,A)){let p=A.toLowerCase();u[p]=l[A],d.push(p)}d.sort();for(let A of d)c+=`
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:newxi(t.version,i,n,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}o(FUe,"generateBlobSASQueryParameters20150405");functionUUe(t,e){if(t=vu(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Qo.parse(t.permissions.toString()).toString():s=Ro.parse(t.permissions.toString()).toString());leti=[s||"",t.startsOn?Fe(t.startsOn,!1):"",t.expiresOn?Fe(t.expiresOn,!1):"",Tu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ni(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newxi(t.version,a,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(UUe,"generateBlobSASQueryParameters20181109");functionqUe(t,e){if(t=vu(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Qo.parse(t.permissions.toString()).toString():s=Ro.parse(t.permissions.toString()).toString());leti=[s||"",t.startsOn?Fe(t.startsOn,!1):"",t.expiresOn?Fe(t.expiresOn,!1):"",Tu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ni(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newxi(t.version,a,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void0,void0,void0,t.encryptionScope),stringToSign:i}}o(qUe,"generateBlobSASQueryParameters20201206");functionGUe(t,e){if(t=vu(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Qo.parse(t.permissions.toString()).toString():s=Ro.parse(t.permissions.toString()).toString());leti=[s||"",t.startsOn?Fe(t.startsOn,!1):"",t.expiresOn?Fe(t.expiresOn,!1):"",Tu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Fe(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Fe(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ni(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newxi(t.version,a,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}o(GUe,"generateBlobSASQueryParametersUDK20181109");functionHUe(t,e){if(t=vu(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Qo.parse(t.permissions.toString()).toString():s=Ro.parse(t.permissions.toString()).toString());leti=[s||"",t.startsOn?Fe(t.startsOn,!1):"",t.expiresOn?Fe(t.expiresOn,!1):"",Tu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Fe(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Fe(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?Ni(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newxi(t.version,a,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}o(HUe,"generateBlobSASQueryParametersUDK20200210");functionVUe(t,e){if(t=vu(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Qo.parse(t.permissions.toString()).toString():s=Ro.parse(t.permissions.toString()).toString());leti=[s||"",t.startsOn?Fe(t.startsOn,!1):"",t.expiresOn?Fe(t.expiresOn,!1):"",Tu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Fe(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Fe(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?Ni(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newxi(t.version,a,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}o(VUe,"generateBlobSASQueryParametersUDK20201206");functionzUe(t,e){if(t=vu(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));lets;t.permissions&&(t.blobName?s=Qo.parse(t.permissions.toString()).toString():s=Ro.parse(t.permissions.toString()).toString());leti=[s||"",t.startsOn?Fe(t.startsOn,!1):"",t.expiresOn?Fe(t.expiresOn,!1):"",Tu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Fe(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Fe(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,void0,t.delegatedUserObjectId,t.ipRange?Ni(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newxi(t.version,a,s,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}o(zUe,"generateBlobSASQueryParametersUDK20250705");functionTu(t,e,r){letn=[`/blob/${t}/${e}`];returnr&&n.push(`/${r}`),n.join("")}o(Tu,"getCanonicalName");functionvu(t){lete=t.version?t.version:nb;if(t.snapshotTime&&e<"2018-11-09")throwRangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void0&&t.snapshotTime)throwRangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void0&&t.versionId)throwRangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throwRangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throwRangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throwRangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throwRangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throwRangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throwRangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");returnt.version=e,t}o(vu,"SASSignatureValuesSanityCheckAndAutofill");varpg=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;getleaseId(){returnthis._leaseId}geturl(){returnthis._url}constructor(e,r){letn=e.storageClientContext;this._url=e.url,e.name===void0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=WA()),this._leaseId=r}asyncacquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Bi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Bi||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnz.withSpan("BlobLeaseClient-acquireLease",r,asyncn=>K(awaitthis._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}asyncchangeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Bi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Bi||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnz.withSpan("BlobLeaseClient-changeLease",r,asyncn=>{lets=K(awaitthis._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));returnthis._leaseId=e,s})}asyncreleaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMat
Ifyouareusingself-hostedrunners,pleasemakesureyourrunnerhasaccesstoallGitHubendpoints:https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};hp.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Du=class extends Error{static{o(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
Moreinfoonstoragelimits:https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Du.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var bg=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var G2e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},IL=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function cte(t,e,r){return G2e(this,void 0,void 0,function*(){var n;let s=new qa(t),i=s.getBlockBlobClient(),a=new IL((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),B(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let l=yield i.uploadFile(e,c);if(l._response.status>=400)throw new cw(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw Ve(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(cte,"uploadCacheArchiveSDK");var ute=w(require("buffer"),1),To=w(require("fs"),1),dte=w(require("stream"),1),Ate=w(require("util"),1);var lw=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function uw(t){return t?t>=200&&t<300:!1}o(uw,"isSuccessStatusCode");function H2e(t){return t?t>=500:!0}o(H2e,"isServerErrorStatusCode");function V2e(t){return t?[wt.BadGateway,wt.ServiceUnavailable,wt.GatewayTimeout].includes(t):!1}o(V2e,"isRetryableStatusCode");function z2e(t){return lw(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(z2e,"sleep");function lte(t,e,r){return lw(this,arguments,void 0,function*(n,s,i,a=PI,c=kI,l=void 0){let u="",d=1;for(;d<=a;){let A,p,f=!1;try{A=yield s()}catch(h){l&&(A=l(h)),f=!0,u=h.message}if(A&&(p=i(A),!H2e(p)))return A;if(p&&(f=V2e(p),u=`Cache service responded with ${p}`),B(`${n} - Attempt ${d} of ${a} failed with error: ${u}`),!f){B(`${n} - Error is not retryable`);break}yield z2e(c),d++}throw Error(`${n} failed: ${u}`)})}o(lte,"retry");function wg(t,e){return lw(this,arguments,void 0,function*(r,n,s=PI,i=kI){return yield lte(r,n,a=>a.statusCode,s,i,a=>{if(a instanceof to)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(wg,"retryTypedResponse");function mp(t,e){return lw(this,arguments,void 0,function*(r,n,s=PI,i=kI){return yield lte(r,n,a=>a.message.statusCode,s,i)})}o(mp,"retryHttpClientResponse");var Us=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a
Othercacheswithsimilarkey:`);for(let c of i?.artifactCaches||[])B(`CacheKey:${c?.cacheKey},CacheVersion:${c?.cacheVersion},CacheScope:${c?.scope},CacheCreated:${c?.creationTime}`)}}})}o(Z2e,"printCachesListForDiagnostics");function NL(t,e,r){return Qn(this,void 0,void 0,function*(){let n=new Ste.URL(t),s=mte(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield fte(t,e,s):s.concurrentBlobDownloads?yield pte(t,e,s):yield Aw(t,e):yield Aw(t,e)})}o(NL,"downloadCache");function xte(t,e,r){return Qn(this,void 0,void 0,function*(){let n=SL(),s=UA(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield wg("reserveCache",()=>Qn(this,void 0,void 0,function*(){return n.postJson(Ng("caches"),i)}))})}o(xte,"reserveCache");function wte(t,e){return`bytes${t}-${e}/*`}o(wte,"getContentRange");function eqe(t,e,r,n,s){return Qn(this,void 0,void 0,function*(){B(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${wte(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":wte(n,s)},a=yield mp(`uploadChunk (start: ${n}, end: ${s})`,()=>Qn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!uw(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(eqe,"uploadChunk");function tqe(t,e,r,n){return Qn(this,void 0,void 0,function*(){let s=eo(r),i=Ng(`caches/${e.toString()}`),a=gp.openSync(r,"r"),c=BL(n),l=K_("uploadConcurrency",c.uploadConcurrency),u=K_("uploadChunkSize",c.uploadChunkSize),d=[...new Array(l).keys()];B("Awaiting all uploads");let A=0;try{yield Promise.all(d.map(()=>Qn(this,void 0,void 0,function*(){for(;A<s;){let p=Math.min(s-A,u),f=A,h=A+p-1;A+=u,yield eqe(t,i,()=>gp.createReadStream(r,{fd:a,start:f,end:h,autoClose:!1}).on("error",m=>{throw new Error(`Cache upload failed because file read failed with ${m.message}`)}),f,h)}})))}finally{gp.closeSync(a)}})}o(tqe,"uploadFile");function rqe(t,e,r){return Qn(this,void 0,void 0,function*(){let n={size:r};return yield wg("commitCache",()=>Qn(this,void 0,void 0,function*(){return t.postJson(Ng(`caches/${e.toString()}`),n)}))})}o(rqe,"commitCache");function xL(t,e,r,n){return Qn(this,void 0,void 0,function*(){if(BL(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield cte(r,e,n)}else{let i=SL();B("Upload cache"),yield tqe(i,t,e,n),B("Commiting cache");let a=eo(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield rqe(i,t,a);if(!uw(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}o(xL,"saveCache");var Ire=w(fre(),1),qt=w(Ut(),1),ds=w(Ut(),1),Uu=w(Ut(),1),qu=w(Ut(),1),Gu=w(Ut(),1);var I1=w(Ut(),1),B1=w(Ut(),1),Ere=w(Ut(),1),yre=w(Ut(),1),Cre=w(Ut(),1);var E1=w(Ut(),1),y1=w(Ut(),1),hre=w(Ut(),1),mre=w(Ut(),1),gre=w(Ut(),1);var C1=class extends gre.MessageType{static{o(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,mre.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,hre.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let d=e.skip(l);u!==!1&&(u===!0?y1.UnknownFieldHandler.onRead:u)(this.typeName,i,c,l,d)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,E1.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,E1.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?y1.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},Zw=new C1;var b1=class extends Cre.Mess
`));let{commands:n}=yield wre(r,"create");yield Nre(n,t)})}o(U1,"createTar");var Pp=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},Ti=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Hu=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},q1="cache write denied:",n0=class t extends Hu{static{o(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},Qre=DI,s0=class t extends Error{static{o(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},i0=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Rre(t){if(!t||t.length===0)throw new Ti("Path Validation Error: At least one directory or file path is required")}o(Rre,"checkPaths");function G1(t){if(t.length>512)throw new Ti(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Ti(`Key Validation Error: ${t} cannot contain commas.`)}o(G1,"checkKey");function H1(){return Sg()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(H1,"isFeatureAvailable");function Tre(t,e,r,n){return Pp(this,arguments,void 0,function*(s,i,a,c,l=!1){let u=Sg();B(`Cache service version: ${u}`),Rre(s);let d=wL();if(!Ete(d)){S(`Cache restore skipped: the effective cache-mode '${d}' does not permit reads.`),B(`Skipped restore for paths [${s.join(", ")}] with primary key '${i}'.`);return}return u==="v2"?yield gHe(s,i,a,c,l):yield mHe(s,i,a,c,l)})}o(Tre,"restoreCache");function mHe(t,e,r,n){return Pp(this,arguments,void 0,function*(s,i,a,c,l=!1){var u;a=a||[];let d=[i,...a];if(B("Resolved Keys:"),B(JSON.stringify(d)),d.length>10)throw new Ti("Key Validation Error: Keys are limited to a maximum of 10.");for(let f of d)G1(f);let A=yield wm(),p="";try{let f;try{f=yield Nte(d,s,{compressionMethod:A,enableCrossOsArchive:l})}catch(m){let y=(u=m?.message)!==null&&u!==void 0?u:"";throw y.includes(Qre)?new s0(y):m}if(!f?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),f.cacheKey;p=Gg.join(yield lu(),Pc(A)),B(`Archive Path: ${p}`),yield NL(f.archiveLocation,p,c),ba()&&(yield qg(p,A));let h=eo(p);return S(`Cache Size: ~${Math.round(h/(1024*1024))} MB (${h} B)`),yield F1(p,A),S("Cache restored successfully"),f.cacheKey}catch(f){let h=f;if(h.name===Ti.name)throw f;h instanceof to&&typeof h.statusCode=="number"&&h.statusCode>=500?RA(`Failed to restore: ${f.message}`):Ve(`Failed to restore: ${f.message}`)}finally{try{yield bm(p)}catch(f){B(`Failed to delete archive: ${f}`)}}})}o(mHe,"restoreCacheV1");function gHe(t,e,r,n){return Pp(this,arguments,void 0,function*(s,i,a,c,l=!1){var u;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let d=[i,...a];if(B("Resolved Keys:"),B(JSON.stringify(d)),d.length>10)throw new Ti("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of d)G1(p);let A="";try{let p=M1(),f=yield wm(),h={key:i,restoreKeys:a,version:UA(s,f,l)},m;try{m=yield p.GetCacheEntryDownloadURL(h)}catch(C){let I=(u=C?.message)!==null&&u!==void 0?u:"";throw I.includes(Qre)?new s0(I):C}if(!m.ok){B(`Cache not found for version ${h.version} of keys: ${d.join(", ")}`);return}if(h.key!==m.matchedKey?S(`Cache hit for restore-key: ${m.matchedKey}`):S(`Cache hit for: ${m.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),m.matchedKey;A=Gg.join(yield lu(),Pc(f)),B(`Archive path: ${A}`),B(`Starting download of archiv
`,a).length:A,u?(c===null?0:c.length)+l.length:0,u?l.length+A:0);return p<f},"__needMoreData"),parse:o(function(n,s,i,a){let{bom:c,comment_no_infix:l,delimiter_auto:u,encoding:d,from_line:A,ltrim:p,max_record_size:f,raw:h,relax_quotes:m,rtrim:y,skip_empty_lines:E,to:C,to_line:I}=this.options,{comment:b,escape:N,quote:R,record_delimiter:D}=this.options,{bomSkipped:xe,delimiterDiscovered:ut,delimiterBufPrevious:je,rawBuffer:Ze,escapeIsQuote:Ie}=this.state;if(!ut&&u){let ze;if(je===void 0?ze=n:je!==void 0&&n===void 0?ze=je:ze=Buffer.concat([je,n]),n=void 0,s||ze.length>u.size)this.options.delimiter=[Buffer.from(Yoe(ze,this.options.delimiter_auto))],this.state.previousBuf=ze,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=ze;return}}let{previousBuf:Vt}=this.state,me;if(Vt===void 0)if(n===void 0){a();return}else me=n;else Vt!==void 0&&n===void 0?me=Vt:me=Buffer.concat([Vt,n]);if(xe===!1)if(c===!1)this.state.bomSkipped=!0;else if(me.length<3){if(s===!1){this.state.previousBuf=me;return}}else{for(let ze in Kp)if(Kp[ze].compare(me,0,Kp[ze].length)===0){let sc=Kp[ze].length;this.state.bufBytesStart+=sc,me=me.slice(sc);let GE=jp({...this.original_options,encoding:ze});for(let Zt in GE)this.options[Zt]=GE[Zt];({comment:b,escape:N,quote:R}=this.options);break}this.state.bomSkipped=!0}let oi=me.length,$;for($=0;$<oi&&!this.__needMoreData($,oi,s);$++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),I!==-1&&this.info.lines>I){this.state.stop=!0,a();return}this.state.quoting===!1&&D.length===0&&this.__autoDiscoverRecordDelimiter(me,$)&&(D=this.options.record_delimiter);let ze=me[$];if(h===!0&&Ze.append(ze),(ze===K3e||ze===X3e)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(me,$,ze)&&$+N.length<oi)if(Ie){if(this.__isQuote(me,$+N.length)){this.state.escaping=!0,$+=N.length-1;continue}}else{this.state.escaping=!0,$+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(me,$))if(this.state.quoting===!0){let Zt=me[$+R.length],Il=y&&this.__isCharTrimable(me,$+R.length),ra=b!==null&&this.__compareBytes(b,me,$+R.length,Zt),Bl=this.__isDelimiter(me,$+R.length,Zt),HE=D.length===0?this.__autoDiscoverRecordDelimiter(me,$+R.length):this.__isRecordDelimiter(Zt,me,$+R.length);if(N!==null&&this.__isEscape(me,$,ze)&&this.__isQuote(me,$+N.length))$+=N.length-1;else if(!Zt||Bl||HE||ra||Il){this.state.quoting=!1,this.state.wasQuoting=!0,$+=R.length-1;continue}else if(m===!1){let wG=this.__error(new we("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(Zt)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(wG!==void 0)return wG}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(R),$+=R.length-1}else if(this.state.field.length!==0){if(m===!1){let Zt=this.__infoField(),Il=Object.keys(Kp).map(Bl=>Kp[Bl].equals(this.state.field.toString())?Bl:!1).filter(Boolean)[0],ra=this.__error(new we("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(Zt.column)} at line ${Zt.lines}, value is ${JSON.stringify(this.state.field.toString(d))}`,Il?`(${Il} bom)`:void 0],this.options,Zt,{field:this.state.field}));if(ra!==void 0)return ra}}else{this.state.quoting=!0,$+=R.length-1;continue}if(this.state.quoting===!1){let Zt=this.__isRecordDelimiter(ze,me,$);if(Zt!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=A){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),$+=Zt-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,$+=Zt-1;continue}this.info.bytes=this.state.bufBytesSt
${s}`)},"onRetry")})}static isPullTransientError(e){return/Client\.Timeout exceeded|TLS handshake timeout|i\/o timeout|context deadline exceeded|request canceled|connection reset by peer|connection refused|connection timed out|temporary failure|unexpected EOF|\bEOF\b|server misbehaving/i.test(e)||/\b(500|502|503|504)\b/.test(e)||/\b(service unavailable|bad gateway|gateway timeout|internal server error)\b/i.test(e)}};var Zae=w(require("crypto"),1);var aS=require("fs"),tae=require("os");var Xp=class{static{o(this,"Context")}constructor(){var e,r,n;if(this.payload={},process.env.GITHUB_EVENT_PATH)if((0,aS.existsSync)(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse((0,aS.readFileSync)(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let s=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${s} does not exist${tae.EOL}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(n=process.env.GITHUB_GRAPHQL_URL)!==null&&n!==void 0?n:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,r]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:r}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};var IU=w(oae(),1),aae=w(SA(),1);var dWe=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function cae(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}o(cae,"getAuthString");function lae(t){return new IU.HttpClient().getAgent(t)}o(lae,"getProxyAgent");function AWe(t){return new IU.HttpClient().getAgentDispatcher(t)}o(AWe,"getProxyAgentDispatcher");function uae(t){let e=AWe(t);return o((n,s)=>dWe(this,void 0,void 0,function*(){return(0,aae.fetch)(n,Object.assign(Object.assign({},s),{dispatcher:e}))}),"proxyFetch")}o(uae,"getProxyFetch");function dae(){return process.env.GITHUB_API_URL||"https://api.github.com"}o(dae,"getApiBaseUrl");function BU(t){var e;let r=(e=process.env.ACTIONS_ORCHESTRATION_ID)===null||e===void 0?void 0:e.trim();if(r){let s=`actions_orchestration_id/${r.replace(/[^a-z0-9_.-]/gi,"_")}`;return t?.includes(s)?t:`${t?`${t} `:""}${s}`}return t}o(BU,"getUserAgentWithOrchestrationId");function tl(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}o(tl,"getUserAgent");function fS(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce((s,i)=>fS.bind(null,t,i,s,n),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((s,i)=>i.hook.bind(null,s,n),r)():r(n))}o(fS,"register");function Aae(t,e,r,n){let s=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=o((i,a)=>
`)}o(VWe,"_buildMessageForResponseErrors");var zWe=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(VWe(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},$We=["method","baseUrl","url","headers","request","query","mediaType","operationName"],JWe=["query","method","url"],Lae=/\/api\/v3\/?$/;function YWe(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(JWe.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((a,c)=>$We.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Lae.test(i)&&(s.url=i.replace(Lae,"/api/graphql")),t(s).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new zWe(s,c,a.data)}return a.data.data})}o(YWe,"graphql");function QU(t,e){let r=t.defaults(e);return Object.assign(o((s,i)=>YWe(r,s,i),"newApi"),{defaults:QU.bind(null,r),endpoint:r.endpoint})}o(QU,"withDefaults");var qDt=QU(uE,{headers:{"user-agent":`octokit-graphql.js/${HWe} ${tl()}`},method:"POST",url:"/graphql"});function Fae(t){return QU(t,{method:"POST",url:"/graphql"})}o(Fae,"withCustomRequest");var RU="(?:[a-zA-Z0-9_-]+)",Uae="\\.",qae=new RegExp(`^${RU}${Uae}${RU}${Uae}${RU}$`),WWe=qae.test.bind(qae);async function jWe(t){let e=WWe(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}o(jWe,"auth");function KWe(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}o(KWe,"withAuthorizationPrefix");async function XWe(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=KWe(t),e(s)}o(XWe,"hook");var Gae=o(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(jWe.bind(null,e),{hook:XWe.bind(null,e)})},"createTokenAuth2");var TU="7.0.6";var Hae=o(()=>{},"noop"),ZWe=console.warn.bind(console),eje=console.error.bind(console);function tje(t={}){return typeof t.debug!="function"&&(t.debug=Hae),typeof t.info!="function"&&(t.info=Hae),typeof t.warn!="function"&&(t.warn=ZWe),typeof t.error!="function"&&(t.error=eje),t}o(tje,"createLogger");var Vae=`octokit-core.js/${TU} ${tl()}`,ES=class{static{o(this,"Octokit")}static VERSION=TU;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{o(this,"NewOctokit")}static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new gae.Collection,n={baseUrl:uE.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${Vae}`:Vae,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=uE.defaults(n),this.graphql=Fae(this.request).defaults(n),this.log=tje(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...a}=e,c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=Gae(e.auth);r.wrap("request",i.hook),this.auth=i}let s=this.constructor;for(let i=0;i<s.plugins.length;++i)
More info: ${l.url}`);let f=l.range&&l.range.length>0?l.range[0]?.start.line:void 0,h=!1;for(let m of a)if(m.remote||m.path.endsWith(u)&&m.content===d){c.push({title:A,message:p,file:m.path,startLine:f}),h=!0;break}h||B(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${A}`)}return c}};var nl=class t{static{o(this,"Builder")}buildx;constructor(e){this.buildx=e?.buildx||new ye}async exists(e){let r=await this.buildx.getCommand(["inspect",e]),n=await Y.getExecOutput(r.command,r.args,{ignoreReturnCode:!0,silent:!0}).then(s=>s.stderr.length>0&&s.exitCode!=0?(B(`Builder.exists cmd err: ${s.stderr.trim()}`),!1):s.exitCode==0).catch(s=>(B(`Builder.exists error: ${s}`),!1));return B(`Builder.exists: ${n}`),n}async inspect(e){let r=Object.assign({},process.env,{DEBUG:"1"}),n=["inspect"];e&&n.push(e);let s=await this.buildx.getCommand(n);return await Y.getExecOutput(s.command,s.args,{ignoreReturnCode:!0,silent:!0,env:r}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());return t.parseInspect(i.stdout)})}static parseInspect(e){let r={nodes:[]},n,s={},i,a,c;for(let l of e.trim().split(`
`),s.files[c]+=l.replace(/^\s>\s?/,""));break}}}}returna&&s.devices&&s.devices.push(a),i&&s.gcPolicy&&s.gcPolicy.push(i),s.name&&r.nodes.push(s),r}};varrd=w(require("fs"),1),GU=w(require("path"),1);varbS=classt{static{o(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||newye,this.iidFilename=`build-iidfile-${Oe.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${Oe.generateRandomString()}.json`}asyncgitContext(e){letr=newSet(["ref","checksum","subdir"]),n=e?.attrs||{},s=Object.entries(n).filter(([f])=>!r.has(f)),i=Oe.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||ln.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&Oe.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;letc=`${We.serverURL}/${ln.repo.owner}/${ln.repo.repo}.git`,l=e?.checksum||n.checksum,u=e?.subdir||n.subdir,d=e?.format;if(!d){if(d="fragment",s.length>0)d="query";elseif(Oe.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{awaitthis.buildx.versionSatisfies(">=0.29.0")&&(d="query")}catch{}}letA=ln.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(A=typeofln.payload.pull_request?.head?.sha=="string"?ln.payload.pull_request.head.sha:a);letp=l||A;if(d==="query"){letf=[`ref=${i||l?a:p}`],h=i?p:l;h&&f.push(`checksum=${h}`),u&&u!=="."&&f.push(`subdir=${u}`);for(let[m,y]ofs)f.push(`${m}=${y}`);return`${c}?${f.join("&")}`}return`${c}#${p}${u&&u!=="."?`:${u}`:""}`}getImageIDFilePath(){returnGU.default.join(De.tmpDir(),this.iidFilename)}resolveImageID(){lete=this.getImageIDFilePath();if(rd.default.existsSync(e))returnrd.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){returnGU.default.join(De.tmpDir(),this.metadataFilename)}resolveMetadata(){lete=this.getMetadataFilePath();if(!rd.default.existsSync(e))return;letr=rd.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")returnJSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"ine)returne["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"ine)returne["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"ine)returne["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"ine)returne["containerimage.digest"]}staticresolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}staticresolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}staticresolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}staticresolveSecret(e,r){let[n,s]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!rd.default.existsSync(s))thrownewError(`secret file ${s} not found`);return[n,s]}leti=De.tmpName({tmpdir:De.tmpDir()});returnrd.default.writeFileSync(i,s),[n,i]}staticgetProvenanceInput(e){letr=Pr(e);if(!r)returnr;try{returnnu(e)?`builder-id=${We.workflowRunURL(!0)}`:"false"}catch{returnt.resolveProvenanceAttrs(r)}}staticresolveProvenanceAttrs(e){if(!e)return`builder-id=${We.workflowRunURL(!0)}`;letr=fs(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(letnofr)if(n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")returne;return`${e},builder-id=${We.workflowRunURL(!0)}`}staticresolveCacheToAttrs(e,r){if(!e)returne;letn="registry",s="",i="",a=fs(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(letcofa){letl=c.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());l[0]==="type"?n=l[1]:l[0]==="repository"?s=l[1]:l[0]==="ghtoken"&&(i=l[1])}returnn==="gha"&&(s||(e=`${e},repository=${We.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}statichasLocalExporter(e){returnt.hasExporterType("local",e)}statichasTarExporter(e){returnt.hasExporterType("tar",e)}statichasDockerExporter(e,r){returnr||t.hasExporterType("docker",e)}statichasExporterType(e,r){letn=fs(r.join(`
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(letsofn){if(s.length==1&&!s[0].startsWith("type="))returne=="local";for(let[i,a]ofs.map(c=>c.split("=").map(l=>l.trim())))if(i=="type"&&a==e)return!0}return!1}statichasAttestationType(e,r){letn=fs(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(letsofn)for(let[i,a]ofs.map(c=>c.split("=").map(l=>l.trim())))if(i=="type"&&a==e)return!0;return!1}staticresolveAttestationAttrs(e){letr=fs(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(letsofr)for(letiofs)try{leta=Oe.parseBool(i);n.push(`disabled=${!a}`)}catch{n.push(i)}returnn.join(",")}statichasGitAuthTokenSecret(e,r){for(letnofe){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}staticparseSecretKvp(e,r){letn=e.indexOf("="),s=e.substring(0,n),i=e.substring(n+1);if(s.length==0||i.length==0)thrownewError(`${e} is not a valid secret`);returnr&&Yi(i),[s,i]}};varHU=w(require("fs"),1),nce=w(require("path"),1);varwS=classt{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||newye,this.metadataFilename=`bake-metadata-${Oe.generateRandomString()}.json`}getMetadataFilePath(){returnnce.default.join(De.tmpDir(),this.metadataFilename)}staticresolveContextTargets(e,r){letn=e.target||{},s=Object.keys(n);if(s.length===0)thrownewError("Bake definition does not contain any targets");if(!Object.prototype.hasOwnProperty.call(n,r))thrownewError(`Unable to resolve ${r} target, found: ${s.join(", ")}`);leti=newSet([r]),a=[r];for(;a.length>0;){letc=a.pop();for(letlofObject.values(n[c].contexts||{})){letu=l.match(/^target:(.+)$/)?.[1];if(!(!u||i.has(u))){if(!Object.prototype.hasOwnProperty.call(n,u))thrownewError(`Target ${c} uses unknown named context target ${u}`);i.add(u),a.push(u)}}}return[...i]}resolveMetadata(){lete=this.getMetadataFilePath();if(!HU.default.existsSync(e))return;letr=HU.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")returnJSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;letr=newArray;for(letnine)"buildx.build.ref"ine[n]&&r.push(e[n]["buildx.build.ref"]);returnr.length>0?r:void0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"ine)returne["buildx.build.warnings"]}asyncgetDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});letn=["bake"],s,i=[],a=[...e.files||[],e.source];if(a){for(letlofa.map(u=>u?u.trim():""))if(l.length!=0){if(!Oe.isValidRef(l)){i.push(l);continue}if(s)thrownewError("Only one remote bake definition can be defined");s=l}}s&&n.push(s);for(letlofi)n.push("--file",l);if(e.overrides)for(letlofe.overrides)n.push("--set",l);if(e.vars)for(letlofe.vars)n.push("--var",l);if(e.allow)for(letlofe.allow)n.push("--allow",l);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);letc=awaitthis.buildx.getCommand([...n,"--print",...e.targets||[]]);returnawaitY.getExecOutput(c.command,c.args,r).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)thrownewError(`cannot parse bake definitions: ${ye.getErrorMessage(l.stderr)}`);returnt.parseDefinition(l.stdout.trim())})}staticparseDefinition(e){letr=JSON.parse(e);for(letninr.target){lets=r.target[n];s.attest&&Array.isArray(s.attest)&&(s.attest=s.attest.map(i=>t.parseAttestEntry(i))),s["cache-from"]&&Array.isArray(s["cache-from"])&&(s["cache-from"]=s["cache-from"].map(i=>t.parseCacheEntry(i))),s["cache-to"]&&Array.isArray(s["cache-to"])&&(s["cache-to"]=s["cache-to"].map(i=>t.parseCacheEntry(i))),s.output&&Array.isArray(s.output)&&(s.output=s.output.map(i=>t.parseExportEntry(i))),s.secret&&Array.isArray(s.secret)&&(s.secret=s.secret.map(i=>t.parseSecretEntry(i))),s.ssh&&Array.isArray(s.ssh)&&(s.ssh=s.ssh.map(i=>t.parseSSHEntry(i)))}returnr
`).map(a=>a.trim()).filter(a=>a.length>0).sort((a,c)=>c.length-a.length);for(let a of i){let c=`tag:${a.slice(10)}`;if(e===c||e.startsWith(`${c},`))return a}if(i.length===1)return i[0];throw new Error(`Cannotfinddetachedtagrefin"${r}"`)}static async findContainingRef(e,r){let n=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e],r),[s]=n.split(`
${a.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,c)*100))}throw a??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,n){return await Y.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(s=>{if(s.stderr.length>0&&s.exitCode!=0)throw new Error(s.stderr.trim());return n(JSON.parse(s.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown)/i.test(e)||/:\s*not found$/i.test(e)}};var Pf="https://search.sigstore.dev";var Ede="slsaprovenance1",yl=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Un,this.imageTools=e?.imageTools||new nx}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n={noTransparencyLog:e.noTransparencyLog,rekorV2:e.rekorV2},s=await this.cosignSigningConfigArgs(n);for(let i of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${i}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let l=`${i}@${c}`;await tt(`Signingattestationmanifest${l}`,async()=>{let u=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1",...await this.bundleFormatArgs(),...s];S(`[command]${this.cosign.binPath}${[...u,l].join(" ")}`);let d=await Y.getExecOutput(this.cosign.binPath,["--verbose",...u,l],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),A=Un.parseCommandOutput(d.stderr.trim());if(d.exitCode!=0)if(A.errors&&A.errors.length>0){let f=A.errors.map(h=>`-[${h.code}]${h.message}:${h.detail}`).join(`
${u}`),await new Promise(d=>setTimeout(d,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosignverifycommandfailedwith:${Un.getErrorMessage(c.stderr)}`)}throw i}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n={noTransparencyLog:e.noTransparencyLog,rekorV2:e.rekorV2},s=await this.cosignSigningConfigArgs(n),i=t.getProvenanceBlobs(e);for(let a of Object.keys(i))await tt(`Signing${a}`,async()=>{let c=i[a],l=Zo.default.join(Zo.default.dirname(a),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(c);if(u.length===0){Ve(`Nosubjectsfoundinprovenance${a},skipsigning.`);return}let d=Zo.default.join(Zo.default.dirname(a),u[0].name),A=["attest-blob","--yes","--oidc-provider","github-actions",...await this.bundleFormatArgs(),"--statement",a,"--type",Ede,"--bundle",l,...s];S(`[command]${this.cosign.binPath}${[...A,d].join(" ")}`);let p=await Y.getExecOutput(this.cosign.binPath,["--verbose",...A,d],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),f=Un.parseCommandOutput(p.stderr.trim());if(p.exitCode!=0)if(f.errors&&f.errors.length>0){let m=f.errors.map(y=>`-[${y.code}]${y.message}:${y.detail}`).join(`
`;vardx=classt{static{o(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||newye,this.sigstore=e?.sigstore||newyl}asyncdownload(e){letr=awaitt.getDownloadVersion(e.version);B(`Install.download version: ${r.version}`);letn=awaitt.getRelease(r,this.githubToken);B(`Install.download release tag name: ${n.tag_name}`);lets=awaitthis.vspec(n.tag_name);B(`Install.download vspec: ${s}`);leti=Ff.clean(s)||"";if(!Ff.valid(i))thrownewError(`Invalid Cosign version "${s}".`);leta=newEr({htcName:"cosign-dl-bin",htcVersion:s,baseCacheDir:Lf.default.join(Oi.default.homedir(),".bin"),cacheFile:Oi.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=awaita.find();if(c)returnS(`Cosign binary found in ${c}`),c;letl=yG.format(r.downloadURL,s,this.filename());S(`Downloading ${l}`);letu=awaitNs(l,void0,this.githubToken);B(`Install.download htcDownloadPath: ${u}`),e.verifySignature&&Ff.satisfies(s,">=3.0.1")&&awaitthis.verifySignature(u,l);letd=awaita.save(u,e.skipState);returnS(`Cached to ${d}`),d}asyncbuild(e,r,n){lets=awaitthis.vspec(e);B(`Install.build vspec: ${s}`);leti=newEr({htcName:"cosign-build-bin",htcVersion:s,baseCacheDir:Lf.default.join(Oi.default.homedir(),".bin"),cacheFile:Oi.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=awaiti.find();if(a)returnS(`Cosign binary found in ${a}`),a;letc=Lf.default.join(De.tmpDir(),"cosign-build-cache"),l=awaitthis.buildCommand(e,c),u=awaitY.getExecOutput(l.command,l.args,{ignoreReturnCode:!0,input:Buffer.from(Bde)}).then(A=>{if(A.stderr.length>0&&A.exitCode!=0)thrownewError(`build failed with: ${ye.getErrorMessage(A.stderr)}`);return`${c}/cosign`}),d=awaiti.save(u,n);returnS(`Cached to ${d}`),d}asyncinstall(e,r){r=r||De.tmpDir();letn=Lf.default.join(r,"cosign-bin");LE.default.existsSync(n)||LE.default.mkdirSync(n,{recursive:!0});lets=Oi.default.platform()=="win32"?"cosign.exe":"cosign",i=Lf.default.join(n,s);returnLE.default.copyFileSync(e,i),S("Fixing perms"),LE.default.chmodSync(i,"0755"),ji(n),S("Added Cosign to PATH"),S(`Binary path: ${i}`),i}asyncbuildCommand(e,r){letn=awaitnewye({standalone:!0}).isAvailable(),s=awaitnewye({standalone:!1}).isAvailable(),i=!1;if(awaitthis.buildx.isStandalone()&&n)B("Install.buildCommand: Buildx standalone found, build with it"),i=!0;elseif(!awaitthis.buildx.isStandalone()&&s)B("Install.buildCommand: Buildx plugin found, build with it"),i=!1;elseif(n)B("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),i=!0;elseif(s)B("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),i=!1;elsethrownewError(`Neither buildx standalone or plugin have been found to build from ref ${e}`);leta=["build","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${r}`];returnprocess.env.GIT_AUTH_TOKEN&&a.push("--secret","id=GIT_AUTH_TOKEN"),a.push("-f-",e),awaitnewye({standalone:i}).getCommand(a)}asyncverifySignature(e,r){letn=`${r}.sigstore.json`;S(`Downloading keyless verification bundle at ${n}`);lets=awaitNs(n,void0,this.githubToken);B(`Install.verifySignature bundlePath: ${s}`);leti=awaitthis.sigstore.verifyArtifact(e,s,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});S(`Cosign binary signature verified! ${i.tlogID?`${Pf}?logIndex=${i.tlogID}`:""}`)}filename(){lete;switch(Oi.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=Oi.default.arch();break}}letr=Oi.default.platform()=="win32"?"windows":Oi.default.platform(),n=Oi.default.platform()=="win32"?".exe":"";returnyG.format("cosign-%s-%s%s",r,e,n)}asyncvspec(e){if(!Oe.isValidRef(e)){letu=e.replace(/^v+|v+$/g,"");returnS(`Use ${u} version spec cache key for ${e}`),u}let[r,n]=e.split("#");n.length==0&&(n="master");lets;n.match(/^[0-9a-fA-F]{40}$/)?s=n:s=awaittf.remoteSha(r,n,process.env.GIT_AUTH_TOK