var$Pe=Object.create;varIS=Object.defineProperty;varjPe=Object.getOwnPropertyDescriptor;varJPe=Object.getOwnPropertyNames;varYPe=Object.getPrototypeOf,WPe=Object.prototype.hasOwnProperty;varo=(t,e)=>IS(t,"name",{value:e,configurable:!0});varKPe=(t,e)=>()=>(t&&(e=t(t=0)),e);varg=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),PW=(t,e)=>{for(varrine)IS(t,r,{get:e[r],enumerable:!0})},XPe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofJPe(e))!WPe.call(t,i)&&i!==r&&IS(t,i,{get:()=>e[i],enumerable:!(s=jPe(e,i))||s.enumerable});returnt};vark=(t,e,r)=>(r=t!=null?$Pe(YPe(t)):{},XPe(e||!t||!t.__esModule?IS(r,"default",{value:t,enumerable:!0}):r,t));varhK=g(HA=>{"use strict";varcPt=require("net"),eke=require("tls"),YD=require("http"),cK=require("https"),tke=require("events"),lPt=require("assert"),rke=require("util");HA.httpOverHttp=ske;HA.httpsOverHttp=ike;HA.httpOverHttps=nke;HA.httpsOverHttps=oke;functionske(t){vare=newKl(t);returne.request=YD.request,e}o(ske,"httpOverHttp");functionike(t){vare=newKl(t);returne.request=YD.request,e.createSocket=lK,e.defaultPort=443,e}o(ike,"httpsOverHttp");functionnke(t){vare=newKl(t);returne.request=cK.request,e}o(nke,"httpOverHttps");functionoke(t){vare=newKl(t);returne.request=cK.request,e.createSocket=lK,e.defaultPort=443,e}o(oke,"httpsOverHttps");functionKl(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||YD.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(s,i,n,a){for(varc=uK(i,n,a),l=0,u=e.requests.length;l<u;++l){varh=e.requests[l];if(h.host===c.host&&h.port===c.port){e.requests.splice(l,1),h.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)},"onFree"))}o(Kl,"TunnelingAgent");rke.inherits(Kl,tke.EventEmitter);Kl.prototype.addRequest=o(function(e,r,s,i){varn=this,a=WD({request:e},n.options,uK(r,s,i));if(n.sockets.length>=this.maxSockets){n.requests.push(a);return}n.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);functionl(){n.emit("free",c,a)}o(l,"onFree");functionu(h){n.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}o(u,"onCloseOrRemove")})},"addRequest");Kl.prototype.createSocket=o(function(e,r){vars=this,i={};s.sockets.push(i);varn=WD({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(n.localAddress=e.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+newBuffer(n.proxyAuth).toString("base64")),Oh("making CONNECT request");vara=s.request(n);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",h),a.end();functionc(d){d.upgrade=!0}o(c,"onResponse");functionl(d,f,p){process.nextTick(function(){u(d,f,p)})}o(l,"onUpgrade");functionu(d,f,p){if(a.removeAllListeners(),f.removeAllListeners(),d.statusCode!==200){Oh("tunneling socket could not be established, statusCode=%d",d.statusCode),f.destroy();varA=newError("tunneling socket could not be established, statusCode="+d.statusCode);A.code="ECONNRESET",e.request.emit("error",A),s.removeSocket(i);return}if(p.length>0){Oh("got illegal response body from proxy"),f.destroy();varA=newError("got illegal response body from proxy");A.code="ECONNRESET",e.request.emit("error",A),s.removeSocket(i);return}returnOh("tunneling connection has established"),s.sockets[s.sockets.indexOf(i)]=f,r(f)}o(u,"onConnect");functionh(d){a.removeAllListeners(),Oh(`tunneling socket could not be established, cause=%s
`);f.push(m),n+=m.byteLength,A&&(n=null),i=t,s=o(async function*(){for(let C of f)C.stream?yield*C.stream():yield C},"action"),a=`multipart/form-data;boundary=${l}`}else if(y7(t))i=t,n=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(cC.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:S2e(t)}if((typeof i=="string"||cC.isBuffer(i))&&(n=Buffer.byteLength(i)),s!=null){let l;r=new ReadableStream({async start(){l=s(t)[Symbol.asyncIterator]()},async pull(u){let{value:h,done:d}=await l.next();if(d)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!b7(r)){let f=new Uint8Array(h);f.byteLength&&u.enqueue(f)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:i,length:n},a]}o(B7,"extractBody");function L2e(t,e=!1){return t instanceof ReadableStream&&(tL(!cC.isDisturbed(t),"The body has already been consumed."),tL(!t.locked,"The stream is locked.")),B7(t,e)}o(L2e,"safelyExtractBody");function M2e(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}o(M2e,"cloneBody");function F2e(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(F2e,"throwIfAborted");function U2e(t){return{blob(){return rm(this,r=>{let s=C7(this);return s===null?s="":s&&(s=O2e(s)),new _2e([r],{type:s})},t)},arrayBuffer(){return rm(this,r=>new Uint8Array(r).buffer,t)},text(){return rm(this,I7,t)},json(){return rm(this,G2e,t)},formData(){return rm(this,r=>{let s=C7(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let i=D2e(r,s);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let n=new E7;return n[sm]=i,n}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),n=new E7;for(let[a,c]of i)n.append(a,c);return n}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return rm(this,r=>new Uint8Array(r),t)}}}o(U2e,"bodyMixinMethods");function q2e(t){Object.assign(t.prototype,U2e(t))}o(q2e,"mixinBody");async function rm(t,e,r){if(T2e.brandCheck(t,r),x7(t))throw new TypeError("Body is unusable: Body has already been read");F2e(t[sm]);let s=N2e(),i=o(a=>s.reject(a),"errorSteps"),n=o(a=>{try{s.resolve(e(a))}catch(c){i(c)}},"successSteps");return t[sm].body==null?(n(Buffer.allocUnsafe(0)),s.promise):(await R2e(t[sm].body,n,i),s.promise)}o(rm,"consumeBody");function x7(t){let e=t[sm].body;return e!=null&&(e.stream.locked||cC.isDisturbed(e.stream))}o(x7,"bodyUnusable");function G2e(t){return JSON.parse(I7(t))}o(G2e,"parseJSONFromBytes");function C7(t){let e=t[sm].headersList,r=v2e(e);return r==="failure"?null:r}o(C7,"bodyMimeType");N7.exports={extractBody:B7,safelyExtractBody:L2e,cloneBody:M2e,mixinBody:q2e,streamRegistry:S7,hasFinalizationRegistry:w7,bodyUnusable:x7}});var H7=g((rOt,G7)=>{"use strict";var Te=require("node:assert"),Oe=it(),{channels:R7}=VA(),sL=Mk(),{RequestContentLengthMismatchError:Cf,ResponseContentLengthMismatchError:v7,RequestAbortedError:L7,HeadersTimeoutError:H2e,HeadersOverflowError:z2e,SocketError:nm,InformationalError:om,BodyTimeoutError:V2e,HTTPParserError:$2e,ResponseExceededMaxSizeError:j2e}=Ct(),{kUrl:M7,kReset:an,kClient:cB,kParser:Zt,kBlocking:hC,kRunning:Wr,kPending:F7,kSize:T7,kWriting:kh,kQueue:_a,kNoRef:lC,kKeepAliveDefaultTimeout:J2e,kHostHeader:Y2e,kPendingIdx:W2e,kRunningIdx:Qo,kError:wi,kPipelining:lB,kSocket:bf,kKeepAliveTimeoutValue:hB,kMaxHeadersSize:iL,kKeepAliveMaxTimeout:K2e,kKeepAliveTimeoutThreshold:X2e,kHeadersTimeout:Z2e,kBodyTimeout:eFe,kStrictContentLength:aL,kMaxRequests:_7,kCounter:tFe,kMaxResponseSize:rFe,kOnError:Q7,kResume:su,kHTTPContext:U7}=cr(),qn=SX(),P7=Buffer.alloc(0),nB=Buffer[Symbol.species],oB=Oe.addListener,sFe=Oe.removeAllListeners,wf=Symbol("kIdleSocketValidation"),If=Symbol("kIdleSocketValidationTimeout"),hL=Symbol("kSocketUsed"),nL;async function iFe(){let t=process.env.JEST_WORKER_ID?qk():vo
`}return R7.sendHeaders.hasSubscribers&&R7.sendHeaders.publish({request:e,headers:m,socket:p}),!l||f===0?D7(A,null,t,e,p,h,m,d):Oe.isBuffer(l)?D7(A,l,t,e,p,h,m,d):Oe.isBlobLike(l)?typeof l.stream=="function"?k7(A,l.stream(),t,e,p,h,m,d):dFe(A,l,t,e,p,h,m,d):Oe.isStream(l)?hFe(A,l,t,e,p,h,m,d):Oe.isIterable(l)?k7(A,l,t,e,p,h,m,d):Te(!1),!0}o(uFe,"writeH1");function hFe(t,e,r,s,i,n,a,c){Te(n!==0||r[Wr]===0,"stream body cannot be pipelined");let l=!1,u=new dB({abort:t,socket:i,request:s,contentLength:n,client:r,expectsPayload:c,header:a}),h=o(function(A){if(!l)try{!u.write(A)&&this.pause&&this.pause()}catch(m){Oe.destroy(this,m)}},"onData"),d=o(function(){l||e.resume&&e.resume()},"onDrain"),f=o(function(){if(queueMicrotask(()=>{e.removeListener("error",p)}),!l){let A=new L7;queueMicrotask(()=>p(A))}},"onClose"),p=o(function(A){if(!l){if(l=!0,Te(i.destroyed||i[kh]&&r[Wr]<=1),i.off("drain",d).off("error",p),e.removeListener("data",h).removeListener("end",p).removeListener("close",f),!A)try{u.end()}catch(m){A=m}u.destroy(A),A&&(A.code!=="UND_ERR_INFO"||A.message!=="reset")?Oe.destroy(e,A):Oe.destroy(e)}},"onFinished");e.on("data",h).on("end",p).on("error",p).on("close",f),e.resume&&e.resume(),i.on("drain",d).on("error",p),e.errorEmitted??e.errored?setImmediate(()=>p(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>p(null)),(e.closeEmitted??e.closed)&&setImmediate(f)}o(hFe,"writeStream");function D7(t,e,r,s,i,n,a,c){try{e?Oe.isBuffer(e)&&(Te(n===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${a}content-length:${n}\r
`,"latin1"):(Te(n===null,"no body must not have content length"),i.write(`${a}\r
`,"latin1")),s.onRequestSent(),r[su]()}catch(l){t(l)}}o(D7,"writeBuffer");async function dFe(t,e,r,s,i,n,a,c){Te(n===e.size,"blob body must have content length");try{if(n!=null&&n!==e.size)throw new Cf;let l=Buffer.from(await e.arrayBuffer());i.cork(),i.write(`${a}content-length:${n}\r
`,"latin1"),i.write(l),i.uncork(),s.onBodySent(l),s.onRequestSent(),!c&&s.reset!==!1&&(i[an]=!0),r[su]()}catch(l){t(l)}}o(dFe,"writeBlob");async function k7(t,e,r,s,i,n,a,c){Te(n!==0||r[Wr]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let f=l;l=null,f()}}o(u,"onDrain");let h=o(()=>new Promise((f,p)=>{Te(l===null),i[wi]?p(i[wi]):l=f}),"waitForDrain");i.on("close",u).on("drain",u);let d=new dB({abort:t,socket:i,request:s,contentLength:n,client:r,expectsPayload:c,header:a});try{for await(let f of e){if(i[wi])throw i[wi];d.write(f)||await h()}d.end()}catch(f){d.destroy(f)}finally{i.off("close",u).off("drain",u)}}o(k7,"writeIterable");var dB=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:s,contentLength:i,client:n,expectsPayload:a,header:c}){this.socket=r,this.request=s,this.contentLength=i,this.client=n,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[kh]=!0}write(e){let{socket:r,request:s,contentLength:i,client:n,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[wi])throw r[wi];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(i!==null&&a+u>i){if(n[aL])throw new Cf;process.emitWarning(new Cf)}r.cork(),a===0&&(!c&&s.reset!==!1&&(r[an]=!0),i===null?r.write(`${l}transfer-encoding:chunked\r
`,"latin1"),r!==null&&i!==r){if(s[aL])throw new Cf;process.emitWarning(new Cf)}e[Zt].timeout&&e[Zt].timeoutType===am&&e[Zt].timeout.refresh&&e[Zt].timeout.refresh(),s[su]()}}destroy(e){let{socket:r,client:s,abort:i}=this;r[kh]=!1,e&&(Te(s[Wr]<=1,"pipeline should only contain this request"),i(e))}};G7.exports=oFe});var K7=g((iOt,W7)=>{"use strict";var Po=require("node:assert"),{pipeline:fFe}=require("node:stream"),ut=it(),{RequestContentLengthMismatchError:dL,RequestAbortedError:z7,SocketError:dC,InformationalError:fL}=Ct(),{kUrl:fB,kReset:AB,kClient:cm,kRunning:mB,kPending:pFe,kQueue:Lh,kPendingIdx:pL,kRunningIdx:Qa,kError:Oa,kSocket:ys,kStrictContentLength:AFe,kOnError:AL,kMaxConcurrentStreams:Y7,kHTTP2Session:Pa,kResume:Mh,kSize:mFe,kHTTPContext:gFe}=cr(),iu=Symbol("open streams"),V7,$7=!1,pB;try{pB=require("node:http2")}catch{pB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:yFe,HTTP2_HEADER_METHOD:EFe,HTTP2_HEADER_PATH:CFe,HTTP2_HEADER_SCHEME:IFe,HTTP2_HEADER_CONTENT_LENGTH:bFe,HTTP2_HEADER_EXPECT:wFe,HTTP2_HEADER_STATUS:SFe}}=pB;function BFe(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let i of s)e.push(Buffer.from(r),Buffer.from(i));else e.push(Buffer.from(r),Buffer.from(s));return e}o(BFe,"parseH2Headers");async function xFe(t,e){t[ys]=e,$7||($7=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=pB.connect(t[fB],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Y7]});r[iu]=0,r[cm]=t,r[ys]=e,ut.addListener(r,"error",RFe),ut.addListener(r,"frameError",vFe),ut.addListener(r,"end",TFe),ut.addListener(r,"goaway",_Fe),ut.addListener(r,"close",function(){let{[cm]:i}=this,{[ys]:n}=i,a=this[ys][Oa]||this[Oa]||new dC("closed",ut.getSocketInfo(n));if(i[Pa]=null,i.destroyed){Po(i[pFe]===0);let c=i[Lh].splice(i[Qa]);for(let l=0;l<c.length;l++){let u=c[l];ut.errorRequest(i,u,a)}}}),r.unref(),t[Pa]=r,e[Pa]=r,ut.addListener(e,"error",function(i){Po(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Oa]=i,this[cm][AL](i)}),ut.addListener(e,"end",function(){ut.destroy(this,new dC("other side closed",ut.getSocketInfo(this)))}),ut.addListener(e,"close",function(){let i=this[Oa]||new dC("closed",ut.getSocketInfo(this));t[ys]=null,this[Pa]!=null&&this[Pa].destroy(i),t[pL]=t[Qa],Po(t[mB]===0),t.emit("disconnect",t[fB],[t],i),t[Mh]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return PFe(t,...i)},resume(){NFe(t)},destroy(i,n){s?queueMicrotask(n):e.destroy(i).on("close",n)},get destroyed(){return e.destroyed},busy(){return!1}}}o(xFe,"connectH2");function NFe(t){let e=t[ys];e?.destroyed===!1&&(t[mFe]===0&&t[Y7]===0?(e.unref(),t[Pa].unref()):(e.ref(),t[Pa].ref()))}o(NFe,"resumeH2");function RFe(t){Po(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[ys][Oa]=t,this[cm][AL](t)}o(RFe,"onHttp2SessionError");function vFe(t,e,r){if(r===0){let s=new fL(`HTTP/2:"frameError"received-type${t},code${e}`);this[ys][Oa]=s,this[cm][AL](s)}}o(vFe,"onHttp2FrameError");function TFe(){let t=new dC("other side closed",ut.getSocketInfo(this[ys]));this.destroy(t),ut.destroy(this[ys],t)}o(TFe,"onHttp2SessionEnd");function _Fe(t){let e=this[Oa]||new dC(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,ut.getSocketInfo(this)),r=this[cm];if(r[ys]=null,r[gFe]=null,this[Pa]!=null&&(this[Pa].destroy(e),this[Pa]=null),ut.destroy(this[ys],e),r[Qa]<r[Lh].length){let s=r[Lh][r[Qa]];r[Lh][r[Qa]++]=null,ut.errorRequest(r,s,e),r[pL]=r[Qa]}Po(r[mB]===0),r.emit("disconnect",r[fB],[r],e),r[Mh]()}o(_Fe,"onHTTP2GoAway");function QFe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(QFe,"shouldSendContentLength");function PFe(t,e){let r=t[Pa],{method:s,path:i,host:n,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:h}=e;if(a)return ut.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let x=0;x<u.length;x+=2){let R=u[x+0],D=u[x+1];if(Array.isArray(D))for(let O=0;O<D.length;O++)d[R]?d[R]+=`,${D[O]}`:d[R]=D[O];else d[R]=D}let f,{hostname:p,port:A}=t[fB];d[yFe]=n||`${p}
`;if(s.username||s.password){let f=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(f).toString("base64")}`}n.Host=`${a}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(n))c+=`${f}:${n[f]}\r
`)+4,e.outputData[0].data=e._header+s.substring(i),cg("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(cg("Creating `tls.Socket`: %o",this.connectOpts),n=dKe.connect(this.connectOpts)):(cg("Creating `net.Socket`: %o",this.connectOpts),n=hKe.connect(this.connectOpts)),await(0,pKe.once)(n,"connect"),n}};HN.protocols=["http","https"];Jo.HttpProxyAgent=HN;function mKe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(mKe,"omit")});var She=g(sR=>{"use strict";Object.defineProperty(sR,"__esModule",{value:!0});sR.state=void 0;sR.state={instrumenterImplementation:void 0}});var qhe=g(cR=>{"use strict";Object.defineProperty(cR,"__esModule",{value:!0});cR.state=void 0;cR.state={operationRequestMap:new WeakMap}});var Epe=g(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});var Mtt=require("os"),Ftt=require("util");function Utt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(Utt,"_interopDefaultLegacy");var qtt=Utt(Ftt);function Gtt(t,...e){process.stderr.write(`${qtt.default.format(t,...e)}${Mtt.EOL}`)}o(Gtt,"log");var lpe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,hpe,e8=[],t8=[],Nv=[];lpe&&r8(lpe);var dpe=Object.assign(t=>fpe(t),{enable:r8,enabled:s8,disable:Htt,log:Gtt});function r8(t){hpe=t,e8=[],t8=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?t8.push(new RegExp(`^${s.substr(1)}$`)):e8.push(new RegExp(`^${s}$`));for(let s of Nv)s.enabled=s8(s.namespace)}o(r8,"enable");function s8(t){if(t.endsWith("*"))return!0;for(let e of t8)if(e.test(t))return!1;for(let e of e8)if(e.test(t))return!0;return!1}o(s8,"enabled");function Htt(){let t=hpe||"";return r8(""),t}o(Htt,"disable");function fpe(t){let e=Object.assign(r,{enabled:s8(t),destroy:ztt,log:dpe.log,namespace:t,extend:Vtt});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return o(r,"debug"),Nv.push(e),e}o(fpe,"createDebugger");function ztt(){let t=Nv.indexOf(this);return t>=0?(Nv.splice(t,1),!0):!1}o(ztt,"destroy");function Vtt(t){let e=fpe(`${this.namespace}:${t}`);return e.log=this.log,e}o(Vtt,"extend");var S0=dpe,ppe=new Set,Bv=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,Rv,vv=S0("azure");vv.log=(...t)=>{S0.log(...t)};var i8=["verbose","info","warning","error"];Bv&&(ype(Bv)?Ape(Bv):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${Bv}';loggingisnotenabled.Acceptablevalues:${i8.join(", ")}.`));function Ape(t){if(t&&!ype(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${i8.join(",")}`);Rv=t;let e=[];for(let r of ppe)gpe(r)&&e.push(r.namespace);S0.enable(e.join(","))}o(Ape,"setLogLevel");function $tt(){return Rv}o($tt,"getLogLevel");var upe={verbose:400,info:300,warning:200,error:100};function jtt(t){let e=vv.extend(t);return mpe(vv,e),{error:xv(e,"error"),warning:xv(e,"warning"),info:xv(e,"info"),verbose:xv(e,"verbose")}}o(jtt,"createClientLogger");function mpe(t,e){e.log=(...r)=>{t.log(...r)}}o(mpe,"patchLogMethod");function xv(t,e){let r=Object.assign(t.extend(e),{level:e});if(mpe(t,r),gpe(r)){let s=S0.disable();S0.enable(s+","+r.namespace)}return ppe.add(r),r}o(xv,"createLogger");function gpe(t){return!!(Rv&&upe[t.level]<=upe[Rv])}o(gpe,"shouldEnable");function ype(t){return i8.includes(t)}o(ype,"isAzureLogLevel");xg.AzureLogger=vv;xg.createClientLogger=jtt;xg.getLogLevel=$tt;xg.setLogLevel=Ape});var a8=g(x0=>{"use strict";Object.defineProperty(x0,"__esModule",{value:!0});var Ng=new WeakMap,Tv=new WeakMap,B0=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,Ng.set(this,[]),Tv.set(this,!1)}get aborted(){if(!Tv.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Tv.get(this)}static get none(){return new t}addEventListener(e,r){if(!Ng.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Ng.get(this).push(r)}removeEventListener(e,r){if(!Ng.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Ng.get(this),i=s.indexOf(r);i>-
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(Plt,"logUnexpecedPropertyAccessOnce");function Olt(){Object.keys(c_).forEach(function(t){delete c_[t]})}o(Olt,"resetLoggedProperties")});var u_=g(hl=>{"use strict";hl.__esModule=!0;hl.HandlebarsEnvironment=RV;function sEe(t){return t&&t.__esModule?t:{default:t}}o(sEe,"_interopRequireDefault");var Qp=Fi(),Dlt=po(),xV=sEe(Dlt),klt=bV(),Llt=Zye(),Mlt=SV(),l_=sEe(Mlt),Flt=BV(),Ult="4.7.9";hl.VERSION=Ult;var qlt=8;hl.COMPILER_REVISION=qlt;var Glt=7;hl.LAST_COMPATIBLE_COMPILER_REVISION=Glt;var Hlt={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"};hl.REVISION_CHANGES=Hlt;var NV="[object Object]";function RV(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},klt.registerDefaultHelpers(this),Llt.registerDefaultDecorators(this)}o(RV,"HandlebarsEnvironment");RV.prototype={constructor:RV,logger:l_.default,log:l_.default.log,registerHelper:o(function(e,r){if(Qp.toString.call(e)===NV){if(r)throw new xV.default("Arg not supported with multiple helpers");Qp.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(Qp.toString.call(e)===NV)Qp.extend(this.partials,e);else{if(typeof r>"u")throw new xV.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(Qp.toString.call(e)===NV){if(r)throw new xV.default("Arg not supported with multiple decorators");Qp.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){Flt.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var zlt=l_.default.log;hl.log=zlt;hl.createFrame=Qp.createFrame;hl.logger=l_.default});var nEe=g((h_,iEe)=>{"use strict";h_.__esModule=!0;function vV(t){this.string=t}o(vV,"SafeString");vV.prototype.toString=vV.prototype.toHTML=function(){return""+this.string};h_.default=vV;iEe.exports=h_.default});var oEe=g(TV=>{"use strict";TV.__esModule=!0;TV.wrapHelper=Vlt;function Vlt(t,e){if(typeof t!="function")return t;var r=o(function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)},"wrapper");return r}o(Vlt,"wrapHelper")});var dEe=g(Bd=>{"use strict";Bd.__esModule=!0;Bd.checkRevision=Klt;Bd.template=Xlt;Bd.wrapProgram=d_;Bd.resolvePartial=Zlt;Bd.invokePartial=eut;Bd.noop=uEe;function $lt(t){return t&&t.__esModule?t:{default:t}}o($lt,"_interopRequireDefault");function jlt(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(jlt,"_interopRequireWildcard");var Jlt=Fi(),ey=jlt(Jlt),Ylt=po(),ku=$lt(Ylt),Lu=u_(),aEe=bV(),Wlt=oEe(),cEe=BV();function Klt(t){var e=t&&t[0]||1,r=Lu.COMPILER_REVISION;if(!(e>=Lu.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Lu.COMPILER_REVISION))if(e<Lu.LAST_COMPATIBLE_COMPILER_REVISION){var s=Lu.REVISION_CHANGES[r],i=Lu.REVISION_CHANGES[e];throw new ku.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+i+").")}else throw new ku.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(Klt,"checkRevision");function Xlt(t,e){if(!e)throw new ku.default("No environment passed to template");if(!t||!t.main)throw new ku.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(a,c,l){l.hash&&(c=ey.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.res
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,c,l,u,h;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length&&(c=this._input.match(this.rules[d[f]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,l=f,!this.options.flex)));f++);return a?(h=a[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],n=this.performAction.call(this,this.yy,this,d[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
${Y1(u)}${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return W1(t,l)}o(pNe,"insert");So.exports.find=b0t;async function b0t(t,e){let r=Ew(t,e);try{return(await J1(r)).reduce((i,n)=>n&&n.key===e?W1(t,n):i,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}o(b0t,"find");So.exports.delete=w0t;function w0t(t,e,r={}){if(!r.removeFully)return pNe(t,e,null,r);let s=Ew(t,e);return fNe(s,{recursive:!0,force:!0})}o(w0t,"del");So.exports.lsStream=ANe;function ANe(t){let e=xj(t),r=new p0t({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(j1(),$1)),i=await Sj(e);return await s(i,async n=>{let a=_l.join(e,n),c=await Sj(a);await s(c,async l=>{let u=_l.join(a,l),h=await Sj(u);await s(h,async d=>{let f=_l.join(u,d);try{let A=(await J1(f)).reduce((m,C)=>(m.set(C.key,C),m),new Map);for(let m of A.values()){let C=W1(t,m);C&&r.write(C)}}catch(p){if(p.code==="ENOENT")return;throw p}},{concurrency:wj})},{concurrency:wj})},{concurrency:wj}),r.end(),r}).catch(s=>r.emit("error",s)),r}o(ANe,"lsStream");So.exports.ls=S0t;async function S0t(t){return(await ANe(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}o(S0t,"ls");So.exports.bucketEntries=J1;async function J1(t,e){let r=await h0t(t,"utf8");return B0t(r,e)}o(J1,"bucketEntries");function B0t(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||Y1(s[1])!==s[0])return;let i;try{i=JSON.parse(s[1])}catch{}i&&e.push(i)}),e}o(B0t,"_bucketEntries");So.exports.bucketDir=xj;function xj(t){return _l.join(t,`index-v${E0t}`)}o(xj,"bucketDir");So.exports.bucketPath=Ew;function Ew(t,e){let r=mNe(e);return _l.join.apply(_l,[xj(t)].concat(y0t(r)))}o(Ew,"bucketPath");So.exports.hashKey=mNe;function mNe(t){return gNe(t,"sha256")}o(mNe,"hashKey");So.exports.hashEntry=Y1;function Y1(t){return gNe(t,"sha1")}o(Y1,"hashEntry");function gNe(t,e){return l0t.createHash(e).update(t).digest("hex")}o(gNe,"hash");function W1(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?g0t(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(W1,"formatEntry");function Sj(t){return d0t(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(Sj,"readdirOrEmpty")});var Iw=g(Z1=>{"use strict";Object.defineProperty(Z1,"__esModule",{value:!0});Z1.LRUCache=void 0;var x0t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ENe=new Set,Nj=typeof process=="object"&&process?process:{},CNe=o((t,e,r,s)=>{typeof Nj.emitWarning=="function"?Nj.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},"I"),X1=globalThis.AbortController,yNe=globalThis.AbortSignal;if(typeof X1>"u"){yNe=class{static{o(this,"L")}onabort;_onabort=[];reason;aborted=!1;addEventListener(r,s){this._onabort.push(s)}},X1=class{static{o(this,"C")}constructor(){e()}signal=new yNe;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let s of this.signal._onabort)s(r);this.signal.onabort?.(r)}}};let t=Nj.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{t&&(t=!1,CNe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"t")}var N0t=o(t=>!ENe.has(t),"G"),$d=o(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"y"),INe=o(t=>$d(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?K1:null:null,"M"),K1=class extends Array{static{o(this,"z")}constructor(t){super(t),this.fill(0)}},R0t=class Cw{static{o(this,"a")}heap;length;static#e=!1;static create(e){let r=INe(e);if(!r)return[];Cw.#e=!0;let s=new Cw(e,r);return Cw.#e=!1,s}constructor(e,r){if(!Cw.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},v0t=class bNe{static{o(this,"a")}#e;#t;#s;#r;#i;#n;#u;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#d;#p;#h;#o;#y;#I;#g;#A;#x;#m;#S;#B;#E;#C;#b;#R;#c;#O;static unsafeExposeInternals(e){return{starts:e.#B,ttls:e.#E,autopurgeTimers:e.#C,sizes:e.#S,keyMap:e.#p,keyList:e.#h,valList:e.#o,next:e.#y,prev:e.#I,get head(){return e.#g},get tail(){return e.#A},free:e.#x,isBackgroundFetch:o(r=>e.#f(r),"isBackgroundFetch"),backgroundFetch:o((r,s,i,n)=>e.#G(r,s,i,n),"backgroundFetch"),moveToTail:o(r=>e.#P(r),"moveToTail"),indexes:o(r=>e.#v(r),"indexes"),rindexes:o(r=>e.#T(r),"rindexes"),isStale:o(r=>e.#w(r),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#d}get size(){return this.#a}get fetchMethod(){return this.#n}get memoMethod(){return this.#u}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowS
globstarwhile`,T,te,P,Le,ot),this.matchOne(T.slice(te),P.slice(Le),L))return this.debug("globstar found match!",te,v,ot),!0;if(ot==="."||ot===".."||!G.dot&&ot.charAt(0)==="."){this.debug("dot detected!",T,te,P,Le);break}this.debug("globstar swallow a segment, and continue"),te++}return!!(L&&(this.debug(`
>>>nomatch,partial?`,T,te,P,Le),te===v))}let st;if(typeof J=="string"?(st=ge===J,this.debug("string match",J,ge,st)):(st=J.test(ge),this.debug("pattern match",J,ge,st)),!st)return!1}if(y===v&&B===F)return!0;if(y===v)return L;if(B===F)return y===v-1&&T[y]==="";throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(T){(0,r.assertValidPattern)(T);let P=this.options;if(T==="**")return t.GLOBSTAR;if(T==="")return"";let L,G=null;(L=T.match(E))?G=P.dot?S:I:(L=T.match(c))?G=(P.nocase?P.dot?d:h:P.dot?u:l)(L[1]):(L=T.match(x))?G=(P.nocase?P.dot?D:R:P.dot?O:M)(L):(L=T.match(f))?G=P.dot?A:p:(L=T.match(m))&&(G=C);let W=s.AST.fromGlob(T,this.options).toMMPattern();return G&&typeof W=="object"&&Reflect.defineProperty(W,"test",{value:G}),W}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let T=this.set;if(!T.length)return this.regexp=!1,this.regexp;let P=this.options,L=P.noglobstar?j:P.dot?se:Pe,G=new Set(P.nocase?["i"]:[]),W=T.map(v=>{let F=v.map(ge=>{if(ge instanceof RegExp)for(let te of ge.flags.split(""))G.add(te);return typeof ge=="string"?Vt(ge):ge===t.GLOBSTAR?t.GLOBSTAR:ge._src});F.forEach((ge,te)=>{let Le=F[te+1],ot=F[te-1];ge!==t.GLOBSTAR||ot===t.GLOBSTAR||(ot===void 0?Le!==void 0&&Le!==t.GLOBSTAR?F[te+1]="(?:\\/|"+L+"\\/)?"+Le:F[te]=L:Le===void 0?F[te-1]=ot+"(?:\\/|\\/"+L+")?":Le!==t.GLOBSTAR&&(F[te-1]=ot+"(?:\\/|\\/"+L+"\\/)"+Le,F[te+1]=t.GLOBSTAR))});let J=F.filter(ge=>ge!==t.GLOBSTAR);if(this.partial&&J.length>=1){let ge=[];for(let te=1;te<=J.length;te++)ge.push(J.slice(0,te).join("/"));return"(?:"+ge.join("|")+")"}return J.join("/")}).join("|"),[y,B]=T.length>1?["(?:",")"]:["",""];W="^"+y+W+B+"$",this.partial&&(W="^(?:\\/|"+y+W.slice(1,-1)+B+")$"),this.negate&&(W="^(?!"+W+").+$");try{this.regexp=new RegExp(W,[...G].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(T){return this.preserveMultipleSlashes?T.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(T)?["",...T.split(/\/+/)]:T.split(/\/+/)}match(T,P=this.partial){if(this.debug("match",T,this.pattern),this.comment)return!1;if(this.empty)return T==="";if(T==="/"&&P)return!0;let L=this.options;this.isWindows&&(T=T.split("\\").join("/"));let G=this.slashSplit(T);this.debug(this.pattern,"split",G);let W=this.set;this.debug(this.pattern,"set",W);let y=G[G.length-1];if(!y)for(let B=G.length-2;!y&&B>=0;B--)y=G[B];for(let B=0;B<W.length;B++){let v=W[B],F=G;if(L.matchBase&&v.length===1&&(F=[y]),this.matchOne(F,v,P))return L.flipNegate?!0:!this.negate}return L.flipNegate?!1:this.negate}static defaults(T){return t.minimatch.defaults(T).Minimatch}};t.Minimatch=ns;var Ln=VNe();Object.defineProperty(t,"AST",{enumerable:!0,get:o(function(){return Ln.AST},"get")});var Tt=$Ne();Object.defineProperty(t,"escape",{enumerable:!0,get:o(function(){return Tt.escape},"get")});var No=Gj();Object.defineProperty(t,"unescape",{enumerable:!0,get:o(function(){return No.unescape},"get")}),t.minimatch.AST=s.AST,t.minimatch.Minimatch=ns,t.minimatch.escape=i.escape,t.minimatch.unescape=n.unescape}),Cbt=Ks(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;var e=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,r=new Set,s=typeof process=="object"&&process?process:{},i=o((p,A,m,C)=>{typeof s.emitWarning=="function"?s.emitWarning(p,A,m,C):console.error(`[${m}]${A}:${p}`)},"ls"),n=globalThis.AbortController,a=globalThis.AbortSignal;if(typeof n>"u"){a=class{static{o(this,"os")}onabort;_onabort=[];reason;aborted=!1;addEventListener(m,C){this._onabort.push(C)}},n=class{static{o(this,"Lt")}constructor(){A()}signal=new a;abort(m){if(!this.signal.aborted){this.signal.reason=m,this.signal.aborted=!0;for(let C of this.signal._onabort)C(m);this.signal.onabort?.(m)}}};let p=s.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",A=o(()=>{p&&(p=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other conte
`;if(s.username||s.password){let f=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(f).toString("base64")}`}n.Host=`${a}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(n))c+=`${f}:${n[f]}\r
`);let{connect:u,buffered:h}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",iSt),r.secureEndpoint){Ow("Upgrading socket connection to TLS");let f=r.servername||r.host;return jRe.connect({...JRe(r,"host","path","port"),socket:i,servername:Pw.isIP(f)?void 0:f})}return i}i.destroy();let d=new Pw.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{Ow("Replaying proxy buffer for failed request"),(0,Zwt.default)(f.listenerCount("data")>0),f.push(h),f.push(null)}),d}};gP.protocols=["http","https"];ya.HttpsProxyAgent=gP;function iSt(t){t.resume()}o(iSt,"resume");function JRe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(JRe,"omit")});var tve=g(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var XRe=require("buffer"),EA={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};Ih.ERRORS=EA;function nSt(t){if(!XRe.Buffer.isEncoding(t))throw new Error(EA.INVALID_ENCODING)}o(nSt,"checkEncoding");Ih.checkEncoding=nSt;function ZRe(t){return typeof t=="number"&&isFinite(t)&&lSt(t)}o(ZRe,"isFiniteInteger");Ih.isFiniteInteger=ZRe;function eve(t,e){if(typeof t=="number"){if(!ZRe(t)||t<0)throw new Error(e?EA.INVALID_OFFSET:EA.INVALID_LENGTH)}else throw new Error(e?EA.INVALID_OFFSET_NON_NUMBER:EA.INVALID_LENGTH_NON_NUMBER)}o(eve,"checkOffsetOrLengthValue");function oSt(t){eve(t,!1)}o(oSt,"checkLengthValue");Ih.checkLengthValue=oSt;function aSt(t){eve(t,!0)}o(aSt,"checkOffsetValue");Ih.checkOffsetValue=aSt;function cSt(t,e){if(t<0||t>e.length)throw new Error(EA.INVALID_TARGET_OFFSET)}o(cSt,"checkTargetOffset");Ih.checkTargetOffset=cSt;function lSt(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}o(lSt,"isInteger");function uSt(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof XRe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}o(uSt,"bigIntAndBufferInt64Check");Ih.bigIntAndBufferInt64Check=uSt});var sve=g(dJ=>{"use strict";Object.defineProperty(dJ,"__esModule",{value:!0});var rt=tve(),rve=4096,hSt="utf8",hJ=class t{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=hSt,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(rt.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(rt.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(rt.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(rt.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(rve);else{if(typeof e<"u")throw new Error(rt.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(rve)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}read
`,f1t=/\u2014 (\S+) (\S+)\n/g;function p1t(t,e){let r=t.inclusionProof,s=aW.fromString(r.checkpoint.envelope),i=rD.fromString(s.note);if(!A1t(s,e))throw new uS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return i}o(p1t,"verifyCheckpoint");function A1t(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let i=e.find(n=>n1e.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint)&&n.baseURL.match(s.name));return i?n1e.crypto.verify(r,i.publicKey,s.signature):!1})}o(A1t,"verifySignedNote");var aW=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(oW))throw new uS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(oW),s=e.slice(0,r+1),n=e.slice(r+oW.length).matchAll(f1t),a=Array.from(n,c=>{let[,l,u]=c,h=Buffer.from(u,"base64");if(h.length<5)throw new uS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:l,keyHint:h.subarray(0,4),signature:h.subarray(4)}});if(a.length===0)throw new uS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,a)}},rD=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,s,i){this.origin=e,this.logSize=r,this.logHash=s,this.rest=i}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new uS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],i=BigInt(r[1]),n=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(s,i,n,a)}};hS.LogCheckpoint=rD});var a1e=g(hW=>{"use strict";Object.defineProperty(hW,"__esModule",{value:!0});hW.verifyMerkleInclusion=y1t;var uW=yo(),cW=yi(),m1t=Buffer.from([0]),g1t=Buffer.from([1]);function y1t(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),i=BigInt(e.logSize);if(s<0n||s>=i)throw new cW.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:n,border:a}=E1t(s,i);if(r.hashes.length!==n+a)throw new cW.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,n),l=r.hashes.slice(n),u=B1t(t.canonicalizedBody),h=I1t(C1t(u,c,s),l);if(!uW.crypto.bufferEqual(h,e.logHash))throw new cW.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(y1t,"verifyMerkleInclusion");function E1t(t,e){let r=b1t(t,e),s=w1t(t>>BigInt(r));return{inner:r,border:s}}o(E1t,"decompInclProof");function C1t(t,e,r){return e.reduce((s,i,n)=>r>>BigInt(n)&BigInt(1)?lW(i,s):lW(s,i),t)}o(C1t,"chainInner");function I1t(t,e){return e.reduce((r,s)=>lW(s,r),t)}o(I1t,"chainBorderRight");function b1t(t,e){return S1t(t^e-BigInt(1))}o(b1t,"innerProofSize");function w1t(t){return t.toString(2).split("1").length-1}o(w1t,"onesCount");function S1t(t){return t===0n?0:t.toString(2).length}o(S1t,"bitLength");function lW(t,e){return uW.crypto.digest("sha256",g1t,t,e)}o(lW,"hashChildren");function B1t(t){return uW.crypto.digest("sha256",m1t,t)}o(B1t,"hashLeaf")});var l1e=g(dW=>{"use strict";Object.defineProperty(dW,"__esModule",{value:!0});dW.verifyTLogSET=R1t;var c1e=yo(),x1t=yi(),N1t=FE();function R1t(t,e){if(!(0,N1t.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(i=>{let n=v1t(t),a=Buffer.from(c1e.json.canonicalize(n),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return c1e.crypto.verify(a,i.publicKey,c)}))throw new x1t.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(R1t,"verifyTLogSET");function v1t(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:i}=t;return{body:i.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}o(v1t,"toVerificationPayload")});var h1e=g(sD=>{"use strict";Object.defineProperty(sD,"__esModule",{value:!0});sD.verifyTLogBody=O1t;sD.verifyTLogInclusion=D1t;var u1e=oY(),AW=yi(),fW=r1e(),pW=s1e(),T1t=i1e(),_1t=o1e(),Q1t=a1e(),P1t=l1e();function O1t(t,e){let{kind:r,version:s}=t.kindVersion,i=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==i.kind||s!==i.apiVersion)throw new AW.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${i.kind}/${i.apiVersion}`});switch(r){case"dsse":if(s==fW.DSSE_API_VERSION_V1)return(0,fW.verifyDSSETLogBody)(i,e);{let n=u1e.Entry.fromJSON(i);return(0,fW.verifyDSSETLogBodyV2)(n,e)}case"intoto":return(0,T1t.verifyIntotoTLogBody)(i,e);case"hashedrekord":if(s==pW.HASHEDREKORD_API_VERSION_V1)return(0,pW.verifyHashedRekordTLogBody)(i,e);{let n=u1e.Entry.fromJSON(i);return(0,pW.verifyHashedRekordTLogBodyV2)(n,e)}default:throw new AW.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}o(O1t,"verifyTLogBody");function D1t(t,e){let r=!1;if(k1t(t)&&((0,P1t.verifyTLogSET)(t,e),r=!0),L1t(t)){let s=(0,_1t.verifyCheckpoint)(t,e);(0,Q1t.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new AW.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o(D1t,"verifyTLogInclusion");function k1t(t){return t.inclusionPromise!==void 0}o(k1t,"isTLogEntryWithInclusionPromise");function L1t(t){return t.inclusionProof!==void 0}o(L1t,"isTLogEntryWithInclusionProof")});var m1e=g(iD=>{"use strict";Object.defineProperty(iD,"__esModule",{value:!0});iD.Verifier=void 0;var M1t=require("util"),U
`),u="",h=!1,d=0,f=!1;for(let p of l){let A=0;for(;A<a&&p.charCodeAt(A)===32;)A++;if(s<0||A>=p.length){d++;continue}let m=p.slice(a),C=m.charCodeAt(0);n?C===32||C===9?(f=!0,u+=`
`),u}o(MW,"getBlockValue");function fDe(t,e){if(e.valueStart===oDe)return"";let{valueStart:r,valueEnd:s}=e;if(e.fast)return t.slice(r,s);switch(e.style){case 2:return hDe(t,r,s);case 3:return dDe(t,r,s);case 4:return MW(t,r,s,e.indent,e.chomping,!1);case 5:return MW(t,r,s,e.indent,e.chomping,!0);default:return uDe(t,r,s)}}o(fDe,"getScalarValue");var pDe={"!":"!","!!":"tag:yaml.org,2002:"};function YW(t,e){if(t.startsWith("!<")&&t.endsWith(">"))return decodeURIComponent(t.slice(2,-1));let r=t.indexOf("!",1),s=r===-1?"!":t.slice(0,r+1),i=e?.[s]??pDe[s]??s;return decodeURIComponent(i)+decodeURIComponent(t.slice(s.length))}o(YW,"tagNameFull");var UA=-1,GD={filename:"",schema:rDe,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function ADe(t){return"tagStart"in t&&t.tagStart!==UA?t.tagStart:"anchorStart"in t&&t.anchorStart!==UA?t.anchorStart:"valueStart"in t&&t.valueStart!==UA?t.valueStart:"start"in t?t.start:0}o(ADe,"eventPosition$1");function nn(t,e){vS(t.source,t.position,e,t.filename)}o(nn,"throwError$1");function WW(t,e,r,s){try{return r.finalize(s)}catch(i){if(i instanceof wS)throw i;vS(t.source,e,i instanceof Error?i.message:String(i),t.filename)}}o(WW,"finalizeCollection");function bS(t,e,r){let s=t[r];if(s)return s;for(let i of e)if(r.startsWith(i.tagName))return i}o(bS,"lookupTag");function mDe(t,e,r,s,i){let n=bS(e,r,s);if(n)return n;nn(t,`unknown${i}tag!<${s}>`)}o(mDe,"findExplicitTag");function gDe(t,e){let r=fDe(t.source,e),s=e.tagStart===UA?"":t.source.slice(e.tagStart,e.tagEnd),i=t.schema.defaultScalarTag;if(s!==""){if(s==="!")return{value:r,tag:i};let n=YW(s,t.tagHandlers),a=bS(t.schema.exact.scalar,t.schema.prefix.scalar,n);if(a){let l=a.resolve(r,!0,n);return l===Et&&nn(t,`cannotresolveanodewith!<${n}>explicittag`),{value:l,tag:a}}let c=bS(t.schema.exact.mapping,t.schema.prefix.mapping,n)??bS(t.schema.exact.sequence,t.schema.prefix.sequence,n);if(c){r!==""&&nn(t,`cannotresolveanodewith!<${n}>explicittag`);let l=c.create(n);return{value:c.carrierIsResult?l:WW(t,t.position,c,l),tag:c}}nn(t,`unknownscalartag!<${n}>`)}if(e.style===1){let n=t.schema.implicitScalarByFirstChar.get(r.charAt(0))??t.schema.implicitScalarAnyFirstChar;for(let a of n){let c=a.resolve(r,!1,a.tagName);if(c!==Et)return{value:c,tag:a}}}return{value:i.resolve(r,!1,i.tagName),tag:i}}o(gDe,"constructScalar");function FW(t,e,r,s,i,n){let a=e.tagStart===UA?"":t.source.slice(e.tagStart,e.tagEnd),c=a===""||a==="!"?i:YW(a,t.tagHandlers);return{tagName:c,tag:mDe(t,r,s,c,n)}}o(FW,"collectionTag");function KW(t){return t.nodeKind==="mapping"}o(KW,"isMappingTag");function UW(t,e,r,s){for(let i of s.keys(r)){if(t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&nn(t,`mergekeysexceededmaxTotalMergeKeys(${t.maxTotalMergeKeys})`),e.tag.has(e.value,i))continue;let n=e.tag.addPair(e.value,i,s.get(r,i));n&&nn(t,n),(e.overridable??=new Set).add(i)}}o(UW,"mergeKeys");function yDe(t,e,r,s){if(t.position=e.keyPosition,KW(s))UW(t,e,r,s);else if(s.nodeKind==="sequence"&&Array.isArray(r))for(let i of r)UW(t,e,i,e.tag);else nn(t,"cannot merge mappings; the provided source object is unacceptable")}o(yDe,"mergeSource");function EDe(t,e,r,s,i){if(t.position=e.keyPosition,r===LD){yDe(t,e,s,i);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&nn(t,"duplicated mapping key");let n=e.tag.addPair(e.value,r,s);n&&nn(t,n),e.overridable?.delete(r)}o(EDe,"addMappingValue");function vD(t,e,r){let s=t.frames[t.frames.length-1];if(s.kind==="document")s.value=e,s.hasValue=!0;else if(s.kind==="sequence"){s.merge&&(KW(r)||nn(t,"cannot merge mappings; the provided source object is unacceptable"));let i=s.tag.addItem(s.value,e,s.index++);i&&nn(t,i)}else if(s.hasKey){let i=s.key;s.key=void 0,s.hasKey=!1,EDe(t,s,i,e,r)}else s.key=e,s.keyPosition=t.position,s.hasKey=!0}o(vD,"addValue");function TD(t,e,r,s,i){if(e.anchorStart!==UA){let n={value:r,tag:s,isValueFinal:i};return t.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),n),n}return null}o(TD,"storeAnchor");function CDe(t,e){let r={...GD,...e,events:t,documents:[],eventIndex:0,positio
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}o(Vf,"getBooleanInput");functioniI(t,e){if(process.env.GITHUB_OUTPUT||"")returnQS("OUTPUT",jD(t,e));process.stdout.write(D2.EOL),Wl("set-output",{name:t},Yl(e))}o(iI,"setOutput");functionane(t){process.exitCode=O2.Failure,Gm(t)}o(ane,"setFailed");functionpu(){returnprocess.env.RUNNER_DEBUG==="1"}o(pu,"isDebug");functionQ(t){Wl("debug",{},t)}o(Q,"debug");functionGm(t,e={}){Wl("error",zD(e),tinstanceofError?t.toString():t)}o(Gm,"error");functionkt(t,e={}){Wl("warning",zD(e),tinstanceofError?t.toString():t)}o(kt,"warning");functionH(t){process.stdout.write(t+D2.EOL)}o(H,"info");functionR3e(t){$D("group",t)}o(R3e,"startGroup");functionv3e(){$D("endgroup")}o(v3e,"endGroup");functiontr(t,e){returnN3e(this,void0,void0,function*(){R3e(t);letr;try{r=yielde()}finally{v3e()}returnr})}o(tr,"group");functiondn(t,e){if(process.env.GITHUB_STATE||"")returnQS("STATE",jD(t,e));Wl("save-state",{name:t},Yl(e))}o(dn,"saveState");functioncne(t){returnprocess.env[`STATE_${t}`]||""}o(cne,"getState");varDT=k(require("fs"),1),Hz=k(require("os"),1),zz=k(require("path"),1);varune=k(require("os"),1);functionnI(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}o(nI,"toCommandValue");functionhne(t,e,r){lets=newk2(t,e,r);process.stdout.write(s.toString()+une.EOL)}o(hne,"issueCommand");varlne="::",k2=class{static{o(this,"Command")}constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){lete=lne+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letsinthis.properties)if(this.properties.hasOwnProperty(s)){leti=this.properties[s];i&&(r?r=!1:e+=",",e+=`${s}=${_3e(i)}`)}}returne+=`${lne}${T3e(this.message)}`,e}};functionT3e(t){returnnI(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(T3e,"escapeData");function_3e(t){returnnI(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(_3e,"escapeProperty");varAne=k(require("os"),1);varfne=require("os"),oI=require("fs");varL2=function(t,e,r,s){functioni(n){returnninstanceofr?n:newr(function(a){a(n)})}returno(i,"adopt"),new(r||(r=Promise))(function(n,a){functionc(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");functionl(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");functionu(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},{access:Q3e,appendFile:P3e,writeFile:O3e}=oI.promises,dne="GITHUB_STEP_SUMMARY";varM2=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){returnL2(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[dne];if(!e)thrownewError(`Unable to find environment variable for $${dne}. Check if your runtime environment supports job summaries.`);try{yieldQ3e(e,oI.constants.R_OK|oI.constants.W_OK)}catch{thrownewError(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}returnthis._filePath=e,this._filePath})}wrap(e,r,s={}){leti=Object.entries(s).map(([n,a])=>`${n}="${a}"`).join("");returnr?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){returnL2(this,void0,void0,function*(){letr=!!e?.overwrite,s=yieldthis.filePath();returnyield(r?O3e:P3e)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returnL2(this,void0,void0,function*(){returnthis.emptyBuffer().write({overwrite:!0})})}stringify(){returnthis._buffer}isEmptyBuffer(){returnthis._buffer.length===0}emptyBuffer(){returnthis._buffer="",this}addRaw(e,r=!1){returnthis._buffer+=e,r?this.addEOL():this}addEOL(){returnthis.addRaw(fne.EOL)}addCodeBlock(e,r){lets=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),s);returnthis.addRaw(i).addEOL()}addList(e,r=!1){lets=r?"ol":"ul",i=e.map(a=>this.wrap("li",a)).join(""),n=this.wrap(s,i);returnthis.addRaw(n).addEOL()}addTable(e){letr=e.map(i=>{letn=i.map(a=>{if(typeofa=="string")returnthis.wrap("td",a);l
${$9e.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function bN(t){return t instanceof Qi?!0:Xf(t)&&t.name==="RestError"}o(bN,"isRestError");function fn(t,e){return Buffer.from(t,e)}o(fn,"stringToUint8Array");var wN=k(require("node:http"),1),SN=k(require("node:https"),1),cU=k(require("node:zlib"),1),lue=require("node:stream");var Vo=PI("ts-http-runtime");var j9e={};function OI(t){return t&&typeof t.pipe=="function"}o(OI,"isReadableStream");function cue(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(cue,"isStreamComplete");function uue(t){return t&&typeof t.byteLength=="number"}o(uue,"isArrayBuffer");var BN=class extends lue.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(i){s(i)}}constructor(e){super(),this.progressCallback=e}},lU=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Tc("The operation was aborted. Request has already been canceled.");s=o(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",s)}let i;e.timeout>0&&(i=setTimeout(()=>{let u=new za;Vo.info(`requestto'${u.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let n=e.headers.get("Accept-Encoding"),a=n?.includes("gzip")||n?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=K9e(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let A=e.onUploadProgress,m=new BN(A);m.on("error",C=>{Vo.error("Error in upload progress",C)}),OI(c)?c.pipe(m):m.end(c),c=m}let u=await this.makeRequest(e,r,c);i!==void 0&&clearTimeout(i);let h=J9e(u),f={status:u.statusCode??0,headers:h,request:e};if(e.method==="HEAD")return u.resume(),f;l=a?Y9e(u,h):u;let p=e.onDownloadProgress;if(p){let A=new BN(p);A.on("error",m=>{Vo.error("Error in download progress",m)}),l.pipe(A),l=A}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(f.status)?f.readableStreamBody=l:f.bodyAsText=await W9e(l),f}finally{if(e.abortSignal&&s){let u=Promise.resolve();OI(c)&&(u=cue(c));let h=Promise.resolve();OI(l)&&(h=cue(l)),Promise.all([u,h]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(d=>{Vo.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,s){let i=new URL(e.url),n=i.protocol!=="https:";if(n&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let c={agent:e.agent??this.getOrCreateAgent(e,n),hostname:i.hostname,path:`${i.pathname}${i.search}`,port:i.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let h=n?wN.default.request(c,l):SN.default.request(c,l);h.once("error",d=>{u(new Qi(d.message,{code:d.code??Qi.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let d=new Tc("The operation was aborted. Rejecting from abort signal callback while making request.");h.destroy(d),u(d)}),s&&OI(s)?s.pipe(h):s?typeof s=="string"||Buffer.isBuffer(s)?h.end(s):uue(s)?h.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Vo.error("Unrecognized body type",s),u(new Qi("Unrecognized body type"))):h.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?wN.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new wN.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return SN.default.globalAgent;let i=e.tlsSettings??j9e,n=this.cachedHttpsAgents.get(i);return n&&n.options.keepAlive===!s||(Vo.info("No cached TLS Agent exi
`;return e}o(RKe,"encodeHeaders");function vKe(t){return t instanceof Uint8Array?t.byteLength:JN(t)?t.size===-1?void 0:t.size:void 0}o(vKe,"getLength");function TKe(t){let e=0;for(let r of t){let s=vKe(r);if(s===void 0)return;e+=s}return e}o(TKe,"getTotalLength");async function _Ke(t,e,r){let s=[fn(`--${r}`,"utf-8"),...e.flatMap(n=>[fn(`\r
`,"utf-8")],i=TKe(s);i&&t.headers.set("Content-Length",i),t.body=await dhe(s)}o(_Ke,"buildRequestBody");var MI="multipartPolicy",QKe=70,PKe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function OKe(t){if(t.length>QKe)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!PKe.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}o(OKe,"assertValidBoundary");function WN(){return{name:MI,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,s=t.headers.get("Content-Type")??"multipart/mixed",i=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${s}`);let[,n,a]=i;if(a&&r&&a!==r)throw new Error(`Multipartboundarywasspecifiedas${a}intheheader,butgot${r}intherequestbody`);return r??=a,r?OKe(r):r=NKe(),t.headers.set("Content-Type",`${n};boundary=${r}`),await _Ke(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(WN,"multipartPolicy");function KN(){return IN()}o(KN,"createEmptyPipeline");var fhe=yN({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Mzt=fhe.logger;function Pc(t){return fhe.createClientLogger(t)}o(Pc,"createClientLogger");var Oc=Pc("core-rest-pipeline");function vU(t={}){return NN({logger:Oc.info,...t})}o(vU,"logPolicy");var TU=RN;function _U(t={}){return vN(t)}o(_U,"redirectPolicy");var XN=k(require("node:os"),1),ZN=k(require("node:process"),1);function phe(){return"User-Agent"}o(phe,"getHeaderName");async function Ahe(t){if(ZN.default&&ZN.default.versions){let e=`${XN.default.type()}${XN.default.release()};${XN.default.arch()}`,r=ZN.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(Ahe,"setPlatformSpecificData");var eR="1.22.2";function GKe(t){let e=[];for(let[r,s]of t){let i=s?`${r}/${s}`:r;e.push(i)}return e.join(" ")}o(GKe,"getUserAgentString");function mhe(){return phe()}o(mhe,"getUserAgentHeaderName");async function tR(t){let e=new Map;e.set("core-rest-pipeline",eR),await Ahe(e);let r=GKe(e);return t?`${t}${r}`:r}o(tR,"getUserAgentValue");var ghe=mhe(),yhe="userAgentPolicy";function QU(t={}){let e=tR(t.userAgentPrefix);return{name:yhe,async sendRequest(r,s){return r.headers.has(ghe)||r.headers.set(ghe,await e),s(r)}}}o(QU,"userAgentPolicy");var io=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function PU(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:i}=e??{};return new Promise((n,a)=>{function c(){a(new io(i??"The operation was aborted."))}o(c,"rejectOnAbort");function l(){s?.removeEventListener("abort",u)}o(l,"removeListeners");function u(){r?.(),l(),c()}if(o(u,"onAbort"),s?.aborted)return c();try{t(h=>{l(),n(h)},h=>{l(),a(h)})}catch(h){a(h)}s?.addEventListener("abort",u)})}o(PU,"createAbortablePromise");var jKe="The delay was aborted.";function FI(t,e){let r,{abortSignal:s,abortErrorMsg:i}=e??{};return PU(n=>{r=setTimeout(n,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:s,abortErrorMsg:i??jKe})}o(FI,"delay");function ld(t){if(Xf(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknownerror${e}`}}o(ld,"getErrorMessage");function Ehe(t){return Xf(t)}o(Ehe,"isError");function lg(){return Kf()}o(lg,"randomUUID");var Rt=tp;var Che=Symbol("rawContent");function DU(t){return typeof t[Che]=="function"}o(DU,"hasRawContent");function Ihe(t){return DU(t)?t[Che]():t}o(Ihe,"getRawContent");var rR=MI;function kU(){let t=WN();return{name:rR,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)DU(s.body)&&(s.body=Ihe(s.body));return t.sendRequest(e,r)},"sendRequest")}}o(kU,"multipartPolicy");var LU=TN;function MU(){return _N()}o(MU,"decompressResponsePolicy");fun
`&&t[n]!=="\r";n++)l+=t[n];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),n--),!g7e(l)){let d;return l.trim().length===0?d="Invalid space after '<'.":d="Tag '"+l+"' is an invalid name.",Mr("InvalidTag",d,Pi(t,n))}let u=d7e(t,n);if(u===!1)return Mr("InvalidAttr","Attributes for '"+l+"' have open quote.",Pi(t,n));let h=u.value;if(n=u.index,h[h.length-1]==="/"){let d=n-h.length;h=h.substring(0,h.length-1);let f=ode(h,e);if(f===!0)s=!0;else return Mr(f.err.code,f.err.msg,Pi(t,d+f.err.line))}else if(c)if(u.tagClosed){if(h.trim().length>0)return Mr("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Pi(t,a));if(r.length===0)return Mr("InvalidTag","Closing tag '"+l+"' has not been opened.",Pi(t,a));{let d=r.pop();if(l!==d.tagName){let f=Pi(t,d.tagStartPos);return Mr("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+f.line+", col "+f.col+") instead of closing tag '"+l+"'.",Pi(t,a))}r.length==0&&(i=!0)}}else return Mr("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Pi(t,n));else{let d=ode(h,e);if(d!==!0)return Mr(d.err.code,d.err.msg,Pi(t,n-h.length+d.err.line));if(i===!0)return Mr("InvalidXml","Multiple possible root nodes found.",Pi(t,n));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),s=!0}for(n++;n<t.length;n++)if(t[n]==="<")if(t[n+1]==="!"){n++,n=nde(t,n);continue}else if(t[n+1]==="?"){if(n=ide(t,++n),n.err)return n}else break;else if(t[n]==="&"){let d=A7e(t,n);if(d==-1)return Mr("InvalidChar","char '&' is not expected.",Pi(t,n));n=d}else if(i===!0&&!sde(t[n]))return Mr("InvalidXml","Extra text at the end",Pi(t,n));t[n]==="<"&&n--}}else{if(sde(t[n]))continue;return Mr("InvalidChar","char '"+t[n]+"' is not expected.",Pi(t,n))}if(s){if(r.length==1)return Mr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Pi(t,r[0].tagStartPos));if(r.length>0)return Mr("InvalidXml","Invalid '"+JSON.stringify(r.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Mr("InvalidXml","Start tag expected.",1);return!0}o(AR,"validate");function sde(t){return t===" "||t===" "||t===`
`||t==="\r"}o(sde,"isWhiteSpace");function ide(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let s=t.substr(r,e-r);if(e>5&&s==="xml")return Mr("InvalidXml","XML declaration allowed only at the start of the document.",Pi(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(ide,"readPI");function nde(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(nde,"readCommentAndCDATA");var u7e='"',h7e="'";function d7e(t,e){let r="",s="",i=!1;for(;e<t.length;e++){if(t[e]===u7e||t[e]===h7e)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){i=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:i}}o(d7e,"readAttributeStr");var f7e=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function ode(t,e){let r=fR(t,f7e),s={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Mr("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",KI(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Mr("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",KI(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return Mr("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",KI(r[i]));let n=r[i][2];if(!m7e(n))return Mr("InvalidAttr","Attribute '"+n+"' is an invalid name.",KI(r[i]));if(!Object.prototype.hasOwnProperty.call(s,n))s[n]=1;else return Mr("InvalidAttr","Attribute '"+n+"' is repeated.",KI(r[i]))}return!0}o(ode,"validateAttributeString");function p7e(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(p7e,"validateNumberAmpersand");function A7e(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,p7e(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(A7e,"validateAmpersand");function Mr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(Mr,"getErrorObject");function m7e(t){return lq(t)}o(m7e,"validateAttrName");function g7e(t){return lq(t)}o(g7e,"validateTagName");function Pi(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(Pi,"getLineNumberForPosition");function KI(t){return t.startIndex+t[1].length}o(KI,"getPositionFromMatch");var ade={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"},cde={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",ntil
`);let e=new gn("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,n=new e0(i.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let u=t.charCodeAt(c+1);if(u===47){let h=Ag(t,">",c,"Closing Tag is not closed."),d=t.substring(c+2,h).trim();if(i.removeNSPrefix){let p=d.indexOf(":");p!==-1&&(d=d.substr(p+1))}d=gq(i.transformTagName,d,"",i).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let f=this.matcher.getCurrentTag();if(d&&i.unpairedTagsSet.has(d))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${d}>`);f&&i.unpairedTagsSet.has(f)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",c=h}else if(u===63){let h=yq(t,c,!1,"?>");if(!h)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let d=this.buildAttributesMap(h.tagExp,this.matcher,h.tagName,!0);if(d){let f=d[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(f)||1),n.setXmlVersion(Number(f)||1)}if(!(i.ignoreDeclaration&&h.tagName==="?xml"||i.ignorePiTags)){let f=new gn(h.tagName);f.add(i.textNodeName,""),h.tagName!==h.tagExp&&h.attrExpPresent&&i.ignoreAttributes!==!0&&(f[":@"]=d),this.addChild(r,f,this.readonlyMatcher,c)}c=h.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let h=Ag(t,"-->",c+4,"Comment is not closed.");if(i.commentPropName){let d=t.substring(c+4,h-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(i.commentPropName,[{[i.textNodeName]:d}])}c=h}else if(u===33&&t.charCodeAt(c+2)===68){let h=n.readDocType(t,c);this.entityDecoder.addInputEntities(h.entities),c=h.i}else if(u===33&&t.charCodeAt(c+2)===91){let h=Ag(t,"]]>",c,"CDATA is not closed.")-2,d=t.substring(c+9,h);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let f=this.parseTextData(d,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);f==null&&(f=""),i.cdataPropName?r.add(i.cdataPropName,[{[i.textNodeName]:d}]):r.add(i.textNodeName,f),c=h+2}else{let h=yq(t,c,i.removeNSPrefix);if(!h){let D=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${D}"`)}let d=h.tagName,f=h.rawTagName,p=h.tagExp,A=h.attrExpPresent,m=h.closeIndex;if({tagName:d,tagExp:p}=gq(i.transformTagName,d,p,i),i.strictReservedNames&&(d===i.commentPropName||d===i.cdataPropName||d===i.textNodeName||d===i.attributesGroupName))throw new Error(`Invalid tag name: ${d}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let C=r;C&&i.unpairedTagsSet.has(C.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;p.length>0&&p.lastIndexOf("/")===p.length-1&&(E=!0,d[d.length-1]==="/"?(d=d.substr(0,d.length-1),p=d):p=p.substr(0,p.length-1),A=d!==p);let I=null,S={},x;x=U7e(f),d!==e.tagname&&this.matcher.push(d,{},x),d!==p&&A&&(I=this.buildAttributesMap(p,this.matcher,d),I&&(S=F7e(I,i))),d!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let R=c;if(this.isCurrentNodeStopNode){let D="";if(E)c=h.closeIndex;else if(i.unpairedTagsSet.has(d))c=h.closeIndex;else{let M=this.readStopNodeData(t,f,m+1);if(!M)throw new Error(`Unexpected end of ${f}`);c=M.i,D=M.tagContent}let O=new gn(d);I&&(O[":@"]=I),O.add(i.textNodeName,D),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,O,this.readonlyMatcher,R)}else{if(E){({tagName:d,tagExp:p}=gq(i.transformTagName,d,p,i));let D=new gn(d);I&&(D[":@"]=I),this.addChild(r,D,this.readonlyMatcher,R),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(d)){let D=new gn(d);I&&(D[":@"]=I),this.addChild(r,D,this.readonlyMatcher,R),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=h.closeIndex;continue}else{let D=new gn(d);if(this.tagsNodeStack.length>i.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),I&&(D[":@"]=I),this.addChild(r,D,this.readonlyMatcher,R),r=D}s="",c=m}}}else s+=t[c];return e.child},"parseXml"
`}),s}getCanonicalizedResourceString(e){let r=RR(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let i=vR(e.url),n={};if(i){let a=[];for(let c in i)if(Object.prototype.hasOwnProperty.call(i,c)){let l=c.toLowerCase();n[l]=i[c],a.push(l)}a.sort();for(let c of a)s+=`
${c}:${decodeURIComponent(n[c])}`}return s}};var br=class extends up{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new n0(e,r,this)}computeHMACSHA256(e){return(0,Fde.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var as=Pc("storage-common");var Yo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Yo||(Yo={}));var Ad={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Yo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},EZe=new io("The operation was aborted."),o0=class extends Mc{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,s=Ad){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Ad.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Ad.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Ad.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Ad.maxRetryDelayInMs):Ad.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Ad.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Ad.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let i=e.clone(),n=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;n||(i.url=NR(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=pd(i.url,wu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(as.info(`RetryPolicy:=====>Try=${s}${n?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(i),!this.shouldRetry(n,s,a))return a;r=r||!n&&a.status===404}catch(c){if(as.error(`RetryPolicy:Caughterror,message:${c.message},code:${c.code}`),!this.shouldRetry(n,s,a,c))throw c}return await this.delay(n,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,i){if(r>=this.retryOptions.maxTries)return as.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let n=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(let a of n)if(i.name.toUpperCase().includes(a)||i.message.toUpperCase().includes(a)||i.code&&i.code.toString().toUpperCase()===a)return as.info(`RetryPolicy:Networkerror${a}found,willretry.`),!0}if(s||i){let a=s?s.status:i?i.statusCode:0;if(!e&&a===404)return as.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return as.info(`RetryPolicy:Willretryforstatuscode${a}.`),!0}if(s&&s?.status>=400){let a=s.headers.get(Ge.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return i?.code==="PARSE_ERROR"&&i?.message.startsWith('Error "Error: Unclosed root tag')?(as.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case Yo.EXPONENTIAL:i=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Yo.FIXED:i=this.retryOptions.retryDelayInMs;break}else i=Math.random()*1e3;return as.info(`RetryPolicy:Delayfor${i}ms`),TR(i,s,EZe)}};var a0=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new o0(e,r,this.retryOptions)}};var CZe="storageBrowserPolicy";function Ude(){return{name:CZe,async sendRequest(t,e){return Rt||((t.method==="GET"||t.method==="HEAD")&&(t.url=pd(t.url,wu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ge.COOKIE),t.headers.delete(Ge.CONTENT_LENGTH)),e(t)}}}o(Ude,"storageBrowserPolicy");var IZe="StorageCorrectContentLengthPolicy";function qde(){function t(e){e.body&&(
`}),c}o(s,"getCanonicalizedHeadersString");function i(n){let a=RR(n.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=vR(n.url),u={};if(l){let h=[];for(let d in l)if(Object.prototype.hasOwnProperty.call(l,d)){let f=d.toLowerCase();u[f]=l[d],h.push(f)}h.sort();for(let d of h)c+=`
`),n=e.computeHMACSHA256(i);return{sasQueryParameters:new Wa(t.version,n,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(_tt,"generateBlobSASQueryParameters20150405");function Qtt(t,e){if(t=Ep(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?vt(t.startsOn,!1):"",t.expiresOn?vt(t.expiresOn,!1):"",yp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ya(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(n);return{sasQueryParameters:new Wa(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}o(Qtt,"generateBlobSASQueryParameters20181109");function Ptt(t,e){if(t=Ep(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?vt(t.startsOn,!1):"",t.expiresOn?vt(t.expiresOn,!1):"",yp(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ya(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,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(n);return{sasQueryParameters:new Wa(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:n}}o(Ptt,"generateBlobSASQueryParameters20201206");function Ott(t,e){if(t=Ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?vt(t.startsOn,!1):"",t.expiresOn?vt(t.expiresOn,!1):"",yp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?vt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?vt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ya(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(n);return{sasQueryParameters:new Wa(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:n}}o(Ott,"generateBlobSASQueryParametersUDK20181109");function Dtt(t,e){if(t=Ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?vt(t.startsOn,!1):"",t.expiresOn?vt(t.expiresOn,!1):"",yp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?vt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?vt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ya(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(n);return{sasQueryParameters:new Wa(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:n}}o(Dtt,"generateBlobSASQueryParametersUDK20200210");function ktt(t,e){if(t=Ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?vt(t.startsOn,!1):"",t.expiresOn?vt(t.expiresOn,!1):"",yp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?vt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?vt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ya(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(n);return{sasQueryParameters:new Wa(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:n}}o(ktt,"generateBlobSASQueryParametersUDK20201206");function Ltt(t,e){if(t=Ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let i;t.permissions&&(t.blobName?i=tl.parse(t.permissions.toString()).toString():i=rl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?vt(t.startsOn,!1):"",t.expiresOn?vt(t.expiresOn,!1):"",yp(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?vt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?vt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Ya(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(n);return{sasQueryParameters:new Wa(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:n}}o(Ltt,"generateBlobSASQueryParametersUDK20250705");function yp(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}o(yp,"getCanonicalName");function Ep(t){let e=t.version?t.version:OR;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(Ep,"SASSignatureValuesSanityCheckAndAutofill");var C0=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let s=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=s.container):(this._isContainer=!1,this._containerOrBlobOperation=s.blob),r||(r=lg()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Va||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Va||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Se.withSpan("BlobLeaseClient-acquireLease",r,async s=>Re(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:s.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Va||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Va||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Se.withSpan("BlobLeaseClient-changeLease",r,async s=>{let i=Re(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,i})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.i
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"}};vg.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var wp=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"}};wp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var T0=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var Ort=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a){a(n)})}return o(i,"adopt"),new(r||(r=Promise))(function(n,a){function c(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");function l(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");function u(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},C8=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),s=Date.now()-this.startTime,i=(e/(1024*1024)/(s/1e3)).toFixed(1);H(`Sent ${e} of ${this.contentLength} (${r}%), ${i} 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 rAe(t,e,r){return Ort(this,void 0,void 0,function*(){var s;let i=new Qu(t),n=i.getBlockBlobClient(),a=new C8((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),Q(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let l=yield n.uploadFile(e,c);if(l._response.status>=400)throw new Fv(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw kt(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(rAe,"uploadCacheArchiveSDK");var iAe=k(require("buffer"),1),sl=k(require("fs"),1),nAe=k(require("stream"),1),oAe=k(require("util"),1);var Uv=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a){a(n)})}return o(i,"adopt"),new(r||(r=Promise))(function(n,a){function c(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");function l(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");function u(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})};function qv(t){return t?t>=200&&t<300:!1}o(qv,"isSuccessStatusCode");function Drt(t){return t?t>=500:!0}o(Drt,"isServerErrorStatusCode");function krt(t){return t?[Ir.BadGateway,Ir.ServiceUnavailable,Ir.GatewayTimeout].includes(t):!1}o(krt,"isRetryableStatusCode");function Lrt(t){return Uv(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(Lrt,"sleep");function sAe(t,e,r){return Uv(this,arguments,void 0,function*(s,i,n,a=dN,c=fN,l=void 0){let u="",h=1;for(;h<=a;){let d,f,p=!1;try{d=yield i()}catch(A){l&&(d=l(A)),p=!0,u=A.message}if(d&&(f=n(d),!Drt(f)))return d;if(f&&(p=krt(f),u=`Cache service responded with ${f}`),Q(`${s} - Attempt ${h} of ${a} failed with error: ${u}`),!p){Q(`${s} - Error is not retryable`);break}yield Lrt(c),h++}throw Error(`${s} failed: ${u}`)})}o(sAe,"retry");function _0(t,e){return Uv(this,arguments,void 0,function*(r,s,i=dN,n=fN){return yield sAe(r,s,a=>a.statusCode,i,n,a=>{if(a instanceof vc)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(_0,"retryTypedResponse");function Tg(t,e){return Uv(this,arguments,void 0,function*(r,s,i=dN,n=fN){return yield sAe(r,s,a=>a.message.statusCode,i,n)})}o(Tg,"retryHttpClientResponse");var ea=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a
Othercacheswithsimilarkey:`);for(let c of n?.artifactCaches||[])Q(`CacheKey:${c?.cacheKey},CacheVersion:${c?.cacheVersion},CacheScope:${c?.scope},CacheCreated:${c?.creationTime}`)}}})}o(Vrt,"printCachesListForDiagnostics");function S8(t,e,r){return In(this,void 0,void 0,function*(){let s=new mAe.URL(t),i=uAe(r);s.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield cAe(t,e,i):i.concurrentBlobDownloads?yield aAe(t,e,i):yield Hv(t,e):yield Hv(t,e)})}o(S8,"downloadCache");function yAe(t,e,r){return In(this,void 0,void 0,function*(){let s=w8(),i=eg(e,r?.compressionMethod,r?.enableCrossOsArchive),n={key:t,version:i,cacheSize:r?.cacheSize};return yield _0("reserveCache",()=>In(this,void 0,void 0,function*(){return s.postJson(P0("caches"),n)}))})}o(yAe,"reserveCache");function AAe(t,e){return`bytes${t}-${e}/*`}o(AAe,"getContentRange");function $rt(t,e,r,s,i){return In(this,void 0,void 0,function*(){Q(`Uploadingchunkofsize${i-s+1}bytesatoffset${s}withcontentrange:${AAe(s,i)}`);let n={"Content-Type":"application/octet-stream","Content-Range":AAe(s,i)},a=yield Tg(`uploadChunk(start:${s},end:${i})`,()=>In(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),n)}));if(!qv(a.message.statusCode))throw new Error(`Cacheservicerespondedwith${a.message.statusCode}duringuploadchunk.`)})}o($rt,"uploadChunk");function jrt(t,e,r,s){return In(this,void 0,void 0,function*(){let i=Rc(r),n=P0(`caches/${e.toString()}`),a=_g.openSync(r,"r"),c=I8(s),l=YF("uploadConcurrency",c.uploadConcurrency),u=YF("uploadChunkSize",c.uploadChunkSize),h=[...new Array(l).keys()];Q("Awaiting all uploads");let d=0;try{yield Promise.all(h.map(()=>In(this,void 0,void 0,function*(){for(;d<i;){let f=Math.min(i-d,u),p=d,A=d+f-1;d+=u,yield $rt(t,n,()=>_g.createReadStream(r,{fd:a,start:p,end:A,autoClose:!1}).on("error",m=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${m.message}`)}),p,A)}})))}finally{_g.closeSync(a)}})}o(jrt,"uploadFile");function Jrt(t,e,r){return In(this,void 0,void 0,function*(){let s={size:r};return yield _0("commitCache",()=>In(this,void 0,void 0,function*(){return t.postJson(P0(`caches/${e.toString()}`),s)}))})}o(Jrt,"commitCache");function B8(t,e,r,s){return In(this,void 0,void 0,function*(){if(I8(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield rAe(r,e,s)}else{let n=w8();Q("Upload cache"),yield jrt(n,t,e,s),Q("Commiting cache");let a=Rc(e);H(`CacheSize:~${Math.round(a/(1024*1024))}MB(${a}B)`);let c=yield Jrt(n,t,a);if(!qv(c.statusCode))throw new Error(`Cacheservicerespondedwith${c.statusCode}duringcommitcache.`);H("Cache saved successfully")}})}o(B8,"saveCache");var dme=k(nme(),1),Gr=k(qr(),1),uo=k(qr(),1),Rp=k(qr(),1),vp=k(qr(),1),Tp=k(qr(),1);var Ez=k(qr(),1),Cz=k(qr(),1),lme=k(qr(),1),ume=k(qr(),1),hme=k(qr(),1);var mz=k(qr(),1),gz=k(qr(),1),ome=k(qr(),1),ame=k(qr(),1),cme=k(qr(),1);var yz=class extends cme.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,ame.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,ome.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,i){let n=i??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:n.scope=e.string();break;case 2:n.permission=e.int64().toString();break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknownfield${c}(wiretype${l})for${this.typeName}`);let h=e.skip(l);u!==!1&&(u===!0?gz.UnknownFieldHandler.onRead:u)(this.typeName,n,c,l,h)}}return n}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,mz.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,mz.WireType.Varint).int64(e.permission);let i=s.writeUnknownFields;return i!==!1&&(i==!0?gz.UnknownFieldHandler.onWrite:i)(this.typeName,e,r),r}},TT=new yz;var Iz=class extends hme.Mess
`));let s=yield kz(r,"create");yield Lz(s,t)})}o(Fz,"createTar");var Jg=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a){a(n)})}return o(i,"adopt"),new(r||(r=Promise))(function(n,a){function c(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");function l(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");function u(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},Za=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},jg=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},OT=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function mme(t){if(!t||t.length===0)throw new Za("Path Validation Error: At least one directory or file path is required")}o(mme,"checkPaths");function Uz(t){if(t.length>512)throw new Za(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Za(`KeyValidationError:${t}cannotcontaincommas.`)}o(Uz,"checkKey");function qz(){return Q0()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(qz,"isFeatureAvailable");function gme(t,e,r,s){return Jg(this,arguments,void 0,function*(i,n,a,c,l=!1){let u=Q0();return Q(`Cacheserviceversion:${u}`),mme(i),u==="v2"?yield lnt(i,n,a,c,l):yield cnt(i,n,a,c,l)})}o(gme,"restoreCache");function cnt(t,e,r,s){return Jg(this,arguments,void 0,function*(i,n,a,c,l=!1){a=a||[];let u=[n,...a];if(Q("Resolved Keys:"),Q(JSON.stringify(u)),u.length>10)throw new Za("Key Validation Error: Keys are limited to a maximum of 10.");for(let f of u)Uz(f);let h=yield TI(),d="";try{let f=yield gAe(u,i,{compressionMethod:h,enableCrossOsArchive:l});if(!f?.archiveLocation)return;if(c?.lookupOnly)return H("Lookup only - skipping download"),f.cacheKey;d=Y0.join(yield RI(),od(h)),Q(`ArchivePath:${d}`),yield S8(f.archiveLocation,d,c),pu()&&(yield J0(d,h));let p=Rc(d);return H(`CacheSize:~${Math.round(p/(1024*1024))}MB(${p}B)`),yield Mz(d,h),H("Cache restored successfully"),f.cacheKey}catch(f){let p=f;if(p.name===Za.name)throw f;p instanceof vc&&typeof p.statusCode=="number"&&p.statusCode>=500?Gm(`Failedtorestore:${f.message}`):kt(`Failedtorestore:${f.message}`)}finally{try{yield vI(d)}catch(f){Q(`Failedtodeletearchive:${f}`)}}})}o(cnt,"restoreCacheV1");function lnt(t,e,r,s){return Jg(this,arguments,void 0,function*(i,n,a,c,l=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let u=[n,...a];if(Q("Resolved Keys:"),Q(JSON.stringify(u)),u.length>10)throw new Za("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of u)Uz(d);let h="";try{let d=Dz(),f=yield TI(),p={key:n,restoreKeys:a,version:eg(i,f,l)},A=yield d.GetCacheEntryDownloadURL(p);if(!A.ok){Q(`Cachenotfoundforversion${p.version}ofkeys:${u.join(", ")}`);return}if(p.key!==A.matchedKey?H(`Cachehitforrestore-key:${A.matchedKey}`):H(`Cachehitfor:${A.matchedKey}`),c?.lookupOnly)return H("Lookup only - skipping download"),A.matchedKey;h=Y0.join(yield RI(),od(f)),Q(`Archivepath:${h}`),Q(`Startingdownloadofarchiveto:${h}`),yield S8(A.signedDownloadUrl,h,c);let C=Rc(h);return H(`CacheSize:~${Math.round(C/(1024*1024))}MB(${C}B)`),pu()&&(yield J0(h,f)),yield Mz(h,f),H("Cache restored successfully"),A.matchedKey}catch(d){let f=d;if(f.name===Za.name)throw d;f instanceof vc&&typeof f.statusCode=="number"&&f.statusCode>=500?Gm(`Failedtorestore:${d.message}`):kt(`Failedtorestore:${d.message}`)}finally{try{h&&(yield vI(h))}catch(d){Q(`Failedtodeletearchive:${d}`)}}})}o(lnt,"restoreCacheV2");function Gz(t,e,r){return Jg(this,arguments,void 0,function*(s,i,n,a=!1){let c=Q0();return Q(`Cacheserviceversion:${c}`),mme(s),Uz(i),c==="v2"?yield hnt(s,i,n,a):yield unt(s,i,n,a)})}o(Gz,"saveCache");function unt(t,e,r){return Jg(this,arguments,void 0,fu
`,a).length:d,u?(c===null?0:c.length)+l.length:0,u?l.length+d:0);return f<p},"__needMoreData"),parse:o(function(s,i,n,a){let{bom:c,comment_no_infix:l,encoding:u,from_line:h,ltrim:d,max_record_size:f,raw:p,relax_quotes:A,rtrim:m,skip_empty_lines:C,to:E,to_line:I}=this.options,{comment:S,escape:x,quote:R,record_delimiter:D}=this.options,{bomSkipped:O,previousBuf:M,rawBuffer:V,escapeIsQuote:ee}=this.state,U;if(M===void 0)if(s===void 0){a();return}else U=s;else M!==void 0&&s===void 0?U=M:U=Buffer.concat([M,s]);if(O===!1)if(c===!1)this.state.bomSkipped=!0;else if(U.length<3){if(i===!1){this.state.previousBuf=U;return}}else{for(let j in ly)if(ly[j].compare(U,0,ly[j].length)===0){let se=ly[j].length;this.state.bufBytesStart+=se,U=U.slice(se);let Pe=h3({...this.original_options,encoding:j});for(let we in Pe)this.options[we]=Pe[we];({comment:S,escape:x,quote:R}=this.options);break}this.state.bomSkipped=!0}let q=U.length,z;for(z=0;z<q&&!this.__needMoreData(z,q,i);z++){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(U,z)&&(D=this.options.record_delimiter);let j=U[z];if(p===!0&&V.append(j),(j===Dht||j===kht)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(x!==null&&this.state.quoting===!0&&this.__isEscape(U,z,j)&&z+x.length<q)if(ee){if(this.__isQuote(U,z+x.length)){this.state.escaping=!0,z+=x.length-1;continue}}else{this.state.escaping=!0,z+=x.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(U,z))if(this.state.quoting===!0){let we=U[z+R.length],le=m&&this.__isCharTrimable(U,z+R.length),ct=S!==null&&this.__compareBytes(S,U,z+R.length,we),et=this.__isDelimiter(U,z+R.length,we),bt=D.length===0?this.__autoDiscoverRecordDelimiter(U,z+R.length):this.__isRecordDelimiter(we,U,z+R.length);if(x!==null&&this.__isEscape(U,z,j)&&this.__isQuote(U,z+x.length))z+=x.length-1;else if(!we||et||bt||ct||le){this.state.quoting=!1,this.state.wasQuoting=!0,z+=R.length-1;continue}else if(A===!1){let ke=this.__error(new yt("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(we)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(ke!==void 0)return ke}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(R),z+=R.length-1}else if(this.state.field.length!==0){if(A===!1){let we=this.__infoField(),le=Object.keys(ly).map(et=>ly[et].equals(this.state.field.toString())?et:!1).filter(Boolean)[0],ct=this.__error(new yt("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(we.column)}atline${we.lines},valueis${JSON.stringify(this.state.field.toString(u))}`,le?`(${le}bom)`:void 0],this.options,we,{field:this.state.field}));if(ct!==void 0)return ct}}else{this.state.quoting=!0,z+=R.length-1;continue}if(this.state.quoting===!1){let we=this.__isRecordDelimiter(j,U,z);if(we!==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)>=h){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),z+=we-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,z+=we-1;continue}this.info.bytes=this.state.bufBytesStart+z;let et=this.__onField();if(et!==void 0)return et;this.info.bytes=this.state.bufBytesStart+z+we;let bt=this.__onRecord(n);if(bt!==void 0)return bt;if(E!==-1&&this.info.records>=E){this.state.stop=!0,a();return}}this.state.commenting=!1,z+=we-1;continue}if(this.state.commenting)continue;if(S!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(S,U,z,j)!==0){this.state.commenting=!0;continue}let le=this.__isDelimiter(U,z,
`)}o(Rdt,"_buildMessageForResponseErrors");var vdt=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(Rdt(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},Tdt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],_dt=["query","method","url"],fIe=/\/api\/v3\/?$/;function Qdt(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(_dt.includes(a))return Promise.reject(new Error(`[@octokit/graphql]"${a}"cannotbeusedasvariablename`))}let s=typeof e=="string"?Object.assign({query:e},r):e,i=Object.keys(s).reduce((a,c)=>Tdt.includes(c)?(a[c]=s[c],a):(a.variables||(a.variables={}),a.variables[c]=s[c],a),{}),n=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return fIe.test(n)&&(i.url=n.replace(fIe,"/api/graphql")),t(i).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new vdt(i,c,a.data)}return a.data.data})}o(Qdt,"graphql");function S3(t,e){let r=t.defaults(e);return Object.assign(o((i,n)=>Qdt(r,i,n),"newApi"),{defaults:S3.bind(null,r),endpoint:r.endpoint})}o(S3,"withDefaults");var Ycr=S3(Cb,{headers:{"user-agent":`octokit-graphql.js/${Ndt}${Nd()}`},method:"POST",url:"/graphql"});function pIe(t){return S3(t,{method:"POST",url:"/graphql"})}o(pIe,"withCustomRequest");var B3="(?:[a-zA-Z0-9_-]+)",AIe="\\.",mIe=new RegExp(`^${B3}${AIe}${B3}${AIe}${B3}$`),Pdt=mIe.test.bind(mIe);async function Odt(t){let e=Pdt(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),s=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":s?"user-to-server":"oauth"}}o(Odt,"auth");function Ddt(t){return t.split(/\./).length===3?`bearer${t}`:`token${t}`}o(Ddt,"withAuthorizationPrefix");async function kdt(t,e,r,s){let i=e.endpoint.merge(r,s);return i.headers.authorization=Ddt(t),e(i)}o(kdt,"hook");var gIe=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(Odt.bind(null,e),{hook:kdt.bind(null,e)})},"createTokenAuth2");var x3="7.0.6";var yIe=o(()=>{},"noop"),Ldt=console.warn.bind(console),Mdt=console.error.bind(console);function Fdt(t={}){return typeof t.debug!="function"&&(t.debug=yIe),typeof t.info!="function"&&(t.info=yIe),typeof t.warn!="function"&&(t.warn=Ldt),typeof t.error!="function"&&(t.error=Mdt),t}o(Fdt,"createLogger");var EIe=`octokit-core.js/${x3}${Nd()}`,$_=class{static{o(this,"Octokit")}static VERSION=x3;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...s){let i=s[0]||{};if(typeof e=="function"){super(e(i));return}super(Object.assign({},e,i,i.userAgent&&e.userAgent?{userAgent:`${i.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(i=>!r.includes(i)))}}constructor(e={}){let r=new $Ce.Collection,s={baseUrl:Cb.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(s.headers["user-agent"]=e.userAgent?`${e.userAgent}${EIe}`:EIe,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=Cb.defaults(s),this.graphql=pIe(this.request).defaults(s),this.log=Fdt(e.log),this.hook=r,e.authStrategy){let{authStrategy:n,...a}=e,c=n(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 n=gIe(e.auth);r.wrap("request",n.hook),this.auth=n}let i=this.constructor;for(let n=0;n<i.plugins.length;++n)
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of s){if(i.length==1&&!i[0].startsWith("type="))return e=="local";for(let[n,a]of i.map(c=>c.split("=").map(l=>l.trim())))if(n=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let s=mo(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of s)for(let[n,a]of i.map(c=>c.split("=").map(l=>l.trim())))if(n=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=mo(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let i of r)for(let n of i)try{let a=Bt.parseBool(n);s.push(`disabled=${!a}`)}catch{s.push(n)}return s.join(",")}static hasGitAuthTokenSecret(e,r){for(let s of e){if(r&&s.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(s.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let s=e.indexOf("="),i=e.substring(0,s),n=e.substring(s+1);if(i.length==0||n.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&bc(n),[i,n]}};var F3=k(require("fs"),1),vIe=k(require("path"),1);var K_=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new It,this.metadataFilename=`bake-metadata-${Bt.generateRandomString()}.json`}getMetadataFilePath(){return vIe.default.join(St.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!F3.default.existsSync(e))return;let r=F3.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let s in e)"buildx.build.ref"in e[s]&&r.push(e[s]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(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}:{});let s=["bake"],i,n=[],a=[...e.files||[],e.source];if(a){for(let l of a.map(u=>u?u.trim():""))if(l.length!=0){if(!Bt.isValidRef(l)){n.push(l);continue}if(i)throw new Error("Only one remote bake definition can be defined");i=l}}i&&s.push(i);for(let l of n)s.push("--file",l);if(e.overrides)for(let l of e.overrides)s.push("--set",l);if(e.vars)for(let l of e.vars)s.push("--var",l);if(e.allow)for(let l of e.allow)s.push("--allow",l);e.call&&s.push("--call",e.call),e.load&&s.push("--load"),e.noCache&&s.push("--no-cache"),e.provenance&&s.push("--provenance",e.provenance),e.push&&s.push("--push"),e.sbom&&s.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await ve.getExecOutput(c.command,c.args,r).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${l.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(l.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let i=r.target[s];i.attest&&Array.isArray(i.attest)&&(i.attest=i.attest.map(n=>t.parseAttestEntry(n))),i["cache-from"]&&Array.isArray(i["cache-from"])&&(i["cache-from"]=i["cache-from"].map(n=>t.parseCacheEntry(n))),i["cache-to"]&&Array.isArray(i["cache-to"])&&(i["cache-to"]=i["cache-to"].map(n=>t.parseCacheEntry(n))),i.output&&Array.isArray(i.output)&&(i.output=i.output.map(n=>t.parseExportEntry(n))),i.secret&&Array.isArray(i.secret)&&(i.secret=i.secret.map(n=>t.parseSecretEntry(n))),i.ssh&&Array.isArray(i.ssh)&&(i.ssh=i.ssh.map(n=>t.parseSSHEntry(n)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=mo(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of s){let[n,a]=i.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(n){case"type":r.type=a;break;case"disabled":r.disabled=Bt.parseBool(a);break;default:r[n]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=mo(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let i of s){let[n,a]=i.toString().
`).map(i=>i.trim()).filter(i=>i.length>0);return s}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var B1e=require("crypto"),Gl=k(require("fs"),1),lf=k(require("path"),1);var dS=k(Sb(),1),Hl=k(qTe(),1),x1e=k(z9(),1),qE=k(y1e(),1);var yW=k(Sb(),1);var C1e=k(ec(),1);var E1e="application/vnd.oci.empty.v1+json";var xh=class{static{o(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await ve.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(Q(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(Q(`Cosign.isAvailableerror:${r}`),!1));return Q(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await ve.getExecOutput(this.binPath,["version","--json"],{ignoreReturnCode:!0,silent:!0}).then(e=>{if(e.stderr.length>0&&e.exitCode!=0)throw new Error(e.stderr.trim());return JSON.parse(e.stdout.trim()).gitVersion}),this._version)}async printVersion(){await ve.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return Q("Cosign.versionSatisfies false: undefined version"),!1;let i=C1e.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return Q(`Cosign.versionSatisfies${s}statisfies${e}:${i}`),i}static parseCommandOutput(e){let r,s,i,n;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let l;try{l=JSON.parse(c)}catch{continue}if(l&&Array.isArray(l.errors)&&l.errors.length>0&&(n=l.errors),!r&&l&&Array.isArray(l.manifests)&&l.manifests.length>0){let u=l.manifests[0];u?.artifactType===yW.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===E1e&&typeof u.digest=="string"&&(s=u.digest)}if(!i&&l&&l.mediaType===yW.BUNDLE_V03_MEDIA_TYPE&&(i=l),i&&(r||s)){n=void 0;break}}return{bundle:i,signatureManifestDigest:r||s,errors:n}}};var EW=k(require("fs"),1);var nD=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new It}async getCommand(e){return await this.buildx.getCommand(["imagetools",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getCreateCommand(e){return await this.getCommand(["create",...e])}async inspectImage(e){return await this.inspect(e,"{{json .Image}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"config"),r;throw new Error("Unexpected output format")})}async inspectManifest(e){return await this.inspect(e,"{{json .Manifest}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"manifests"),r;throw new Error("Unexpected output format")})}async attestationDescriptors(e){let r=await this.inspectManifest(e);if(typeof r!="object"||r===null||!("manifests"in r)||!Array.isArray(r.manifests))throw new Error(`Nodescriptorfoundfor${e.name}`);let s=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return s;let i=e.platform,n=new Map;for(let a of r.manifests)a.digest&&n.set(a.digest,a);return s.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let l=n.get(c);return l?l.platform?.os===i.os&&l.platform?.architecture===i.architecture&&(l.platform?.variant??"")===(i.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=St.tmpName({tmpdir:St.tmpDir(),template:"imagetools-metadata-XXXXXX"}),i=[],n=[];for(let c of e.sources){if(c.startsWith("cwd://")){let l=c.substring(6);l.length>0&&i.push(l);continue}n.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",s);for(let c of i)r.push("--file",c);for
${a.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,c)*100))}throw a??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,s){return await ve.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());return s(JSON.parse(i.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var I1e="application/vnd.in-toto+json";var b1e="https://fulcio.sigstore.dev",w1e="https://rekor.sigstore.dev",S1e="https://timestamp.sigstore.dev",LA="https://search.sigstore.dev";var G1t="slsaprovenance1",uf=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new xh,this.imageTools=e?.imageTools||new nD}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 s=this.signingEndpoints(e.noTransparencyLog);H(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let i=t.noTransparencyLog(e.noTransparencyLog),n=[];await this.cosign.versionSatisfies(">=3.0.4")?await tr("Creating Sigstore protobuf signing config",async()=>{let a=St.tmpName({template:"signing-config-XXXXXX.json",tmpdir:St.tmpDir()}),c=["signing-config","create","--with-default-services=true",`--out=${a}`];i&&c.push("--no-default-rekor=true"),await ve.exec(this.cosign.binPath,c,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),H(JSON.stringify(JSON.parse(Gl.default.readFileSync(a,{encoding:"utf-8"})),null,2)),n.push(`--signing-config=${a}`)}):(n.push("--use-signing-config"),i&&n.push("--tlog-upload=false"));for(let a of e.imageNames){let c=await this.imageTools.attestationDigests({name:`${a}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let l of c){let u=`${a}@${l}`;await tr(`Signingattestationmanifest${u}`,async()=>{let h=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...n];H(`[command]${this.cosign.binPath}${[...h,u].join(" ")}`);let d=await ve.getExecOutput(this.cosign.binPath,["--verbose",...h,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),f=xh.parseCommandOutput(d.stderr.trim());if(d.exitCode!=0)if(f.errors&&f.errors.length>0){let A=f.errors.map(m=>`-[${m.code}]${m.message}:${m.detail}`).join(`
${u}`),await new Promise(h=>setTimeout(h,Math.pow(2,a)*100));else throw n}else throw new Error(`Cosignverifycommandfailedwith:${c.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw n}async signProvenanceBlobs(e){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 s=this.signingEndpoints(e.noTransparencyLog);H(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let i=t.getProvenanceBlobs(e);for(let n of Object.keys(i))await tr(`Signing${n}`,async()=>{let a=i[n],c=lf.default.join(lf.default.dirname(n),`${e.name??"provenance"}.sigstore.json`),l=t.getProvenanceSubjects(a);if(l.length===0){kt(`Nosubjectsfoundinprovenance${n},skipsigning.`);return}let u=await t.signPayload({data:a,type:I1e},s),h=t.parseBundle(u);H("Provenance blob signed for:");for(let d of l){let[f,p]=Object.entries(d.digest)[0]||[];H(`-${d.name}(${f}:${p})`)}h.tlogID&&H(`AttestationsignatureuploadedtoRekortransparencylog:${LA}?logIndex=${h.tlogID}`),H(`WritingSigstorebundleto:${c}`),Gl.default.writeFileSync(c,JSON.stringify(h.payload,null,2),{encoding:"utf-8"}),r[n]={...h,bundlePath:c,subjects:l}})}catch(s){throw new Error(`SigningBuildKitprovenanceblobsfailed:${s.message}`)}return r}async verifySignedArtifacts(e,r){let s={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[i,n]of Object.entries(e)){let a=lf.default.dirname(i);await tr(`Verifyingsignaturebundle${n.bundlePath}`,async()=>{for(let c of n.subjects){let l=lf.default.join(a,c.name);H(`Verifyingsignedartifact${l}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??G1t];(r.noTransparencyLog||!n.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let h=await ve.getExecOutput(this.cosign.binPath,[...u,"--bundle",n.bundlePath,l],{ignoreReturnCode:!0});if(h.stderr.length>0&&h.exitCode!=0)throw new Error(h.stderr);s[l]={bundlePath:n.bundlePath,cosignArgs:u}}})}return s}async verifyArtifact(e,r,s){H("Verifying keyless verification bundle signature");let i=JSON.parse(Gl.default.readFileSync(r,"utf-8")),n=(0,dS.bundleFromJSON)(i);H("Fetching Sigstore TUF trusted root metadata");let a=await x1e.getTrustedRoot(),c=(0,qE.toTrustMaterial)(a);try{H("Verifying artifact signature");let l=(0,qE.toSignedEntity)(n,Gl.default.readFileSync(e)),u=t.parseCertificate(n),h=n.verificationMaterial.tlogEntries,d=h.length>0?h[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let A=u.subjectAltName?.replace(/^uri:/i,"");if(A){if(!A.match(s.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${A}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let p=new qE.Verifier(c).verify(l,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return Q(`Sigstore.verifyArtifactsigner:${JSON.stringify(p)}`),{payload:i,certificate:u.toString(),tlogID:d}}catch(l){throw new Error(`Failedtoverifyartifactsignature:${l}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),H(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:b1e,rekorURL:e?void 0:w1e,tsaServerURL:S1e}}static noTransparencyLog(e){return e??Mt.context.payload.repository?.private}static getProvenanceBlobs(e){let r=lf.default.join(e.localExportDir,"provenance.json");if(Gl.default.existsSync(r))return{[r]:Gl.default.readFileSync(r)};let s=Gl.default.readdirSync(e.localExportDir,{withFileTypes:!0}),i=s.filter(n=>n.isDirectory());if(i.length>0&&i.length===s.length&&i.every(n=>Gl.default.existsSync(lf.default.join(e.localExportDir,n.name,"provenance.json")))){let n={};for(let a of i){let c=