varDX=Object.create;varEm=Object.defineProperty;varSX=Object.getOwnPropertyDescriptor;varkX=Object.getOwnPropertyNames;varFX=Object.getPrototypeOf,LX=Object.prototype.hasOwnProperty;varVe=(t,e)=>()=>(t&&(e=t(t=0)),e);varf=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),f0=(t,e)=>{for(varAine)Em(t,A,{get:e[A],enumerable:!0})},M8=(t,e,A,r)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofkX(e))!LX.call(t,i)&&i!==A&&Em(t,i,{get:()=>e[i],enumerable:!(r=SX(e,i))||r.enumerable});returnt};var$n=(t,e,A)=>(A=t!=null?DX(FX(t)):{},M8(e||!t||!t.__esModule?Em(A,"default",{value:t,enumerable:!0}):A,t)),ea=t=>M8(Em({},"__esModule",{value:!0}),t);varfm=f(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.toCommandProperties=Sc.toCommandValue=void0;functionTX(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}Sc.toCommandValue=TX;functionUX(t){returnObject.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}Sc.toCommandProperties=UX});varq8=f(bi=>{"use strict";varMX=bi&&bi.__createBinding||(Object.create?function(t,e,A,r){r===void0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){returne[A]}})}:function(t,e,A,r){r===void0&&(r=A),t[r]=e[A]}),OX=bi&&bi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),PX=bi&&bi.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varAint)A!=="default"&&Object.hasOwnProperty.call(t,A)&&MX(e,t,A);returnOX(e,t),e};Object.defineProperty(bi,"__esModule",{value:!0});bi.issue=bi.issueCommand=void0;var_X=PX(require("os")),P8=fm();function_8(t,e,A){letr=newC0(t,e,A);process.stdout.write(r.toString()+_X.EOL)}bi.issueCommand=_8;functionqX(t,e=""){_8(t,{},e)}bi.issue=qX;varO8="::",C0=class{constructor(e,A,r){e||(e="missing.command"),this.command=e,this.properties=A,this.message=r}toString(){lete=O8+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letA=!0;for(letrinthis.properties)if(this.properties.hasOwnProperty(r)){leti=this.properties[r];i&&(A?A=!1:e+=",",e+=`${r}=${GX(i)}`)}}returne+=`${O8}${HX(this.message)}`,e}};functionHX(t){returnP8.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}functionGX(t){returnP8.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});functionQp(){returnCm>Bm.length-16&&(H8.default.randomFillSync(Bm),Cm=0),Bm.slice(Cm,Cm+=16)}varH8,Bm,Cm,B0=Ve(()=>{H8=$n(require("crypto")),Bm=newUint8Array(256),Cm=Bm.length});varG8,Y8=Ve(()=>{G8=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});functionYX(t){returntypeoft=="string"&&G8.test(t)}varta,Ip=Ve(()=>{Y8();ta=YX});functionJX(t,e=0){letA=(OA[t[e+0]]+OA[t[e+1]]+OA[t[e+2]]+OA[t[e+3]]+"-"+OA[t[e+4]]+OA[t[e+5]]+"-"+OA[t[e+6]]+OA[t[e+7]]+"-"+OA[t[e+8]]+OA[t[e+9]]+"-"+OA[t[e+10]]+OA[t[e+11]]+OA[t[e+12]]+OA[t[e+13]]+OA[t[e+14]]+OA[t[e+15]]).toLowerCase();if(!ta(A))throwTypeError("Stringified UUID is invalid");returnA}varOA,Aa,yp=Ve(()=>{Ip();OA=[];for(lett=0;t<256;++t)OA.push((t+256).toString(16).substr(1));Aa=JX});functionVX(t,e,A){letr=e&&A||0,i=e||newArray(16);t=t||{};lets=t.node||J8,n=t.clockseq!==void0?t.clockseq:Q0;if(s==null||n==null){letp=t.random||(t.rng||Qp)();s==null&&(s=J8=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),n==null&&(n=Q0=(p[6]<<8|p[7])&16383)}leta=t.msecs!==void0?t.msecs:Date.now(),o=t.nsecs!==void0?t.nsecs:y0+1,c=a-I0+(o-y0)/1e4;if(c<0&&t.clockseq===void0&&(n=n+1&16383),(c<0||a>I0)&&t.nsecs===void0&&(o=0),o>=1e4)thrownewError("uuid.v1(): Can't create more than 10M uuids/sec");I0=a,y0=o,Q0=n,a+=122192928e5;letl=((a&268435455)*1e4+o)%4294967296;i[r++]=l>>>24&255,i[r++]=l>>>16&255,i[r++]=l>>>8&255,i[r++]=l&255;letd=a/4294967296*1e4&268435455;i[r++]=d>>>8&255,i[r++]=d&255,i[r++]=d>>>24&15|16,i[r++]=d>>>16&255,i[r+
`),aZ=function(){};function Zi(t){if(!(this instanceof Zi))return new Zi(t);if(Z0.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new rZ(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}tZ(Zi,Z0);Zi.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else Z0.prototype.emit.apply(this,arguments)};Zi.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new W5(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(nZ),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};Zi.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Zi.prototype.setBoundary=function(t){let e=this;this._bparser=new AZ(`\r
`),t.replace(/\r?\n/g,e)}function $$(t){return SN&&t instanceof SN||t instanceof vp||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}TN.exports={File:vp,FileLike:pQ,isFileLike:$$}});var _m=f((fxe,_N)=>{"use strict";var{isBlobLike:Pm,toUSVString:eee,makeIterator:uQ}=xi(),{kState:ZA}=cn(),{File:PN,FileLike:UN,isFileLike:tee}=Om(),{webidl:st}=lr(),{Blob:Aee,File:gQ}=require("buffer"),MN=gQ??PN,Hc=class t{constructor(e){if(e!==void 0)throw st.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[ZA]=[]}append(e,A,r=void 0){if(st.brandCheck(this,t),st.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!Pm(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=st.converters.USVString(e),A=Pm(A)?st.converters.Blob(A,{strict:!1}):st.converters.USVString(A),r=arguments.length===3?st.converters.USVString(r):void 0;let i=ON(e,A,r);this[ZA].push(i)}delete(e){st.brandCheck(this,t),st.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=st.converters.USVString(e),this[ZA]=this[ZA].filter(A=>A.name!==e)}get(e){st.brandCheck(this,t),st.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=st.converters.USVString(e);let A=this[ZA].findIndex(r=>r.name===e);return A===-1?null:this[ZA][A].value}getAll(e){return st.brandCheck(this,t),st.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=st.converters.USVString(e),this[ZA].filter(A=>A.name===e).map(A=>A.value)}has(e){return st.brandCheck(this,t),st.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=st.converters.USVString(e),this[ZA].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(st.brandCheck(this,t),st.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!Pm(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=st.converters.USVString(e),A=Pm(A)?st.converters.Blob(A,{strict:!1}):st.converters.USVString(A),r=arguments.length===3?eee(r):void 0;let i=ON(e,A,r),s=this[ZA].findIndex(n=>n.name===e);s!==-1?this[ZA]=[...this[ZA].slice(0,s),i,...this[ZA].slice(s+1).filter(n=>n.name!==e)]:this[ZA].push(i)}entries(){return st.brandCheck(this,t),uQ(()=>this[ZA].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return st.brandCheck(this,t),uQ(()=>this[ZA].map(e=>[e.name,e.value]),"FormData","key")}values(){return st.brandCheck(this,t),uQ(()=>this[ZA].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(st.brandCheck(this,t),st.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};Hc.prototype[Symbol.iterator]=Hc.prototype.entries;Object.defineProperties(Hc.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function ON(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(tee(e)||(e=e instanceof Aee?new MN([e],"blob",{type:e.type}):new UN(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=gQ&&e instanceof gQ||e instanceof PN?new MN([e],A,r):new UN(e,A,r)}return{name:t,value:e}}_N.exports={FormData:Hc}});var Dp=f((Cxe,jN)=>{"use strict";var ree=uN(),Gc=He(),{ReadableStreamFrom:iee,isBlobLike:qN,isReadableStreamLike:see,readableStreamClose:nee,createDeferredPromise:aee,fullyReadBody:oee}=xi(),{FormData:HN}=_m(),{kState:dn}=cn(),{webidl:mQ}=lr(),{DOMException:JN,structuredClone:cee}=na(),{Blob:lee,File:dee}=require("buffer"),{kBodyUsed:pee}=St(),hQ=require("assert"),{isErrored:uee}=He(),{isUint8Array:VN,isArrayBuffer:gee}=require("util/types"),{File:mee}=Om(),{parseMIMEType:hee,serializeAMimeType:Eee}=$i(),ln=globalThis.ReadableStream,GN=dee??mee;function zN(t,e=!1){ln||(ln=require("stream/web").ReadableStream);let A=null;t instanceof ln?A=t:qN(t)?A=t.stream():A=new ln({async pull(o){o.enqueue(typeof i=="string"?new Tex
`);u.push(B,N,g),typeof N.size=="number"?s+=B.byteLength+N.size+g.byteLength:m=!0}let C=p.encode(`--${o}--`);u.push(C),s+=C.byteLength,m&&(s=null),i=t,r=async function*(){for(let Q of u)Q.stream?yield*Q.stream():yield Q},n="multipart/form-data; boundary="+o}else if(qN(t))i=t,s=t.size,t.type&&(n=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Gc.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof ln?t:iee(t)}if((typeof i=="string"||Gc.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;A=new ln({async start(){o=r(t)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):uee(A)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:A,source:i,length:s},n]}function fee(t,e=!1){return ln||(ln=require("stream/web").ReadableStream),t instanceof ln&&(hQ(!Gc.isDisturbed(t),"The body has already been consumed."),hQ(!t.locked,"The stream is locked.")),zN(t,e)}function Cee(t){let[e,A]=t.stream.tee(),r=cee(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}async function*YN(t){if(t)if(VN(t))yield t;else{let e=t.stream;if(Gc.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[pee]=!0,yield*e}}function EQ(t){if(t.aborted)throw new JN("The operation was aborted.","AbortError")}function Bee(t){return{blob(){return qm(this,A=>{let r=wee(this);return r==="failure"?r="":r&&(r=Eee(r)),new lee([A],{type:r})},t)},arrayBuffer(){return qm(this,A=>new Uint8Array(A).buffer,t)},text(){return qm(this,WN,t)},json(){return qm(this,yee,t)},async formData(){mQ.brandCheck(this,t),EQ(this[dn]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new HN,s;try{s=new ree({headers:r,preservePath:!0})}catch(a){throw new JN(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let m=u.length-u.length%4;p.push(Buffer.from(u.slice(0,m),"base64")),u=u.slice(m)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new GN(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new GN(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of YN(this[dn].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of YN(this[dn].body)){if(!VN(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new HN;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),EQ(this[dn]),mQ.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}function Qee(t){Object.assign(t.prototype,Bee(t))}async function qm(t,e,A){if(mQ.brandCheck(t,A),EQ(t[dn]),Iee(t[dn].body))throw new TypeError("Body is unusable");let r=aee(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return t[dn].body==null?(s(new Uint8Array),r.promise):(await oee(t[dn].body,s,i),r.promise)}function Iee(t){return t!=null&&(t.stream.locked||Gc.isDisturbed(t.stream))}function WN(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),new TextDecoder().decode(t))}function yee(t){return JSON.parse(WN(t))}function wee(t){let{headersList:e}=t[dn],A=e.get("content-type");return A===null?"failure":hee(A)}jN.exports={extractBody:zN,safelyExtractBody:fee,cloneBody:Cee,mixinBody:Qee}});var $N=f((Bxe,ZN)=>{"use strict";var{InvalidArgumentError:Et,NotSupportedError:bee}=ht(),pn=require("assert"),{kHTTP2BuildRequest:Nee,
`);Xr.validateHandler(m,r,c),this.servername=Xr.getServerName(this.host),this[un]=m,lA.create.hasSubscribers&&lA.create.publish({request:this})}onBodySent(e){if(this[un].onBodySent)try{this[un].onBodySent(e)}catch(A){this.onError(A)}}onRequestSent(){lA.bodySent.hasSubscribers&&lA.bodySent.publish({request:this})}onConnect(e){return pn(!this.aborted),pn(!this.completed),this[un].onConnect(e)}onHeaders(e,A,r,i){return pn(!this.aborted),pn(!this.completed),lA.headers.hasSubscribers&&lA.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}}),this[un].onHeaders(e,A,r,i)}onData(e){return pn(!this.aborted),pn(!this.completed),this[un].onData(e)}onUpgrade(e,A,r){return pn(!this.aborted),pn(!this.completed),this[un].onUpgrade(e,A,r)}onComplete(e){return pn(!this.aborted),this.completed=!0,lA.trailers.hasSubscribers&&lA.trailers.publish({request:this,trailers:e}),this[un].onComplete(e)}onError(e){if(lA.error.hasSubscribers&&lA.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[un].onError(e)}addHeader(e,A){return Sp(this,e,A),this}static[Ree](e,A,r){return new t(e,A,r)}static[Nee](e,A,r){let i=A.headers;A={...A,headers:null};let s=new t(e,A,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new Et("headers array must be even");for(let n=0;n<i.length;n+=2)Sp(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];Sp(s,o,i[o],!0)}}else if(i!=null)throw new Et("headers must be an object or an array");return s}static[xee](e){let A=e.split(`\r
`),r={};for(let i of A){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function mo(t,e,A){if(e&&typeof e=="object")throw new Et(`invalid${t}header`);if(e=e!=null?`${e}`:"",KN.exec(e)!==null)throw new Et(`invalid${t}header`);return A?e:`${t}:${e}\r
`}function Sp(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new Et(`invalid${e}header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(KN.exec(A)!==null)throw new Et(`invalid${e}header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new Et("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=mo(e,A,r):t.headers+=mo(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new Et("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new Et("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new Et("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new Et("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new bee("expect header not supported");if(XN.exec(e)===null)throw new Et("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${mo(e,A[i],r)}`:t.headers[e]=mo(e,A[i],r):t.headers+=mo(e,A[i]);else r?t.headers[e]=mo(e,A,r):t.headers+=mo(e,A)}}}ZN.exports=CQ});var Hm=f((Qxe,ex)=>{"use strict";var Dee=require("events"),BQ=class extends Dee{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};ex.exports=BQ});var Fp=f((Ixe,tx)=>{"use strict";var See=Hm(),{ClientDestroyedError:QQ,ClientClosedError:kee,InvalidArgumentError:Yc}=ht(),{kDestroy:Fee,kClose:Lee,kDispatch:IQ,kInterceptors:ho}=St(),Jc=Symbol("destroyed"),kp=Symbol("closed"),gn=Symbol("onDestroyed"),Vc=Symbol("onClosed"),Gm=Symbol("Intercepted Dispatch"),yQ=class extends See{constructor(){super(),this[Jc]=!1,this[gn]=null,this[kp]=!1,this[Vc]=[]}get destroyed(){return this[Jc]}get closed(){return this[kp]}get interceptors(){return this[ho]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[ho][A]!="function")throw new Yc("interceptor must be an function")}this[ho]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new Yc("invalid callback");if(this[Jc]){queueMicrotask(()=>e(new QQ,null));return}if(this[kp]){this[Vc]?this[Vc].push(e):queueMicrotask(()=>e(null,null));return}this[kp]=!0,this[Vc].push(e);let A=()=>{let r=this[Vc];this[Vc]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[Lee]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof A!="function")throw new Yc("invalid callback");if(this[Jc]){this[gn]?this[gn].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new QQ),this[Jc]=!0,this[gn]=this[gn]||[],this[gn].push(A);let r=()=>{let i=this[gn];this[gn]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[Fee](e).then(()=>{queueMicrotask(r)})}[Gm](e,A){if(!this[ho]||this[ho].length===0)return this[Gm]=this[IQ],this[IQ](e,A);let r=this[IQ].bind(this);for(let i=this[ho].length-1;i>=0;i--)r=this[ho][i](r);return this[Gm]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new Yc("handler must be an object");try{if(!e||typeof e!="object")throw new Yc("opts must be an object.");if(this[Jc]||this[gn])throw new QQ;if(this[kp])throw new kee;return this[Gm](e,A)}catch(r){if(typeof A.onError!="function")throw new Yc("invalid onError method");return A.onError(r),!1}}};tx.exports=yQ});var Lp=f((bxe,ix)=>{"use strict";var Tee=require("net"),Ax=require("assert"),rx=He(),{InvalidArgumentError:Uee,ConnectTimeoutError:Mee}=ht(),wQ,bQ;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?bQ=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(
`,a&&(u+=a),$A.sendHeaders.hasSubscribers&&$A.sendHeaders.publish({request:e,headers:u,socket:p}),A?ne.isBuffer(A)?(Z(d===A.byteLength,"buffer body must have content length"),p.cork(),p.write(`${u}content-length:${d}\r
`,"latin1"):(Z(d===null,"no body must not have content length"),p.write(`${u}\r
`,"latin1")),e.onRequestSent()),!0}function Pte(t,e,A){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=A,d;if(typeof l=="string"?d=kQ[Bte](l.trim()):d=l,a)return HA(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(N=>{A.aborted||A.completed||HA(t,A,N||new _Q)})}catch(N){HA(t,A,N)}if(A.aborted)return!1;let p,u=t[Km];if(d[Ite]=n||t[wx],d[yte]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[wte]=s,d[bte]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=ne.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!g)&&(m=null),A.contentLength!=null&&A.contentLength!==m){if(t[_p])return HA(t,A,new mn),!1;process.emitWarning(new mn)}m!=null&&(Z(r,"no body must not have content length"),d[Nte]=`${m}`),e.ref();let C=i==="GET"||i==="HEAD";return o?(d[xte]="100-continue",p=e.request(d,{endStream:C,signal:c}),p.once("continue",Q)):(p=e.request(d,{endStream:C,signal:c}),Q()),++u.openStreams,p.once("response",N=>{A.onHeaders(Number(N[Rte]),N,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",N=>{A.onData(N)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(N){t[Zr]&&!t[Zr].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ne.destroy(p,N))}),p.once("frameError",(N,B)=>{let h=new ws(`HTTP/2:"frameError"received-type${N},code${B}`);HA(t,A,h),t[Zr]&&!t[Zr].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ne.destroy(p,h))}),!0;function Q(){r?ne.isBuffer(r)?(Z(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):ne.isBlobLike(r)?typeof r.stream=="function"?$m({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:g,body:r.stream(),socket:t[qt],header:""}):Dx({body:r,client:t,request:A,contentLength:m,expectsPayload:g,h2stream:p,header:"",socket:t[qt]}):ne.isStream(r)?vx({body:r,client:t,request:A,contentLength:m,expectsPayload:g,socket:t[qt],h2stream:p,header:""}):ne.isIterable(r)?$m({body:r,client:t,request:A,contentLength:m,expectsPayload:g,header:"",h2stream:p,socket:t[qt]}):Z(!1):A.onRequestSent()}}function vx({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if(Z(s!==0||A[Ut]===0,"stream body cannot be pipelined"),A[Ns]==="h2"){let m=function(C){r.onBodySent(C)},g=Ate(e,t,C=>{C?(ne.destroy(e,C),ne.destroy(t,C)):r.onRequestSent()});g.on("data",m),g.once("end",()=>{g.removeListener("data",m),ne.destroy(g)});return}let o=!1,c=new eh({socket:i,request:r,contentLength:s,client:A,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(m){ne.destroy(this,m)}},d=function(){o||e.resume&&e.resume()},p=function(){u(new _Q)},u=function(g){if(!o){if(o=!0,Z(i.destroyed||i[hn]&&A[Ut]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(m){g=m}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?ne.destroy(e,g):ne.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function Dx({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){Z(s===e.size,"blob body must have content length");let o=A[Ns]==="h2";try{if(s!=null&&s!==e.size)throw new mn;let c=Buffer.from(await e.arrayBuffer());o?(t.cork(),t.write(c),t.uncork()):(i.cork(),i.write(`${n}content-length:${s}\r
\r
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[dr]=!0),$r(A)}catch(c){ne.destroy(o?t:i,c)}}async function $m({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){Z(s!==0||A[Ut]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{Z(o===null),i[qA]?u(i[qA]):o=p});if(A[Ns]==="h2"){t.on("close",c).on("drain",c);try{for await(let p of e){if(i[qA])throw i[qA];let u=t.write(p);r.onBodySent(p),u||await l()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new eh({socket:i,request:r,contentLength:s,client:A,expectsPayload:a,header:n});try{for await(let p of e){if(i[qA])throw i[qA];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var eh=class{constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[hn]=!0}write(e){let{socket:A,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(A[qA])throw A[qA];if(A.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[_p])throw new mn;process.emitWarning(new mn)}A.cork(),n===0&&(a||(A[dr]=!0),i===null?A.write(`${o}transfer-encoding:chunked\r
globstarwhile`,t,l,e,d,p),this.matchOne(t.slice(l),e.slice(d),A))return this.debug("globstar found match!",l,n,p),!0;if(p==="."||p===".."||!r.dot&&p.charAt(0)==="."){this.debug("dot detected!",t,l,e,d);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(A&&(this.debug(`
>>>nomatch,partial?`,t,l,e,d),l===n))}var u;if(typeof o=="string"?(u=c===o,this.debug("string match",o,c,u)):(u=c.match(o),this.debug("pattern match",o,c,u)),!u)return!1}if(i===n&&s===a)return!0;if(i===n)return A;if(s===a)return i===n-1&&t[i]==="";throw new Error("wtf?")};function $ce(t){return t.replace(/\\(.)/g,"$1")}function ele(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var G7=f(Ti=>{"use strict";var tle=Ti&&Ti.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),Ale=Ti&&Ti.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),H7=Ti&&Ti.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&tle(e,t,A);return Ale(e,t),e},rle=Ti&&Ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.Path=void 0;var uu=H7(require("path")),Ba=H7(h1()),gu=rle(require("assert")),ile=process.platform==="win32",X2=class{constructor(e){if(this.segments=[],typeof e=="string")if(gu.default(e,"Parameter 'itemPath' must not be empty"),e=Ba.safeTrimTrailingSeparator(e),!Ba.hasRoot(e))this.segments=e.split(uu.sep);else{let A=e,r=Ba.dirname(A);for(;r!==A;){let i=uu.basename(A);this.segments.unshift(i),A=r,r=Ba.dirname(A)}this.segments.unshift(A)}else{gu.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let A=0;A<e.length;A++){let r=e[A];gu.default(r,"Parameter 'itemPath' must not contain any empty segments"),r=Ba.normalizeSeparators(e[A]),A===0&&Ba.hasRoot(r)?(r=Ba.safeTrimTrailingSeparator(r),gu.default(r===Ba.dirname(r),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(r)):(gu.default(!r.includes(uu.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(r))}}}toString(){let e=this.segments[0],A=e.endsWith(uu.sep)||ile&&/^[A-Z]:$/i.test(e);for(let r=1;r<this.segments.length;r++)A?A=!1:e+=uu.sep,e+=this.segments[r];return e}};Ti.Path=X2});var Y7=f(Ui=>{"use strict";var sle=Ui&&Ui.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[A]}})}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),nle=Ui&&Ui.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$2=Ui&&Ui.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.hasOwnProperty.call(t,A)&&sle(e,t,A);return nle(e,t),e},ale=Ui&&Ui.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.Pattern=void 0;var ole=$2(require("os")),mu=$2(require("path")),Pr=$2(h1()),To=ale(require("assert")),cle=q7(),K2=E1(),B1=G7(),Qn=process.platform==="win32",Z2=class t{constructor(e,A=!1,r,i){this.negate=!1;let s;if(typeof e=="string")s=e.trim();else{r=r||[],To.default(r.length,"Parameter 'segments' must not empty");let c=t.getLiteral(r[0]);To.default(c&&Pr.hasAbsoluteRoot(c),"Parameter 'segments' first element must be a root path"),s=new B1.Path(r).toString().trim(),e&&(s=`!${s}`)}for(;s.startsWith("!");)this.negate=!this.negate,s=s.substr(1).trim();s=t.fixupPattern(s,i),this.segments=new B1.Path(s).segments,this.trailingSeparator=Pr.normalizeSeparators(s).endsWith(mu.sep),s=Pr.safeTrimTrailingSeparator(s);let n=!1,a=this.segments.map(c=>t.getLiteral(c)).filter(c=>!n&&!(n=c===""));this.searchPath=new B1.Path(a).toString(),this.rootRegExp=new RegExp(t.regExpEscape(a[0]),Qn?"i":""),this.isImplicitPattern=A;let o={dot:!0,nobrace:!0,nocase:Qn,nocomment:!0,noext:!0,nonegate:!0};s=Qn?s.replace(/\\/g,"/"):s,this.minimatch=new cle.Minimatch(s,o)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Pr.normalizeSeparators(e),!e.endsWith(mu.sep)&&this.isImplici
`),Qpe=function(){};function is(t){if(!(this instanceof is))return new is(t);if(Hy.call(this,t),!t||!t.headerFirst&&typeof t.boundary!="string")throw new TypeError("Boundary required");typeof t.boundary=="string"?this.setBoundary(t.boundary):this._bparser=void 0,this._headerFirst=t.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:t.partHwm},this._pause=!1;let e=this;this._hparser=new Epe(t),this._hparser.on("header",function(A){e._inHeader=!1,e._part.emit("header",A)})}mpe(is,Hy);is.prototype.emit=function(t){if(t==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let A=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(A+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else Hy.prototype.emit.apply(this,arguments)};is.prototype._write=function(t,e,A){if(!this._hparser&&!this._bparser)return A();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new zk(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(t);if(!this._inHeader&&r!==void 0&&r<t.length)t=t.slice(r);else return A()}this._firstWrite&&(this._bparser.push(Bpe),this._firstWrite=!1),this._bparser.push(t),this._pause?this._cb=A:A()};is.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};is.prototype.setBoundary=function(t){let e=this;this._bparser=new hpe(`\r
`),t.replace(/\r?\n/g,e)}function hge(t){return _F&&t instanceof _F||t instanceof Su||t&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&t[Symbol.toStringTag]==="File"}YF.exports={File:Su,FileLike:s4,isFileLike:hge}});var G1=f((Mve,jF)=>{"use strict";var{isBlobLike:H1,toUSVString:Ege,makeIterator:n4}=Oi(),{kState:tr}=wn(),{File:WF,FileLike:JF,isFileLike:fge}=q1(),{webidl:nt}=Er(),{Blob:Cge,File:a4}=require("buffer"),VF=a4??WF,_l=class t{constructor(e){if(e!==void 0)throw nt.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[tr]=[]}append(e,A,r=void 0){if(nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!H1(A))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=nt.converters.USVString(e),A=H1(A)?nt.converters.Blob(A,{strict:!1}):nt.converters.USVString(A),r=arguments.length===3?nt.converters.USVString(r):void 0;let i=zF(e,A,r);this[tr].push(i)}delete(e){nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=nt.converters.USVString(e),this[tr]=this[tr].filter(A=>A.name!==e)}get(e){nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=nt.converters.USVString(e);let A=this[tr].findIndex(r=>r.name===e);return A===-1?null:this[tr][A].value}getAll(e){return nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=nt.converters.USVString(e),this[tr].filter(A=>A.name===e).map(A=>A.value)}has(e){return nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=nt.converters.USVString(e),this[tr].findIndex(A=>A.name===e)!==-1}set(e,A,r=void 0){if(nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!H1(A))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=nt.converters.USVString(e),A=H1(A)?nt.converters.Blob(A,{strict:!1}):nt.converters.USVString(A),r=arguments.length===3?Ege(r):void 0;let i=zF(e,A,r),s=this[tr].findIndex(n=>n.name===e);s!==-1?this[tr]=[...this[tr].slice(0,s),i,...this[tr].slice(s+1).filter(n=>n.name!==e)]:this[tr].push(i)}entries(){return nt.brandCheck(this,t),n4(()=>this[tr].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return nt.brandCheck(this,t),n4(()=>this[tr].map(e=>[e.name,e.value]),"FormData","key")}values(){return nt.brandCheck(this,t),n4(()=>this[tr].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,A=globalThis){if(nt.brandCheck(this,t),nt.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(A,[i,r,this])}};_l.prototype[Symbol.iterator]=_l.prototype.entries;Object.defineProperties(_l.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function zF(t,e,A){if(t=Buffer.from(t).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(fge(e)||(e=e instanceof Cge?new VF([e],"blob",{type:e.type}):new JF(e,"blob",{type:e.type})),A!==void 0){let r={type:e.type,lastModified:e.lastModified};e=a4&&e instanceof a4||e instanceof WF?new VF([e],A,r):new JF(e,A,r)}return{name:t,value:e}}jF.exports={FormData:_l}});var ku=f((Ove,iL)=>{"use strict";var Bge=mF(),ql=qe(),{ReadableStreamFrom:Qge,isBlobLike:XF,isReadableStreamLike:Ige,readableStreamClose:yge,createDeferredPromise:wge,fullyReadBody:bge}=Oi(),{FormData:KF}=G1(),{kState:Nn}=wn(),{webidl:o4}=Er(),{DOMException:eL,structuredClone:Nge}=ba(),{Blob:xge,File:Rge}=require("buffer"),{kBodyUsed:vge}=Ct(),c4=require("assert"),{isErrored:Dge}=qe(),{isUint8Array:tL,isArrayBuffer:Sge}=require("util/types"),{File:kge}=q1(),{parseMIMEType:Fge,serializeAMimeType:Lge}=ss(),bn=globalThis.ReadableStream,ZF=Rge??kge,Y1=new TextEncoder,Tge=new TextDecoder;function AL(t,e=!1){bn||(bn=require("stream/web").ReadableStream);let A=null;t instanceof bn?A=t:XF(t)?A=t.stream():A=new bn({async pul
`);p.push(N,Q,u),typeof Q.size=="number"?s+=N.byteLength+Q.size+u.byteLength:g=!0}let m=Y1.encode(`--${o}--`);p.push(m),s+=m.byteLength,g&&(s=null),i=t,r=async function*(){for(let C of p)C.stream?yield*C.stream():yield C},n="multipart/form-data; boundary="+o}else if(XF(t))i=t,s=t.size,t.type&&(n=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(ql.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");A=t instanceof bn?t:Qge(t)}if((typeof i=="string"||ql.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;A=new bn({async start(){o=r(t)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):Dge(A)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:A,source:i,length:s},n]}function Uge(t,e=!1){return bn||(bn=require("stream/web").ReadableStream),t instanceof bn&&(c4(!ql.isDisturbed(t),"The body has already been consumed."),c4(!t.locked,"The stream is locked.")),AL(t,e)}function Mge(t){let[e,A]=t.stream.tee(),r=Nge(A,{transfer:[A]}),[,i]=r.tee();return t.stream=e,{stream:i,length:t.length,source:t.source}}async function*$F(t){if(t)if(tL(t))yield t;else{let e=t.stream;if(ql.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[vge]=!0,yield*e}}function l4(t){if(t.aborted)throw new eL("The operation was aborted.","AbortError")}function Oge(t){return{blob(){return J1(this,A=>{let r=Hge(this);return r==="failure"?r="":r&&(r=Lge(r)),new xge([A],{type:r})},t)},arrayBuffer(){return J1(this,A=>new Uint8Array(A).buffer,t)},text(){return J1(this,rL,t)},json(){return J1(this,qge,t)},async formData(){o4.brandCheck(this,t),l4(this[Nn]);let A=this.headers.get("Content-Type");if(/multipart\/form-data/.test(A)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new KF,s;try{s=new Bge({headers:r,preservePath:!0})}catch(a){throw new eL(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let m=u.length-u.length%4;p.push(Buffer.from(u.slice(0,m),"base64")),u=u.slice(m)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new ZF(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new ZF(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of $F(this[Nn].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(A)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of $F(this[Nn].body)){if(!tL(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new KF;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),l4(this[Nn]),o4.errors.exception({header:`${t.name}.formData`,message:"Could not parse content as FormData."})}}}function Pge(t){Object.assign(t.prototype,Oge(t))}async function J1(t,e,A){if(o4.brandCheck(t,A),l4(t[Nn]),_ge(t[Nn].body))throw new TypeError("Body is unusable");let r=wge(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return t[Nn].body==null?(s(new Uint8Array),r.promise):(await bge(t[Nn].body,s,i),r.promise)}function _ge(t){return t!=null&&(t.stream.locked||ql.isDisturbed(t.stream))}function rL(t){return t.length===0?"":(t[0]===239&&t[1]===187&&t[2]===191&&(t=t.subarray(3)),Tge.decode(t))}function qge(t){return JSON.parse(rL(t))}function Hge(t){let{headersList:e}=t[Nn],A=e.get("content-type");return A===null?"failure":Fge(A)}iL.exports={extractBody:AL,safelyExtractBody:Uge,cloneBody:Mge,mixinBody:Pge}});var oL=f((Pve,aL)=>{"use strict";var{InvalidArgumentError:Bt,NotSupportedError:Gge}=dt(),xn=require("assert"),{kHTTP2BuildRequest:Yge,kHTTP2CopyHea
`);_r.validateHandler(m,r,c),this.servername=_r.getServerName(this.host),this[ns]=m,pA.create.hasSubscribers&&pA.create.publish({request:this})}onBodySent(e){if(this[ns].onBodySent)try{return this[ns].onBodySent(e)}catch(A){this.abort(A)}}onRequestSent(){if(pA.bodySent.hasSubscribers&&pA.bodySent.publish({request:this}),this[ns].onRequestSent)try{return this[ns].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(xn(!this.aborted),xn(!this.completed),this.error)e(this.error);else return this.abort=e,this[ns].onConnect(e)}onHeaders(e,A,r,i){xn(!this.aborted),xn(!this.completed),pA.headers.hasSubscribers&&pA.headers.publish({request:this,response:{statusCode:e,headers:A,statusText:i}});try{return this[ns].onHeaders(e,A,r,i)}catch(s){this.abort(s)}}onData(e){xn(!this.aborted),xn(!this.completed);try{return this[ns].onData(e)}catch(A){return this.abort(A),!1}}onUpgrade(e,A,r){return xn(!this.aborted),xn(!this.completed),this[ns].onUpgrade(e,A,r)}onComplete(e){this.onFinally(),xn(!this.aborted),this.completed=!0,pA.trailers.hasSubscribers&&pA.trailers.publish({request:this,trailers:e});try{return this[ns].onComplete(e)}catch(A){this.onError(A)}}onError(e){if(this.onFinally(),pA.error.hasSubscribers&&pA.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[ns].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,A){return Fu(this,e,A),this}static[Vge](e,A,r){return new t(e,A,r)}static[Yge](e,A,r){let i=A.headers;A={...A,headers:null};let s=new t(e,A,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new Bt("headers array must be even");for(let n=0;n<i.length;n+=2)Fu(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];Fu(s,o,i[o],!0)}}else if(i!=null)throw new Bt("headers must be an object or an array");return s}static[Jge](e){let A=e.split(`\r
`),r={};for(let i of A){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function qo(t,e,A){if(e&&typeof e=="object")throw new Bt(`invalid${t}header`);if(e=e!=null?`${e}`:"",nL.exec(e)!==null)throw new Bt(`invalid${t}header`);return A?e:`${t}:${e}\r
`}function Fu(t,e,A,r=!1){if(A&&typeof A=="object"&&!Array.isArray(A))throw new Bt(`invalid${e}header`);if(A===void 0)return;if(t.host===null&&e.length===4&&e.toLowerCase()==="host"){if(nL.exec(A)!==null)throw new Bt(`invalid${e}header`);t.host=A}else if(t.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(t.contentLength=parseInt(A,10),!Number.isFinite(t.contentLength))throw new Bt("invalid content-length header")}else if(t.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")t.contentType=A,r?t.headers[e]=qo(e,A,r):t.headers+=qo(e,A);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new Bt("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof A=="string"?A.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new Bt("invalid connection header");i==="close"&&(t.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new Bt("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new Bt("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new Gge("expect header not supported");if(sL.exec(e)===null)throw new Bt("invalid header key");if(Array.isArray(A))for(let i=0;i<A.length;i++)r?t.headers[e]?t.headers[e]+=`,${qo(e,A[i],r)}`:t.headers[e]=qo(e,A[i],r):t.headers+=qo(e,A[i]);else r?t.headers[e]=qo(e,A,r):t.headers+=qo(e,A)}}}aL.exports=p4});var V1=f((_ve,cL)=>{"use strict";var Wge=require("events"),u4=class extends Wge{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};cL.exports=u4});var Tu=f((qve,lL)=>{"use strict";var jge=V1(),{ClientDestroyedError:g4,ClientClosedError:Xge,InvalidArgumentError:Hl}=dt(),{kDestroy:Kge,kClose:Zge,kDispatch:m4,kInterceptors:Ho}=Ct(),Gl=Symbol("destroyed"),Lu=Symbol("closed"),Rn=Symbol("onDestroyed"),Yl=Symbol("onClosed"),z1=Symbol("Intercepted Dispatch"),h4=class extends jge{constructor(){super(),this[Gl]=!1,this[Rn]=null,this[Lu]=!1,this[Yl]=[]}get destroyed(){return this[Gl]}get closed(){return this[Lu]}get interceptors(){return this[Ho]}set interceptors(e){if(e){for(let A=e.length-1;A>=0;A--)if(typeof this[Ho][A]!="function")throw new Hl("interceptor must be an function")}this[Ho]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new Hl("invalid callback");if(this[Gl]){queueMicrotask(()=>e(new g4,null));return}if(this[Lu]){this[Yl]?this[Yl].push(e):queueMicrotask(()=>e(null,null));return}this[Lu]=!0,this[Yl].push(e);let A=()=>{let r=this[Yl];this[Yl]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[Zge]().then(()=>this.destroy()).then(()=>{queueMicrotask(A)})}destroy(e,A){if(typeof e=="function"&&(A=e,e=null),A===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof A!="function")throw new Hl("invalid callback");if(this[Gl]){this[Rn]?this[Rn].push(A):queueMicrotask(()=>A(null,null));return}e||(e=new g4),this[Gl]=!0,this[Rn]=this[Rn]||[],this[Rn].push(A);let r=()=>{let i=this[Rn];this[Rn]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[Kge](e).then(()=>{queueMicrotask(r)})}[z1](e,A){if(!this[Ho]||this[Ho].length===0)return this[z1]=this[m4],this[m4](e,A);let r=this[m4].bind(this);for(let i=this[Ho].length-1;i>=0;i--)r=this[Ho][i](r);return this[z1]=r,r(e,A)}dispatch(e,A){if(!A||typeof A!="object")throw new Hl("handler must be an object");try{if(!e||typeof e!="object")throw new Hl("opts must be an object.");if(this[Gl]||this[Rn])throw new g4;if(this[Lu])throw new Xge;return this[z1](e,A)}catch(r){if(typeof A.onError!="function")throw new Hl("invalid onError method");return A.onError(r),!1}}};lL.exports=h4});var Uu=f((Yve,uL)=>{"use strict";var $ge=require("net"),dL=require("assert"),pL=qe(),{InvalidArgumentError:eme,ConnectTimeoutError:tme}=dt(),E4,f4;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?f4=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(
`,"latin1"):($(p===null,"no body must not have content length"),u.write(`${g}\r
`,"latin1")),e.onRequestSent()):ce.isBuffer(A)?($(p===A.byteLength,"buffer body must have content length"),u.cork(),u.write(`${g}content-length:${p}\r
\r
`,"latin1"),u.write(A),u.uncork(),e.onBodySent(A),e.onRequestSent(),l||(u[fr]=!0)):ce.isBlobLike(A)?typeof A.stream=="function"?rE({body:A.stream(),client:t,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):_L({body:A,client:t,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):ce.isStream(A)?PL({body:A,client:t,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):ce.isIterable(A)?rE({body:A,client:t,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):$(!1),!0}function rhe(t,e,A){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=A,d;if(typeof l=="string"?d=b4[Ome](l.trim()):d=l,a)return Cr(t,A,new Error("Upgrade not supported for H2")),!1;try{A.onConnect(N=>{A.aborted||A.completed||Cr(t,A,N||new F4)})}catch(N){Cr(t,A,N)}if(A.aborted)return!1;let p,u=t[tE];if(d[_me]=n||t[FL],d[qme]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(A.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{A.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[Hme]=s,d[Gme]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let m=ce.bodyLength(r);if(m==null&&(m=A.contentLength),(m===0||!g)&&(m=null),OL(i)&&m>0&&A.contentLength!=null&&A.contentLength!==m){if(t[Hu])return Cr(t,A,new vn),!1;process.emitWarning(new vn)}m!=null&&($(r,"no body must not have content length"),d[Yme]=`${m}`),e.ref();let C=i==="GET"||i==="HEAD";return o?(d[Jme]="100-continue",p=e.request(d,{endStream:C,signal:c}),p.once("continue",Q)):(p=e.request(d,{endStream:C,signal:c}),Q()),++u.openStreams,p.once("response",N=>{let{[Vme]:B,...h}=N;A.onHeaders(Number(B),h,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{A.onComplete([])}),p.on("data",N=>{A.onData(N)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(N){t[ci]&&!t[ci].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ce.destroy(p,N))}),p.once("frameError",(N,B)=>{let h=new Ps(`HTTP/2:"frameError"received-type${N},code${B}`);Cr(t,A,h),t[ci]&&!t[ci].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ce.destroy(p,h))}),!0;function Q(){r?ce.isBuffer(r)?($(m===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),A.onBodySent(r),A.onRequestSent()):ce.isBlobLike(r)?typeof r.stream=="function"?rE({client:t,request:A,contentLength:m,h2stream:p,expectsPayload:g,body:r.stream(),socket:t[Vt],header:""}):_L({body:r,client:t,request:A,contentLength:m,expectsPayload:g,h2stream:p,header:"",socket:t[Vt]}):ce.isStream(r)?PL({body:r,client:t,request:A,contentLength:m,expectsPayload:g,socket:t[Vt],h2stream:p,header:""}):ce.isIterable(r)?rE({body:r,client:t,request:A,contentLength:m,expectsPayload:g,header:"",h2stream:p,socket:t[Vt]}):$(!1):A.onRequestSent()}}function PL({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if($(s!==0||A[Ot]===0,"stream body cannot be pipelined"),A[qs]==="h2"){let m=function(C){r.onBodySent(C)},g=Bme(e,t,C=>{C?(ce.destroy(e,C),ce.destroy(t,C)):r.onRequestSent()});g.on("data",m),g.once("end",()=>{g.removeListener("data",m),ce.destroy(g)});return}let o=!1,c=new iE({socket:i,request:r,contentLength:s,client:A,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(m){ce.destroy(this,m)}},d=function(){o||e.resume&&e.resume()},p=function(){if(o)return;let g=new F4;queueMicrotask(()=>u(g))},u=function(g){if(!o){if(o=!0,$(i.destroyed||i[Dn]&&A[Ot]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(m){g=m}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?ce.destroy(e,g):ce.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function _L({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:s,header:n,ex
\r
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[fr]=!0),li(A)}catch(c){ce.destroy(o?t:i,c)}}async function rE({h2stream:t,body:e,client:A,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){$(s!==0||A[Ot]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{$(o===null),i[VA]?u(i[VA]):o=p});if(A[qs]==="h2"){t.on("close",c).on("drain",c);try{for await(let p of e){if(i[VA])throw i[VA];let u=t.write(p);r.onBodySent(p),u||await l()}}catch(p){t.destroy(p)}finally{r.onRequestSent(),t.end(),t.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new iE({socket:i,request:r,contentLength:s,client:A,expectsPayload:a,header:n});try{for await(let p of e){if(i[VA])throw i[VA];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var iE=class{constructor({socket:e,request:A,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=A,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[Dn]=!0}write(e){let{socket:A,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(A[VA])throw A[VA];if(A.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[Hu])throw new vn;process.emitWarning(new vn)}A.cork(),n===0&&(a||(A[fr]=!0),i===null?A.write(`${o}transfer-encoding:chunked\r
`.trim())}};MU.exports=v6});var YU=f((xDe,GU)=>{"use strict";var{kProxy:xEe,kClose:REe,kDestroy:vEe,kInterceptors:DEe}=Ct(),{URL:PU}=require("url"),_U=Wu(),SEe=Kl(),kEe=Tu(),{InvalidArgumentError:$u,RequestAbortedError:FEe}=dt(),qU=Uu(),Ku=Symbol("proxy agent"),xE=Symbol("proxy client"),Zu=Symbol("proxy headers"),D6=Symbol("request tls settings"),LEe=Symbol("proxy tls settings"),HU=Symbol("connect endpoint function");function TEe(t){return t==="https:"?443:80}function UEe(t){if(typeof t=="string"&&(t={uri:t}),!t||!t.uri)throw new $u("Proxy opts.uri is mandatory");return{uri:t.uri,protocol:t.protocol||"https"}}function MEe(t,e){return new SEe(t,e)}var S6=class extends kEe{constructor(e){if(super(e),this[xEe]=UEe(e),this[Ku]=new _U(e),this[DEe]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new $u("Proxy opts.uri is mandatory");let{clientFactory:A=MEe}=e;if(typeof A!="function")throw new $u("Proxy opts.clientFactory must be a function.");this[D6]=e.requestTls,this[LEe]=e.proxyTls,this[Zu]=e.headers||{};let r=new PU(e.uri),{origin:i,port:s,host:n,username:a,password:o}=r;if(e.auth&&e.token)throw new $u("opts.auth cannot be used in combination with opts.token");e.auth?this[Zu]["proxy-authorization"]=`Basic${e.auth}`:e.token?this[Zu]["proxy-authorization"]=e.token:a&&o&&(this[Zu]["proxy-authorization"]=`Basic${Buffer.from(`${decodeURIComponent(a)}:${decodeURIComponent(o)}`).toString("base64")}`);let c=qU({...e.proxyTls});this[HU]=qU({...e.requestTls}),this[xE]=A(r,{connect:c}),this[Ku]=new _U({...e,connect:async(l,d)=>{let p=l.host;l.port||(p+=`:${TEe(l.protocol)}`);try{let{socket:u,statusCode:g}=await this[xE].connect({origin:i,port:s,path:p,signal:l.signal,headers:{...this[Zu],host:n}});if(g!==200&&(u.on("error",()=>{}).destroy(),d(new FEe(`Proxyresponse(${g})!==200whenHTTPTunneling`))),l.protocol!=="https:"){d(null,u);return}let m;this[D6]?m=this[D6].servername:m=l.servername,this[HU]({...l,servername:m,httpSocket:u},d)}catch(u){d(u)}}})}dispatch(e,A){let{host:r}=new PU(e.origin),i=OEe(e.headers);return PEe(i),this[Ku].dispatch({...e,headers:{...i,host:r}},A)}async[REe](){await this[Ku].close(),await this[xE].close()}async[vEe](){await this[Ku].destroy(),await this[xE].destroy()}};function OEe(t){if(Array.isArray(t)){let e={};for(let A=0;A<t.length;A+=2)e[t[A]]=t[A+1];return e}return t}function PEe(t){if(t&&Object.keys(t).find(A=>A.toLowerCase()==="proxy-authorization"))throw new $u("Proxy-Authorization should be sent in ProxyAgent constructor")}GU.exports=S6});var jU=f((RDe,WU)=>{var Zo=require("assert"),{kRetryHandlerDefaultRetry:JU}=Ct(),{RequestRetryError:RE}=dt(),{isDisturbed:VU,parseHeaders:_Ee,parseRangeHeader:zU}=qe();function qEe(t){let e=Date.now();return new Date(t).getTime()-e}var k6=class t{constructor(e,A){let{retryOptions:r,...i}=e,{retry:s,maxRetries:n,maxTimeout:a,minTimeout:o,timeoutFactor:c,methods:l,errorCodes:d,retryAfter:p,statusCodes:u}=r??{};this.dispatch=A.dispatch,this.handler=A.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:s??t[JU],retryAfter:p??!0,maxTimeout:a??30*1e3,timeout:o??500,timeoutFactor:c??2,maxRetries:n??5,methods:l??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:u??[500,502,503,504,429],errorCodes:d??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(g=>{this.aborted=!0,this.abort?this.abort(g):this.reason=g})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,A,r){this.handler.onUpgrade&&this.handler.onUpgrade(e,A,r)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[JU](e,{state:A,opts:r},i){let{statusCode:s,code:n,headers:a}=e,{method:o,retryOptions:c}=r,{maxRetries:l,timeout:d,maxTimeout:p,timeoutFactor:u,statusCodes:g,errorCodes:m,methods:C}=c,{count
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(vw)});var Ws=f((jP,Oa)=>{(function(){var t,e,A,r,i,s,n,a=[].slice,o={}.hasOwnProperty;t=function(){var c,l,d,p,u,g;if(g=arguments[0],u=2<=arguments.length?a.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(c=0,d=u.length;c<d;c++)if(p=u[c],p!=null)for(l in p)o.call(p,l)&&(g[l]=p[l]);return g},i=function(c){return!!c&&Object.prototype.toString.call(c)==="[object Function]"},s=function(c){var l;return!!c&&((l=typeof c)=="function"||l==="object")},A=function(c){return i(Array.isArray)?Array.isArray(c):Object.prototype.toString.call(c)==="[object Array]"},r=function(c){var l;if(A(c))return!c.length;for(l in c)if(o.call(c,l))return!1;return!0},n=function(c){var l,d;return s(c)&&(d=Object.getPrototypeOf(c))&&(l=d.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},e=function(c){return i(c.valueOf)?c.valueOf():c},Oa.exports.assign=t,Oa.exports.isFunction=i,Oa.exports.isObject=s,Oa.exports.isArray=A,Oa.exports.isEmpty=r,Oa.exports.isPlainObject=n,Oa.exports.getValue=e}).call(jP)});var Dw=f((XP,KP)=>{(function(){var t;KP.exports=t=function(){function e(){}return e.prototype.hasFeature=function(A,r){return!0},e.prototype.createDocumentType=function(A,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(A,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(A){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(A,r){throw new Error("This DOM method is not implemented.")},e}()}).call(XP)});var e_=f((ZP,$P)=>{(function(){var t;$P.exports=t=function(){function e(){}return e.prototype.handleError=function(A){throw new Error(A)},e}()}).call(ZP)});var r_=f((t_,A_)=>{(function(){var t;A_.exports=t=function(){function e(A){this.arr=A||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(A){return this.arr[A]||null},e.prototype.contains=function(A){return this.arr.indexOf(A)!==-1},e}()}).call(t_)});var n_=f((i_,s_)=>{(function(){var t,e,A;e=e_(),A=r_(),s_.exports=t=function(){function r(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new A(Object.keys(this.defaultParams))}}),r.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},r.prototype.canSetParameter=function(i,s){return!0},r.prototype.setParameter=function(i,s){return s!=null?this.params[i]=s:delete this.params[i]},r}()}).call(i_)});var aA=f((a_,o_)=>{(function(){o_.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(a_)});var Sw=f((c_,l_)=>{(function(){var t,e,A;t=aA(),A=Ei(),l_.exports=e=function(){function r(i,s,n){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(n),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(r.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(r.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(r.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defin
`?(I.line++,I.column=0):I.column++);I.textNode+=b.substring(it,U-1)}k==="<"&&!(I.sawRoot&&I.closedRoot&&!I.strict)?(I.state=y.OPEN_WAKA,I.startTagPosition=I.position):(!B(k)&&(!I.sawRoot||I.closedRoot)&&O(I,"Text data outside of root node."),k==="&"?I.state=y.TEXT_ENTITY:I.textNode+=k);continue;case y.SCRIPT:k==="<"?I.state=y.SCRIPT_ENDING:I.script+=k;continue;case y.SCRIPT_ENDING:k==="/"?I.state=y.CLOSE_TAG:(I.script+="<"+k,I.state=y.SCRIPT);continue;case y.OPEN_WAKA:if(k==="!")I.state=y.SGML_DECL,I.sgmlDecl="";else if(!B(k))if(w(m,k))I.state=y.OPEN_TAG,I.tagName=k;else if(k==="/")I.state=y.CLOSE_TAG,I.tagName="";else if(k==="?")I.state=y.PROC_INST,I.procInstName=I.procInstBody="";else{if(O(I,"Unencoded <"),I.startTagPosition+1<I.position){var hA=I.position-I.startTagPosition;k=new Array(hA).join(" ")+k}I.textNode+="<"+k,I.state=y.TEXT}continue;case y.SGML_DECL:(I.sgmlDecl+k).toUpperCase()===l?(v(I,"onopencdata"),I.state=y.CDATA,I.sgmlDecl="",I.cdata=""):I.sgmlDecl+k==="--"?(I.state=y.COMMENT,I.comment="",I.sgmlDecl=""):(I.sgmlDecl+k).toUpperCase()===d?(I.state=y.DOCTYPE,(I.doctype||I.sawRoot)&&O(I,"Inappropriately located doctype declaration"),I.doctype="",I.sgmlDecl=""):k===">"?(v(I,"onsgmldeclaration",I.sgmlDecl),I.sgmlDecl="",I.state=y.TEXT):(h(k)&&(I.state=y.SGML_DECL_QUOTED),I.sgmlDecl+=k);continue;case y.SGML_DECL_QUOTED:k===I.q&&(I.state=y.SGML_DECL,I.q=""),I.sgmlDecl+=k;continue;case y.DOCTYPE:k===">"?(I.state=y.TEXT,v(I,"ondoctype",I.doctype),I.doctype=!0):(I.doctype+=k,k==="["?I.state=y.DOCTYPE_DTD:h(k)&&(I.state=y.DOCTYPE_QUOTED,I.q=k));continue;case y.DOCTYPE_QUOTED:I.doctype+=k,k===I.q&&(I.q="",I.state=y.DOCTYPE);continue;case y.DOCTYPE_DTD:I.doctype+=k,k==="]"?I.state=y.DOCTYPE:h(k)&&(I.state=y.DOCTYPE_DTD_QUOTED,I.q=k);continue;case y.DOCTYPE_DTD_QUOTED:I.doctype+=k,k===I.q&&(I.state=y.DOCTYPE_DTD,I.q="");continue;case y.COMMENT:k==="-"?I.state=y.COMMENT_ENDING:I.comment+=k;continue;case y.COMMENT_ENDING:k==="-"?(I.state=y.COMMENT_ENDED,I.comment=L(I.opt,I.comment),I.comment&&v(I,"oncomment",I.comment),I.comment=""):(I.comment+="-"+k,I.state=y.COMMENT);continue;case y.COMMENT_ENDED:k!==">"?(O(I,"Malformed comment"),I.comment+="--"+k,I.state=y.COMMENT):I.state=y.TEXT;continue;case y.CDATA:k==="]"?I.state=y.CDATA_ENDING:I.cdata+=k;continue;case y.CDATA_ENDING:k==="]"?I.state=y.CDATA_ENDING_2:(I.cdata+="]"+k,I.state=y.CDATA);continue;case y.CDATA_ENDING_2:k===">"?(I.cdata&&v(I,"oncdata",I.cdata),v(I,"onclosecdata"),I.cdata="",I.state=y.TEXT):k==="]"?I.cdata+="]":(I.cdata+="]]"+k,I.state=y.CDATA);continue;case y.PROC_INST:k==="?"?I.state=y.PROC_INST_ENDING:B(k)?I.state=y.PROC_INST_BODY:I.procInstName+=k;continue;case y.PROC_INST_BODY:if(!I.procInstBody&&B(k))continue;k==="?"?I.state=y.PROC_INST_ENDING:I.procInstBody+=k;continue;case y.PROC_INST_ENDING:k===">"?(v(I,"onprocessinginstruction",{name:I.procInstName,body:I.procInstBody}),I.procInstName=I.procInstBody="",I.state=y.TEXT):(I.procInstBody+="?"+k,I.state=y.PROC_INST_BODY);continue;case y.OPEN_TAG:w(C,k)?I.tagName+=k:(Je(I),k===">"?mt(I):k==="/"?I.state=y.OPEN_TAG_SLASH:(B(k)||O(I,"Invalid character in tag name"),I.state=y.ATTRIB));continue;case y.OPEN_TAG_SLASH:k===">"?(mt(I,!0),wr(I)):(O(I,"Forward-slash in opening tag not followed by >"),I.state=y.ATTRIB);continue;case y.ATTRIB:if(B(k))continue;k===">"?mt(I):k==="/"?I.state=y.OPEN_TAG_SLASH:w(m,k)?(I.attribName=k,I.attribValue="",I.state=y.ATTRIB_NAME):O(I,"Invalid attribute name");continue;case y.ATTRIB_NAME:k==="="?I.state=y.ATTRIB_VALUE:k===">"?(O(I,"Attribute without value"),I.attribValue=I.attribName,Tt(I),mt(I)):B(k)?I.state=y.ATTRIB_NAME_SAW_WHITE:w(C,k)?I.attribName+=k:O(I,"Invalid attribute name");continue;case y.ATTRIB_NAME_SAW_WHITE:if(k==="=")I.state=y.ATTRIB_VALUE;else{if(B(k))continue;O(I,"Attribute without value"),I.tag.attributes[I.attribName]="",I.attribValue="",v(I,"onattribute",{name:I.attribName,value:""}),I.attribName="",k===">"?mt(I):w(m,k)?(I.attribName=k,I.state=y.ATTRIB_NAME):(O(I,"Invalid attribute name"),I.state=y.ATTRIB)}continue;case y.ATTRIB_VALUE:if(B(k))continue;h(k)?
`;Ge.DEFAULT_CONTENT_TYPE="application/octet-stream";Ge.prototype.append=function(t,e,A){A=A||{},typeof A=="string"&&(A={filename:A});var r=lb.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),TH.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,A),s=this._multiPartFooter();r(i),r(e),r(s),this._trackLength(i,e,A)};Ge.prototype._trackLength=function(t,e,A){var r=0;A.knownLength!=null?r+=+A.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Ge.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof NIe))&&(A.knownLength||this._valuesToMeasure.push(e))};Ge.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):bIe.stat(t.path,function(A,r){var i;if(A){e(A);return}i=r.size-(t.start?t.start:0),e(null,i)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(A){t.pause(),e(null,+A.headers["content-length"])}),t.resume()):e("Unknown stream")};Ge.prototype._multiPartHeader=function(t,e,A){if(typeof A.header=="string")return A.header;var r=this._getContentDisposition(e,A),i=this._getContentType(e,A),s="",n={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof A.header=="object"&&cb(n,A.header);var a;for(var o in n)n.hasOwnProperty(o)&&(a=n[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(s+=o+": "+a.join("; ")+Ge.LINE_BREAK)));return"--"+this.getBoundary()+Ge.LINE_BREAK+s+Ge.LINE_BREAK};Ge.prototype._getContentDisposition=function(t,e){var A,r;return typeof e.filepath=="string"?A=ab.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?A=ab.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(A=ab.basename(t.client._httpMessage.path||"")),A&&(r='filename="'+A+'"'),r};Ge.prototype._getContentType=function(t,e){var A=e.contentType;return!A&&t.name&&(A=ob.lookup(t.name)),!A&&t.path&&(A=ob.lookup(t.path)),!A&&t.readable&&t.hasOwnProperty("httpVersion")&&(A=t.headers["content-type"]),!A&&(e.filepath||e.filename)&&(A=ob.lookup(e.filepath||e.filename)),!A&&typeof t=="object"&&(A=Ge.DEFAULT_CONTENT_TYPE),A};Ge.prototype._multiPartFooter=function(){return function(t){var e=Ge.LINE_BREAK,A=this._streams.length===0;A&&(e+=this._lastBoundary()),t(e)}.bind(this)};Ge.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ge.LINE_BREAK};Ge.prototype.getHeaders=function(t){var e,A={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(A[e.toLowerCase()]=t[e]);return A};Ge.prototype.setBoundary=function(t){this._boundary=t};Ge.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ge.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),A=0,r=this._streams.length;A<r;A++)typeof this._streams[A]!="function"&&(Buffer.isBuffer(this._streams[A])?t=Buffer.concat([t,this._streams[A]]):t=Buffer.concat([t,Buffer.from(this._streams[A])]),(typeof this._streams[A]!="string"||this._streams[A].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Ge.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Ge.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};Ge.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Ge.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Ge.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure
${B6e.sanitize(this)}`}};Bi.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";Bi.PARSE_ERROR="PARSE_ERROR";var ms=f4e.createClientLogger("core-http");function UY(t,e){return t?e.httpsAgent:e.httpAgent}var cB=class extends y4e.Transform{constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,A,r){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),r(void 0)}};function AB(t){return t&&typeof t.pipe=="function"}function MY(t,e){return new Promise(A=>{t.once("close",()=>{e?.abort(),A()}),t.once("end",A),t.once("error",A)})}function Q6e(t){let e=new za;return t.forEach((A,r)=>{e.set(r,A)}),e}var lB=class{constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var A;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let r=new rB.AbortController,i;if(e.abortSignal){if(e.abortSignal.aborted)throw new rB.AbortError("The operation was aborted.");i=c=>{c.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",i)}if(e.timeout&&setTimeout(()=>{r.abort()},e.timeout),e.formData){let c=e.formData,l=new N4e.default,d=(u,g)=>{typeof g=="function"&&(g=g()),g&&Object.prototype.hasOwnProperty.call(g,"value")&&Object.prototype.hasOwnProperty.call(g,"options")?l.append(u,g.value,g.options):l.append(u,g)};for(let u of Object.keys(c)){let g=c[u];if(Array.isArray(g))for(let m=0;m<g.length;m++)d(u,g[m]);else d(u,g)}e.body=l,e.formData=void 0;let p=e.headers.get("Content-Type");p&&p.indexOf("multipart/form-data")!==-1&&(typeof l.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data;boundary=${l.getBoundary()}`):e.headers.remove("Content-Type"))}let s=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let c=e.onUploadProgress,l=new cB(c);AB(s)?s.pipe(l):l.end(s),s=l}let n=await this.prepareRequest(e),a=Object.assign({body:s,headers:e.headers.rawHeaders(),method:e.method,signal:r.signal,redirect:"manual"},n),o;try{let c=await this.fetch(e.url,a),l=Q6e(c.headers),d=((A=e.streamResponseStatusCodes)===null||A===void 0?void 0:A.has(c.status))||e.streamResponseBody;o={headers:l,request:e,status:c.status,readableStreamBody:d?c.body:void 0,bodyAsText:d?void 0:await c.text()};let p=e.onDownloadProgress;if(p){let u=c.body||void 0;if(AB(u)){let g=new cB(p);u.pipe(g),o.readableStreamBody=g}else{let g=parseInt(l.get("Content-Length"))||void 0;g&&p({loadedBytes:g})}}return await this.processRequest(o),o}catch(c){let l=c;throw l.code==="ENOTFOUND"?new Bi(l.message,Bi.REQUEST_SEND_ERROR,void 0,e):l.type==="aborted"?new rB.AbortError("The operation was aborted."):l}finally{if(e.abortSignal&&i){let c=Promise.resolve();AB(s)&&(c=MY(s));let l=Promise.resolve();AB(o?.readableStreamBody)&&(l=MY(o.readableStreamBody,r)),Promise.all([c,l]).then(()=>{var d;(d=e.abortSignal)===null||d===void 0||d.removeEventListener("abort",i)}).catch(d=>{ms.warning("Error when cleaning up abortListener on httpRequest",d)})}}}getOrCreateAgent(e){var A;let r=C9(e.url);if(e.proxySettings){let{host:i,port:s,username:n,password:a}=e.proxySettings,o=`${i}:${s}:${n}:${a}`,c=(A=this.proxyAgentMap.get(o))!==null&&A!==void 0?A:{},l=UY(r,c);if(l)return l;let d=h6e(e.url,e.proxySettings,e.headers);return l=d.agent,d.isHttps?c.httpsAgent=d.agent:c.httpAgent=d.agent,this.proxyAgentMap.set(o,c),l}else if(e.keepAlive){let i=UY(r,this.keepAliveAgents);if(i)return i;let s={keepAlive:e.keepAlive};return r?i=this.keepAliveAgents.httpsAgent=new SY.Agent(s):i=this.keepAliveAgents.httpAgent=new DY.Agent(s),i}else return r?SY.globalAgent:DY.globalAgent}async fetch(e,A){return x4e.default(e,A)}async prepareRequest(e){let A={};return A.agent=this.getOrCreateAgent(e),A.compress=e.decompressResponse,A}async processRequest(e){}};W.HttpPipelineLogLevel=void 0;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO"})(W.HttpPipelineLogLevel||(W.HttpPipelineLogLevel={}));function I6e(t){let{requestOptions:e,tracingOptions:A}=t,i=h4e.__rest(t,["requestOp
Pollingstatus:${FJ.terminalStates.includes(l)?"Stopped":"Running"}`),l==="succeeded"){let d=n(c,A);if(d!==void 0)return{response:await e(d).catch(kJ({state:A,stateProxy:r,isOperationError:a})),status:l}}return{response:c,status:l}}async function Ewe(t){let{poll:e,state:A,stateProxy:r,options:i,getOperationStatus:s,getResourceLocation:n,getOperationLocation:a,isOperationError:o,withOperationLocation:c,getPollingInterval:l,processResult:d,getError:p,updateState:u,setDelay:g,isDone:m,setErrorAsResult:C}=t,{operationLocation:Q}=A.config;if(Q!==void 0){let{response:N,status:B}=await hwe({poll:e,getOperationStatus:s,state:A,stateProxy:r,operationLocation:Q,getResourceLocation:n,isOperationError:o,options:i});if(LJ({status:B,response:N,state:A,stateProxy:r,isDone:m,processResult:d,getError:p,setErrorAsResult:C}),!FJ.terminalStates.includes(B)){let h=l?.(N);h&&g(h);let E=a?.(N,A);if(E!==void 0){let w=Q!==E;A.config.operationLocation=E,c?.(E,w)}else c?.(Q,!1)}u?.(A,N)}}Xa.pollOperation=Ewe});var n3=f(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.pollHttpOperation=Kt.isOperationError=Kt.getResourceLocation=Kt.getOperationStatus=Kt.getOperationLocation=Kt.initHttpOperation=Kt.getStatusFromInitialResponse=Kt.getErrorFromResponse=Kt.parseRetryAfter=Kt.inferLroMode=void 0;var TJ=yB(),r3=QB();function UJ(t){let{azureAsyncOperation:e,operationLocation:A}=t;return A??e}function MJ(t){return t.headers.location}function OJ(t){return t.headers["operation-location"]}function PJ(t){return t.headers["azure-asyncoperation"]}function fwe(t){let{location:e,requestMethod:A,requestPath:r,resourceLocationConfig:i}=t;switch(A){case"PUT":return r;case"DELETE":return;case"PATCH":return s()??r;default:return s()}function s(){switch(i){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return e}}}function _J(t){let{rawResponse:e,requestMethod:A,requestPath:r,resourceLocationConfig:i}=t,s=OJ(e),n=PJ(e),a=UJ({operationLocation:s,azureAsyncOperation:n}),o=MJ(e),c=A?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:fwe({requestMethod:c,location:o,requestPath:r,resourceLocationConfig:i})}:o!==void 0?{mode:"ResourceLocation",operationLocation:o}:c==="PUT"&&r?{mode:"Body",operationLocation:r}:void 0}Kt.inferLroMode=_J;function qJ(t){let{status:e,statusCode:A}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Pollingwasunsuccessful.Expectedstatustohaveastringvalueornovaluebutithasinstead:${e}.Thisdoesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return i3(A);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return r3.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}function Cwe(t){let{status:e}=t.body??{};return qJ({status:e,statusCode:t.statusCode})}function Bwe(t){let{properties:e,provisioningState:A}=t.body??{},r=e?.provisioningState??A;return qJ({status:r,statusCode:t.statusCode})}function i3(t){return t===202?"running":t<300?"succeeded":"failed"}function HJ({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let A=parseInt(e);return isNaN(A)?Qwe(new Date(e)):A*1e3}}Kt.parseRetryAfter=HJ;function GJ(t){let e=VJ(t,"error");if(!e){r3.logger.warning("The long-running operation failed but there is no error property in the response'sbody");return}if(!e.code||!e.message){r3.logger.warning("Thelong-runningoperationfailedbuttheerrorpropertyintheresponse's body doesn'tcontaincodeormessage");return}return e}Kt.getErrorFromResponse=GJ;function Qwe(t){let e=Math.floor(new Date().getTime()),A=t.getTime();if(e<A)return A-e}function YJ(t){let{response:e,state:A,operationLocation:r}=t;function i(){switch(A.config.metadata?.mode){case void 0:return i3(e.rawResponse.statusCode);case"Body":return s3(e,A);default:return"running"
`,AX="HTTP/1.1",s8e="AES256",n8e="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",a8e=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],o8e=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],c8e="BlobUsesCustomerSpecifiedEncryption",l8e="BlobDoesNotUseCustomerSpecifiedEncryption",d8e=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function p8e(t){let e=M.URLBuilder.parse(t),A=e.getPath();return A=A||"/",A=g8e(A),e.setPath(A),e.toString()}function u8e(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let A=t.split(";");for(let r of A)r.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=r.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}function Cc(t,e){let A=t.split(";");for(let r of A)if(r.trim().startsWith(e))return r.trim().match(e+"=(.*)")[1];return""}function hp(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=u8e(t),t=n8e);let A=Cc(t,"BlobEndpoint");if(A=A.endsWith("/")?A.slice(0,-1):A,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let r="",i="",s=Buffer.from("accountKey","base64"),n="";if(i=Cc(t,"AccountName"),s=Buffer.from(Cc(t,"AccountKey"),"base64"),!A){r=Cc(t,"DefaultEndpointsProtocol");let a=r.toLowerCase();if(a!=="https"&&a!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(n=Cc(t,"EndpointSuffix"),!n)throw new Error("Invalid EndpointSuffix in the provided Connection String");A=`${r}://${i}.blob.${n}`}if(i){if(s.length===0)throw new Error("Invalid AccountKey in the provided Connection Str
`}),r}getCanonicalizedResourceString(e){let A=Q8(e.url)||"/",r="";r+=`/${this.factory.accountName}${A}`;let i=f8e(e.url),s={};if(i){let n=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let o=a.toLowerCase();s[o]=i[a],n.push(o)}n.sort();for(let a of n)r+=`
${a}:${decodeURIComponent(s[a])}`}return r}},$t=class extends Zg{constructor(e,A){super(),this.accountName=e,this.accountKey=Buffer.from(A,"base64")}create(e,A){return new XB(e,A,this)}computeHMACSHA256(e){return TV.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},F8e="azure-storage-blob",L8e="12.17.0",em=class extends Y.ServiceClient{constructor(e,A){if(e===void 0)throw new Error("'url' cannot be null");if(A||(A={}),!A.userAgent){let r=Y.getDefaultUserAgentValue();A.userAgent=`${F8e}/${L8e}${r}`}super(void 0,A),this.requestContentType="application/json; charset=utf-8",this.baseUri=A.endpoint||"{url}",this.url=e,this.version=A.version||"2023-11-03"}},tm=class{constructor(e,A){this.url=p8e(e),this.accountName=iX(e),this.pipeline=A,this.storageClientContext=new em(this.url,A.toServiceClientOptions()),this.isHttps=rX(h8e(this.url)||"","https"),this.credential=new ct;for(let i of this.pipeline.factories)M.isNode&&i instanceof $t||i instanceof ct?this.credential=i:M.isTokenCredential(i.credential)&&(this.credential=i.credential);let r=this.storageClientContext;r.requestContentType=void 0}},H=P.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function ee(t){var e,A;return{spanOptions:(e=t?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(A=t?.tracingOptions)===null||A===void 0?void 0:A.tracingContext}}var Vn=class t{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let A=new t;for(let r of e)switch(r){case"r":A.read=!0;break;case"a":A.add=!0;break;case"c":A.create=!0;break;case"w":A.write=!0;break;case"d":A.delete=!0;break;case"x":A.deleteVersion=!0;break;case"t":A.tag=!0;break;case"m":A.move=!0;break;case"e":A.execute=!0;break;case"i":A.setImmutabilityPolicy=!0;break;case"y":A.permanentDelete=!0;break;default:throw new RangeError(`Invalidpermission:${r}`)}return A}static from(e){let A=new t;return e.read&&(A.read=!0),e.add&&(A.add=!0),e.create&&(A.create=!0),e.write&&(A.write=!0),e.delete&&(A.delete=!0),e.deleteVersion&&(A.deleteVersion=!0),e.tag&&(A.tag=!0),e.move&&(A.move=!0),e.execute&&(A.execute=!0),e.setImmutabilityPolicy&&(A.setImmutabilityPolicy=!0),e.permanentDelete&&(A.permanentDelete=!0),A}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},zn=class t{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let A=new t;for(let r of e)switch(r){case"r":A.read=!0;break;case"a":A.add=!0;break;case"c":A.create=!0;break;case"w":A.write=!0;break;case"d":A.delete=!0;break;case"l":A.list=!0;break;case"t":A.tag=!0;break;case"x":A.deleteVersion=!0;break;case"m":A.move=!0;break;case"e":A.execute=!0;break;case"i":A.setImmutabilityPolicy=!0;break;case"y":A.permanentDelete=!0;break;case"f":A.filterByTags=!0;break;default:throw new RangeError(`Invalidpermission${r}`)}return A}static from(e){let A=new t;return e.read&&(A.read=!0),e.add&&(A.add=!0),e.create&&(A.create=!0),e.write&&(A.write=!0),e.delete&&(A.delete=!0),e.list&&(A.list=!0),e.deleteVersion&&(A.deleteVersion=!0),e.tag&&(A.tag=!0),e.move&&(A.move=!0),e.execute&&(A.execute=!0),e.setImmutabilityPolicy&&(A.setImmutabilityPolicy=!0),e.permanentDelete&&(A.permanentDelete=!0),e.filterByTags&&(A.filterByTags=!0),A}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),thi
`),s=e.computeHMACSHA256(i);return new rn(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}function U8e(t,e){if(t=fp(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 A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=Vn.parse(t.permissions.toString()).toString():i=zn.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?tt(t.startsOn,!1):"",t.expiresOn?tt(t.expiresOn,!1):"",Ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Wn(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),n=e.computeHMACSHA256(s);return new rn(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}function M8e(t,e){if(t=fp(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 A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=Vn.parse(t.permissions.toString()).toString():i=zn.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?tt(t.startsOn,!1):"",t.expiresOn?tt(t.expiresOn,!1):"",Ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Wn(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),n=e.computeHMACSHA256(s);return new rn(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope)}function O8e(t,e){if(t=fp(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=Vn.parse(t.permissions.toString()).toString():i=zn.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?tt(t.startsOn,!1):"",t.expiresOn?tt(t.expiresOn,!1):"",Ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?tt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?tt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Wn(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),n=e.computeHMACSHA256(s);return new rn(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey)}function P8e(t,e){if(t=fp(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=Vn.parse(t.permissions.toString()).toString():i=zn.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?tt(t.startsOn,!1):"",t.expiresOn?tt(t.expiresOn,!1):"",Ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?tt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?tt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Wn(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),n=e.computeHMACSHA256(s);return new rn(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId)}function _8e(t,e){if(t=fp(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let A="c",r=t.snapshotTime;t.blobName&&(A="b",t.snapshotTime?A="bs":t.versionId&&(A="bv",r=t.versionId));let i;t.permissions&&(t.blobName?i=Vn.parse(t.permissions.toString()).toString():i=zn.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?tt(t.startsOn,!1):"",t.expiresOn?tt(t.expiresOn,!1):"",Ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?tt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?tt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Wn(t.ipRange):"",t.protocol?t.protocol:"",t.version,A,r,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),n=e.computeHMACSHA256(s);return new rn(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,A,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope)}function Ep(t,e,A){let r=[`/blob/${t}/${e}`];return A&&r.push(`/${A}`),r.join("")}function fp(t){let e=t.version?t.version:C8;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 Am=class{constructor(e,A){let r=new em(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new yc(r)):(this._isContainer=!1,this._containerOrBlobOperation=new jg(r)),A||(A=M.generateUuid()),this._leaseId=A}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,A={}){var r,i,s,n,a,o;let{span:c,updatedOptions:l}=H("BlobLeaseClient-acquireLease",A);if(this._isContainer&&(!((r=A.conditions)===null||r===void 0)&&r.ifMatch&&((i=A.conditions)===null||i===void 0?void 0:i.ifMatch)!==An||!((s=A.conditions)===null||s===void 0)&&s.ifNoneMatch&&((n=A.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==An||!((a=A.conditions)===null||a===void 0)&&a.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.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:A.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},A.conditions),{ifTags:(o=A.conditions)===null||o===void 0?void 0:o.tagConditions}),proposedLeaseId:this._leaseId},ee(l)))}catch(d){throw c.setStatus({code:P.SpanStatusCode.ERROR,message:d.message}),d}finally{c.end()}}async changeLease(e,A={}){var r,i,s,n,a,o;let{span:c,updatedOptions:l}=H("BlobLeaseClient-changeLease",A);if(this._isContainer&&(!((r=A.conditions)===null||r===void 0)&&r.ifMatch&&((i=A.conditions)===null||i===void 0?void 0:i.ifMatch)!==An||!((s=A.conditions)===null||s===void 0)&&s.ifNoneMatch&&((n=A.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==An||!((a=A.conditions)===null||a===void 0)&&a.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.");try{let d=await this._containerOrBlobOperati
`));let r=yield F8(A,"create");yield L8(r,t)})}cr.createTar=K5e});var xX=f(mA=>{"use strict";var Z5e=mA&&mA.__createBinding||(Object.create?function(t,e,A,r){r===void 0&&(r=A);var i=Object.getOwnPropertyDescriptor(e,A);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[A]}}),Object.defineProperty(t,r,i)}:function(t,e,A,r){r===void 0&&(r=A),t[r]=e[A]}),$5e=mA&&mA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),m0=mA&&mA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var A in t)A!=="default"&&Object.prototype.hasOwnProperty.call(t,A)&&Z5e(e,t,A);return $5e(e,t),e},yX=mA&&mA.__awaiter||function(t,e,A,r){function i(s){return s instanceof A?s:new A(function(n){n(s)})}return new(A||(A=Promise))(function(s,n){function a(l){try{c(r.next(l))}catch(d){n(d)}}function o(l){try{c(r.throw(l))}catch(d){n(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,o)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(mA,"__esModule",{value:!0});mA.saveCache=mA.restoreCache=mA.isFeatureAvailable=mA.ReserveCacheError=mA.ValidationError=void 0;var wA=m0(rs()),wX=m0(require("path")),Ki=m0(wu()),u0=m0(CX()),g0=IX(),Zn=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};mA.ValidationError=Zn;var hm=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};mA.ReserveCacheError=hm;function bX(t){if(!t||t.length===0)throw new Zn("Path Validation Error: At least one directory or file path is required")}function NX(t){if(t.length>512)throw new Zn(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Zn(`KeyValidationError:${t}cannotcontaincommas.`)}function eNe(){return!!process.env.ACTIONS_CACHE_URL}mA.isFeatureAvailable=eNe;function tNe(t,e,A,r,i=!1){return yX(this,void 0,void 0,function*(){bX(t),A=A||[];let s=[e,...A];if(wA.debug("Resolved Keys:"),wA.debug(JSON.stringify(s)),s.length>10)throw new Zn("Key Validation Error: Keys are limited to a maximum of 10.");for(let o of s)NX(o);let n=yield Ki.getCompressionMethod(),a="";try{let o=yield u0.getCacheEntry(s,t,{compressionMethod:n,enableCrossOsArchive:i});if(!o?.archiveLocation)return;if(r?.lookupOnly)return wA.info("Lookup only - skipping download"),o.cacheKey;a=wX.join(yield Ki.createTempDirectory(),Ki.getCacheFileName(n)),wA.debug(`ArchivePath:${a}`),yield u0.downloadCache(o.archiveLocation,a,r),wA.isDebug()&&(yield(0,g0.listTar)(a,n));let c=Ki.getArchiveFileSizeInBytes(a);return wA.info(`CacheSize:~${Math.round(c/(1024*1024))}MB(${c}B)`),yield(0,g0.extractTar)(a,n),wA.info("Cache restored successfully"),o.cacheKey}catch(o){if(o.name===Zn.name)throw o;wA.warning(`Failedtorestore:${o.message}`)}finally{try{yield Ki.unlinkFile(a)}catch(o){wA.debug(`Failedtodeletearchive:${o}`)}}})}mA.restoreCache=tNe;function ANe(t,e,A,r=!1){var i,s,n,a,o;return yX(this,void 0,void 0,function*(){bX(t),NX(e);let c=yield Ki.getCompressionMethod(),l=-1,d=yield Ki.resolvePaths(t);if(wA.debug("Cache Paths:"),wA.debug(`${JSON.stringify(d)}`),d.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 p=yield Ki.createTempDirectory(),u=wX.join(p,Ki.getCacheFileName(c));wA.debug(`ArchivePath:${u}`);try{yield(0,g0.createTar)(p,d,c),wA.isDebug()&&(yield(0,g0.listTar)(u,c));let g=10*1024*1024*1024,m=Ki.getArchiveFileSizeInBytes(u);if(wA.debug(`FileSize:${m}`),m>g&&!Ki.isGhes())throw new Error(`Cachesizeof~${Math.round(m/(1024*1024))}MB(${m}B)isoverthe10GBlimit,notsavingcache.`);wA.debug("Reserving Cache");let C=yield u0.reserveCache(e,t,{compressionMethod:c,enableCrossOsArchive:r,cacheSize:m});if(!((i=C?.result)===null||i===void 0)&&i.cacheId)l=(s=C?.result)===null||s===void 0?void 0:s.cacheId;else throw C?.statusCode===400?new Error((a=(n=C?.error)===null||n=