varpXe=Object.create;varnx=Object.defineProperty;varlXe=Object.getOwnPropertyDescriptor;varAXe=Object.getOwnPropertyNames;vardXe=Object.getPrototypeOf,fXe=Object.prototype.hasOwnProperty;varbXe=(t,e)=>()=>(t&&(e=t(t=0)),e);varf=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),E1e=(t,e)=>{for(varrine)nx(t,r,{get:e[r],enumerable:!0})},hXe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letnofAXe(e))!fXe.call(t,n)&&n!==r&&nx(t,n,{get:()=>e[n],enumerable:!(s=lXe(e,n))||s.enumerable});returnt};varv=(t,e,r)=>(r=t!=null?pXe(dXe(t)):{},hXe(e||!t||!t.__esModule?nx(r,"default",{value:t,enumerable:!0}):r,t));varR1e=f(Xf=>{"use strict";vard1t=require("net"),EXe=require("tls"),ux=require("http"),D1e=require("https"),yXe=require("events"),f1t=require("assert"),CXe=require("util");Xf.httpOverHttp=BXe;Xf.httpsOverHttp=DXe;Xf.httpOverHttps=qXe;Xf.httpsOverHttps=IXe;functionBXe(t){vare=newiu(t);returne.request=ux.request,e}functionDXe(t){vare=newiu(t);returne.request=ux.request,e.createSocket=q1e,e.defaultPort=443,e}functionqXe(t){vare=newiu(t);returne.request=D1e.request,e}functionIXe(t){vare=newiu(t);returne.request=D1e.request,e.createSocket=q1e,e.defaultPort=443,e}functioniu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||ux.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,n,i,o){for(vara=I1e(n,i,o),c=0,u=e.requests.length;c<u;++c){varp=e.requests[c];if(p.host===a.host&&p.port===a.port){e.requests.splice(c,1),p.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)})}CXe.inherits(iu,yXe.EventEmitter);iu.prototype.addRequest=function(e,r,s,n){vari=this,o=px({request:e},i.options,I1e(r,s,n));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",u),a.on("agentRemove",u),e.onSocket(a);functionc(){i.emit("free",a,o)}functionu(p){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",u),a.removeListener("agentRemove",u)}})};iu.prototype.createSocket=function(e,r){vars=this,n={};s.sockets.push(n);vari=px({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),Zp("making CONNECT request");varo=s.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",u),o.once("error",p),o.end();functiona(l){l.upgrade=!0}functionc(l,d,b){process.nextTick(function(){u(l,d,b)})}functionu(l,d,b){if(o.removeAllListeners(),d.removeAllListeners(),l.statusCode!==200){Zp("tunneling socket could not be established, statusCode=%d",l.statusCode),d.destroy();varM=newError("tunneling socket could not be established, statusCode="+l.statusCode);M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}if(b.length>0){Zp("got illegal response body from proxy"),d.destroy();varM=newError("got illegal response body from proxy");M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}returnZp("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=d,r(d)}functionp(l){o.removeAllListeners(),Zp(`tunneling socket could not be established, cause=%s
`);d.push(g),i+=g.byteLength,M&&(i=null),n=t,s=async function*(){for(let y of d)y.stream?yield*y.stream():yield y},o=`multipart/form-data;boundary=${c}`}else if(xse(t))n=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Fg.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:X$e(t)}if((typeof n=="string"||Fg.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let c;r=new ReadableStream({async start(){c=s(t)[Symbol.asyncIterator]()},async pull(u){let{value:p,done:l}=await c.next();if(l)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!Qse(r)){let d=new Uint8Array(p);d.byteLength&&u.enqueue(d)}return u.desiredSize>0},async cancel(u){await c.return()},type:"bytes"})}return[{stream:r,source:n,length:i},o]}function iYe(t,e=!1){return t instanceof ReadableStream&&(dW(!Fg.isDisturbed(t),"The body has already been consumed."),dW(!t.locked,"The stream is locked.")),Use(t,e)}function oYe(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function aYe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function cYe(t){return{blob(){return ib(this,r=>{let s=Lse(this);return s===null?s="":s&&(s=rYe(s)),new Z$e([r],{type:s})},t)},arrayBuffer(){return ib(this,r=>new Uint8Array(r).buffer,t)},text(){return ib(this,_se,t)},json(){return ib(this,pYe,t)},formData(){return ib(this,r=>{let s=Lse(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=sYe(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Wse;return i[ob]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new Wse;for(let[o,a]of n)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return ib(this,r=>new Uint8Array(r),t)}}}function uYe(t){Object.assign(t.prototype,cYe(t))}async function ib(t,e,r){if(K$e.brandCheck(t,r),Gse(t))throw new TypeError("Body is unusable: Body has already been read");aYe(t[ob]);let s=$$e(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[ob].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await Y$e(t[ob].body,i,n),s.promise)}function Gse(t){let e=t[ob].body;return e!=null&&(e.stream.locked||Fg.isDisturbed(e.stream))}function pYe(t){return JSON.parse(_se(t))}function Lse(t){let e=t[ob].headersList,r=J$e(e);return r==="failure"?null:r}Hse.exports={extractBody:Use,safelyExtractBody:iYe,cloneBody:oYe,mixinBody:uYe,streamRegistry:kse,hasFinalizationRegistry:Pse,bodyUnusable:Gse}});var rne=f((G1t,tne)=>{"use strict";var we=require("node:assert"),ke=i0(),{channels:Xse}=jf(),bW=Yx(),{RequestContentLengthMismatchError:jA,ResponseContentLengthMismatchError:lYe,RequestAbortedError:Kse,HeadersTimeoutError:AYe,HeadersOverflowError:dYe,SocketError:j4,InformationalError:cb,BodyTimeoutError:fYe,HTTPParserError:bYe,ResponseExceededMaxSizeError:hYe}=B0(),{kUrl:Zse,kReset:ws,kClient:gW,kParser:It,kBlocking:xg,kRunning:br,kPending:MYe,kSize:Vse,kWriting:rl,kQueue:ho,kNoRef:Tg,kKeepAliveDefaultTimeout:mYe,kHostHeader:gYe,kPendingIdx:zYe,kRunningIdx:si,kError:ni,kPipelining:X4,kSocket:ub,kKeepAliveTimeoutValue:$4,kMaxHeadersSize:hW,kKeepAliveMaxTimeout:OYe,kKeepAliveTimeoutThreshold:EYe,kHeadersTimeout:yYe,kBodyTimeout:CYe,kStrictContentLength:zW,kMaxRequests:jse,kCounter:BYe,kMaxResponseSize:DYe,kOnError:qYe,kResume:tl,kHTTPContext:ene}=pt(),pa=kre(),IYe=Buffer.alloc(0),U4=Buffer[Symbol.species],G4=ke.addListener,RYe=ke.removeAllListeners,MW;async function wYe(){let t=process.env.JEST_WORKER_ID?Zx():void 0,e;try{e=await WebAssembly.compile(Hre())}catch{e=await WebAssembly.compile(t||Zx())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{we(M1.ptr===r);let i=s-Aa+la.byteOffset;return M1.onStatus(new U4(la.buffer,i,n))||0},wasm_on_message_begin:r=>(we(M1.ptr===r),M1.onMessageBegin()||0),wasm_on_he
`}return Xse.sendHeaders.hasSubscribers&&Xse.sendHeaders.publish({request:e,headers:g,socket:b}),!c||d===0?Yse(M,null,t,e,b,p,g,l):ke.isBuffer(c)?Yse(M,c,t,e,b,p,g,l):ke.isBlobLike(c)?typeof c.stream=="function"?Jse(M,c.stream(),t,e,b,p,g,l):WYe(M,c,t,e,b,p,g,l):ke.isStream(c)?xYe(M,c,t,e,b,p,g,l):ke.isIterable(c)?Jse(M,c,t,e,b,p,g,l):we(!1),!0}function xYe(t,e,r,s,n,i,o,a){we(i!==0||r[br]===0,"stream body cannot be pipelined");let c=!1,u=new Y4({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o}),p=function(M){if(!c)try{!u.write(M)&&this.pause&&this.pause()}catch(g){ke.destroy(this,g)}},l=function(){c||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",b)}),!c){let M=new Kse;queueMicrotask(()=>b(M))}},b=function(M){if(!c){if(c=!0,we(n.destroyed||n[rl]&&r[br]<=1),n.off("drain",l).off("error",b),e.removeListener("data",p).removeListener("end",b).removeListener("close",d),!M)try{u.end()}catch(g){M=g}u.destroy(M),M&&(M.code!=="UND_ERR_INFO"||M.message!=="reset")?ke.destroy(e,M):ke.destroy(e)}};e.on("data",p).on("end",b).on("error",b).on("close",d),e.resume&&e.resume(),n.on("drain",l).on("error",b),e.errorEmitted??e.errored?setImmediate(()=>b(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>b(null)),(e.closeEmitted??e.closed)&&setImmediate(d)}function Yse(t,e,r,s,n,i,o,a){try{e?ke.isBuffer(e)&&(we(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length:${i}\r
`,"latin1"):(we(i===null,"no body must not have content length"),n.write(`${o}\r
`,"latin1")),s.onRequestSent(),r[tl]()}catch(c){t(c)}}async function WYe(t,e,r,s,n,i,o,a){we(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new jA;let c=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length:${i}\r
`,"latin1"),n.write(c),n.uncork(),s.onBodySent(c),s.onRequestSent(),!a&&s.reset!==!1&&(n[ws]=!0),r[tl]()}catch(c){t(c)}}async function Jse(t,e,r,s,n,i,o,a){we(i!==0||r[br]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let d=c;c=null,d()}}let p=()=>new Promise((d,b)=>{we(c===null),n[ni]?b(n[ni]):c=d});n.on("close",u).on("drain",u);let l=new Y4({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(n[ni])throw n[ni];l.write(d)||await p()}l.end()}catch(d){l.destroy(d)}finally{n.off("close",u).off("drain",u)}}var Y4=class{constructor({abort:e,socket:r,request:s,contentLength:n,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=s,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[rl]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[ni])throw r[ni];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(n!==null&&o+u>n){if(i[zW])throw new jA;process.emitWarning(new jA)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[ws]=!0),n===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&n!==r){if(s[zW])throw new jA;process.emitWarning(new jA)}e[It].timeout&&e[It].timeoutType===pb&&e[It].timeout.refresh&&e[It].timeout.refresh(),s[tl]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[rl]=!1,e&&(we(s[br]<=1,"pipeline should only contain this request"),n(e))}};tne.exports=SYe});var pne=f((H1t,une)=>{"use strict";var ii=require("node:assert"),{pipeline:LYe}=require("node:stream"),u0=i0(),{RequestContentLengthMismatchError:CW,RequestAbortedError:sne,SocketError:Wg,InformationalError:BW}=B0(),{kUrl:J4,kReset:Z4,kClient:lb,kRunning:eB,kPending:_Ye,kQueue:sl,kPendingIdx:DW,kRunningIdx:Mo,kError:go,kSocket:q1,kStrictContentLength:QYe,kOnError:qW,kMaxConcurrentStreams:cne,kHTTP2Session:mo,kResume:nl,kSize:PYe,kHTTPContext:kYe}=pt(),lu=Symbol("open streams"),nne,ine=!1,K4;try{K4=require("node:http2")}catch{K4={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:UYe,HTTP2_HEADER_METHOD:GYe,HTTP2_HEADER_PATH:HYe,HTTP2_HEADER_SCHEME:XYe,HTTP2_HEADER_CONTENT_LENGTH:VYe,HTTP2_HEADER_EXPECT:jYe,HTTP2_HEADER_STATUS:$Ye}}=K4;function YYe(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let n of s)e.push(Buffer.from(r),Buffer.from(n));else e.push(Buffer.from(r),Buffer.from(s));return e}async function JYe(t,e){t[q1]=e,ine||(ine=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=K4.connect(t[J4],{createConnection:()=>e,peerMaxConcurrentStreams:t[cne]});r[lu]=0,r[lb]=t,r[q1]=e,u0.addListener(r,"error",ZYe),u0.addListener(r,"frameError",eJe),u0.addListener(r,"end",tJe),u0.addListener(r,"goaway",rJe),u0.addListener(r,"close",function(){let{[lb]:n}=this,{[q1]:i}=n,o=this[q1][go]||this[go]||new Wg("closed",u0.getSocketInfo(i));if(n[mo]=null,n.destroyed){ii(n[_Ye]===0);let a=n[sl].splice(n[Mo]);for(let c=0;c<a.length;c++){let u=a[c];u0.errorRequest(n,u,o)}}}),r.unref(),t[mo]=r,e[mo]=r,u0.addListener(e,"error",function(n){ii(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[go]=n,this[lb][qW](n)}),u0.addListener(e,"end",function(){u0.destroy(this,new Wg("other side closed",u0.getSocketInfo(this)))}),u0.addListener(e,"close",function(){let n=this[go]||new Wg("closed",u0.getSocketInfo(this));t[q1]=null,this[mo]!=null&&this[mo].destroy(n),t[DW]=t[Mo],ii(t[eB]===0),t.emit("disconnect",t[J4],[t],n),t[nl]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return nJe(t,...n)},resume(){KYe(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function KYe(t){let e=t[q1];e?.destroyed===!1&&(t[PYe]===0&&t[cne]===0?(e.unref(),t[mo].unref()):(e.ref(),t[mo].ref()))}function ZYe(t){ii(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[q1][go]=t,this[lb][qW](t)}function eJe(t,e,r){if(r===0){let s=new BW(`HTTP/2:"frameError"received-type${t},code${e}`);this[q1][go]=s,this[lb][qW](s)}}function tJe(){let t=new Wg("other side closed",u0.getSocketInfo(this[q1]));this.destroy(t),u0.destroy(this[q1],t)}function rJe(t){let e=this[go]||new Wg(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,u0.getSocketInfo(this)),r=this[lb];if(r[q1]=null,r[kYe]=null,this[mo]!=null&&(this[mo].destroy(e),this[mo]=null),u0.destroy(this[q1],e),r[Mo]<r[sl].length){let s=r[sl][r[Mo]];r[sl][r[Mo]++]=null,u0.errorRequest(r,s,e),r[DW]=r[Mo]}ii(r[eB]===0),r.emit("disconnect",r[J4],[r],e),r[nl]()}function sJe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function nJe(t,e){let r=t[mo],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:c,headers:u}=e,{body:p}=e;if(o)return u0.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let R=0;R<u.length;R+=2){let T=u[R+0],W=u[R+1];if(Array.isArray(W))for(let _=0;_<W.length;_++)l[T]?l[T]+=`,${W[_]}`:l[T]=W[_];else l[T]=W}let d,{hostname:b,port:M}=t[J4];l[UYe]=i||`${b}${M?`:${M}`:""}`,l[GYe]=s;let g=R=>{e.aborted||e.completed||(R=R||new sne,u0.errorRequest(t,e,R),d!=null&&u0.destroy(d,R),u0.destroy(p,R),t[sl][t[Mo]++]=null,t[nl]())};try{e.onConnect(g)}catch(R){u0.errorRequest
globstarwhile`,t,p,e,l,d),this.matchOne(t.slice(p),e.slice(l),r))return this.debug("globstar found match!",p,o,d),!0;if(d==="."||d===".."||!s.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,p,e,l);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
`).map(e=>e.trim()).join(" ")};wfe.O=function(t){return this.inspectOpts.colors=this.useColors,Cq.inspect(t,this.inspectOpts)}});var R2=f((hat,mQ)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?mQ.exports=Bfe():mQ.exports=Nfe()});var Tfe=f(Ws=>{"use strict";var yl0=Ws&&Ws.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Cl0=Ws&&Ws.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Sfe=Ws&&Ws.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yl0(e,t,r);return Cl0(e,t),e};Object.defineProperty(Ws,"__esModule",{value:!0});Ws.req=Ws.json=Ws.toBuffer=void 0;var Bl0=Sfe(require("http")),Dl0=Sfe(require("https"));async function Ffe(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}Ws.toBuffer=Ffe;async function ql0(t){let r=(await Ffe(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=`(input:${r})`,n}}Ws.json=ql0;function Il0(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?Dl0:Bl0).request(t,e),n=new Promise((i,o)=>{s.once("response",i).once("error",o).end()});return s.then=n.then.bind(n),s}Ws.req=Il0});var Lfe=f(In=>{"use strict";var xfe=In&&In.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Rl0=In&&In.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Wfe=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&xfe(e,t,r);return Rl0(e,t),e},wl0=In&&In.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xfe(e,t,r)};Object.defineProperty(In,"__esModule",{value:!0});In.Agent=void 0;var Nl0=Wfe(require("net")),vfe=Wfe(require("http")),Sl0=require("https");wl0(Tfe(),In);var qa=Symbol("AgentBaseInternalState"),gQ=class extends vfe.Agent{constructor(e){super(e),this[qa]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
`).some(s=>s.indexOf("(https.js:")!==-1||s.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Nl0.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let s=this.sockets[e],n=s.indexOf(r);n!==-1&&(s.splice(n,1),this.totalSocketCount--,s.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Sl0.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),o=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(i,o),a instanceof vfe.Agent)try{return a.addRequest(e,n)}catch(c){return s(c)}this[qa].currentSocket=a,super.createSocket(e,r,s)},a=>{this.decrementSockets(i,o),s(a)})}createConnection(){let e=this[qa].currentSocket;if(this[qa].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[qa].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[qa]&&(this[qa].defaultPort=e)}get protocol(){return this[qa].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[qa]&&(this[qa].protocol=e)}};In.Agent=gQ});var _fe=f(ah=>{"use strict";var Fl0=ah&&ah.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ah,"__esModule",{value:!0});ah.parseProxyResponse=void 0;var Tl0=Fl0(R2()),Dq=(0,Tl0.default)("https-proxy-agent:parse-proxy-response");function vl0(t){return new Promise((e,r)=>{let s=0,n=[];function i(){let p=t.read();p?u(p):t.once("readable",i)}function o(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",i)}function a(){o(),Dq("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){o(),Dq("onerror %o",p),r(p)}function u(p){n.push(p),s+=p.length;let l=Buffer.concat(n,s),d=l.indexOf(`\r
\r
`);if(d===-1){Dq("have not received end of HTTP headers yet..."),i();return}let b=l.slice(0,d).toString("ascii").split(`\r
`),M=b.shift();if(!M)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=M.split(" "),y=+g[1],O=g.slice(2).join(" "),B={};for(let I of b){if(!I)continue;let R=I.indexOf(":");if(R===-1)return t.destroy(),r(new Error(`InvalidheaderfromproxyCONNECTresponse:"${I}"`));let T=I.slice(0,R).toLowerCase(),W=I.slice(R+1).trimStart(),_=B[T];typeof _=="string"?B[T]=[_,W]:Array.isArray(_)?_.push(W):B[T]=W}Dq("got proxy server response: %o %o",M,B),o(),e({connect:{statusCode:y,statusText:O,headers:B},buffered:l})}t.on("error",c),t.on("end",a),i()})}ah.parseProxyResponse=vl0});var Hfe=f(gi=>{"use strict";var xl0=gi&&gi.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Wl0=gi&&gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ufe=gi&&gi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&xl0(e,t,r);return Wl0(e,t),e},Gfe=gi&&gi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gi,"__esModule",{value:!0});gi.HttpsProxyAgent=void 0;var qq=Ufe(require("net")),Qfe=Ufe(require("tls")),Ll0=Gfe(require("assert")),_l0=Gfe(R2()),Ql0=Lfe(),Pl0=require("url"),kl0=_fe(),Kz=(0,_l0.default)("https-proxy-agent"),Pfe=t=>t.servername===void 0&&t.host&&!qq.isIP(t.host)?{...t,servername:t.host}:t,Iq=class extends Ql0.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Pl0.URL(e):e,this.proxyHeaders=r?.headers??{},Kz("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?kfe(r,"headers"):null,host:s,port:n}}async connect(e,r){let{proxy:s}=this;if(!r.host)throw new TypeError('No "host" provided');let n;s.protocol==="https:"?(Kz("Creating `tls.Socket`: %o",this.connectOpts),n=Qfe.connect(Pfe(this.connectOpts))):(Kz("Creating `net.Socket`: %o",this.connectOpts),n=qq.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=qq.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT${o}:${r.port}HTTP/1.1\r
`;if(s.username||s.password){let d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))a+=`${d}:${i[d]}\r
`);let{connect:u,buffered:p}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",Ul0),r.secureEndpoint?(Kz("Upgrading socket connection to TLS"),Qfe.connect({...kfe(Pfe(r),"host","path","port"),socket:n})):n;n.destroy();let l=new qq.Socket({writable:!1});return l.readable=!0,e.once("socket",d=>{Kz("Replaying proxy buffer for failed request"),(0,Ll0.default)(d.listenerCount("data")>0),d.push(p),d.push(null)}),l}};Iq.protocols=["http","https"];gi.HttpsProxyAgent=Iq;function Ul0(t){t.resume()}function kfe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var jfe=f(Ls=>{"use strict";var Gl0=Ls&&Ls.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Hl0=Ls&&Ls.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xfe=Ls&&Ls.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Gl0(e,t,r);return Hl0(e,t),e};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.req=Ls.json=Ls.toBuffer=void 0;var Xl0=Xfe(require("http")),Vl0=Xfe(require("https"));async function Vfe(t){let e=0,r=[];for await(let s of t)e+=s.length,r.push(s);return Buffer.concat(r,e)}Ls.toBuffer=Vfe;async function jl0(t){let r=(await Vfe(t)).toString("utf8");try{return JSON.parse(r)}catch(s){let n=s;throw n.message+=`(input:${r})`,n}}Ls.json=jl0;function $l0(t,e={}){let s=((typeof t=="string"?t:t.href).startsWith("https:")?Vl0:Xl0).request(t,e),n=new Promise((i,o)=>{s.once("response",i).once("error",o).end()});return s.then=n.then.bind(n),s}Ls.req=$l0});var Zz=f(Rn=>{"use strict";var Yfe=Rn&&Rn.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),Yl0=Rn&&Rn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Jfe=Rn&&Rn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Yfe(e,t,r);return Yl0(e,t),e},Jl0=Rn&&Rn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Yfe(e,t,r)};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.Agent=void 0;var Kl0=Jfe(require("net")),$fe=Jfe(require("http")),Zl0=require("https");Jl0(jfe(),Rn);var Ia=Symbol("AgentBaseInternalState"),zQ=class extends $fe.Agent{constructor(e){super(e),this[Ia]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
`).some(s=>s.indexOf("(https.js:")!==-1||s.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Kl0.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let s=this.sockets[e],n=s.indexOf(r);n!==-1&&(s.splice(n,1),this.totalSocketCount--,s.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?Zl0.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,s){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(n),o=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(i,o),a instanceof $fe.Agent)return a.addRequest(e,n);this[Ia].currentSocket=a,super.createSocket(e,r,s)},a=>{this.decrementSockets(i,o),s(a)})}createConnection(){let e=this[Ia].currentSocket;if(this[Ia].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ia].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ia]&&(this[Ia].defaultPort=e)}get protocol(){return this[Ia].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ia]&&(this[Ia].protocol=e)}};Rn.Agent=zQ});var OQ=f(zi=>{"use strict";var eA0=zi&&zi.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),tA0=zi&&zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Zfe=zi&&zi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&eA0(e,t,r);return tA0(e,t),e},rA0=zi&&zi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zi,"__esModule",{value:!0});zi.HttpProxyAgent=void 0;var sA0=Zfe(require("net")),nA0=Zfe(require("tls")),iA0=rA0(R2()),oA0=require("events"),aA0=Zz(),Kfe=require("url"),ch=(0,iA0.default)("http-proxy-agent"),Rq=class extends aA0.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new Kfe.URL(e):e,this.proxyHeaders=r?.headers??{},ch("Creating new HttpProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?cA0(r,"headers"):null,host:s,port:n}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:s}=this,n=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",o=`${n}//${i}`,a=new Kfe.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(s.username||s.password){let u=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(c)){let p=c[u];p&&e.setHeader(u,p)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let s,n;ch("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(ch("Patching connection write() output buffer with updated header"),s=e.outputData[0].data,n=s.indexOf(`\r
\r
`)+4,e.outputData[0].data=e._header+s.substring(n),ch("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(ch("Creating `tls.Socket`: %o",this.connectOpts),i=nA0.connect(this.connectOpts)):(ch("Creating `net.Socket`: %o",this.connectOpts),i=sA0.connect(this.connectOpts)),await(0,oA0.once)(i,"connect"),i}};Rq.protocols=["http","https"];zi.HttpProxyAgent=Rq;function cA0(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var Obe=f(Uq=>{"use strict";Object.defineProperty(Uq,"__esModule",{value:!0});Uq.state=void 0;Uq.state={instrumenterImplementation:void 0}});var Lbe=f(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});jq.state=void 0;jq.state={operationRequestMap:new WeakMap}});var JMe=f(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var uh0=require("os"),ph0=require("util");function lh0(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Ah0=lh0(ph0);function dh0(t,...e){process.stderr.write(`${Ah0.default.format(t,...e)}${uh0.EOL}`)}var PMe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,UMe,G9=[],H9=[],c5=[];PMe&&X9(PMe);var GMe=Object.assign(t=>HMe(t),{enable:X9,enabled:V9,disable:fh0,log:dh0});function X9(t){UMe=t,G9=[],H9=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?H9.push(new RegExp(`^${s.substr(1)}$`)):G9.push(new RegExp(`^${s}$`));for(let s of c5)s.enabled=V9(s.namespace)}function V9(t){if(t.endsWith("*"))return!0;for(let e of H9)if(e.test(t))return!1;for(let e of G9)if(e.test(t))return!0;return!1}function fh0(){let t=UMe||"";return X9(""),t}function HMe(t){let e=Object.assign(r,{enabled:V9(t),destroy:bh0,log:GMe.log,namespace:t,extend:hh0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return c5.push(e),e}function bh0(){let t=c5.indexOf(this);return t>=0?(c5.splice(t,1),!0):!1}function hh0(t){let e=HMe(`${this.namespace}:${t}`);return e.log=this.log,e}var LO=GMe,XMe=new Set,o5=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,u5,p5=LO("azure");p5.log=(...t)=>{LO.log(...t)};var j9=["verbose","info","warning","error"];o5&&(YMe(o5)?VMe(o5):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${o5}';loggingisnotenabled.Acceptablevalues:${j9.join(", ")}.`));function VMe(t){if(t&&!YMe(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${j9.join(",")}`);u5=t;let e=[];for(let r of XMe)$Me(r)&&e.push(r.namespace);LO.enable(e.join(","))}function Mh0(){return u5}var kMe={verbose:400,info:300,warning:200,error:100};function mh0(t){let e=p5.extend(t);return jMe(p5,e),{error:a5(e,"error"),warning:a5(e,"warning"),info:a5(e,"info"),verbose:a5(e,"verbose")}}function jMe(t,e){e.log=(...r)=>{t.log(...r)}}function a5(t,e){let r=Object.assign(t.extend(e),{level:e});if(jMe(t,r),$Me(r)){let s=LO.disable();LO.enable(s+","+r.namespace)}return XMe.add(r),r}function $Me(t){return!!(u5&&kMe[t.level]<=kMe[u5])}function YMe(t){return j9.includes(t)}Ch.AzureLogger=p5;Ch.createClientLogger=mh0;Ch.getLogLevel=Mh0;Ch.setLogLevel=VMe});var J9=f(QO=>{"use strict";Object.defineProperty(QO,"__esModule",{value:!0});var Bh=new WeakMap,l5=new WeakMap,_O=class t{constructor(){this.onabort=null,Bh.set(this,[]),l5.set(this,!1)}get aborted(){if(!l5.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return l5.get(this)}static get none(){return new t}addEventListener(e,r){if(!Bh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Bh.get(this).push(r)}removeEventListener(e,r){if(!Bh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Bh.get(this),n=s.indexOf(r);n>-1&&s.splice(n,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function KMe(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Bh.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),l5.set(t,!0)}var $9=class extends Error{constructor(e){super(e),t
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||XN(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}Vn.exports.bucketDir=y$;function y$(t){return Bc.join(t,`index-v${nN0}`)}Vn.exports.bucketPath=yE;function yE(t,e){let r=Kqe(e);return Bc.join.apply(Bc,[y$(t)].concat(sN0(r)))}Vn.exports.hashKey=Kqe;function Kqe(t){return Zqe(t,"sha256")}Vn.exports.hashEntry=XN;function XN(t){return Zqe(t,"sha1")}function Zqe(t,e){return jw0.createHash(e).update(t).digest("hex")}function VN(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?rN0(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function O$(t){return Jw0(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var vM=f($N=>{"use strict";Object.defineProperty($N,"__esModule",{value:!0});$N.LRUCache=void 0;var lN0=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,tIe=new Set,C$=typeof process=="object"&&process?process:{},rIe=(t,e,r,s)=>{typeof C$.emitWarning=="function"?C$.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},jN=globalThis.AbortController,eIe=globalThis.AbortSignal;if(typeof jN>"u"){eIe=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},jN=class{constructor(){e()}signal=new eIe;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let n of this.signal._onabort)n(s);this.signal.onabort?.(s)}}};let t=C$.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,rIe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var AN0=t=>!tIe.has(t),iA=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),sIe=t=>iA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?TM:null:null,TM=class extends Array{constructor(e){super(e),this.fill(0)}},B$=class t{heap;length;static#e=!1;static create(e){let r=sIe(e);if(!r)return[];t.#e=!0;let s=new t(e,r);return t.#e=!1,s}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},D$=class t{#e;#t;#n;#r;#s;#i;#a;#p;get perf(){return this.#p}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#l;#d;#A;#o;#h;#O;#M;#m;#B;#g;#y;#C;#b;#E;#D;#z;#c;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#b,sizes:e.#y,keyMap:e.#d,keyList:e.#A,valList:e.#o,next:e.#h,prev:e.#O,get head(){return e.#M},get tail(){return e.#m},free:e.#B,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,s,n,i)=>e.#U(r,s,n,i),moveToTail:r=>e.#W(r),indexes:r=>e.#w(r),rindexes:r=>e.#S(r),isStale:r=>e.#I(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#u}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#s}constructor(e){let{max:r=0,ttl:s,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:u,onInsert:p,disposeAfter:l,noDisposeOnSet:d,noUpdateTTL:b,maxSize:M=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:O,memoMethod:B,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:W,ignoreFetchAbort:_,perf:Y}=e;if(Y!==void 0&&typeof Y?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#p=Y??lN0,r!==
globstarwhile`,e,d,r,b,M),this.matchOne(e.slice(d),r.slice(b),s))return this.debug("globstar found match!",d,c,M),!0;if(M==="."||M===".."||!n.dot&&M.charAt(0)==="."){this.debug("dot detected!",e,d,r,b);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(s&&(this.debug(`
`);if(d===-1){jS("have not received end of HTTP headers yet..."),i();return}let b=l.slice(0,d).toString("ascii").split(`\r
`),M=b.shift();if(!M)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=M.split(" "),y=+g[1],O=g.slice(2).join(" "),B={};for(let I of b){if(!I)continue;let R=I.indexOf(":");if(R===-1)return t.destroy(),r(new Error(`InvalidheaderfromproxyCONNECTresponse:"${I}"`));let T=I.slice(0,R).toLowerCase(),W=I.slice(R+1).trimStart(),_=B[T];typeof _=="string"?B[T]=[_,W]:Array.isArray(_)?_.push(W):B[T]=W}jS("got proxy server response: %o %o",M,B),o(),e({connect:{statusCode:y,statusText:O,headers:B},buffered:l})}t.on("error",c),t.on("end",a),i()})}YM.parseProxyResponse=oT0});var pRe=f(Xi=>{"use strict";var aT0=Xi&&Xi.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),cT0=Xi&&Xi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cRe=Xi&&Xi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&aT0(e,t,r);return cT0(e,t),e},uRe=Xi&&Xi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.HttpsProxyAgent=void 0;var ry=cRe(require("net")),oRe=cRe(require("tls")),uT0=uRe(require("assert")),pT0=uRe(R2()),lT0=Zz(),AT0=require("url"),dT0=iRe(),sy=(0,pT0.default)("https-proxy-agent"),$S=class extends lT0.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new AT0.URL(e):e,this.proxyHeaders=r?.headers??{},sy("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?aRe(r,"headers"):null,host:s,port:n}}async connect(e,r){let{proxy:s}=this;if(!r.host)throw new TypeError('No "host" provided');let n;if(s.protocol==="https:"){sy("Creating `tls.Socket`: %o",this.connectOpts);let d=this.connectOpts.servername||this.connectOpts.host;n=oRe.connect({...this.connectOpts,servername:d&&ry.isIP(d)?void 0:d})}else sy("Creating `net.Socket`: %o",this.connectOpts),n=ry.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=ry.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT${o}:${r.port}HTTP/1.1\r
`;if(s.username||s.password){let d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))a+=`${d}:${i[d]}\r
`);let{connect:u,buffered:p}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",fT0),r.secureEndpoint){sy("Upgrading socket connection to TLS");let d=r.servername||r.host;return oRe.connect({...aRe(r,"host","path","port"),socket:n,servername:ry.isIP(d)?void 0:d})}return n}n.destroy();let l=new ry.Socket({writable:!1});return l.readable=!0,e.once("socket",d=>{sy("Replaying proxy buffer for failed request"),(0,uT0.default)(d.listenerCount("data")>0),d.push(p),d.push(null)}),l}};$S.protocols=["http","https"];Xi.HttpsProxyAgent=$S;function fT0(t){t.resume()}function aRe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var fRe=f(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var lRe=require("buffer"),kd={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};Dp.ERRORS=kd;function bT0(t){if(!lRe.Buffer.isEncoding(t))throw new Error(kd.INVALID_ENCODING)}Dp.checkEncoding=bT0;function ARe(t){return typeof t=="number"&&isFinite(t)&&gT0(t)}Dp.isFiniteInteger=ARe;function dRe(t,e){if(typeof t=="number"){if(!ARe(t)||t<0)throw new Error(e?kd.INVALID_OFFSET:kd.INVALID_LENGTH)}else throw new Error(e?kd.INVALID_OFFSET_NON_NUMBER:kd.INVALID_LENGTH_NON_NUMBER)}function hT0(t){dRe(t,!1)}Dp.checkLengthValue=hT0;function MT0(t){dRe(t,!0)}Dp.checkOffsetValue=MT0;function mT0(t,e){if(t<0||t>e.length)throw new Error(kd.INVALID_TARGET_OFFSET)}Dp.checkTargetOffset=mT0;function gT0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function zT0(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof lRe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}Dp.bigIntAndBufferInt64Check=zT0});var hRe=f(WY=>{"use strict";Object.defineProperty(WY,"__esModule",{value:!0});var r0=fRe(),bRe=4096,OT0="utf8",xY=class t{constructor(e){if(this.length=0,this._encoding=OT0,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(r0.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(r0.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(r0.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(r0.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(bRe);else{if(typeof e<"u")throw new Error(r0.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(bRe)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffe
`,QP0=/\u2014 (\S+) (\S+)\n/g;function PP0(t,e){let r=t.inclusionProof,s=MZ.fromString(r.checkpoint.envelope),n=wF.fromString(s.note);if(!kP0(s,e))throw new Ny.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}function kP0(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>r6e.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?r6e.crypto.verify(r,n.publicKey,s.signature):!1})}var MZ=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(hZ))throw new Ny.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(hZ),s=e.slice(0,r+1),i=e.slice(r+hZ.length).matchAll(QP0),o=Array.from(i,a=>{let[,c,u]=a,p=Buffer.from(u,"base64");if(p.length<5)throw new Ny.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:c,keyHint:p.subarray(0,4),signature:p.subarray(4)}});if(o.length===0)throw new Ny.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},wF=class t{origin;logSize;logHash;rest;constructor(e,r,s,n){this.origin=e,this.logSize=r,this.logHash=s,this.rest=n}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new Ny.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],n=BigInt(r[1]),i=Buffer.from(r[2],"base64"),o=r.slice(3);return new t(s,n,i,o)}};Sy.LogCheckpoint=wF});var n6e=f(OZ=>{"use strict";Object.defineProperty(OZ,"__esModule",{value:!0});OZ.verifyMerkleInclusion=HP0;var zZ=Qn(),mZ=Qr(),UP0=Buffer.from([0]),GP0=Buffer.from([1]);function HP0(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new mZ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:i,border:o}=XP0(s,n);if(r.hashes.length!==i+o)throw new mZ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,i),c=r.hashes.slice(i),u=KP0(t.canonicalizedBody),p=jP0(VP0(u,a,s),c);if(!zZ.crypto.bufferEqual(p,e.logHash))throw new mZ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function XP0(t,e){let r=$P0(t,e),s=YP0(t>>BigInt(r));return{inner:r,border:s}}function VP0(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?gZ(n,s):gZ(s,n),t)}function jP0(t,e){return e.reduce((r,s)=>gZ(s,r),t)}function $P0(t,e){return JP0(t^e-BigInt(1))}function YP0(t){return t.toString(2).split("1").length-1}function JP0(t){return t===0n?0:t.toString(2).length}function gZ(t,e){return zZ.crypto.digest("sha256",GP0,t,e)}function KP0(t){return zZ.crypto.digest("sha256",UP0,t)}});var o6e=f(EZ=>{"use strict";Object.defineProperty(EZ,"__esModule",{value:!0});EZ.verifyTLogSET=tk0;var i6e=Qn(),ZP0=Qr(),ek0=Rm();function tk0(t,e){if(!(0,ek0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=rk0(t),o=Buffer.from(i6e.json.canonicalize(i),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return i6e.crypto.verify(o,n.publicKey,a)}))throw new ZP0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function rk0(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:n}=t;return{body:n.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var c6e=f(NF=>{"use strict";Object.defineProperty(NF,"__esModule",{value:!0});NF.verifyTLogBody=ak0;NF.verifyTLogInclusion=ck0;var a6e=RJ(),BZ=Qr(),yZ=ZSe(),CZ=e6e(),sk0=t6e(),nk0=s6e(),ik0=n6e(),ok0=o6e();function ak0(t,e){let{kind:r,version:s}=t.kindVersion,n=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==n.kind||s!==n.apiVersion)throw new BZ.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==yZ.DSSE_API_VERSION_V1)return(0,yZ.verifyDSSETLogBody)(n,e);{let i=a6e.Entry.fromJSON(n);return(0,yZ.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,sk0.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==CZ.HASHEDREKORD_API_VERSION_V1)return(0,CZ.verifyHashedRekordTLogBody)(n,e);{let i=a6e.Entry.fromJSON(n);return(0,CZ.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new BZ.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}function ck0(t,e){let r=!1;if(uk0(t)&&((0,ok0.verifyTLogSET)(t,e),r=!0),pk0(t)){let s=(0,nk0.verifyCheckpoint)(t,e);(0,ik0.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new BZ.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function uk0(t){return t.inclusionPromise!==void 0}function pk0(t){return t.inclusionProof!==void 0}});var f6e=f(SF=>{"use strict";Object.defineProperty(SF,"__esModule",{value:!0});SF.Verifier=void 0;var lk0=require("util"),wm=Qr(),u6e=VSe(),p6e=$Se(),l6e=KSe(),A6e=c6e(),DZ=class{trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let s=this.verifyTimestamps(e),n=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifyS
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function b70(){Object.keys(aT).forEach(function(t){delete aT[t]})}});var uT=f(Gc=>{"use strict";Gc.__esModule=!0;Gc.HandlebarsEnvironment=HZ;function sFe(t){return t&&t.__esModule?t:{default:t}}var uf=Cs(),h70=ro(),UZ=sFe(h70),M70=LZ(),m70=K6e(),g70=QZ(),cT=sFe(g70),z70=kZ(),O70="4.7.8";Gc.VERSION=O70;var E70=8;Gc.COMPILER_REVISION=E70;var y70=7;Gc.LAST_COMPATIBLE_COMPILER_REVISION=y70;var C70={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"};Gc.REVISION_CHANGES=C70;var GZ="[object Object]";function HZ(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},M70.registerDefaultHelpers(this),m70.registerDefaultDecorators(this)}HZ.prototype={constructor:HZ,logger:cT.default,log:cT.default.log,registerHelper:function(e,r){if(uf.toString.call(e)===GZ){if(r)throw new UZ.default("Arg not supported with multiple helpers");uf.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(uf.toString.call(e)===GZ)uf.extend(this.partials,e);else{if(typeof r>"u")throw new UZ.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(uf.toString.call(e)===GZ){if(r)throw new UZ.default("Arg not supported with multiple decorators");uf.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){z70.resetLoggedProperties()}};var B70=cT.default.log;Gc.log=B70;Gc.createFrame=uf.createFrame;Gc.logger=cT.default});var iFe=f((pT,nFe)=>{"use strict";pT.__esModule=!0;function XZ(t){this.string=t}XZ.prototype.toString=XZ.prototype.toHTML=function(){return""+this.string};pT.default=XZ;nFe.exports=pT.default});var oFe=f(VZ=>{"use strict";VZ.__esModule=!0;VZ.wrapHelper=D70;function D70(t,e){if(typeof t!="function")return t;var r=function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)};return r}});var lFe=f(qA=>{"use strict";qA.__esModule=!0;qA.checkRevision=S70;qA.template=F70;qA.wrapProgram=lT;qA.resolvePartial=T70;qA.invokePartial=v70;qA.noop=uFe;function q70(t){return t&&t.__esModule?t:{default:t}}function I70(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var R70=Cs(),vp=I70(R70),w70=ro(),xp=q70(w70),Wp=uT(),aFe=LZ(),N70=oFe(),cFe=kZ();function S70(t){var e=t&&t[0]||1,r=Wp.COMPILER_REVISION;if(!(e>=Wp.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Wp.COMPILER_REVISION))if(e<Wp.LAST_COMPATIBLE_COMPILER_REVISION){var s=Wp.REVISION_CHANGES[r],n=Wp.REVISION_CHANGES[e];throw new xp.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+n+").")}else throw new xp.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function F70(t,e){if(!e)throw new xp.default("No environment passed to template");if(!t||!t.main)throw new xp.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(o,a,c){c.hash&&(a=vp.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,c);var u=vp.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),p=e.VM.invokePartial.call(this,o,a,u);if(p==null&&e.compile&&(c.partials[c.name]=e.compile(o,t.compilerOptions,e),p=c.partials[c.name](a,u)),p!=null){if(c.indent){for(var l=p.split(`
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),d=0;d<l.length&&(a=this._input.match(this.rules[l[d]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=d,!this.options.flex)));d++);return o?(p=o[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,x0t.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function H0t(t,e){var r;if(t){if(typeof t=="string")return m9e(t,e);var s=(0,P0t.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,Q0t.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return m9e(t,e)}}function m9e(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var X0t=function(e){var r={},s=e._dec,n=e._hex,i=e._pad4;function o(d){return d.replace(/[- _]+/g,"").toLowerCase()}function a(d){var b=/^\\[xu](.+)/.exec(d);return b?s(b[1]):d.charCodeAt(d[0]==="\\"?1:0)}function c(d){var b="",M=-1;return(0,U0t.default)(e).call(e,d,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var y=a(g[1]);y>M+1&&(b+="\\u".concat(i(n(M+1))),y>M+2&&(b+="-\\u".concat(i(n(y-1))))),M=a(g[2]||g[1])}),M<65535&&(b+="\\u".concat(i(n(M+1))),M<65534&&(b+="-\\uFFFF")),b}function u(d){var b="b!";return r[d][b]||(r[d][b]=c(r[d].bmp))}function p(d,b){var M=r[d],g="";if(M.bmp&&!M.isBmpLast){var y;g=(0,Nte.default)(y="[".concat(M.bmp,"]")).call(y,M.astral?"|":"")}if(M.astral&&(g+=M.astral),M.isBmpLast&&M.bmp){var O;g+=(0,Nte.default)(O="".concat(M.astral?"|":"","[")).call(O,M.bmp,"]")}return b?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}function l(d,b){var M=b?"a!":"a=";return r[d][M]||(r[d][M]=p(d,b))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(d,b,M){var g="Invalid double negation ",y="Unknown Unicode token ",O="Unicode token missing data ",B="Astral mode required for Unicode token ",I="Astral mode does not support Unicode tokens within character classes",R=d[1]==="P"||!!d[2],T=(0,k0t.default)(M).call(M,"A"),W=o(d[4]||d[3]),_=r[W];if(d[1]==="P"&&d[2])throw new SyntaxError(g+d[0]);if(!r.hasOwnProperty(W))throw new SyntaxError(y+d[0]);if(_.inverseOf){if(W=o(_.inverseOf),!r.hasOwnProperty(W)){var Y;throw new ReferenceError((0,Nte.default)(Y="".concat(O+d[0]," -> ")).call(Y,_.inverseOf))}_=r[W],R=!R}if(!(_.bmp||T))throw new SyntaxError(B+d[0]);if(T){if(b==="class")throw new SyntaxError(I);return l(W,R)}return b==="class"?R?u(W):_.bmp:"".concat((R?"[^":"[")+_.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(d){var b="Unicode token requires name",M="Unicode token has no character data ",g=G0t(d),y;try{for(g.s();!(y=g.n()).done;){var O=y.value;if(!O.name)throw new Error(b);if(!(O.inverseOf||O.bmp||O.astral))throw new Error(M+O.name);r[o(O.name)]=O,O.alias&&(r[o(O.alias)]=O)}}catch(B){g.e(B)}finally{g.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(d){var b=o(d);return r[b]}};xC.default=X0t;g9e.exports=xC.default});var E9e=f((Rxt,O9e)=>{O9e.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",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}functionj8(t,e){if(process.env.GITHUB_OUTPUT||"")returnOg("OUTPUT",h4(t,e));process.stdout.write(V8.EOL),oa("set-output",{name:t},ia(e))}functionOpe(t){process.exitCode=X8.Failure,Gb(t)}functionpi(){returnprocess.env.RUNNER_DEBUG==="1"}functionw(t){oa("debug",{},t)}functionGb(t,e={}){oa("error",ix(e),tinstanceofError?t.toString():t)}functionO0(t,e={}){oa("warning",ix(e),tinstanceofError?t.toString():t)}functionx(t){process.stdout.write(t+V8.EOL)}functionh2(t){ax("group",t)}functionM2(){ax("endgroup")}functionar(t,e){returnKs0(this,void0,void0,function*(){h2(t);letr;try{r=yielde()}finally{M2()}returnr})}functiongD(t,e){if(process.env.GITHUB_STATE||"")returnOg("STATE",h4(t,e));oa("save-state",{name:t},ia(e))}functionEpe(t){returnprocess.env[`STATE_${t}`]||""}varhR=v(require("fs"),1),xG=v(require("os"),1),WG=v(require("path"),1);varh_=v(require("crypto"),1),zr=v(require("fs"),1);varjo0=v(f_(),1);varTD=v(require("os"),1),Do=v(require("path"),1);vardi=v(f_(),1),AAe=v(require("stream"),1),dAe=v(require("util"),1),M_=require("assert");varlAe=function(t,e,r,s){functionn(i){returniinstanceofr?i:newr(function(o){o(i)})}returnnew(r||(r=Promise))(function(i,o){functiona(p){try{u(s.next(p))}catch(l){o(l)}}functionc(p){try{u(s.throw(p))}catch(l){o(l)}}functionu(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},SD=class{constructor(e,r,s){if(e<1)thrownewError("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(s),this.minSeconds>this.maxSeconds)thrownewError("min seconds should be less than or equal to max seconds")}execute(e,r){returnlAe(this,void0,void0,function*(){lets=1;for(;s<this.maxAttempts;){try{returnyielde()}catch(i){if(r&&!r(i))throwi;x(i.message)}letn=this.getSleepAmount();x(`Waiting ${n} seconds before trying again`),yieldthis.sleep(n),s++}returnyielde()})}getSleepAmount(){returnMath.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){returnlAe(this,void0,void0,function*(){returnnewPromise(r=>setTimeout(r,e*1e3))})}};varya=function(t,e,r,s){functionn(i){returniinstanceofr?i:newr(function(o){o(i)})}returnnew(r||(r=Promise))(function(i,o){functiona(p){try{u(s.next(p))}catch(l){o(l)}}functionc(p){try{u(s.throw(p))}catch(l){o(l)}}functionu(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},FD=classextendsError{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},fAe=process.platform==="win32",Fnt=process.platform==="darwin",Yo0="actions/tool-cache";functionfi(t,e,r,s){returnya(this,void0,void0,function*(){e=e||Do.join(zAe(),h_.randomUUID()),yieldzu(Do.dirname(e)),w(`Downloading ${t}`),w(`Destination ${e}`);letn=3,i=b_("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=b_("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);returnyieldnewSD(n,i,o).execute(()=>ya(this,void0,void0,function*(){returnyieldJo0(t,e||"",r,s)}),c=>!(cinstanceofFD&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}functionJo0(t,e,r,s){returnya(this,void0,void0,function*(){if(zr.existsSync(e))thrownewError(`Destination file path ${e} already exists`);letn=newvs(Yo0,[],{allowRetries:!1});r&&(w("set auth"),s===void0&&(s={}),s.authorization=r);leti=yieldn.get(t,s);if(i.message.statusCode!==200){letp=newFD(i.message.statusCode);throww(`Failed to download from "${t}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),p}leto=dAe.promisify(AAe.pipeline),c=b_("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>i.message)(),u=!1;try{returnyieldo(c,zr.createWriteStream(e)),w("download complete"),u=!0,e}finally{if(!u){w("download failed");try{yieldhD(e)}catch(p){w(`Failed to delete '${e}'. ${p.message}`)}}}})}functionbAe(t,e){returnya(this,arguments,void0,function*(r,s,n="xz"){if(!r)thrownewError("parameter
`),e=e.replace(/\r/g,`
`));let n=e.split(`
`).map(i=>i.trim());for(let i of n)!i||i.startsWith("#")||s.patterns.push(new vz(i));return s.searchPaths.push(...O_(s.patterns)),s})}static stat(e,r,s){return q_(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield Jb.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){w(`Brokensymlink'${e.path}'`);return}throw new Error(`Noinformationfoundforthepath'${e.path}'.Thismayindicateabrokensymboliclink.`)}throw i}else n=yield Jb.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield Jb.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(o=>o===i)){w(`Symlinkcycledetectedforpath'${e.path}'andrealpath'${i}'`);return}s.push(i)}return n})}};var Sa0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function VAe(t,e){return Sa0(this,void 0,void 0,function*(){return yield _D.create(t,e)})}var tq=v(require("crypto"),1),eh=v(require("fs"),1),E2=v(require("path"),1),Lde=v(xde(),1),_de=v(require("util"),1);var Gz;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Gz||(Gz={}));var Zr;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Zr||(Zr={}));var Bn;(function(t){t.GNU="gnu",t.BSD="bsd"})(Bn||(Bn={}));var ZD=2,eq=5e3,V_=5e3,j_=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,Wde=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Hz="cache.tar",$_="manifest.txt",Uit=10*Math.pow(1024,3);var Zb=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},Rp0=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={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),n(a,c,o.done,o.value)})}}function n(i,o,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},o)}},wp0="1.0";function Xz(){return Zb(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let s;t?s=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?s="/Users":s="/home",e=E2.join(s,"actions","temp")}let r=E2.join(e,tq.randomUUID());return yield zu(r),r})}function Ba(t){return eh.statSync(t).size}function Y_(t){return Zb(this,void 0,void 0,function*(){var e,r,s,n,i;let o=[],a=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),c=yield VAe(t.join(`
`),{implicitDescendants:!1});try{for(var u=!0,p=Rp0(c.globGenerator()),l;l=yield p.next(),e=l.done,!e;u=!0){n=l.value,u=!1;let b=E2.relative(a,n).replace(new RegExp(`\\${E2.sep}`,"g"),"/");w(`Matched:${b}`),b===""?o.push("."):o.push(`${b}`)}}catch(d){r={error:d}}finally{try{!u&&!e&&(s=p.return)&&(yield s.call(p))}finally{if(r)throw r.error}}return o})}function Vz(t){return Zb(this,void 0,void 0,function*(){return _de.promisify(eh.unlink)(t)})}function Qde(t){return Zb(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),w(`Checking${e}${r.join(" ")}`);try{yield En(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>s+=n.toString(),stderr:n=>s+=n.toString()}})}catch(n){w(n.message)}return s=s.trim(),w(s),s})}function jz(){return Zb(this,void 0,void 0,function*(){let t=yield Qde("zstd",["--quiet"]),e=Lde.clean(t);return w(`zstdversion:${e}`),t===""?Zr.Gzip:Zr.ZstdWithoutLong})}function Bl(t){return t===Zr.Gzip?Gz.Gzip:Gz.Zstd}function Pde(){return Zb(this,void 0,void 0,function*(){return eh.existsSync(j_)?j_:(yield Qde("tar")).toLowerCase().includes("gnu tar")?or("tar"):""})}function J_(t,e){if(e===void 0)throw Error(`Expected${t}butvaluewasundefiend`);return e}function th(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(wp0),tq.createHash("sha256").update(s.join("|")).digest("hex")}function kde(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var Rh=v(require("fs"),1),jme=require("url");var Da=class extends Error{constructor(e){super(e),this.name="AbortError"}};var Ude=require("node:os"),Gde=v(require("node:util"),1),Hde=v(require("node:process"),1);function Xde(t,...e){Hde.default.stderr.write(`${Gde.default.format(t,...e)}${Ude.EOL}`)}var Vde=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,$de,K_=[],Z_=[],sq=[];Vde&&eQ(Vde);var Yde=Object.assign(t=>Jde(t),{enable:eQ,enabled:tQ,disable:Np0,log:Xde});function eQ(t){$de=t,K_=[],Z_=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?Z_.push(r.substring(1)):K_.push(r);for(let r of sq)r.enabled=tQ(r.namespace)}function tQ(t){if(t.endsWith("*"))return!0;for(let e of Z_)if(jde(t,e))return!1;for(let e of K_)if(jde(t,e))return!0;return!1}function jde(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let d=[],b="";for(let M of e)M==="*"&&b==="*"||(b=M,d.push(M));r=d.join("")}let s=0,n=0,i=r.length,o=t.length,a=-1,c=-1;for(;s<o&&n<i;)if(r[n]==="*"){if(a=n,n++,n===i)return!0;for(;t[s]!==r[n];)if(s++,s===o)return!1;c=s,s++,n++;continue}else if(r[n]===t[s])n++,s++;else if(a>=0){if(n=a+1,s=c+1,s===o)return!1;for(;t[s]!==r[n];)if(s++,s===o)return!1;c=s,s++,n++;continue}else return!1;let u=s===t.length,p=n===r.length,l=n===r.length-1&&r[n]==="*";return u&&(p||l)}function Np0(){let t=$de||"";return eQ(""),t}function Jde(t){let e=Object.assign(r,{enabled:tQ(t),destroy:Sp0,log:Yde.log,namespace:t,extend:Fp0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return sq.push(e),e}function Sp0(){let t=sq.indexOf(this);return t>=0?(sq.splice(t,1),!0):!1}function Fp0(t){let e=Jde(`${this.namespace}:${t}`);return e.log=this.log,e}var rh=Yde;var rQ=["verbose","info","warning","error"],Kde={verbose:400,info:300,warning:200,error:100};function Zde(t,e){e.log=(...r)=>{t.log(...r)}}function efe(t){return rQ.includes(t)}function nq(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,s,n=rh(t.namespace);n.log=(...p)=>{rh.log(...p)};function i(p){if(p&&!efe(p))throw new Error(`Unknownloglevel'${p}'.Acceptablevalues:${rQ.join(",")}`);s=p;let l=[];for(let d of e)o(d)&&l.push(d.namespace);rh.enable(l.join(","))}r&&(efe(r)?i(r):console.error(`${t.logLevelEnvVarName}settounknownloglevel'${r}';loggingisnotenabled.Acceptablevalues:${rQ.join(", ")}.`));function o(p){return!!(s&&Kde[p.level]<=Kde[s])}function a(p,l){let d=Object.assign(p.extend(l),{level:l});if(Zde(p,d),o(d)){let b=rh.disable();rh.enab
${Lp0.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function cq(t){return t instanceof es?!0:C2(t)&&t.name==="RestError"}function xs(t,e){return Buffer.from(t,e)}var uq=v(require("node:http"),1),pq=v(require("node:https"),1),aQ=v(require("node:zlib"),1),ofe=require("node:stream");var Mi=$z("ts-http-runtime");var _p0={};function Yz(t){return t&&typeof t.pipe=="function"}function ife(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function afe(t){return t&&typeof t.byteLength=="number"}var lq=class extends ofe.Transform{loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(n){s(n)}}constructor(e){super(),this.progressCallback=e}},cQ=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Da("The operation was aborted. Request has already been canceled.");s=u=>{u.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let u=new Ro;Mi.info(`requestto'${u.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),o=i?.includes("gzip")||i?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let u=Up0(a);u!==null&&e.headers.set("Content-Length",u)}let c;try{if(a&&e.onUploadProgress){let M=e.onUploadProgress,g=new lq(M);g.on("error",y=>{Mi.error("Error in upload progress",y)}),Yz(a)?a.pipe(g):g.end(a),a=g}let u=await this.makeRequest(e,r,a);n!==void 0&&clearTimeout(n);let p=Qp0(u),d={status:u.statusCode??0,headers:p,request:e};if(e.method==="HEAD")return u.resume(),d;c=o?Pp0(u,p):u;let b=e.onDownloadProgress;if(b){let M=new lq(b);M.on("error",g=>{Mi.error("Error in download progress",g)}),c.pipe(M),c=M}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=c:d.bodyAsText=await kp0(c),d}finally{if(e.abortSignal&&s){let u=Promise.resolve();Yz(a)&&(u=ife(a));let p=Promise.resolve();Yz(c)&&(p=ife(c)),Promise.all([u,p]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(l=>{Mi.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,s){let n=new URL(e.url),i=n.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,u)=>{let p=i?uq.default.request(a,c):pq.default.request(a,c);p.once("error",l=>{u(new es(l.message,{code:l.code??es.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new Da("The operation was aborted. Rejecting from abort signal callback while making request.");p.destroy(l),u(l)}),s&&Yz(s)?s.pipe(p):s?typeof s=="string"||Buffer.isBuffer(s)?p.end(s):afe(s)?p.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Mi.error("Unrecognized body type",s),u(new es("Unrecognized body type"))):p.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?uq.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new uq.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return pq.default.globalAgent;let n=e.tlsSettings??_p0,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(Mi.info("No cached TLS Agent exist, creating a new Agent"),i=new pq.default.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function Qp0(t){let e=Dn();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(
`;return e}function OA0(t){return t instanceof Uint8Array?t.byteLength:Tq(t)?t.size===-1?void 0:t.size:void 0}function EA0(t){let e=0;for(let r of t){let s=OA0(r);if(s===void 0)return;e+=s}return e}async function yA0(t,e,r){let s=[xs(`--${r}`,"utf-8"),...e.flatMap(i=>[xs(`\r
`&&t[i]!=="\r";i++)c+=t[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!ud0(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",$t("InvalidTag",l,ts(t,i))}let u=nd0(t,i);if(u===!1)return $t("InvalidAttr","Attributes for '"+c+"' have open quote.",ts(t,i));let p=u.value;if(i=u.index,p[p.length-1]==="/"){let l=i-p.length;p=p.substring(0,p.length-1);let d=she(p,e);if(d===!0)s=!0;else return $t(d.err.code,d.err.msg,ts(t,l+d.err.line))}else if(a)if(u.tagClosed){if(p.trim().length>0)return $t("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",ts(t,o));if(r.length===0)return $t("InvalidTag","Closing tag '"+c+"' has not been opened.",ts(t,o));{let l=r.pop();if(c!==l.tagName){let d=ts(t,l.tagStartPos);return $t("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+c+"'.",ts(t,o))}r.length==0&&(n=!0)}}else return $t("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",ts(t,i));else{let l=she(p,e);if(l!==!0)return $t(l.err.code,l.err.msg,ts(t,i-p.length+l.err.line));if(n===!0)return $t("InvalidXml","Multiple possible root nodes found.",ts(t,i));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=rhe(t,i);continue}else if(t[i+1]==="?"){if(i=the(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=ad0(t,i);if(l==-1)return $t("InvalidChar","char '&' is not expected.",ts(t,i));i=l}else if(n===!0&&!ehe(t[i]))return $t("InvalidXml","Extra text at the end",ts(t,i));t[i]==="<"&&i--}}else{if(ehe(t[i]))continue;return $t("InvalidChar","char '"+t[i]+"' is not expected.",ts(t,i))}if(s){if(r.length==1)return $t("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ts(t,r[0].tagStartPos));if(r.length>0)return $t("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return $t("InvalidXml","Start tag expected.",1);return!0}function ehe(t){return t===" "||t===" "||t===`
`||t==="\r"}function the(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let s=t.substr(r,e-r);if(e>5&&s==="xml")return $t("InvalidXml","XML declaration allowed only at the start of the document.",ts(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function rhe(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}var rd0='"',sd0="'";function nd0(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===rd0||t[e]===sd0)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){n=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:n}}var id0=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function she(t,e){let r=Zq(t,id0),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return $t("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",AO(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return $t("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",AO(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return $t("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",AO(r[n]));let i=r[n][2];if(!cd0(i))return $t("InvalidAttr","Attribute '"+i+"' is an invalid name.",AO(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return $t("InvalidAttr","Attribute '"+i+"'isrepeated.",AO(r[n]))}return!0}function od0(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}function ad0(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,od0(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}function $t(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function cd0(t){return dh(t)}function ud0(t){return dh(t)}function ts(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function AO(t){return t.startIndex+t[1].length}var pd0={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0};function nhe(t){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:t.maxEntitySize??1e4,maxExpansionDepth:t.maxExpansionDepth??10,maxTotalExpansions:t.maxTotalExpansions??1e3,maxExpandedLength:t.maxExpandedLength??1e5,maxEntityCount:t.maxEntityCount??100,allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:nhe(!0)}var ihe=function(t){let e=Object.assign({},pd0,t);return e.processEntities=nhe(e.processEntities),e};var tI;typeof Symbol!="function"?tI="@@xmlMetadata":tI=Symbol("XMLNodeMetadata");var _s=class{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.
`);let e=new _s("!xml"),r=e,s="",n="";this.entityExpansionCount=0,this.currentExpandedLength=0;let i=new fO(this.options.processEntities);for(let o=0;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="/"){let c=F2(t,">",o,"Closing Tag is not closed."),u=t.substring(o+2,c).trim();if(this.options.removeNSPrefix){let d=u.indexOf(":");d!==-1&&(u=u.substr(d+1))}this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&(s=this.saveTextToParentTag(s,r,n));let p=n.substring(n.lastIndexOf(".")+1);if(u&&this.options.unpairedTags.indexOf(u)!==-1)throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${u}>`);let l=0;p&&this.options.unpairedTags.indexOf(p)!==-1?(l=n.lastIndexOf(".",n.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=n.lastIndexOf("."),n=n.substring(0,l),r=this.tagsNodeStack.pop(),s="",o=c}else if(t[o+1]==="?"){let c=pP(t,o,!1,"?>");if(!c)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,r,n),!(this.options.ignoreDeclaration&&c.tagName==="?xml"||this.options.ignorePiTags)){let u=new _s(c.tagName);u.add(this.options.textNodeName,""),c.tagName!==c.tagExp&&c.attrExpPresent&&(u[":@"]=this.buildAttributesMap(c.tagExp,n,c.tagName)),this.addChild(r,u,n,o)}o=c.closeIndex+1}else if(t.substr(o+1,3)==="!--"){let c=F2(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){let u=t.substring(o+4,c-2);s=this.saveTextToParentTag(s,r,n),r.add(this.options.commentPropName,[{[this.options.textNodeName]:u}])}o=c}else if(t.substr(o+1,2)==="!D"){let c=i.readDocType(t,o);this.docTypeEntities=c.entities,o=c.i}else if(t.substr(o+1,2)==="!["){let c=F2(t,"]]>",o,"CDATA is not closed.")-2,u=t.substring(o+9,c);s=this.saveTextToParentTag(s,r,n);let p=this.parseTextData(u,r.tagname,n,!0,!1,!0,!0);p==null&&(p=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:u}]):r.add(this.options.textNodeName,p),o=c+2}else{let c=pP(t,o,this.options.removeNSPrefix),u=c.tagName,p=c.rawTagName,l=c.tagExp,d=c.attrExpPresent,b=c.closeIndex;if(this.options.transformTagName){let y=this.options.transformTagName(u);l===u&&(l=y),u=y}if(this.options.strictReservedNames&&(u===this.options.commentPropName||u===this.options.cdataPropName))throw new Error(`Invalid tag name: ${u}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,n,!1));let M=r;M&&this.options.unpairedTags.indexOf(M.tagname)!==-1&&(r=this.tagsNodeStack.pop(),n=n.substring(0,n.lastIndexOf("."))),u!==e.tagname&&(n+=n?"."+u:u);let g=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,n,u)){let y="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)u[u.length-1]==="/"?(u=u.substr(0,u.length-1),n=n.substr(0,n.length-1),l=u):l=l.substr(0,l.length-1),o=c.closeIndex;else if(this.options.unpairedTags.indexOf(u)!==-1)o=c.closeIndex;else{let B=this.readStopNodeData(t,p,b+1);if(!B)throw new Error(`Unexpected end of ${p}`);o=B.i,y=B.tagContent}let O=new _s(u);u!==l&&d&&(O[":@"]=this.buildAttributesMap(l,n,u)),y&&(y=this.parseTextData(y,u,n,!0,d,!0,!0)),n=n.substr(0,n.lastIndexOf(".")),O.add(this.options.textNodeName,y),this.addChild(r,O,n,g)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){if(u[u.length-1]==="/"?(u=u.substr(0,u.length-1),n=n.substr(0,n.length-1),l=u):l=l.substr(0,l.length-1),this.options.transformTagName){let O=this.options.transformTagName(u);l===u&&(l=O),u=O}let y=new _s(u);u!==l&&d&&(y[":@"]=this.buildAttributesMap(l,n,u)),this.addChild(r,y,n,g),n=n.substr(0,n.lastIndexOf("."))}else if(this.options.unpairedTags.indexOf(u)!==-1){let y=new _s(u);u!==l&&d&&(y[":@"]=this.buildAttributesMap(l,n)),this.addChild(r,y,n,g),n=n.substr(0,n.lastIndexOf(".")),o=c.closeIndex;continue}else{let y=new _s(u);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),u!==l&&d&&(y[":@"]=this.buildAttributesMap(l,n,u)),this.addChild(r,y,n,g),r=y}s="",o=b}}else s+=t[o];return e.child};function Bd0(t,e,r,s){this.options.captureMetaData||(s=void 0);let n=this.options.updateTag(e.tagname,r,e[":@"]);n===!1||(typeof n=="string"&&(e.tagname=n),t.
`),uhe(t,e,"",r)}function uhe(t,e,r,s){let n="",i=!1;if(!Array.isArray(t)){if(t!=null){let o=t.toString();return o=fP(o,e),o}return""}for(let o=0;o<t.length;o++){let a=t[o],c=Td0(a);if(c===void 0)continue;let u="";if(r.length===0?u=c:u=`${r}.${c}`,c===e.textNodeName){let M=a[c];vd0(u,e)||(M=e.tagValueProcessor(c,M),M=fP(M,e)),i&&(n+=s),n+=M,i=!1;continue}else if(c===e.cdataPropName){i&&(n+=s),n+=`<![CDATA[${a[c][0][e.textNodeName]}]]>`,i=!1;continue}else if(c===e.commentPropName){n+=s+`<!--${a[c][0][e.textNodeName]}-->`,i=!0;continue}else if(c[0]==="?"){let M=che(a[":@"],e),g=c==="?xml"?"":s,y=a[c][0][e.textNodeName];y=y.length!==0?" "+y:"",n+=g+`<${c}${y}${M}?>`,i=!0;continue}let p=s;p!==""&&(p+=e.indentBy);let l=che(a[":@"],e),d=s+`<${c}${l}`,b=uhe(a[c],e,u,p);e.unpairedTags.indexOf(c)!==-1?e.suppressUnpairedNode?n+=d+">":n+=d+"/>":(!b||b.length===0)&&e.suppressEmptyNode?n+=d+"/>":b&&b.endsWith(">")?n+=d+`>${b}${s}</${c}>`:(n+=d+">",b&&s!==""&&(b.includes("/>")||b.includes("</"))?n+=s+e.indentBy+b+s:n+=b,n+=`</${c}>`),i=!0}return n}function Td0(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let s=e[r];if(Object.prototype.hasOwnProperty.call(t,s)&&s!==":@")return s}}function che(t,e){let r="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let n=e.attributeValueProcessor(s,t[s]);n=fP(n,e),n===!0&&e.suppressBooleanAttributes?r+=`${s.substr(e.attributeNamePrefix.length)}`:r+=`${s.substr(e.attributeNamePrefix.length)}="${n}"`}return r}function vd0(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let r=t.substr(t.lastIndexOf(".")+1);for(let s in e.stopNodes)if(e.stopNodes[s]===t||e.stopNodes[s]==="*."+r)return!0;return!1}function fP(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let s=e.entities[r];t=t.replace(s.regex,s.val)}return t}function hP(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}var xd0={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Fa(t){this.options=Object.assign({},xd0,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=hP(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=_d0),this.processTextOrObjNode=Wd0,this.options.format?(this.indentate=Ld0,this.tagEndChar=`>
`}),s}getCanonicalizedResourceString(e){let r=uI(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=pI(e.url),i={};if(n){let o=[];for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)){let c=a.toLowerCase();i[c]=n[a],o.push(c)}o.sort();for(let a of o)s+=`
${a}:${decodeURIComponent(i[a])}`}return s}};var Rt=class extends v2{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new gO(e,r,this)}computeHMACSHA256(e){return(0,Mhe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var g1=Ra("storage-common");var Oi;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Oi||(Oi={}));var Sl={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Oi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Xd0=new wn("The operation was aborted."),zO=class extends Ta{retryOptions;constructor(e,r,s=Sl){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Sl.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Sl.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Sl.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Sl.maxRetryDelayInMs):Sl.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Sl.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Sl.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let n=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;i||(n.url=cI(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=Nl(n.url,qu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(g1.info(`RetryPolicy:=====>Try=${s}${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,s,o))return o;r=r||!i&&o.status===404}catch(a){if(g1.error(`RetryPolicy:Caughterror,message:${a.message},code:${a.code}`),!this.shouldRetry(i,s,o,a))throw a}return await this.delay(i,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,n){if(r>=this.retryOptions.maxTries)return g1.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(let o of i)if(n.name.toUpperCase().includes(o)||n.message.toUpperCase().includes(o)||n.code&&n.code.toString().toUpperCase()===o)return g1.info(`RetryPolicy:Networkerror${o}found,willretry.`),!0}if(s||n){let o=s?s.status:n?n.statusCode:0;if(!e&&o===404)return g1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return g1.info(`RetryPolicy:Willretryforstatuscode${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(_e.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return n?.code==="PARSE_ERROR"&&n?.message.startsWith('Error "Error: Unclosed root tag')?(g1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let n=0;if(e)switch(this.retryOptions.retryPolicyType){case Oi.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Oi.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return g1.info(`RetryPolicy:Delayfor${n}ms`),lI(n,s,Xd0)}};var OO=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new zO(e,r,this.retryOptions)}};var Vd0="storageBrowserPolicy";function mhe(){return{name:Vd0,async sendRequest(t,e){return q0||((t.method==="GET"||t.method==="HEAD")&&(t.url=Nl(t.url,qu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(_e.COOKIE),t.headers.delete(_e.CONTENT_LENGTH)),e(t)}}}var jd0="StorageCorrectContentLengthPolicy";function ghe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(_e.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:jd0,async send
`}),a}function n(i){let o=uI(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=pI(i.url),u={};if(c){let p=[];for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let d=l.toLowerCase();u[d]=c[l],p.push(d)}p.sort();for(let l of p)a+=`
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new vo(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}function sh0(t,e){if(t=G2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ja.parse(t.permissions.toString()).toString():n=Ka.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",U2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new vo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function nh0(t,e){if(t=G2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ja.parse(t.permissions.toString()).toString():n=Ka.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",U2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new vo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function ih0(t,e){if(t=G2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ja.parse(t.permissions.toString()).toString():n=Ka.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",U2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new vo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}function oh0(t,e){if(t=G2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ja.parse(t.permissions.toString()).toString():n=Ka.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",U2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new vo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function ah0(t,e){if(t=G2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ja.parse(t.permissions.toString()).toString():n=Ka.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",U2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new vo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function ch0(t,e){if(t=G2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ja.parse(t.permissions.toString()).toString():n=Ka.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",U2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?To(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new vo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function U2(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function G2(t){let e=t.version?t.version:bI;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var TO=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let s=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=s.container):(this._isContainer=!1,this._containerOrBlobOperation=s.blob),r||(r=uh()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==wo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ze.withSpan("BlobLeaseClient-acquireLease",r,async s=>Be(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:s.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==wo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ze.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=Be(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,n})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==wo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==wo||e.conditions?.tagConditions))throw new RangeError("The IfMatch,
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"}};qh.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var j2=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
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"}};j2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var GO=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var mM0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},dU=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);x(`Sent ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Tme(t,e,r){return mM0(this,void 0,void 0,function*(){var s;let n=new xu(t),i=n.getBlockBlobClient(),o=new dU((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),w(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new z5(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw O0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var xme=v(require("buffer"),1),Za=v(require("fs"),1),Wme=v(require("stream"),1),Lme=v(require("util"),1);var O5=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function E5(t){return t?t>=200&&t<300:!1}function gM0(t){return t?t>=500:!0}function zM0(t){return t?[At.BadGateway,At.ServiceUnavailable,At.GatewayTimeout].includes(t):!1}function OM0(t){return O5(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function vme(t,e,r){return O5(this,arguments,void 0,function*(s,n,i,o=ZD,a=eq,c=void 0){let u="",p=1;for(;p<=o;){let l,d,b=!1;try{l=yield n()}catch(M){c&&(l=c(M)),b=!0,u=M.message}if(l&&(d=i(l),!gM0(d)))return l;if(d&&(b=zM0(d),u=`Cache service responded with ${d}`),w(`${s} - Attempt ${p} of ${o} failed with error: ${u}`),!b){w(`${s} - Error is not retryable`);break}yield OM0(a),p++}throw Error(`${s} failed: ${u}`)})}function HO(t,e){return O5(this,arguments,void 0,function*(r,s,n=ZD,i=eq){return yield vme(r,s,o=>o.statusCode,n,i,o=>{if(o instanceof ma)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function Ih(t,e){return O5(this,arguments,void 0,function*(r,s,n=ZD,i=eq){return yield vme(r,s,o=>o.message.statusCode,n,i)})}var Di=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function EM0(t,e){return Di(this,void 0,void 0,function*(){yield Lme.promisify(Wme.pipeline)(t.message,e)})}var y5=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.s
Othercacheswithsimilarkey:`);for(let a of i?.artifactCaches||[])w(`CacheKey:${a?.cacheKey},CacheVersion:${a?.cacheVersion},CacheScope:${a?.scope},CacheCreated:${a?.creationTime}`)}}})}function MU(t,e,r){return ks(this,void 0,void 0,function*(){let s=new jme.URL(t),n=kme(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield Qme(t,e,n):n.concurrentBlobDownloads?yield _me(t,e,n):yield C5(t,e):yield C5(t,e)})}function Yme(t,e,r){return ks(this,void 0,void 0,function*(){let s=hU(),n=th(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield HO("reserveCache",()=>ks(this,void 0,void 0,function*(){return s.postJson(VO("caches"),i)}))})}function Vme(t,e){return`bytes${t}-${e}/*`}function wM0(t,e,r,s,n){return ks(this,void 0,void 0,function*(){w(`Uploadingchunkofsize${n-s+1}bytesatoffset${s}withcontentrange:${Vme(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":Vme(s,n)},o=yield Ih(`uploadChunk(start:${s},end:${n})`,()=>ks(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!E5(o.message.statusCode))throw new Error(`Cacheservicerespondedwith${o.message.statusCode}duringuploadchunk.`)})}function NM0(t,e,r,s){return ks(this,void 0,void 0,function*(){let n=Ba(r),i=VO(`caches/${e.toString()}`),o=Rh.openSync(r,"r"),a=fU(s),c=J_("uploadConcurrency",a.uploadConcurrency),u=J_("uploadChunkSize",a.uploadChunkSize),p=[...new Array(c).keys()];w("Awaiting all uploads");let l=0;try{yield Promise.all(p.map(()=>ks(this,void 0,void 0,function*(){for(;l<n;){let d=Math.min(n-l,u),b=l,M=l+d-1;l+=u,yield wM0(t,i,()=>Rh.createReadStream(r,{fd:o,start:b,end:M,autoClose:!1}).on("error",g=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${g.message}`)}),b,M)}})))}finally{Rh.closeSync(o)}})}function SM0(t,e,r){return ks(this,void 0,void 0,function*(){let s={size:r};return yield HO("commitCache",()=>ks(this,void 0,void 0,function*(){return t.postJson(VO(`caches/${e.toString()}`),s)}))})}function mU(t,e,r,s){return ks(this,void 0,void 0,function*(){if(fU(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Tme(r,e,s)}else{let i=hU();w("Upload cache"),yield NM0(i,t,e,s),w("Commiting cache");let o=Ba(e);x(`CacheSize:~${Math.round(o/(1024*1024))}MB(${o}B)`);let a=yield SM0(i,t,o);if(!E5(a.statusCode))throw new Error(`Cacheservicerespondedwith${a.statusCode}duringcommitcache.`);x("Cache saved successfully")}})}var Gge=v(Wge(),1),Zt=v(Kt(),1),vn=v(Kt(),1),Z2=v(Kt(),1),ed=v(Kt(),1),td=v(Kt(),1);var AG=v(Kt(),1),dG=v(Kt(),1),Pge=v(Kt(),1),kge=v(Kt(),1),Uge=v(Kt(),1);var uG=v(Kt(),1),pG=v(Kt(),1),Lge=v(Kt(),1),_ge=v(Kt(),1),Qge=v(Kt(),1),lG=class extends Qge.MessageType{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,_ge.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Lge.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknownfield${a}(wiretype${c})for${this.typeName}`);let p=e.skip(c);u!==!1&&(u===!0?pG.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,uG.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,uG.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?pG.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},lR=new lG;var fG=class extends Uge.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>lR}])}create(e){let r={repositoryId:"0",scope:[]};
`));let s=yield RG(r,"create");yield wG(s,t)})}var Xh=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},Lo=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Hh=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},bR=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function jge(t){if(!t||t.length===0)throw new Lo("Path Validation Error: At least one directory or file path is required")}function FG(t){if(t.length>512)throw new Lo(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Lo(`KeyValidationError:${t}cannotcontaincommas.`)}function TG(){return XO()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function $ge(t,e,r,s){return Xh(this,arguments,void 0,function*(n,i,o,a,c=!1){let u=XO();return w(`Cacheserviceversion:${u}`),jge(n),u==="v2"?yield Vg0(n,i,o,a,c):yield Xg0(n,i,o,a,c)})}function Xg0(t,e,r,s){return Xh(this,arguments,void 0,function*(n,i,o,a,c=!1){o=o||[];let u=[i,...o];if(w("Resolved Keys:"),w(JSON.stringify(u)),u.length>10)throw new Lo("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of u)FG(d);let p=yield jz(),l="";try{let d=yield $me(u,n,{compressionMethod:p,enableCrossOsArchive:c});if(!d?.archiveLocation)return;if(a?.lookupOnly)return x("Lookup only - skipping download"),d.cacheKey;l=u3.join(yield Xz(),Bl(p)),w(`ArchivePath:${l}`),yield MU(d.archiveLocation,l,a),pi()&&(yield c3(l,p));let b=Ba(l);return x(`CacheSize:~${Math.round(b/(1024*1024))}MB(${b}B)`),yield NG(l,p),x("Cache restored successfully"),d.cacheKey}catch(d){let b=d;if(b.name===Lo.name)throw d;b instanceof ma&&typeof b.statusCode=="number"&&b.statusCode>=500?Gb(`Failedtorestore:${d.message}`):O0(`Failedtorestore:${d.message}`)}finally{try{yield Vz(l)}catch(d){w(`Failedtodeletearchive:${d}`)}}})}function Vg0(t,e,r,s){return Xh(this,arguments,void 0,function*(n,i,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let u=[i,...o];if(w("Resolved Keys:"),w(JSON.stringify(u)),u.length>10)throw new Lo("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of u)FG(l);let p="";try{let l=IG(),d=yield jz(),b={key:i,restoreKeys:o,version:th(n,d,c)},M=yield l.GetCacheEntryDownloadURL(b);if(!M.ok){w(`Cachenotfoundforversion${b.version}ofkeys:${u.join(", ")}`);return}if(b.key!==M.matchedKey?x(`Cachehitforrestore-key:${M.matchedKey}`):x(`Cachehitfor:${M.matchedKey}`),a?.lookupOnly)return x("Lookup only - skipping download"),M.matchedKey;p=u3.join(yield Xz(),Bl(d)),w(`Archivepath:${p}`),w(`Startingdownloadofarchiveto:${p}`),yield MU(M.signedDownloadUrl,p,a);let y=Ba(p);return x(`CacheSize:~${Math.round(y/(1024*1024))}MB(${y}B)`),pi()&&(yield c3(p,d)),yield NG(p,d),x("Cache restored successfully"),M.matchedKey}catch(l){let d=l;if(d.name===Lo.name)throw l;d instanceof ma&&typeof d.statusCode=="number"&&d.statusCode>=500?Gb(`Failedtorestore:${l.message}`):O0(`Failedtorestore:${l.message}`)}finally{try{p&&(yield Vz(p))}catch(l){w(`Failedtodeletearchive:${l}`)}}})}function vG(t,e,r){return Xh(this,arguments,void 0,function*(s,n,i,o=!1){let a=XO();return w(`Cacheserviceversion:${a}`),jge(s),FG(n),a==="v2"?yield $g0(s,n,i,o):yield jg0(s,n,i,o)})}function jg0(t,e,r){return Xh(this,arguments,void 0,function*(s,n,i,o=!1){var a,c,u,p,l;let d=yield jz(),b=-1,M=yield Y_(s);if(w("Cache Paths:"),w(`${JSON.stringify(M)}`),M.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let g=yield Xz(),y=u3.join(g,Bl(d));w(`ArchivePath:${y}`);try{yie
`+t.errors.map(e=>`-${e.message}`).join(`
`)}var Gz0=class extends Error{constructor(t,e,r){super(Uz0(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},Hz0=["method","baseUrl","url","headers","request","query","mediaType","operationName"],Xz0=["query","method","url"],xze=/\/api\/v3\/?$/;function Vz0(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 o in r)if(Xz0.includes(o))return Promise.reject(new Error(`[@octokit/graphql]"${o}"cannotbeusedasvariablename`))}let s=typeof e=="string"?Object.assign({query:e},r):e,n=Object.keys(s).reduce((o,a)=>Hz0.includes(a)?(o[a]=s[a],o):(o.variables||(o.variables={}),o.variables[a]=s[a],o),{}),i=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return xze.test(i)&&(n.url=i.replace(xze,"/api/graphql")),t(n).then(o=>{if(o.data.errors){let a={};for(let c of Object.keys(o.headers))a[c]=o.headers[c];throw new Gz0(n,a,o.data)}return o.data.data})}function VG(t,e){let r=t.defaults(e);return Object.assign((n,i)=>Vz0(r,n,i),{defaults:VG.bind(null,r),endpoint:r.endpoint})}var hEt=VG(d3,{headers:{"user-agent":`octokit-graphql.js/${kz0}${Pl()}`},method:"POST",url:"/graphql"});function Wze(t){return VG(t,{method:"POST",url:"/graphql"})}var jG="(?:[a-zA-Z0-9_-]+)",Lze="\\.",_ze=new RegExp(`^${jG}${Lze}${jG}${Lze}${jG}$`),jz0=_ze.test.bind(_ze);async function $z0(t){let e=jz0(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),s=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":s?"user-to-server":"oauth"}}function Yz0(t){return t.split(/\./).length===3?`bearer${t}`:`token${t}`}async function Jz0(t,e,r,s){let n=e.endpoint.merge(r,s);return n.headers.authorization=Yz0(t),e(n)}var Qze=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($z0.bind(null,e),{hook:Jz0.bind(null,e)})};var $G="7.0.6";var Pze=()=>{},Kz0=console.warn.bind(console),Zz0=console.error.bind(console);function eO0(t={}){return typeof t.debug!="function"&&(t.debug=Pze),typeof t.info!="function"&&(t.info=Pze),typeof t.warn!="function"&&(t.warn=Kz0),typeof t.error!="function"&&(t.error=Zz0),t}var kze=`octokit-core.js/${$G}${Pl()}`,IR=class{static VERSION=$G;static defaults(e){return class extends this{constructor(...s){let n=s[0]||{};if(typeof e=="function"){super(e(n));return}super(Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent}${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static plugins=r.concat(e.filter(n=>!r.includes(n)))}}constructor(e={}){let r=new bze.Collection,s={baseUrl:d3.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(s.headers["user-agent"]=e.userAgent?`${e.userAgent}${kze}`:kze,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=d3.defaults(s),this.graphql=Wze(this.request).defaults(s),this.log=eO0(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...o}=e,a=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));r.wrap("request",a.hook),this.auth=a}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=Qze(e.auth);r.wrap("request",i.hook),this.auth=i}let n=this.constructor;for(let i=0;i<n.plugins.length;++i)Object.assign(this,n.plugins[i](this,e))}request;graphql;log;hook;auth};var YG="17.0.0";var tO0={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /or
Moreinfo:${c.url}`);let b=c.range&&c.range.length>0?c.range[0]?.start.line:void 0,M=!1;for(let g of o)if(g.remote||g.path.endsWith(u)&&g.content===p){a.push({title:l,message:d,file:g.path,startLine:b}),M=!0;break}M||w(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${u}:${l}`)}return a}};var kl=v(require("fs"),1),SH=v(require("path"),1);var XR=class t{buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new Y0,this.iidFilename=`build-iidfile-${S0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${S0.generateRandomString()}.json`}getImageIDFilePath(){return SH.default.join(R0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(kl.default.existsSync(e))return kl.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return SH.default.join(R0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!kl.default.existsSync(e))return;let r=kl.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,s]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${s}`}static resolveSecretFile(e){let[r,s]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${s}`}static resolveSecretEnv(e){let[r,s]=t.parseSecretKvp(e);return`id=${r},env=${s}`}static resolveSecret(e,r){let[s,n]=t.parseSecretKvp(e,r?.redact),i=R0.tmpName({tmpdir:R0.tmpDir()});if(r?.asFile){if(!kl.default.existsSync(n))throw new Error(`secretfile${n}notfound`);kl.default.copyFileSync(n,i)}else kl.default.writeFileSync(i,n);return[s,i]}static getProvenanceInput(e){let r=yn(e);if(!r)return r;try{return zpe(e)?`builder-id=${m0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${m0.workflowRunURL(!0)}`;let r=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of r)if(s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${m0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",o=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let a of o){let c=a.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());c[0]==="type"?s=c[1]:c[0]==="repository"?n=c[1]:c[0]==="ghtoken"&&(i=c[1])}return s==="gha"&&(n||(e=`${e},repository=${m0.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let s=A1(r.join(`
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s){if(n.length==1&&!n[0].startsWith("type="))return e=="local";for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0}return!1}static hasAttestationType(e,r){let s=A1(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s)for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0;return!1}static resolveAttestationAttrs(e){let r=A1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let o=S0.parseBool(i);s.push(`disabled=${!o}`)}catch{s.push(i)}return s.join(",")}static hasGitAuthTokenSecret(e,r){for(let s of e){if(r&&s.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(s.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let s=e.indexOf("="),n=e.substring(0,s),i=e.substring(s+1);if(n.length==0||i.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&ga(i),[n,i]}};var FH=v(require("fs"),1),AEe=v(require("path"),1);var VR=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new Y0,this.metadataFilename=`bake-metadata-${S0.generateRandomString()}.json`}getMetadataFilePath(){return AEe.default.join(R0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!FH.default.existsSync(e))return;let r=FH.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let s in e)"buildx.build.ref"in e[s]&&r.push(e[s]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let s=["bake"],n,i=[],o=[...e.files||[],e.source];if(o){for(let c of o.map(u=>u?u.trim():""))if(c.length!=0){if(!S0.isValidRef(c)){i.push(c);continue}if(n)throw new Error("Only one remote bake definition can be defined");n=c}}n&&s.push(n);for(let c of i)s.push("--file",c);if(e.overrides)for(let c of e.overrides)s.push("--set",c);if(e.allow)for(let c of e.allow)s.push("--allow",c);e.call&&s.push("--call",e.call),e.load&&s.push("--load"),e.noCache&&s.push("--no-cache"),e.provenance&&s.push("--provenance",e.provenance),e.push&&s.push("--push"),e.sbom&&s.push("--sbom",e.sbom);let a=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await Te.getExecOutput(a.command,a.args,r).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${c.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(c.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let n=r.target[s];n.attest&&Array.isArray(n.attest)&&(n.attest=n.attest.map(i=>t.parseAttestEntry(i))),n["cache-from"]&&Array.isArray(n["cache-from"])&&(n["cache-from"]=n["cache-from"].map(i=>t.parseCacheEntry(i))),n["cache-to"]&&Array.isArray(n["cache-to"])&&(n["cache-to"]=n["cache-to"].map(i=>t.parseCacheEntry(i))),n.output&&Array.isArray(n.output)&&(n.output=n.output.map(i=>t.parseExportEntry(i))),n.secret&&Array.isArray(n.secret)&&(n.secret=n.secret.map(i=>t.parseSecretEntry(i))),n.ssh&&Array.isArray(n.ssh)&&(n.ssh=n.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());switch(i){case"type":r.type=o;break;case"disabled":r.disabled=S0.parseBool(o);break;default:r[i]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());i==="type"?r.type=o:r[i]=o}ret
${u}`),await new Promise(p=>setTimeout(p,Math.pow(2,o)*100));else throw i}else throw new Error(`Cosignverifycommandfailedwith:${a.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);x(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await ar(`Signing${i}`,async()=>{let o=n[i],a=CA.default.join(CA.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){O0(`Nosubjectsfoundinprovenance${i},skipsigning.`);return}let u=await t.signPayload({data:o,type:g6e},s),p=t.parseBundle(u);x("Provenance blob signed for:");for(let l of c){let[d,b]=Object.entries(l.digest)[0]||[];x(`-${l.name}(${d}:${b})`)}p.tlogID&&x(`AttestationsignatureuploadedtoRekortransparencylog:${af}?logIndex=${p.tlogID}`),x(`WritingSigstorebundleto:${a}`),Qc.default.writeFileSync(a,JSON.stringify(p.payload,null,2),{encoding:"utf-8"}),r[i]={...p,bundlePath:a,subjects:c}})}catch(s){throw new Error(`SigningBuildKitprovenanceblobsfailed:${s.message}`)}return r}async verifySignedArtifacts(e,r){let s={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[n,i]of Object.entries(e)){let o=CA.default.dirname(n);await ar(`Verifyingsignaturebundle${i.bundlePath}`,async()=>{for(let a of i.subjects){let c=CA.default.join(o,a.name);x(`Verifyingsignedartifact${c}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let p=await Te.getExecOutput("cosign",[...u,"--bundle",i.bundlePath,c],{ignoreReturnCode:!0});if(p.stderr.length>0&&p.exitCode!=0)throw new Error(p.stderr);s[c]={bundlePath:i.bundlePath,cosignArgs:u}}})}return s}async verifyArtifact(e,r,s){x("Verifying keyless verification bundle signature");let n=JSON.parse(Qc.default.readFileSync(r,"utf-8")),i=(0,Fy.bundleFromJSON)(n);x("Fetching Sigstore TUF trusted root metadata");let o=await C6e.getTrustedRoot(),a=(0,Nm.toTrustMaterial)(o);try{x("Verifying artifact signature");let c=(0,Nm.toSignedEntity)(i,Qc.default.readFileSync(e)),u=t.parseCertificate(i),p=i.verificationMaterial.tlogEntries,l=p.length>0?p[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let M=u.subjectAltName?.replace(/^uri:/i,"");if(M){if(!M.match(s.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${M}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let b=new Nm.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return w(`Sigstore.verifyArtifactsigner:${JSON.stringify(b)}`),{payload:n,certificate:u.toString(),tlogID:l}}catch(c){throw new Error(`Failedtoverifyartifactsignature:${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),x(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:z6e,rekorURL:e?void 0:O6e,tsaServerURL:E6e}}static noTransparencyLog(e){return e??m0.context.payload.repository?.private}static getProvenanceBlobs(e){let r=CA.default.join(e.localExportDir,"provenance.json");if(Qc.default.existsSync(r))return{[r]:Qc.default.readFileSync(r)};let s=Qc.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>Qc.default.existsSync(CA.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let o of n){let a=CA.default.join(e.localExportDir,o.name,"
`,bakeTarget:yn("bake-target")||"docker-metadata-action",githubToken:yn("github-token")}}async function w6e(t,e){switch(t){case"workflow":return await bk0(e);case"git":return await hk0();default:throw new Error(`Invalidcontextsource:${t}`)}}async function bk0(t){let e=m0.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 Mk0(e.sha,t),...e}}async function hk0(){let t=await Pu.context();return{commitDate:await Pu.commitDate(t.sha),...t}}async function Mk0(t,e){let r=m0.context.payload;if(r.commits){let s=r.commits.find(n=>n.id===t)?.timestamp;if(s)return new Date(s)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let s=await e.github.octokit.rest.repos.getCommit({owner:m0.context.repo.owner,repo:m0.context.repo.repo,ref:t});if(s.data.commit.committer?.date)return new Date(s.data.commit.committer.date);throw new Error("Committer date not found")}catch(s){return w(`FailedtogetcommitdatefromGitHubAPI:${s.message}`),new Date}}var Xp=v(OTe(),1),dUe=v(require("fs"),1),fUe=v(require("path"),1),UC=v(qTe(),1),ei=v(cUe(),1),ug=v(Fi(),1);function pUe(t){let e=[];if(t.length==1){let r=!1,s=A1(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let i=n.toString().split("=").map(o=>o.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return uUe(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=A1(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of n){let o=i.toString().split("=").map(a=>a.trim());if(o.length==1)s.name=o[0];else{let a=o[0].toLowerCase(),c=o[1];switch(a){case"name":{s.name=c;break}case"enable":{if(!["true","false"].includes(c))throw new Error(`Invalidenableattributevalue:${r}`);s.enable=/true/i.test(c);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(s.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(s)}return uUe(e)}function uUe(t){h2("Processing images input");for(let e of t)x(`name=${e.name},enable=${e.enable}`);return M2(),t}var Hte=(c=>(c.Schedule="schedule",c.Semver="semver",c.Pep440="pep440",c.Match="match",c.Edge="edge",c.Ref="ref",c.Raw="raw",c.Sha="sha",c))(Hte||{}),yv=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(yv||{}),Cv=(r=>(r.Short="short",r.Long="long",r))(Cv||{}),Gte=class{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(",")}},e1t={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function lUe(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let s of t)e.push(t1t(s));let r=e.sort((s,n)=>Number(s.attrs.priority)<Number(n.attrs.priority)?1:Number(s.attrs.priority)>Number(n.attrs.priority)?-1:0);h2("Processing tags input");for(let s of r)x(s.toString());return M2(),r}function t1t(t){let e=A1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new Gte;for(let s of e){let n=s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(n.length==1)r.attrs.value=n[0];else{let i=n[0].toLowerCase(),o=n[1];switch(i){case"type":{if(!Object.values(Hte).includes(o))throw new Error(`Unknowntagtypeattribute:${o}`);r.type=o;break}default:{r.attrs[i]=o;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.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing