vargIe=Object.create;vardz=Object.defineProperty;varOIe=Object.getOwnPropertyDescriptor;varEIe=Object.getOwnPropertyNames;varCIe=Object.getPrototypeOf,yIe=Object.prototype.hasOwnProperty;vari=(t,e)=>dz(t,"name",{value:e,configurable:!0});varm=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),BIe=(t,e)=>{for(varrine)dz(t,r,{get:e[r],enumerable:!0})},qIe=(t,e,r,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letoofEIe(e))!yIe.call(t,o)&&o!==r&&dz(t,o,{get:()=>e[o],enumerable:!(n=OIe(e,o))||n.enumerable});returnt};varw=(t,e,r)=>(r=t!=null?gIe(CIe(t)):{},qIe(e||!t||!t.__esModule?dz(r,"default",{value:t,enumerable:!0}):r,t));var$9=m(lA=>{"use strict";variB0=require("net"),SIe=require("tls"),tI=require("http"),V9=require("https"),FIe=require("events"),aB0=require("assert"),WIe=require("util");lA.httpOverHttp=xIe;lA.httpsOverHttp=TIe;lA.httpOverHttps=vIe;lA.httpsOverHttps=LIe;functionxIe(t){vare=newgi(t);returne.request=tI.request,e}i(xIe,"httpOverHttp");functionTIe(t){vare=newgi(t);returne.request=tI.request,e.createSocket=J9,e.defaultPort=443,e}i(TIe,"httpsOverHttp");functionvIe(t){vare=newgi(t);returne.request=V9.request,e}i(vIe,"httpOverHttps");functionLIe(t){vare=newgi(t);returne.request=V9.request,e.createSocket=J9,e.defaultPort=443,e}i(LIe,"httpsOverHttps");functiongi(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||tI.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",i(function(n,o,s,a){for(varc=Y9(o,s,a),u=0,p=e.requests.length;u<p;++u){varA=e.requests[u];if(A.host===c.host&&A.port===c.port){e.requests.splice(u,1),A.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}i(gi,"TunnelingAgent");WIe.inherits(gi,FIe.EventEmitter);gi.prototype.addRequest=i(function(e,r,n,o){vars=this,a=rI({request:e},s.options,Y9(r,n,o));if(s.sockets.length>=this.maxSockets){s.requests.push(a);return}s.createSocket(a,function(c){c.on("free",u),c.on("close",p),c.on("agentRemove",p),e.onSocket(c);functionu(){s.emit("free",c,a)}i(u,"onFree");functionp(A){s.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}i(p,"onCloseOrRemove")})},"addRequest");gi.prototype.createSocket=i(function(e,r){varn=this,o={};n.sockets.push(o);vars=rI({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+newBuffer(s.proxyAuth).toString("base64")),wa("making CONNECT request");vara=n.request(s);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",A),a.end();functionc(l){l.upgrade=!0}i(c,"onResponse");functionu(l,b,M){process.nextTick(function(){p(l,b,M)})}i(u,"onUpgrade");functionp(l,b,M){if(a.removeAllListeners(),b.removeAllListeners(),l.statusCode!==200){wa("tunneling socket could not be established, statusCode=%d",l.statusCode),b.destroy();varz=newError("tunneling socket could not be established, statusCode="+l.statusCode);z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}if(M.length>0){wa("got illegal response body from proxy"),b.destroy();varz=newError("got illegal response body from proxy");z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}returnwa("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=b,r(b)}i(p,"onConnect");functionA(l){a.removeAllListeners(),wa(`tunneling socket could not be established, cause=%s
`);b.push(O),s+=O.byteLength,z&&(s=null),o=t,n=i(async function*(){for(let y of b)y.stream?yield*y.stream():yield y},"action"),a=`multipart/form-data; boundary=${u}`}else if(nH(t))o=t,s=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(cb.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:rwe(t)}if((typeof o=="string"||cb.isBuffer(o))&&(s=Buffer.byteLength(o)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(p){let{value:A,done:l}=await u.next();if(l)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!aH(r)){let b=new Uint8Array(A);b.byteLength&&p.enqueue(b)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:o,length:s},a]}i(pH,"extractBody");function fwe(t,e=!1){return t instanceof ReadableStream&&(a5(!cb.isDisturbed(t),"The body has already been consumed."),a5(!t.locked,"The stream is locked.")),pH(t,e)}i(fwe,"safelyExtractBody");function Mwe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}i(Mwe,"cloneBody");function mwe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}i(mwe,"throwIfAborted");function hwe(t){return{blob(){return BA(this,r=>{let n=sH(this);return n===null?n="":n&&(n=lwe(n)),new uwe([r],{type:n})},t)},arrayBuffer(){return BA(this,r=>new Uint8Array(r).buffer,t)},text(){return BA(this,iH,t)},json(){return BA(this,gwe,t)},formData(){return BA(this,r=>{let n=sH(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let o=dwe(r,n);if(o==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new oH;return s[qA]=o,s}case"application/x-www-form-urlencoded":{let o=new URLSearchParams(r.toString()),s=new oH;for(let[a,c]of o)s.append(a,c);return s}}throw new TypeError('Content-Typewasnotoneof"multipart/form-data"or"application/x-www-form-urlencoded".')},t)},bytes(){return BA(this,r=>new Uint8Array(r),t)}}}i(hwe,"bodyMixinMethods");function zwe(t){Object.assign(t.prototype,hwe(t))}i(zwe,"mixinBody");async function BA(t,e,r){if(cwe.brandCheck(t,r),AH(t))throw new TypeError("Body is unusable: Body has already been read");mwe(t[qA]);let n=swe(),o=i(a=>n.reject(a),"errorSteps"),s=i(a=>{try{n.resolve(e(a))}catch(c){o(c)}},"successSteps");return t[qA].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await iwe(t[qA].body,s,o),n.promise)}i(BA,"consumeBody");function AH(t){let e=t[qA].body;return e!=null&&(e.stream.locked||cb.isDisturbed(e.stream))}i(AH,"bodyUnusable");function gwe(t){return JSON.parse(iH(t))}i(gwe,"parseJSONFromBytes");function sH(t){let e=t[qA].headersList,r=awe(e);return r==="failure"?null:r}i(sH,"bodyMimeType");lH.exports={extractBody:pH,safelyExtractBody:fwe,cloneBody:Mwe,mixinBody:zwe,streamRegistry:uH,hasFinalizationRegistry:cH,bodyUnusable:AH}});var IH=m((eq0,DH)=>{"use strict";var fe=require("node:assert"),ge=Xe(),{channels:dH}=bA(),u5=GI(),{RequestContentLengthMismatchError:nu,ResponseContentLengthMismatchError:bH,RequestAbortedError:EH,HeadersTimeoutError:Owe,HeadersOverflowError:Ewe,SocketError:IA,InformationalError:RA,BodyTimeoutError:Cwe,HTTPParserError:ywe,ResponseExceededMaxSizeError:Bwe}=p0(),{kUrl:CH,kReset:rr,kClient:Xz,kParser:T0,kBlocking:Ab,kRunning:w1,kPending:yH,kSize:fH,kWriting:Fa,kQueue:so,kNoRef:ub,kKeepAliveDefaultTimeout:qwe,kHostHeader:Dwe,kPendingIdx:Iwe,kRunningIdx:dn,kError:Ft,kPipelining:Vz,kSocket:su,kKeepAliveTimeoutValue:Yz,kMaxHeadersSize:p5,kKeepAliveMaxTimeout:Rwe,kKeepAliveTimeoutThreshold:Nwe,kHeadersTimeout:wwe,kBodyTimeout:Swe,kStrictContentLength:d5,kMaxRequests:MH,kCounter:Fwe,kMaxResponseSize:Wwe,kOnError:mH,kResume:qi,kHTTPContext:BH}=G0(),wr=uG(),hH=Buffer.alloc(0),Uz=Buffer[Symbol.species],Gz=ge.addListener,xwe=ge.removeAllListeners,iu=Symbol("kIdleSocketValidation"),ou=Symbol("kIdleSocketValidationTimeout"),m5=Symbol("kSocketUsed"),A5;async function Twe(){let t=process.env.JEST_WORKER_ID?VI():vo
`}return dH.sendHeaders.hasSubscribers&&dH.sendHeaders.publish({request:e,headers:O,socket:M}),!u||b===0?gH(z,null,t,e,M,A,O,l):ge.isBuffer(u)?gH(z,u,t,e,M,A,O,l):ge.isBlobLike(u)?typeof u.stream=="function"?OH(z,u.stream(),t,e,M,A,O,l):Gwe(z,u,t,e,M,A,O,l):ge.isStream(u)?Uwe(z,u,t,e,M,A,O,l):ge.isIterable(u)?OH(z,u,t,e,M,A,O,l):fe(!1),!0}i(kwe,"writeH1");function Uwe(t,e,r,n,o,s,a,c){fe(s!==0||r[w1]===0,"stream body cannot be pipelined");let u=!1,p=new $z({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:c,header:a}),A=i(function(z){if(!u)try{!p.write(z)&&this.pause&&this.pause()}catch(O){ge.destroy(this,O)}},"onData"),l=i(function(){u||e.resume&&e.resume()},"onDrain"),b=i(function(){if(queueMicrotask(()=>{e.removeListener("error",M)}),!u){let z=new EH;queueMicrotask(()=>M(z))}},"onClose"),M=i(function(z){if(!u){if(u=!0,fe(o.destroyed||o[Fa]&&r[w1]<=1),o.off("drain",l).off("error",M),e.removeListener("data",A).removeListener("end",M).removeListener("close",b),!z)try{p.end()}catch(O){z=O}p.destroy(z),z&&(z.code!=="UND_ERR_INFO"||z.message!=="reset")?ge.destroy(e,z):ge.destroy(e)}},"onFinished");e.on("data",A).on("end",M).on("error",M).on("close",b),e.resume&&e.resume(),o.on("drain",l).on("error",M),e.errorEmitted??e.errored?setImmediate(()=>M(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>M(null)),(e.closeEmitted??e.closed)&&setImmediate(b)}i(Uwe,"writeStream");function gH(t,e,r,n,o,s,a,c){try{e?ge.isBuffer(e)&&(fe(s===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${a}content-length: ${s}\r
`,"latin1"):(fe(s===null,"no body must not have content length"),o.write(`${a}\r
`,"latin1")),n.onRequestSent(),r[qi]()}catch(u){t(u)}}i(gH,"writeBuffer");async function Gwe(t,e,r,n,o,s,a,c){fe(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new nu;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${a}content-length: ${s}\r
`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!c&&n.reset!==!1&&(o[rr]=!0),r[qi]()}catch(u){t(u)}}i(Gwe,"writeBlob");async function OH(t,e,r,n,o,s,a,c){fe(s!==0||r[w1]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let b=u;u=null,b()}}i(p,"onDrain");let A=i(()=>new Promise((b,M)=>{fe(u===null),o[Ft]?M(o[Ft]):u=b}),"waitForDrain");o.on("close",p).on("drain",p);let l=new $z({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:c,header:a});try{for await(let b of e){if(o[Ft])throw o[Ft];l.write(b)||await A()}l.end()}catch(b){l.destroy(b)}finally{o.off("close",p).off("drain",p)}}i(OH,"writeIterable");var $z=class{static{i(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:s,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=o,this.client=s,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Fa]=!0}write(e){let{socket:r,request:n,contentLength:o,client:s,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[Ft])throw r[Ft];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(o!==null&&a+p>o){if(s[d5])throw new nu;process.emitWarning(new nu)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[rr]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r
`,"latin1"),r!==null&&o!==r){if(n[d5])throw new nu;process.emitWarning(new nu)}e[T0].timeout&&e[T0].timeoutType===NA&&e[T0].timeout.refresh&&e[T0].timeout.refresh(),n[qi]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[Fa]=!1,e&&(fe(n[w1]<=1,"pipeline should only contain this request"),o(e))}};DH.exports=Lwe});var TH=m((rq0,xH)=>{"use strict";var bn=require("node:assert"),{pipeline:Hwe}=require("node:stream"),Ze=Xe(),{RequestContentLengthMismatchError:h5,RequestAbortedError:RH,SocketError:lb,InformationalError:z5}=p0(),{kUrl:jz,kReset:Zz,kClient:wA,kRunning:eg,kPending:Xwe,kQueue:Wa,kPendingIdx:g5,kRunningIdx:io,kError:co,kSocket:$1,kStrictContentLength:Vwe,kOnError:O5,kMaxConcurrentStreams:WH,kHTTP2Session:ao,kResume:xa,kSize:Jwe,kHTTPContext:Ywe}=G0(),Di=Symbol("open streams"),NH,wH=!1,Kz;try{Kz=require("node:http2")}catch{Kz={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:$we,HTTP2_HEADER_METHOD:jwe,HTTP2_HEADER_PATH:Kwe,HTTP2_HEADER_SCHEME:Zwe,HTTP2_HEADER_CONTENT_LENGTH:e6e,HTTP2_HEADER_EXPECT:t6e,HTTP2_HEADER_STATUS:r6e}}=Kz;function n6e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}i(n6e,"parseH2Headers");async function o6e(t,e){t[$1]=e,wH||(wH=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Kz.connect(t[jz],{createConnection:i(()=>e,"createConnection"),peerMaxConcurrentStreams:t[WH]});r[Di]=0,r[wA]=t,r[$1]=e,Ze.addListener(r,"error",i6e),Ze.addListener(r,"frameError",a6e),Ze.addListener(r,"end",c6e),Ze.addListener(r,"goaway",u6e),Ze.addListener(r,"close",function(){let{[wA]:o}=this,{[$1]:s}=o,a=this[$1][co]||this[co]||new lb("closed",Ze.getSocketInfo(s));if(o[ao]=null,o.destroyed){bn(o[Xwe]===0);let c=o[Wa].splice(o[io]);for(let u=0;u<c.length;u++){let p=c[u];Ze.errorRequest(o,p,a)}}}),r.unref(),t[ao]=r,e[ao]=r,Ze.addListener(e,"error",function(o){bn(o.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[co]=o,this[wA][O5](o)}),Ze.addListener(e,"end",function(){Ze.destroy(this,new lb("other side closed",Ze.getSocketInfo(this)))}),Ze.addListener(e,"close",function(){let o=this[co]||new lb("closed",Ze.getSocketInfo(this));t[$1]=null,this[ao]!=null&&this[ao].destroy(o),t[g5]=t[io],bn(t[eg]===0),t.emit("disconnect",t[jz],[t],o),t[xa]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...o){return A6e(t,...o)},resume(){s6e(t)},destroy(o,s){n?queueMicrotask(s):e.destroy(o).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}i(o6e,"connectH2");function s6e(t){let e=t[$1];e?.destroyed===!1&&(t[Jwe]===0&&t[WH]===0?(e.unref(),t[ao].unref()):(e.ref(),t[ao].ref()))}i(s6e,"resumeH2");function i6e(t){bn(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[$1][co]=t,this[wA][O5](t)}i(i6e,"onHttp2SessionError");function a6e(t,e,r){if(r===0){let n=new z5(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[$1][co]=n,this[wA][O5](n)}}i(a6e,"onHttp2FrameError");function c6e(){let t=new lb("other side closed",Ze.getSocketInfo(this[$1]));this.destroy(t),Ze.destroy(this[$1],t)}i(c6e,"onHttp2SessionEnd");function u6e(t){let e=this[co]||new lb(`HTTP/2: "GOAWAY" frame received with code ${t}`,Ze.getSocketInfo(this)),r=this[wA];if(r[$1]=null,r[Ywe]=null,this[ao]!=null&&(this[ao].destroy(e),this[ao]=null),Ze.destroy(this[$1],e),r[io]<r[Wa].length){let n=r[Wa][r[io]];r[Wa][r[io]++]=null,Ze.errorRequest(r,n,e),r[g5]=r[io]}bn(r[eg]===0),r.emit("disconnect",r[jz],[r],e),r[xa]()}i(u6e,"onHTTP2GoAway");function p6e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}i(p6e,"shouldSendContentLength");function A6e(t,e){let r=t[ao],{method:n,path:o,host:s,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:A}=e;if(a)return Ze.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let D=0;D<p.length;D+=2){let F=p[D+0],x=p[D+1];if(Array.isArray(x))for(let _=0;_<x.length;_++)l[F]?l[F]+=`,${x[_]}`:l[F]=x[_];else l[F]=x}let b,{hostname:M,port:z}=t[jz];l[$we]=s||`${M}
globstar while`,t,A,e,l,b),this.matchOne(t.slice(A),e.slice(l),r))return this.debug("globstar found match!",A,a,b),!0;if(b==="."||b===".."||!n.dot&&b.charAt(0)==="."){this.debug("dot detected!",t,A,e,l);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(r&&(this.debug(`
`;if(n.username||n.password){let b=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(b).toString("base64")}`}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let b of Object.keys(s))c+=`${b}: ${s[b]}\r
`)+4,e.outputData[0].data=e._header+n.substring(o),wl("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(wl("Creating `tls.Socket`: %o",this.connectOpts),s=kHe.connect(this.connectOpts)):(wl("Creating `net.Socket`: %o",this.connectOpts),s=PHe.connect(this.connectOpts)),await(0,GHe.once)(s,"connect"),s}};R3.protocols=["http","https"];Rn.HttpProxyAgent=R3;function XHe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(XHe,"omit")});var dre=m(U3=>{"use strict";Object.defineProperty(U3,"__esModule",{value:!0});U3.state=void 0;U3.state={instrumenterImplementation:void 0}});var Nre=m(J3=>{"use strict";Object.defineProperty(J3,"__esModule",{value:!0});J3.state=void 0;J3.state={operationRequestMap:new WeakMap}});var cse=m(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var lje=require("os"),dje=require("util");function bje(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}i(bje,"_interopDefaultLegacy");var fje=bje(dje);function Mje(t,...e){process.stderr.write(`${fje.default.format(t,...e)}${lje.EOL}`)}i(Mje,"log");var Koe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,ese,aT=[],cT=[],dC=[];Koe&&uT(Koe);var tse=Object.assign(t=>rse(t),{enable:uT,enabled:pT,disable:mje,log:Mje});function uT(t){ese=t,aT=[],cT=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?cT.push(new RegExp(`^${n.substr(1)}$`)):aT.push(new RegExp(`^${n}$`));for(let n of dC)n.enabled=pT(n.namespace)}i(uT,"enable");function pT(t){if(t.endsWith("*"))return!0;for(let e of cT)if(e.test(t))return!1;for(let e of aT)if(e.test(t))return!0;return!1}i(pT,"enabled");function mje(){let t=ese||"";return uT(""),t}i(mje,"disable");function rse(t){let e=Object.assign(r,{enabled:pT(t),destroy:hje,log:tse.log,namespace:t,extend:zje});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return i(r,"debug"),dC.push(e),e}i(rse,"createDebugger");function hje(){let t=dC.indexOf(this);return t>=0?(dC.splice(t,1),!0):!1}i(hje,"destroy");function zje(t){let e=rse(`${this.namespace}:${t}`);return e.log=this.log,e}i(zje,"extend");var CM=tse,nse=new Set,AC=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,bC,fC=CM("azure");fC.log=(...t)=>{CM.log(...t)};var AT=["verbose","info","warning","error"];AC&&(ase(AC)?ose(AC):console.error(`AZURE_LOG_LEVEL set to unknown log level '${AC}'; logging is not enabled. Acceptable values: ${AT.join(", ")}.`));function ose(t){if(t&&!ase(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${AT.join(",")}`);bC=t;let e=[];for(let r of nse)ise(r)&&e.push(r.namespace);CM.enable(e.join(","))}i(ose,"setLogLevel");function gje(){return bC}i(gje,"getLogLevel");var Zoe={verbose:400,info:300,warning:200,error:100};function Oje(t){let e=fC.extend(t);return sse(fC,e),{error:lC(e,"error"),warning:lC(e,"warning"),info:lC(e,"info"),verbose:lC(e,"verbose")}}i(Oje,"createClientLogger");function sse(t,e){e.log=(...r)=>{t.log(...r)}}i(sse,"patchLogMethod");function lC(t,e){let r=Object.assign(t.extend(e),{level:e});if(sse(t,r),ise(r)){let n=CM.disable();CM.enable(n+","+r.namespace)}return nse.add(r),r}i(lC,"createLogger");function ise(t){return!!(bC&&Zoe[t.level]<=Zoe[bC])}i(ise,"shouldEnable");function ase(t){return AT.includes(t)}i(ase,"isAzureLogLevel");Yl.AzureLogger=fC;Yl.createClientLogger=Oje;Yl.getLogLevel=gje;Yl.setLogLevel=ose});var bT=m(BM=>{"use strict";Object.defineProperty(BM,"__esModule",{value:!0});var $l=new WeakMap,MC=new WeakMap,yM=class t{static{i(this,"AbortSignal")}constructor(){this.onabort=null,$l.set(this,[]),MC.set(this,!1)}get aborted(){if(!MC.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return MC.get(this)}static get none(){return new t}addEventListener(e,r){if(!$l.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");$l.get(this).push(r)}removeEventListener(e,r){if(!$l.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=$l.get(this),o=n.indexOf(r);o>-
Polling status: ${hse.includes(A)?"Stopped":"Running"}`),A==="succeeded"){let l=a(p,r);if(l!==void 0)return{response:await e(l).catch(Mse({state:r,stateProxy:n,isOperationError:c})),status:A}}return{response:p,status:A}}i(jje,"pollOperationHelper");async function Ese(t){let{poll:e,state:r,stateProxy:n,options:o,getOperationStatus:s,getResourceLocation:a,getOperationLocation:c,isOperationError:u,withOperationLocation:p,getPollingInterval:A,processResult:l,getError:b,updateState:M,setDelay:z,isDone:O,setErrorAsResult:y}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:B,status:q}=await jje({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:E,getResourceLocation:a,isOperationError:u,options:o});if(gse({status:q,response:B,state:r,stateProxy:n,isDone:O,processResult:l,getError:b,setErrorAsResult:y}),!hse.includes(q)){let D=A?.(B);D&&z(D);let F=c?.(B,r);if(F!==void 0){let x=E!==F;r.config.operationLocation=F,p?.(F,x)}else p?.(E,!1)}M?.(r,B)}}i(Ese,"pollOperation");function Cse(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}i(Cse,"getOperationLocationPollingUrl");function yse(t){return t.headers.location}i(yse,"getLocationHeader");function Bse(t){return t.headers["operation-location"]}i(Bse,"getOperationLocationHeader");function qse(t){return t.headers["azure-asyncoperation"]}i(qse,"getAzureAsyncOperationHeader");function Kje(t){var e;let{location:r,requestMethod:n,requestPath:o,resourceLocationConfig:s}=t;switch(n){case"PUT":return o;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:o;default:return a()}function a(){switch(s){case"azure-async-operation":return;case"original-uri":return o;default:return r}}i(a,"getDefault")}i(Kje,"findResourceLocation");function Dse(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:o}=t,s=Bse(e),a=qse(e),c=Cse({operationLocation:s,azureAsyncOperation:a}),u=yse(e),p=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:Kje({requestMethod:p,location:u,requestPath:n,resourceLocationConfig:o})}:u!==void 0?{mode:"ResourceLocation",operationLocation:u}:p==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}i(Dse,"inferLroMode");function Ise(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn'tnecessarilyindicatetheoperationhasfailed.CheckyourAzuresubscriptionorresourcestatusformoreinformation.`);switch(e?.toLocaleLowerCase()){case void 0:return BT(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return np.verbose(`LRO:unrecognizedoperationstatus:${e}`),e}}i(Ise,"transformStatus");function Zje(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return Ise({status:r,statusCode:t.statusCode})}i(Zje,"getStatus");function eKe(t){var e,r;let{properties:n,provisioningState:o}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:o;return Ise({status:s,statusCode:t.statusCode})}i(eKe,"getProvisioningState");function BT(t){return t===202?"running":t<300?"succeeded":"failed"}i(BT,"toOperationStatus");function Rse({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?tKe(new Date(e)):r*1e3}}i(Rse,"parseRetryAfter");function Nse(t){let e=t.flatResponse.error;if(!e){np.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){np.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}i(Nse,"getErrorFromResponse");function tKe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}i(tKe,"calculatePollingIntervalFromDate");function wse(t){let{response:e,state:r,operationLocation:n}=t;function o(){var a;switch
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}i(ko0,"logUnexpecedPropertyAccessOnce");functionUo0(){Object.keys(u4).forEach(function(t){deleteu4[t]})}i(Uo0,"resetLoggedProperties")});varA4=m(Ps=>{"use strict";Ps.__esModule=!0;Ps.HandlebarsEnvironment=u_;functionGpe(t){returnt&&t.__esModule?t:{default:t}}i(Gpe,"_interopRequireDefault");varzp=$t(),Go0=on(),a_=Gpe(Go0),Ho0=n_(),Xo0=Qpe(),Vo0=s_(),p4=Gpe(Vo0),Jo0=i_(),Yo0="4.7.9";Ps.VERSION=Yo0;var$o0=8;Ps.COMPILER_REVISION=$o0;varjo0=7;Ps.LAST_COMPATIBLE_COMPILER_REVISION=jo0;varKo0={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"};Ps.REVISION_CHANGES=Ko0;varc_="[object Object]";functionu_(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Ho0.registerDefaultHelpers(this),Xo0.registerDefaultDecorators(this)}i(u_,"HandlebarsEnvironment");u_.prototype={constructor:u_,logger:p4.default,log:p4.default.log,registerHelper:i(function(e,r){if(zp.toString.call(e)===c_){if(r)thrownewa_.default("Arg not supported with multiple helpers");zp.extend(this.helpers,e)}elsethis.helpers[e]=r},"registerHelper"),unregisterHelper:i(function(e){deletethis.helpers[e]},"unregisterHelper"),registerPartial:i(function(e,r){if(zp.toString.call(e)===c_)zp.extend(this.partials,e);else{if(typeofr>"u")thrownewa_.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:i(function(e){deletethis.partials[e]},"unregisterPartial"),registerDecorator:i(function(e,r){if(zp.toString.call(e)===c_){if(r)thrownewa_.default("Arg not supported with multiple decorators");zp.extend(this.decorators,e)}elsethis.decorators[e]=r},"registerDecorator"),unregisterDecorator:i(function(e){deletethis.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:i(function(){Jo0.resetLoggedProperties()},"resetLoggedPropertyAccesses")};varZo0=p4.default.log;Ps.log=Zo0;Ps.createFrame=zp.createFrame;Ps.logger=p4.default});varXpe=m((l4,Hpe)=>{"use strict";l4.__esModule=!0;functionp_(t){this.string=t}i(p_,"SafeString");p_.prototype.toString=p_.prototype.toHTML=function(){return""+this.string};l4.default=p_;Hpe.exports=l4.default});varVpe=m(A_=>{"use strict";A_.__esModule=!0;A_.wrapHelper=es0;functiones0(t,e){if(typeoft!="function")returnt;varr=i(function(){varo=arguments[arguments.length-1];returnarguments[arguments.length-1]=e(o),t.apply(this,arguments)},"wrapper");returnr}i(es0,"wrapHelper")});varZpe=m(yc=>{"use strict";yc.__esModule=!0;yc.checkRevision=is0;yc.template=as0;yc.wrapProgram=d4;yc.resolvePartial=cs0;yc.invokePartial=us0;yc.noop=jpe;functionts0(t){returnt&&t.__esModule?t:{default:t}}i(ts0,"_interopRequireDefault");functionrs0(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);returne.default=t,e}i(rs0,"_interopRequireWildcard");varns0=$t(),q2=rs0(ns0),os0=on(),aa=ts0(os0),ca=A4(),Jpe=n_(),ss0=Vpe(),Ype=i_();functionis0(t){vare=t&&t[0]||1,r=ca.COMPILER_REVISION;if(!(e>=ca.LAST_COMPATIBLE_COMPILER_REVISION&&e<=ca.COMPILER_REVISION))if(e<ca.LAST_COMPATIBLE_COMPILER_REVISION){varn=ca.REVISION_CHANGES[r],o=ca.REVISION_CHANGES[e];thrownewaa.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}elsethrownewaa.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}i(is0,"checkRevision");functionas0(t,e){if(!e)thrownewaa.default("No environment passed to template");if(!t||!t.main)thrownewaa.default("Unknown template object: "+typeoft);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);varr=t.compiler&&t.compiler[0]===7;functionn(a,c,u){u.hash&&(c=q2.extend({},c,u.hash),u.ids&&(u.ids[0]=!0)),a=e.VM.res
Expecting `+k.join(", ")+", got '"+(this.terminals_[D]||D)+"'":Te="Parse error on line "+(l+1)+": Unexpected "+(D==1?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(Te,{text:this.lexer.match,token:this.terminals_[D]||D,line:this.lexer.yylineno,loc:y,expected:k})}}if(_[0]instanceofArray&&_.length>1)thrownewError("Parse Error: multiple actions possible at state: "+x+", token: "+D);switch(_[0]){case1:a.push(D),c.push(this.lexer.yytext),u.push(this.lexer.yylloc),a.push(_[1]),D=null,F?(D=F,F=null):(b=this.lexer.yyleng,A=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,M>0&&M--);break;case2:if(ze=this.productions_[_[1]][1],Ne.$=c[c.length-ze],Ne._$={first_line:u[u.length-(ze||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(ze||1)].first_column,last_column:u[u.length-1].last_column},E&&(Ne._$.range=[u[u.length-(ze||1)].range[0],u[u.length-1].range[1]]),ye=this.performAction.call(Ne,A,b,l,this.yy,_[1],c,u),typeofye<"u")returnye;ze&&(a=a.slice(0,-1*ze*2),c=c.slice(0,-1*ze),u=u.slice(0,-1*ze)),a.push(this.productions_[_[1]][0]),c.push(Ne.$),u.push(Ne._$),Fe=p[a[a.length-2]][a[a.length-1]],a.push(Fe);break;case3:return!0}}return!0},"parse")},e=(function(){varn={EOF:1,parseError:i(function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);elsethrownewError(s)},"parseError"),setInput:i(function(s){returnthis._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){vars=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;vara=s.match(/(?:\r\n?|\n).*/g);returna?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:i(function(s){vara=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;varu=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);varp=this.yylloc.range;returnthis.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this},"unput"),more:i(function(){returnthis._more=!0,this},"more"),less:i(function(s){this.unput(this.match.slice(s))},"less"),pastInput:i(function(){vars=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){vars=this.match;returns.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){vars=this.pastInput(),a=newArray(s.length+1).join("-");returns+this.upcomingInput()+`
`+a+"^"},"showPosition"),next:i(function(){if(this.done)returnthis.EOF;this._input||(this.done=!0);vars,a,c,u,p,A;this._more||(this.yytext="",this.match="");for(varl=this._currentRules(),b=0;b<l.length&&(c=this._input.match(this.rules[l[b]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,u=b,!this.options.flex)));b++);returna?(A=a[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.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],s=this.performAction.call(this,this.yy,this,l[u],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){vars=this.next();returntypeofs<"u"?s:this.lex()},"lex"),begin:i(function(s){this.conditionStack.push(s)},"begin"),popState:i(function(){returnthis.conditionStack.pop()},"popState"),_currentRules:i(function(){returnthis.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:i(function(){returnthis.conditionStack[this.conditionStack.length-2]},"topState"),pushState:i(function(s){this.begin(s)},"begin")};returnn.options={},n.performAction=i(function(s,a,c,u){functionp(l,b){returna.yytext=a.yytext.substring(l,a.yyleng-b+l)}i(p,"strip");varA=u;switch(c){case0:if(a.yytext.slice(-2)==="\\\\"?(p(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(p(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return15;break;case1:return15;case2:returnthis.popState(),15;break;case3:returnthis.begin("raw"),15;break;case4:returnthis.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(p(5,9),"END_RAW_BLOCK");case5:return15;case6:returnthis.popState(),14;break;case7:return65;case8:return68;case9:return19;case10:returnthis.popState(),this.begin("raw"),23;break;case11:return55;case12:return60;case13:return29;case14:return47;case15:returnthis.popState(),44;break;case16:returnthis.popState(),44;break;case17:return34;case18:return39;case19:return51;case20:return48;case21:this.unput(a.yytext),this.popState(),this.begin("com");break;case22:returnthis.popState(),14;break;case23:return48;case24:return73;case25:return72;case26:return72;case27:return87;case28:break;case29:returnthis.popState(),54;break;case30:returnthis.popState(),33;break;case31:returna.yytext=p(1,2).replace(/\\"/g,'"'),80;break;case32:returna.yytext=p(1,2).replace(/\\'/g,"'"),80;break;case33:return85;case34:return82;case35:return82;case36:return83;case37:return84;case38:return81;case39:return75;case40:return77;case41:return72;case42:returna.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case43:return"INVALID";case44:return5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;functionr(){this.yy={}}returni(r,"Parser"),r.prototype=t,t.Parser=r,newr})();h4.default=Os0;cAe.exports=h4.default});varE4=m((O4,lAe)=>{"use strict";O4.__esModule=!0;functionEs0(t){returnt&&t.__esModule?t:{default:t}}i(Es0,"_interopRequireDefault");varCs0=on(),m_=Es0(Cs0);functionz4(){this.parents=[]}i(z4,"Visitor");z4.prototype={constructor:z4,mutating:!1,acceptKey:i(function(e,r){varn=this.accept(e[r]);if(this.mutating){if(n&&!z4.prototype[n.type])thrownewm_.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:i(function(e,r){if(this.a
`])}),e},"merge"),each:i(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:i(function(){var e=this.currentLocation||{start:{}};return new Cp(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:i(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Cp?e:(e=__(e,this,r),new Cp(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:i(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:i(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:i(function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var a=__(e[s],r);a!=="undefined"&&n.push([r.quotedString(s),":",a])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},"objectLiteral"),generateList:i(function(e){for(var r=this.empty(),n=0,o=e.length;n<o;n++)n&&r.add(","),r.add(__(e[n],this));return r},"generateList"),generateArray:i(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};N4.default=VAe;JAe.exports=N4.default});var ele=m((w4,ZAe)=>{"use strict";w4.__esModule=!0;function KAe(t){return t&&t.__esModule?t:{default:t}}i(KAe,"_interopRequireDefault");var $Ae=A4(),gi0=on(),P_=KAe(gi0),Oi0=$t(),Ei0=YAe(),jAe=KAe(Ei0);function S2(t){this.value=t}i(S2,"Literal");function F2(){}i(F2,"JavaScriptCompiler");F2.prototype={nameLookup:i(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:i(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:i(function(){var e=$Ae.COMPILER_REVISION,r=$Ae.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:i(function(e,r,n){return Oi0.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:i(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:i(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:i(function(e,r,n,o){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,a=void 0,c=void 0,u=void 0,p=void 0;for(u=0,p=s.length;u<p;u++)a=s[u],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new P_.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
`)}i(QA0,"fromDER")});varHB=m(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.SHA2_HASH_ALGOS=Lc.RSA_SIGNATURE_ALGOS=Lc.ECDSA_SIGNATURE_ALGOS=void0;Lc.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};Lc.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};Lc.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});varF8=m(XB=>{"use strict";Object.defineProperty(XB,"__esModule",{value:!0});XB.RFC3161TimestampVerificationError=void0;varS8=classextendsError{static{i(this,"RFC3161TimestampVerificationError")}};XB.RFC3161TimestampVerificationError=S8});varFde=m(Ys=>{"use strict";varPA0=Ys&&Ys.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),kA0=Ys&&Ys.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),UA0=Ys&&Ys.__importStar||(function(){vart=i(function(e){returnt=Object.getOwnPropertyNames||function(r){varn=[];for(varoinr)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);returnn},t(e)},"ownKeys");returnfunction(e){if(e&&e.__esModule)returne;varr={};if(e!=null)for(varn=t(e),o=0;o<n.length;o++)n[o]!=="default"&&PA0(r,e,n[o]);returnkA0(r,e),r}})();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.TSTInfo=void0;varSde=UA0(sd()),GA0=HB(),HA0=F8(),W8=class{static{i(this,"TSTInfo")}root;constructor(e){this.root=e}getversion(){returnthis.root.subs[0].toInteger()}getgenTime(){returnthis.root.subs[4].toDate()}getmessageImprintHashAlgorithm(){lete=this.messageImprintObj.subs[0].subs[0].toOID();returnGA0.SHA2_HASH_ALGOS[e]}getmessageImprintHashedMessage(){returnthis.messageImprintObj.subs[1].value}getraw(){returnthis.root.toDER()}verify(e){letr=Sde.digest(this.messageImprintHashAlgorithm,e);if(!Sde.bufferEqual(r,this.messageImprintHashedMessage))thrownewHA0.RFC3161TimestampVerificationError("message imprint does not match artifact")}getmessageImprintObj(){returnthis.root.subs[2]}};Ys.TSTInfo=W8});varxde=m($s=>{"use strict";varXA0=$s&&$s.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),VA0=$s&&$s.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),JA0=$s&&$s.__importStar||(function(){vart=i(function(e){returnt=Object.getOwnPropertyNames||function(r){varn=[];for(varoinr)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);returnn},t(e)},"ownKeys");returnfunction(e){if(e&&e.__esModule)returne;varr={};if(e!=null)for(varn=t(e),o=0;o<n.length;o++)n[o]!=="default"&&XA0(r,e,n[o]);returnVA0(r,e),r}})();Object.defineProperty($s,"__esModule",{value:!0});$s.RFC3161Timestamp=void0;varYA0=kB(),x8=JA0(sd()),Wde=HB(),km=F8(),$A0=Fde(),jA0="1.2.840.113549.1.7.2",KA0="1.2.840.113549.1.9.16.1.4",ZA0="1.2.840.113549.1.9.4",T8=classt{static{i(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}staticparse(e){letr=YA0.ASN1Obj.parseBuffer(e);returnnewt(r)}getstatus(){returnthis.pkiStatusInfoObj.subs[0].toInteger()}getcontentType(){returnthis.contentTypeObj.toOID()}geteContentType(){returnthis.eContentTypeObj.toOID()}getsigningTime(){returnthis.tstInfo.genTime}getsignerIssuer(){returnthis.signerSidObj.subs[0].value}getsignerSerialNumber(){returnthis.signerSidObj.subs[1].value}getsignerDigestAlgorith
`,z20=/\u2014 (\S+) (\S+)\n/g;function g20(t,e){let r=t.inclusionProof,n=lP.fromString(r.checkpoint.envelope),o=lq.fromString(n.note);if(!O20(n,e))throw new Vm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return o}i(g20,"verifyCheckpoint");function O20(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let o=e.find(s=>fbe.crypto.bufferEqual(s.logID.subarray(0,4),n.keyHint)&&s.baseURL.match(n.name));return o?fbe.crypto.verify(r,o.publicKey,n.signature):!1})}i(O20,"verifySignedNote");var lP=class t{static{i(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(AP))throw new Vm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(AP),n=e.slice(0,r+1),s=e.slice(r+AP.length).matchAll(z20),a=Array.from(s,c=>{let[,u,p]=c,A=Buffer.from(p,"base64");if(A.length<5)throw new Vm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:A.subarray(0,4),signature:A.subarray(4)}});if(a.length===0)throw new Vm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},lq=class t{static{i(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,o){this.origin=e,this.logSize=r,this.logHash=n,this.rest=o}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new Vm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],o=BigInt(r[1]),s=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,o,s,a)}};Jm.LogCheckpoint=lq});var mbe=m(MP=>{"use strict";Object.defineProperty(MP,"__esModule",{value:!0});MP.verifyMerkleInclusion=y20;var fP=wo(),dP=It(),E20=Buffer.from([0]),C20=Buffer.from([1]);function y20(t,e){let r=t.inclusionProof,n=BigInt(r.logIndex),o=BigInt(e.logSize);if(n<0n||n>=o)throw new dP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${n}`});let{inner:s,border:a}=B20(n,o);if(r.hashes.length!==s+a)throw new dP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,s),u=r.hashes.slice(s),p=w20(t.canonicalizedBody),A=D20(q20(p,c,n),u);if(!fP.crypto.bufferEqual(A,e.logHash))throw new dP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}i(y20,"verifyMerkleInclusion");function B20(t,e){let r=I20(t,e),n=R20(t>>BigInt(r));return{inner:r,border:n}}i(B20,"decompInclProof");function q20(t,e,r){return e.reduce((n,o,s)=>r>>BigInt(s)&BigInt(1)?bP(o,n):bP(n,o),t)}i(q20,"chainInner");function D20(t,e){return e.reduce((r,n)=>bP(n,r),t)}i(D20,"chainBorderRight");function I20(t,e){return N20(t^e-BigInt(1))}i(I20,"innerProofSize");function R20(t){return t.toString(2).split("1").length-1}i(R20,"onesCount");function N20(t){return t===0n?0:t.toString(2).length}i(N20,"bitLength");function bP(t,e){return fP.crypto.digest("sha256",C20,t,e)}i(bP,"hashChildren");function w20(t){return fP.crypto.digest("sha256",E20,t)}i(w20,"hashLeaf")});var zbe=m(mP=>{"use strict";Object.defineProperty(mP,"__esModule",{value:!0});mP.verifyTLogSET=W20;var hbe=wo(),S20=It(),F20=cd();function W20(t,e){if(!(0,F20.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(o=>{let s=x20(t),a=Buffer.from(hbe.json.canonicalize(s),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return hbe.crypto.verify(a,o.publicKey,c)}))throw new S20.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}i(W20,"verifyTLogSET");function x20(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:o}=t;return{body:o.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}i(x20,"toVerificationPayload")});var Obe=m(dq=>{"use strict";Object.defineProperty(dq,"__esModule",{value:!0});dq.verifyTLogBody=Q20;dq.verifyTLogInclusion=P20;var gbe=Abe(),gP=It(),hP=lbe(),zP=dbe(),T20=bbe(),v20=Mbe(),L20=mbe(),_20=zbe();function Q20(t,e){let{kind:r,version:n}=t.kindVersion,o=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==o.kind||n!==o.apiVersion)throw new gP.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${n},received:${o.kind}/${o.apiVersion}`});switch(r){case"dsse":if(n==hP.DSSE_API_VERSION_V1)return(0,hP.verifyDSSETLogBody)(o,e);{let s=gbe.Entry.fromJSON(o);return(0,hP.verifyDSSETLogBodyV2)(s,e)}case"intoto":return(0,T20.verifyIntotoTLogBody)(o,e);case"hashedrekord":if(n==zP.HASHEDREKORD_API_VERSION_V1)return(0,zP.verifyHashedRekordTLogBody)(o,e);{let s=gbe.Entry.fromJSON(o);return(0,zP.verifyHashedRekordTLogBodyV2)(s,e)}default:throw new gP.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}i(Q20,"verifyTLogBody");function P20(t,e){let r=!1;if(k20(t)&&((0,_20.verifyTLogSET)(t,e),r=!0),U20(t)){let n=(0,v20.verifyCheckpoint)(t,e);(0,L20.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new gP.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}i(P20,"verifyTLogInclusion");function k20(t){return t.inclusionPromise!==void 0}i(k20,"isTLogEntryWithInclusionPromise");function U20(t){return t.inclusionProof!==void 0}i(U20,"isTLogEntryWithInclusionProof")});var qbe=m(bq=>{"use strict";Object.defineProperty(bq,"__esModule",{value:!0});bq.Verifier=void 0;var G20=require("util"),
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,c;return{s:i(function(){r=(0,CC0.default)(t)},"s"),n:i(function(){var p=r.next();return s=p.done,p},"n"),e:i(function(p){a=!0,c=p},"e"),f:i(function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}i(Sh,"_createForOfIteratorHelper");function wC0(t,e){var r;if(t){if(typeof t=="string")return TCe(t,e);var n=(0,ro.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,DC0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TCe(t,e)}}i(wC0,"_unsupportedIterableToArray");function TCe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}i(TCe,"_arrayLikeToArray");var k0="xregexp",eA={astral:!1,namespacing:!1},M1={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},pi={},Nh={},Wd={},R7=[],xd="default",vCe="class",SC0={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},FC0=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,WC0=M1.exec.call(/()??/,"")[1]===void 0,xC0=(0,Zp.default)(/x/)!==void 0,TC0={},kCe=TC0.toString;function w7(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),n=".a".replace(new RegExp("a",r),".")==="..";n&&(e=!1)}}catch{e=!1}return e}i(w7,"hasNativeFlag");var UCe=w7("u"),S7=w7("y"),GCe={g:!0,i:!0,m:!0,u:UCe,y:S7};function HCe(t,e,r,n,o){var s;if(t[k0]={captureNames:e},o)return t;if(t.__proto__)t.__proto__=K.prototype;else for(var a in K.prototype)t[a]=K.prototype[a];return t[k0].source=r,t[k0].flags=n&&(0,NC0.default)(s=n.split("")).call(s).join(""),t}i(HCe,"augment");function wh(t){return M1.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}i(wh,"clipDuplicates");function rA(t,e){var r;if(!K.isRegExp(t))throw new TypeError("Type RegExp expected");var n=t[k0]||{},o=vC0(t),s="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(o=M1.replace.call(o,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(s+="g"),e.addY&&(s+="y"),s&&(o=wh(o+s)),e.isInternalOnly||(n.source!==void 0&&(c=n.source),(0,Zp.default)(n)!=null&&(u=s?wh((0,Zp.default)(n)+s):(0,Zp.default)(n))),t=HCe(new RegExp(e.source||t.source,o),LC0(t)?(0,ro.default)(r=n.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}i(rA,"copyRegex");function XCe(t){return(0,PCe.default)(t,16)}i(XCe,"dec");function VCe(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||M1.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||_C0(t.input,t.index+t[0].length,r)?"":"(?:)"}i(VCe,"getContextualTokenSeparator");function vC0(t){return xC0?(0,Zp.default)(t):M1.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}i(vC0,"getNativeFlags");function LC0(t){return!!(t[k0]&&t[k0].captureNames)}i(LC0,"hasNamedCapture");function JCe(t){return(0,PCe.default)(t,10).toString(16)}i(JCe,"hex");function _C0(t,e,r){var n="\\(\\?#[^)]*\\)",o="#[^#\\n]*",s="[?*+]|{\\d+(?:,\\d*)?}";return M1.test.call((0,tA.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,ro.default)(t).call(t,e))}i(_C0,"isQuantifierNext");function F7(t,e){return kCe.call(t)==="[object ".concat(e,"]")}i(F7,"isType");function YCe(t){for(;t.length<4;)t="0".concat(t);return t}i(YCe,"pad4");function QC0(t,e){if(wh(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=M1.replace.call(t,/^\(\?([\w$]+)\)/,function(s,a){if(M1.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(s));return e=wh(e+a),""});var
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,c;return{s:i(function(){r=(0,Ey0.default)(t)},"s"),n:i(function(){var p=r.next();return s=p.done,p},"n"),e:i(function(p){a=!0,c=p},"e"),f:i(function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}i(Ny0,"_createForOfIteratorHelper");function wy0(t,e){var r;if(t){if(typeof t=="string")return Tye(t,e);var n=(0,Dy0.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,qy0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tye(t,e)}}i(wy0,"_unsupportedIterableToArray");function Tye(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}i(Tye,"_arrayLikeToArray");var Sy0=i(function(e){var r={},n=e._dec,o=e._hex,s=e._pad4;function a(b){return b.replace(/[- _]+/g,"").toLowerCase()}i(a,"normalize");function c(b){var M=/^\\[xu](.+)/.exec(b);return M?n(M[1]):b.charCodeAt(b[0]==="\\"?1:0)}i(c,"charCode");function u(b){var M="",z=-1;return(0,Ry0.default)(e).call(e,b,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(O){var y=c(O[1]);y>z+1&&(M+="\\u".concat(s(o(z+1))),y>z+2&&(M+="-\\u".concat(s(o(y-1))))),z=c(O[2]||O[1])}),z<65535&&(M+="\\u".concat(s(o(z+1))),z<65534&&(M+="-\\uFFFF")),M}i(u,"invertBmp");function p(b){var M="b!";return r[b][M]||(r[b][M]=u(r[b].bmp))}i(p,"cacheInvertedBmp");function A(b,M){var z=r[b],O="";if(z.bmp&&!z.isBmpLast){var y;O=(0,v7.default)(y="[".concat(z.bmp,"]")).call(y,z.astral?"|":"")}if(z.astral&&(O+=z.astral),z.isBmpLast&&z.bmp){var E;O+=(0,v7.default)(E="".concat(z.astral?"|":"","[")).call(E,z.bmp,"]")}return M?"(?:(?!".concat(O,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(O,")")}i(A,"buildAstral");function l(b,M){var z=M?"a!":"a=";return r[b][z]||(r[b][z]=A(b,M))}i(l,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(b,M,z){var O="Invalid double negation ",y="Unknown Unicode token ",E="Unicode token missing data ",B="Astral mode required for Unicode token ",q="Astral mode does not support Unicode tokens within character classes",D=b[1]==="P"||!!b[2],F=(0,Iy0.default)(z).call(z,"A"),x=a(b[4]||b[3]),_=r[x];if(b[1]==="P"&&b[2])throw new SyntaxError(O+b[0]);if(!r.hasOwnProperty(x))throw new SyntaxError(y+b[0]);if(_.inverseOf){if(x=a(_.inverseOf),!r.hasOwnProperty(x)){var ce;throw new ReferenceError((0,v7.default)(ce="".concat(E+b[0]," -> ")).call(ce,_.inverseOf))}_=r[x],D=!D}if(!(_.bmp||F))throw new SyntaxError(B+b[0]);if(F){if(M==="class")throw new SyntaxError(q);return l(x,D)}return M==="class"?D?p(x):_.bmp:"".concat((D?"[^":"[")+_.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(b){var M="Unicode token requires name",z="Unicode token has no character data ",O=Ny0(b),y;try{for(O.s();!(y=O.n()).done;){var E=y.value;if(!E.name)throw new Error(M);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(z+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(B){O.e(B)}finally{O.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(b){var M=a(b);return r[M]}},"_default");Lh.default=Sy0;vye.exports=Lh.default});var Qye=m((Zf1,_ye)=>{_ye.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",
`).map(s=>s.trim());for(let s of o)!s||s.startsWith("#")||n.patterns.push(new zf(s));return n.searchPaths.push(...qw(n.patterns)),n})}static stat(e,r,n){return Sw(this,void 0,void 0,function*(){let o;if(r.followSymbolicLinks)try{o=yield hl.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Cn(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else o=yield hl.promises.lstat(e.path);if(o.isDirectory()&&r.followSymbolicLinks){let s=yield hl.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===s)){Cn(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return o})}};var jke=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function Wee(t,e){return jke(this,void 0,void 0,function*(){return yield vO.create(t,e)})}i(Wee,"create");var ZO=w(require("crypto"),1),El=w(require("fs"),1),Fu=w(require("path"),1),D1e=w(B1e(),1),I1e=w(require("util"),1);var qf;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(qf||(qf={}));var Qt;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Qt||(Qt={}));var Gr;(function(t){t.GNU="gnu",t.BSD="bsd"})(Gr||(Gr={}));var jO=2,KO=5e3,Zw=5e3,e6=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,q1e=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Df="cache.tar",t6="manifest.txt",LS0=10*Math.pow(1024,3);var Ol=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},oGe=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(c,u){a=t[s](a),o(c,u,a.done,a.value)})}}function o(s,a,c,u){Promise.resolve(u).then(function(p){s({value:p,done:c})},a)}},sGe="1.0";function If(){return Ol(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=Fu.join(n,"actions","temp")}let r=Fu.join(e,ZO.randomUUID());return yield Ti(r),r})}i(If,"createTempDirectory");function os(t){return El.statSync(t).size}i(os,"getArchiveFileSizeInBytes");function r6(t){return Ol(this,void 0,void 0,function*(){var e,r,n,o,s;let a=[],c=(s=process.env.GITHUB_WORKSPACE)!==null&&s!==void 0?s:process.cwd(),u=yield Wee(t.join(`
`),{implicitDescendants:!1});try{for(var p=!0,A=oGe(u.globGenerator()),l;l=yield A.next(),e=l.done,!e;p=!0){o=l.value,p=!1;let M=Fu.relative(c,o).replace(new RegExp(`\\${Fu.sep}`,"g"),"/");N(`Matched: ${M}`),M===""?a.push("."):a.push(`${M}`)}}catch(b){r={error:b}}finally{try{!p&&!e&&(n=A.return)&&(yield n.call(A))}finally{if(r)throw r.error}}return a})}i(r6,"resolvePaths");function Rf(t){return Ol(this,void 0,void 0,function*(){return I1e.promisify(El.unlink)(t)})}i(Rf,"unlinkFile");function R1e(t){return Ol(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),N(`Checking ${e} ${r.join(" ")}`);try{yield Pr(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i(o=>n+=o.toString(),"stdout"),stderr:i(o=>n+=o.toString(),"stderr")}})}catch(o){N(o.message)}return n=n.trim(),N(n),n})}i(R1e,"getVersion");function Nf(){return Ol(this,void 0,void 0,function*(){let t=yield R1e("zstd",["--quiet"]),e=D1e.clean(t);return N(`zstd version: ${e}`),t===""?Qt.Gzip:Qt.ZstdWithoutLong})}i(Nf,"getCompressionMethod");function nc(t){return t===Qt.Gzip?qf.Gzip:qf.Zstd}i(nc,"getCacheFileName");function N1e(){return Ol(this,void 0,void 0,function*(){return El.existsSync(e6)?e6:(yield R1e("tar")).toLowerCase().includes("gnu tar")?at("tar"):""})}i(N1e,"getGnuTarPathOnWindows");function n6(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}i(n6,"assertDefined");function Cl(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(sGe),ZO.createHash("sha256").update(n.join("|")).digest("hex")}i(Cl,"getCacheVersion");function w1e(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}i(w1e,"getRuntimeToken");var Sf=w(require("http"),1),i6=w(require("https"),1);function o6(t){let e=t.protocol==="https:";if(iGe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new t3(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new t3(`http://${r}`)}else return}i(o6,"getProxyUrl");function iGe(t){if(!t.hostname)return!1;let e=t.hostname;if(aGe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let o=[t.hostname.toUpperCase()];typeof n=="number"&&o.push(`${o[0]}:${n}`);for(let s of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(s==="*"||o.some(a=>a===s||a.endsWith(`.${s}`)||s.startsWith(".")&&a.endsWith(`${s}`)))return!0;return!1}i(iGe,"checkBypass");function aGe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(aGe,"isLoopbackAddress");var t3=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var oc=w($d(),1),S1e=w(cl(),1);var E1=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},s1;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllo
${EGe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function a3(t){return t instanceof kt?!0:xu(t)&&t.name==="RestError"}i(a3,"isRestError");function ar(t,e){return Buffer.from(t,e)}i(ar,"stringToUint8Array");var c3=w(require("node:http"),1),u3=w(require("node:https"),1),M6=w(require("node:zlib"),1),$1e=require("node:stream");var qn=Ff("ts-http-runtime");var CGe={};function Wf(t){return t&&typeof t.pipe=="function"}i(Wf,"isReadableStream");function Y1e(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=i(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}i(Y1e,"isStreamComplete");function j1e(t){return t&&typeof t.byteLength=="number"}i(j1e,"isArrayBuffer");var p3=class extends $1e.Transform{static{i(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.progressCallback=e}},m6=class{static{i(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new is("The operation was aborted. Request has already been canceled.");n=i(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let o;e.timeout>0&&(o=setTimeout(()=>{let p=new zo;qn.info(`request to '${p.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),a=s?.includes("gzip")||s?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let p=DGe(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let z=e.onUploadProgress,O=new p3(z);O.on("error",y=>{qn.error("Error in upload progress",y)}),Wf(c)?c.pipe(O):O.end(c),c=O}let p=await this.makeRequest(e,r,c);o!==void 0&&clearTimeout(o);let A=yGe(p),b={status:p.statusCode??0,headers:A,request:e};if(e.method==="HEAD")return p.resume(),b;u=a?BGe(p,A):p;let M=e.onDownloadProgress;if(M){let z=new p3(M);z.on("error",O=>{qn.error("Error in download progress",O)}),u.pipe(z),u=z}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(b.status)?b.readableStreamBody=u:b.bodyAsText=await qGe(u),b}finally{if(e.abortSignal&&n){let p=Promise.resolve();Wf(c)&&(p=Y1e(c));let A=Promise.resolve();Wf(u)&&(A=Y1e(u)),Promise.all([p,A]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{qn.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let o=new URL(e.url),s=o.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,s),hostname:o.hostname,path:`${o.pathname}${o.search}`,port:o.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((u,p)=>{let A=s?c3.default.request(c,u):u3.default.request(c,u);A.once("error",l=>{p(new kt(l.message,{code:l.code??kt.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new is("The operation was aborted. Rejecting from abort signal callback while making request.");A.destroy(l),p(l)}),n&&Wf(n)?n.pipe(A):n?typeof n=="string"||Buffer.isBuffer(n)?A.end(n):j1e(n)?A.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(qn.error("Unrecognized body type",n),p(new kt("Unrecognized body type"))):A.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?c3.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new c3.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return u3.default.globalAgent;let o=e.tlsSettings??CGe,s=this.cachedHttpsAgents.get(o);return s&&s.options.keepAlive===!n||(qn.info("No cached TLS Agent exi
`;return e}i(oXe,"encodeHeaders");function sXe(t){return t instanceof Uint8Array?t.byteLength:W3(t)?t.size===-1?void 0:t.size:void 0}i(sXe,"getLength");function iXe(t){let e=0;for(let r of t){let n=sXe(r);if(n===void 0)return;e+=n}return e}i(iXe,"getTotalLength");async function aXe(t,e,r){let n=[ar(`--${r}`,"utf-8"),...e.flatMap(s=>[ar(`\r
`,"utf-8")],o=iXe(n);o&&t.headers.set("Content-Length",o),t.body=await tre(n)}i(aXe,"buildRequestBody");var vf="multipartPolicy",cXe=70,uXe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function pXe(t){if(t.length>cXe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!uXe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}i(pXe,"assertValidBoundary");function T3(){return{name:vf,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBodyandregularbodycannotbesetatthesametime");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",o=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!o)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,s,a]=o;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?pXe(r):r=nXe(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await aXe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}i(T3,"multipartPolicy");function v3(){return i3()}i(v3,"createEmptyPipeline");var rre=n3({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Tv0=rre.logger;function us(t){return rre.createClientLogger(t)}i(us,"createClientLogger");var ps=us("core-rest-pipeline");function T6(t={}){return l3({logger:ps.info,...t})}i(T6,"logPolicy");var v6=d3;function L6(t={}){return b3(t)}i(L6,"redirectPolicy");var L3=w(require("node:os"),1),_3=w(require("node:process"),1);function nre(){return"User-Agent"}i(nre,"getHeaderName");async function ore(t){if(_3.default&&_3.default.versions){let e=`${L3.default.type()} ${L3.default.release()}; ${L3.default.arch()}`,r=_3.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}i(ore,"setPlatformSpecificData");var Q3="1.22.2";function hXe(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join("")}i(hXe,"getUserAgentString");function sre(){return nre()}i(sre,"getUserAgentHeaderName");async function P3(t){let e=new Map;e.set("core-rest-pipeline",Q3),await ore(e);let r=hXe(e);return t?`${t} ${r}`:r}i(P3,"getUserAgentValue");var ire=sre(),are="userAgentPolicy";function _6(t={}){let e=P3(t.userAgentPrefix);return{name:are,async sendRequest(r,n){return r.headers.has(ire)||r.headers.set(ire,await e),n(r)}}}i(_6,"userAgentPolicy");var Yr=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function Q6(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((s,a)=>{function c(){a(new Yr(o??"Theoperationwasaborted."))}i(c,"rejectOnAbort");function u(){n?.removeEventListener("abort",p)}i(u,"removeListeners");function p(){r?.(),u(),c()}if(i(p,"onAbort"),n?.aborted)return c();try{t(A=>{u(),s(A)},A=>{u(),a(A)})}catch(A){a(A)}n?.addEventListener("abort",p)})}i(Q6,"createAbortablePromise");var CXe="Thedelaywasaborted.";function Lf(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return Q6(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:i(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??CXe})}i(Lf,"delay");function ic(t){if(xu(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unabletostringifyinput]"}return`Unknown error ${e}`}}i(ic,"getErrorMessage");function cre(t){return xu(t)}i(cre,"isError");function Sl(){return Wu()}i(Sl,"randomUUID");var f0=Lu;var ure=Symbol("rawContent");function k6(t){return typeof t[ure]=="function"}i(k6,"hasRawContent");function pre(t){return k6(t)?t[ure]():t}i(pre,"getRawContent");var k3=vf;function U6(){let t=T3();return{name:k3,sendRequest:i(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)k6(n.body)&&(n.body=pre(n.body));return t.sendRequest(e,r)},"sendRequest")}}i(U6,"multipartPolicy");var G6=f3;function H6(){return M3()}i(H6,"decompressResponsePolicy");fun
`&&t[s]!=="\r";s++)u+=t[s];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),s--),!VVe(u)){let l;return u.trim().length===0?l="Invalidspaceafter'<'.":l="Tag'"+u+"'isaninvalidname.",C1("InvalidTag",l,Ut(t,s))}let p=kVe(t,s);if(p===!1)return C1("InvalidAttr","Attributesfor'"+u+"'haveopenquote.",Ut(t,s));let A=p.value;if(s=p.index,A[A.length-1]==="/"){let l=s-A.length;A=A.substring(0,A.length-1);let b=Yre(A,e);if(b===!0)n=!0;else return C1(b.err.code,b.err.msg,Ut(t,l+b.err.line))}else if(c)if(p.tagClosed){if(A.trim().length>0)return C1("InvalidTag","Closingtag'"+u+"'can't have attributes or invalid starting.",Ut(t,a));if(r.length===0)return C1("InvalidTag","Closing tag '"+u+"' has not been opened.",Ut(t,a));{let l=r.pop();if(u!==l.tagName){let b=Ut(t,l.tagStartPos);return C1("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+b.line+", col "+b.col+") instead of closing tag '"+u+"'.",Ut(t,a))}r.length==0&&(o=!0)}}else return C1("InvalidTag","Closing tag '"+u+"' doesn'thaveproperclosing.",Ut(t,s));else{let l=Yre(A,e);if(l!==!0)return C1(l.err.code,l.err.msg,Ut(t,s-A.length+l.err.line));if(o===!0)return C1("InvalidXml","Multiplepossiblerootnodesfound.",Ut(t,s));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),n=!0}for(s++;s<t.length;s++)if(t[s]==="<")if(t[s+1]==="!"){s++,s=Jre(t,s);continue}else if(t[s+1]==="?"){if(s=Vre(t,++s),s.err)return s}else break;else if(t[s]==="&"){let l=HVe(t,s);if(l==-1)return C1("InvalidChar","char'&'isnotexpected.",Ut(t,s));s=l}else if(o===!0&&!Xre(t[s]))return C1("InvalidXml","Extratextattheend",Ut(t,s));t[s]==="<"&&s--}}else{if(Xre(t[s]))continue;return C1("InvalidChar","char'"+t[s]+"'isnotexpected.",Ut(t,s))}if(n){if(r.length==1)return C1("InvalidTag","Unclosedtag'"+r[0].tagName+"'.",Ut(t,r[0].tagStartPos));if(r.length>0)return C1("InvalidXml","Invalid'"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"'found.",{line:1,col:1})}else return C1("InvalidXml","Starttagexpected.",1);return!0}i(tE,"validate");function Xre(t){return t===""||t===""||t===`
`||t==="\r"}i(Xre,"isWhiteSpace");function Vre(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==""){let n=t.substr(r,e-r);if(e>5&&n==="xml")return C1("InvalidXml","XMLdeclarationallowedonlyatthestartofthedocument.",Ut(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}i(Vre,"readPI");function Jre(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}i(Jre,"readCommentAndCDATA");var QVe='"',PVe="'";function kVe(t,e){let r="",n="",o=!1;for(;e<t.length;e++){if(t[e]===QVe||t[e]===PVe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){o=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:o}}i(kVe,"readAttributeStr");var UVe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Yre(t,e){let r=Z3(t,UVe),n={};for(let o=0;o<r.length;o++){if(r[o][1].length===0)return C1("InvalidAttr","Attribute '"+r[o][2]+"' has no space in starting.",$f(r[o]));if(r[o][3]!==void 0&&r[o][4]===void 0)return C1("InvalidAttr","Attribute '"+r[o][2]+"' is without value.",$f(r[o]));if(r[o][3]===void 0&&!e.allowBooleanAttributes)return C1("InvalidAttr","boolean attribute '"+r[o][2]+"' is not allowed.",$f(r[o]));let s=r[o][2];if(!XVe(s))return C1("InvalidAttr","Attribute '"+s+"' is an invalid name.",$f(r[o]));if(!Object.prototype.hasOwnProperty.call(n,s))n[s]=1;else return C1("InvalidAttr","Attribute '"+s+"' is repeated.",$f(r[o]))}return!0}i(Yre,"validateAttributeString");function GVe(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}i(GVe,"validateNumberAmpersand");function HVe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,GVe(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}i(HVe,"validateAmpersand");function C1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}i(C1,"getErrorObject");function XVe(t){return MS(t)}i(XVe,"validateAttrName");function VVe(t){return MS(t)}i(VVe,"validateTagName");function Ut(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}i(Ut,"getLineNumberForPosition");function $f(t){return t.startIndex+t[1].length}i($f,"getPositionFromMatch");var $re={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"},jre={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
`);lete=newAr("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;leto=this.options,s=newZf(o.processEntities),a=t.length;for(letc=0;c<a;c++)if(t[c]==="<"){letp=t.charCodeAt(c+1);if(p===47){letA=Ll(t,">",c,"Closing Tag is not closed."),l=t.substring(c+2,A).trim();if(o.removeNSPrefix){letM=l.indexOf(":");M!==-1&&(l=l.substr(M+1))}l=yS(o.transformTagName,l,"",o).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));letb=this.matcher.getCurrentTag();if(l&&o.unpairedTagsSet.has(l))thrownewError(`Unpaired tag can not be used as closing tag: </${l}>`);b&&o.unpairedTagsSet.has(b)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=A}elseif(p===63){letA=BS(t,c,!1,"?>");if(!A)thrownewError("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);letl=this.buildAttributesMap(A.tagExp,this.matcher,A.tagName,!0);if(l){letb=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(b)||1),s.setXmlVersion(Number(b)||1)}if(!(o.ignoreDeclaration&&A.tagName==="?xml"||o.ignorePiTags)){letb=newAr(A.tagName);b.add(o.textNodeName,""),A.tagName!==A.tagExp&&A.attrExpPresent&&o.ignoreAttributes!==!0&&(b[":@"]=l),this.addChild(r,b,this.readonlyMatcher,c)}c=A.closeIndex+1}elseif(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){letA=Ll(t,"-->",c+4,"Comment is not closed.");if(o.commentPropName){letl=t.substring(c+4,A-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(o.commentPropName,[{[o.textNodeName]:l}])}c=A}elseif(p===33&&t.charCodeAt(c+2)===68){letA=s.readDocType(t,c);this.entityDecoder.addInputEntities(A.entities),c=A.i}elseif(p===33&&t.charCodeAt(c+2)===91){letA=Ll(t,"]]>",c,"CDATA is not closed.")-2,l=t.substring(c+9,A);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);letb=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);b==null&&(b=""),o.cdataPropName?r.add(o.cdataPropName,[{[o.textNodeName]:l}]):r.add(o.textNodeName,b),c=A+2}else{letA=BS(t,c,o.removeNSPrefix);if(!A){letx=t.substring(Math.max(0,c-50),Math.min(a,c+50));thrownewError(`readTagExp returned undefined at position ${c}. Context: "${x}"`)}letl=A.tagName,b=A.rawTagName,M=A.tagExp,z=A.attrExpPresent,O=A.closeIndex;if({tagName:l,tagExp:M}=yS(o.transformTagName,l,M,o),o.strictReservedNames&&(l===o.commentPropName||l===o.cdataPropName||l===o.textNodeName||l===o.attributesGroupName))thrownewError(`Invalid tag name: ${l}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));lety=r;y&&o.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());letE=!1;M.length>0&&M.lastIndexOf("/")===M.length-1&&(E=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),M=l):M=M.substr(0,M.length-1),z=l!==M);letB=null,q={},D;D=MJe(b),l!==e.tagname&&this.matcher.push(l,{},D),l!==M&&z&&(B=this.buildAttributesMap(M,this.matcher,l),B&&(q=fJe(B,o))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());letF=c;if(this.isCurrentNodeStopNode){letx="";if(E)c=A.closeIndex;elseif(o.unpairedTagsSet.has(l))c=A.closeIndex;else{letce=this.readStopNodeData(t,b,O+1);if(!ce)thrownewError(`Unexpected end of ${b}`);c=ce.i,x=ce.tagContent}let_=newAr(l);B&&(_[":@"]=B),_.add(o.textNodeName,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,_,this.readonlyMatcher,F)}else{if(E){({tagName:l,tagExp:M}=yS(o.transformTagName,l,M,o));letx=newAr(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,F),this.matcher.pop(),this.isCurrentNodeStopNode=!1}elseif(o.unpairedTagsSet.has(l)){letx=newAr(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,F),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=A.closeIndex;continue}else{letx=newAr(l);if(this.tagsNodeStack.length>o.maxNestedTags)thrownewError("Maximum nested tags exceeded");this.tagsNodeStack.push(r),B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,F),r=x}n="",c=O}}}elsen+=t[c];returne.child},"parse
${c}:${decodeURIComponent(s[c])}`}returnn}};vari1=classextendsXu{static{i(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){returnnewoM(e,r,this)}computeHMACSHA256(e){return(0,Ine.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};varP1=us("storage-common");varNn;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Nn||(Nn={}));varlc={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Nn.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void0},YJe=newYr("The operation was aborted."),sM=classextendsbs{static{i(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=lc){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:lc.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):lc.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:lc.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:lc.maxRetryDelayInMs):lc.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:lc.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:lc.secondaryHost}}asyncsendRequest(e){returnthis.attemptSendRequest(e,!1,1)}asyncattemptSendRequest(e,r,n){leto=e.clone(),s=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;s||(o.url=dE(o.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(o.url=Ac(o.url,Xi.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));leta;try{if(P1.info(`RetryPolicy: =====> Try=${n}${s?"Primary":"Secondary"}`),a=awaitthis._nextPolicy.sendRequest(o),!this.shouldRetry(s,n,a))returna;r=r||!s&&a.status===404}catch(c){if(P1.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(s,n,a,c))throwc}returnawaitthis.delay(s,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,o){if(r>=this.retryOptions.maxTries)returnP1.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;lets=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(o){for(letaofs)if(o.name.toUpperCase().includes(a)||o.message.toUpperCase().includes(a)||o.code&&o.code.toString().toUpperCase()===a)returnP1.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||o){leta=n?n.status:o?o.statusCode:0;if(!e&&a===404)returnP1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)returnP1.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){leta=n.headers.get(Re.X_MS_CopySourceErrorCode);if(a!==void0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}returno?.code==="PARSE_ERROR"&&o?.message.startsWith('Error "Error: Unclosed root tag')?(P1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}asyncdelay(e,r,n){leto=0;if(e)switch(this.retryOptions.retryPolicyType){caseNn.EXPONENTIAL:o=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;caseNn.FIXED:o=this.retryOptions.retryDelayInMs;break}elseo=Math.random()*1e3;returnP1.info(`RetryPolicy: Delay for ${o}ms`),ME(o,n,YJe)}};variM=class{static{i(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){returnnewsM(e,r,this.retryOptions)}};var$Je="storageBrowserPolicy";functionRne(){return{name:$Je,asyncsendRequest(t,e){returnf0||((t.method==="GET"||t.method==="HEAD")&&(t.url=Ac(t.url,Xi.Parameters.FORCE_BROWSER_NO_CACHE,newDate().getTime().toString())),t.headers.delete(Re.COOKIE),t.headers.delete(Re.CONTENT_LENGTH)),e(t)}}}i(Rne,"storageBrowserPolicy");varjJe="StorageCorrectContentLengthPolicy";functionNne(){functiont(e){e.body&&(
`}),c}i(n,"getCanonicalizedHeadersString");function o(s){let a=bE(s.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=fE(s.url),p={};if(u){let A=[];for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let b=l.toLowerCase();p[b]=u[l],A.push(b)}A.sort();for(let l of A)c+=`
`),s=e.computeHMACSHA256(o);return{sasQueryParameters:newBo(t.version,s,n,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:o}}i(sje,"generateBlobSASQueryParameters20150405");functionije(t,e){if(t=tp(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=ws.parse(t.permissions.toString()).toString():o=Ss.parse(t.permissions.toString()).toString());lets=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}i(ije,"generateBlobSASQueryParameters20181109");functionaje(t,e){if(t=tp(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=ws.parse(t.permissions.toString()).toString():o=Ss.parse(t.permissions.toString()).toString());lets=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void0,void0,void0,t.encryptionScope),stringToSign:s}}i(aje,"generateBlobSASQueryParameters20201206");functioncje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=ws.parse(t.permissions.toString()).toString():o=Ss.parse(t.permissions.toString()).toString());lets=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}i(cje,"generateBlobSASQueryParametersUDK20181109");functionuje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=ws.parse(t.permissions.toString()).toString():o=Ss.parse(t.permissions.toString()).toString());lets=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}i(uje,"generateBlobSASQueryParametersUDK20200210");functionpje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=ws.parse(t.permissions.toString()).toString():o=Ss.parse(t.permissions.toString()).toString());lets=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}i(pje,"generateBlobSASQueryParametersUDK20201206");functionAje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=ws.parse(t.permissions.toString()).toString():o=Ss.parse(t.permissions.toString()).toString());lets=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,void0,t.delegatedUserObjectId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:s}}i(Aje,"generateBlobSASQueryParametersUDK20250705");functionep(t,e,r){letn=[`/blob/${t}/${e}`];returnr&&n.push(`/${r}`),n.join("")}i(ep,"getCanonicalName");functiontp(t){lete=t.version?t.version:gE;if(t.snapshotTime&&e<"2018-11-09")throwRangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void0&&t.snapshotTime)throwRangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void0&&t.versionId)throwRangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throwRangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throwRangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throwRangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throwRangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throwRangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throwRangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");returnt.version=e,t}i(tp,"SASSignatureValuesSanityCheckAndAutofill");varzM=class{static{i(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;getleaseId(){returnthis._leaseId}geturl(){returnthis._url}constructor(e,r){letn=e.storageClientContext;this._url=e.url,e.name===void0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=Sl()),this._leaseId=r}asyncacquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==go||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==go||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnAe.withSpan("BlobLeaseClient-acquireLease",r,asyncn=>be(awaitthis._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}asyncchangeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==go||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==go||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnAe.withSpan("BlobLeaseClient-changeLease",r,asyncn=>{leto=be(awaitthis._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));returnthis._leaseId=e,o})}asyncreleaseLease(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"}};Kl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var sp=class extends Error{static{i(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"}};sp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var RM=class extends Error{static{i(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var OKe=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},NT=class{static{i(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,o=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${o} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=i(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Hse(t,e,r){return OKe(this,void 0,void 0,function*(){var n;let o=new ta(t),s=o.getBlockBlobClient(),a=new NT((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),N(`BlobClient: ${o.name}:${o.accountName}:${o.containerName}`);let u=yield s.uploadFile(e,c);if(u._response.status>=400)throw new BC(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw r0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}i(Hse,"uploadCacheArchiveSDK");var Vse=w(require("buffer"),1),Fs=w(require("fs"),1),Jse=w(require("stream"),1),Yse=w(require("util"),1);var qC=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function DC(t){return t?t>=200&&t<300:!1}i(DC,"isSuccessStatusCode");function EKe(t){return t?t>=500:!0}i(EKe,"isServerErrorStatusCode");function CKe(t){return t?[s1.BadGateway,s1.ServiceUnavailable,s1.GatewayTimeout].includes(t):!1}i(CKe,"isRetryableStatusCode");function yKe(t){return qC(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}i(yKe,"sleep");function Xse(t,e,r){return qC(this,arguments,void 0,function*(n,o,s,a=jO,c=KO,u=void 0){let p="",A=1;for(;A<=a;){let l,b,M=!1;try{l=yield o()}catch(z){u&&(l=u(z)),M=!0,p=z.message}if(l&&(b=s(l),!EKe(b)))return l;if(b&&(M=CKe(b),p=`Cache service responded with ${b}`),N(`${n} - Attempt ${A} of ${a} failed with error: ${p}`),!M){N(`${n} - Error is not retryable`);break}yield yKe(c),A++}throw Error(`${n} failed: ${p}`)})}i(Xse,"retry");function NM(t,e){return qC(this,arguments,void 0,function*(r,n,o=jO,s=KO){return yield Xse(r,n,a=>a.statusCode,o,s,a=>{if(a instanceof ss)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}i(NM,"retryTypedResponse");function Zl(t,e){return qC(this,arguments,void 0,function*(r,n,o=jO,s=KO){return yield Xse(r,n,a=>a.message.statusCode,o,s)})}i(Zl,"retryHttpClientResponse");var xn=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a
Othercacheswithsimilarkey:`);for(let c of s?.artifactCaches||[])N(`CacheKey:${c?.cacheKey},CacheVersion:${c?.cacheVersion},CacheScope:${c?.scope},CacheCreated:${c?.creationTime}`)}}})}i(SKe,"printCachesListForDiagnostics");function WT(t,e,r){return fr(this,void 0,void 0,function*(){let n=new sie.URL(t),o=Zse(r);n.hostname.endsWith(".blob.core.windows.net")?o.useAzureSdk?yield jse(t,e,o):o.concurrentBlobDownloads?yield $se(t,e,o):yield RC(t,e):yield RC(t,e)})}i(WT,"downloadCache");function aie(t,e,r){return fr(this,void 0,void 0,function*(){let n=FT(),o=Cl(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:o,cacheSize:r?.cacheSize};return yield NM("reserveCache",()=>fr(this,void 0,void 0,function*(){return n.postJson(SM("caches"),s)}))})}i(aie,"reserveCache");function oie(t,e){return`bytes${t}-${e}/*`}i(oie,"getContentRange");function FKe(t,e,r,n,o){return fr(this,void 0,void 0,function*(){N(`Uploading chunk of size ${o-n+1} bytes at offset ${n} with content range: ${oie(n,o)}`);let s={"Content-Type":"application/octet-stream","Content-Range":oie(n,o)},a=yield Zl(`uploadChunk (start: ${n}, end: ${o})`,()=>fr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!DC(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}i(FKe,"uploadChunk");function WKe(t,e,r,n){return fr(this,void 0,void 0,function*(){let o=os(r),s=SM(`caches/${e.toString()}`),a=e2.openSync(r,"r"),c=wT(n),u=n6("uploadConcurrency",c.uploadConcurrency),p=n6("uploadChunkSize",c.uploadChunkSize),A=[...new Array(u).keys()];N("Awaiting all uploads");let l=0;try{yield Promise.all(A.map(()=>fr(this,void 0,void 0,function*(){for(;l<o;){let b=Math.min(o-l,p),M=l,z=l+b-1;l+=p,yield FKe(t,s,()=>e2.createReadStream(r,{fd:a,start:M,end:z,autoClose:!1}).on("error",O=>{throw new Error(`Cache upload failed because file read failed with ${O.message}`)}),M,z)}})))}finally{e2.closeSync(a)}})}i(WKe,"uploadFile");function xKe(t,e,r){return fr(this,void 0,void 0,function*(){let n={size:r};return yield NM("commitCache",()=>fr(this,void 0,void 0,function*(){return t.postJson(SM(`caches/${e.toString()}`),n)}))})}i(xKe,"commitCache");function xT(t,e,r,n){return fr(this,void 0,void 0,function*(){if(wT(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Hse(r,e,n)}else{let s=FT();N("Upload cache"),yield WKe(s,t,e,n),N("Commiting cache");let a=os(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield xKe(s,t,a);if(!DC(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}i(xT,"saveCache");var tae=w(Jie(),1),D1=w(q1(),1),tn=w(q1(),1),pp=w(q1(),1),Ap=w(q1(),1),lp=w(q1(),1);var Rv=w(q1(),1),Nv=w(q1(),1),Kie=w(q1(),1),Zie=w(q1(),1),eae=w(q1(),1);var qv=w(q1(),1),Dv=w(q1(),1),Yie=w(q1(),1),$ie=w(q1(),1),jie=w(q1(),1);var Iv=class extends jie.MessageType{static{i(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,$ie.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Yie.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let s=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:s.scope=e.string();break;case 2:s.permission=e.int64().toString();break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?Dv.UnknownFieldHandler.onRead:p)(this.typeName,s,c,u,A)}}return s}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,qv.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,qv.WireType.Varint).int64(e.permission);let o=n.writeUnknownFields;return o!==!1&&(o==!0?Dv.UnknownFieldHandler.onWrite:o)(this.typeName,e,r),r}},My=new Iv;var wv=class extends eae.Mess
`));let n=yield Xv(r,"create");yield Vv(n,t)})}i(Yv,"createTar");var m2=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},Io=class t extends Error{static{i(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},dp=class t extends Error{static{i(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},$v="cache write denied:",M2=class t extends dp{static{i(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},gy=class t extends Error{static{i(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function sae(t){if(!t||t.length===0)throw new Io("Path Validation Error: At least one directory or file path is required")}i(sae,"checkPaths");function jv(t){if(t.length>512)throw new Io(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Io(`Key Validation Error: ${t} cannot contain commas.`)}i(jv,"checkKey");function Kv(){return wM()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}i(Kv,"isFeatureAvailable");function iae(t,e,r,n){return m2(this,arguments,void 0,function*(o,s,a,c,u=!1){let p=wM();return N(`Cache service version: ${p}`),sae(o),p==="v2"?yield $e0(o,s,a,c,u):yield Ye0(o,s,a,c,u)})}i(iae,"restoreCache");function Ye0(t,e,r,n){return m2(this,arguments,void 0,function*(o,s,a,c,u=!1){a=a||[];let p=[s,...a];if(N("Resolved Keys:"),N(JSON.stringify(p)),p.length>10)throw new Io("Key Validation Error: Keys are limited to a maximum of 10.");for(let b of p)jv(b);let A=yield Nf(),l="";try{let b=yield iie(p,o,{compressionMethod:A,enableCrossOsArchive:u});if(!b?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),b.cacheKey;l=JM.join(yield If(),nc(A)),N(`Archive Path: ${l}`),yield WT(b.archiveLocation,l,c),vi()&&(yield VM(l,A));let M=os(l);return S(`Cache Size: ~${Math.round(M/(1024*1024))} MB (${M} B)`),yield Jv(l,A),S("Cache restored successfully"),b.cacheKey}catch(b){let M=b;if(M.name===Io.name)throw b;M instanceof ss&&typeof M.statusCode=="number"&&M.statusCode>=500?Al(`Failed to restore: ${b.message}`):r0(`Failed to restore: ${b.message}`)}finally{try{yield Rf(l)}catch(b){N(`Failed to delete archive: ${b}`)}}})}i(Ye0,"restoreCacheV1");function $e0(t,e,r,n){return m2(this,arguments,void 0,function*(o,s,a,c,u=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let p=[s,...a];if(N("Resolved Keys:"),N(JSON.stringify(p)),p.length>10)throw new Io("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of p)jv(l);let A="";try{let l=Hv(),b=yield Nf(),M={key:s,restoreKeys:a,version:Cl(o,b,u)},z=yield l.GetCacheEntryDownloadURL(M);if(!z.ok){N(`Cache not found for version ${M.version} of keys: ${p.join(", ")}`);return}if(M.key!==z.matchedKey?S(`Cache hit for restore-key: ${z.matchedKey}`):S(`Cache hit for: ${z.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),z.matchedKey;A=JM.join(yield If(),nc(b)),N(`Archive path: ${A}`),N(`Starting download of archive to: ${A}`),yield WT(z.signedDownloadUrl,A,c);let y=os(A);return S(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),vi()&&(yield VM(A,b)),yield Jv(A,b),S("Cache restored successfully"),z.matchedKey}catch(l){let b=l;if(b.name===Io.name)throw l;b instanceof ss&&typeof b.statusCode=="number"&&b.statusCode>=500?Al(`Failed to restore: ${l.message}`):r0(`Failed to restore: ${l.message}`)}finally{try{A&&(yield Rf(A))}catch(l){N(`Failed to delete archive: ${l}`)}}})}i($e0,"restoreCacheV2");function Zv(t,e,r){return m2(this,arguments,void 0,function*(n,o,s,a=!1)
`)}i(X00,"_buildMessageForResponseErrors");var V00=class extends Error{static{i(this,"GraphqlResponseError")}constructor(t,e,r){super(X00(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},J00=["method","baseUrl","url","headers","request","query","mediaType","operationName"],Y00=["query","method","url"],Vae=/\/api\/v3\/?$/;function $00(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(Y00.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,o=Object.keys(n).reduce((a,c)=>J00.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Vae.test(s)&&(o.url=s.replace(Vae,"/api/graphql")),t(o).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new V00(o,c,a.data)}return a.data.data})}i($00,"graphql");function lL(t,e){let r=t.defaults(e);return Object.assign(i((o,s)=>$00(r,o,s),"newApi"),{defaults:lL.bind(null,r),endpoint:r.endpoint})}i(lL,"withDefaults");var be1=lL(KM,{headers:{"user-agent":`octokit-graphql.js/${H00} ${Oc()}`},method:"POST",url:"/graphql"});function Jae(t){return lL(t,{method:"POST",url:"/graphql"})}i(Jae,"withCustomRequest");var dL="(?:[a-zA-Z0-9_-]+)",Yae="\\.",$ae=new RegExp(`^${dL}${Yae}${dL}${Yae}${dL}$`),j00=$ae.test.bind($ae);async function K00(t){let e=j00(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}i(K00,"auth");function Z00(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}i(Z00,"withAuthorizationPrefix");async function e10(t,e,r,n){let o=e.endpoint.merge(r,n);return o.headers.authorization=Z00(t),e(o)}i(e10,"hook");var jae=i(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(K00.bind(null,e),{hook:e10.bind(null,e)})},"createTokenAuth2");var bL="7.0.6";var Kae=i(()=>{},"noop"),t10=console.warn.bind(console),r10=console.error.bind(console);function n10(t={}){return typeof t.debug!="function"&&(t.debug=Kae),typeof t.info!="function"&&(t.info=Kae),typeof t.warn!="function"&&(t.warn=t10),typeof t.error!="function"&&(t.error=r10),t}i(n10,"createLogger");var Zae=`octokit-core.js/${bL} ${Oc()}`,Fy=class{static{i(this,"Octokit")}static VERSION=bL;static defaults(e){return class extends this{static{i(this,"OctokitWithDefaults")}constructor(...n){let o=n[0]||{};if(typeof e=="function"){super(e(o));return}super(Object.assign({},e,o,o.userAgent&&e.userAgent?{userAgent:`${o.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{i(this,"NewOctokit")}static plugins=r.concat(e.filter(o=>!r.includes(o)))}}constructor(e={}){let r=new qae.Collection,n={baseUrl:KM.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${Zae}`:Zae,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=KM.defaults(n),this.graphql=Jae(this.request).defaults(n),this.log=n10(e.log),this.hook=r,e.authStrategy){let{authStrategy:s,...a}=e,c=s(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 s=jae(e.auth);r.wrap("request",s.hook),this.auth=s}let o=this.constructor;for(let s=0;s<o.plugins.length;++s)
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);return b<M},"__needMoreData"),parse:i(function(n,o,s,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:M,raw:z,relax_quotes:O,rtrim:y,skip_empty_lines:E,to:B,to_line:q}=this.options,{comment:D,escape:F,quote:x,record_delimiter:_}=this.options,{bomSkipped:ce,delimiterDiscovered:ye,delimiterBufPrevious:Ne,rawBuffer:De,escapeIsQuote:ze}=this.state;if(!ye&&p){let j;if(Ne===void 0?j=n:Ne!==void 0&&n===void 0?j=Ne:j=Buffer.concat([Ne,n]),n=void 0,o||j.length>p.size)this.options.delimiter=[Buffer.from(ple(j,this.options.delimiter_auto))],this.state.previousBuf=j,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=j;return}}let{previousBuf:Fe}=this.state,k;if(Fe===void 0)if(n===void 0){a();return}else k=n;else Fe!==void 0&&n===void 0?k=Fe:k=Buffer.concat([Fe,n]);if(ce===!1)if(c===!1)this.state.bomSkipped=!0;else if(k.length<3){if(o===!1){this.state.previousBuf=k;return}}else{for(let j in T2)if(T2[j].compare(k,0,T2[j].length)===0){let $e=T2[j].length;this.state.bufBytesStart+=$e,k=k.slice($e);let m1=x2({...this.original_options,encoding:j});for(let he in m1)this.options[he]=m1[he];({comment:D,escape:F,quote:x}=this.options);break}this.state.bomSkipped=!0}let Te=k.length,T;for(T=0;T<Te&&!this.__needMoreData(T,Te,o);T++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),q!==-1&&this.info.lines>q){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(k,T)&&(_=this.options.record_delimiter);let j=k[T];if(z===!0&&De.append(j),(j===Qi0||j===Pi0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(F!==null&&this.state.quoting===!0&&this.__isEscape(k,T,j)&&T+F.length<Te)if(ze){if(this.__isQuote(k,T+F.length)){this.state.escaping=!0,T+=F.length-1;continue}}else{this.state.escaping=!0,T+=F.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(k,T))if(this.state.quoting===!0){let he=k[T+x.length],q0=y&&this.__isCharTrimable(k,T+x.length),je=D!==null&&this.__compareBytes(D,k,T+x.length,he),X=this.__isDelimiter(k,T+x.length,he),Rt=_.length===0?this.__autoDiscoverRecordDelimiter(k,T+x.length):this.__isRecordDelimiter(he,k,T+x.length);if(F!==null&&this.__isEscape(k,T,j)&&this.__isQuote(k,T+F.length))T+=F.length-1;else if(!he||X||Rt||je||q0){this.state.quoting=!1,this.state.wasQuoting=!0,T+=x.length-1;continue}else if(O===!1){let Nt=this.__error(new Je("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(he)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Nt!==void 0)return Nt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(x),T+=x.length-1}else if(this.state.field.length!==0){if(O===!1){let he=this.__infoField(),q0=Object.keys(T2).map(X=>T2[X].equals(this.state.field.toString())?X:!1).filter(Boolean)[0],je=this.__error(new Je("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(he.column)} at line ${he.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,q0?`(${q0} bom)`:void 0],this.options,he,{field:this.state.field}));if(je!==void 0)return je}}else{this.state.quoting=!0,T+=x.length-1;continue}if(this.state.quoting===!1){let he=this.__isRecordDelimiter(j,k,T);if(he!==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)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),T+=he-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,T+=he-1;continue}this.info.bytes=this.state.bufBytesStart+T;let X=this.__onField();if(X!==void 0)return
More info: ${u.url}`);let M=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,z=!1;for(let O of a)if(O.remote||O.path.endsWith(p)&&O.content===A){c.push({title:l,message:b,file:O.path,startLine:M}),z=!0;break}z||N(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${p}: ${l}`)}return c}};var yp=w(require("fs"),1),Y_=w(require("path"),1);var v4=class t{static{i(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new S0,this.iidFilename=`build-iidfile-${l0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${l0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},o=Object.entries(n).filter(([M])=>!r.has(M)),s=l0.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||Vt.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&l0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${A0.serverURL}/${Vt.repo.owner}/${Vt.repo.repo}.git`,u=e?.checksum||n.checksum,p=e?.subdir||n.subdir,A=e?.format;if(!A){if(A="fragment",o.length>0)A="query";else if(l0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(A="query")}catch{}}let l=Vt.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(l=typeof Vt.payload.pull_request?.head?.sha=="string"?Vt.payload.pull_request.head.sha:a);let b=u||l;if(A==="query"){let M=[`ref=${s||u?a:b}`],z=s?b:u;z&&M.push(`checksum=${z}`),p&&p!=="."&&M.push(`subdir=${p}`);for(let[O,y]of o)M.push(`${O}=${y}`);return`${c}?${M.join("&")}`}return`${c}#${b}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return Y_.default.join(u0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(yp.default.existsSync(e))return yp.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return Y_.default.join(u0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!yp.default.existsSync(e))return;let r=yp.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,o]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!yp.default.existsSync(o))throw new Error(`secret file ${o} not found`);return[n,o]}let s=u0.tmpName({tmpdir:u0.tmpDir()});return yp.default.writeFileSync(s,o),[n,s]}static getProvenanceInput(e){let r=kr(e);if(!r)return r;try{return Vj(e)?`builder-id=${A0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${A0.workflowRunURL(!0)}`;let r=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(s=>s.trim())[0]=="builder-id")return e;return`${e},builder-id=${A0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",o="",s="",a=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?n=u[1]:u[0]==="repository"?o=u[1]:u[0]==="ghtoken"&&(s=u[1])}return n==="gha"&&(o||(e=`${e},repository=${A0.repository}`),!s&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExpo
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n){if(o.length==1&&!o[0].startsWith("type="))return e=="local";for(let[s,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(s=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=an(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n)for(let[s,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(s=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=an(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let o of r)for(let s of o)try{let a=l0.parseBool(s);n.push(`disabled=${!a}`)}catch{n.push(s)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),o=e.substring(0,n),s=e.substring(n+1);if(o.length==0||s.length==0)throw new Error(`${e} is not a valid secret`);return r&&Ko(s),[o,s]}};var $_=w(require("fs"),1),Mle=w(require("path"),1);var L4=class t{static{i(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new S0,this.metadataFilename=`bake-metadata-${l0.generateRandomString()}.json`}getMetadataFilePath(){return Mle.default.join(u0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!$_.default.existsSync(e))return;let r=$_.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 n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["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 n=["bake"],o,s=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!l0.isValidRef(u)){s.push(u);continue}if(o)throw new Error("Only one remote bake definition can be defined");o=u}}o&&n.push(o);for(let u of s)n.push("--file",u);if(e.overrides)for(let u of e.overrides)n.push("--set",u);if(e.vars)for(let u of e.vars)n.push("--var",u);if(e.allow)for(let u of e.allow)n.push("--allow",u);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await Ce.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannot parse bake definitions: ${u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(u.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let o=r.target[n];o.attest&&Array.isArray(o.attest)&&(o.attest=o.attest.map(s=>t.parseAttestEntry(s))),o["cache-from"]&&Array.isArray(o["cache-from"])&&(o["cache-from"]=o["cache-from"].map(s=>t.parseCacheEntry(s))),o["cache-to"]&&Array.isArray(o["cache-to"])&&(o["cache-to"]=o["cache-to"].map(s=>t.parseCacheEntry(s))),o.output&&Array.isArray(o.output)&&(o.output=o.output.map(s=>t.parseExportEntry(s))),o.secret&&Array.isArray(o.secret)&&(o.secret=o.secret.map(s=>t.parseSecretEntry(s))),o.ssh&&Array.isArray(o.ssh)&&(o.ssh=o.ssh.map(s=>t.parseSSHEntry(s)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let[s,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(s){case"type":r.type=a;break;case"disabled":r.disabled=l0.parseBool(a);break;default:r[s]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let o of n){let[s,a]=o.toString().
`)[0])}static async isHeadDetached(){return await t.exec(["branch","--show-current"]).then(e=>e.length==0)}static async getDetachedRef(){let e=await t.exec(["show","-s","--pretty=%D"]);N(`detached HEAD ref: ${e}`);let r=e.replace(/^grafted, /,"").trim();if(r==="HEAD")return await t.inferRefFromHead();let n=r.match(/^HEAD, (.*)$/);if(!n||!n[1])throw new Error(`Cannot find detached HEAD ref in "${e}"`);let o=n[1].trim();if(o.startsWith("tag: "))return await t.findDetachedTagRef(o,e);if(o.match(/^pull\/\d+\/(head|merge)$/))return`refs/${o}`;let a=o.match(/^[^/]+\/[^/]+, (.+)$/);if(a)return`refs/heads/${a[1].trim()}`;let c=o.match(/^[^/]+\/(.+)$/);if(c)return`refs/heads/${c[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await Ce.getExecOutput("git",e,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr);return r.stdout.trim()})}static async inferRefFromHead(){let e=await t.findContainingRef("refs/heads/");if(e)return e;let r=await t.findContainingRef("refs/remotes/");if(r){let s=r.match(/^refs\/remotes\/[^/]+\/(.+)$/);return s?`refs/heads/${s[1]}`:r}let n=await t.exec(["tag","--contains","HEAD"]),[o]=n.split(`
`).map(s=>s.trim()).filter(s=>s.length>0);if(o)return`refs/tags/${o}`;throw new Error("Cannot infer ref from detached HEAD")}static async findDetachedTagRef(e,r){let o=(await t.exec(["for-each-ref","--format=%(refname)","--points-at","HEAD","refs/tags/"])).split(`
`).map(s=>s.trim()).filter(s=>s.length>0).sort((s,a)=>a.length-s.length);for(let s of o){let a=`tag: ${s.slice(10)}`;if(e===a||e.startsWith(`${a}, `))return s}if(o.length===1)return o[0];throw new Error(`Cannot find detached tag ref in "${r}"`)}static async findContainingRef(e){let r=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e]),[n]=r.split(`
${p}`),await new Promise(A=>setTimeout(A,Math.pow(2,a)*100));else throw s}else throw new Error(`Cosign verify command failed with: ${c.stderr.trim().split(/\r?\n/).filter(p=>p.length>0).pop()??"unknown error"}`)}throw s}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog),o=t.getProvenanceBlobs(e);for(let s of Object.keys(o))await ct(`Signing ${s}`,async()=>{let a=o[s],c=ri.default.join(ri.default.dirname(s),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(a);if(u.length===0){r0(`No subjects found in provenance ${s}, skip signing.`);return}let p=ri.default.join(ri.default.dirname(s),u[0].name),A=["attest-blob","--yes","--oidc-provider","github-actions","--new-bundle-format","--statement",s,"--type",wbe,"--bundle",c,...n];S(`[command]${this.cosign.binPath} ${[...A,p].join(" ")}`);let l=await Ce.getExecOutput(this.cosign.binPath,["--verbose",...A,p],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),b=ei.parseCommandOutput(l.stderr.trim());if(l.exitCode!=0)if(b.errors&&b.errors.length>0){let z=b.errors.map(O=>`- [${O.code}] ${O.message} : ${O.detail}`).join(`
${z}`)}else throw new Error(`Cosign attest-blob command failed with: ${l.stderr.trim().split(/\r?\n/).filter(z=>z.length>0).pop()??"unknown error"}`);let M=t.parseBundle((0,dd.bundleFromJSON)(JSON.parse(ti.default.readFileSync(c,{encoding:"utf-8"}))));S("Provenance blob signed for:");for(let z of u){let[O,y]=Object.entries(z.digest)[0]||[];S(` - ${z.name} (${O}:${y})`)}M.tlogID&&S(`Attestation signature uploaded to Rekor transparency log: ${kp}?logIndex=${M.tlogID}`),S(`Sigstore bundle written to: ${c}`),r[s]={...M,bundlePath:c,subjects:u}})}catch(n){throw new Error(`Signing BuildKit provenance blobs failed: ${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[o,s]of Object.entries(e)){let a=ri.default.dirname(o);await ct(`Verifying signature bundle ${s.bundlePath}`,async()=>{for(let c of s.subjects){let u=ri.default.join(a,c.name);S(`Verifying signed artifact ${u}`);let p=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??wbe];(r.noTransparencyLog||!s.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let A=await Ce.getExecOutput(this.cosign.binPath,[...p,"--bundle",s.bundlePath,u],{ignoreReturnCode:!0});if(A.stderr.length>0&&A.exitCode!=0)throw new Error(A.stderr);n[u]={bundlePath:s.bundlePath,cosignArgs:p}}})}return n}async verifyArtifact(e,r,n){S("Verifying keyless verification bundle signature");let o=JSON.parse(ti.default.readFileSync(r,"utf-8")),s=(0,dd.bundleFromJSON)(o);S("Fetching Sigstore TUF trusted root metadata");let a=await Fbe.getTrustedRoot(),c=(0,bd.toTrustMaterial)(a);try{S("Verifying artifact signature");let u=(0,bd.toSignedEntity)(s,ti.default.readFileSync(e)),p=t.parseCertificate(s),A=s.verificationMaterial.tlogEntries,l=A.length>0?A[0].logIndex:void 0;if(n?.subjectAlternativeName&&n?.subjectAlternativeName instanceof RegExp){let z=p.subjectAltName?.replace(/^uri:/i,"");if(z){if(!z.match(n.subjectAlternativeName))throw new Error(`Signing certificate subjectAlternativeName "${z}" does not match expected pattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let M=new bd.Verifier(c).verify(u,{subjectAlternativeName:n?.subjectAlternativeName&&typeof n.subjectAlternativeName=="string"?n.subjectAlternativeName:void 0,extensions:n?.issuer?{issuer:n.issuer}:void 0});return N(`Sigstore.verifyArtifact signer: ${JSON.stringify(M)}`),{payload:o,certificate:p.toString(),tlogID:l}}catch(u){throw new Error(`Failed to verify artifact signature: ${u}`)}}static noTransparencyLog(e){return e??A0.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e);return S(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")?await ct("Creating Sigstore protobuf signing config",async()=>{let o=u0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:u0.tmpDir()}),s=["signing-config","create","--with-default-services=true",`--out=${o}`];n&&s.push("--no-default-rekor=true"),await Ce.exec(this.cosign.binPath,s,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),S(JSON.stringify(JSON.parse(ti.default.readFileSync(o,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${o}`)}):(r.push("--use-signing-config"),n&&r.push("--tlog-upload=false")),r}static getProvenanceBlobs(e){let r=ri.default.join(e.localExportDir,"provenance.json");if(ti.default.existsSync(r))return{[r]:ti.default.readFileSync(r)};let n=ti.default.readdirSync(e.localExportDir,{withFileTypes:!0}),o=n.filter(s=>s.isDirectory());if(o.length>0&&o.length===n.length&&o.every(s=>ti.default.existsSync(ri.default.join(e.localExportDir,s.name,"provenance.json")))){let s={};for(let a of o){let c=ri.default.join(e.localExportDir,a.name,"provenance.json");s[c]=ti.default.readFileSync(c)}return s}throw new Error(`No valid provenance.json found in ${e.
`,bakeTarget:kr("bake-target")||"docker-metadata-action",githubToken:kr("github-token")}}i(Lbe,"getInputs");async function _be(t,e){switch(t){case"workflow":return await J20(e);case"git":return await Y20();default:throw new Error(`Invalidcontextsource:${t}`)}}i(_be,"getContext");async function J20(t){let e=A0.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await $20(e.sha,t),...e}}i(J20,"getContextFromWorkflow");async function Y20(){let t=await pa.context();return{commitDate:await pa.commitDate(t.sha),...t}}i(Y20,"getContextFromGit");async function $20(t,e){let r=A0.context.payload;if(r.commits){let n=r.commits.find(o=>o.id===t)?.timestamp;if(n)return new Date(n)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let n=await e.github.octokit.rest.repos.getCommit({owner:A0.context.repo.owner,repo:A0.context.repo.repo,ref:t});if(n.data.commit.committer?.date)return new Date(n.data.commit.committer.date);throw new Error("Committer date not found")}catch(n){return N(`FailedtogetcommitdatefromGitHubAPI:${n.message}`),new Date}}i($20,"getCommitDateFromWorkflow");var Da=w(G_(),1),x4e=w(require("fs"),1),T4e=w(require("path"),1),Xh=w(Hbe(),1),pn=w(q4e(),1),_d=w(kn(),1);var Ye=class t extends Error{static{i(this,"CsvError")}constructor(e,r,n,...o){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let s of o)for(let a in s){let c=s[a];this[a]=Buffer.isBuffer(c)?c.toString(n.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var Hh=i(function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},"is_object");var CD=i(function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let o=t[r];if(o==null||o===!1)e[r]={disabled:!0};else if(typeof o=="string"||typeof o=="number")e[r]={name:`${o}`};else if(Hh(o)){if(typeof o.name!="string")throw new Ye("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property"name"isrequiredatposition${r}`,"when column is an object literal"]);e[r]=o}else throw new Ye("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got${JSON.stringify(o)}atposition${r}`])}return e},"normalize_columns_array");var $7=class{static{i(this,"ResizeableBuffer")}constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},j7=$7;var D4e=i(function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,o)=>{let s=Buffer.from(String.fromCharCode(o),t.encoding);return o!==63&&s.length===1&&s[0]===63||n.push(s),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.i
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);returnb<M},"__needMoreData"),parse:i(function(n,o,s,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:M,raw:z,relax_quotes:O,rtrim:y,skip_empty_lines:E,to:B,to_line:q}=this.options,{comment:D,escape:F,quote:x,record_delimiter:_}=this.options,{bomSkipped:ce,delimiterDiscovered:ye,delimiterBufPrevious:Ne,rawBuffer:De,escapeIsQuote:ze}=this.state;if(!ye&&p){letj;if(Ne===void0?j=n:Ne!==void0&&n===void0?j=Ne:j=Buffer.concat([Ne,n]),n=void0,o||j.length>p.size)this.options.delimiter=[Buffer.from(R4e(j,this.options.delimiter_auto))],this.state.previousBuf=j,this.state.delimiterBufPrevious=void0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=j;return}}let{previousBuf:Fe}=this.state,k;if(Fe===void0)if(n===void0){a();return}elsek=n;elseFe!==void0&&n===void0?k=Fe:k=Buffer.concat([Fe,n]);if(ce===!1)if(c===!1)this.state.bomSkipped=!0;elseif(k.length<3){if(o===!1){this.state.previousBuf=k;return}}else{for(letjinLd)if(Ld[j].compare(k,0,Ld[j].length)===0){let$e=Ld[j].length;this.state.bufBytesStart+=$e,k=k.slice($e);letm1=vd({...this.original_options,encoding:j});for(letheinm1)this.options[he]=m1[he];({comment:D,escape:F,quote:x}=this.options);break}this.state.bomSkipped=!0}letTe=k.length,T;for(T=0;T<Te&&!this.__needMoreData(T,Te,o);T++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),q!==-1&&this.info.lines>q){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(k,T)&&(_=this.options.record_delimiter);letj=k[T];if(z===!0&&De.append(j),(j===Q40||j===P40)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(F!==null&&this.state.quoting===!0&&this.__isEscape(k,T,j)&&T+F.length<Te)if(ze){if(this.__isQuote(k,T+F.length)){this.state.escaping=!0,T+=F.length-1;continue}}else{this.state.escaping=!0,T+=F.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(k,T))if(this.state.quoting===!0){lethe=k[T+x.length],q0=y&&this.__isCharTrimable(k,T+x.length),je=D!==null&&this.__compareBytes(D,k,T+x.length,he),X=this.__isDelimiter(k,T+x.length,he),Rt=_.length===0?this.__autoDiscoverRecordDelimiter(k,T+x.length):this.__isRecordDelimiter(he,k,T+x.length);if(F!==null&&this.__isEscape(k,T,j)&&this.__isQuote(k,T+F.length))T+=F.length-1;elseif(!he||X||Rt||je||q0){this.state.quoting=!1,this.state.wasQuoting=!0,T+=x.length-1;continue}elseif(O===!1){letNt=this.__error(newYe("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(he)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Nt!==void0)returnNt}elsethis.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(x),T+=x.length-1}elseif(this.state.field.length!==0){if(O===!1){lethe=this.__infoField(),q0=Object.keys(Ld).map(X=>Ld[X].equals(this.state.field.toString())?X:!1).filter(Boolean)[0],je=this.__error(newYe("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(he.column)} at line ${he.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,q0?`(${q0} bom)`:void0],this.options,he,{field:this.state.field}));if(je!==void0)returnje}}else{this.state.quoting=!0,T+=x.length-1;continue}if(this.state.quoting===!1){lethe=this.__isRecordDelimiter(j,k,T);if(he!==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)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),T+=he-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,T+=he-1;continue}this.info.bytes=this.state.bufBytesStart+T;letX=this.__onField();if(X!==void0)return
`,s),Buffer.from(`
`,s),Buffer.from("\r",s)];e:for(let c=0;c<a.length;c++){let u=a[c].length;for(let p=0;p<u;p++)if(a[c][p]!==n[o+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:i(function(n){let{encoding:o,raw:s,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,s?this.state.rawBuffer.toString(o):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:i(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:i(function(){let{columns:n,raw:o,encoding:s}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:o?this.state.rawBuffer.toString(s):void 0}},"__infoRecord"),__infoField:i(function(){let{columns:n}=this.options,o=Array.isArray(n),s=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:s,column:o===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var nA=i(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=yD(e),o=i(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),s=i(()=>{},"close"),a=n.parse(t,!0,o,s);if(a!==void 0)throw a;return r},"parse");function S4e(t){let e=[];if(t.length==1){let r=!1,n=nA(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let s=o.toString().split("=").map(a=>a.trim());if(s.length==1)e.push({name:s[0],enable:!0});else{r=!0;break}}if(!r)return w4e(e)}e=[];for(let r of t){let n={name:"",enable:!0},o=nA(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of o){let a=s.toString().split("=").map(c=>c.trim());if(a.length==1)n.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{n.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalidenableattributevalue:${r}`);n.enable=/true/i.test(u);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(n.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(n)}return w4e(e)}i(S4e,"Transform");function w4e(t){Iu("Processing images input");for(let e of t)S(`name=${e.name},enable=${e.enable}`);return Ru(),t}i(w4e,"output");var Z7=(u=>(u.Schedule="schedule",u.Semver="semver",u.Pep440="pep440",u.Match="match",u.Edge="edge",u.Ref="ref",u.Raw="raw",u.Sha="sha",u))(Z7||{}),BD=(n=>(n.Branch="branch",n.Tag="tag",n.PR="pr",n))(BD||{}),qD=(r=>(r.Short="short",r.Long="long",r))(qD||{}),K7=class{static{i(this,"Tag")}type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},U40={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function F4e(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let n of t)e.push(G40(n));let r=e.sort((n,o)=>Number(n.attrs.priority)<Number(o.attrs.priority)?1:Number(n.attrs.priority)>Number(o.attrs.priority)?-1:0);Iu("Processing tags input");for(let n of r)S(n.toString());return Ru(),r}i(F4e,"Transform");function G40(t){let e=nA(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new K7;for(let n of e){let o=n.toString().split(/(?<=^[^=]+?)=/).map(s=>s.trim());if(o.length==1)r.attrs.value=o[0];else{let s=o[0].toLowerCase(),a=o[1];switch(s){case"type":{if(!Object.values(Z7).includes(a))throw new Error(`Unknowntagtypeattribute:${a}`);r.type=a;break}default:{r.attrs[s]=a;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missingpatternattributefor${t}`);Object.prototype.hasOwnProperty.