|
|
|
@@ -1,83 +1,83 @@
|
|
|
|
|
var aIe=Object.create;var cz=Object.defineProperty;var cIe=Object.getOwnPropertyDescriptor;var uIe=Object.getOwnPropertyNames;var pIe=Object.getPrototypeOf,AIe=Object.prototype.hasOwnProperty;var i=(t,e)=>cz(t,"name",{value:e,configurable:!0});var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lIe=(t,e)=>{for(var r in e)cz(t,r,{get:e[r],enumerable:!0})},dIe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of uIe(e))!AIe.call(t,o)&&o!==r&&cz(t,o,{get:()=>e[o],enumerable:!(n=cIe(e,o))||n.enumerable});return t};var w=(t,e,r)=>(r=t!=null?aIe(pIe(t)):{},dIe(e||!t||!t.__esModule?cz(r,"default",{value:t,enumerable:!0}):r,t));var P9=m(pA=>{"use strict";var G40=require("net"),zIe=require("tls"),YD=require("http"),L9=require("https"),OIe=require("events"),H40=require("assert"),gIe=require("util");pA.httpOverHttp=EIe;pA.httpsOverHttp=CIe;pA.httpOverHttps=yIe;pA.httpsOverHttps=BIe;function EIe(t){var e=new zi(t);return e.request=YD.request,e}i(EIe,"httpOverHttp");function CIe(t){var e=new zi(t);return e.request=YD.request,e.createSocket=Q9,e.defaultPort=443,e}i(CIe,"httpsOverHttp");function yIe(t){var e=new zi(t);return e.request=L9.request,e}i(yIe,"httpOverHttps");function BIe(t){var e=new zi(t);return e.request=L9.request,e.createSocket=Q9,e.defaultPort=443,e}i(BIe,"httpsOverHttps");function zi(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||YD.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",i(function(n,o,s,a){for(var c=_9(o,s,a),u=0,p=e.requests.length;u<p;++u){var A=e.requests[u];if(A.host===c.host&&A.port===c.port){e.requests.splice(u,1),A.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}i(zi,"TunnelingAgent");gIe.inherits(zi,OIe.EventEmitter);zi.prototype.addRequest=i(function(e,r,n,o){var s=this,a=JD({request:e},s.options,_9(r,n,o));if(s.sockets.length>=this.maxSockets){s.requests.push(a);return}s.createSocket(a,function(c){c.on("free",u),c.on("close",p),c.on("agentRemove",p),e.onSocket(c);function u(){s.emit("free",c,a)}i(u,"onFree");function p(A){s.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}i(p,"onCloseOrRemove")})},"addRequest");zi.prototype.createSocket=i(function(e,r){var n=this,o={};n.sockets.push(o);var s=JD({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),Na("making CONNECT request");var a=n.request(s);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",A),a.end();function c(l){l.upgrade=!0}i(c,"onResponse");function u(l,b,f){process.nextTick(function(){p(l,b,f)})}i(u,"onUpgrade");function p(l,b,f){if(a.removeAllListeners(),b.removeAllListeners(),l.statusCode!==200){Na("tunneling socket could not be established, statusCode=%d",l.statusCode),b.destroy();var z=new Error("tunneling socket could not be established, statusCode="+l.statusCode);z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}if(f.length>0){Na("got illegal response body from proxy"),b.destroy();var z=new Error("got illegal response body from proxy");z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}return Na("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=b,r(b)}i(p,"onConnect");function A(l){a.removeAllListeners(),Na(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,l.message,l.stack);var b=new Error("tunneling socket could not be established, cause="+l.message);b.code="ECONNRESET",e.request.emit("error",b),n.removeSocket(o)}i(A,"onError")},"createSocket");zi.prototype.removeSocket=i(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(o){n.request.onSocket(o)})}},"removeSocket");function Q9(t,e){var r=this;zi.prototype.createSocket.call(r,t,function(n){var o=t.request.getHeader("host"),s=JD({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):t.host}),a=zIe.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}i(Q9,"createSecureSocket");function _9(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}i(_9,"toOptions");function JD(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var o=Object.keys(n),s=0,a=o.length;s<a;++s){var c=o[s];n[c]!==void 0&&(t[c]=n[c])}}return t}i(JD,"mergeOptions");var Na;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Na=i(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):Na=i(function(){},"debug");pA.debug=Na});var Xd=m((Y40,k9)=>{k9.exports=P9()});var k0=m((J40,U9)=>{U9.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var i0=m((j40,bU)=>{"use strict";var G9=Symbol.for("undici.error.UND_ERR"),U0=class extends Error{static{i(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[G9]===!0}[G9]=!0},H9=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),jD=class extends U0{static{i(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[H9]===!0}[H9]=!0},X9=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),$D=class extends U0{static{i(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[X9]===!0}[X9]=!0},V9=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),KD=class extends U0{static{i(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[V9]===!0}[V9]=!0},Y9=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),ZD=class extends U0{static{i(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"
Line truncated
|
|
|
|
|
`)||t.includes("\r")||t.includes("\0"))===!1}i(DG,"isValidHeaderValue");function PRe(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),o="";if(n.length>0)for(let s=n.length;s!==0;s--){let a=n[s-1].trim();if(BRe.has(a)){o=a;break}}o!==""&&(t.referrerPolicy=o)}i(PRe,"setRequestReferrerPolicyOnRedirect");function kRe(){return"allowed"}i(kRe,"crossOriginResourcePolicyCheck");function URe(){return"success"}i(URe,"corsCheck");function GRe(){return"success"}i(GRe,"TAOCheck");function HRe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}i(HRe,"appendFetchMetadata");function XRe(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&XI(t.origin)&&!XI(tb(t))&&(e=null);break;case"same-origin":Fz(t,tb(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}i(XRe,"appendRequestOriginHeader");function OA(t,e){return t}i(OA,"coarsenTime");function VRe(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:OA(t.domainLookupStartTime,r),domainLookupEndTime:OA(t.domainLookupEndTime,r),connectionStartTime:OA(t.connectionStartTime,r),connectionEndTime:OA(t.connectionEndTime,r),secureConnectionStartTime:OA(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}i(VRe,"clampAndCoarsenConnectionTimingInfo");function YRe(t){return OA(NRe.now(),t)}i(YRe,"coarsenedSharedCurrentTime");function JRe(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}i(JRe,"createOpaqueTimingInfo");function IG(){return{referrerPolicy:"strict-origin-when-cross-origin"}}i(IG,"makePolicyContainer");function jRe(t){return{referrerPolicy:t.referrerPolicy}}i(jRe,"clonePolicyContainer");function $Re(t){let e=t.referrerPolicy;tu(e);let r=null;if(t.referrer==="client"){let c=EG();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=HI(r),o=HI(r,!0);n.toString().length>4096&&(n=o);let s=Fz(t,n),a=eb(n)&&!eb(t.url);switch(e){case"origin":return o??HI(r,!0);case"unsafe-url":return n;case"same-origin":return s?o:"no-referrer";case"origin-when-cross-origin":return s?n:o;case"strict-origin-when-cross-origin":{let c=tb(t);return Fz(n,c)?n:eb(n)&&!eb(c)?"no-referrer":o}default:return a?"no-referrer":o}}i($Re,"determineRequestsReferrer");function HI(t,e){return tu(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}i(HI,"stripURLForReferrer");function eb(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}i(eb,"isURLPotentiallyTrustworthy");function KRe(t,e){if(Sz===void 0)return!0;let r=RG(e);if(r==="no metadata"||r.length===0)return!0;let n=eNe(r),o=tNe(r,n);for(let s of o){let a=s.algo,c=s.hash,u=Sz.createHash(a).update(t).digest("base64");if(u[u.length-1]==="="&&(u[u.length-2]==="="?u=u.slice(0,-2):u=u.slice(0,-1)),rNe(u,c))return!0}return!1}i(KRe,"bytesMatch");var ZRe=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function RG(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let o=ZRe.exec(n);if(o===null||o.groups===void 0||o.groups.algo===void 0)continue;let s=o.groups.algo.toLowerCase();yG.includes(s)&&e.push(o.groups)}return r===!0?"no metadata":e}i(RG,"parseMetadata");function eNe(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}i(eNe,"getStrongestMetadata");function tNe(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}i(tNe,"filterMetadataListByAlgorithm");function rNe(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}i(rNe,"compareBase64Mixed");function nNe(t){}i(nNe,"tryUpgradeReque
Line truncated
|
|
|
|
|
`);function QNe(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}i(QNe,"isAsciiString");function _Ne(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}i(_Ne,"validateBoundary");function PNe(t,e){xz(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),o=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&Tz(t,vNe,s)||s.position===t.length-4&&Tz(t,LNe,s))return o;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let c=kNe(t,s);if(c==="failure")return"failure";let{name:u,filename:p,contentType:A,encoding:l}=c;s.position+=2;let b;{let z=t.indexOf(n.subarray(2),s.position);if(z===-1)return"failure";b=t.subarray(s.position,z-4),s.position+=b.length,l==="base64"&&(b=Buffer.from(b.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let f;p!==null?(A??="text/plain",QNe(A)||(A=""),f=new xNe([b],p,{type:A})):f=NNe(Buffer.from(b)),xz(kG(u)),xz(typeof f=="string"&&kG(f)||SNe(f)),o.push(FNe(u,f,p))}}i(PNe,"multipartFormDataParser");function kNe(t,e){let r=null,n=null,o=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:o,encoding:s};let a=EA(c=>c!==10&&c!==13&&c!==58,t,e);if(a=ZI(a,!0,!0,c=>c===9||c===32),!wNe.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,EA(c=>c===32||c===9,t,e),RNe(a)){case"content-disposition":{if(r=n=null,!Tz(t,TNe,e)||(e.position+=17,r=HG(t,e),r===null))return"failure";if(Tz(t,GG,e)){let c=e.position+GG.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=HG(t,e),n===null))return"failure"}break}case"content-type":{let c=EA(u=>u!==10&&u!==13,t,e);c=ZI(c,!1,!0,u=>u===9||u===32),o=UG(c);break}case"content-transfer-encoding":{let c=EA(u=>u!==10&&u!==13,t,e);c=ZI(c,!1,!0,u=>u===9||u===32),s=UG(c);break}default:EA(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}i(kNe,"parseMultipartFormDataHeaders");function HG(t,e){xz(t[e.position-1]===34);let r=EA(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
|
|
|
|
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}i(HG,"parseMultipartFormDataName");function EA(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}i(EA,"collectASequenceOfBytes");function ZI(t,e,r,n){let o=0,s=t.length-1;if(e)for(;o<t.length&&n(t[o]);)o++;if(r)for(;s>0&&n(t[s]);)s--;return o===0&&s===t.length-1?t:t.subarray(o,s+1)}i(ZI,"removeChars");function Tz(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}i(Tz,"bufferStartsWith");XG.exports={multipartFormDataParser:PNe,validateBoundary:_Ne}});var BA=m((TB0,nH)=>{"use strict";var ob=He(),{ReadableStreamFrom:UNe,isBlobLike:YG,isReadableStreamLike:GNe,readableStreamClose:HNe,createDeferredPromise:XNe,fullyReadBody:VNe,extractMimeType:YNe,utf8DecodeBytes:$G}=Ir(),{FormData:JG}=nb(),{kState:yA}=wa(),{webidl:JNe}=st(),{Blob:jNe}=require("node:buffer"),e5=require("node:assert"),{isErrored:KG,isDisturbed:$Ne}=require("node:stream"),{isArrayBuffer:KNe}=require("node:util/types"),{serializeAMimeType:ZNe}=Zt(),{multipartFormDataParser:ewe}=VG(),t5;try{let t=require("node:crypto");t5=i(e=>t.randomInt(0,e),"random")}catch{t5=i(t=>Math.floor(Math.random(t)),"random")}var vz=new TextEncoder;function twe(){}i(twe,"noop");var ZG=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,eH;ZG&&(eH=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!$Ne(e)&&!KG(e)&&e.cancel("Response object has been garbage collected").catch(twe)}));function tH(t,e=!1){let r=null;t instanceof ReadableStream?r=t:YG(t)?r=t.stream():r=new ReadableStream({async pull(u){let p=typeof o=="string"?vz.encode(o):o;p.byteLength&&u.enqueue(p),queueMicrotask(()=>HNe(u))},start(){},type:"bytes"}),e5(GNe(r));let n=null,o=null,s=null,a=null;if(typeof t=="string")o=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)o=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(KNe(t))o=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(ob.isFormDataLike(t)){let u=`----formdata-undici-0${`${t5(1e11)}`.padStart(11,"0")}`,p=`--${u}\r
|
|
|
|
|
var WIe=Object.create;var Az=Object.defineProperty;var xIe=Object.getOwnPropertyDescriptor;var TIe=Object.getOwnPropertyNames;var vIe=Object.getPrototypeOf,LIe=Object.prototype.hasOwnProperty;var i=(t,e)=>Az(t,"name",{value:e,configurable:!0});var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),QIe=(t,e)=>{for(var r in e)Az(t,r,{get:e[r],enumerable:!0})},_Ie=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of TIe(e))!LIe.call(t,o)&&o!==r&&Az(t,o,{get:()=>e[o],enumerable:!(n=xIe(e,o))||n.enumerable});return t};var w=(t,e,r)=>(r=t!=null?WIe(vIe(t)):{},_Ie(e||!t||!t.__esModule?Az(r,"default",{value:t,enumerable:!0}):r,t));var j9=h(lA=>{"use strict";var qB0=require("net"),XIe=require("tls"),rI=require("http"),Y9=require("https"),VIe=require("events"),DB0=require("assert"),YIe=require("util");lA.httpOverHttp=JIe;lA.httpsOverHttp=$Ie;lA.httpOverHttps=jIe;lA.httpsOverHttps=KIe;function JIe(t){var e=new gi(t);return e.request=rI.request,e}i(JIe,"httpOverHttp");function $Ie(t){var e=new gi(t);return e.request=rI.request,e.createSocket=J9,e.defaultPort=443,e}i($Ie,"httpsOverHttp");function jIe(t){var e=new gi(t);return e.request=Y9.request,e}i(jIe,"httpOverHttps");function KIe(t){var e=new gi(t);return e.request=Y9.request,e.createSocket=J9,e.defaultPort=443,e}i(KIe,"httpsOverHttps");function gi(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||rI.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",i(function(n,o,s,a){for(var c=$9(o,s,a),u=0,p=e.requests.length;u<p;++u){var A=e.requests[u];if(A.host===c.host&&A.port===c.port){e.requests.splice(u,1),A.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}i(gi,"TunnelingAgent");YIe.inherits(gi,VIe.EventEmitter);gi.prototype.addRequest=i(function(e,r,n,o){var s=this,a=nI({request:e},s.options,$9(r,n,o));if(s.sockets.length>=this.maxSockets){s.requests.push(a);return}s.createSocket(a,function(c){c.on("free",u),c.on("close",p),c.on("agentRemove",p),e.onSocket(c);function u(){s.emit("free",c,a)}i(u,"onFree");function p(A){s.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}i(p,"onCloseOrRemove")})},"addRequest");gi.prototype.createSocket=i(function(e,r){var n=this,o={};n.sockets.push(o);var s=nI({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),wa("making CONNECT request");var a=n.request(s);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",A),a.end();function c(l){l.upgrade=!0}i(c,"onResponse");function u(l,b,M){process.nextTick(function(){p(l,b,M)})}i(u,"onUpgrade");function p(l,b,M){if(a.removeAllListeners(),b.removeAllListeners(),l.statusCode!==200){wa("tunneling socket could not be established, statusCode=%d",l.statusCode),b.destroy();var z=new Error("tunneling socket could not be established, statusCode="+l.statusCode);z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}if(M.length>0){wa("got illegal response body from proxy"),b.destroy();var z=new Error("got illegal response body from proxy");z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}return wa("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=b,r(b)}i(p,"onConnect");function A(l){a.removeAllListeners(),wa(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,l.message,l.stack);var b=new Error("tunneling socket could not be established, cause="+l.message);b.code="ECONNRESET",e.request.emit("error",b),n.removeSocket(o)}i(A,"onError")},"createSocket");gi.prototype.removeSocket=i(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(o){n.request.onSocket(o)})}},"removeSocket");function J9(t,e){var r=this;gi.prototype.createSocket.call(r,t,function(n){var o=t.request.getHeader("host"),s=nI({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):t.host}),a=XIe.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}i(J9,"createSecureSocket");function $9(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}i($9,"toOptions");function nI(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var o=Object.keys(n),s=0,a=o.length;s<a;++s){var c=o[s];n[c]!==void 0&&(t[c]=n[c])}}return t}i(nI,"mergeOptions");var wa;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?wa=i(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):wa=i(function(){},"debug");lA.debug=wa});var Yd=h((NB0,K9)=>{K9.exports=j9()});var k0=h((wB0,Z9)=>{Z9.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var i0=h((SB0,yU)=>{"use strict";var eU=Symbol.for("undici.error.UND_ERR"),U0=class extends Error{static{i(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[eU]===!0}[eU]=!0},tU=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),oI=class extends U0{static{i(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[tU]===!0}[tU]=!0},rU=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),sI=class extends U0{static{i(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[rU]===!0}[rU]=!0},nU=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),iI=class extends U0{static{i(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[nU]===!0}[nU]=!0},oU=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),aI=class extends U0{static{i(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"
Line truncated
|
|
|
|
|
`)||t.includes("\r")||t.includes("\0"))===!1}i(vG,"isValidHeaderValue");function bNe(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),o="";if(n.length>0)for(let s=n.length;s!==0;s--){let a=n[s-1].trim();if(KRe.has(a)){o=a;break}}o!==""&&(t.referrerPolicy=o)}i(bNe,"setRequestReferrerPolicyOnRedirect");function fNe(){return"allowed"}i(fNe,"crossOriginResourcePolicyCheck");function MNe(){return"success"}i(MNe,"corsCheck");function hNe(){return"success"}i(hNe,"TAOCheck");function mNe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}i(mNe,"appendFetchMetadata");function zNe(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&ZI(t.origin)&&!ZI(ob(t))&&(e=null);break;case"same-origin":Tz(t,ob(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}i(zNe,"appendRequestOriginHeader");function EA(t,e){return t}i(EA,"coarsenTime");function gNe(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:EA(t.domainLookupStartTime,r),domainLookupEndTime:EA(t.domainLookupEndTime,r),connectionStartTime:EA(t.connectionStartTime,r),connectionEndTime:EA(t.connectionEndTime,r),secureConnectionStartTime:EA(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}i(gNe,"clampAndCoarsenConnectionTimingInfo");function ONe(t){return EA(nNe.now(),t)}i(ONe,"coarsenedSharedCurrentTime");function ENe(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}i(ENe,"createOpaqueTimingInfo");function LG(){return{referrerPolicy:"strict-origin-when-cross-origin"}}i(LG,"makePolicyContainer");function CNe(t){return{referrerPolicy:t.referrerPolicy}}i(CNe,"clonePolicyContainer");function yNe(t){let e=t.referrerPolicy;ru(e);let r=null;if(t.referrer==="client"){let c=SG();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=KI(r),o=KI(r,!0);n.toString().length>4096&&(n=o);let s=Tz(t,n),a=nb(n)&&!nb(t.url);switch(e){case"origin":return o??KI(r,!0);case"unsafe-url":return n;case"same-origin":return s?o:"no-referrer";case"origin-when-cross-origin":return s?n:o;case"strict-origin-when-cross-origin":{let c=ob(t);return Tz(n,c)?n:nb(n)&&!nb(c)?"no-referrer":o}default:return a?"no-referrer":o}}i(yNe,"determineRequestsReferrer");function KI(t,e){return ru(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}i(KI,"stripURLForReferrer");function nb(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}i(nb,"isURLPotentiallyTrustworthy");function BNe(t,e){if(xz===void 0)return!0;let r=QG(e);if(r==="no metadata"||r.length===0)return!0;let n=DNe(r),o=INe(r,n);for(let s of o){let a=s.algo,c=s.hash,u=xz.createHash(a).update(t).digest("base64");if(u[u.length-1]==="="&&(u[u.length-2]==="="?u=u.slice(0,-2):u=u.slice(0,-1)),RNe(u,c))return!0}return!1}i(BNe,"bytesMatch");var qNe=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function QG(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let o=qNe.exec(n);if(o===null||o.groups===void 0||o.groups.algo===void 0)continue;let s=o.groups.algo.toLowerCase();WG.includes(s)&&e.push(o.groups)}return r===!0?"no metadata":e}i(QG,"parseMetadata");function DNe(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}i(DNe,"getStrongestMetadata");function INe(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}i(INe,"filterMetadataListByAlgorithm");function RNe(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}i(RNe,"compareBase64Mixed");function NNe(t){}i(NNe,"tryUpgradeReque
Line truncated
|
|
|
|
|
`);function lwe(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}i(lwe,"isAsciiString");function dwe(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}i(dwe,"validateBoundary");function bwe(t,e){Lz(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),o=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&Qz(t,pwe,s)||s.position===t.length-4&&Qz(t,Awe,s))return o;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let c=fwe(t,s);if(c==="failure")return"failure";let{name:u,filename:p,contentType:A,encoding:l}=c;s.position+=2;let b;{let z=t.indexOf(n.subarray(2),s.position);if(z===-1)return"failure";b=t.subarray(s.position,z-4),s.position+=b.length,l==="base64"&&(b=Buffer.from(b.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let M;p!==null?(A??="text/plain",lwe(A)||(A=""),M=new cwe([b],p,{type:A})):M=nwe(Buffer.from(b)),Lz(KG(u)),Lz(typeof M=="string"&&KG(M)||swe(M)),o.push(iwe(u,M,p))}}i(bwe,"multipartFormDataParser");function fwe(t,e){let r=null,n=null,o=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:o,encoding:s};let a=yA(c=>c!==10&&c!==13&&c!==58,t,e);if(a=i5(a,!0,!0,c=>c===9||c===32),!owe.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,yA(c=>c===32||c===9,t,e),rwe(a)){case"content-disposition":{if(r=n=null,!Qz(t,uwe,e)||(e.position+=17,r=tH(t,e),r===null))return"failure";if(Qz(t,eH,e)){let c=e.position+eH.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=tH(t,e),n===null))return"failure"}break}case"content-type":{let c=yA(u=>u!==10&&u!==13,t,e);c=i5(c,!1,!0,u=>u===9||u===32),o=ZG(c);break}case"content-transfer-encoding":{let c=yA(u=>u!==10&&u!==13,t,e);c=i5(c,!1,!0,u=>u===9||u===32),s=ZG(c);break}default:yA(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}i(fwe,"parseMultipartFormDataHeaders");function tH(t,e){Lz(t[e.position-1]===34);let r=yA(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
|
|
|
|
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}i(tH,"parseMultipartFormDataName");function yA(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}i(yA,"collectASequenceOfBytes");function i5(t,e,r,n){let o=0,s=t.length-1;if(e)for(;o<t.length&&n(t[o]);)o++;if(r)for(;s>0&&n(t[s]);)s--;return o===0&&s===t.length-1?t:t.subarray(o,s+1)}i(i5,"removeChars");function Qz(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}i(Qz,"bufferStartsWith");rH.exports={multipartFormDataParser:bwe,validateBoundary:dwe}});var DA=h((mq0,dH)=>{"use strict";var ab=He(),{ReadableStreamFrom:Mwe,isBlobLike:oH,isReadableStreamLike:hwe,readableStreamClose:mwe,createDeferredPromise:zwe,fullyReadBody:gwe,extractMimeType:Owe,utf8DecodeBytes:aH}=Rr(),{FormData:sH}=ib(),{kState:qA}=Sa(),{webidl:Ewe}=st(),{Blob:Cwe}=require("node:buffer"),a5=require("node:assert"),{isErrored:cH,isDisturbed:ywe}=require("node:stream"),{isArrayBuffer:Bwe}=require("node:util/types"),{serializeAMimeType:qwe}=Zt(),{multipartFormDataParser:Dwe}=nH(),c5;try{let t=require("node:crypto");c5=i(e=>t.randomInt(0,e),"random")}catch{c5=i(t=>Math.floor(Math.random(t)),"random")}var _z=new TextEncoder;function Iwe(){}i(Iwe,"noop");var uH=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,pH;uH&&(pH=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!ywe(e)&&!cH(e)&&e.cancel("Response object has been garbage collected").catch(Iwe)}));function AH(t,e=!1){let r=null;t instanceof ReadableStream?r=t:oH(t)?r=t.stream():r=new ReadableStream({async pull(u){let p=typeof o=="string"?_z.encode(o):o;p.byteLength&&u.enqueue(p),queueMicrotask(()=>mwe(u))},start(){},type:"bytes"}),a5(hwe(r));let n=null,o=null,s=null,a=null;if(typeof t=="string")o=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)o=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(Bwe(t))o=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(ab.isFormDataLike(t)){let u=`----formdata-undici-0${`${c5(1e11)}`.padStart(11,"0")}`,p=`--${u}\r
|
|
|
|
|
Content-Disposition: form-data`;let A=i(y=>y.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),l=i(y=>y.replace(/\r?\n|\r/g,`\r
|
|
|
|
|
`),"normalizeLinefeeds"),b=[],f=new Uint8Array([13,10]);s=0;let z=!1;for(let[y,E]of t)if(typeof E=="string"){let B=vz.encode(p+`; name="${A(l(y))}"\r
|
|
|
|
|
`),"normalizeLinefeeds"),b=[],M=new Uint8Array([13,10]);s=0;let z=!1;for(let[y,E]of t)if(typeof E=="string"){let B=_z.encode(p+`; name="${A(l(y))}"\r
|
|
|
|
|
\r
|
|
|
|
|
${l(E)}\r
|
|
|
|
|
`);b.push(B),s+=B.byteLength}else{let B=vz.encode(`${p}; name="${A(l(y))}"`+(E.name?`; filename="${A(E.name)}"`:"")+`\r
|
|
|
|
|
`);b.push(B),s+=B.byteLength}else{let B=_z.encode(`${p}; name="${A(l(y))}"`+(E.name?`; filename="${A(E.name)}"`:"")+`\r
|
|
|
|
|
Content-Type: ${E.type||"application/octet-stream"}\r
|
|
|
|
|
\r
|
|
|
|
|
`);b.push(B,E,f),typeof E.size=="number"?s+=B.byteLength+E.size+f.byteLength:z=!0}let g=vz.encode(`--${u}--\r
|
|
|
|
|
`);b.push(g),s+=g.byteLength,z&&(s=null),o=t,n=i(async function*(){for(let y of b)y.stream?yield*y.stream():yield y},"action"),a=`multipart/form-data; boundary=${u}`}else if(YG(t))o=t,s=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(ob.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:UNe(t)}if((typeof o=="string"||ob.isBuffer(o))&&(s=Buffer.byteLength(o)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(p){let{value:A,done:l}=await u.next();if(l)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!KG(r)){let b=new Uint8Array(A);b.byteLength&&p.enqueue(b)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:o,length:s},a]}i(tH,"extractBody");function rwe(t,e=!1){return t instanceof ReadableStream&&(e5(!ob.isDisturbed(t),"The body has already been consumed."),e5(!t.locked,"The stream is locked.")),tH(t,e)}i(rwe,"safelyExtractBody");function nwe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}i(nwe,"cloneBody");function owe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}i(owe,"throwIfAborted");function swe(t){return{blob(){return CA(this,r=>{let n=jG(this);return n===null?n="":n&&(n=ZNe(n)),new jNe([r],{type:n})},t)},arrayBuffer(){return CA(this,r=>new Uint8Array(r).buffer,t)},text(){return CA(this,$G,t)},json(){return CA(this,awe,t)},formData(){return CA(this,r=>{let n=jG(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let o=ewe(r,n);if(o==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new JG;return s[yA]=o,s}case"application/x-www-form-urlencoded":{let o=new URLSearchParams(r.toString()),s=new JG;for(let[a,c]of o)s.append(a,c);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return CA(this,r=>new Uint8Array(r),t)}}}i(swe,"bodyMixinMethods");function iwe(t){Object.assign(t.prototype,swe(t))}i(iwe,"mixinBody");async function CA(t,e,r){if(JNe.brandCheck(t,r),rH(t))throw new TypeError("Body is unusable: Body has already been read");owe(t[yA]);let n=XNe(),o=i(a=>n.reject(a),"errorSteps"),s=i(a=>{try{n.resolve(e(a))}catch(c){o(c)}},"successSteps");return t[yA].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await VNe(t[yA].body,s,o),n.promise)}i(CA,"consumeBody");function rH(t){let e=t[yA].body;return e!=null&&(e.stream.locked||ob.isDisturbed(e.stream))}i(rH,"bodyUnusable");function awe(t){return JSON.parse($G(t))}i(awe,"parseJSONFromBytes");function jG(t){let e=t[yA].headersList,r=YNe(e);return r==="failure"?null:r}i(jG,"bodyMimeType");nH.exports={extractBody:tH,safelyExtractBody:rwe,cloneBody:nwe,mixinBody:iwe,streamRegistry:eH,hasFinalizationRegistry:ZG,bodyUnusable:rH}});var zH=m((LB0,hH)=>{"use strict";var be=require("node:assert"),me=He(),{channels:oH}=lA(),r5=vI(),{RequestContentLengthMismatchError:ru,ResponseContentLengthMismatchError:sH,RequestAbortedError:dH,HeadersTimeoutError:cwe,HeadersOverflowError:uwe,SocketError:qA,InformationalError:DA,BodyTimeoutError:pwe,HTTPParserError:Awe,ResponseExceededMaxSizeError:lwe}=i0(),{kUrl:bH,kReset:er,kClient:Pz,kParser:W0,kBlocking:ab,kRunning:I1,kPending:MH,kSize:iH,kWriting:Sa,kQueue:no,kNoRef:sb,kKeepAliveDefaultTimeout:dwe,kHostHeader:bwe,kPendingIdx:Mwe,kRunningIdx:An,kError:wt,kPipelining:kz,kSocket:ou,kKeepAliveTimeoutValue:Gz,kMaxHeadersSize:n5,kKeepAliveMaxTimeout:fwe,kKeepAliveTimeoutThreshold:mwe,kHeadersTimeout:hwe,kBodyTimeout:zwe,kStrictContentLength:i5,kMaxRequests:aH,kCounter:Owe,kMaxResponseSize:gwe,kOnError:cH,kResume:Bi,kHTTPContext:fH}=k0(),Rr=eG(),uH=Buffer.alloc(0),Lz=Buffer[Symbol.species],Qz=me.addListener,Ewe=me.removeAllListeners,su=Symbol("kIdleSocketValidation"),nu=Symbol("kIdleSocketValidationTimeout"),p5=Symbol("kSocketUsed"),o5;async function Cwe(){let t=process.env.JEST_WORKER_ID?_I():void 0,e;try{e=await WebAssembly.compile(nG())}catch{e=await WebAssembly.compile(t||_I())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:i((r,n,o)=>0,"wasm_on_url"),wasm_on_status:i((r,n,o)=>{be(r1.ptr===r);let s=n-Ho+Go.byteOffset;return r1.onStatus(new Lz(Go.buffer,s,o))||0},"wasm_on_status"),wasm_on_message_begin:i(r=>(be(r1.ptr===r),r1.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:i((r,n,o)=>{be(r1.ptr===r);let s=n-Ho+Go.byteOffset;return r1.onHeaderField(new Lz(Go.buffer,s,o))||0},"wasm_on_header_field"),wasm_on_header_value:i((r,n,o)=>{be(r1.ptr===r);let s=n-Ho+Go.byteOffset;return r1.onHeaderValue(new Lz(Go.buffer,s,o))||0},"wasm_on_header_value"),wasm_on_headers_complete:i((r,n,o,s)=>(be(r1.ptr===r),r1.onHeadersComplete(n,!!o,!!s)||0),"wasm_on_headers_complete"),wasm_on_body:i((r,n,o)=>{be(r1.ptr===r);let s=n-Ho+Go.byteOffset;return r1.onBody(new Lz(Go.bu
Line truncated
|
|
|
|
|
`;if(typeof o=="string"?g+=`host: ${o}\r
|
|
|
|
|
`:g+=t[bwe],s?g+=`connection: upgrade\r
|
|
|
|
|
`);b.push(B,E,M),typeof E.size=="number"?s+=B.byteLength+E.size+M.byteLength:z=!0}let O=_z.encode(`--${u}--\r
|
|
|
|
|
`);b.push(O),s+=O.byteLength,z&&(s=null),o=t,n=i(async function*(){for(let y of b)y.stream?yield*y.stream():yield y},"action"),a=`multipart/form-data; boundary=${u}`}else if(oH(t))o=t,s=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(ab.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Mwe(t)}if((typeof o=="string"||ab.isBuffer(o))&&(s=Buffer.byteLength(o)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(p){let{value:A,done:l}=await u.next();if(l)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!cH(r)){let b=new Uint8Array(A);b.byteLength&&p.enqueue(b)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:o,length:s},a]}i(AH,"extractBody");function Rwe(t,e=!1){return t instanceof ReadableStream&&(a5(!ab.isDisturbed(t),"The body has already been consumed."),a5(!t.locked,"The stream is locked.")),AH(t,e)}i(Rwe,"safelyExtractBody");function Nwe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}i(Nwe,"cloneBody");function wwe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}i(wwe,"throwIfAborted");function Swe(t){return{blob(){return BA(this,r=>{let n=iH(this);return n===null?n="":n&&(n=qwe(n)),new Cwe([r],{type:n})},t)},arrayBuffer(){return BA(this,r=>new Uint8Array(r).buffer,t)},text(){return BA(this,aH,t)},json(){return BA(this,Wwe,t)},formData(){return BA(this,r=>{let n=iH(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let o=Dwe(r,n);if(o==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new sH;return s[qA]=o,s}case"application/x-www-form-urlencoded":{let o=new URLSearchParams(r.toString()),s=new sH;for(let[a,c]of o)s.append(a,c);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return BA(this,r=>new Uint8Array(r),t)}}}i(Swe,"bodyMixinMethods");function Fwe(t){Object.assign(t.prototype,Swe(t))}i(Fwe,"mixinBody");async function BA(t,e,r){if(Ewe.brandCheck(t,r),lH(t))throw new TypeError("Body is unusable: Body has already been read");wwe(t[qA]);let n=zwe(),o=i(a=>n.reject(a),"errorSteps"),s=i(a=>{try{n.resolve(e(a))}catch(c){o(c)}},"successSteps");return t[qA].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await gwe(t[qA].body,s,o),n.promise)}i(BA,"consumeBody");function lH(t){let e=t[qA].body;return e!=null&&(e.stream.locked||ab.isDisturbed(e.stream))}i(lH,"bodyUnusable");function Wwe(t){return JSON.parse(aH(t))}i(Wwe,"parseJSONFromBytes");function iH(t){let e=t[qA].headersList,r=Owe(e);return r==="failure"?null:r}i(iH,"bodyMimeType");dH.exports={extractBody:AH,safelyExtractBody:Rwe,cloneBody:Nwe,mixinBody:Fwe,streamRegistry:pH,hasFinalizationRegistry:uH,bodyUnusable:lH}});var RH=h((gq0,IH)=>{"use strict";var be=require("node:assert"),he=He(),{channels:bH}=bA(),u5=GI(),{RequestContentLengthMismatchError:nu,ResponseContentLengthMismatchError:fH,RequestAbortedError:CH,InvalidArgumentError:xwe,HeadersTimeoutError:Twe,HeadersOverflowError:vwe,SocketError:IA,InformationalError:RA,BodyTimeoutError:Lwe,HTTPParserError:Qwe,ResponseExceededMaxSizeError:_we}=i0(),{kUrl:yH,kReset:er,kClient:Gz,kParser:W0,kBlocking:pb,kRunning:I1,kPending:BH,kSize:MH,kWriting:Fa,kQueue:so,kNoRef:cb,kKeepAliveDefaultTimeout:Pwe,kHostHeader:kwe,kPendingIdx:Uwe,kRunningIdx:ln,kError:wt,kPipelining:Hz,kSocket:su,kKeepAliveTimeoutValue:Vz,kMaxHeadersSize:p5,kKeepAliveMaxTimeout:Gwe,kKeepAliveTimeoutThreshold:Hwe,kHeadersTimeout:Xwe,kBodyTimeout:Vwe,kStrictContentLength:d5,kMaxRequests:hH,kCounter:Ywe,kMaxResponseSize:Jwe,kOnError:mH,kResume:qi,kHTTPContext:qH}=k0(),Nr=pG(),zH=Buffer.alloc(0),Pz=Buffer[Symbol.species],kz=he.addListener,$we=he.removeAllListeners,iu=Symbol("kIdleSocketValidation"),ou=Symbol("kIdleSocketValidationTimeout"),h5=Symbol("kSocketUsed"),A5;async function jwe(){let t=process.env.JEST_WORKER_ID?VI():void 0,e;try{e=await WebAssembly.compile(dG())}catch{e=await WebAssembly.compile(t||VI())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:i((r,n,o)=>0,"wasm_on_url"),wasm_on_status:i((r,n,o)=>{be(r1.ptr===r);let s=n-Vo+Xo.byteOffset;return r1.onStatus(new Pz(Xo.buffer,s,o))||0},"wasm_on_status"),wasm_on_message_begin:i(r=>(be(r1.ptr===r),r1.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:i((r,n,o)=>{be(r1.ptr===r);let s=n-Vo+Xo.byteOffset;return r1.onHeaderField(new Pz(Xo.buffer,s,o))||0},"wasm_on_header_field"),wasm_on_header_value:i((r,n,o)=>{be(r1.ptr===r);let s=n-Vo+Xo.byteOffset;return r1.onHeaderValue(new Pz(Xo.buffer,s,o))||0},"wasm_on_header_value"),wasm_on_headers_complete:i((r,n,o,s)=>(be(r1.ptr===r),r1.onHeadersComplete(n,!!o,!!s)||0),"wasm_on_headers_complete"),wasm_on_body:i((r,n,o)=>{be(r1.ptr===r);let s=n-Vo+Xo.byteOffset;retu
Line truncated
|
|
|
|
|
`;if(typeof o=="string"?O+=`host: ${o}\r
|
|
|
|
|
`:O+=t[kwe],s?O+=`connection: upgrade\r
|
|
|
|
|
upgrade: ${s}\r
|
|
|
|
|
`:t[kz]&&!f[er]?g+=`connection: keep-alive\r
|
|
|
|
|
`:g+=`connection: close\r
|
|
|
|
|
`,Array.isArray(p))for(let y=0;y<p.length;y+=2){let E=p[y+0],B=p[y+1];if(Array.isArray(B))for(let q=0;q<B.length;q++)g+=`${E}: ${B[q]}\r
|
|
|
|
|
`;else g+=`${E}: ${B}\r
|
|
|
|
|
`}return oH.sendHeaders.hasSubscribers&&oH.sendHeaders.publish({request:e,headers:g,socket:f}),!u||b===0?AH(z,null,t,e,f,A,g,l):me.isBuffer(u)?AH(z,u,t,e,f,A,g,l):me.isBlobLike(u)?typeof u.stream=="function"?lH(z,u.stream(),t,e,f,A,g,l):wwe(z,u,t,e,f,A,g,l):me.isStream(u)?Nwe(z,u,t,e,f,A,g,l):me.isIterable(u)?lH(z,u,t,e,f,A,g,l):be(!1),!0}i(Rwe,"writeH1");function Nwe(t,e,r,n,o,s,a,c){be(s!==0||r[I1]===0,"stream body cannot be pipelined");let u=!1,p=new Hz({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:c,header:a}),A=i(function(z){if(!u)try{!p.write(z)&&this.pause&&this.pause()}catch(g){me.destroy(this,g)}},"onData"),l=i(function(){u||e.resume&&e.resume()},"onDrain"),b=i(function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!u){let z=new dH;queueMicrotask(()=>f(z))}},"onClose"),f=i(function(z){if(!u){if(u=!0,be(o.destroyed||o[Sa]&&r[I1]<=1),o.off("drain",l).off("error",f),e.removeListener("data",A).removeListener("end",f).removeListener("close",b),!z)try{p.end()}catch(g){z=g}p.destroy(z),z&&(z.code!=="UND_ERR_INFO"||z.message!=="reset")?me.destroy(e,z):me.destroy(e)}},"onFinished");e.on("data",A).on("end",f).on("error",f).on("close",b),e.resume&&e.resume(),o.on("drain",l).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(b)}i(Nwe,"writeStream");function AH(t,e,r,n,o,s,a,c){try{e?me.isBuffer(e)&&(be(s===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${a}content-length: ${s}\r
|
|
|
|
|
`:t[Hz]&&!M[er]?O+=`connection: keep-alive\r
|
|
|
|
|
`:O+=`connection: close\r
|
|
|
|
|
`,Array.isArray(p))for(let y=0;y<p.length;y+=2){let E=p[y+0],B=p[y+1];if(Array.isArray(B))for(let q=0;q<B.length;q++)O+=`${E}: ${B[q]}\r
|
|
|
|
|
`;else O+=`${E}: ${B}\r
|
|
|
|
|
`}return bH.sendHeaders.hasSubscribers&&bH.sendHeaders.publish({request:e,headers:O,socket:M}),!u||b===0?OH(z,null,t,e,M,A,O,l):he.isBuffer(u)?OH(z,u,t,e,M,A,O,l):he.isBlobLike(u)?typeof u.stream=="function"?EH(z,u.stream(),t,e,M,A,O,l):s6e(z,u,t,e,M,A,O,l):he.isStream(u)?o6e(z,u,t,e,M,A,O,l):he.isIterable(u)?EH(z,u,t,e,M,A,O,l):be(!1),!0}i(n6e,"writeH1");function o6e(t,e,r,n,o,s,a,c){be(s!==0||r[I1]===0,"stream body cannot be pipelined");let u=!1,p=new Yz({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:c,header:a}),A=i(function(z){if(!u)try{!p.write(z)&&this.pause&&this.pause()}catch(O){he.destroy(this,O)}},"onData"),l=i(function(){u||e.resume&&e.resume()},"onDrain"),b=i(function(){if(queueMicrotask(()=>{e.removeListener("error",M)}),!u){let z=new CH;queueMicrotask(()=>M(z))}},"onClose"),M=i(function(z){if(!u){if(u=!0,be(o.destroyed||o[Fa]&&r[I1]<=1),o.off("drain",l).off("error",M),e.removeListener("data",A).removeListener("end",M).removeListener("close",b),!z)try{p.end()}catch(O){z=O}p.destroy(z),z&&(z.code!=="UND_ERR_INFO"||z.message!=="reset")?he.destroy(e,z):he.destroy(e)}},"onFinished");e.on("data",A).on("end",M).on("error",M).on("close",b),e.resume&&e.resume(),o.on("drain",l).on("error",M),e.errorEmitted??e.errored?setImmediate(()=>M(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>M(null)),(e.closeEmitted??e.closed)&&setImmediate(b)}i(o6e,"writeStream");function OH(t,e,r,n,o,s,a,c){try{e?he.isBuffer(e)&&(be(s===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${a}content-length: ${s}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),o.write(e),o.uncork(),n.onBodySent(e),!c&&n.reset!==!1&&(o[er]=!0)):s===0?o.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):(be(s===null,"no body must not have content length"),o.write(`${a}\r
|
|
|
|
|
`,"latin1")),n.onRequestSent(),r[Bi]()}catch(u){t(u)}}i(AH,"writeBuffer");async function wwe(t,e,r,n,o,s,a,c){be(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new ru;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${a}content-length: ${s}\r
|
|
|
|
|
`,"latin1")),n.onRequestSent(),r[qi]()}catch(u){t(u)}}i(OH,"writeBuffer");async function s6e(t,e,r,n,o,s,a,c){be(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new nu;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${a}content-length: ${s}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!c&&n.reset!==!1&&(o[er]=!0),r[Bi]()}catch(u){t(u)}}i(wwe,"writeBlob");async function lH(t,e,r,n,o,s,a,c){be(s!==0||r[I1]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let b=u;u=null,b()}}i(p,"onDrain");let A=i(()=>new Promise((b,f)=>{be(u===null),o[wt]?f(o[wt]):u=b}),"waitForDrain");o.on("close",p).on("drain",p);let l=new Hz({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:c,header:a});try{for await(let b of e){if(o[wt])throw o[wt];l.write(b)||await A()}l.end()}catch(b){l.destroy(b)}finally{o.off("close",p).off("drain",p)}}i(lH,"writeIterable");var Hz=class{static{i(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:s,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=o,this.client=s,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Sa]=!0}write(e){let{socket:r,request:n,contentLength:o,client:s,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[wt])throw r[wt];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(o!==null&&a+p>o){if(s[i5])throw new ru;process.emitWarning(new ru)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[er]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!c&&n.reset!==!1&&(o[er]=!0),r[qi]()}catch(u){t(u)}}i(s6e,"writeBlob");async function EH(t,e,r,n,o,s,a,c){be(s!==0||r[I1]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let b=u;u=null,b()}}i(p,"onDrain");let A=i(()=>new Promise((b,M)=>{be(u===null),o[wt]?M(o[wt]):u=b}),"waitForDrain");o.on("close",p).on("drain",p);let l=new Yz({abort:t,socket:o,request:n,contentLength:s,client:r,expectsPayload:c,header:a});try{for await(let b of e){if(o[wt])throw o[wt];l.write(b)||await A()}l.end()}catch(b){l.destroy(b)}finally{o.off("close",p).off("drain",p)}}i(EH,"writeIterable");var Yz=class{static{i(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:s,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=o,this.client=s,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Fa]=!0}write(e){let{socket:r,request:n,contentLength:o,client:s,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[wt])throw r[wt];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(o!==null&&a+p>o){if(s[d5])throw new nu;process.emitWarning(new nu)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[er]=!0),o===null?r.write(`${u}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"):r.write(`${u}content-length: ${o}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1")),o===null&&r.write(`\r
|
|
|
|
|
${p.toString(16)}\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=p;let A=r.write(e);return r.uncork(),n.onBodySent(e),A||r[W0].timeout&&r[W0].timeoutType===IA&&r[W0].timeout.refresh&&r[W0].timeout.refresh(),A}end(){let{socket:e,contentLength:r,client:n,bytesWritten:o,expectsPayload:s,header:a,request:c}=this;if(c.onRequestSent(),e[Sa]=!1,e[wt])throw e[wt];if(!e.destroyed){if(o===0?s?e.write(`${a}content-length: 0\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=p;let A=r.write(e);return r.uncork(),n.onBodySent(e),A||r[W0].timeout&&r[W0].timeoutType===NA&&r[W0].timeout.refresh&&r[W0].timeout.refresh(),A}end(){let{socket:e,contentLength:r,client:n,bytesWritten:o,expectsPayload:s,header:a,request:c}=this;if(c.onRequestSent(),e[Fa]=!1,e[wt])throw e[wt];if(!e.destroyed){if(o===0?s?e.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):e.write(`${a}\r
|
|
|
|
|
`,"latin1"):r===null&&e.write(`\r
|
|
|
|
|
0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),r!==null&&o!==r){if(n[i5])throw new ru;process.emitWarning(new ru)}e[W0].timeout&&e[W0].timeoutType===IA&&e[W0].timeout.refresh&&e[W0].timeout.refresh(),n[Bi]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[Sa]=!1,e&&(be(n[I1]<=1,"pipeline should only contain this request"),o(e))}};hH.exports=Bwe});var DH=m((_B0,qH)=>{"use strict";var ln=require("node:assert"),{pipeline:Swe}=require("node:stream"),Je=He(),{RequestContentLengthMismatchError:A5,RequestAbortedError:OH,SocketError:cb,InformationalError:l5}=i0(),{kUrl:Xz,kReset:Yz,kClient:RA,kRunning:Jz,kPending:Fwe,kQueue:Fa,kPendingIdx:d5,kRunningIdx:oo,kError:io,kSocket:J1,kStrictContentLength:Wwe,kOnError:b5,kMaxConcurrentStreams:BH,kHTTP2Session:so,kResume:Wa,kSize:xwe,kHTTPContext:Twe}=k0(),qi=Symbol("open streams"),gH,EH=!1,Vz;try{Vz=require("node:http2")}catch{Vz={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:vwe,HTTP2_HEADER_METHOD:Lwe,HTTP2_HEADER_PATH:Qwe,HTTP2_HEADER_SCHEME:_we,HTTP2_HEADER_CONTENT_LENGTH:Pwe,HTTP2_HEADER_EXPECT:kwe,HTTP2_HEADER_STATUS:Uwe}}=Vz;function Gwe(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}i(Gwe,"parseH2Headers");async function Hwe(t,e){t[J1]=e,EH||(EH=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Vz.connect(t[Xz],{createConnection:i(()=>e,"createConnection"),peerMaxConcurrentStreams:t[BH]});r[qi]=0,r[RA]=t,r[J1]=e,Je.addListener(r,"error",Vwe),Je.addListener(r,"frameError",Ywe),Je.addListener(r,"end",Jwe),Je.addListener(r,"goaway",jwe),Je.addListener(r,"close",function(){let{[RA]:o}=this,{[J1]:s}=o,a=this[J1][io]||this[io]||new cb("closed",Je.getSocketInfo(s));if(o[so]=null,o.destroyed){ln(o[Fwe]===0);let c=o[Fa].splice(o[oo]);for(let u=0;u<c.length;u++){let p=c[u];Je.errorRequest(o,p,a)}}}),r.unref(),t[so]=r,e[so]=r,Je.addListener(e,"error",function(o){ln(o.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[io]=o,this[RA][b5](o)}),Je.addListener(e,"end",function(){Je.destroy(this,new cb("other side closed",Je.getSocketInfo(this)))}),Je.addListener(e,"close",function(){let o=this[io]||new cb("closed",Je.getSocketInfo(this));t[J1]=null,this[so]!=null&&this[so].destroy(o),t[d5]=t[oo],ln(t[Jz]===0),t.emit("disconnect",t[Xz],[t],o),t[Wa]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...o){return Kwe(t,...o)},resume(){Xwe(t)},destroy(o,s){n?queueMicrotask(s):e.destroy(o).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}i(Hwe,"connectH2");function Xwe(t){let e=t[J1];e?.destroyed===!1&&(t[xwe]===0&&t[BH]===0?(e.unref(),t[so].unref()):(e.ref(),t[so].ref()))}i(Xwe,"resumeH2");function Vwe(t){ln(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[J1][io]=t,this[RA][b5](t)}i(Vwe,"onHttp2SessionError");function Ywe(t,e,r){if(r===0){let n=new l5(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[J1][io]=n,this[RA][b5](n)}}i(Ywe,"onHttp2FrameError");function Jwe(){let t=new cb("other side closed",Je.getSocketInfo(this[J1]));this.destroy(t),Je.destroy(this[J1],t)}i(Jwe,"onHttp2SessionEnd");function jwe(t){let e=this[io]||new cb(`HTTP/2: "GOAWAY" frame received with code ${t}`,Je.getSocketInfo(this)),r=this[RA];if(r[J1]=null,r[Twe]=null,this[so]!=null&&(this[so].destroy(e),this[so]=null),Je.destroy(this[J1],e),r[oo]<r[Fa].length){let n=r[Fa][r[oo]];r[Fa][r[oo]++]=null,Je.errorRequest(r,n,e),r[d5]=r[oo]}ln(r[Jz]===0),r.emit("disconnect",r[Xz],[r],e),r[Wa]()}i(jwe,"onHTTP2GoAway");function $we(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}i($we,"shouldSendContentLength");function Kwe(t,e){let r=t[so],{method:n,path:o,host:s,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:A}=e;if(a)return Je.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let I=0;I<p.length;I+=2){let W=p[I+0],x=p[I+1];if(Array.isArray(x))for(let Q=0;Q<x.length;Q++)l[W]?l[W]+=`,${x[Q]}`:l[W]=x[Q];else l[W]=x}let b,{hostname:f,port:z}=t[Xz];l[vwe]=s||`${f}${z?`:${z}`:""}`,l[Lwe]=n;let g=i(I=>{e.aborted||e.completed||(I=I||new OH,Je.errorRequest(t,e,I),b!=null&&Je.destroy(b,I),Je.destroy(A,I),t[Fa][t[oo]++]=null,t[Wa]())},"abort");try{e.onConnect(g)}catch(I){Je.errorRequest(t,e,I)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),b=r.request(l,{endStream:!1,signal:u}),b.id&&!b.pending?(e.onUpgrade(null,null,b),++r[qi],t[Fa][t[oo]++]=null):b.once("ready",()=>{e.onUpgrade(null,null,b),++r[qi],t[Fa][t[oo]++]=null}),b.once("close",()=>{r[qi]-=1,r[qi]===0&&r.unref()}),!0;l[Qwe]=o,l[_we]="https";let y=n==="PUT"||n==="POST"||n==="PATCH";A&&typeof A.read=="function"&&A.read(0);let E=Je.bodyLength(A);if(Je.isFormDataLike(A)){gH??=BA().extractBody;let[I,W]=gH(A);l["content-type"]=W,A=I.stream,E=I.length}if(E==null&&(E=e.contentLength),(E===0||!y)&&(E=null),$we(n)&&E>0&&e.contentLength!=null&&e.contentLength!==E){if(t[Wwe])return Je.errorRequest(t,e,
Line truncated
|
|
|
|
|
`,this[y6e]=u??3e5,this[C6e]=o??3e5,this[B6e]=B??!0,this[q6e]=I,this[h5]=x,this[Ta]=null,this[w6e]=ue>-1?ue:-1,this[F6e]=Re??100,this[m1]=null,this[ao]=[],this[Ii]=0,this[co]=0,this[lb]=pe=>O5(this,pe),this[S6e]=pe=>QH(this,pe)}get pipelining(){return this[Zz]}set pipelining(e){this[Zz]=e,this[lb](!0)}get[Mb](){return this[ao].length-this[co]}get[bb](){return this[co]-this[Ii]}get[db](){return this[ao].length-this[Ii]}get[f6e](){return!!this[m1]&&!this[wA]&&!this[m1].destroyed}get[m5](){return!!(this[m1]?.busy(null)||this[db]>=(LH(this)||1)||this[Mb]>0)}[M6e](e){_H(this),this.once("connect",e)}[N6e](e,r){let n=e.origin||this[Vo].origin,o=new u6e(n,e,r);return this[ao].push(o),this[au]||(iu.bodyLength(o.body)==null&&iu.isIterable(o.body)?(this[au]=1,queueMicrotask(()=>O5(this))):this[lb](!0)),this[au]&&this[va]!==2&&this[m5]&&(this[va]=2),this[va]<2}async[I6e](){return new Promise(e=>{this[db]?this[Ta]=e:e(null)})}async[R6e](e){return new Promise(r=>{let n=this[ao].splice(this[co]);for(let s=0;s<n.length;s++){let a=n[s];iu.errorRequest(this,a,e)}let o=i(()=>{this[Ta]&&(this[Ta](),this[Ta]=null),r(null)},"callback");this[m1]?(this[m1].destroy(e,o),this[m1]=null):queueMicrotask(o),this[lb]()})}},T6e=Kz();function QH(t,e){if(t[bb]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Di(t[co]===t[Ii]);let r=t[ao].splice(t[Ii]);for(let n=0;n<r.length;n++){let o=r[n];iu.errorRequest(t,o,e)}Di(t[db]===0)}}i(QH,"onError");async function _H(t){Di(!t[wA]),Di(!t[m1]);let{host:e,hostname:r,protocol:n,port:o}=t[Vo];if(r[0]==="["){let s=r.indexOf("]");Di(s!==-1);let a=r.substring(1,s);Di(vH.isIP(a)),r=a}t[wA]=!0,NA.beforeConnect.hasSubscribers&&NA.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[m1]?.version,servername:t[xa],localAddress:t[Ab]},connector:t[pb]});try{let s=await new Promise((a,c)=>{t[pb]({host:e,hostname:r,protocol:n,port:o,servername:t[xa],localAddress:t[Ab]},(u,p)=>{u?c(u):a(p)})});if(t.destroyed){iu.destroy(s.on("error",xH),new l6e);return}Di(s);try{t[m1]=s.alpnProtocol==="h2"?await x6e(t,s):await W6e(t,s)}catch(a){throw s.destroy().on("error",xH),a}t[wA]=!1,s[D6e]=0,s[h5]=t[h5],s[b6e]=t,s[h6e]=null,NA.connected.hasSubscribers&&NA.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[m1]?.version,servername:t[xa],localAddress:t[Ab]},connector:t[pb],socket:s}),t.emit("connect",t[Vo],[t])}catch(s){if(t.destroyed)return;if(t[wA]=!1,NA.connectError.hasSubscribers&&NA.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[m1]?.version,servername:t[xa],localAddress:t[Ab]},connector:t[pb],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Di(t[bb]===0);t[Mb]>0&&t[ao][t[co]].servername===t[xa];){let a=t[ao][t[co]++];iu.errorRequest(t,a,s)}else QH(t,s);t.emit("connectionError",t[Vo],[t],s)}t[lb]()}i(_H,"connect");function TH(t){t[va]=0,t.emit("drain",t[Vo],[t])}i(TH,"emitDrain");function O5(t,e){t[au]!==2&&(t[au]=2,v6e(t,e),t[au]=0,t[Ii]>256&&(t[ao].splice(0,t[Ii]),t[co]-=t[Ii],t[Ii]=0))}i(O5,"resume");function v6e(t,e){for(;;){if(t.destroyed){Di(t[Mb]===0);return}if(t[Ta]&&!t[db]){t[Ta](),t[Ta]=null;return}if(t[m1]&&t[m1].resume(),t[m5])t[va]=2;else if(t[va]===2){e?(t[va]=1,queueMicrotask(()=>TH(t))):TH(t);continue}if(t[Mb]===0||t[bb]>=(LH(t)||1))return;let r=t[ao][t[co]];if(t[Vo].protocol==="https:"&&t[xa]!==r.servername){if(t[bb]>0)return;t[xa]=r.servername,t[m1]?.destroy(new A6e("servername changed"),()=>{t[m1]=null,O5(t)})}if(t[wA])return;if(!t[m1]){_H(t);return}if(t[m1].destroyed||t[m1].busy(r))return;!r.aborted&&t[m1].write(r)?t[co]++:t[ao].splice(t[co],1)}}i(v6e,"_resume");PH.exports=z5});var g5=m((JB0,kH)=>{"use strict";var eO=class{static{i(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};kH.exports=class{static{i(this,"FixedQueue")}constructor(){this.head=this.tail=new eO}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new eO),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var GH=m(($B0,UH)=>{var{kFree:L6e,kConnected:Q6e,kPending:_6e,kQueued:P6e,kRunning:k6e,kSize:U6e}=k0(),cu=Symbol("pool"),E5=class{static{i(this,"PoolStats")}constructor(e){this[cu]=e}get connected(){return this[cu][Q6e]}get free(){return this[cu][L6e]}get pending(){return this[cu][_6e]}get queued(){return this[cu][P6e]}get running(){return this[cu][k6e]}get size(){return this[cu][U6e]}};UH.exports=E5});var I5=m((ZB0,eX)=>{"use strict";var G6e=fA(),H6e=g5(),{kConnected:C5,kSize:HH,kRunning:XH,kPending:VH,kQueued:fb,kBusy:X6e,kFree:V6e,kUrl:Y6e,kClose:J6e,kDestroy:j6e,kDispatch:$6e}=k0(),K6e=GH(),tr=Symbol("cl
Line truncated
|
|
|
|
|
`,"latin1"),r!==null&&o!==r){if(n[d5])throw new nu;process.emitWarning(new nu)}e[W0].timeout&&e[W0].timeoutType===NA&&e[W0].timeout.refresh&&e[W0].timeout.refresh(),n[qi]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[Fa]=!1,e&&(be(n[I1]<=1,"pipeline should only contain this request"),o(e))}};IH.exports=Zwe});var vH=h((Eq0,TH)=>{"use strict";var dn=require("node:assert"),{pipeline:i6e}=require("node:stream"),Je=He(),{RequestContentLengthMismatchError:m5,RequestAbortedError:NH,SocketError:Ab,InformationalError:z5}=i0(),{kUrl:Jz,kReset:jz,kClient:wA,kRunning:Kz,kPending:a6e,kQueue:Wa,kPendingIdx:g5,kRunningIdx:io,kError:co,kSocket:J1,kStrictContentLength:c6e,kOnError:O5,kMaxConcurrentStreams:xH,kHTTP2Session:ao,kResume:xa,kSize:u6e,kHTTPContext:p6e}=k0(),Di=Symbol("open streams"),wH,SH=!1,$z;try{$z=require("node:http2")}catch{$z={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:A6e,HTTP2_HEADER_METHOD:l6e,HTTP2_HEADER_PATH:d6e,HTTP2_HEADER_SCHEME:b6e,HTTP2_HEADER_CONTENT_LENGTH:f6e,HTTP2_HEADER_EXPECT:M6e,HTTP2_HEADER_STATUS:h6e}}=$z;function m6e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}i(m6e,"parseH2Headers");async function z6e(t,e){t[J1]=e,SH||(SH=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=$z.connect(t[Jz],{createConnection:i(()=>e,"createConnection"),peerMaxConcurrentStreams:t[xH]});r[Di]=0,r[wA]=t,r[J1]=e,Je.addListener(r,"error",O6e),Je.addListener(r,"frameError",E6e),Je.addListener(r,"end",C6e),Je.addListener(r,"goaway",y6e),Je.addListener(r,"close",function(){let{[wA]:o}=this,{[J1]:s}=o,a=this[J1][co]||this[co]||new Ab("closed",Je.getSocketInfo(s));if(o[ao]=null,o.destroyed){dn(o[a6e]===0);let c=o[Wa].splice(o[io]);for(let u=0;u<c.length;u++){let p=c[u];Je.errorRequest(o,p,a)}}}),r.unref(),t[ao]=r,e[ao]=r,Je.addListener(e,"error",function(o){dn(o.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[co]=o,this[wA][O5](o)}),Je.addListener(e,"end",function(){Je.destroy(this,new Ab("other side closed",Je.getSocketInfo(this)))}),Je.addListener(e,"close",function(){let o=this[co]||new Ab("closed",Je.getSocketInfo(this));t[J1]=null,this[ao]!=null&&this[ao].destroy(o),t[g5]=t[io],dn(t[Kz]===0),t.emit("disconnect",t[Jz],[t],o),t[xa]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...o){return q6e(t,...o)},resume(){g6e(t)},destroy(o,s){n?queueMicrotask(s):e.destroy(o).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}i(z6e,"connectH2");function g6e(t){let e=t[J1];e?.destroyed===!1&&(t[u6e]===0&&t[xH]===0?(e.unref(),t[ao].unref()):(e.ref(),t[ao].ref()))}i(g6e,"resumeH2");function O6e(t){dn(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[J1][co]=t,this[wA][O5](t)}i(O6e,"onHttp2SessionError");function E6e(t,e,r){if(r===0){let n=new z5(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[J1][co]=n,this[wA][O5](n)}}i(E6e,"onHttp2FrameError");function C6e(){let t=new Ab("other side closed",Je.getSocketInfo(this[J1]));this.destroy(t),Je.destroy(this[J1],t)}i(C6e,"onHttp2SessionEnd");function y6e(t){let e=this[co]||new Ab(`HTTP/2: "GOAWAY" frame received with code ${t}`,Je.getSocketInfo(this)),r=this[wA];if(r[J1]=null,r[p6e]=null,this[ao]!=null&&(this[ao].destroy(e),this[ao]=null),Je.destroy(this[J1],e),r[io]<r[Wa].length){let n=r[Wa][r[io]];r[Wa][r[io]++]=null,Je.errorRequest(r,n,e),r[g5]=r[io]}dn(r[Kz]===0),r.emit("disconnect",r[Jz],[r],e),r[xa]()}i(y6e,"onHTTP2GoAway");function B6e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}i(B6e,"shouldSendContentLength");function q6e(t,e){let r=t[ao],{method:n,path:o,host:s,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:A}=e;if(a)return Je.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let I=0;I<p.length;I+=2){let W=p[I+0],x=p[I+1];if(Array.isArray(x))for(let L=0;L<x.length;L++)l[W]?l[W]+=`,${x[L]}`:l[W]=x[L];else l[W]=x}let b,{hostname:M,port:z}=t[Jz];l[A6e]=s||`${M}${z?`:${z}`:""}`,l[l6e]=n;let O=i(I=>{e.aborted||e.completed||(I=I||new NH,Je.errorRequest(t,e,I),b!=null&&Je.destroy(b,I),Je.destroy(A,I),t[Wa][t[io]++]=null,t[xa]())},"abort");try{e.onConnect(O)}catch(I){Je.errorRequest(t,e,I)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),b=r.request(l,{endStream:!1,signal:u}),b.id&&!b.pending?(e.onUpgrade(null,null,b),++r[Di],t[Wa][t[io]++]=null):b.once("ready",()=>{e.onUpgrade(null,null,b),++r[Di],t[Wa][t[io]++]=null}),b.once("close",()=>{r[Di]-=1,r[Di]===0&&r.unref()}),!0;l[d6e]=o,l[b6e]="https";let y=n==="PUT"||n==="POST"||n==="PATCH";A&&typeof A.read=="function"&&A.read(0);let E=Je.bodyLength(A);if(Je.isFormDataLike(A)){wH??=DA().extractBody;let[I,W]=wH(A);l["content-type"]=W,A=I.stream,E=I.length}if(E==null&&(E=e.contentLength),(E===0||!y)&&(E=null),B6e(n)&&E>0&&e.contentLength!=null&&e.contentLength!==E){if(t[c6e])return Je.errorRequest(t,e,
Line truncated
|
|
|
|
|
`,this[K6e]=u??3e5,this[j6e]=o??3e5,this[Z6e]=B??!0,this[eSe]=I,this[B5]=x,this[va]=null,this[sSe]=ue>-1?ue:-1,this[aSe]=ye??100,this[h1]=null,this[uo]=[],this[Ri]=0,this[po]=0,this[fb]=pe=>D5(this,pe),this[iSe]=pe=>JH(this,pe)}get pipelining(){return this[rg]}set pipelining(e){this[rg]=e,this[fb](!0)}get[mb](){return this[uo].length-this[po]}get[hb](){return this[po]-this[Ri]}get[Mb](){return this[uo].length-this[Ri]}get[G6e](){return!!this[h1]&&!this[FA]&&!this[h1].destroyed}get[y5](){return!!(this[h1]?.busy(null)||this[Mb]>=(YH(this)||1)||this[mb]>0)}[U6e](e){$H(this),this.once("connect",e)}[oSe](e,r){let n=e.origin||this[Jo].origin,o=new v6e(n,e,r);return this[uo].push(o),this[cu]||(au.bodyLength(o.body)==null&&au.isIterable(o.body)?(this[cu]=1,queueMicrotask(()=>D5(this))):this[fb](!0)),this[cu]&&this[La]!==2&&this[y5]&&(this[La]=2),this[La]<2}async[rSe](){return new Promise(e=>{this[Mb]?this[va]=e:e(null)})}async[nSe](e){return new Promise(r=>{let n=this[uo].splice(this[po]);for(let s=0;s<n.length;s++){let a=n[s];au.errorRequest(this,a,e)}let o=i(()=>{this[va]&&(this[va](),this[va]=null),r(null)},"callback");this[h1]?(this[h1].destroy(e,o),this[h1]=null):queueMicrotask(o),this[fb]()})}},pSe=tg();function JH(t,e){if(t[hb]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Ii(t[po]===t[Ri]);let r=t[uo].splice(t[Ri]);for(let n=0;n<r.length;n++){let o=r[n];au.errorRequest(t,o,e)}Ii(t[Mb]===0)}}i(JH,"onError");async function $H(t){Ii(!t[FA]),Ii(!t[h1]);let{host:e,hostname:r,protocol:n,port:o}=t[Jo];if(r[0]==="["){let s=r.indexOf("]");Ii(s!==-1);let a=r.substring(1,s);Ii(VH.isIP(a)),r=a}t[FA]=!0,SA.beforeConnect.hasSubscribers&&SA.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[h1]?.version,servername:t[Ta],localAddress:t[bb]},connector:t[db]});try{let s=await new Promise((a,c)=>{t[db]({host:e,hostname:r,protocol:n,port:o,servername:t[Ta],localAddress:t[bb]},(u,p)=>{u?c(u):a(p)})});if(t.destroyed){au.destroy(s.on("error",HH),new _6e);return}Ii(s);try{t[h1]=s.alpnProtocol==="h2"?await uSe(t,s):await cSe(t,s)}catch(a){throw s.destroy().on("error",HH),a}t[FA]=!1,s[tSe]=0,s[B5]=t[B5],s[k6e]=t,s[X6e]=null,SA.connected.hasSubscribers&&SA.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[h1]?.version,servername:t[Ta],localAddress:t[bb]},connector:t[db],socket:s}),t.emit("connect",t[Jo],[t])}catch(s){if(t.destroyed)return;if(t[FA]=!1,SA.connectError.hasSubscribers&&SA.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:o,version:t[h1]?.version,servername:t[Ta],localAddress:t[bb]},connector:t[db],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Ii(t[hb]===0);t[mb]>0&&t[uo][t[po]].servername===t[Ta];){let a=t[uo][t[po]++];au.errorRequest(t,a,s)}else JH(t,s);t.emit("connectionError",t[Jo],[t],s)}t[fb]()}i($H,"connect");function XH(t){t[La]=0,t.emit("drain",t[Jo],[t])}i(XH,"emitDrain");function D5(t,e){t[cu]!==2&&(t[cu]=2,ASe(t,e),t[cu]=0,t[Ri]>256&&(t[uo].splice(0,t[Ri]),t[po]-=t[Ri],t[Ri]=0))}i(D5,"resume");function ASe(t,e){for(;;){if(t.destroyed){Ii(t[mb]===0);return}if(t[va]&&!t[Mb]){t[va](),t[va]=null;return}if(t[h1]&&t[h1].resume(),t[y5])t[La]=2;else if(t[La]===2){e?(t[La]=1,queueMicrotask(()=>XH(t))):XH(t);continue}if(t[mb]===0||t[hb]>=(YH(t)||1))return;let r=t[uo][t[po]];if(t[Jo].protocol==="https:"&&t[Ta]!==r.servername){if(t[hb]>0)return;t[Ta]=r.servername,t[h1]?.destroy(new Q6e("servername changed"),()=>{t[h1]=null,D5(t)})}if(t[FA])return;if(!t[h1]){$H(t);return}if(t[h1].destroyed||t[h1].busy(r))return;!r.aborted&&t[h1].write(r)?t[po]++:t[uo].splice(t[po],1)}}i(ASe,"_resume");jH.exports=q5});var I5=h((wq0,KH)=>{"use strict";var ng=class{static{i(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};KH.exports=class{static{i(this,"FixedQueue")}constructor(){this.head=this.tail=new ng}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new ng),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var eX=h((Fq0,ZH)=>{var{kFree:lSe,kConnected:dSe,kPending:bSe,kQueued:fSe,kRunning:MSe,kSize:hSe}=k0(),uu=Symbol("pool"),R5=class{static{i(this,"PoolStats")}constructor(e){this[uu]=e}get connected(){return this[uu][dSe]}get free(){return this[uu][lSe]}get pending(){return this[uu][bSe]}get queued(){return this[uu][fSe]}get running(){return this[uu][MSe]}get size(){return this[uu][hSe]}};ZH.exports=R5});var x5=h((xq0,pX)=>{"use strict";var mSe=mA(),zSe=I5(),{kConnected:N5,kSize:tX,kRunning:rX,kPending:nX,kQueued:zb,kBusy:gSe,kFree:OSe,kUrl:ESe,kClose:CSe,kDestroy:ySe,kDispatch:BSe}=k0(),qSe=eX(),tr=Symbol("cl
Line truncated
|
|
|
|
|
${n.count} ${n.noun} ${n.is} pending:
|
|
|
|
|
|
|
|
|
|
${e.format(r)}
|
|
|
|
|
`.trim())}};iY.exports=IR});var hO=m(($q0,AY)=>{"use strict";var cY=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:yWe}=i0(),BWe=WA();pY()===void 0&&uY(new BWe);function uY(t){if(!t||typeof t.dispatch!="function")throw new yWe("Argument agent must implement Agent");Object.defineProperty(globalThis,cY,{value:t,writable:!0,enumerable:!1,configurable:!1})}i(uY,"setGlobalDispatcher");function pY(){return globalThis[cY]}i(pY,"getGlobalDispatcher");AY.exports={setGlobalDispatcher:uY,getGlobalDispatcher:pY}});var zO=m((eD0,lY)=>{"use strict";lY.exports=class{static{i(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var bY=m((rD0,dY)=>{"use strict";var qWe=$z();dY.exports=t=>{let e=t?.maxRedirections;return r=>i(function(o,s){let{maxRedirections:a=e,...c}=o;if(!a)return r(o,s);let u=new qWe(r,a,o,s);return r(c,u)},"redirectInterceptor")}});var fY=m((oD0,MY)=>{"use strict";var DWe=cO();MY.exports=t=>e=>i(function(n,o){return e(n,new DWe({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});var hY=m((iD0,mY)=>{"use strict";var IWe=He(),{InvalidArgumentError:RWe,RequestAbortedError:NWe}=i0(),wWe=zO(),RR=class extends wWe{static{i(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#o=0;#s=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new RWe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#i.bind(this))}#i(e){this.#r=!0,this.#s=e}onHeaders(e,r,n,o){let a=IWe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new NWe(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,o)}onError(e){this.#n||(e=this.#s??e,this.#a.onError(e))}onData(e){return this.#o=this.#o+e.length,this.#o>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#s):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function SWe({maxSize:t}={maxSize:1024*1024}){return e=>i(function(n,o){let{dumpMaxSize:s=t}=n,a=new RR({maxSize:s},o);return e(n,a)},"Intercept")}i(SWe,"createDumpInterceptor");mY.exports=SWe});var gY=m((cD0,OY)=>{"use strict";var{isIP:FWe}=require("node:net"),{lookup:WWe}=require("node:dns"),xWe=zO(),{InvalidArgumentError:GA,InformationalError:TWe}=i0(),zY=Math.pow(2,31)-1,NR=class{static{i(this,"DNSInstance")}#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#o}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let o=this.#n.get(e.hostname);if(o==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,s,(a,c)=>{if(a||c==null||c.length===0){n(a??new TWe("No DNS entries found"));return}this.setRecords(e,c);let u=this.#n.get(e.hostname),p=this.pick(e,u,s.affinity),A;typeof p.port=="number"?A=`:${p.port}`:e.port!==""?A=`:${e.port}`:A="",n(null,`${e.protocol}//${p.family===6?`[${p.address}]`:p.address}${A}`)});else{let a=this.pick(e,o,s.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#r(e,r,n){WWe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,s)=>{if(o)return n(o);let a=new Map;for(let c of s)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#o(e,r,n){let o=null,{records:s,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===zY?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?c=s[n]:c=s[n===4?6:4]):c=s[n],c==null||c.ips.length===0)return o;c.offset==null||c.offset===zY?c.offset=0:c.offset++;let u=c.offset%c.ips.length;return o=c.ips[u]??null,o==null?o:Date.now()-o.timestamp>o.ttl?(c.ips.splice(u,1),this.pick(e,r,n)):o}setRecords(e,r){let n=Date.now(),o={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let a=o.records[s.family]??{ips:[]};a.ips.push(s),o.records[s.family]=a}this.#n.set(e.hostname,o)}getHandler(e,r){return new wR(this,e,r)}},wR=class extends xWe{static{i(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null
Line truncated
|
|
|
|
|
${s}`;break;case"retry":e$(s)&&(r[o]=s);break;case"id":t$(s)&&(r[o]=s);break;case"event":s.length>0&&(r[o]=s);break}}processEvent(e){e.retry&&e$(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&t$(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};r$.exports={EventSourceStream:hN}});var A$=m((AI0,p$)=>{"use strict";var{pipeline:GLe}=require("node:stream"),{fetching:HLe}=Nb(),{makeRequest:XLe}=VA(),{webidl:Fi}=st(),{EventSourceStream:VLe}=n$(),{parseMIMEType:YLe}=Zt(),{createFastMessageEvent:JLe}=ZA(),{isNetworkError:o$}=Ib(),{delay:jLe}=fN(),{kEnumerableProperty:Cu}=He(),{environmentSettingsObject:s$}=Ir(),i$=!1,a$=3e3,Gb=0,c$=1,Hb=2,$Le="anonymous",KLe="use-credentials",ol=class t extends EventTarget{static{i(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=Gb;#o=null;#s=null;#a;#i;constructor(e,r={}){super(),Fi.util.markAsUncloneable(this);let n="EventSource constructor";Fi.argumentLengthCheck(arguments,1,n),i$||(i$=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Fi.converters.USVString(e,n,"url"),r=Fi.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#i={lastEventId:"",reconnectionTime:a$};let o=s$,s;try{s=new URL(e,o.settingsObject.baseUrl),this.#i.origin=s.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=s.href;let a=$Le;r.withCredentials&&(a=KLe,this.#n=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=s$.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#o=XLe(c),this.#u()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#u(){if(this.#r===Hb)return;this.#r=Gb;let e={request:this.#o,dispatcher:this.#a},r=i(n=>{o$(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(o$(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let o=n.headersList.get("content-type",!0),s=o!==null?YLe(o):"failure",a=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=c$,this.dispatchEvent(new Event("open")),this.#i.origin=n.urlList[n.urlList.length-1].origin;let c=new VLe({eventSourceSettings:this.#i,push:i(u=>{this.dispatchEvent(JLe(u.type,u.options))},"push")});GLe(n.body.stream,c,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#s=HLe(e)}async#c(){this.#r!==Hb&&(this.#r=Gb,this.dispatchEvent(new Event("error")),await jLe(this.#i.reconnectionTime),this.#r===Gb&&(this.#i.lastEventId.length&&this.#o.headersList.set("last-event-id",this.#i.lastEventId,!0),this.#u()))}close(){Fi.brandCheck(this,t),this.#r!==Hb&&(this.#r=Hb,this.#s.abort(),this.#o=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},u$={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Gb,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:c$,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Hb,writable:!1}};Object.defineProperties(ol,u$);Object.defineProperties(ol.prototype,u$);Object.defineProperties(ol.prototype,{close:Cu,onerror:Cu,onmessage:Cu,onopen:Cu,readyState:Cu,url:Cu,withCredentials:Cu});Fi.converters.EventSourceInitDict=Fi.dictionaryConverter([{key:"withCredentials",converter:Fi.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"dispatcher",converter:Fi.converters.any}]);p$.exports={EventSource:ol,defaultReconnectionTime:a$}});var il=m((dI0,ze)=>{"use strict";var ZLe=SA(),l$=Yd(),eQe=FA(),tQe=uX(),rQe=WA(),nQe=P5(),oQe=FX(),sQe=QX(),d$=i0(),ig=He(),{InvalidArgumentError:sg}=d$,sl=BV(),iQe=jd(),aQe=ER(),cQe=aY(),uQe=BR(),pQe=uR(),AQe=cO(),{getGlobalDispatcher:b$,setGlobalDispatcher:lQe}=hO(),dQe=zO(),bQe=$z(),MQe=Kz();Object.assign(l$.prototype,sl);ze.exports.Dispatcher=l$;ze.exports.Client=ZLe;ze.exports.Pool=eQe;ze.exports.BalancedPool=tQe;ze.exports.Agent=rQe;ze.exports.
Line truncated
|
|
|
|
|
%s`,W,W,B,n);var x=B.type==="*"?Cw:B.type==="?"?Ew:"\\"+B.type;o=!0,n=n.slice(0,B.reStart)+x+"\\("+W}z(),s&&(n+="\\\\");var Q=!1;switch(n.charAt(0)){case"[":case".":case"(":Q=!0}for(var ue=c.length-1;ue>-1;ue--){var qe=c[ue],Qe=n.slice(0,qe.reStart),Re=n.slice(qe.reStart,qe.reEnd-8),ge=n.slice(qe.reEnd-8,qe.reEnd),Ue=n.slice(qe.reEnd);ge+=Ue;var pe=Qe.split("(").length-1,Ge=Ue;for(g=0;g<pe;g++)Ge=Ge.replace(/\)[+*?]?/,"");Ue=Ge;var J="";Ue===""&&e!==Ng&&(J="$");var _e=Qe+Re+Ue+J+ge;n=_e}if(n!==""&&o&&(n="(?=.)"+n),Q&&(n=b+n),e===Ng)return[n,o];if(!o)return wke(t);var g0=r.nocase?"i":"";try{var ft=new RegExp("^"+n+"$",g0)}catch{return new RegExp("$.")}return ft._glob=t,ft._src=n,ft}i(Rke,"parse");Pr.makeRe=function(t,e){return new ct(t,e||{}).makeRe()};ct.prototype.makeRe=Nke;function Nke(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?Cw:e.dot?Eke:Cke,n=e.nocase?"i":"",o=t.map(function(s){return s.map(function(a){return a===yw?r:typeof a=="string"?Ske(a):a._src}).join("\\/")}).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,n)}catch{this.regexp=!1}return this.regexp}i(Nke,"makeRe");Pr.match=function(t,e,r){r=r||{};var n=new ct(e,r);return t=t.filter(function(o){return n.match(o)}),n.options.nonull&&!t.length&&t.push(e),t};ct.prototype.match=i(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;dM.sep!=="/"&&(e=e.split(dM.sep).join("/")),e=e.split(zee),this.debug(this.pattern,"split",e);var o=this.set;this.debug(this.pattern,"set",o);var s,a;for(a=e.length-1;a>=0&&(s=e[a],!s);a--);for(a=0;a<o.length;a++){var c=o[a],u=e;n.matchBase&&c.length===1&&(u=[s]);var p=this.matchOne(u,c,r);if(p)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");ct.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,s=0,a=t.length,c=e.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u=e[s],p=t[o];if(this.debug(e,u,p),u===!1)return!1;if(u===yw){this.debug("GLOBSTAR",[e,u,p]);var A=o,l=s+1;if(l===c){for(this.debug("** at the end");o<a;o++)if(t[o]==="."||t[o]===".."||!n.dot&&t[o].charAt(0)===".")return!1;return!0}for(;A<a;){var b=t[A];if(this.debug(`
|
|
|
|
|
`.trim())}};hY.exports=xR});var Og=h((FD0,EY)=>{"use strict";var zY=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:KWe}=i0(),ZWe=TA();OY()===void 0&&gY(new ZWe);function gY(t){if(!t||typeof t.dispatch!="function")throw new KWe("Argument agent must implement Agent");Object.defineProperty(globalThis,zY,{value:t,writable:!0,enumerable:!1,configurable:!1})}i(gY,"setGlobalDispatcher");function OY(){return globalThis[zY]}i(OY,"getGlobalDispatcher");EY.exports={setGlobalDispatcher:gY,getGlobalDispatcher:OY}});var Eg=h((TD0,CY)=>{"use strict";CY.exports=class{static{i(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var BY=h((LD0,yY)=>{"use strict";var exe=eg();yY.exports=t=>{let e=t?.maxRedirections;return r=>i(function(o,s){let{maxRedirections:a=e,...c}=o;if(!a)return r(o,s);let u=new exe(r,a,o,s);return r(c,u)},"redirectInterceptor")}});var DY=h((_D0,qY)=>{"use strict";var txe=Ag();qY.exports=t=>e=>i(function(n,o){return e(n,new txe({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});var RY=h((kD0,IY)=>{"use strict";var rxe=He(),{InvalidArgumentError:nxe,RequestAbortedError:oxe}=i0(),sxe=Eg(),TR=class extends sxe{static{i(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#o=0;#s=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new nxe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#i.bind(this))}#i(e){this.#r=!0,this.#s=e}onHeaders(e,r,n,o){let a=rxe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new oxe(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,o)}onError(e){this.#n||(e=this.#s??e,this.#a.onError(e))}onData(e){return this.#o=this.#o+e.length,this.#o>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#s):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function ixe({maxSize:t}={maxSize:1024*1024}){return e=>i(function(n,o){let{dumpMaxSize:s=t}=n,a=new TR({maxSize:s},o);return e(n,a)},"Intercept")}i(ixe,"createDumpInterceptor");IY.exports=ixe});var SY=h((GD0,wY)=>{"use strict";var{isIP:axe}=require("node:net"),{lookup:cxe}=require("node:dns"),uxe=Eg(),{InvalidArgumentError:VA,InformationalError:pxe}=i0(),NY=Math.pow(2,31)-1,vR=class{static{i(this,"DNSInstance")}#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#o}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let o=this.#n.get(e.hostname);if(o==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,s,(a,c)=>{if(a||c==null||c.length===0){n(a??new pxe("No DNS entries found"));return}this.setRecords(e,c);let u=this.#n.get(e.hostname),p=this.pick(e,u,s.affinity),A;typeof p.port=="number"?A=`:${p.port}`:e.port!==""?A=`:${e.port}`:A="",n(null,`${e.protocol}//${p.family===6?`[${p.address}]`:p.address}${A}`)});else{let a=this.pick(e,o,s.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#r(e,r,n){cxe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,s)=>{if(o)return n(o);let a=new Map;for(let c of s)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#o(e,r,n){let o=null,{records:s,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===NY?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?c=s[n]:c=s[n===4?6:4]):c=s[n],c==null||c.ips.length===0)return o;c.offset==null||c.offset===NY?c.offset=0:c.offset++;let u=c.offset%c.ips.length;return o=c.ips[u]??null,o==null?o:Date.now()-o.timestamp>o.ttl?(c.ips.splice(u,1),this.pick(e,r,n)):o}setRecords(e,r){let n=Date.now(),o={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let a=o.records[s.family]??{ips:[]};a.ips.push(s),o.records[s.family]=a}this.#n.set(e.hostname,o)}getHandler(e,r){return new LR(this,e,r)}},LR=class extends uxe{static{i(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null
Line truncated
|
|
|
|
|
${s}`;break;case"retry":pj(s)&&(r[o]=s);break;case"id":Aj(s)&&(r[o]=s);break;case"event":s.length>0&&(r[o]=s);break}}processEvent(e){e.retry&&pj(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Aj(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};lj.exports={EventSourceStream:DN}});var Oj=h((VI0,gj)=>{"use strict";var{pipeline:mQe}=require("node:stream"),{fetching:zQe}=Sb(),{makeRequest:gQe}=$A(),{webidl:Wi}=st(),{EventSourceStream:OQe}=dj(),{parseMIMEType:EQe}=Zt(),{createFastMessageEvent:CQe}=rl(),{isNetworkError:bj}=Nb(),{delay:yQe}=BN(),{kEnumerableProperty:yu}=He(),{environmentSettingsObject:fj}=Rr(),Mj=!1,hj=3e3,Xb=0,mj=1,Vb=2,BQe="anonymous",qQe="use-credentials",al=class t extends EventTarget{static{i(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=Xb;#o=null;#s=null;#a;#i;constructor(e,r={}){super(),Wi.util.markAsUncloneable(this);let n="EventSource constructor";Wi.argumentLengthCheck(arguments,1,n),Mj||(Mj=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Wi.converters.USVString(e,n,"url"),r=Wi.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#i={lastEventId:"",reconnectionTime:hj};let o=fj,s;try{s=new URL(e,o.settingsObject.baseUrl),this.#i.origin=s.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=s.href;let a=BQe;r.withCredentials&&(a=qQe,this.#n=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=fj.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#o=gQe(c),this.#u()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#u(){if(this.#r===Vb)return;this.#r=Xb;let e={request:this.#o,dispatcher:this.#a},r=i(n=>{bj(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(bj(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let o=n.headersList.get("content-type",!0),s=o!==null?EQe(o):"failure",a=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=mj,this.dispatchEvent(new Event("open")),this.#i.origin=n.urlList[n.urlList.length-1].origin;let c=new OQe({eventSourceSettings:this.#i,push:i(u=>{this.dispatchEvent(CQe(u.type,u.options))},"push")});mQe(n.body.stream,c,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#s=zQe(e)}async#c(){this.#r!==Vb&&(this.#r=Xb,this.dispatchEvent(new Event("error")),await yQe(this.#i.reconnectionTime),this.#r===Xb&&(this.#i.lastEventId.length&&this.#o.headersList.set("last-event-id",this.#i.lastEventId,!0),this.#u()))}close(){Wi.brandCheck(this,t),this.#r!==Vb&&(this.#r=Vb,this.#s.abort(),this.#o=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},zj={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Xb,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:mj,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Vb,writable:!1}};Object.defineProperties(al,zj);Object.defineProperties(al.prototype,zj);Object.defineProperties(al.prototype,{close:yu,onerror:yu,onmessage:yu,onopen:yu,readyState:yu,url:yu,withCredentials:yu});Wi.converters.EventSourceInitDict=Wi.dictionaryConverter([{key:"withCredentials",converter:Wi.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"dispatcher",converter:Wi.converters.any}]);gj.exports={EventSource:al,defaultReconnectionTime:hj}});var ul=h((JI0,ge)=>{"use strict";var DQe=WA(),Ej=jd(),IQe=xA(),RQe=zX(),NQe=TA(),wQe=Y5(),SQe=UX(),FQe=$X(),Cj=i0(),uO=He(),{InvalidArgumentError:cO}=Cj,cl=TV(),WQe=Zd(),xQe=RR(),TQe=mY(),vQe=SR(),LQe=MR(),QQe=Ag(),{getGlobalDispatcher:yj,setGlobalDispatcher:_Qe}=Og(),PQe=Eg(),kQe=eg(),UQe=tg();Object.assign(Ej.prototype,cl);ge.exports.Dispatcher=Ej;ge.exports.Client=DQe;ge.exports.Pool=IQe;ge.exports.BalancedPool=RQe;ge.exports.Agent=NQe;ge.exports.
Line truncated
|
|
|
|
|
%s`,W,W,B,n);var x=B.type==="*"?Fw:B.type==="?"?Sw:"\\"+B.type;o=!0,n=n.slice(0,B.reStart)+x+"\\("+W}z(),s&&(n+="\\\\");var L=!1;switch(n.charAt(0)){case"[":case".":case"(":L=!0}for(var ue=c.length-1;ue>-1;ue--){var De=c[ue],Qe=n.slice(0,De.reStart),ye=n.slice(De.reStart,De.reEnd-8),me=n.slice(De.reEnd-8,De.reEnd),Ue=n.slice(De.reEnd);me+=Ue;var pe=Qe.split("(").length-1,Ge=Ue;for(O=0;O<pe;O++)Ge=Ge.replace(/\)[+*?]?/,"");Ue=Ge;var J="";Ue===""&&e!==FO&&(J="$");var _e=Qe+ye+Ue+J+me;n=_e}if(n!==""&&o&&(n="(?=.)"+n),L&&(n=b+n),e===FO)return[n,o];if(!o)return p7e(t);var C0=r.nocase?"i":"";try{var Mt=new RegExp("^"+n+"$",C0)}catch{return new RegExp("$.")}return Mt._glob=t,Mt._src=n,Mt}i(c7e,"parse");kr.makeRe=function(t,e){return new ct(t,e||{}).makeRe()};ct.prototype.makeRe=u7e;function u7e(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?Fw:e.dot?t7e:r7e,n=e.nocase?"i":"",o=t.map(function(s){return s.map(function(a){return a===Ww?r:typeof a=="string"?A7e(a):a._src}).join("\\/")}).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,n)}catch{this.regexp=!1}return this.regexp}i(u7e,"makeRe");kr.match=function(t,e,r){r=r||{};var n=new ct(e,r);return t=t.filter(function(o){return n.match(o)}),n.options.nonull&&!t.length&&t.push(e),t};ct.prototype.match=i(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;hf.sep!=="/"&&(e=e.split(hf.sep).join("/")),e=e.split(Ree),this.debug(this.pattern,"split",e);var o=this.set;this.debug(this.pattern,"set",o);var s,a;for(a=e.length-1;a>=0&&(s=e[a],!s);a--);for(a=0;a<o.length;a++){var c=o[a],u=e;n.matchBase&&c.length===1&&(u=[s]);var p=this.matchOne(u,c,r);if(p)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");ct.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,s=0,a=t.length,c=e.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var u=e[s],p=t[o];if(this.debug(e,u,p),u===!1)return!1;if(u===Ww){this.debug("GLOBSTAR",[e,u,p]);var A=o,l=s+1;if(l===c){for(this.debug("** at the end");o<a;o++)if(t[o]==="."||t[o]===".."||!n.dot&&t[o].charAt(0)===".")return!1;return!0}for(;A<a;){var b=t[A];if(this.debug(`
|
|
|
|
|
globstar while`,t,A,e,l,b),this.matchOne(t.slice(A),e.slice(l),r))return this.debug("globstar found match!",A,a,b),!0;if(b==="."||b===".."||!n.dot&&b.charAt(0)==="."){this.debug("dot detected!",t,A,e,l);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(r&&(this.debug(`
|
|
|
|
|
>>> no match, partial?`,t,A,e,l),A===a))}var f;if(typeof u=="string"?(f=p===u,this.debug("string match",u,p,f)):(f=p.match(u),this.debug("pattern match",u,p,f)),!f)return!1}if(o===a&&s===c)return!0;if(o===a)return r;if(s===c)return o===a-1&&t[o]==="";throw new Error("wtf?")};function wke(t){return t.replace(/\\(.)/g,"$1")}i(wke,"globUnescape");function Ske(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}i(Ske,"regExpEscape")});var ml=m((Uw0,qee)=>{"use strict";var _ke="2.0.0",Pke=Number.MAX_SAFE_INTEGER||9007199254740991,kke=16,Uke=250,Gke=["major","premajor","minor","preminor","patch","prepatch","prerelease"];qee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:kke,MAX_SAFE_BUILD_LENGTH:Uke,MAX_SAFE_INTEGER:Pke,RELEASE_TYPES:Gke,SEMVER_SPEC_VERSION:_ke,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var fM=m((Gw0,Dee)=>{"use strict";var Hke=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Dee.exports=Hke});var hl=m((rs,Iee)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:qw,MAX_SAFE_BUILD_LENGTH:Xke,MAX_LENGTH:Vke}=ml(),Yke=fM();rs=Iee.exports={};var Jke=rs.re=[],jke=rs.safeRe=[],Z=rs.src=[],$ke=rs.safeSrc=[],ee=rs.t={},Kke=0,Dw="[a-zA-Z0-9-]",Zke=[["\\s",1],["\\d",Vke],[Dw,Xke]],e7e=i(t=>{for(let[e,r]of Zke)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),Fe=i((t,e,r)=>{let n=e7e(e),o=Kke++;Yke(t,o,e),ee[t]=o,Z[o]=e,$ke[o]=n,Jke[o]=new RegExp(e,r?"g":void 0),jke[o]=new RegExp(n,r?"g":void 0)},"createToken");Fe("NUMERICIDENTIFIER","0|[1-9]\\d*");Fe("NUMERICIDENTIFIERLOOSE","\\d+");Fe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Dw}*`);Fe("MAINVERSION",`(${Z[ee.NUMERICIDENTIFIER]})\\.(${Z[ee.NUMERICIDENTIFIER]})\\.(${Z[ee.NUMERICIDENTIFIER]})`);Fe("MAINVERSIONLOOSE",`(${Z[ee.NUMERICIDENTIFIERLOOSE]})\\.(${Z[ee.NUMERICIDENTIFIERLOOSE]})\\.(${Z[ee.NUMERICIDENTIFIERLOOSE]})`);Fe("PRERELEASEIDENTIFIER",`(?:${Z[ee.NONNUMERICIDENTIFIER]}|${Z[ee.NUMERICIDENTIFIER]})`);Fe("PRERELEASEIDENTIFIERLOOSE",`(?:${Z[ee.NONNUMERICIDENTIFIER]}|${Z[ee.NUMERICIDENTIFIERLOOSE]})`);Fe("PRERELEASE",`(?:-(${Z[ee.PRERELEASEIDENTIFIER]}(?:\\.${Z[ee.PRERELEASEIDENTIFIER]})*))`);Fe("PRERELEASELOOSE",`(?:-?(${Z[ee.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Z[ee.PRERELEASEIDENTIFIERLOOSE]})*))`);Fe("BUILDIDENTIFIER",`${Dw}+`);Fe("BUILD",`(?:\\+(${Z[ee.BUILDIDENTIFIER]}(?:\\.${Z[ee.BUILDIDENTIFIER]})*))`);Fe("FULLPLAIN",`v?${Z[ee.MAINVERSION]}${Z[ee.PRERELEASE]}?${Z[ee.BUILD]}?`);Fe("FULL",`^${Z[ee.FULLPLAIN]}$`);Fe("LOOSEPLAIN",`[v=\\s]*${Z[ee.MAINVERSIONLOOSE]}${Z[ee.PRERELEASELOOSE]}?${Z[ee.BUILD]}?`);Fe("LOOSE",`^${Z[ee.LOOSEPLAIN]}$`);Fe("GTLT","((?:<|>)?=?)");Fe("XRANGEIDENTIFIERLOOSE",`${Z[ee.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Fe("XRANGEIDENTIFIER",`${Z[ee.NUMERICIDENTIFIER]}|x|X|\\*`);Fe("XRANGEPLAIN",`[v=\\s]*(${Z[ee.XRANGEIDENTIFIER]})(?:\\.(${Z[ee.XRANGEIDENTIFIER]})(?:\\.(${Z[ee.XRANGEIDENTIFIER]})(?:${Z[ee.PRERELEASE]})?${Z[ee.BUILD]}?)?)?`);Fe("XRANGEPLAINLOOSE",`[v=\\s]*(${Z[ee.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Z[ee.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Z[ee.XRANGEIDENTIFIERLOOSE]})(?:${Z[ee.PRERELEASELOOSE]})?${Z[ee.BUILD]}?)?)?`);Fe("XRANGE",`^${Z[ee.GTLT]}\\s*${Z[ee.XRANGEPLAIN]}$`);Fe("XRANGELOOSE",`^${Z[ee.GTLT]}\\s*${Z[ee.XRANGEPLAINLOOSE]}$`);Fe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${qw}})(?:\\.(\\d{1,${qw}}))?(?:\\.(\\d{1,${qw}}))?`);Fe("COERCE",`${Z[ee.COERCEPLAIN]}(?:$|[^\\d])`);Fe("COERCEFULL",Z[ee.COERCEPLAIN]+`(?:${Z[ee.PRERELEASE]})?(?:${Z[ee.BUILD]})?(?:$|[^\\d])`);Fe("COERCERTL",Z[ee.COERCE],!0);Fe("COERCERTLFULL",Z[ee.COERCEFULL],!0);Fe("LONETILDE","(?:~>?)");Fe("TILDETRIM",`(\\s*)${Z[ee.LONETILDE]}\\s+`,!0);rs.tildeTrimReplace="$1~";Fe("TILDE",`^${Z[ee.LONETILDE]}${Z[ee.XRANGEPLAIN]}$`);Fe("TILDELOOSE",`^${Z[ee.LONETILDE]}${Z[ee.XRANGEPLAINLOOSE]}$`);Fe("LONECARET","(?:\\^)");Fe("CARETTRIM",`(\\s*)${Z[ee.LONECARET]}\\s+`,!0);rs.caretTrimReplace="$1^";Fe("CARET",`^${Z[ee.LONECARET]}${Z[ee.XRANGEPLAIN]}$`);Fe("CARETLOOSE",`^${Z[ee.LONECARET]}${Z[ee.XRANGEPLAINLOOSE]}$`);Fe("COMPARATORLOOSE",`^${Z[ee.GTLT]}\\s*(${Z[ee.LOOSEPLAIN]})$|^$`);Fe("COMPARATOR",`^${Z[ee.GTLT]}\\s*(${Z[ee.FULLPLAIN]})$|^$`);Fe("COMPARATORTRIM",`(\\s*)${Z[ee.GTLT]}\\s*(${Z[ee.LOOSEPLAIN]}|${Z[ee.XRANGEPLAIN]})`,!0);rs.comparatorTrimReplace="$1$2$3";Fe("HYPHENRANGE",`^\\s*(${Z[ee.XRANGEPLAIN]})\\s+-\\s+(${Z[ee.XRANGEPLAIN]})\\s*$`);Fe("HYPHENRANGELOOSE",`^\\s*(${Z[ee.XRANGEPLAINLOOSE]})\\s+-\\s+(${Z[ee.XRANGEPLAINLOOSE]})\\s*$`);Fe("STAR","(<|>)?=?\\s*\\*");Fe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Fe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Wg=m((Xw0,Ree)=>{"use strict";var t7e=Object.freeze({loose:!0}),r7e=Object.freeze({}),n7e=i(t=>t?typeof t!="object"?t7e:t:r7e,"parseOptions");Ree.exports=n7e});var Iw=m((Yw0,See)=>{"use strict";var Nee=/^[0-9]+$/,wee=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Nee.test(t),n=Nee.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!
Line truncated
|
|
|
|
|
>>> no match, partial?`,t,A,e,l),A===a))}var M;if(typeof u=="string"?(M=p===u,this.debug("string match",u,p,M)):(M=p.match(u),this.debug("pattern match",u,p,M)),!M)return!1}if(o===a&&s===c)return!0;if(o===a)return r;if(s===c)return o===a-1&&t[o]==="";throw new Error("wtf?")};function p7e(t){return t.replace(/\\(.)/g,"$1")}i(p7e,"globUnescape");function A7e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}i(A7e,"regExpEscape")});var zl=h((q60,Tee)=>{"use strict";var z7e="2.0.0",g7e=Number.MAX_SAFE_INTEGER||9007199254740991,O7e=16,E7e=250,C7e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Tee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:O7e,MAX_SAFE_BUILD_LENGTH:E7e,MAX_SAFE_INTEGER:g7e,RELEASE_TYPES:C7e,SEMVER_SPEC_VERSION:z7e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var gf=h((D60,vee)=>{"use strict";var y7e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};vee.exports=y7e});var gl=h((os,Lee)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Tw,MAX_SAFE_BUILD_LENGTH:B7e,MAX_LENGTH:q7e}=zl(),D7e=gf();os=Lee.exports={};var I7e=os.re=[],R7e=os.safeRe=[],Z=os.src=[],N7e=os.safeSrc=[],ee=os.t={},w7e=0,vw="[a-zA-Z0-9-]",S7e=[["\\s",1],["\\d",q7e],[vw,B7e]],F7e=i(t=>{for(let[e,r]of S7e)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},"makeSafeRegex"),Fe=i((t,e,r)=>{let n=F7e(e),o=w7e++;D7e(t,o,e),ee[t]=o,Z[o]=e,N7e[o]=n,I7e[o]=new RegExp(e,r?"g":void 0),R7e[o]=new RegExp(n,r?"g":void 0)},"createToken");Fe("NUMERICIDENTIFIER","0|[1-9]\\d*");Fe("NUMERICIDENTIFIERLOOSE","\\d+");Fe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${vw}*`);Fe("MAINVERSION",`(${Z[ee.NUMERICIDENTIFIER]})\\.(${Z[ee.NUMERICIDENTIFIER]})\\.(${Z[ee.NUMERICIDENTIFIER]})`);Fe("MAINVERSIONLOOSE",`(${Z[ee.NUMERICIDENTIFIERLOOSE]})\\.(${Z[ee.NUMERICIDENTIFIERLOOSE]})\\.(${Z[ee.NUMERICIDENTIFIERLOOSE]})`);Fe("PRERELEASEIDENTIFIER",`(?:${Z[ee.NONNUMERICIDENTIFIER]}|${Z[ee.NUMERICIDENTIFIER]})`);Fe("PRERELEASEIDENTIFIERLOOSE",`(?:${Z[ee.NONNUMERICIDENTIFIER]}|${Z[ee.NUMERICIDENTIFIERLOOSE]})`);Fe("PRERELEASE",`(?:-(${Z[ee.PRERELEASEIDENTIFIER]}(?:\\.${Z[ee.PRERELEASEIDENTIFIER]})*))`);Fe("PRERELEASELOOSE",`(?:-?(${Z[ee.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Z[ee.PRERELEASEIDENTIFIERLOOSE]})*))`);Fe("BUILDIDENTIFIER",`${vw}+`);Fe("BUILD",`(?:\\+(${Z[ee.BUILDIDENTIFIER]}(?:\\.${Z[ee.BUILDIDENTIFIER]})*))`);Fe("FULLPLAIN",`v?${Z[ee.MAINVERSION]}${Z[ee.PRERELEASE]}?${Z[ee.BUILD]}?`);Fe("FULL",`^${Z[ee.FULLPLAIN]}$`);Fe("LOOSEPLAIN",`[v=\\s]*${Z[ee.MAINVERSIONLOOSE]}${Z[ee.PRERELEASELOOSE]}?${Z[ee.BUILD]}?`);Fe("LOOSE",`^${Z[ee.LOOSEPLAIN]}$`);Fe("GTLT","((?:<|>)?=?)");Fe("XRANGEIDENTIFIERLOOSE",`${Z[ee.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Fe("XRANGEIDENTIFIER",`${Z[ee.NUMERICIDENTIFIER]}|x|X|\\*`);Fe("XRANGEPLAIN",`[v=\\s]*(${Z[ee.XRANGEIDENTIFIER]})(?:\\.(${Z[ee.XRANGEIDENTIFIER]})(?:\\.(${Z[ee.XRANGEIDENTIFIER]})(?:${Z[ee.PRERELEASE]})?${Z[ee.BUILD]}?)?)?`);Fe("XRANGEPLAINLOOSE",`[v=\\s]*(${Z[ee.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Z[ee.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Z[ee.XRANGEIDENTIFIERLOOSE]})(?:${Z[ee.PRERELEASELOOSE]})?${Z[ee.BUILD]}?)?)?`);Fe("XRANGE",`^${Z[ee.GTLT]}\\s*${Z[ee.XRANGEPLAIN]}$`);Fe("XRANGELOOSE",`^${Z[ee.GTLT]}\\s*${Z[ee.XRANGEPLAINLOOSE]}$`);Fe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Tw}})(?:\\.(\\d{1,${Tw}}))?(?:\\.(\\d{1,${Tw}}))?`);Fe("COERCE",`${Z[ee.COERCEPLAIN]}(?:$|[^\\d])`);Fe("COERCEFULL",Z[ee.COERCEPLAIN]+`(?:${Z[ee.PRERELEASE]})?(?:${Z[ee.BUILD]})?(?:$|[^\\d])`);Fe("COERCERTL",Z[ee.COERCE],!0);Fe("COERCERTLFULL",Z[ee.COERCEFULL],!0);Fe("LONETILDE","(?:~>?)");Fe("TILDETRIM",`(\\s*)${Z[ee.LONETILDE]}\\s+`,!0);os.tildeTrimReplace="$1~";Fe("TILDE",`^${Z[ee.LONETILDE]}${Z[ee.XRANGEPLAIN]}$`);Fe("TILDELOOSE",`^${Z[ee.LONETILDE]}${Z[ee.XRANGEPLAINLOOSE]}$`);Fe("LONECARET","(?:\\^)");Fe("CARETTRIM",`(\\s*)${Z[ee.LONECARET]}\\s+`,!0);os.caretTrimReplace="$1^";Fe("CARET",`^${Z[ee.LONECARET]}${Z[ee.XRANGEPLAIN]}$`);Fe("CARETLOOSE",`^${Z[ee.LONECARET]}${Z[ee.XRANGEPLAINLOOSE]}$`);Fe("COMPARATORLOOSE",`^${Z[ee.GTLT]}\\s*(${Z[ee.LOOSEPLAIN]})$|^$`);Fe("COMPARATOR",`^${Z[ee.GTLT]}\\s*(${Z[ee.FULLPLAIN]})$|^$`);Fe("COMPARATORTRIM",`(\\s*)${Z[ee.GTLT]}\\s*(${Z[ee.LOOSEPLAIN]}|${Z[ee.XRANGEPLAIN]})`,!0);os.comparatorTrimReplace="$1$2$3";Fe("HYPHENRANGE",`^\\s*(${Z[ee.XRANGEPLAIN]})\\s+-\\s+(${Z[ee.XRANGEPLAIN]})\\s*$`);Fe("HYPHENRANGELOOSE",`^\\s*(${Z[ee.XRANGEPLAINLOOSE]})\\s+-\\s+(${Z[ee.XRANGEPLAINLOOSE]})\\s*$`);Fe("STAR","(<|>)?=?\\s*\\*");Fe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Fe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var vO=h((R60,Qee)=>{"use strict";var W7e=Object.freeze({loose:!0}),x7e=Object.freeze({}),T7e=i(t=>t?typeof t!="object"?W7e:t:x7e,"parseOptions");Qee.exports=T7e});var Lw=h((w60,kee)=>{"use strict";var _ee=/^[0-9]+$/,Pee=i((t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=_ee.test(t),n=_ee.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+s),t.push(o+"m+"+z3.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=UGe()+e+" "+t[0]}i(kGe,"formatArgs");function UGe(){return At.inspectOpts.hideDate?"":new Date().toISOString()+" "}i(UGe,"getDate");function GGe(...t){return process.stderr.write(h3.format(...t)+`
|
|
|
|
|
`)}i(GGe,"log");function HGe(t){t?process.env.DEBUG=t:delete process.env.DEBUG}i(HGe,"save");function XGe(){return process.env.DEBUG}i(XGe,"load");function VGe(t){t.inspectOpts={};let e=Object.keys(At.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=At.inspectOpts[e[r]]}i(VGe,"init");z3.exports=f6()(At);var{formatters:Ate}=z3.exports;Ate.o=function(t){return this.inspectOpts.colors=this.useColors,h3.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};Ate.O=function(t){return this.inspectOpts.colors=this.useColors,h3.inspect(t,this.inspectOpts)}});var O3=m((xW0,O6)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?O6.exports=ite():O6.exports=lte()});var Mte=m(ir=>{"use strict";var YGe=ir&&ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),JGe=ir&&ir.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),dte=ir&&ir.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&YGe(e,t,r);return JGe(e,t),e};Object.defineProperty(ir,"__esModule",{value:!0});ir.req=ir.json=ir.toBuffer=void 0;var jGe=dte(require("http")),$Ge=dte(require("https"));async function bte(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(bte,"toBuffer");ir.toBuffer=bte;async function KGe(t){let r=(await bte(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}i(KGe,"json");ir.json=KGe;function ZGe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?$Ge:jGe).request(t,e),o=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=o.then.bind(o),n}i(ZGe,"req");ir.req=ZGe});var zte=m(Hr=>{"use strict";var mte=Hr&&Hr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),eHe=Hr&&Hr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hte=Hr&&Hr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&mte(e,t,r);return eHe(e,t),e},tHe=Hr&&Hr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&mte(e,t,r)};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.Agent=void 0;var rHe=hte(require("net")),fte=hte(require("http")),nHe=require("https");tHe(Mte(),Hr);var is=Symbol("AgentBaseInternalState"),g6=class extends fte.Agent{static{i(this,"Agent")}constructor(e){super(e),this[is]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
|
|
|
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new rHe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?nHe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(o),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(s,a),c instanceof fte.Agent)try{return c.addRequest(e,o)}catch(u){return n(u)}this[is].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[is].currentSocket;if(this[is].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[is].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[is]&&(this[is].defaultPort=e)}get protocol(){return this[is].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[is]&&(this[is].protocol=e)}};Hr.Agent=g6});var Ote=m(Il=>{"use strict";var oHe=Il&&Il.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Il,"__esModule",{value:!0});Il.parseProxyResponse=void 0;var sHe=oHe(O3()),g3=(0,sHe.default)("https-proxy-agent:parse-proxy-response");function iHe(t){return new Promise((e,r)=>{let n=0,o=[];function s(){let A=t.read();A?p(A):t.once("readable",s)}i(s,"read");function a(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}i(a,"cleanup");function c(){a(),g3("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}i(c,"onend");function u(A){a(),g3("onerror %o",A),r(A)}i(u,"onerror");function p(A){o.push(A),n+=A.length;let l=Buffer.concat(o,n),b=l.indexOf(`\r
|
|
|
|
|
`+s),t.push(o+"m+"+C3.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=EHe()+e+" "+t[0]}i(OHe,"formatArgs");function EHe(){return At.inspectOpts.hideDate?"":new Date().toISOString()+" "}i(EHe,"getDate");function CHe(...t){return process.stderr.write(E3.format(...t)+`
|
|
|
|
|
`)}i(CHe,"log");function yHe(t){t?process.env.DEBUG=t:delete process.env.DEBUG}i(yHe,"save");function BHe(){return process.env.DEBUG}i(BHe,"load");function qHe(t){t.inspectOpts={};let e=Object.keys(At.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=At.inspectOpts[e[r]]}i(qHe,"init");C3.exports=q6()(At);var{formatters:Ote}=C3.exports;Ote.o=function(t){return this.inspectOpts.colors=this.useColors,E3.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};Ote.O=function(t){return this.inspectOpts.colors=this.useColors,E3.inspect(t,this.inspectOpts)}});var y3=h((mx0,N6)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?N6.exports=Mte():N6.exports=Ete()});var Bte=h(ir=>{"use strict";var DHe=ir&&ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),IHe=ir&&ir.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Cte=ir&&ir.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&DHe(e,t,r);return IHe(e,t),e};Object.defineProperty(ir,"__esModule",{value:!0});ir.req=ir.json=ir.toBuffer=void 0;var RHe=Cte(require("http")),NHe=Cte(require("https"));async function yte(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(yte,"toBuffer");ir.toBuffer=yte;async function wHe(t){let r=(await yte(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}i(wHe,"json");ir.json=wHe;function SHe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?NHe:RHe).request(t,e),o=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=o.then.bind(o),n}i(SHe,"req");ir.req=SHe});var Rte=h(Xr=>{"use strict";var Dte=Xr&&Xr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),FHe=Xr&&Xr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ite=Xr&&Xr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Dte(e,t,r);return FHe(e,t),e},WHe=Xr&&Xr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Dte(e,t,r)};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.Agent=void 0;var xHe=Ite(require("net")),qte=Ite(require("http")),THe=require("https");WHe(Bte(),Xr);var cs=Symbol("AgentBaseInternalState"),w6=class extends qte.Agent{static{i(this,"Agent")}constructor(e){super(e),this[cs]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
|
|
|
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new xHe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?THe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(o),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(s,a),c instanceof qte.Agent)try{return c.addRequest(e,o)}catch(u){return n(u)}this[cs].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[cs].currentSocket;if(this[cs].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[cs].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[cs]&&(this[cs].defaultPort=e)}get protocol(){return this[cs].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[cs]&&(this[cs].protocol=e)}};Xr.Agent=w6});var Nte=h(Nl=>{"use strict";var vHe=Nl&&Nl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nl,"__esModule",{value:!0});Nl.parseProxyResponse=void 0;var LHe=vHe(y3()),B3=(0,LHe.default)("https-proxy-agent:parse-proxy-response");function QHe(t){return new Promise((e,r)=>{let n=0,o=[];function s(){let A=t.read();A?p(A):t.once("readable",s)}i(s,"read");function a(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}i(a,"cleanup");function c(){a(),B3("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}i(c,"onend");function u(A){a(),B3("onerror %o",A),r(A)}i(u,"onerror");function p(A){o.push(A),n+=A.length;let l=Buffer.concat(o,n),b=l.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`);if(b===-1){g3("have not received end of HTTP headers yet..."),s();return}let f=l.slice(0,b).toString("ascii").split(`\r
|
|
|
|
|
`),z=f.shift();if(!z)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=z.split(" "),y=+g[1],E=g.slice(2).join(" "),B={};for(let q of f){if(!q)continue;let I=q.indexOf(":");if(I===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${q}"`));let W=q.slice(0,I).toLowerCase(),x=q.slice(I+1).trimStart(),Q=B[W];typeof Q=="string"?B[W]=[Q,x]:Array.isArray(Q)?Q.push(x):B[W]=x}g3("got proxy server response: %o %o",z,B),a(),e({connect:{statusCode:y,statusText:E,headers:B},buffered:l})}i(p,"ondata"),t.on("error",u),t.on("end",c),s()})}i(iHe,"parseProxyResponse");Il.parseProxyResponse=iHe});var qte=m(qn=>{"use strict";var aHe=qn&&qn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cHe=qn&&qn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),yte=qn&&qn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&aHe(e,t,r);return cHe(e,t),e},Bte=qn&&qn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qn,"__esModule",{value:!0});qn.HttpsProxyAgent=void 0;var E3=yte(require("net")),gte=yte(require("tls")),uHe=Bte(require("assert")),pHe=Bte(O3()),AHe=zte(),lHe=require("url"),dHe=Ote(),wM=(0,pHe.default)("https-proxy-agent"),Ete=i(t=>t.servername===void 0&&t.host&&!E3.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),C3=class extends AHe.Agent{static{i(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new lHe.URL(e):e,this.proxyHeaders=r?.headers??{},wM("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Cte(r,"headers"):null,host:n,port:o}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;n.protocol==="https:"?(wM("Creating `tls.Socket`: %o",this.connectOpts),o=gte.connect(Ete(this.connectOpts))):(wM("Creating `net.Socket`: %o",this.connectOpts),o=E3.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=E3.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
|
|
|
`);if(b===-1){B3("have not received end of HTTP headers yet..."),s();return}let M=l.slice(0,b).toString("ascii").split(`\r
|
|
|
|
|
`),z=M.shift();if(!z)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let O=z.split(" "),y=+O[1],E=O.slice(2).join(" "),B={};for(let q of M){if(!q)continue;let I=q.indexOf(":");if(I===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${q}"`));let W=q.slice(0,I).toLowerCase(),x=q.slice(I+1).trimStart(),L=B[W];typeof L=="string"?B[W]=[L,x]:Array.isArray(L)?L.push(x):B[W]=x}B3("got proxy server response: %o %o",z,B),a(),e({connect:{statusCode:y,statusText:E,headers:B},buffered:l})}i(p,"ondata"),t.on("error",u),t.on("end",c),s()})}i(QHe,"parseProxyResponse");Nl.parseProxyResponse=QHe});var Tte=h(Dn=>{"use strict";var _He=Dn&&Dn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PHe=Dn&&Dn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Wte=Dn&&Dn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&_He(e,t,r);return PHe(e,t),e},xte=Dn&&Dn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.HttpsProxyAgent=void 0;var q3=Wte(require("net")),wte=Wte(require("tls")),kHe=xte(require("assert")),UHe=xte(y3()),GHe=Rte(),HHe=require("url"),XHe=Nte(),xf=(0,UHe.default)("https-proxy-agent"),Ste=i(t=>t.servername===void 0&&t.host&&!q3.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),D3=class extends GHe.Agent{static{i(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new HHe.URL(e):e,this.proxyHeaders=r?.headers??{},xf("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Fte(r,"headers"):null,host:n,port:o}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;n.protocol==="https:"?(xf("Creating `tls.Socket`: %o",this.connectOpts),o=wte.connect(Ste(this.connectOpts))):(xf("Creating `net.Socket`: %o",this.connectOpts),o=q3.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=q3.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(n.username||n.password){let b=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(b).toString("base64")}`}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let b of Object.keys(s))c+=`${b}: ${s[b]}\r
|
|
|
|
|
`;let u=(0,dHe.parseProxyResponse)(o);o.write(`${c}\r
|
|
|
|
|
`);let{connect:p,buffered:A}=await u;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",bHe),r.secureEndpoint?(wM("Upgrading socket connection to TLS"),gte.connect({...Cte(Ete(r),"host","path","port"),socket:o})):o;o.destroy();let l=new E3.Socket({writable:!1});return l.readable=!0,e.once("socket",b=>{wM("Replaying proxy buffer for failed request"),(0,uHe.default)(b.listenerCount("data")>0),b.push(A),b.push(null)}),l}};C3.protocols=["http","https"];qn.HttpsProxyAgent=C3;function bHe(t){t.resume()}i(bHe,"resume");function Cte(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(Cte,"omit")});var Rte=m(ar=>{"use strict";var MHe=ar&&ar.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),fHe=ar&&ar.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Dte=ar&&ar.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&MHe(e,t,r);return fHe(e,t),e};Object.defineProperty(ar,"__esModule",{value:!0});ar.req=ar.json=ar.toBuffer=void 0;var mHe=Dte(require("http")),hHe=Dte(require("https"));async function Ite(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(Ite,"toBuffer");ar.toBuffer=Ite;async function zHe(t){let r=(await Ite(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}i(zHe,"json");ar.json=zHe;function OHe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?hHe:mHe).request(t,e),o=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=o.then.bind(o),n}i(OHe,"req");ar.req=OHe});var Fte=m(Xr=>{"use strict";var wte=Xr&&Xr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gHe=Xr&&Xr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ste=Xr&&Xr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&wte(e,t,r);return gHe(e,t),e},EHe=Xr&&Xr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&wte(e,t,r)};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.Agent=void 0;var CHe=Ste(require("net")),Nte=Ste(require("http")),yHe=require("https");EHe(Rte(),Xr);var as=Symbol("AgentBaseInternalState"),E6=class extends Nte.Agent{static{i(this,"Agent")}constructor(e){super(e),this[as]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
|
|
|
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new CHe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?yHe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(o),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(s,a),c instanceof Nte.Agent)return c.addRequest(e,o);this[as].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[as].currentSocket;if(this[as].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[as].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[as]&&(this[as].defaultPort=e)}get protocol(){return this[as].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[as]&&(this[as].protocol=e)}};Xr.Agent=E6});var Tte=m(Dn=>{"use strict";var BHe=Dn&&Dn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qHe=Dn&&Dn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xte=Dn&&Dn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&BHe(e,t,r);return qHe(e,t),e},DHe=Dn&&Dn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.HttpProxyAgent=void 0;var IHe=xte(require("net")),RHe=xte(require("tls")),NHe=DHe(O3()),wHe=require("events"),SHe=Fte(),Wte=require("url"),Rl=(0,NHe.default)("http-proxy-agent"),y3=class extends SHe.Agent{static{i(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new Wte.URL(e):e,this.proxyHeaders=r?.headers??{},Rl("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?FHe(r,"headers"):null,host:n,port:o}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,o=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",a=`${o}//${s}`,c=new Wte.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let u=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(u)){let A=u[p];A&&e.setHeader(p,A)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,o;Rl("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Rl("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,o=n.indexOf(`\r
|
|
|
|
|
`;let u=(0,XHe.parseProxyResponse)(o);o.write(`${c}\r
|
|
|
|
|
`);let{connect:p,buffered:A}=await u;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",VHe),r.secureEndpoint?(xf("Upgrading socket connection to TLS"),wte.connect({...Fte(Ste(r),"host","path","port"),socket:o})):o;o.destroy();let l=new q3.Socket({writable:!1});return l.readable=!0,e.once("socket",b=>{xf("Replaying proxy buffer for failed request"),(0,kHe.default)(b.listenerCount("data")>0),b.push(A),b.push(null)}),l}};D3.protocols=["http","https"];Dn.HttpsProxyAgent=D3;function VHe(t){t.resume()}i(VHe,"resume");function Fte(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(Fte,"omit")});var Qte=h(ar=>{"use strict";var YHe=ar&&ar.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),JHe=ar&&ar.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),vte=ar&&ar.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&YHe(e,t,r);return JHe(e,t),e};Object.defineProperty(ar,"__esModule",{value:!0});ar.req=ar.json=ar.toBuffer=void 0;var $He=vte(require("http")),jHe=vte(require("https"));async function Lte(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(Lte,"toBuffer");ar.toBuffer=Lte;async function KHe(t){let r=(await Lte(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}i(KHe,"json");ar.json=KHe;function ZHe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?jHe:$He).request(t,e),o=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=o.then.bind(o),n}i(ZHe,"req");ar.req=ZHe});var Ute=h(Vr=>{"use strict";var Pte=Vr&&Vr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),eXe=Vr&&Vr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kte=Vr&&Vr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Pte(e,t,r);return eXe(e,t),e},tXe=Vr&&Vr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Pte(e,t,r)};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.Agent=void 0;var rXe=kte(require("net")),_te=kte(require("http")),nXe=require("https");tXe(Qte(),Vr);var us=Symbol("AgentBaseInternalState"),S6=class extends _te.Agent{static{i(this,"Agent")}constructor(e){super(e),this[us]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
|
|
|
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new rXe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?nXe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(o),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(s,a),c instanceof _te.Agent)return c.addRequest(e,o);this[us].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[us].currentSocket;if(this[us].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[us].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[us]&&(this[us].defaultPort=e)}get protocol(){return this[us].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[us]&&(this[us].protocol=e)}};Vr.Agent=S6});var Xte=h(In=>{"use strict";var oXe=In&&In.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),sXe=In&&In.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hte=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oXe(e,t,r);return sXe(e,t),e},iXe=In&&In.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(In,"__esModule",{value:!0});In.HttpProxyAgent=void 0;var aXe=Hte(require("net")),cXe=Hte(require("tls")),uXe=iXe(y3()),pXe=require("events"),AXe=Ute(),Gte=require("url"),wl=(0,uXe.default)("http-proxy-agent"),I3=class extends AXe.Agent{static{i(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new Gte.URL(e):e,this.proxyHeaders=r?.headers??{},wl("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?lXe(r,"headers"):null,host:n,port:o}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,o=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",a=`${o}//${s}`,c=new Gte.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let u=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(u)){let A=u[p];A&&e.setHeader(p,A)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,o;wl("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(wl("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,o=n.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`)+4,e.outputData[0].data=e._header+n.substring(o),Rl("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(Rl("Creating `tls.Socket`: %o",this.connectOpts),s=RHe.connect(this.connectOpts)):(Rl("Creating `net.Socket`: %o",this.connectOpts),s=IHe.connect(this.connectOpts)),await(0,wHe.once)(s,"connect"),s}};y3.protocols=["http","https"];Dn.HttpProxyAgent=y3;function FHe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(FHe,"omit")});var ore=m(L3=>{"use strict";Object.defineProperty(L3,"__esModule",{value:!0});L3.state=void 0;L3.state={instrumenterImplementation:void 0}});var gre=m(U3=>{"use strict";Object.defineProperty(U3,"__esModule",{value:!0});U3.state=void 0;U3.state={operationRequestMap:new WeakMap}});var Zoe=m(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var Zje=require("os"),e$e=require("util");function t$e(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}i(t$e,"_interopDefaultLegacy");var r$e=t$e(e$e);function n$e(t,...e){process.stderr.write(`${r$e.default.format(t,...e)}${Zje.EOL}`)}i(n$e,"log");var Uoe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Hoe,eT=[],tT=[],cC=[];Uoe&&rT(Uoe);var Xoe=Object.assign(t=>Voe(t),{enable:rT,enabled:nT,disable:o$e,log:n$e});function rT(t){Hoe=t,eT=[],tT=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?tT.push(new RegExp(`^${n.substr(1)}$`)):eT.push(new RegExp(`^${n}$`));for(let n of cC)n.enabled=nT(n.namespace)}i(rT,"enable");function nT(t){if(t.endsWith("*"))return!0;for(let e of tT)if(e.test(t))return!1;for(let e of eT)if(e.test(t))return!0;return!1}i(nT,"enabled");function o$e(){let t=Hoe||"";return rT(""),t}i(o$e,"disable");function Voe(t){let e=Object.assign(r,{enabled:nT(t),destroy:s$e,log:Xoe.log,namespace:t,extend:i$e});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return i(r,"debug"),cC.push(e),e}i(Voe,"createDebugger");function s$e(){let t=cC.indexOf(this);return t>=0?(cC.splice(t,1),!0):!1}i(s$e,"destroy");function i$e(t){let e=Voe(`${this.namespace}:${t}`);return e.log=this.log,e}i(i$e,"extend");var zf=Xoe,Yoe=new Set,iC=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,uC,pC=zf("azure");pC.log=(...t)=>{zf.log(...t)};var oT=["verbose","info","warning","error"];iC&&(Koe(iC)?Joe(iC):console.error(`AZURE_LOG_LEVEL set to unknown log level '${iC}'; logging is not enabled. Acceptable values: ${oT.join(", ")}.`));function Joe(t){if(t&&!Koe(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${oT.join(",")}`);uC=t;let e=[];for(let r of Yoe)$oe(r)&&e.push(r.namespace);zf.enable(e.join(","))}i(Joe,"setLogLevel");function a$e(){return uC}i(a$e,"getLogLevel");var Goe={verbose:400,info:300,warning:200,error:100};function c$e(t){let e=pC.extend(t);return joe(pC,e),{error:aC(e,"error"),warning:aC(e,"warning"),info:aC(e,"info"),verbose:aC(e,"verbose")}}i(c$e,"createClientLogger");function joe(t,e){e.log=(...r)=>{t.log(...r)}}i(joe,"patchLogMethod");function aC(t,e){let r=Object.assign(t.extend(e),{level:e});if(joe(t,r),$oe(r)){let n=zf.disable();zf.enable(n+","+r.namespace)}return Yoe.add(r),r}i(aC,"createLogger");function $oe(t){return!!(uC&&Goe[t.level]<=Goe[uC])}i($oe,"shouldEnable");function Koe(t){return oT.includes(t)}i(Koe,"isAzureLogLevel");Vl.AzureLogger=pC;Vl.createClientLogger=c$e;Vl.getLogLevel=a$e;Vl.setLogLevel=Joe});var aT=m(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var Yl=new WeakMap,AC=new WeakMap,Of=class t{static{i(this,"AbortSignal")}constructor(){this.onabort=null,Yl.set(this,[]),AC.set(this,!1)}get aborted(){if(!AC.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return AC.get(this)}static get none(){return new t}addEventListener(e,r){if(!Yl.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Yl.get(this).push(r)}removeEventListener(e,r){if(!Yl.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=Yl.get(this),o=n.indexOf(r);o>-1&&n.splice(o,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function ese(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Yl.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),AC.set(t,!0)}i(ese,"abortSignal");var sT=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},iT=class{static{i(this,"AbortController")}constructor(e){if(this._signal=new Of,!!e){Array.isArray(e)||(e=arguments);for(let r of e)r.aborted?this.abort():r.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){ese(this._signal)}static timeout(e){let r=new Of,n=setTimeout(ese,e,r);return typeof n.unref=="function"&&n.unref(),r}};gf.AbortController=iT;gf.AbortError=sT;gf.AbortSignal=Of});var sse=m(c1=>{"use strict";Object.defineP
Line truncated
|
|
|
|
|
`)+4,e.outputData[0].data=e._header+n.substring(o),wl("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(wl("Creating `tls.Socket`: %o",this.connectOpts),s=cXe.connect(this.connectOpts)):(wl("Creating `net.Socket`: %o",this.connectOpts),s=aXe.connect(this.connectOpts)),await(0,pXe.once)(s,"connect"),s}};I3.protocols=["http","https"];In.HttpProxyAgent=I3;function lXe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(lXe,"omit")});var bre=h(k3=>{"use strict";Object.defineProperty(k3,"__esModule",{value:!0});k3.state=void 0;k3.state={instrumenterImplementation:void 0}});var wre=h(V3=>{"use strict";Object.defineProperty(V3,"__esModule",{value:!0});V3.state=void 0;V3.state={operationRequestMap:new WeakMap}});var use=h(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Sje=require("os"),Fje=require("util");function Wje(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}i(Wje,"_interopDefaultLegacy");var xje=Wje(Fje);function Tje(t,...e){process.stderr.write(`${xje.default.format(t,...e)}${Sje.EOL}`)}i(Tje,"log");var Zoe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,tse,pT=[],AT=[],lC=[];Zoe&&lT(Zoe);var rse=Object.assign(t=>nse(t),{enable:lT,enabled:dT,disable:vje,log:Tje});function lT(t){tse=t,pT=[],AT=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?AT.push(new RegExp(`^${n.substr(1)}$`)):pT.push(new RegExp(`^${n}$`));for(let n of lC)n.enabled=dT(n.namespace)}i(lT,"enable");function dT(t){if(t.endsWith("*"))return!0;for(let e of AT)if(e.test(t))return!1;for(let e of pT)if(e.test(t))return!0;return!1}i(dT,"enabled");function vje(){let t=tse||"";return lT(""),t}i(vje,"disable");function nse(t){let e=Object.assign(r,{enabled:dT(t),destroy:Lje,log:rse.log,namespace:t,extend:Qje});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return i(r,"debug"),lC.push(e),e}i(nse,"createDebugger");function Lje(){let t=lC.indexOf(this);return t>=0?(lC.splice(t,1),!0):!1}i(Lje,"destroy");function Qje(t){let e=nse(`${this.namespace}:${t}`);return e.log=this.log,e}i(Qje,"extend");var EM=rse,ose=new Set,pC=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,dC,bC=EM("azure");bC.log=(...t)=>{EM.log(...t)};var bT=["verbose","info","warning","error"];pC&&(cse(pC)?sse(pC):console.error(`AZURE_LOG_LEVEL set to unknown log level '${pC}'; logging is not enabled. Acceptable values: ${bT.join(", ")}.`));function sse(t){if(t&&!cse(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${bT.join(",")}`);dC=t;let e=[];for(let r of ose)ase(r)&&e.push(r.namespace);EM.enable(e.join(","))}i(sse,"setLogLevel");function _je(){return dC}i(_je,"getLogLevel");var ese={verbose:400,info:300,warning:200,error:100};function Pje(t){let e=bC.extend(t);return ise(bC,e),{error:AC(e,"error"),warning:AC(e,"warning"),info:AC(e,"info"),verbose:AC(e,"verbose")}}i(Pje,"createClientLogger");function ise(t,e){e.log=(...r)=>{t.log(...r)}}i(ise,"patchLogMethod");function AC(t,e){let r=Object.assign(t.extend(e),{level:e});if(ise(t,r),ase(r)){let n=EM.disable();EM.enable(n+","+r.namespace)}return ose.add(r),r}i(AC,"createLogger");function ase(t){return!!(dC&&ese[t.level]<=ese[dC])}i(ase,"shouldEnable");function cse(t){return bT.includes(t)}i(cse,"isAzureLogLevel");Jl.AzureLogger=bC;Jl.createClientLogger=Pje;Jl.getLogLevel=_je;Jl.setLogLevel=sse});var hT=h(yM=>{"use strict";Object.defineProperty(yM,"__esModule",{value:!0});var $l=new WeakMap,fC=new WeakMap,CM=class t{static{i(this,"AbortSignal")}constructor(){this.onabort=null,$l.set(this,[]),fC.set(this,!1)}get aborted(){if(!fC.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return fC.get(this)}static get none(){return new t}addEventListener(e,r){if(!$l.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");$l.get(this).push(r)}removeEventListener(e,r){if(!$l.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=$l.get(this),o=n.indexOf(r);o>-1&&n.splice(o,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function pse(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=$l.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),fC.set(t,!0)}i(pse,"abortSignal");var fT=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},MT=class{static{i(this,"AbortController")}constructor(e){if(this._signal=new CM,!!e){Array.isArray(e)||(e=arguments);for(let r of e)r.aborted?this.abort():r.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){pse(this._signal)}static timeout(e){let r=new CM,n=setTimeout(pse,e,r);return typeof n.unref=="function"&&n.unref(),r}};yM.AbortController=MT;yM.AbortError=fT;yM.AbortSignal=CM});var fse=h(c1=>{"use strict";Object.defineP
Line truncated
|
|
|
|
|
Polling from: ${r.config.operationLocation}
|
|
|
|
|
Operation status: ${A}
|
|
|
|
|
Polling status: ${use.includes(A)?"Stopped":"Running"}`),A==="succeeded"){let l=a(p,r);if(l!==void 0)return{response:await e(l).catch(ase({state:r,stateProxy:n,isOperationError:c})),status:A}}return{response:p,status:A}}i(L$e,"pollOperationHelper");async function dse(t){let{poll:e,state:r,stateProxy:n,options:o,getOperationStatus:s,getResourceLocation:a,getOperationLocation:c,isOperationError:u,withOperationLocation:p,getPollingInterval:A,processResult:l,getError:b,updateState:f,setDelay:z,isDone:g,setErrorAsResult:y}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:B,status:q}=await L$e({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:E,getResourceLocation:a,isOperationError:u,options:o});if(Ase({status:q,response:B,state:r,stateProxy:n,isDone:g,processResult:l,getError:b,setErrorAsResult:y}),!use.includes(q)){let I=A?.(B);I&&z(I);let W=c?.(B,r);if(W!==void 0){let x=E!==W;r.config.operationLocation=W,p?.(W,x)}else p?.(E,!1)}f?.(r,B)}}i(dse,"pollOperation");function bse(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}i(bse,"getOperationLocationPollingUrl");function Mse(t){return t.headers.location}i(Mse,"getLocationHeader");function fse(t){return t.headers["operation-location"]}i(fse,"getOperationLocationHeader");function mse(t){return t.headers["azure-asyncoperation"]}i(mse,"getAzureAsyncOperationHeader");function Q$e(t){var e;let{location:r,requestMethod:n,requestPath:o,resourceLocationConfig:s}=t;switch(n){case"PUT":return o;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:o;default:return a()}function a(){switch(s){case"azure-async-operation":return;case"original-uri":return o;default:return r}}i(a,"getDefault")}i(Q$e,"findResourceLocation");function hse(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:o}=t,s=fse(e),a=mse(e),c=bse({operationLocation:s,azureAsyncOperation:a}),u=Mse(e),p=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:Q$e({requestMethod:p,location:u,requestPath:n,resourceLocationConfig:o})}:u!==void 0?{mode:"ResourceLocation",operationLocation:u}:p==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}i(hse,"inferLroMode");function zse(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return hT(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return rp.verbose(`LRO: unrecognized operation status: ${e}`),e}}i(zse,"transformStatus");function _$e(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return zse({status:r,statusCode:t.statusCode})}i(_$e,"getStatus");function P$e(t){var e,r;let{properties:n,provisioningState:o}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:o;return zse({status:s,statusCode:t.statusCode})}i(P$e,"getProvisioningState");function hT(t){return t===202?"running":t<300?"succeeded":"failed"}i(hT,"toOperationStatus");function Ose({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?k$e(new Date(e)):r*1e3}}i(Ose,"parseRetryAfter");function gse(t){let e=t.flatResponse.error;if(!e){rp.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){rp.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}i(gse,"getErrorFromResponse");function k$e(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}i(k$e,"calculatePollingIntervalFromDate");function Ese(t){let{response:e,state:r,operationLocation:n}=t;function o(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return hT(e.rawResponse.statusCode);case"Body":return zT(e,r);default:return"running"}}i(o,"helper");let s=o();return s==="running"&&n===void 0?"succeeded":s}i(Ese,"getStatusFromInitialResponse");async function U$e(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:o,setErrorAsResult:s}=t;return lse({init:i(async()=>{let a=await o.sendInitialRequest(),c=hse({rawResponse:a.rawResponse,requestPath:o.requestPath,requestMethod:o.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:Ese,setErrorAsResult:s})}i(U$e,"initHttpOperation");function Cse({rawResponse:t},e){var r;switchLine truncated
|
|
|
|
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:a=s,o=1;break;case 1:r[n++]=a<<2|(s&48)>>4,a=s,o=2;break;case 2:r[n++]=(a&15)<<4|(s&60)>>2,a=s,o=3;break;case 3:r[n++]=(a&3)<<6|s,o=0;break}}if(o==1)throw Error("invalid base64 string.");return r.subarray(0,n)}i(qKe,"base64decode");e2.base64decode=qKe;function DKe(t){let e="",r=0,n,o=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=ta[n>>2],o=(n&3)<<4,r=1;break;case 1:e+=ta[o|n>>4],o=(n&15)<<2,r=2;break;case 2:e+=ta[o|n>>6],e+=ta[n&63],r=0;break}return r&&(e+=ta[o],e+="=",r==1&&(e+="=")),e}i(DKe,"base64encode");e2.base64encode=DKe});var Zse=m(NC=>{"use strict";Object.defineProperty(NC,"__esModule",{value:!0});NC.utf8read=void 0;var RT=i(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function IKe(t){if(t.length<1)return"";let e=0,r=[],n=[],o=0,s,a=t.length;for(;e<a;)s=t[e++],s<128?n[o++]=s:s>191&&s<224?n[o++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[o++]=55296+(s>>10),n[o++]=56320+(s&1023)):n[o++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,o>8191&&(r.push(RT(n)),o=0);return r.length?(o&&r.push(RT(n.slice(0,o))),r.join("")):RT(n.slice(0,o))}i(IKe,"utf8read");NC.utf8read=IKe});var Rf=m(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.WireType=Fs.mergeBinaryOptions=Fs.UnknownFieldHandler=void 0;var RKe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,o,s,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:o,wireType:s,data:a})},t.onWrite=(r,n,o)=>{for(let{no:s,wireType:a,data:c}of t.list(n))o.tag(s,a).raw(c)},t.list=(r,n)=>{if(e(r)){let o=r[t.symbol];return n?o.filter(s=>s.no==n):o}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=i(r=>r&&Array.isArray(r[t.symbol]),"is")})(RKe=Fs.UnknownFieldHandler||(Fs.UnknownFieldHandler={}));function NKe(t,e){return Object.assign(Object.assign({},t),e)}i(NKe,"mergeBinaryOptions");Fs.mergeBinaryOptions=NKe;var wKe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(wKe=Fs.WireType||(Fs.WireType={}))});var SC=m(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.varint32read=br.varint32write=br.int64toString=br.int64fromString=br.varint64write=br.varint64read=void 0;function SKe(){let t=0,e=0;for(let n=0;n<28;n+=7){let o=this.buf[this.pos++];if(t|=(o&127)<<n,(o&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<n,(o&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}i(SKe,"varint64read");br.varint64read=SKe;function FKe(t,e,r){for(let s=0;s<28;s=s+7){let a=t>>>s,c=!(!(a>>>7)&&e==0),u=(c?a|128:a)&255;if(r.push(u),!c)return}let n=t>>>28&15|(e&7)<<4,o=e>>3!=0;if(r.push((o?n|128:n)&255),!!o){for(let s=3;s<31;s=s+7){let a=e>>>s,c=!!(a>>>7),u=(c?a|128:a)&255;if(r.push(u),!c)return}r.push(e>>>31&1)}}i(FKe,"varint64write");br.varint64write=FKe;var wC=65536*65536;function WKe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,o=0;function s(a,c){let u=Number(t.slice(a,c));o*=r,n=n*r+u,n>=wC&&(o=o+(n/wC|0),n=n%wC)}return i(s,"add1e6digit"),s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,o]}i(WKe,"int64fromString");br.int64fromString=WKe;function xKe(t,e){if(e>>>0<=2097151)return""+(wC*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,o=e>>16&65535,s=r+n*6777216+o*6710656,a=n+o*8147497,c=o*2,u=1e7;s>=u&&(a+=Math.floor(s/u),s%=u),a>=u&&(c+=Math.floor(a/u),a%=u);function p(A,l){let b=A?String(A):"";return l?"0000000".slice(b.length)+b:b}return i(p,"decimalFrom1e7"),p(c,0)+p(a,c)+p(s,1)}i(xKe,"int64toString");br.int64toString=xKe;function TKe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}i(TKe,"varint32write");br.varint32write=TKe;function vKe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}i(vKe,"varint32read");br.varint32read=vKe});var mc=m(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.PbLong=fc.PbULong=fc.detectBi=void 0;var Nf=SC(),E0;function eie(){let t=new DataView(new ArrayBuffer(8));E0=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("922337203685477580
Line truncated
|
|
|
|
|
`)}};sy.RpcError=rv});var ov=m(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});ay.mergeRpcOptions=void 0;var Sie=C1();function se0(t,e){if(!e)return t;let r={};iy(t,r),iy(e,r);for(let n of Object.keys(e)){let o=e[n];switch(n){case"jsonOptions":r.jsonOptions=Sie.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Sie.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},iy(t.meta,r.meta),iy(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(o):o.concat();break}}return r}i(se0,"mergeRpcOptions");ay.mergeRpcOptions=se0;function iy(t,e){if(!t)return;let r=e;for(let[n,o]of Object.entries(t))o instanceof Date?r[n]=new Date(o.getTime()):Array.isArray(o)?r[n]=o.concat():r[n]=o}i(iy,"copy")});var iv=m(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});ap.Deferred=ap.DeferredState=void 0;var Ts;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Ts=ap.DeferredState||(ap.DeferredState={}));var sv=class{static{i(this,"Deferred")}constructor(e=!0){this._state=Ts.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==Ts.PENDING)throw new Error(`cannot resolve ${Ts[this.state].toLowerCase()}`);this._resolve(e),this._state=Ts.RESOLVED}reject(e){if(this.state!==Ts.PENDING)throw new Error(`cannot reject ${Ts[this.state].toLowerCase()}`);this._reject(e),this._state=Ts.REJECTED}resolvePending(e){this._state===Ts.PENDING&&this.resolve(e)}rejectPending(e){this._state===Ts.PENDING&&this.reject(e)}};ap.Deferred=sv});var cv=m(cy=>{"use strict";Object.defineProperty(cy,"__esModule",{value:!0});cy.RpcOutputStreamController=void 0;var Fie=iv(),cp=C1(),av=class{static{i(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){cp.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){cp.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){cp.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){cp.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:i(()=>{let e=this._itState;cp.assert(e,"bad state"),cp.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new Fie.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;cp.assert(n.state==Fie.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};cy.RpcOutputStreamController=av});var pv=m(a2=>{"use strict";var ie0=a2&&a2.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};Object.defineProperty(a2,"__esModule",{value:!0});a2.UnaryCall=void 0;var uv=class{static{i(this,"UnaryCall")}constructor(e,r,n,o,s,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=o,this.response=s,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return ie0(this,void 0,void 0,function*(){let[e,r,n,o]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:o}})}};a2.UnaryCall=uv});var lv=m(c2=>{"use strict";var ae0=c2&&c2.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function
Line truncated
|
|
|
|
|
Polling status: ${zse.includes(A)?"Stopped":"Running"}`),A==="succeeded"){let l=a(p,r);if(l!==void 0)return{response:await e(l).catch(hse({state:r,stateProxy:n,isOperationError:c})),status:A}}return{response:p,status:A}}i(hKe,"pollOperationHelper");async function Cse(t){let{poll:e,state:r,stateProxy:n,options:o,getOperationStatus:s,getResourceLocation:a,getOperationLocation:c,isOperationError:u,withOperationLocation:p,getPollingInterval:A,processResult:l,getError:b,updateState:M,setDelay:z,isDone:O,setErrorAsResult:y}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:B,status:q}=await hKe({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:E,getResourceLocation:a,isOperationError:u,options:o});if(Ose({status:q,response:B,state:r,stateProxy:n,isDone:O,processResult:l,getError:b,setErrorAsResult:y}),!zse.includes(q)){let I=A?.(B);I&&z(I);let W=c?.(B,r);if(W!==void 0){let x=E!==W;r.config.operationLocation=W,p?.(W,x)}else p?.(E,!1)}M?.(r,B)}}i(Cse,"pollOperation");function yse(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}i(yse,"getOperationLocationPollingUrl");function Bse(t){return t.headers.location}i(Bse,"getLocationHeader");function qse(t){return t.headers["operation-location"]}i(qse,"getOperationLocationHeader");function Dse(t){return t.headers["azure-asyncoperation"]}i(Dse,"getAzureAsyncOperationHeader");function mKe(t){var e;let{location:r,requestMethod:n,requestPath:o,resourceLocationConfig:s}=t;switch(n){case"PUT":return o;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:o;default:return a()}function a(){switch(s){case"azure-async-operation":return;case"original-uri":return o;default:return r}}i(a,"getDefault")}i(mKe,"findResourceLocation");function Ise(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:o}=t,s=qse(e),a=Dse(e),c=yse({operationLocation:s,azureAsyncOperation:a}),u=Bse(e),p=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:mKe({requestMethod:p,location:u,requestPath:n,resourceLocationConfig:o})}:u!==void 0?{mode:"ResourceLocation",operationLocation:u}:p==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}i(Ise,"inferLroMode");function Rse(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return IT(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return np.verbose(`LRO: unrecognized operation status: ${e}`),e}}i(Rse,"transformStatus");function zKe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return Rse({status:r,statusCode:t.statusCode})}i(zKe,"getStatus");function gKe(t){var e,r;let{properties:n,provisioningState:o}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:o;return Rse({status:s,statusCode:t.statusCode})}i(gKe,"getProvisioningState");function IT(t){return t===202?"running":t<300?"succeeded":"failed"}i(IT,"toOperationStatus");function Nse({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?OKe(new Date(e)):r*1e3}}i(Nse,"parseRetryAfter");function wse(t){let e=t.flatResponse.error;if(!e){np.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){np.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}i(wse,"getErrorFromResponse");function OKe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}i(OKe,"calculatePollingIntervalFromDate");function Sse(t){let{response:e,state:r,operationLocation:n}=t;function o(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return IT(e.rawResponse.statusCode);case"Body":return RT(e,r);default:return"running"}}i(o,"helper");let s=o();return s==="running"&&n===void 0?"succeeded":s}i(Sse,"getStatusFromInitialResponse");async function EKe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:o,setErrorAsResult:s}=t;return Ese({init:i(async()=>{let a=await o.sendInitialRequest(),c=Ise({rawResponse:a.rawResponse,requestPath:o.requestPath,requestMethod:o.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:Sse,setErrorAsResult:s})}i(EKe,"initHttpOperation");function Fse({rawResponse:t},e){var r;switchLine truncated
|
|
|
|
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:a=s,o=1;break;case 1:r[n++]=a<<2|(s&48)>>4,a=s,o=2;break;case 2:r[n++]=(a&15)<<4|(s&60)>>2,a=s,o=3;break;case 3:r[n++]=(a&3)<<6|s,o=0;break}}if(o==1)throw Error("invalid base64 string.");return r.subarray(0,n)}i(sZe,"base64decode");r2.base64decode=sZe;function iZe(t){let e="",r=0,n,o=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=ra[n>>2],o=(n&3)<<4,r=1;break;case 1:e+=ra[o|n>>4],o=(n&15)<<2,r=2;break;case 2:e+=ra[o|n>>6],e+=ra[n&63],r=0;break}return r&&(e+=ra[o],e+="=",r==1&&(e+="=")),e}i(iZe,"base64encode");r2.base64encode=iZe});var lie=h(WC=>{"use strict";Object.defineProperty(WC,"__esModule",{value:!0});WC.utf8read=void 0;var _T=i(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function aZe(t){if(t.length<1)return"";let e=0,r=[],n=[],o=0,s,a=t.length;for(;e<a;)s=t[e++],s<128?n[o++]=s:s>191&&s<224?n[o++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[o++]=55296+(s>>10),n[o++]=56320+(s&1023)):n[o++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,o>8191&&(r.push(_T(n)),o=0);return r.length?(o&&r.push(_T(n.slice(0,o))),r.join("")):_T(n.slice(0,o))}i(aZe,"utf8read");WC.utf8read=aZe});var SM=h(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.WireType=xs.mergeBinaryOptions=xs.UnknownFieldHandler=void 0;var cZe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,o,s,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:o,wireType:s,data:a})},t.onWrite=(r,n,o)=>{for(let{no:s,wireType:a,data:c}of t.list(n))o.tag(s,a).raw(c)},t.list=(r,n)=>{if(e(r)){let o=r[t.symbol];return n?o.filter(s=>s.no==n):o}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=i(r=>r&&Array.isArray(r[t.symbol]),"is")})(cZe=xs.UnknownFieldHandler||(xs.UnknownFieldHandler={}));function uZe(t,e){return Object.assign(Object.assign({},t),e)}i(uZe,"mergeBinaryOptions");xs.mergeBinaryOptions=uZe;var pZe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(pZe=xs.WireType||(xs.WireType={}))});var TC=h(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.varint32read=br.varint32write=br.int64toString=br.int64fromString=br.varint64write=br.varint64read=void 0;function AZe(){let t=0,e=0;for(let n=0;n<28;n+=7){let o=this.buf[this.pos++];if(t|=(o&127)<<n,(o&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<n,(o&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}i(AZe,"varint64read");br.varint64read=AZe;function lZe(t,e,r){for(let s=0;s<28;s=s+7){let a=t>>>s,c=!(!(a>>>7)&&e==0),u=(c?a|128:a)&255;if(r.push(u),!c)return}let n=t>>>28&15|(e&7)<<4,o=e>>3!=0;if(r.push((o?n|128:n)&255),!!o){for(let s=3;s<31;s=s+7){let a=e>>>s,c=!!(a>>>7),u=(c?a|128:a)&255;if(r.push(u),!c)return}r.push(e>>>31&1)}}i(lZe,"varint64write");br.varint64write=lZe;var xC=65536*65536;function dZe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,o=0;function s(a,c){let u=Number(t.slice(a,c));o*=r,n=n*r+u,n>=xC&&(o=o+(n/xC|0),n=n%xC)}return i(s,"add1e6digit"),s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,o]}i(dZe,"int64fromString");br.int64fromString=dZe;function bZe(t,e){if(e>>>0<=2097151)return""+(xC*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,o=e>>16&65535,s=r+n*6777216+o*6710656,a=n+o*8147497,c=o*2,u=1e7;s>=u&&(a+=Math.floor(s/u),s%=u),a>=u&&(c+=Math.floor(a/u),a%=u);function p(A,l){let b=A?String(A):"";return l?"0000000".slice(b.length)+b:b}return i(p,"decimalFrom1e7"),p(c,0)+p(a,c)+p(s,1)}i(bZe,"int64toString");br.int64toString=bZe;function fZe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}i(fZe,"varint32write");br.varint32write=fZe;function MZe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}i(MZe,"varint32read");br.varint32read=MZe});var mc=h(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.PbLong=hc.PbULong=hc.detectBi=void 0;var FM=TC(),y0;function die(){let t=new DataView(new ArrayBuffer(8));y0=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("922337203685477580
Line truncated
|
|
|
|
|
`)}};uy.RpcError=dv});var fv=h(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.mergeRpcOptions=void 0;var Hie=C1();function Le0(t,e){if(!e)return t;let r={};py(t,r),py(e,r);for(let n of Object.keys(e)){let o=e[n];switch(n){case"jsonOptions":r.jsonOptions=Hie.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Hie.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},py(t.meta,r.meta),py(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(o):o.concat();break}}return r}i(Le0,"mergeRpcOptions");Ay.mergeRpcOptions=Le0;function py(t,e){if(!t)return;let r=e;for(let[n,o]of Object.entries(t))o instanceof Date?r[n]=new Date(o.getTime()):Array.isArray(o)?r[n]=o.concat():r[n]=o}i(py,"copy")});var hv=h(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});cp.Deferred=cp.DeferredState=void 0;var Ls;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Ls=cp.DeferredState||(cp.DeferredState={}));var Mv=class{static{i(this,"Deferred")}constructor(e=!0){this._state=Ls.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==Ls.PENDING)throw new Error(`cannot resolve ${Ls[this.state].toLowerCase()}`);this._resolve(e),this._state=Ls.RESOLVED}reject(e){if(this.state!==Ls.PENDING)throw new Error(`cannot reject ${Ls[this.state].toLowerCase()}`);this._reject(e),this._state=Ls.REJECTED}resolvePending(e){this._state===Ls.PENDING&&this.resolve(e)}rejectPending(e){this._state===Ls.PENDING&&this.reject(e)}};cp.Deferred=Mv});var zv=h(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});ly.RpcOutputStreamController=void 0;var Xie=hv(),up=C1(),mv=class{static{i(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){up.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){up.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){up.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){up.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:i(()=>{let e=this._itState;up.assert(e,"bad state"),up.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new Xie.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;up.assert(n.state==Xie.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};ly.RpcOutputStreamController=mv});var Ov=h(u2=>{"use strict";var Qe0=u2&&u2.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};Object.defineProperty(u2,"__esModule",{value:!0});u2.UnaryCall=void 0;var gv=class{static{i(this,"UnaryCall")}constructor(e,r,n,o,s,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=o,this.response=s,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return Qe0(this,void 0,void 0,function*(){let[e,r,n,o]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:o}})}};u2.UnaryCall=gv});var Cv=h(p2=>{"use strict";var _e0=p2&&p2.__awaiter||function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function
Line truncated
|
|
|
|
|
You can add a runtime option to disable the check or this warning:
|
|
|
|
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}i(Ro0,"logUnexpecedPropertyAccessOnce");function No0(){Object.keys(o4).forEach(function(t){delete o4[t]})}i(No0,"resetLoggedProperties")});var i4=m(_s=>{"use strict";_s.__esModule=!0;_s.HandlebarsEnvironment=rQ;function xpe(t){return t&&t.__esModule?t:{default:t}}i(xpe,"_interopRequireDefault");var hp=Yt(),wo0=rn(),eQ=xpe(wo0),So0=jL(),Fo0=wpe(),Wo0=KL(),s4=xpe(Wo0),xo0=ZL(),To0="4.7.9";_s.VERSION=To0;var vo0=8;_s.COMPILER_REVISION=vo0;var Lo0=7;_s.LAST_COMPATIBLE_COMPILER_REVISION=Lo0;var Qo0={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};_s.REVISION_CHANGES=Qo0;var tQ="[object Object]";function rQ(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},So0.registerDefaultHelpers(this),Fo0.registerDefaultDecorators(this)}i(rQ,"HandlebarsEnvironment");rQ.prototype={constructor:rQ,logger:s4.default,log:s4.default.log,registerHelper:i(function(e,r){if(hp.toString.call(e)===tQ){if(r)throw new eQ.default("Arg not supported with multiple helpers");hp.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:i(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:i(function(e,r){if(hp.toString.call(e)===tQ)hp.extend(this.partials,e);else{if(typeof r>"u")throw new eQ.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:i(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:i(function(e,r){if(hp.toString.call(e)===tQ){if(r)throw new eQ.default("Arg not supported with multiple decorators");hp.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:i(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:i(function(){xo0.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var _o0=s4.default.log;_s.log=_o0;_s.createFrame=hp.createFrame;_s.logger=s4.default});var vpe=m((a4,Tpe)=>{"use strict";a4.__esModule=!0;function nQ(t){this.string=t}i(nQ,"SafeString");nQ.prototype.toString=nQ.prototype.toHTML=function(){return""+this.string};a4.default=nQ;Tpe.exports=a4.default});var Lpe=m(oQ=>{"use strict";oQ.__esModule=!0;oQ.wrapHelper=Po0;function Po0(t,e){if(typeof t!="function")return t;var r=i(function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=e(o),t.apply(this,arguments)},"wrapper");return r}i(Po0,"wrapHelper")});var Gpe=m(Cc=>{"use strict";Cc.__esModule=!0;Cc.checkRevision=Vo0;Cc.template=Yo0;Cc.wrapProgram=c4;Cc.resolvePartial=Jo0;Cc.invokePartial=jo0;Cc.noop=kpe;function ko0(t){return t&&t.__esModule?t:{default:t}}i(ko0,"_interopRequireDefault");function Uo0(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i(Uo0,"_interopRequireWildcard");var Go0=Yt(),y2=Uo0(Go0),Ho0=rn(),ia=ko0(Ho0),aa=i4(),Qpe=jL(),Xo0=Lpe(),_pe=ZL();function Vo0(t){var e=t&&t[0]||1,r=aa.COMPILER_REVISION;if(!(e>=aa.LAST_COMPATIBLE_COMPILER_REVISION&&e<=aa.COMPILER_REVISION))if(e<aa.LAST_COMPATIBLE_COMPILER_REVISION){var n=aa.REVISION_CHANGES[r],o=aa.REVISION_CHANGES[e];throw new ia.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new ia.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}i(Vo0,"checkRevision");function Yo0(t,e){if(!e)throw new ia.default("No environment passed to template");if(!t||!t.main)throw new ia.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(a,c,u){u.hash&&(c=y2.extend({},c,u.hash),u.ids&&(u.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,u),u.hooks=this.hooks,u.protoAccessControl=this.protoAccessControl;var p=e.VM.invokePartial.call(this,a,c,u);if(p==null&&e.compile&&(u.partials[u.name]=e.compile(a,t.compilerOptions,e),p=u.partials[u.name](c,u)),p!=null){if(u.indent){for(var A=p.split(`
|
|
|
|
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}i(ls0,"logUnexpecedPropertyAccessOnce");function ds0(){Object.keys(p4).forEach(function(t){delete p4[t]})}i(ds0,"resetLoggedProperties")});var l4=h(ks=>{"use strict";ks.__esModule=!0;ks.HandlebarsEnvironment=dQ;function oAe(t){return t&&t.__esModule?t:{default:t}}i(oAe,"_interopRequireDefault");var gp=Yt(),bs0=nn(),AQ=oAe(bs0),fs0=aQ(),Ms0=eAe(),hs0=uQ(),A4=oAe(hs0),ms0=pQ(),zs0="4.7.9";ks.VERSION=zs0;var gs0=8;ks.COMPILER_REVISION=gs0;var Os0=7;ks.LAST_COMPATIBLE_COMPILER_REVISION=Os0;var Es0={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};ks.REVISION_CHANGES=Es0;var lQ="[object Object]";function dQ(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},fs0.registerDefaultHelpers(this),Ms0.registerDefaultDecorators(this)}i(dQ,"HandlebarsEnvironment");dQ.prototype={constructor:dQ,logger:A4.default,log:A4.default.log,registerHelper:i(function(e,r){if(gp.toString.call(e)===lQ){if(r)throw new AQ.default("Arg not supported with multiple helpers");gp.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:i(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:i(function(e,r){if(gp.toString.call(e)===lQ)gp.extend(this.partials,e);else{if(typeof r>"u")throw new AQ.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:i(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:i(function(e,r){if(gp.toString.call(e)===lQ){if(r)throw new AQ.default("Arg not supported with multiple decorators");gp.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:i(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:i(function(){ms0.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var Cs0=A4.default.log;ks.log=Cs0;ks.createFrame=gp.createFrame;ks.logger=A4.default});var iAe=h((d4,sAe)=>{"use strict";d4.__esModule=!0;function bQ(t){this.string=t}i(bQ,"SafeString");bQ.prototype.toString=bQ.prototype.toHTML=function(){return""+this.string};d4.default=bQ;sAe.exports=d4.default});var aAe=h(fQ=>{"use strict";fQ.__esModule=!0;fQ.wrapHelper=ys0;function ys0(t,e){if(typeof t!="function")return t;var r=i(function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=e(o),t.apply(this,arguments)},"wrapper");return r}i(ys0,"wrapHelper")});var dAe=h(yc=>{"use strict";yc.__esModule=!0;yc.checkRevision=Ns0;yc.template=ws0;yc.wrapProgram=b4;yc.resolvePartial=Ss0;yc.invokePartial=Fs0;yc.noop=AAe;function Bs0(t){return t&&t.__esModule?t:{default:t}}i(Bs0,"_interopRequireDefault");function qs0(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i(qs0,"_interopRequireWildcard");var Ds0=Yt(),B2=qs0(Ds0),Is0=nn(),aa=Bs0(Is0),ca=l4(),cAe=aQ(),Rs0=aAe(),uAe=pQ();function Ns0(t){var e=t&&t[0]||1,r=ca.COMPILER_REVISION;if(!(e>=ca.LAST_COMPATIBLE_COMPILER_REVISION&&e<=ca.COMPILER_REVISION))if(e<ca.LAST_COMPATIBLE_COMPILER_REVISION){var n=ca.REVISION_CHANGES[r],o=ca.REVISION_CHANGES[e];throw new aa.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new aa.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}i(Ns0,"checkRevision");function ws0(t,e){if(!e)throw new aa.default("No environment passed to template");if(!t||!t.main)throw new aa.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(a,c,u){u.hash&&(c=B2.extend({},c,u.hash),u.ids&&(u.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,u),u.hooks=this.hooks,u.protoAccessControl=this.protoAccessControl;var p=e.VM.invokePartial.call(this,a,c,u);if(p==null&&e.compile&&(u.partials[u.name]=e.compile(a,t.compilerOptions,e),p=u.partials[u.name](c,u)),p!=null){if(u.indent){for(var A=p.split(`
|
|
|
|
|
`),l=0,b=A.length;l<b&&!(!A[l]&&l+1===b);l++)A[l]=u.indent+A[l];p=A.join(`
|
|
|
|
|
`)}return p}else throw new ia.default("The partial "+u.name+" could not be compiled when running in runtime-only mode")}i(n,"invokePartialWrapper");var o={strict:i(function(c,u,p){if(!c||!(u in c))throw new ia.default('"'+u+'" not defined in '+c,{loc:p});return o.lookupProperty(c,u)},"strict"),lookupProperty:i(function(c,u){var p=c[u];if(p==null||Object.prototype.hasOwnProperty.call(c,u)||_pe.resultIsAllowed(p,o.protoAccessControl,u))return p},"lookupProperty"),lookup:i(function(c,u){for(var p=c.length,A=0;A<p;A++){var l=c[A]&&o.lookupProperty(c[A],u);if(l!=null)return l}},"lookup"),lambda:i(function(c,u){return typeof c=="function"?c.call(u):c},"lambda"),escapeExpression:y2.escapeExpression,invokePartial:n,fn:i(function(c){var u=t[c];return u.decorator=t[c+"_d"],u},"fn"),programs:[],program:i(function(c,u,p,A,l){var b=this.programs[c],f=this.fn(c);return u||l||A||p?b=c4(this,c,f,u,p,A,l):b||(b=this.programs[c]=c4(this,c,f)),b},"program"),data:i(function(c,u){for(;c&&u--;)c=c._parent;return c},"data"),mergeIfNeeded:i(function(c,u){var p=c||u;return c&&u&&c!==u&&(p=y2.extend({},u,c)),p},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function s(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],u=c.data;s._setup(c),!c.partial&&t.useData&&(u=$o0(a,u));var p=void 0,A=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?p=a!=c.depths[0]?[a].concat(c.depths):c.depths:p=[a]);function l(b){return""+t.main(o,b,o.helpers,o.partials,u,A,p)}return i(l,"main"),l=Upe(t.main,l,o,c.depths||[],u,A),l(a,c)}return i(s,"ret"),s.isTop=!0,s._setup=function(a){if(a.partial)o.protoAccessControl=a.protoAccessControl,o.helpers=a.helpers,o.partials=a.partials,o.decorators=a.decorators,o.hooks=a.hooks;else{var c={};Ppe(c,e.helpers,o),Ppe(c,a.helpers,o),o.helpers=c,t.usePartial&&(o.partials=o.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(o.decorators=y2.extend({},e.decorators,a.decorators)),o.hooks={},o.protoAccessControl=_pe.createProtoAccessControl(a);var u=a.allowCallsToHelperMissing||r;Qpe.moveHelperToHooks(o,"helperMissing",u),Qpe.moveHelperToHooks(o,"blockHelperMissing",u)}},s._child=function(a,c,u,p){if(t.useBlockParams&&!u)throw new ia.default("must pass block params");if(t.useDepths&&!p)throw new ia.default("must pass parent depths");return c4(o,a,t[a],c,0,u,p)},s}i(Yo0,"template");function c4(t,e,r,n,o,s,a){function c(u){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],A=a;return a&&u!=a[0]&&!(u===t.nullContext&&a[0]===null)&&(A=[u].concat(a)),r(t,u,t.helpers,t.partials,p.data||n,s&&[p.blockParams].concat(s),A)}return i(c,"prog"),c=Upe(r,c,t,a,n,s),c.program=e,c.depth=a?a.length:0,c.blockParams=o||0,c}i(c4,"wrapProgram");function Jo0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=u4(r.partials,t)):r.name==="@partial-block"?t=u4(r.data,"partial-block"):t=u4(r.partials,r.name),t}i(Jo0,"resolvePartial");function jo0(t,e,r){var n=u4(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var o=void 0;if(r.fn&&r.fn!==kpe&&(function(){r.data=aa.createFrame(r.data);var s=r.fn;o=r.data["partial-block"]=i(function(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return u.data=aa.createFrame(u.data),u.data["partial-block"]=n,s(c,u)},"partialBlockWrapper"),s.partials&&(r.partials=y2.extend({},r.partials,s.partials))})(),t===void 0&&o&&(t=o),t===void 0)throw new ia.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}i(jo0,"invokePartial");function kpe(){return""}i(kpe,"noop");function u4(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}i(u4,"lookupOwnProperty");function $o0(t,e){return(!e||!("root"in e))&&(e=e?aa.createFrame(e):{},e.root=t),e}i($o0,"initData");function Upe(t,e,r,n,o,s){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],o,s,n),y2.extend(e,a)}return e}i(Upe,"executeDecorators");function Ppe(t,e,r){e&&Object.keys(e).forEach(function(n){var o=e[n];t[n]=Ko0(o,r)})}i(Ppe,"addHelpers");function Ko0(t,e){var r=e.lookupProperty;return Xo0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}i(Ko0,"passLookupPropertyOption")});var sQ=m((p4,Hpe)=>{"use strict";p4.__esModule=!0;p4.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Hpe.exports=p4.default});var jpe=m((A4,Jpe)=>{"use strict";A4.__esModule=!0;function aQ(t){return t&&t.__esModule?t:{default:t}}i(aQ,"_interopRequireDefault");function cQ(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i(cQ,"_interopRequireWildcard");var Zo0=i4(),Xpe=cQ(Zo0),es0=vpe(),ts0=aQ(es0),rs0=rn(),ns0=aQ(rs0),os0=Yt(),iQ=cQ(os0),ss0=Gpe
Line truncated
|
|
|
|
|
`)}return p}else throw new aa.default("The partial "+u.name+" could not be compiled when running in runtime-only mode")}i(n,"invokePartialWrapper");var o={strict:i(function(c,u,p){if(!c||!(u in c))throw new aa.default('"'+u+'" not defined in '+c,{loc:p});return o.lookupProperty(c,u)},"strict"),lookupProperty:i(function(c,u){var p=c[u];if(p==null||Object.prototype.hasOwnProperty.call(c,u)||uAe.resultIsAllowed(p,o.protoAccessControl,u))return p},"lookupProperty"),lookup:i(function(c,u){for(var p=c.length,A=0;A<p;A++){var l=c[A]&&o.lookupProperty(c[A],u);if(l!=null)return l}},"lookup"),lambda:i(function(c,u){return typeof c=="function"?c.call(u):c},"lambda"),escapeExpression:B2.escapeExpression,invokePartial:n,fn:i(function(c){var u=t[c];return u.decorator=t[c+"_d"],u},"fn"),programs:[],program:i(function(c,u,p,A,l){var b=this.programs[c],M=this.fn(c);return u||l||A||p?b=b4(this,c,M,u,p,A,l):b||(b=this.programs[c]=b4(this,c,M)),b},"program"),data:i(function(c,u){for(;c&&u--;)c=c._parent;return c},"data"),mergeIfNeeded:i(function(c,u){var p=c||u;return c&&u&&c!==u&&(p=B2.extend({},u,c)),p},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function s(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],u=c.data;s._setup(c),!c.partial&&t.useData&&(u=Ws0(a,u));var p=void 0,A=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?p=a!=c.depths[0]?[a].concat(c.depths):c.depths:p=[a]);function l(b){return""+t.main(o,b,o.helpers,o.partials,u,A,p)}return i(l,"main"),l=lAe(t.main,l,o,c.depths||[],u,A),l(a,c)}return i(s,"ret"),s.isTop=!0,s._setup=function(a){if(a.partial)o.protoAccessControl=a.protoAccessControl,o.helpers=a.helpers,o.partials=a.partials,o.decorators=a.decorators,o.hooks=a.hooks;else{var c={};pAe(c,e.helpers,o),pAe(c,a.helpers,o),o.helpers=c,t.usePartial&&(o.partials=o.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(o.decorators=B2.extend({},e.decorators,a.decorators)),o.hooks={},o.protoAccessControl=uAe.createProtoAccessControl(a);var u=a.allowCallsToHelperMissing||r;cAe.moveHelperToHooks(o,"helperMissing",u),cAe.moveHelperToHooks(o,"blockHelperMissing",u)}},s._child=function(a,c,u,p){if(t.useBlockParams&&!u)throw new aa.default("must pass block params");if(t.useDepths&&!p)throw new aa.default("must pass parent depths");return b4(o,a,t[a],c,0,u,p)},s}i(ws0,"template");function b4(t,e,r,n,o,s,a){function c(u){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],A=a;return a&&u!=a[0]&&!(u===t.nullContext&&a[0]===null)&&(A=[u].concat(a)),r(t,u,t.helpers,t.partials,p.data||n,s&&[p.blockParams].concat(s),A)}return i(c,"prog"),c=lAe(r,c,t,a,n,s),c.program=e,c.depth=a?a.length:0,c.blockParams=o||0,c}i(b4,"wrapProgram");function Ss0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=f4(r.partials,t)):r.name==="@partial-block"?t=f4(r.data,"partial-block"):t=f4(r.partials,r.name),t}i(Ss0,"resolvePartial");function Fs0(t,e,r){var n=f4(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var o=void 0;if(r.fn&&r.fn!==AAe&&(function(){r.data=ca.createFrame(r.data);var s=r.fn;o=r.data["partial-block"]=i(function(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return u.data=ca.createFrame(u.data),u.data["partial-block"]=n,s(c,u)},"partialBlockWrapper"),s.partials&&(r.partials=B2.extend({},r.partials,s.partials))})(),t===void 0&&o&&(t=o),t===void 0)throw new aa.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}i(Fs0,"invokePartial");function AAe(){return""}i(AAe,"noop");function f4(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}i(f4,"lookupOwnProperty");function Ws0(t,e){return(!e||!("root"in e))&&(e=e?ca.createFrame(e):{},e.root=t),e}i(Ws0,"initData");function lAe(t,e,r,n,o,s){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],o,s,n),B2.extend(e,a)}return e}i(lAe,"executeDecorators");function pAe(t,e,r){e&&Object.keys(e).forEach(function(n){var o=e[n];t[n]=xs0(o,r)})}i(pAe,"addHelpers");function xs0(t,e){var r=e.lookupProperty;return Rs0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}i(xs0,"passLookupPropertyOption")});var MQ=h((M4,bAe)=>{"use strict";M4.__esModule=!0;M4.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};bAe.exports=M4.default});var zAe=h((h4,mAe)=>{"use strict";h4.__esModule=!0;function mQ(t){return t&&t.__esModule?t:{default:t}}i(mQ,"_interopRequireDefault");function zQ(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i(zQ,"_interopRequireWildcard");var Ts0=l4(),fAe=zQ(Ts0),vs0=iAe(),Ls0=mQ(vs0),Qs0=nn(),_s0=mQ(Qs0),Ps0=Yt(),hQ=zQ(Ps0),ks0=dAe
Line truncated
|
|
|
|
|
`+this.lexer.showPosition()+`
|
|
|
|
|
Expecting `+pe.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Ge="Parse error on line "+(l+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Ge,{text:this.lexer.match,token:this.terminals_[I]||I,line:this.lexer.yylineno,loc:y,expected:pe})}}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+I);switch(Q[0]){case 1:a.push(I),c.push(this.lexer.yytext),u.push(this.lexer.yylloc),a.push(Q[1]),I=null,W?(I=W,W=null):(b=this.lexer.yyleng,A=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(ge=this.productions_[Q[1]][1],Qe.$=c[c.length-ge],Qe._$={first_line:u[u.length-(ge||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(ge||1)].first_column,last_column:u[u.length-1].last_column},E&&(Qe._$.range=[u[u.length-(ge||1)].range[0],u[u.length-1].range[1]]),qe=this.performAction.call(Qe,A,b,l,this.yy,Q[1],c,u),typeof qe<"u")return qe;ge&&(a=a.slice(0,-1*ge*2),c=c.slice(0,-1*ge),u=u.slice(0,-1*ge)),a.push(this.productions_[Q[1]][0]),c.push(Qe.$),u.push(Qe._$),Ue=p[a[a.length-2]][a[a.length-1]],a.push(Ue);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:i(function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},"parseError"),setInput:i(function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:i(function(s){var a=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this},"unput"),more:i(function(){return this._more=!0,this},"more"),less:i(function(s){this.unput(this.match.slice(s))},"less"),pastInput:i(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
|
|
|
Expecting `+pe.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Ge="Parse error on line "+(l+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Ge,{text:this.lexer.match,token:this.terminals_[I]||I,line:this.lexer.yylineno,loc:y,expected:pe})}}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+I);switch(L[0]){case 1:a.push(I),c.push(this.lexer.yytext),u.push(this.lexer.yylloc),a.push(L[1]),I=null,W?(I=W,W=null):(b=this.lexer.yyleng,A=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,M>0&&M--);break;case 2:if(me=this.productions_[L[1]][1],Qe.$=c[c.length-me],Qe._$={first_line:u[u.length-(me||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(me||1)].first_column,last_column:u[u.length-1].last_column},E&&(Qe._$.range=[u[u.length-(me||1)].range[0],u[u.length-1].range[1]]),De=this.performAction.call(Qe,A,b,l,this.yy,L[1],c,u),typeof De<"u")return De;me&&(a=a.slice(0,-1*me*2),c=c.slice(0,-1*me),u=u.slice(0,-1*me)),a.push(this.productions_[L[1]][0]),c.push(Qe.$),u.push(Qe._$),Ue=p[a[a.length-2]][a[a.length-1]],a.push(Ue);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:i(function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},"parseError"),setInput:i(function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:i(function(s){var a=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this},"unput"),more:i(function(){return this._more=!0,this},"more"),less:i(function(s){this.unput(this.match.slice(s))},"less"),pastInput:i(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
|
|
|
`+a+"^"},"showPosition"),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,c,u,p,A;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),b=0;b<l.length&&(c=this._input.match(this.rules[l[b]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,u=b,!this.options.flex)));b++);return a?(A=a[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],s=this.performAction.call(this,this.yy,this,l[u],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var s=this.next();return typeof s<"u"?s:this.lex()},"lex"),begin:i(function(s){this.conditionStack.push(s)},"begin"),popState:i(function(){return this.conditionStack.pop()},"popState"),_currentRules:i(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:i(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:i(function(s){this.begin(s)},"begin")};return n.options={},n.performAction=i(function(s,a,c,u){function p(l,b){return a.yytext=a.yytext.substring(l,a.yyleng-b+l)}i(p,"strip");var A=u;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(p(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(p(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(p(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=p(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=p(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return i(r,"Parser"),r.prototype=t,t.Parser=r,new r})();d4.default=cs0;Zpe.exports=d4.default});var m4=m((f4,nAe)=>{"use strict";f4.__esModule=!0;function us0(t){return t&&t.__esModule?t:{default:t}}i(us0,"_interopRequireDefault");var ps0=rn(),pQ=us0(ps0);function b4(){this.parents=[]}i(b4,"Visitor");b4.prototype={constructor:b4,mutating:!1,acceptKey:i(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!b4.prototype[n.type])throw new pQ.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:i(function(e,r){if(this.acceptKey(e,r),!e[r])throw new pQ.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:i(function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},"acceptArray"),accept:i(function(e){if(e){if(!this[e.type])throw new pQ.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},"accept"),Program:i(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:M4,Decorator:M4,BlockStatement:tAe,DecoratorBlock:tAe,PartialStatement:rAe,PartialBlockStatement:i(function(e){rAe.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:i(function(){},"ContentStatement"),CommentStatement:i(function(){},"CommentStatement"),SubExpression:M4,PathExpression:i(function(){},"PathExpressionLine truncated
|
|
|
|
|
`])}),e},"merge"),each:i(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:i(function(){var e=this.currentLocation||{start:{}};return new Ep(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:i(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Ep?e:(e=SQ(e,this,r),new Ep(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:i(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:i(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:i(function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var a=SQ(e[s],r);a!=="undefined"&&n.push([r.quotedString(s),":",a])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},"objectLiteral"),generateList:i(function(e){for(var r=this.empty(),n=0,o=e.length;n<o;n++)n&&r.add(","),r.add(SQ(e[n],this));return r},"generateList"),generateArray:i(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};B4.default=LAe;QAe.exports=B4.default});var HAe=m((q4,GAe)=>{"use strict";q4.__esModule=!0;function UAe(t){return t&&t.__esModule?t:{default:t}}i(UAe,"_interopRequireDefault");var PAe=i4(),ai0=rn(),WQ=UAe(ai0),ci0=Yt(),ui0=_Ae(),kAe=UAe(ui0);function N2(t){this.value=t}i(N2,"Literal");function w2(){}i(w2,"JavaScriptCompiler");w2.prototype={nameLookup:i(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:i(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:i(function(){var e=PAe.COMPILER_REVISION,r=PAe.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:i(function(e,r,n){return ci0.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:i(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:i(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:i(function(e,r,n,o){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,a=void 0,c=void 0,u=void 0,p=void 0;for(u=0,p=s.length;u<p;u++)a=s[u],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new WQ.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
|
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var s=this.next();return typeof s<"u"?s:this.lex()},"lex"),begin:i(function(s){this.conditionStack.push(s)},"begin"),popState:i(function(){return this.conditionStack.pop()},"popState"),_currentRules:i(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:i(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:i(function(s){this.begin(s)},"begin")};return n.options={},n.performAction=i(function(s,a,c,u){function p(l,b){return a.yytext=a.yytext.substring(l,a.yyleng-b+l)}i(p,"strip");var A=u;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(p(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(p(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(p(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=p(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=p(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return i(r,"Parser"),r.prototype=t,t.Parser=r,new r})();z4.default=Hs0;EAe.exports=z4.default});var C4=h((E4,qAe)=>{"use strict";E4.__esModule=!0;function Xs0(t){return t&&t.__esModule?t:{default:t}}i(Xs0,"_interopRequireDefault");var Vs0=nn(),OQ=Xs0(Vs0);function g4(){this.parents=[]}i(g4,"Visitor");g4.prototype={constructor:g4,mutating:!1,acceptKey:i(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!g4.prototype[n.type])throw new OQ.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:i(function(e,r){if(this.acceptKey(e,r),!e[r])throw new OQ.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:i(function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},"acceptArray"),accept:i(function(e){if(e){if(!this[e.type])throw new OQ.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},"accept"),Program:i(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:O4,Decorator:O4,BlockStatement:yAe,DecoratorBlock:yAe,PartialStatement:BAe,PartialBlockStatement:i(function(e){BAe.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:i(function(){},"ContentStatement"),CommentStatement:i(function(){},"CommentStatement"),SubExpression:O4,PathExpression:i(function(){},"PathExpressionLine truncated
|
|
|
|
|
`])}),e},"merge"),each:i(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:i(function(){var e=this.currentLocation||{start:{}};return new yp(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:i(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof yp?e:(e=UQ(e,this,r),new yp(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:i(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:i(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:i(function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var a=UQ(e[s],r);a!=="undefined"&&n.push([r.quotedString(s),":",a])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},"objectLiteral"),generateList:i(function(e){for(var r=this.empty(),n=0,o=e.length;n<o;n++)n&&r.add(","),r.add(UQ(e[n],this));return r},"generateList"),generateArray:i(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};w4.default=ale;cle.exports=w4.default});var ble=h((S4,dle)=>{"use strict";S4.__esModule=!0;function lle(t){return t&&t.__esModule?t:{default:t}}i(lle,"_interopRequireDefault");var ple=l4(),Gi0=nn(),HQ=lle(Gi0),Hi0=Yt(),Xi0=ule(),Ale=lle(Xi0);function w2(t){this.value=t}i(w2,"Literal");function S2(){}i(S2,"JavaScriptCompiler");S2.prototype={nameLookup:i(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:i(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:i(function(){var e=ple.COMPILER_REVISION,r=ple.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:i(function(e,r,n){return Hi0.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:i(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:i(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:i(function(e,r,n,o){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,a=void 0,c=void 0,u=void 0,p=void 0;for(u=0,p=s.length;u<p;u++)a=s[u],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new HQ.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
|
|
|
`]),this.decorators.push("return fn;"),o?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
|
|
|
`),this.decorators.push(`}
|
|
|
|
|
`),this.decorators=this.decorators.merge()));var A=this.createFunctionContext(o);if(this.isChild)return A;var l={compiler:this.compilerInfo(),main:A};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var b=this.context,f=b.programs,z=b.decorators;for(u=0,p=f.length;u<p;u++)l[u]=f[u],z[u]&&(l[u+"_d"]=z[u],l.useDecorators=!0);return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),o?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},"compile"),preamble:i(function(){this.lastContext=0,this.source=new kAe.default(this.options.srcName),this.decorators=new kAe.default(this.options.srcName)},"preamble"),createFunctionContext:i(function(e){var r=this,n="",o=this.stackVars.concat(this.registers.list);o.length>0&&(n+=", "+o.join(", "));var s=0;Object.keys(this.aliases).forEach(function(u){var p=r.aliases[u];p.children&&p.referenceCount>1&&(n+=", alias"+ ++s+"="+u,p.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var c=this.mergeSource(n);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
|
|
|
|
|
`),this.decorators=this.decorators.merge()));var A=this.createFunctionContext(o);if(this.isChild)return A;var l={compiler:this.compilerInfo(),main:A};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var b=this.context,M=b.programs,z=b.decorators;for(u=0,p=M.length;u<p;u++)l[u]=M[u],z[u]&&(l[u+"_d"]=z[u],l.useDecorators=!0);return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),o?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},"compile"),preamble:i(function(){this.lastContext=0,this.source=new Ale.default(this.options.srcName),this.decorators=new Ale.default(this.options.srcName)},"preamble"),createFunctionContext:i(function(e){var r=this,n="",o=this.stackVars.concat(this.registers.list);o.length>0&&(n+=", "+o.join(", "));var s=0;Object.keys(this.aliases).forEach(function(u){var p=r.aliases[u];p.children&&p.referenceCount>1&&(n+=", alias"+ ++s+"="+u,p.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var c=this.mergeSource(n);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
|
|
|
|
|
`,c,"}"])},"createFunctionContext"),mergeSource:i(function(e){var r=this.environment.isSimple,n=!this.forceBuffer,o=void 0,s=void 0,a=void 0,c=void 0;return this.source.each(function(u){u.appendToBuffer?(a?u.prepend(" + "):a=u,c=u):(a&&(s?a.prepend("buffer += "):o=!0,c.add(";"),a=c=void 0),s=!0,r||(n=!1))}),n?a?(a.prepend("return "),c.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(o?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),c.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(o?"":`;
|
|
|
|
|
`)),this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:i(function(){return`
|
|
|
|
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
|
|
@@ -86,84 +86,85 @@ Expecting `+pe.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Ge="Parse error
|
|
|
|
|
}
|
|
|
|
|
return undefined
|
|
|
|
|
}
|
|
|
|
|
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:i(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:i(function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},"ambiguousBlockValue"),appendContent:i(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:i(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:i(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:i(function(e){this.lastContext=e},"getContext"),pushContext:i(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:i(function(e,r,n,o){var s=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,r,n)},"lookupOnContext"),lookupBlockParam:i(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:i(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:i(function(e,r,n,o,s){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(pi0(this.options.strict&&s,this,r,n,e));return}for(var c=r.length,u=i(function(A){a.replaceStack(function(l){var b=a.nameLookup(l,r[A],e);return o?[" && ",b]:[" != null ? ",b," : ",l]})},"_loop"),p=n;p<c;p++)u(p)},"resolvePath"),resolvePossibleLambda:i(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:i(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:i(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:i(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:i(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:i(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:i(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:i(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:i(function(e,r){var n=this.nameLookup("decorators",r,"decorator"),o=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",o])," || fn;"])},"registerDecorator"),invokeHelper:i(function(e,r,n){var o=this.popStack(),s=this.setupHelper(e,r),a=[];n&&a.push(s.name),a.push(o),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],u=this.source.functionCall(c,"call",s.callParams);this.push(u)},"invokeHelper"),itemsSeparatedBy:i(function(e,r){var n=[];n.push(e[0]);for(var o=1;o<e.length;o++)n.push(r,e[o]);return n},"itemsSeparatedBy"),invokeKnownHelper:i(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:i(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,e,r),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",s," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
|
|
|
|
`,e};A1.prototype.Program=function(t){var e="",r=t.body,n=void 0,o=void 0;if(t.blockParams){var s="BLOCK PARAMS: [";for(n=0,o=t.blockParams.length;n<o;n++)s+=" "+t.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,o=r.length;n<o;n++)e+=this.accept(r[n]);return this.padding--,e};A1.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};A1.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};A1.prototype.BlockStatement=A1.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};A1.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};A1.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};A1.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};A1.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};A1.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,o=0,s=e.length;o<s;o++)r.push(this.accept(e[o]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};A1.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};A1.prototype.StringLiteral=function(t){return'"'+t.value+'"'};A1.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};A1.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};A1.prototype.UndefinedLiteral=function(){return"UNDEFINED"};A1.prototype.NullLiteral=function(){return"NULL"};A1.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,o=e.length;n<o;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};A1.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var vQ=m((Wt1,KAe)=>{var R4=YAe().default,$Ae=JAe();R4.PrintVisitor=$Ae.PrintVisitor;R4.print=$Ae.print;KAe.exports=R4;function jAe(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=R4.compile(n)}i(jAe,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=jAe,require.extensions[".hbs"]=jAe)});var x4=m(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.Signature=Bc.Envelope=void 0;Bc.Envelope={fromJSON(t){return{payload:W4(t.payload)?Buffer.from(cle(t.payload)):Buffer.alloc(0),payloadType:W4(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>Bc.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=ule(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>Bc.Signature.toJSON(r))),e}};Bc.Signature={fromJSON(t){return{sig:W4(t.sig)?Buffer.from(cle(t.sig)):Buffer.alloc(0),keyid:W4(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=ule(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function cle(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}i(cle,"bytesFromBase64");function ule(t){return globalThis.Buffer.from(t).toString("base64")}i(ule,"base64FromBytes");function W4(t){return t!=null}i(W4,"isSet")});var Ale=m(T4=>{"use strict";Object.defineProperty(T4,"__esModule",{value:!0});T4.Timestamp=void 0;T4.Timestamp={fromJSON(t){return{seconds:ple(t.seconds)?globalThis.String(t.seconds):"0",nanos:ple(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!=="0"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function ple(t){return t!=null}i(ple,"isSet")});var pa=m(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.TimeRange=Ce.X509CertificateChain=Ce.SubjectAlternativeName=Ce.X509Certificate=Ce.DistinguishedName=Ce.ObjectIdentifierValuePair=Ce.ObjectIdentifier=Ce.PublicKeyIdentifier=Ce.PublicKey=Ce.RFC3161SignedTimestamp=Ce.LogId=Ce.MessageSignature=Ce.HashOutput=Ce.SubjectAlternativeNameType=Ce.PublicKeyDetails=Ce.HashAlgorithm=void 0;Ce.hashAlgorithmFromJSON=dle;Ce.hashAlgorithmToJSON=ble;Ce.publicKeyDetailsFromJSON=Mle;Ce.publicKeyDetailsToJSON=fle;Ce.subjectAlternativeNameTypeFromJSON=mle;Ce.subjectAlternativeNameTypeToJSON=hle;var Ri0=Ale(),zr;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",t[t.SHA2_256=1]="SHA2_256",t[t.SHA2_384=2]="SHA2_384",t[t.SHA2_512=3]="SHA2_512",t[t.SHA3_256=4]="SH
Line truncated
|
|
|
|
|
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:i(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:i(function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},"ambiguousBlockValue"),appendContent:i(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:i(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:i(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:i(function(e){this.lastContext=e},"getContext"),pushContext:i(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:i(function(e,r,n,o){var s=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,r,n)},"lookupOnContext"),lookupBlockParam:i(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:i(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:i(function(e,r,n,o,s){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(Vi0(this.options.strict&&s,this,r,n,e));return}for(var c=r.length,u=i(function(A){a.replaceStack(function(l){var b=a.nameLookup(l,r[A],e);return o?[" && ",b]:[" != null ? ",b," : ",l]})},"_loop"),p=n;p<c;p++)u(p)},"resolvePath"),resolvePossibleLambda:i(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:i(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:i(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:i(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:i(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:i(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:i(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:i(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:i(function(e,r){var n=this.nameLookup("decorators",r,"decorator"),o=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",o])," || fn;"])},"registerDecorator"),invokeHelper:i(function(e,r,n){var o=this.popStack(),s=this.setupHelper(e,r),a=[];n&&a.push(s.name),a.push(o),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],u=this.source.functionCall(c,"call",s.callParams);this.push(u)},"invokeHelper"),itemsSeparatedBy:i(function(e,r){var n=[];n.push(e[0]);for(var o=1;o<e.length;o++)n.push(r,e[o]);return n},"itemsSeparatedBy"),invokeKnownHelper:i(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:i(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,e,r),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",s," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
|
|
|
|
`,e};A1.prototype.Program=function(t){var e="",r=t.body,n=void 0,o=void 0;if(t.blockParams){var s="BLOCK PARAMS: [";for(n=0,o=t.blockParams.length;n<o;n++)s+=" "+t.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,o=r.length;n<o;n++)e+=this.accept(r[n]);return this.padding--,e};A1.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};A1.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};A1.prototype.BlockStatement=A1.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};A1.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};A1.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};A1.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};A1.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};A1.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,o=0,s=e.length;o<s;o++)r.push(this.accept(e[o]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};A1.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};A1.prototype.StringLiteral=function(t){return'"'+t.value+'"'};A1.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};A1.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};A1.prototype.UndefinedLiteral=function(){return"UNDEFINED"};A1.prototype.NullLiteral=function(){return"NULL"};A1.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,o=e.length;n<o;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};A1.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var YQ=h((qr1,Ole)=>{var x4=hle().default,gle=mle();x4.PrintVisitor=gle.PrintVisitor;x4.print=gle.print;Ole.exports=x4;function zle(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=x4.compile(n)}i(zle,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=zle,require.extensions[".hbs"]=zle)});var P4=h(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.Signature=qc.Envelope=void 0;qc.Envelope={fromJSON(t){return{payload:_4(t.payload)?Buffer.from(Wle(t.payload)):Buffer.alloc(0),payloadType:_4(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>qc.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=xle(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>qc.Signature.toJSON(r))),e}};qc.Signature={fromJSON(t){return{sig:_4(t.sig)?Buffer.from(Wle(t.sig)):Buffer.alloc(0),keyid:_4(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=xle(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function Wle(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}i(Wle,"bytesFromBase64");function xle(t){return globalThis.Buffer.from(t).toString("base64")}i(xle,"base64FromBytes");function _4(t){return t!=null}i(_4,"isSet")});var vle=h(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0});k4.Timestamp=void 0;k4.Timestamp={fromJSON(t){return{seconds:Tle(t.seconds)?globalThis.String(t.seconds):"0",nanos:Tle(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!=="0"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function Tle(t){return t!=null}i(Tle,"isSet")});var Aa=h(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.TimeRange=Ce.X509CertificateChain=Ce.SubjectAlternativeName=Ce.X509Certificate=Ce.DistinguishedName=Ce.ObjectIdentifierValuePair=Ce.ObjectIdentifier=Ce.PublicKeyIdentifier=Ce.PublicKey=Ce.RFC3161SignedTimestamp=Ce.LogId=Ce.MessageSignature=Ce.HashOutput=Ce.SubjectAlternativeNameType=Ce.PublicKeyDetails=Ce.HashAlgorithm=void 0;Ce.hashAlgorithmFromJSON=Qle;Ce.hashAlgorithmToJSON=_le;Ce.publicKeyDetailsFromJSON=Ple;Ce.publicKeyDetailsToJSON=kle;Ce.subjectAlternativeNameTypeFromJSON=Ule;Ce.subjectAlternativeNameTypeToJSON=Gle;var la0=vle(),zr;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",t[t.SHA2_256=1]="SHA2_256",t[t.SHA2_384=2]="SHA2_384",t[t.SHA2_512=3]="SHA2_512",t[t.SHA3_256=4]="SH
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+s),t.push(o+"m+"+gB.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=rp0()+e+" "+t[0]}i(tp0,"formatArgs");function rp0(){return nt.inspectOpts.hideDate?"":new Date().toISOString()+" "}i(rp0,"getDate");function np0(...t){return process.stderr.write(OB.formatWithOptions(nt.inspectOpts,...t)+`
|
|
|
|
|
`)}i(np0,"log");function op0(t){t?process.env.DEBUG=t:delete process.env.DEBUG}i(op0,"save");function sp0(){return process.env.DEBUG}i(sp0,"load");function ip0(t){t.inspectOpts={};let e=Object.keys(nt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=nt.inspectOpts[e[r]]}i(ip0,"init");gB.exports=P8()(nt);var{formatters:L2e}=gB.exports;L2e.o=function(t){return this.inspectOpts.colors=this.useColors,OB.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};L2e.O=function(t){return this.inspectOpts.colors=this.useColors,OB.inspect(t,this.inspectOpts)}});var U8=m((To1,k8)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?k8.exports=v2e():k8.exports=Q2e()});var CB=m(l1=>{"use strict";Object.defineProperty(l1,"__esModule",{value:!0});l1.DownloadHTTPError=l1.DownloadLengthMismatchError=l1.DownloadError=l1.ExpiredMetadataError=l1.EqualVersionError=l1.BadVersionError=l1.RepositoryError=l1.PersistError=l1.RuntimeError=l1.ValueError=void 0;var G8=class extends Error{static{i(this,"ValueError")}};l1.ValueError=G8;var H8=class extends Error{static{i(this,"RuntimeError")}};l1.RuntimeError=H8;var X8=class extends Error{static{i(this,"PersistError")}};l1.PersistError=X8;var wm=class extends Error{static{i(this,"RepositoryError")}};l1.RepositoryError=wm;var EB=class extends wm{static{i(this,"BadVersionError")}};l1.BadVersionError=EB;var V8=class extends EB{static{i(this,"EqualVersionError")}};l1.EqualVersionError=V8;var Y8=class extends wm{static{i(this,"ExpiredMetadataError")}};l1.ExpiredMetadataError=Y8;var Sm=class extends Error{static{i(this,"DownloadError")}};l1.DownloadError=Sm;var J8=class extends Sm{static{i(this,"DownloadLengthMismatchError")}};l1.DownloadLengthMismatchError=J8;var j8=class extends Sm{static{i(this,"DownloadHTTPError")}statusCode;constructor(e,r){super(e),this.statusCode=r}};l1.DownloadHTTPError=j8});var P2e=m($2=>{"use strict";var K8=$2&&$2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($2,"__esModule",{value:!0});$2.withTempFile=void 0;var $8=K8(require("fs/promises")),ap0=K8(require("os")),_2e=K8(require("path")),cp0=i(async t=>up0(async e=>t(_2e.default.join(e,"tempfile"))),"withTempFile");$2.withTempFile=cp0;var up0=i(async t=>{let e=await $8.default.realpath(ap0.default.tmpdir()),r=await $8.default.mkdtemp(e+_2e.default.sep);try{return await t(r)}finally{await $8.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")});var U2e=m((Po1,k2e)=>{var Z8=class{static{i(this,"RetryOperation")}#e=1;#t=null;#n=[];#r=null;#o;#s=null;#a;#i;#u=null;#c;constructor(e,r={}){this.#a=[...e],this.#i=[...e],this.#c=r.unref,this.#o=r.maxRetryTime||1/0,r.forever&&(this.#t=[...this.#i])}get timeouts(){return[...this.#i]}get errors(){return[...this.#n]}get attempts(){return this.#e}get mainError(){let e=null;if(this.#n.length){let r=0,n={};for(let o=0;o<this.#n.length;o++){let s=this.#n[o],{message:a}=s;n[a]||(n[a]=0),n[a]++,n[a]>=r&&(e=s,r=n[a])}}return e}reset(){this.#e=1,this.#i=[...this.#a]}stop(){this.#u&&clearTimeout(this.#u),this.#i=[],this.#t=null}retry(e){if(this.#n.push(e),new Date().getTime()-this.#s>=this.#o)return this.#n.unshift(new Error("RetryOperation timeout occurred")),!1;let r=this.#i.shift();if(r===void 0)if(this.#t)this.#n.pop(),r=this.#t.at(-1);else return!1;return this.#u=setTimeout(()=>{this.#e++,this.#r(this.#e)},r),this.#c&&this.#u.unref(),!0}attempt(e){this.#r=e,this.#s=new Date().getTime(),this.#r(this.#e)}};k2e.exports={RetryOperation:Z8}});var X2e=m((Uo1,H2e)=>{var{RetryOperation:pp0}=U2e(),G2e=i((t,e)=>Math.min(Math.round((1+(e.randomize?Math.random():0))*Math.max(e.minTimeout,1)*Math.pow(e.factor,t)),e.maxTimeout),"createTimeout"),Ap0=i(t=>t?.code==="EPROMISERETRY"&&Object.hasOwn(t,"retried"),"isRetryError"),lp0=i(async(t,e={})=>{let r=[];if(e instanceof Array)r=[...e];else{e.retries===1/0&&(e.forever=!0,delete e.retries);let o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1,...e};if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");if(o.retries){for(let s=0;s<o.retries;s++)r.push(G2e(s,o));r.sort((s,a)=>s-a)}else e.forever&&r.push(G2e(0,o))}let n=new pp0(r,{forever:e.forever,unref:e.unref,maxRetryTime:e.maxRetryTime});return new Promise(function(o,s){n.attempt(async a=>{try{let c=await t(u=>{throw Object.assign(new Error("Retrying"),{code:"EPROMISERETRY",retried:u})},a,n);return o(c)}catch(c){if(!Ap0(c))return s(c);if(!n.retry(c.retried||new Error))return s(c.retried)}})})},"promiseRetry");H2e.exports={promiseRetry:lp0}});var r_=m(Sc=>{"use strict";var t_=Sc&&Sc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.DefaultFetcher=Sc.BaseFetcher=void 0;var dp0=t_(U8()),V2e=t_(require("fs")),bp0=t_(require("util")),Y2e=CB(),Mp0=P2e(),fp0=X2e(),mp0=(0,dp0.default)("tuf:fetch"),hp0="User-Agent",yB=class{static{i(this,"BaseFetcher")}async downloadFile(e,r,n){return(0,Mp0.withTempFile)(async o=>{let s=await this.fetch(e),a=0,c=V2e.default.createWriteStream(o),u=s.getReader();try{for(;;){let{done:p,value:A}=await u.read();if(p)break;if(a+=A.length,a>r)throw new Y2e.DownloadLengthMismatchError("Max length reached");await zp0(c,Buffer.from(A))}}finally{u.releaseLock(),await bp0.default.promisify(c.close).bind(c)()}return n(o)})}async downloadBytes(e,r){return this.downloadFile(e,r,async n=>{let o=V2e.defau
Line truncated
|
|
|
|
|
`).forEach(r=>{r.match(yA0)||r.match(BA0)||(e+=r)}),Buffer.from(e,"base64")}i(qA0,"toDER");function DA0(t,e="CERTIFICATE"){let n=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...n,`-----END ${e}-----`].join(`
|
|
|
|
|
`+s),t.push(o+"m+"+DB.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Qp0()+e+" "+t[0]}i(Lp0,"formatArgs");function Qp0(){return nt.inspectOpts.hideDate?"":new Date().toISOString()+" "}i(Qp0,"getDate");function _p0(...t){return process.stderr.write(qB.formatWithOptions(nt.inspectOpts,...t)+`
|
|
|
|
|
`)}i(_p0,"log");function Pp0(t){t?process.env.DEBUG=t:delete process.env.DEBUG}i(Pp0,"save");function kp0(){return process.env.DEBUG}i(kp0,"load");function Up0(t){t.inspectOpts={};let e=Object.keys(nt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=nt.inspectOpts[e[r]]}i(Up0,"init");DB.exports=K8()(nt);var{formatters:pde}=DB.exports;pde.o=function(t){return this.inspectOpts.colors=this.useColors,qB.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};pde.O=function(t){return this.inspectOpts.colors=this.useColors,qB.inspect(t,this.inspectOpts)}});var e_=h((Is1,Z8)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Z8.exports=ude():Z8.exports=Ade()});var RB=h(l1=>{"use strict";Object.defineProperty(l1,"__esModule",{value:!0});l1.DownloadHTTPError=l1.DownloadLengthMismatchError=l1.DownloadError=l1.ExpiredMetadataError=l1.EqualVersionError=l1.BadVersionError=l1.RepositoryError=l1.PersistError=l1.RuntimeError=l1.ValueError=void 0;var t_=class extends Error{static{i(this,"ValueError")}};l1.ValueError=t_;var r_=class extends Error{static{i(this,"RuntimeError")}};l1.RuntimeError=r_;var n_=class extends Error{static{i(this,"PersistError")}};l1.PersistError=n_;var xh=class extends Error{static{i(this,"RepositoryError")}};l1.RepositoryError=xh;var IB=class extends xh{static{i(this,"BadVersionError")}};l1.BadVersionError=IB;var o_=class extends IB{static{i(this,"EqualVersionError")}};l1.EqualVersionError=o_;var s_=class extends xh{static{i(this,"ExpiredMetadataError")}};l1.ExpiredMetadataError=s_;var Th=class extends Error{static{i(this,"DownloadError")}};l1.DownloadError=Th;var i_=class extends Th{static{i(this,"DownloadLengthMismatchError")}};l1.DownloadLengthMismatchError=i_;var a_=class extends Th{static{i(this,"DownloadHTTPError")}statusCode;constructor(e,r){super(e),this.statusCode=r}};l1.DownloadHTTPError=a_});var dde=h(K2=>{"use strict";var u_=K2&&K2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(K2,"__esModule",{value:!0});K2.withTempFile=void 0;var c_=u_(require("fs/promises")),Gp0=u_(require("os")),lde=u_(require("path")),Hp0=i(async t=>Xp0(async e=>t(lde.default.join(e,"tempfile"))),"withTempFile");K2.withTempFile=Hp0;var Xp0=i(async t=>{let e=await c_.default.realpath(Gp0.default.tmpdir()),r=await c_.default.mkdtemp(e+lde.default.sep);try{return await t(r)}finally{await c_.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")});var fde=h((Fs1,bde)=>{var p_=class{static{i(this,"RetryOperation")}#e=1;#t=null;#n=[];#r=null;#o;#s=null;#a;#i;#u=null;#c;constructor(e,r={}){this.#a=[...e],this.#i=[...e],this.#c=r.unref,this.#o=r.maxRetryTime||1/0,r.forever&&(this.#t=[...this.#i])}get timeouts(){return[...this.#i]}get errors(){return[...this.#n]}get attempts(){return this.#e}get mainError(){let e=null;if(this.#n.length){let r=0,n={};for(let o=0;o<this.#n.length;o++){let s=this.#n[o],{message:a}=s;n[a]||(n[a]=0),n[a]++,n[a]>=r&&(e=s,r=n[a])}}return e}reset(){this.#e=1,this.#i=[...this.#a]}stop(){this.#u&&clearTimeout(this.#u),this.#i=[],this.#t=null}retry(e){if(this.#n.push(e),new Date().getTime()-this.#s>=this.#o)return this.#n.unshift(new Error("RetryOperation timeout occurred")),!1;let r=this.#i.shift();if(r===void 0)if(this.#t)this.#n.pop(),r=this.#t.at(-1);else return!1;return this.#u=setTimeout(()=>{this.#e++,this.#r(this.#e)},r),this.#c&&this.#u.unref(),!0}attempt(e){this.#r=e,this.#s=new Date().getTime(),this.#r(this.#e)}};bde.exports={RetryOperation:p_}});var mde=h((xs1,hde)=>{var{RetryOperation:Vp0}=fde(),Mde=i((t,e)=>Math.min(Math.round((1+(e.randomize?Math.random():0))*Math.max(e.minTimeout,1)*Math.pow(e.factor,t)),e.maxTimeout),"createTimeout"),Yp0=i(t=>t?.code==="EPROMISERETRY"&&Object.hasOwn(t,"retried"),"isRetryError"),Jp0=i(async(t,e={})=>{let r=[];if(e instanceof Array)r=[...e];else{e.retries===1/0&&(e.forever=!0,delete e.retries);let o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1,...e};if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");if(o.retries){for(let s=0;s<o.retries;s++)r.push(Mde(s,o));r.sort((s,a)=>s-a)}else e.forever&&r.push(Mde(0,o))}let n=new Vp0(r,{forever:e.forever,unref:e.unref,maxRetryTime:e.maxRetryTime});return new Promise(function(o,s){n.attempt(async a=>{try{let c=await t(u=>{throw Object.assign(new Error("Retrying"),{code:"EPROMISERETRY",retried:u})},a,n);return o(c)}catch(c){if(!Yp0(c))return s(c);if(!n.retry(c.retried||new Error))return s(c.retried)}})})},"promiseRetry");hde.exports={promiseRetry:Jp0}});var d_=h(Fc=>{"use strict";var l_=Fc&&Fc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fc,"__esModule",{value:!0});Fc.DefaultFetcher=Fc.BaseFetcher=void 0;var $p0=l_(e_()),zde=l_(require("fs")),jp0=l_(require("util")),gde=RB(),Kp0=dde(),Zp0=mde(),eA0=(0,$p0.default)("tuf:fetch"),tA0="User-Agent",NB=class{static{i(this,"BaseFetcher")}async downloadFile(e,r,n){return(0,Kp0.withTempFile)(async o=>{let s=await this.fetch(e),a=0,c=zde.default.createWriteStream(o),u=s.getReader();try{for(;;){let{done:p,value:A}=await u.read();if(p)break;if(a+=A.length,a>r)throw new gde.DownloadLengthMismatchError("Max length reached");await rA0(c,Buffer.from(A))}}finally{u.releaseLock(),await jp0.default.promisify(c.close).bind(c)()}return n(o)})}async downloadBytes(e,r){return this.downloadFile(e,r,async n=>{let o=zde.defau
Line truncated
|
|
|
|
|
`).forEach(r=>{r.match(al0)||r.match(cl0)||(e+=r)}),Buffer.from(e,"base64")}i(ul0,"toDER");function pl0(t,e="CERTIFICATE"){let n=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...n,`-----END ${e}-----`].join(`
|
|
|
|
|
`).concat(`
|
|
|
|
|
`)}i(DA0,"fromDER")});var _B=m(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.SHA2_HASH_ALGOS=vc.RSA_SIGNATURE_ALGOS=vc.ECDSA_SIGNATURE_ALGOS=void 0;vc.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};vc.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};vc.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var q_=m(PB=>{"use strict";Object.defineProperty(PB,"__esModule",{value:!0});PB.RFC3161TimestampVerificationError=void 0;var B_=class extends Error{static{i(this,"RFC3161TimestampVerificationError")}};PB.RFC3161TimestampVerificationError=B_});var yde=m(Ys=>{"use strict";var IA0=Ys&&Ys.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),RA0=Ys&&Ys.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),NA0=Ys&&Ys.__importStar||(function(){var t=i(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&IA0(r,e,n[o]);return RA0(r,e),r}})();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.TSTInfo=void 0;var Cde=NA0(nd()),wA0=_B(),SA0=q_(),D_=class{static{i(this,"TSTInfo")}root;constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return wA0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=Cde.digest(this.messageImprintHashAlgorithm,e);if(!Cde.bufferEqual(r,this.messageImprintHashedMessage))throw new SA0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};Ys.TSTInfo=D_});var qde=m(Js=>{"use strict";var FA0=Js&&Js.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),WA0=Js&&Js.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xA0=Js&&Js.__importStar||(function(){var t=i(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&FA0(r,e,n[o]);return WA0(r,e),r}})();Object.defineProperty(Js,"__esModule",{value:!0});Js.RFC3161Timestamp=void 0;var TA0=vB(),I_=xA0(nd()),Bde=_B(),Lm=q_(),vA0=yde(),LA0="1.2.840.113549.1.7.2",QA0="1.2.840.113549.1.9.16.1.4",_A0="1.2.840.113549.1.9.4",R_=class t{static{i(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=TA0.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return Bde.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return Bde.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new vA0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Lm.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==LA0)throw new Lm.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==QA0)throw new Lm.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=I_.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].valu
Line truncated
|
|
|
|
|
`)}i(pl0,"fromDER")});var XB=h(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.SHA2_HASH_ALGOS=Lc.RSA_SIGNATURE_ALGOS=Lc.ECDSA_SIGNATURE_ALGOS=void 0;Lc.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};Lc.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};Lc.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var v_=h(VB=>{"use strict";Object.defineProperty(VB,"__esModule",{value:!0});VB.RFC3161TimestampVerificationError=void 0;var T_=class extends Error{static{i(this,"RFC3161TimestampVerificationError")}};VB.RFC3161TimestampVerificationError=T_});var $de=h($s=>{"use strict";var Al0=$s&&$s.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ll0=$s&&$s.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),dl0=$s&&$s.__importStar||(function(){var t=i(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&Al0(r,e,n[o]);return ll0(r,e),r}})();Object.defineProperty($s,"__esModule",{value:!0});$s.TSTInfo=void 0;var Jde=dl0(od()),bl0=XB(),fl0=v_(),L_=class{static{i(this,"TSTInfo")}root;constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return bl0.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=Jde.digest(this.messageImprintHashAlgorithm,e);if(!Jde.bufferEqual(r,this.messageImprintHashedMessage))throw new fl0.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};$s.TSTInfo=L_});var Kde=h(js=>{"use strict";var Ml0=js&&js.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hl0=js&&js.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ml0=js&&js.__importStar||(function(){var t=i(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&Ml0(r,e,n[o]);return hl0(r,e),r}})();Object.defineProperty(js,"__esModule",{value:!0});js.RFC3161Timestamp=void 0;var zl0=UB(),Q_=ml0(od()),jde=XB(),kh=v_(),gl0=$de(),Ol0="1.2.840.113549.1.7.2",El0="1.2.840.113549.1.9.16.1.4",Cl0="1.2.840.113549.1.9.4",__=class t{static{i(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=zl0.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return jde.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return jde.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new gl0.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new kh.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==Ol0)throw new kh.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==El0)throw new kh.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=Q_.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].valu
Line truncated
|
|
|
|
|
|
|
|
|
|
`,i20=/\u2014 (\S+) (\S+)\n/g;function a20(t,e){let r=t.inclusionProof,n=sP.fromString(r.checkpoint.envelope),o=aq.fromString(n.note);if(!c20(n,e))throw new Um.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return o}i(a20,"verifyCheckpoint");function c20(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let o=e.find(s=>ibe.crypto.bufferEqual(s.logID.subarray(0,4),n.keyHint)&&s.baseURL.match(n.name));return o?ibe.crypto.verify(r,o.publicKey,n.signature):!1})}i(c20,"verifySignedNote");var sP=class t{static{i(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(oP))throw new Um.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(oP),n=e.slice(0,r+1),s=e.slice(r+oP.length).matchAll(i20),a=Array.from(s,c=>{let[,u,p]=c,A=Buffer.from(p,"base64");if(A.length<5)throw new Um.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:A.subarray(0,4),signature:A.subarray(4)}});if(a.length===0)throw new Um.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},aq=class t{static{i(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,o){this.origin=e,this.logSize=r,this.logHash=n,this.rest=o}static fromString(e){let r=e.trimEnd().split(`
|
|
|
|
|
`);if(r.length<3)throw new Um.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],o=BigInt(r[1]),s=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,o,s,a)}};Gm.LogCheckpoint=aq});var cbe=m(uP=>{"use strict";Object.defineProperty(uP,"__esModule",{value:!0});uP.verifyMerkleInclusion=A20;var cP=Ro(),iP=It(),u20=Buffer.from([0]),p20=Buffer.from([1]);function A20(t,e){let r=t.inclusionProof,n=BigInt(r.logIndex),o=BigInt(e.logSize);if(n<0n||n>=o)throw new iP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${n}`});let{inner:s,border:a}=l20(n,o);if(r.hashes.length!==s+a)throw new iP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,s),u=r.hashes.slice(s),p=h20(t.canonicalizedBody),A=b20(d20(p,c,n),u);if(!cP.crypto.bufferEqual(A,e.logHash))throw new iP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}i(A20,"verifyMerkleInclusion");function l20(t,e){let r=M20(t,e),n=f20(t>>BigInt(r));return{inner:r,border:n}}i(l20,"decompInclProof");function d20(t,e,r){return e.reduce((n,o,s)=>r>>BigInt(s)&BigInt(1)?aP(o,n):aP(n,o),t)}i(d20,"chainInner");function b20(t,e){return e.reduce((r,n)=>aP(n,r),t)}i(b20,"chainBorderRight");function M20(t,e){return m20(t^e-BigInt(1))}i(M20,"innerProofSize");function f20(t){return t.toString(2).split("1").length-1}i(f20,"onesCount");function m20(t){return t===0n?0:t.toString(2).length}i(m20,"bitLength");function aP(t,e){return cP.crypto.digest("sha256",p20,t,e)}i(aP,"hashChildren");function h20(t){return cP.crypto.digest("sha256",u20,t)}i(h20,"hashLeaf")});var pbe=m(pP=>{"use strict";Object.defineProperty(pP,"__esModule",{value:!0});pP.verifyTLogSET=g20;var ube=Ro(),z20=It(),O20=id();function g20(t,e){if(!(0,O20.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(o=>{let s=E20(t),a=Buffer.from(ube.json.canonicalize(s),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return ube.crypto.verify(a,o.publicKey,c)}))throw new z20.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}i(g20,"verifyTLogSET");function E20(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:o}=t;return{body:o.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}i(E20,"toVerificationPayload")});var lbe=m(cq=>{"use strict";Object.defineProperty(cq,"__esModule",{value:!0});cq.verifyTLogBody=D20;cq.verifyTLogInclusion=I20;var Abe=rbe(),dP=It(),AP=nbe(),lP=obe(),C20=sbe(),y20=abe(),B20=cbe(),q20=pbe();function D20(t,e){let{kind:r,version:n}=t.kindVersion,o=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==o.kind||n!==o.apiVersion)throw new dP.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${n}, received: ${o.kind}/${o.apiVersion}`});switch(r){case"dsse":if(n==AP.DSSE_API_VERSION_V1)return(0,AP.verifyDSSETLogBody)(o,e);{let s=Abe.Entry.fromJSON(o);return(0,AP.verifyDSSETLogBodyV2)(s,e)}case"intoto":return(0,C20.verifyIntotoTLogBody)(o,e);case"hashedrekord":if(n==lP.HASHEDREKORD_API_VERSION_V1)return(0,lP.verifyHashedRekordTLogBody)(o,e);{let s=Abe.Entry.fromJSON(o);return(0,lP.verifyHashedRekordTLogBodyV2)(s,e)}default:throw new dP.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}i(D20,"verifyTLogBody");function I20(t,e){let r=!1;if(R20(t)&&((0,q20.verifyTLogSET)(t,e),r=!0),N20(t)){let n=(0,y20.verifyCheckpoint)(t,e);(0,B20.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new dP.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}i(I20,"verifyTLogInclusion");function R20(t){return t.inclusionPromise!==void 0}i(R20,"isTLogEntryWithInclusionPromise");function N20(t){return t.inclusionProof!==void 0}i(N20,"isTLogEntryWithInclusionProof")});var mbe=m(uq=>{"use strict";Object.defineProperty(uq,"__esModule",{value:!0});uq.Verifier=void 0;var w20=require("util"),pd=It(),dbe=Gde(),bP=Hde(),bbe=Yde(),Mbe=lbe(),MP=class{static{i(this,"Verifier")}trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let n=this.verifyTimestamps(e),o=this.verifySigningKey(e,n);return this.verifyTLogs(e),this.verifySignature(e,o),r&&this.verifyPolicy(r,o.identity||{}),o}verifyTimestamps(e){let r=[];for(let n of e.timestamps)switch(n.$case){case"timestamp-authority":r.push((0,bbe.getTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities));break;case"transparency-log":{let o=(0,bbe.getTLogTimestamp)(n.tlogEntry);o&&r.push(o);break}}if(fbe(r))throw new pd.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(r.length<this.options.timestampThresho
Line truncated
|
|
|
|
|
[`+D+"] ";for(F in arguments[0])s(arguments[0],F)&&(C+=F+": "+arguments[0][F]+", ");C=C.slice(0,-2)}else C=arguments[D];O.push(C)}Q(d+`
|
|
|
|
|
Arguments: `+Array.prototype.slice.call(O).join("")+`
|
|
|
|
|
`+new Error().stack),h=!1}return M.apply(this,arguments)},M)}i(ue,"deprecate");var qe={};function Qe(d,M){e.deprecationHandler!=null&&e.deprecationHandler(d,M),qe[d]||(Q(M),qe[d]=!0)}i(Qe,"deprecateSimple"),e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function Re(d){return typeof Function<"u"&&d instanceof Function||Object.prototype.toString.call(d)==="[object Function]"}i(Re,"isFunction");function ge(d){var M,h;for(h in d)s(d,h)&&(M=d[h],Re(M)?this[h]=M:this["_"+h]=M);this._config=d,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}i(ge,"set");function Ue(d,M){var h=l({},d),O;for(O in M)s(M,O)&&(o(d[O])&&o(M[O])?(h[O]={},l(h[O],d[O]),l(h[O],M[O])):M[O]!=null?h[O]=M[O]:delete h[O]);for(O in d)s(d,O)&&!s(M,O)&&o(d[O])&&(h[O]=l({},h[O]));return h}i(Ue,"mergeConfigs");function pe(d){d!=null&&this.set(d)}i(pe,"Locale");var Ge;Object.keys?Ge=Object.keys:Ge=i(function(d){var M,h=[];for(M in d)s(d,M)&&h.push(M);return h},"keys");var J={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function _e(d,M,h){var O=this._calendar[d]||this._calendar.sameElse;return Re(O)?O.call(M,h):O}i(_e,"calendar");function g0(d,M,h){var O=""+Math.abs(d),C=M-O.length,D=d>=0;return(D?h?"+":"":"-")+Math.pow(10,Math.max(0,C)).toString().substr(1)+O}i(g0,"zeroFill");var ft=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,p0=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V1={},y0={};function ne(d,M,h,O){var C=O;typeof O=="string"&&(C=i(function(){return this[O]()},"func")),d&&(y0[d]=C),M&&(y0[M[0]]=function(){return g0(C.apply(this,arguments),M[1],M[2])}),h&&(y0[h]=function(){return this.localeData().ordinal(C.apply(this,arguments),d)})}i(ne,"addFormatToken");function vo(d){return d.match(/\[[\s\S]/)?d.replace(/^\[|\]$/g,""):d.replace(/\\/g,"")}i(vo,"removeFormattingTokens");function cn(d){var M=d.match(ft),h,O;for(h=0,O=M.length;h<O;h++)y0[M[h]]?M[h]=y0[M[h]]:M[h]=vo(M[h]);return function(C){var D="",F;for(F=0;F<O;F++)D+=Re(M[F])?M[F].call(C,d):M[F];return D}}i(cn,"makeFormatFunction");function b0(d,M){return d.isValid()?(M=Kt(M,d.localeData()),V1[M]=V1[M]||cn(M),V1[M](d)):d.localeData().invalidDate()}i(b0,"formatMoment");function Kt(d,M){var h=5;function O(C){return M.longDateFormat(C)||C}for(i(O,"replaceLongDateFormatTokens"),p0.lastIndex=0;h>=0&&p0.test(d);)d=d.replace(p0,O),p0.lastIndex=0,h-=1;return d}i(Kt,"expandFormat");var kh={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Uh(d){var M=this._longDateFormat[d],h=this._longDateFormat[d.toUpperCase()];return M||!h?M:(this._longDateFormat[d]=h.match(ft).map(function(O){return O==="MMMM"||O==="MM"||O==="DD"||O==="dddd"?O.slice(1):O}).join(""),this._longDateFormat[d])}i(Uh,"longDateFormat");var gD="Invalid date";function Yc(){return this._invalidDate}i(Yc,"invalidDate");var R="%d",T=/\d{1,2}/;function v(d){return this._ordinal.replace("%d",d)}i(v,"ordinal");var k={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function De(d,M,h,O){var C=this._relativeTime[h];return Re(C)?C(d,M,h,O):C.replace(/%d/i,d)}i(De,"relativeTime");function e0(d,M){var h=this._relativeTime[d>0?"future":"past"];return Re(h)?h(M):h.replace(/%s/i,M)}i(e0,"pastFuture");var K0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ve(d){return typeof d=="string"?K0[d]||K0[d.toLowerCase()]:void 0}i(ve,"normalizeUnits");function B0(d){var M={},h,O;for(O in d)s(d,O)&&(h=ve(O),h&&(M[h]=d[O]));return M}i(B0,"normalizeObjectUnits");var H7={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function B4e(d){var M=[],h;for(h in d)s(d,h)&&M.push({unit:h,priority:H7[h]});return M.sort(function(O,C){return O.priority-C.priority}),M
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(D30,"_nonIterableRest");Eh.exports=D30,Eh.exports.__esModule=!0,Eh.exports.default=Eh.exports});var W3e=m((cb1,Ch)=>{var I30=hge(),R30=u3e(),N30=S3e(),w30=F3e();function S30(t,e){return I30(t)||R30(t,e)||N30(t,e)||w30()}i(S30,"_slicedToArray");Ch.exports=S30,Ch.exports.__esModule=!0,Ch.exports.default=Ch.exports});var T3e=m((pb1,x3e)=>{"use strict";var F30=sD().forEach,W30=mh(),x30=W30("forEach");x3e.exports=x30?[].forEach:i(function(e){return F30(this,e,arguments.length>1?arguments[1]:void 0)},"forEach")});var L3e=m(()=>{"use strict";var T30=w0(),v3e=T3e();T30({target:"Array",proto:!0,forced:[].forEach!==v3e},{forEach:v3e})});var _3e=m((bb1,Q3e)=>{"use strict";L3e();var v30=To();Q3e.exports=v30("Array","forEach")});var k3e=m((Mb1,P3e)=>{"use strict";var L30=_3e();P3e.exports=L30});var U3e=m(()=>{});var H3e=m((hb1,G3e)=>{"use strict";var Q30=Id(),_30=jt(),P30=Br(),k30=k3e();U3e();var l7=Array.prototype,U30={DOMTokenList:!0,NodeList:!0};G3e.exports=function(t){var e=t.forEach;return t===l7||P30(l7,t)&&e===l7.forEach||_30(U30,Q30(t))?k30:e}});var d7=m((zb1,X3e)=>{X3e.exports=H3e()});var V3e=m(()=>{"use strict";var G30=w0(),H30=kq().includes,X30=d1(),V30=VP(),Y30=X30(function(){return!Array(1).includes()});G30({target:"Array",proto:!0,forced:Y30},{includes:i(function(e){return H30(this,e,arguments.length>1?arguments[1]:void 0)},"includes")});V30("includes")});var J3e=m((Cb1,Y3e)=>{"use strict";V3e();var J30=To();Y3e.exports=J30("Array","includes")});var $3e=m((yb1,j3e)=>{"use strict";var j30=sn(),$30=za(),K30=D1(),Z30=K30("match");j3e.exports=function(t){var e;return j30(t)&&((e=t[Z30])!==void 0?!!e:$30(t)==="RegExp")}});var Z3e=m((Bb1,K3e)=>{"use strict";var eE0=$3e(),tE0=TypeError;K3e.exports=function(t){if(eE0(t))throw new tE0("The method doesn't accept regular expressions");return t}});var tEe=m((qb1,eEe)=>{"use strict";var rE0=D1(),nE0=rE0("match");eEe.exports=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[nE0]=!1,"/./"[t](e)}catch{}}return!1}});var nEe=m(()=>{"use strict";var oE0=w0(),sE0=t1(),iE0=Z3e(),aE0=kp(),rEe=ci(),cE0=tEe(),uE0=sE0("".indexOf);oE0({target:"String",proto:!0,forced:!cE0("includes")},{includes:i(function(e){return!!~uE0(rEe(aE0(this)),rEe(iE0(e)),arguments.length>1?arguments[1]:void 0)},"includes")})});var sEe=m((Nb1,oEe)=>{"use strict";nEe();var pE0=To();oEe.exports=pE0("String","includes")});var cEe=m((wb1,aEe)=>{"use strict";var iEe=Br(),AE0=J3e(),lE0=sEe(),b7=Array.prototype,M7=String.prototype;aEe.exports=function(t){var e=t.includes;return t===b7||iEe(b7,t)&&e===b7.includes?AE0:typeof t=="string"||t===M7||iEe(M7,t)&&e===M7.includes?lE0:e}});var pEe=m((Sb1,uEe)=>{"use strict";var dE0=cEe();uEe.exports=dE0});var yh=m((Fb1,AEe)=>{AEe.exports=pEe()});var f7=m((Wb1,lEe)=>{"use strict";lEe.exports=`
|
|
|
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var MEe=m((xb1,bEe)=>{"use strict";var bE0=t1(),ME0=kp(),fE0=ci(),h7=f7(),dEe=bE0("".replace),mE0=RegExp("^["+h7+"]+"),hE0=RegExp("(^|[^"+h7+"])["+h7+"]+$"),m7=i(function(t){return function(e){var r=fE0(ME0(e));return t&1&&(r=dEe(r,mE0,"")),t&2&&(r=dEe(r,hE0,"$1")),r}},"createMethod");bEe.exports={start:m7(1),end:m7(2),trim:m7(3)}});var EEe=m((vb1,gEe)=>{"use strict";var zEe=X1(),zE0=d1(),OE0=t1(),gE0=ci(),EE0=MEe().trim,fEe=f7(),Bh=zEe.parseInt,mEe=zEe.Symbol,hEe=mEe&&mEe.iterator,OEe=/^[+-]?0x/i,CE0=OE0(OEe.exec),yE0=Bh(fEe+"08")!==8||Bh(fEe+"0x16")!==22||hEe&&!zE0(function(){Bh(Object(hEe))});gEe.exports=yE0?i(function(e,r){var n=EE0(gE0(e));return Bh(n,r>>>0||(CE0(OEe,n)?16:10))},"parseInt"):Bh});var yEe=m(()=>{"use strict";var BE0=w0(),CEe=EEe();BE0({global:!0,forced:parseInt!==CEe},{parseInt:CEe})});var qEe=m((Pb1,BEe)=>{"use strict";yEe();var qE0=So();BEe.exports=qE0.parseInt});var IEe=m((kb1,DEe)=>{"use strict";var DE0=qEe();DEe.exports=DE0});var NEe=m((Ub1,REe)=>{REe.exports=IEe()});var bD=m((Gb1,wEe)=>{wEe.exports=A7()});var WEe=m((Hb1,FEe)=>{"use strict";var SEe=Km(),IE0=TypeError;FEe.exports=function(t,e){if(!delete t[e])throw new IE0("Cannot delete property "+SEe(e)+" of "+SEe(t))}});var vEe=m((Xb1,TEe)=>{"use strict";var xEe=ph(),RE0=Math.floor,z7=i(function(t,e){var r=t.length;if(r<8)for(var n=1,o,s;n<r;){for(s=n,o=t[n];s&&e(t[s-1],o)>0;)t[s]=t[--s];s!==n++&&(t[s]=o)}else for(var a=RE0(r/2),c=z7(xEe(t,0,a),e),u=z7(xEe(t,a),e),p=c.length,A=u.length,l=0,b=0;l<p||b<A;)t[l+b]=l<p&&b<A?e(c[l],u[b])<=0?c[l++]:u[b++]:l<p?c[l++]:u[b++];return t},"sort");TEe.exports=z7});var _Ee=m((Yb1,QEe)=>{"use strict";var NE0=Od(),LEe=NE0.match(/firefox\/(\d+)/i);QEe.exports=!!LEe&&+LEe[1]});var kEe=m((Jb1,PEe)=>{"use strict";var wE0=Od();PEe.exports=/MSIE|Trident/.test(wE0)});var HEe=m((jb1,GEe)=>{"use strict";var SE0=Od(),UEe=SE0.match(/AppleWebKit\/(\d+)\./);GEe.exports=!!UEe&&+UEe[1]});var eCe=m(()=>{"use strict";var FE0=w0(),KEe=t1(),WE0=Gp(),xE0=ii(),XEe=Ea(),TE0=WEe(),VEe=ci(),O7=d1(),vE0=vEe(),LE0=mh(),YEe=_Ee(),QE0=kEe(),JEe=gd(),jEe=HEe(),Gc=[],$Ee=KEe(Gc.sort),_E0=KEe(Gc.push),PE0=O7(function(){Gc.sort(void 0)}),kE0=O7(function(){Gc.sort(null)}),UE0=LE0("sort"),ZEe=!O7(function(){if(JEe)return JEe<70;if(!(YEe&&YEe>3)){if(QE0)return!0;if(jEe)return jEe<603;var t="",e,r,n,o;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)Gc.push({k:r+o,v:n})}for(Gc.sort(function(s,a){return a.v-s.v}),o=0;o<Gc.length;o++)r=Gc[o].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),GE0=PE0||!kE0||!UE0||!ZEe,HE0=i(function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:VEe(e)>VEe(r)?1:-1}},"getSortCompare");FE0({target:"Array",proto:!0,forced:GE0},{sort:i(function(e){e!==void 0&&WE0(e);var r=xE0(this);if(ZEe)return e===void 0?$Ee(r):$Ee(r,e);var n=[],o=XEe(r),s,a;for(a=0;a<o;a++)a in r&&_E0(n,r[a]);for(vE0(n,HE0(e)),s=XEe(n),a=0;a<s;)r[a]=n[a++];for(;a<o;)TE0(r,a++);return r},"sort")})});var rCe=m((eM1,tCe)=>{"use strict";eCe();var XE0=To();tCe.exports=XE0("Array","sort")});var oCe=m((tM1,nCe)=>{"use strict";var VE0=Br(),YE0=rCe(),g7=Array.prototype;nCe.exports=function(t){var e=t.sort;return t===g7||VE0(g7,t)&&e===g7.sort?YE0:e}});var iCe=m((rM1,sCe)=>{"use strict";var JE0=oCe();sCe.exports=JE0});var cCe=m((nM1,aCe)=>{aCe.exports=iCe()});var uCe=m(()=>{});var lCe=m((iM1,ACe)=>{"use strict";var jE0=X1(),$E0=d1(),pCe=jE0.RegExp,KE0=!$E0(function(){var t=!0;try{pCe(".","d")}catch{t=!1}var e={},r="",n=t?"dgimsy":"gimsy",o=i(function(u,p){Object.defineProperty(e,u,{get:i(function(){return r+=p,!0},"get")})},"addGetter"),s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};t&&(s.hasIndices="d");for(var a in s)o(a,s[a]);var c=Object.getOwnPropertyDescriptor(pCe.prototype,"flags").get.call(e);return c!==n||r!==n});ACe.exports={correct:KE0}});var bCe=m((cM1,dCe)=>{"use strict";var ZE0=ga();dCe.exports=function(){var t=ZE0(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}});var mCe=m((uM1,fCe)=>{"use strict";var eC0=Kn(),tC0=jt(),rC0=Br(),MCe=lCe(),nC0=bCe(),oC0=RegExp.prototype;fCe.exports=MCe.correct?function(t){return t.flags}:function(t){return!MCe.correct&&rC0(oC0,t)&&!tC0(t,"flags")?eC0(nC0,t):t.flags}});var zCe=m((pM1,hCe)=>{"use strict";uCe();var sC0=mCe();hCe.exports=sC0});var ECe=m((AM1,gCe)=>{"use strict";var iC0=Br(),aC0=zCe(),OCe=RegExp.prototype;gCe.exports=function(t){return t===OCe||iC0(OCe,t)?aC0(t):t.flags}});var yCe=m((lM1,CCe)=>{"use strict";var cC0=ECe();CCe.exports=cC0});var qCe=m((dM1,BCe)=>{BCe.exports=yCe()});var HCe=m((Nh,GCe)=>{"use strict";var $t=oi(),uC0=ai();uC0(Nh,"__esModule",{
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,c;return{s:i(function(){r=(0,pC0.default)(t)},"s"),n:i(function(){var p=r.next();return s=p.done,p},"n"),e:i(function(p){a=!0,c=p},"e"),f:i(function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}i(Ih,"_createForOfIteratorHelper");function hC0(t,e){var r;if(t){if(typeof t=="string")return DCe(t,e);var n=(0,eo.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,bC0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DCe(t,e)}}i(hC0,"_unsupportedIterableToArray");function DCe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}i(DCe,"_arrayLikeToArray");var _0="xregexp",Zp={astral:!1,namespacing:!1},b1={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},ui={},qh={},Sd={},E7=[],Fd="default",ICe="class",zC0={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},OC0=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,gC0=b1.exec.call(/()??/,"")[1]===void 0,EC0=(0,Kp.default)(/x/)!==void 0,CC0={},FCe=CC0.toString;function y7(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),n=".a".replace(new RegExp("a",r),".")==="..";n&&(e=!1)}}catch{e=!1}return e}i(y7,"hasNativeFlag");var WCe=y7("u"),B7=y7("y"),xCe={g:!0,i:!0,m:!0,u:WCe,y:B7};function TCe(t,e,r,n,o){var s;if(t[_0]={captureNames:e},o)return t;if(t.__proto__)t.__proto__=Y.prototype;else for(var a in Y.prototype)t[a]=Y.prototype[a];return t[_0].source=r,t[_0].flags=n&&(0,mC0.default)(s=n.split("")).call(s).join(""),t}i(TCe,"augment");function Dh(t){return b1.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}i(Dh,"clipDuplicates");function tA(t,e){var r;if(!Y.isRegExp(t))throw new TypeError("Type RegExp expected");var n=t[_0]||{},o=yC0(t),s="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(o=b1.replace.call(o,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(s+="g"),e.addY&&(s+="y"),s&&(o=Dh(o+s)),e.isInternalOnly||(n.source!==void 0&&(c=n.source),(0,Kp.default)(n)!=null&&(u=s?Dh((0,Kp.default)(n)+s):(0,Kp.default)(n))),t=TCe(new RegExp(e.source||t.source,o),BC0(t)?(0,eo.default)(r=n.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}i(tA,"copyRegex");function vCe(t){return(0,SCe.default)(t,16)}i(vCe,"dec");function LCe(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||b1.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||qC0(t.input,t.index+t[0].length,r)?"":"(?:)"}i(LCe,"getContextualTokenSeparator");function yC0(t){return EC0?(0,Kp.default)(t):b1.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}i(yC0,"getNativeFlags");function BC0(t){return!!(t[_0]&&t[_0].captureNames)}i(BC0,"hasNamedCapture");function QCe(t){return(0,SCe.default)(t,10).toString(16)}i(QCe,"hex");function qC0(t,e,r){var n="\\(\\?#[^)]*\\)",o="#[^#\\n]*",s="[?*+]|{\\d+(?:,\\d*)?}";return b1.test.call((0,eA.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,eo.default)(t).call(t,e))}i(qC0,"isQuantifierNext");function q7(t,e){return FCe.call(t)==="[object ".concat(e,"]")}i(q7,"isType");function _Ce(t){for(;t.length<4;)t="0".concat(t);return t}i(_Ce,"pad4");function DC0(t,e){if(Dh(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=b1.replace.call(t,/^\(\?([\w$]+)\)/,function(s,a){if(b1.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(s));return e=Dh(e+a),""});var r=Ih(e),n;try{for(r.s();!(n=r.n()).done;){var o=n.value;if(!xCe[o])throw new SyntaxError("Unknown regex flag ".concat(o))}}catch(s){r.e(s)}finally{r.f()}return{pattern:t,flags:e}}i(DC0,"prepareFlags");function PCe(t){var e={};return q7(t,"String")?((0,C7.default)(Y).call(Y,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}i(PCe,"prepareOptions");function RCe(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be a single character A-Za-z0-9_$");xCe[t]=!0}i(RCe,"registerFlag");function IC0(t,e,r,n,o){for(var s=E7.length,a=t[r],c=null,u,p;s--;)if(p=E7[s],!(p.leadChar&&p.leadChar!==a||p.scope!==n&&p.scope!=="all"||p.flag&&!(0,eA.default)(e).call(e,p.flag))&&(u=Y.exec(t,p.regex,r,"sticky"),u)){c={matchLength:u[0].length,output:p.handler.call(o,u,n,e),reparse:p.reparse};break}return c}i(IC0,"runTokens");function kCe(t){Zp.astral=t}i(kCe,"setAstral");function UCe(t){Zp.namespacing=t}i(UCe,"setNamespacing");f
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,c;return{s:i(function(){r=(0,uy0.default)(t)},"s"),n:i(function(){var p=r.next();return s=p.done,p},"n"),e:i(function(p){a=!0,c=p},"e"),f:i(function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}i(my0,"_createForOfIteratorHelper");function hy0(t,e){var r;if(t){if(typeof t=="string")return Dye(t,e);var n=(0,by0.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,dy0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dye(t,e)}}i(hy0,"_unsupportedIterableToArray");function Dye(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}i(Dye,"_arrayLikeToArray");var zy0=i(function(e){var r={},n=e._dec,o=e._hex,s=e._pad4;function a(b){return b.replace(/[- _]+/g,"").toLowerCase()}i(a,"normalize");function c(b){var f=/^\\[xu](.+)/.exec(b);return f?n(f[1]):b.charCodeAt(b[0]==="\\"?1:0)}i(c,"charCode");function u(b){var f="",z=-1;return(0,fy0.default)(e).call(e,b,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var y=c(g[1]);y>z+1&&(f+="\\u".concat(s(o(z+1))),y>z+2&&(f+="-\\u".concat(s(o(y-1))))),z=c(g[2]||g[1])}),z<65535&&(f+="\\u".concat(s(o(z+1))),z<65534&&(f+="-\\uFFFF")),f}i(u,"invertBmp");function p(b){var f="b!";return r[b][f]||(r[b][f]=u(r[b].bmp))}i(p,"cacheInvertedBmp");function A(b,f){var z=r[b],g="";if(z.bmp&&!z.isBmpLast){var y;g=(0,N7.default)(y="[".concat(z.bmp,"]")).call(y,z.astral?"|":"")}if(z.astral&&(g+=z.astral),z.isBmpLast&&z.bmp){var E;g+=(0,N7.default)(E="".concat(z.astral?"|":"","[")).call(E,z.bmp,"]")}return f?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}i(A,"buildAstral");function l(b,f){var z=f?"a!":"a=";return r[b][z]||(r[b][z]=A(b,f))}i(l,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(b,f,z){var g="Invalid double negation ",y="Unknown Unicode token ",E="Unicode token missing data ",B="Astral mode required for Unicode token ",q="Astral mode does not support Unicode tokens within character classes",I=b[1]==="P"||!!b[2],W=(0,My0.default)(z).call(z,"A"),x=a(b[4]||b[3]),Q=r[x];if(b[1]==="P"&&b[2])throw new SyntaxError(g+b[0]);if(!r.hasOwnProperty(x))throw new SyntaxError(y+b[0]);if(Q.inverseOf){if(x=a(Q.inverseOf),!r.hasOwnProperty(x)){var ue;throw new ReferenceError((0,N7.default)(ue="".concat(E+b[0]," -> ")).call(ue,Q.inverseOf))}Q=r[x],I=!I}if(!(Q.bmp||W))throw new SyntaxError(B+b[0]);if(W){if(f==="class")throw new SyntaxError(q);return l(x,I)}return f==="class"?I?p(x):Q.bmp:"".concat((I?"[^":"[")+Q.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(b){var f="Unicode token requires name",z="Unicode token has no character data ",g=my0(b),y;try{for(g.s();!(y=g.n()).done;){var E=y.value;if(!E.name)throw new Error(f);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(z+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(B){g.e(B)}finally{g.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(b){var f=a(b);return r[f]}},"_default");Wh.default=zy0;Iye.exports=Wh.default});var wye=m((vM1,Nye)=>{Nye.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",bmp:"\uA6A0-\uA6FF"},{name:"InBamum_Supplement",astral:"\uD81A[\uDC00-\uDE3F]"},{name:"InBasic_Latin",bmp:"\0-\x7F"},{name:"InBassa_Vah",astral:"\uD81A[\uDED0-\uDEFF]"},{name:"InBatak",bmp:"\u1BC0-\u1BFF"},{name:"InBengali",bmp:"\u0980-\u09FF"},{name:"InBhaiksuki",astral:"\uD807[\uDC00-\uDC6F]"},{name:"InBlock_Elements",bmp:"\u2580-\u259F"},{name:"InBopomofo",bmp:"\u3100-\u312F"},{name:"InBopomofo_Extended",bmp:"\u31A0-\u31BF"},{name:"InBox_Drawing",bmp:"\u2500-\u257F"},{name:"InBrahmi",astral:"\uD804[\uDC00-\uDC7F]"},{name:"InBraille_Patterns",bmp:"\u2800-\u28FF"},{name:"InBuginese",bmp:"\u1A00-\u1A1F"},{name:"InBuhid",bmp:"\u1740-\u175F"},{
Line truncated
|
|
|
|
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}i(L$,"getBooleanInput");function xN(t,e){if(process.env.GITHUB_OUTPUT||"")return Hd("OUTPUT",Az(t,e));process.stdout.write(WN.EOL),_o("set-output",{name:t},Qo(e))}i(xN,"setOutput");function Q$(t){process.exitCode=FN.Failure,ul(t)}i(Q$,"setFailed");function Ti(){return process.env.RUNNER_DEBUG==="1"}i(Ti,"isDebug");function N(t){_o("debug",{},t)}i(N,"debug");function ul(t,e={}){_o("error",GD(e),t instanceof Error?t.toString():t)}i(ul,"error");function Ke(t,e={}){_o("warning",GD(e),t instanceof Error?t.toString():t)}i(Ke,"warning");function S(t){process.stdout.write(t+WN.EOL)}i(S,"info");function Du(t){XD("group",t)}i(Du,"startGroup");function Iu(){XD("endgroup")}i(Iu,"endGroup");function at(t,e){return XQe(this,void 0,void 0,function*(){Du(t);let r;try{r=yield e()}finally{Iu()}return r})}i(at,"group");function lg(t,e){if(process.env.GITHUB_STATE||"")return Hd("STATE",Az(t,e));_o("save-state",{name:t},Qo(e))}i(lg,"saveState");function _$(t){return process.env[`STATE_${t}`]||""}i(_$,"getState");var fy=w(require("fs"),1),Vv=w(require("os"),1),Yv=w(require("path"),1);var k$=w(require("os"),1);function eM(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i(eM,"toCommandValue");function U$(t,e,r){let n=new TN(t,e,r);process.stdout.write(n.toString()+k$.EOL)}i(U$,"issueCommand");var P$="::",TN=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=P$+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${YQe(o)}`)}}return e+=`${P$}${VQe(this.message)}`,e}};function VQe(t){return eM(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(VQe,"escapeData");function YQe(t){return eM(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(YQe,"escapeProperty");var V$=w(require("os"),1);var H$=require("os"),tM=require("fs");var vN=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},{access:JQe,appendFile:jQe,writeFile:$Qe}=tM.promises,G$="GITHUB_STEP_SUMMARY";var LN=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return vN(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[G$];if(!e)throw new Error(`Unable to find environment variable for $${G$}. Check if your runtime environment supports job summaries.`);try{yield JQe(e,tM.constants.R_OK|tM.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let o=Object.entries(n).map(([s,a])=>` ${s}="${a}"`).join("");return r?`<${e}${o}>${r}</${e}>`:`<${e}${o}>`}write(e){return vN(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?$Qe:jQe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return vN(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(H$.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),o=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(o).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",o=e.map(a=>this.wrap("li",a)).join(""),s=this.wrap(n,o);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(o=>{let s=o.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:u,colspan:p,rowspan:A}=a,l=c?"th":"td",b=Object.assign(Object.assign({},p&&{colspan:p}),A&&{rowspan:A});return this.wrap(l,u,b)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:o,height:s}=n||{},a=Object.assign(Object.assign({},o&&{width:o}),s&&{height:s}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,o=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(o,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),o=this.wrap("blockquote",e,n);return this.addRaw(o).addEOL()}addLinLine truncated
|
|
|
|
|
`,U20=/\u2014 (\S+) (\S+)\n/g;function G20(t,e){let r=t.inclusionProof,n=MP.fromString(r.checkpoint.envelope),o=dq.fromString(n.note);if(!H20(n,e))throw new Ad.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return o}i(G20,"verifyCheckpoint");function H20(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let o=e.find(s=>Sbe.crypto.bufferEqual(s.logID.subarray(0,4),n.keyHint)&&s.baseURL.includes(n.name));return o?Sbe.crypto.verify(r,o.publicKey,n.signature):!1})}i(H20,"verifySignedNote");var MP=class t{static{i(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(fP))throw new Ad.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(fP),n=e.slice(0,r+1),s=e.slice(r+fP.length).matchAll(U20),a=Array.from(s,c=>{let[,u,p]=c,A=Buffer.from(p,"base64");if(A.length<5)throw new Ad.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:A.subarray(0,4),signature:A.subarray(4)}});if(a.length===0)throw new Ad.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},dq=class t{static{i(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,o){this.origin=e,this.logSize=r,this.logHash=n,this.rest=o}static fromString(e){let r=e.trimEnd().split(`
|
|
|
|
|
`);if(r.length<3)throw new Ad.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],o;try{o=BigInt(r[1])}catch{throw new Ad.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint log size"})}let s=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,o,s,a)}};Vh.LogCheckpoint=dq});var Wbe=h(zP=>{"use strict";Object.defineProperty(zP,"__esModule",{value:!0});zP.verifyMerkleInclusion=Y20;var mP=wo(),bq=It(),X20=Buffer.from([0]),V20=Buffer.from([1]);function Y20(t,e){let r=t.inclusionProof,n;try{n=BigInt(r.logIndex)}catch{throw new bq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid inclusion proof log index"})}let o=BigInt(e.logSize);if(n<0n||n>=o)throw new bq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${n}`});let{inner:s,border:a}=J20(n,o);if(r.hashes.length!==s+a)throw new bq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,s),u=r.hashes.slice(s),p=td0(t.canonicalizedBody),A=j20($20(p,c,n),u);if(!mP.crypto.bufferEqual(A,e.logHash))throw new bq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}i(Y20,"verifyMerkleInclusion");function J20(t,e){let r=K20(t,e),n=Z20(t>>BigInt(r));return{inner:r,border:n}}i(J20,"decompInclProof");function $20(t,e,r){return e.reduce((n,o,s)=>r>>BigInt(s)&BigInt(1)?hP(o,n):hP(n,o),t)}i($20,"chainInner");function j20(t,e){return e.reduce((r,n)=>hP(n,r),t)}i(j20,"chainBorderRight");function K20(t,e){return ed0(t^e-BigInt(1))}i(K20,"innerProofSize");function Z20(t){return t.toString(2).split("1").length-1}i(Z20,"onesCount");function ed0(t){return t===0n?0:t.toString(2).length}i(ed0,"bitLength");function hP(t,e){return mP.crypto.digest("sha256",V20,t,e)}i(hP,"hashChildren");function td0(t){return mP.crypto.digest("sha256",X20,t)}i(td0,"hashLeaf")});var Tbe=h(gP=>{"use strict";Object.defineProperty(gP,"__esModule",{value:!0});gP.verifyTLogSET=od0;var xbe=wo(),rd0=It(),nd0=ad();function od0(t,e){if(!(0,nd0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(o=>{let s=sd0(t),a=Buffer.from(xbe.json.canonicalize(s),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return xbe.crypto.verify(a,o.publicKey,c)}))throw new rd0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}i(od0,"verifyTLogSET");function sd0(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:o}=t;return{body:o.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}i(sd0,"toVerificationPayload")});var Lbe=h(Mq=>{"use strict";Object.defineProperty(Mq,"__esModule",{value:!0});Mq.verifyTLogBody=pd0;Mq.verifyTLogInclusion=Ad0;var vbe=Ibe(),fq=It(),OP=Rbe(),EP=Nbe(),id0=wbe(),ad0=Fbe(),cd0=Wbe(),ud0=Tbe();function pd0(t,e){let{kind:r,version:n}=t.kindVersion,o;try{o=JSON.parse(t.canonicalizedBody.toString("utf8"))}catch{throw new fq.VerificationError({code:"TLOG_BODY_ERROR",message:"invalid canonicalized body"})}if(r!==o.kind||n!==o.apiVersion)throw new fq.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${n}, received: ${o.kind}/${o.apiVersion}`});switch(r){case"dsse":if(n==OP.DSSE_API_VERSION_V1)return(0,OP.verifyDSSETLogBody)(o,e);{let s=vbe.Entry.fromJSON(o);return(0,OP.verifyDSSETLogBodyV2)(s,e)}case"intoto":return(0,id0.verifyIntotoTLogBody)(o,e);case"hashedrekord":if(n==EP.HASHEDREKORD_API_VERSION_V1)return(0,EP.verifyHashedRekordTLogBody)(o,e);{let s=vbe.Entry.fromJSON(o);return(0,EP.verifyHashedRekordTLogBodyV2)(s,e)}default:throw new fq.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}i(pd0,"verifyTLogBody");function Ad0(t,e){let r=!1;if(ld0(t)&&((0,ud0.verifyTLogSET)(t,e),r=!0),dd0(t)){let n=(0,ad0.verifyCheckpoint)(t,e);(0,cd0.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new fq.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}i(Ad0,"verifyTLogInclusion");function ld0(t){return t.inclusionPromise!==void 0}i(ld0,"isTLogEntryWithInclusionPromise");function dd0(t){return t.inclusionProof!==void 0}i(dd0,"isTLogEntryWithInclusionProof")});var kbe=h(hq=>{"use strict";Object.defineProperty(hq,"__esModule",{value:!0});hq.Verifier=void 0;var bd0=require("util"),Up=It(),Qbe=Mbe(),CP=hbe(),_be=gbe(),Pbe=Lbe(),BP=class{static{i(this,"Verifier")}trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let n=this.verifyTimestamps(e),o=this.verifySigningKey(e,n);return this.verifyTLogs(e),this.verifySignature(e,o),r&&this.verifyPolicy(r,o.identity||{}),o}verifyTimestamps(e){let r=[];for(let n of e.timestamps)switch(n.$case){case"time
Line truncated
|
|
|
|
|
[`+D+"] ";for(F in arguments[0])s(arguments[0],F)&&(C+=F+": "+arguments[0][F]+", ");C=C.slice(0,-2)}else C=arguments[D];g.push(C)}L(d+`
|
|
|
|
|
Arguments: `+Array.prototype.slice.call(g).join("")+`
|
|
|
|
|
`+new Error().stack),m=!1}return f.apply(this,arguments)},f)}i(ue,"deprecate");var De={};function Qe(d,f){e.deprecationHandler!=null&&e.deprecationHandler(d,f),De[d]||(L(f),De[d]=!0)}i(Qe,"deprecateSimple"),e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function ye(d){return typeof Function<"u"&&d instanceof Function||Object.prototype.toString.call(d)==="[object Function]"}i(ye,"isFunction");function me(d){var f,m;for(m in d)s(d,m)&&(f=d[m],ye(f)?this[m]=f:this["_"+m]=f);this._config=d,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}i(me,"set");function Ue(d,f){var m=l({},d),g;for(g in f)s(f,g)&&(o(d[g])&&o(f[g])?(m[g]={},l(m[g],d[g]),l(m[g],f[g])):f[g]!=null?m[g]=f[g]:delete m[g]);for(g in d)s(d,g)&&!s(f,g)&&o(d[g])&&(m[g]=l({},m[g]));return m}i(Ue,"mergeConfigs");function pe(d){d!=null&&this.set(d)}i(pe,"Locale");var Ge;Object.keys?Ge=Object.keys:Ge=i(function(d){var f,m=[];for(f in d)s(d,f)&&m.push(f);return m},"keys");var J={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function _e(d,f,m){var g=this._calendar[d]||this._calendar.sameElse;return ye(g)?g.call(f,m):g}i(_e,"calendar");function C0(d,f,m){var g=""+Math.abs(d),C=f-g.length,D=d>=0;return(D?m?"+":"":"-")+Math.pow(10,Math.max(0,C)).toString().substr(1)+g}i(C0,"zeroFill");var Mt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,p0=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V1={},q0={};function ne(d,f,m,g){var C=g;typeof g=="string"&&(C=i(function(){return this[g]()},"func")),d&&(q0[d]=C),f&&(q0[f[0]]=function(){return C0(C.apply(this,arguments),f[1],f[2])}),m&&(q0[m]=function(){return this.localeData().ordinal(C.apply(this,arguments),d)})}i(ne,"addFormatToken");function Qo(d){return d.match(/\[[\s\S]/)?d.replace(/^\[|\]$/g,""):d.replace(/\\/g,"")}i(Qo,"removeFormattingTokens");function un(d){var f=d.match(Mt),m,g;for(m=0,g=f.length;m<g;m++)q0[f[m]]?f[m]=q0[f[m]]:f[m]=Qo(f[m]);return function(C){var D="",F;for(F=0;F<g;F++)D+=ye(f[F])?f[F].call(C,d):f[F];return D}}i(un,"makeFormatFunction");function b0(d,f){return d.isValid()?(f=Kt(f,d.localeData()),V1[f]=V1[f]||un(f),V1[f](d)):d.localeData().invalidDate()}i(b0,"formatMoment");function Kt(d,f){var m=5;function g(C){return f.longDateFormat(C)||C}for(i(g,"replaceLongDateFormatTokens"),p0.lastIndex=0;m>=0&&p0.test(d);)d=d.replace(p0,g),p0.lastIndex=0,m-=1;return d}i(Kt,"expandFormat");var Hm={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Xm(d){var f=this._longDateFormat[d],m=this._longDateFormat[d.toUpperCase()];return f||!m?f:(this._longDateFormat[d]=m.match(Mt).map(function(g){return g==="MMMM"||g==="MM"||g==="DD"||g==="dddd"?g.slice(1):g}).join(""),this._longDateFormat[d])}i(Xm,"longDateFormat");var RD="Invalid date";function Jc(){return this._invalidDate}i(Jc,"invalidDate");var R="%d",T=/\d{1,2}/;function v(d){return this._ordinal.replace("%d",d)}i(v,"ordinal");var k={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Ie(d,f,m,g){var C=this._relativeTime[m];return ye(C)?C(d,f,m,g):C.replace(/%d/i,d)}i(Ie,"relativeTime");function Ze(d,f){var m=this._relativeTime[d>0?"future":"past"];return ye(m)?m(f):m.replace(/%s/i,f)}i(Ze,"pastFuture");var K0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ve(d){return typeof d=="string"?K0[d]||K0[d.toLowerCase()]:void 0}i(ve,"normalizeUnits");function D0(d){var f={},m,g;for(g in d)s(d,g)&&(m=ve(g),m&&(f[m]=d[g]));return f}i(D0,"normalizeObjectUnits");var t9={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function K4e(d){var f=[],m;for(m in d)s(d,m)&&f.push({unit:m,priority:t9[m]});return f.sort(function(g,C){return g.priority-C.priority}),f
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(uE0,"_nonIterableRest");Bm.exports=uE0,Bm.exports.__esModule=!0,Bm.exports.default=Bm.exports});var aEe=h((ef1,qm)=>{var pE0=HOe(),AE0=T3e(),lE0=sEe(),dE0=iEe();function bE0(t,e){return pE0(t)||AE0(t,e)||lE0(t,e)||dE0()}i(bE0,"_slicedToArray");qm.exports=bE0,qm.exports.__esModule=!0,qm.exports.default=qm.exports});var uEe=h((rf1,cEe)=>{"use strict";var fE0=dD().forEach,ME0=gm(),hE0=ME0("forEach");cEe.exports=hE0?[].forEach:i(function(e){return fE0(this,e,arguments.length>1?arguments[1]:void 0)},"forEach")});var AEe=h(()=>{"use strict";var mE0=w0(),pEe=uEe();mE0({target:"Array",proto:!0,forced:[].forEach!==pEe},{forEach:pEe})});var dEe=h((if1,lEe)=>{"use strict";AEe();var zE0=Lo();lEe.exports=zE0("Array","forEach")});var fEe=h((af1,bEe)=>{"use strict";var gE0=dEe();bEe.exports=gE0});var MEe=h(()=>{});var mEe=h((pf1,hEe)=>{"use strict";var OE0=Nd(),EE0=$t(),CE0=qr(),yE0=fEe();MEe();var E7=Array.prototype,BE0={DOMTokenList:!0,NodeList:!0};hEe.exports=function(t){var e=t.forEach;return t===E7||CE0(E7,t)&&e===E7.forEach||EE0(BE0,OE0(t))?yE0:e}});var C7=h((Af1,zEe)=>{zEe.exports=mEe()});var gEe=h(()=>{"use strict";var qE0=w0(),DE0=$q().includes,IE0=d1(),RE0=nk(),NE0=IE0(function(){return!Array(1).includes()});qE0({target:"Array",proto:!0,forced:NE0},{includes:i(function(e){return DE0(this,e,arguments.length>1?arguments[1]:void 0)},"includes")});RE0("includes")});var EEe=h((ff1,OEe)=>{"use strict";gEe();var wE0=Lo();OEe.exports=wE0("Array","includes")});var yEe=h((Mf1,CEe)=>{"use strict";var SE0=an(),FE0=ga(),WE0=D1(),xE0=WE0("match");CEe.exports=function(t){var e;return SE0(t)&&((e=t[xE0])!==void 0?!!e:FE0(t)==="RegExp")}});var qEe=h((hf1,BEe)=>{"use strict";var TE0=yEe(),vE0=TypeError;BEe.exports=function(t){if(TE0(t))throw new vE0("The method doesn't accept regular expressions");return t}});var IEe=h((mf1,DEe)=>{"use strict";var LE0=D1(),QE0=LE0("match");DEe.exports=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[QE0]=!1,"/./"[t](e)}catch{}}return!1}});var NEe=h(()=>{"use strict";var _E0=w0(),PE0=t1(),kE0=qEe(),UE0=Gp(),REe=ui(),GE0=IEe(),HE0=PE0("".indexOf);_E0({target:"String",proto:!0,forced:!GE0("includes")},{includes:i(function(e){return!!~HE0(REe(UE0(this)),REe(kE0(e)),arguments.length>1?arguments[1]:void 0)},"includes")})});var SEe=h((Ef1,wEe)=>{"use strict";NEe();var XE0=Lo();wEe.exports=XE0("String","includes")});var xEe=h((Cf1,WEe)=>{"use strict";var FEe=qr(),VE0=EEe(),YE0=SEe(),y7=Array.prototype,B7=String.prototype;WEe.exports=function(t){var e=t.includes;return t===y7||FEe(y7,t)&&e===y7.includes?VE0:typeof t=="string"||t===B7||FEe(B7,t)&&e===B7.includes?YE0:e}});var vEe=h((yf1,TEe)=>{"use strict";var JE0=xEe();TEe.exports=JE0});var Dm=h((Bf1,LEe)=>{LEe.exports=vEe()});var q7=h((qf1,QEe)=>{"use strict";QEe.exports=`
|
|
|
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var kEe=h((Df1,PEe)=>{"use strict";var $E0=t1(),jE0=Gp(),KE0=ui(),I7=q7(),_Ee=$E0("".replace),ZE0=RegExp("^["+I7+"]+"),eC0=RegExp("(^|[^"+I7+"])["+I7+"]+$"),D7=i(function(t){return function(e){var r=KE0(jE0(e));return t&1&&(r=_Ee(r,ZE0,"")),t&2&&(r=_Ee(r,eC0,"$1")),r}},"createMethod");PEe.exports={start:D7(1),end:D7(2),trim:D7(3)}});var JEe=h((Rf1,YEe)=>{"use strict";var XEe=X1(),tC0=d1(),rC0=t1(),nC0=ui(),oC0=kEe().trim,UEe=q7(),Im=XEe.parseInt,GEe=XEe.Symbol,HEe=GEe&&GEe.iterator,VEe=/^[+-]?0x/i,sC0=rC0(VEe.exec),iC0=Im(UEe+"08")!==8||Im(UEe+"0x16")!==22||HEe&&!tC0(function(){Im(Object(HEe))});YEe.exports=iC0?i(function(e,r){var n=oC0(nC0(e));return Im(n,r>>>0||(sC0(VEe,n)?16:10))},"parseInt"):Im});var jEe=h(()=>{"use strict";var aC0=w0(),$Ee=JEe();aC0({global:!0,forced:parseInt!==$Ee},{parseInt:$Ee})});var ZEe=h((Ff1,KEe)=>{"use strict";jEe();var cC0=Wo();KEe.exports=cC0.parseInt});var tCe=h((Wf1,eCe)=>{"use strict";var uC0=ZEe();eCe.exports=uC0});var nCe=h((xf1,rCe)=>{rCe.exports=tCe()});var ED=h((Tf1,oCe)=>{oCe.exports=O7()});var aCe=h((vf1,iCe)=>{"use strict";var sCe=tm(),pC0=TypeError;iCe.exports=function(t,e){if(!delete t[e])throw new pC0("Cannot delete property "+sCe(e)+" of "+sCe(t))}});var pCe=h((Lf1,uCe)=>{"use strict";var cCe=dm(),AC0=Math.floor,R7=i(function(t,e){var r=t.length;if(r<8)for(var n=1,o,s;n<r;){for(s=n,o=t[n];s&&e(t[s-1],o)>0;)t[s]=t[--s];s!==n++&&(t[s]=o)}else for(var a=AC0(r/2),c=R7(cCe(t,0,a),e),u=R7(cCe(t,a),e),p=c.length,A=u.length,l=0,b=0;l<p||b<A;)t[l+b]=l<p&&b<A?e(c[l],u[b])<=0?c[l++]:u[b++]:l<p?c[l++]:u[b++];return t},"sort");uCe.exports=R7});var dCe=h((_f1,lCe)=>{"use strict";var lC0=Ed(),ACe=lC0.match(/firefox\/(\d+)/i);lCe.exports=!!ACe&&+ACe[1]});var fCe=h((Pf1,bCe)=>{"use strict";var dC0=Ed();bCe.exports=/MSIE|Trident/.test(dC0)});var mCe=h((kf1,hCe)=>{"use strict";var bC0=Ed(),MCe=bC0.match(/AppleWebKit\/(\d+)\./);hCe.exports=!!MCe&&+MCe[1]});var DCe=h(()=>{"use strict";var fC0=w0(),BCe=t1(),MC0=Xp(),hC0=ai(),zCe=Ca(),mC0=aCe(),gCe=ui(),N7=d1(),zC0=pCe(),gC0=gm(),OCe=dCe(),OC0=fCe(),ECe=Cd(),CCe=mCe(),Hc=[],yCe=BCe(Hc.sort),EC0=BCe(Hc.push),CC0=N7(function(){Hc.sort(void 0)}),yC0=N7(function(){Hc.sort(null)}),BC0=gC0("sort"),qCe=!N7(function(){if(ECe)return ECe<70;if(!(OCe&&OCe>3)){if(OC0)return!0;if(CCe)return CCe<603;var t="",e,r,n,o;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)Hc.push({k:r+o,v:n})}for(Hc.sort(function(s,a){return a.v-s.v}),o=0;o<Hc.length;o++)r=Hc[o].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),qC0=CC0||!yC0||!BC0||!qCe,DC0=i(function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:gCe(e)>gCe(r)?1:-1}},"getSortCompare");fC0({target:"Array",proto:!0,forced:qC0},{sort:i(function(e){e!==void 0&&MC0(e);var r=hC0(this);if(qCe)return e===void 0?yCe(r):yCe(r,e);var n=[],o=zCe(r),s,a;for(a=0;a<o;a++)a in r&&EC0(n,r[a]);for(zC0(n,DC0(e)),s=zCe(n),a=0;a<s;)r[a]=n[a++];for(;a<o;)mC0(r,a++);return r},"sort")})});var RCe=h((Xf1,ICe)=>{"use strict";DCe();var IC0=Lo();ICe.exports=IC0("Array","sort")});var wCe=h((Vf1,NCe)=>{"use strict";var RC0=qr(),NC0=RCe(),w7=Array.prototype;NCe.exports=function(t){var e=t.sort;return t===w7||RC0(w7,t)&&e===w7.sort?NC0:e}});var FCe=h((Yf1,SCe)=>{"use strict";var wC0=wCe();SCe.exports=wC0});var xCe=h((Jf1,WCe)=>{WCe.exports=FCe()});var TCe=h(()=>{});var QCe=h((Kf1,LCe)=>{"use strict";var SC0=X1(),FC0=d1(),vCe=SC0.RegExp,WC0=!FC0(function(){var t=!0;try{vCe(".","d")}catch{t=!1}var e={},r="",n=t?"dgimsy":"gimsy",o=i(function(u,p){Object.defineProperty(e,u,{get:i(function(){return r+=p,!0},"get")})},"addGetter"),s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};t&&(s.hasIndices="d");for(var a in s)o(a,s[a]);var c=Object.getOwnPropertyDescriptor(vCe.prototype,"flags").get.call(e);return c!==n||r!==n});LCe.exports={correct:WC0}});var PCe=h((eM1,_Ce)=>{"use strict";var xC0=Ea();_Ce.exports=function(){var t=xC0(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}});var GCe=h((tM1,UCe)=>{"use strict";var TC0=eo(),vC0=$t(),LC0=qr(),kCe=QCe(),QC0=PCe(),_C0=RegExp.prototype;UCe.exports=kCe.correct?function(t){return t.flags}:function(t){return!kCe.correct&&LC0(_C0,t)&&!vC0(t,"flags")?TC0(QC0,t):t.flags}});var XCe=h((rM1,HCe)=>{"use strict";TCe();var PC0=GCe();HCe.exports=PC0});var JCe=h((nM1,YCe)=>{"use strict";var kC0=qr(),UC0=XCe(),VCe=RegExp.prototype;YCe.exports=function(t){return t===VCe||kC0(VCe,t)?UC0(t):t.flags}});var jCe=h((oM1,$Ce)=>{"use strict";var GC0=JCe();$Ce.exports=GC0});var ZCe=h((sM1,KCe)=>{KCe.exports=jCe()});var mye=h((Fm,hye)=>{"use strict";var jt=si(),HC0=ci();HC0(Fm,"__esModule",{
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,c;return{s:i(function(){r=(0,XC0.default)(t)},"s"),n:i(function(){var p=r.next();return s=p.done,p},"n"),e:i(function(p){a=!0,c=p},"e"),f:i(function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}i(wm,"_createForOfIteratorHelper");function ey0(t,e){var r;if(t){if(typeof t=="string")return eye(t,e);var n=(0,ro.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,$C0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eye(t,e)}}i(ey0,"_unsupportedIterableToArray");function eye(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}i(eye,"_arrayLikeToArray");var _0="xregexp",tA={astral:!1,namespacing:!1},b1={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},pi={},Rm={},Wd={},S7=[],xd="default",tye="class",ty0={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},ry0=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,ny0=b1.exec.call(/()??/,"")[1]===void 0,oy0=(0,eA.default)(/x/)!==void 0,sy0={},iye=sy0.toString;function W7(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),n=".a".replace(new RegExp("a",r),".")==="..";n&&(e=!1)}}catch{e=!1}return e}i(W7,"hasNativeFlag");var aye=W7("u"),x7=W7("y"),cye={g:!0,i:!0,m:!0,u:aye,y:x7};function uye(t,e,r,n,o){var s;if(t[_0]={captureNames:e},o)return t;if(t.__proto__)t.__proto__=Y.prototype;else for(var a in Y.prototype)t[a]=Y.prototype[a];return t[_0].source=r,t[_0].flags=n&&(0,ZC0.default)(s=n.split("")).call(s).join(""),t}i(uye,"augment");function Nm(t){return b1.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}i(Nm,"clipDuplicates");function nA(t,e){var r;if(!Y.isRegExp(t))throw new TypeError("Type RegExp expected");var n=t[_0]||{},o=iy0(t),s="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(o=b1.replace.call(o,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(s+="g"),e.addY&&(s+="y"),s&&(o=Nm(o+s)),e.isInternalOnly||(n.source!==void 0&&(c=n.source),(0,eA.default)(n)!=null&&(u=s?Nm((0,eA.default)(n)+s):(0,eA.default)(n))),t=uye(new RegExp(e.source||t.source,o),ay0(t)?(0,ro.default)(r=n.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}i(nA,"copyRegex");function pye(t){return(0,sye.default)(t,16)}i(pye,"dec");function Aye(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||b1.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||cy0(t.input,t.index+t[0].length,r)?"":"(?:)"}i(Aye,"getContextualTokenSeparator");function iy0(t){return oy0?(0,eA.default)(t):b1.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}i(iy0,"getNativeFlags");function ay0(t){return!!(t[_0]&&t[_0].captureNames)}i(ay0,"hasNamedCapture");function lye(t){return(0,sye.default)(t,10).toString(16)}i(lye,"hex");function cy0(t,e,r){var n="\\(\\?#[^)]*\\)",o="#[^#\\n]*",s="[?*+]|{\\d+(?:,\\d*)?}";return b1.test.call((0,rA.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,ro.default)(t).call(t,e))}i(cy0,"isQuantifierNext");function T7(t,e){return iye.call(t)==="[object ".concat(e,"]")}i(T7,"isType");function dye(t){for(;t.length<4;)t="0".concat(t);return t}i(dye,"pad4");function uy0(t,e){if(Nm(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=b1.replace.call(t,/^\(\?([\w$]+)\)/,function(s,a){if(b1.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(s));return e=Nm(e+a),""});var r=wm(e),n;try{for(r.s();!(n=r.n()).done;){var o=n.value;if(!cye[o])throw new SyntaxError("Unknown regex flag ".concat(o))}}catch(s){r.e(s)}finally{r.f()}return{pattern:t,flags:e}}i(uy0,"prepareFlags");function bye(t){var e={};return T7(t,"String")?((0,F7.default)(Y).call(Y,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}i(bye,"prepareOptions");function rye(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be a single character A-Za-z0-9_$");cye[t]=!0}i(rye,"registerFlag");function py0(t,e,r,n,o){for(var s=S7.length,a=t[r],c=null,u,p;s--;)if(p=S7[s],!(p.leadChar&&p.leadChar!==a||p.scope!==n&&p.scope!=="all"||p.flag&&!(0,rA.default)(e).call(e,p.flag))&&(u=Y.exec(t,p.regex,r,"sticky"),u)){c={matchLength:u[0].length,output:p.handler.call(o,u,n,e),reparse:p.reparse};break}return c}i(py0,"runTokens");function fye(t){tA.astral=t}i(fye,"setAstral");function Mye(t){tA.namespacing=t}i(Mye,"setNamespacing");f
Line truncated
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,c;return{s:i(function(){r=(0,Hy0.default)(t)},"s"),n:i(function(){var p=r.next();return s=p.done,p},"n"),e:i(function(p){a=!0,c=p},"e"),f:i(function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}i(Zy0,"_createForOfIteratorHelper");function e40(t,e){var r;if(t){if(typeof t=="string")return e4e(t,e);var n=(0,$y0.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,Jy0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e4e(t,e)}}i(e40,"_unsupportedIterableToArray");function e4e(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}i(e4e,"_arrayLikeToArray");var t40=i(function(e){var r={},n=e._dec,o=e._hex,s=e._pad4;function a(b){return b.replace(/[- _]+/g,"").toLowerCase()}i(a,"normalize");function c(b){var M=/^\\[xu](.+)/.exec(b);return M?n(M[1]):b.charCodeAt(b[0]==="\\"?1:0)}i(c,"charCode");function u(b){var M="",z=-1;return(0,Ky0.default)(e).call(e,b,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(O){var y=c(O[1]);y>z+1&&(M+="\\u".concat(s(o(z+1))),y>z+2&&(M+="-\\u".concat(s(o(y-1))))),z=c(O[2]||O[1])}),z<65535&&(M+="\\u".concat(s(o(z+1))),z<65534&&(M+="-\\uFFFF")),M}i(u,"invertBmp");function p(b){var M="b!";return r[b][M]||(r[b][M]=u(r[b].bmp))}i(p,"cacheInvertedBmp");function A(b,M){var z=r[b],O="";if(z.bmp&&!z.isBmpLast){var y;O=(0,_7.default)(y="[".concat(z.bmp,"]")).call(y,z.astral?"|":"")}if(z.astral&&(O+=z.astral),z.isBmpLast&&z.bmp){var E;O+=(0,_7.default)(E="".concat(z.astral?"|":"","[")).call(E,z.bmp,"]")}return M?"(?:(?!".concat(O,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(O,")")}i(A,"buildAstral");function l(b,M){var z=M?"a!":"a=";return r[b][z]||(r[b][z]=A(b,M))}i(l,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(b,M,z){var O="Invalid double negation ",y="Unknown Unicode token ",E="Unicode token missing data ",B="Astral mode required for Unicode token ",q="Astral mode does not support Unicode tokens within character classes",I=b[1]==="P"||!!b[2],W=(0,jy0.default)(z).call(z,"A"),x=a(b[4]||b[3]),L=r[x];if(b[1]==="P"&&b[2])throw new SyntaxError(O+b[0]);if(!r.hasOwnProperty(x))throw new SyntaxError(y+b[0]);if(L.inverseOf){if(x=a(L.inverseOf),!r.hasOwnProperty(x)){var ue;throw new ReferenceError((0,_7.default)(ue="".concat(E+b[0]," -> ")).call(ue,L.inverseOf))}L=r[x],I=!I}if(!(L.bmp||W))throw new SyntaxError(B+b[0]);if(W){if(M==="class")throw new SyntaxError(q);return l(x,I)}return M==="class"?I?p(x):L.bmp:"".concat((I?"[^":"[")+L.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(b){var M="Unicode token requires name",z="Unicode token has no character data ",O=Zy0(b),y;try{for(O.s();!(y=O.n()).done;){var E=y.value;if(!E.name)throw new Error(M);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(z+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(B){O.e(B)}finally{O.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(b){var M=a(b);return r[M]}},"_default");vm.default=t40;t4e.exports=vm.default});var o4e=h((RM1,n4e)=>{n4e.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",bmp:"\uA6A0-\uA6FF"},{name:"InBamum_Supplement",astral:"\uD81A[\uDC00-\uDE3F]"},{name:"InBasic_Latin",bmp:"\0-\x7F"},{name:"InBassa_Vah",astral:"\uD81A[\uDED0-\uDEFF]"},{name:"InBatak",bmp:"\u1BC0-\u1BFF"},{name:"InBengali",bmp:"\u0980-\u09FF"},{name:"InBhaiksuki",astral:"\uD807[\uDC00-\uDC6F]"},{name:"InBlock_Elements",bmp:"\u2580-\u259F"},{name:"InBopomofo",bmp:"\u3100-\u312F"},{name:"InBopomofo_Extended",bmp:"\u31A0-\u31BF"},{name:"InBox_Drawing",bmp:"\u2500-\u257F"},{name:"InBrahmi",astral:"\uD804[\uDC00-\uDC7F]"},{name:"InBraille_Patterns",bmp:"\u2800-\u28FF"},{name:"InBuginese",bmp:"\u1A00-\u1A1F"},{name:"InBuhid",bmp:"\u1740-\u175F"},{
Line truncated
|
|
|
|
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}i(Yj,"getBooleanInput");function GN(t,e){if(process.env.GITHUB_OUTPUT||"")return Vd("OUTPUT",bz(t,e));process.stdout.write(UN.EOL),ko("set-output",{name:t},Po(e))}i(GN,"setOutput");function Jj(t){process.exitCode=kN.Failure,ll(t)}i(Jj,"setFailed");function vi(){return process.env.RUNNER_DEBUG==="1"}i(vi,"isDebug");function N(t){ko("debug",{},t)}i(N,"debug");function ll(t,e={}){ko("error",KD(e),t instanceof Error?t.toString():t)}i(ll,"error");function r0(t,e={}){ko("warning",KD(e),t instanceof Error?t.toString():t)}i(r0,"warning");function S(t){process.stdout.write(t+UN.EOL)}i(S,"info");function Iu(t){eI("group",t)}i(Iu,"startGroup");function Ru(){eI("endgroup")}i(Ru,"endGroup");function at(t,e){return g8e(this,void 0,void 0,function*(){Iu(t);let r;try{r=yield e()}finally{Ru()}return r})}i(at,"group");function fO(t,e){if(process.env.GITHUB_STATE||"")return Vd("STATE",bz(t,e));ko("save-state",{name:t},Po(e))}i(fO,"saveState");function $j(t){return process.env[`STATE_${t}`]||""}i($j,"getState");var YM=w(require("fs"),1),oL=w(require("os"),1),sL=w(require("path"),1);var Kj=w(require("os"),1);function rf(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i(rf,"toCommandValue");function Zj(t,e,r){let n=new HN(t,e,r);process.stdout.write(n.toString()+Kj.EOL)}i(Zj,"issueCommand");var jj="::",HN=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=jj+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${E8e(o)}`)}}return e+=`${jj}${O8e(this.message)}`,e}};function O8e(t){return rf(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(O8e,"escapeData");function E8e(t){return rf(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(E8e,"escapeProperty");var nK=w(require("os"),1);var tK=require("os"),nf=require("fs");var XN=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},{access:C8e,appendFile:y8e,writeFile:B8e}=nf.promises,eK="GITHUB_STEP_SUMMARY";var VN=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return XN(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[eK];if(!e)throw new Error(`Unable to find environment variable for $${eK}. Check if your runtime environment supports job summaries.`);try{yield C8e(e,nf.constants.R_OK|nf.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let o=Object.entries(n).map(([s,a])=>` ${s}="${a}"`).join("");return r?`<${e}${o}>${r}</${e}>`:`<${e}${o}>`}write(e){return XN(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?B8e:y8e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return XN(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(tK.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),o=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(o).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",o=e.map(a=>this.wrap("li",a)).join(""),s=this.wrap(n,o);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(o=>{let s=o.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:u,colspan:p,rowspan:A}=a,l=c?"th":"td",b=Object.assign(Object.assign({},p&&{colspan:p}),A&&{rowspan:A});return this.wrap(l,u,b)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:o,height:s}=n||{},a=Object.assign(Object.assign({},o&&{width:o}),s&&{height:s}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,o=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(o,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),o=this.wrap("blockquote",e,n);return this.addRaw(o).addEOL()}addLinLine truncated
|
|
|
|
|
`),e=e.replace(/\r/g,`
|
|
|
|
|
`));let o=e.split(`
|
|
|
|
|
`).map(s=>s.trim());for(let s of o)!s||s.startsWith("#")||n.patterns.push(new bM(s));return n.searchPaths.push(...zw(n.patterns)),n})}static stat(e,r,n){return Bw(this,void 0,void 0,function*(){let o;if(r.followSymbolicLinks)try{o=yield fl.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){gn(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else o=yield fl.promises.lstat(e.path);if(o.isDirectory()&&r.followSymbolicLinks){let s=yield fl.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===s)){gn(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return o})}};var Lke=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function Bee(t,e){return Lke(this,void 0,void 0,function*(){return yield Sg.create(t,e)})}i(Bee,"create");var Yg=w(require("crypto"),1),Ol=w(require("fs"),1),Su=w(require("path"),1),h1e=w(f1e(),1),z1e=w(require("util"),1);var gM;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(gM||(gM={}));var Lt;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Lt||(Lt={}));var kr;(function(t){t.GNU="gnu",t.BSD="bsd"})(kr||(kr={}));var Xg=2,Vg=5e3,Xw=5e3,Vw=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,m1e=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,EM="cache.tar",Yw="manifest.txt",ES0=10*Math.pow(1024,3);var zl=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},HUe=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(c,u){a=t[s](a),o(c,u,a.done,a.value)})}}function o(s,a,c,u){Promise.resolve(u).then(function(p){s({value:p,done:c})},a)}},XUe="1.0";function CM(){return zl(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=Su.join(n,"actions","temp")}let r=Su.join(e,Yg.randomUUID());return yield xi(r),r})}i(CM,"createTempDirectory");function ns(t){return Ol.statSync(t).size}i(ns,"getArchiveFileSizeInBytes");function Jw(t){return zl(this,void 0,void 0,function*(){var e,r,n,o,s;let a=[],c=(s=process.env.GITHUB_WORKSPACE)!==null&&s!==void 0?s:process.cwd(),u=yield Bee(t.join(`
|
|
|
|
|
`),{implicitDescendants:!1});try{for(var p=!0,A=HUe(u.globGenerator()),l;l=yield A.next(),e=l.done,!e;p=!0){o=l.value,p=!1;let f=Su.relative(c,o).replace(new RegExp(`\\${Su.sep}`,"g"),"/");N(`Matched: ${f}`),f===""?a.push("."):a.push(`${f}`)}}catch(b){r={error:b}}finally{try{!p&&!e&&(n=A.return)&&(yield n.call(A))}finally{if(r)throw r.error}}return a})}i(Jw,"resolvePaths");function yM(t){return zl(this,void 0,void 0,function*(){return z1e.promisify(Ol.unlink)(t)})}i(yM,"unlinkFile");function O1e(t){return zl(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),N(`Checking ${e} ${r.join(" ")}`);try{yield Qr(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i(o=>n+=o.toString(),"stdout"),stderr:i(o=>n+=o.toString(),"stderr")}})}catch(o){N(o.message)}return n=n.trim(),N(n),n})}i(O1e,"getVersion");function BM(){return zl(this,void 0,void 0,function*(){let t=yield O1e("zstd",["--quiet"]),e=h1e.clean(t);return N(`zstd version: ${e}`),t===""?Lt.Gzip:Lt.ZstdWithoutLong})}i(BM,"getCompressionMethod");function rc(t){return t===Lt.Gzip?gM.Gzip:gM.Zstd}i(rc,"getCacheFileName");function g1e(){return zl(this,void 0,void 0,function*(){return Ol.existsSync(Vw)?Vw:(yield O1e("tar")).toLowerCase().includes("gnu tar")?it("tar"):""})}i(g1e,"getGnuTarPathOnWindows");function jw(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}i(jw,"assertDefined");function gl(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(XUe),Yg.createHash("sha256").update(n.join("|")).digest("hex")}i(gl,"getCacheVersion");function E1e(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}i(E1e,"getRuntimeToken");var DM=w(require("http"),1),Zw=w(require("https"),1);function $w(t){let e=t.protocol==="https:";if(VUe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new jg(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new jg(`http://${r}`)}else return}i($w,"getProxyUrl");function VUe(t){if(!t.hostname)return!1;let e=t.hostname;if(YUe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let o=[t.hostname.toUpperCase()];typeof n=="number"&&o.push(`${o[0]}:${n}`);for(let s of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(s==="*"||o.some(a=>a===s||a.endsWith(`.${s}`)||s.startsWith(".")&&a.endsWith(`${s}`)))return!0;return!1}i(VUe,"checkBypass");function YUe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(YUe,"isLoopbackAddress");var jg=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var nc=w(Xd(),1),C1e=w(il(),1);var z1=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},n1;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(n1||(n1={}));var Qt;(function(t){t.Accept="accept",t.ContentType="content-type"})(Qt||(Qt={}));var _i;(function(t){t.ApplicationJson="application/json"})(_i||(_i={}));var jUe=[n1.MovedPermanently,n1.ResourceMoved,n1.SeeOther,n1.TemporaryRedirect,n1.PermanentRedirect],$Ue=[n1.BadGateway,n1.ServiceUnavailable,n1.GatewayTimeout],KUe=["OPTIONS","GET","DELETE","HEAD"],ZUe=10,eGe=5,os=class t extends Error{static{i(this,"HttpClientError")}const
Line truncated
|
|
|
|
|
${uGe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function r3(t){return t instanceof _t?!0:Wu(t)&&t.name==="RestError"}i(r3,"isRestError");function sr(t,e){return Buffer.from(t,e)}i(sr,"stringToUint8Array");var n3=w(require("node:http"),1),o3=w(require("node:https"),1),u6=w(require("node:zlib"),1),P1e=require("node:stream");var yn=IM("ts-http-runtime");var pGe={};function RM(t){return t&&typeof t.pipe=="function"}i(RM,"isReadableStream");function _1e(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=i(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}i(_1e,"isStreamComplete");function k1e(t){return t&&typeof t.byteLength=="number"}i(k1e,"isArrayBuffer");var s3=class extends P1e.Transform{static{i(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.progressCallback=e}},p6=class{static{i(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new ss("The operation was aborted. Request has already been canceled.");n=i(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let o;e.timeout>0&&(o=setTimeout(()=>{let p=new mo;yn.info(`request to '${p.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),a=s?.includes("gzip")||s?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let p=bGe(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let z=e.onUploadProgress,g=new s3(z);g.on("error",y=>{yn.error("Error in upload progress",y)}),RM(c)?c.pipe(g):g.end(c),c=g}let p=await this.makeRequest(e,r,c);o!==void 0&&clearTimeout(o);let A=AGe(p),b={status:p.statusCode??0,headers:A,request:e};if(e.method==="HEAD")return p.resume(),b;u=a?lGe(p,A):p;let f=e.onDownloadProgress;if(f){let z=new s3(f);z.on("error",g=>{yn.error("Error in download progress",g)}),u.pipe(z),u=z}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(b.status)?b.readableStreamBody=u:b.bodyAsText=await dGe(u),b}finally{if(e.abortSignal&&n){let p=Promise.resolve();RM(c)&&(p=_1e(c));let A=Promise.resolve();RM(u)&&(A=_1e(u)),Promise.all([p,A]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{yn.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let o=new URL(e.url),s=o.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,s),hostname:o.hostname,path:`${o.pathname}${o.search}`,port:o.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((u,p)=>{let A=s?n3.default.request(c,u):o3.default.request(c,u);A.once("error",l=>{p(new _t(l.message,{code:l.code??_t.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new ss("The operation was aborted. Rejecting from abort signal callback while making request.");A.destroy(l),p(l)}),n&&RM(n)?n.pipe(A):n?typeof n=="string"||Buffer.isBuffer(n)?A.end(n):k1e(n)?A.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(yn.error("Unrecognized body type",n),p(new _t("Unrecognized body type"))):A.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?n3.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new n3.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return o3.default.globalAgent;let o=e.tlsSettings??pGe,s=this.cachedHttpsAgents.get(o);return s&&s.options.keepAlive===!n||(yn.info("No cached TLS Agent exist, creating a new Agent"),s=new o3.default.Agent({keepAlive:!n,...o}),this.cachedHttpsAgents.set(o,s)),s}}};function AGe(t){let e=Ur();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}i(AGe,"getResponseHeaders");function lGe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=u6.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=u6.default.createInflate();return t.pipe(n),n}return t}i(lGe,"getDecodedResponseStream");function dGe(t){return new Promise((e,r)=>{let n=[];t.on("data",o=>{Buffer.isBuffer(o)?n.push(o):n.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",o=>{o&&o?.name==="AbortError"?r(o):r(new _t(`Error reading response as text: ${o.message}`,{code:_t.PARSE_ERROR}))})})}i(dGe,"streamToText");function bGe(t){return t?Buffer.isBuffer(t)?t.length:
Line truncated
|
|
|
|
|
`;return e}i(HHe,"encodeHeaders");function XHe(t){return t instanceof Uint8Array?t.byteLength:R3(t)?t.size===-1?void 0:t.size:void 0}i(XHe,"getLength");function VHe(t){let e=0;for(let r of t){let n=XHe(r);if(n===void 0)return;e+=n}return e}i(VHe,"getTotalLength");async function YHe(t,e,r){let n=[sr(`--${r}`,"utf-8"),...e.flatMap(s=>[sr(`\r
|
|
|
|
|
`,"utf-8"),sr(HHe(s.headers),"utf-8"),sr(`\r
|
|
|
|
|
`).map(s=>s.trim());for(let s of o)!s||s.startsWith("#")||n.patterns.push(new mf(s));return n.searchPaths.push(...Dw(n.patterns)),n})}static stat(e,r,n){return xw(this,void 0,void 0,function*(){let o;if(r.followSymbolicLinks)try{o=yield ml.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){En(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else o=yield ml.promises.lstat(e.path);if(o.isDirectory()&&r.followSymbolicLinks){let s=yield ml.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===s)){En(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return o})}};var h7e=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function xee(t,e){return h7e(this,void 0,void 0,function*(){return yield xO.create(t,e)})}i(xee,"create");var KO=w(require("crypto"),1),El=w(require("fs"),1),Fu=w(require("path"),1),I1e=w(q1e(),1),R1e=w(require("util"),1);var Bf;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Bf||(Bf={}));var Lt;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Lt||(Lt={}));var Ur;(function(t){t.GNU="gnu",t.BSD="bsd"})(Ur||(Ur={}));var JO=2,$O=5e3,r6=5e3,n6=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,D1e=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,qf="cache.tar",o6="manifest.txt",sF0=10*Math.pow(1024,3),jO="cache read denied:";var Ol=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},yGe=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(c,u){a=t[s](a),o(c,u,a.done,a.value)})}}function o(s,a,c,u){Promise.resolve(u).then(function(p){s({value:p,done:c})},a)}},BGe="1.0";function Df(){return Ol(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=Fu.join(n,"actions","temp")}let r=Fu.join(e,KO.randomUUID());return yield Ti(r),r})}i(Df,"createTempDirectory");function ss(t){return El.statSync(t).size}i(ss,"getArchiveFileSizeInBytes");function s6(t){return Ol(this,void 0,void 0,function*(){var e,r,n,o,s;let a=[],c=(s=process.env.GITHUB_WORKSPACE)!==null&&s!==void 0?s:process.cwd(),u=yield xee(t.join(`
|
|
|
|
|
`),{implicitDescendants:!1});try{for(var p=!0,A=yGe(u.globGenerator()),l;l=yield A.next(),e=l.done,!e;p=!0){o=l.value,p=!1;let M=Fu.relative(c,o).replace(new RegExp(`\\${Fu.sep}`,"g"),"/");N(`Matched: ${M}`),M===""?a.push("."):a.push(`${M}`)}}catch(b){r={error:b}}finally{try{!p&&!e&&(n=A.return)&&(yield n.call(A))}finally{if(r)throw r.error}}return a})}i(s6,"resolvePaths");function If(t){return Ol(this,void 0,void 0,function*(){return R1e.promisify(El.unlink)(t)})}i(If,"unlinkFile");function N1e(t){return Ol(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),N(`Checking ${e} ${r.join(" ")}`);try{yield _r(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i(o=>n+=o.toString(),"stdout"),stderr:i(o=>n+=o.toString(),"stderr")}})}catch(o){N(o.message)}return n=n.trim(),N(n),n})}i(N1e,"getVersion");function Rf(){return Ol(this,void 0,void 0,function*(){let t=yield N1e("zstd",["--quiet"]),e=I1e.clean(t);return N(`zstd version: ${e}`),t===""?Lt.Gzip:Lt.ZstdWithoutLong})}i(Rf,"getCompressionMethod");function nc(t){return t===Lt.Gzip?Bf.Gzip:Bf.Zstd}i(nc,"getCacheFileName");function w1e(){return Ol(this,void 0,void 0,function*(){return El.existsSync(n6)?n6:(yield N1e("tar")).toLowerCase().includes("gnu tar")?it("tar"):""})}i(w1e,"getGnuTarPathOnWindows");function i6(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}i(i6,"assertDefined");function Cl(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(BGe),KO.createHash("sha256").update(n.join("|")).digest("hex")}i(Cl,"getCacheVersion");function S1e(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}i(S1e,"getRuntimeToken");var wf=w(require("http"),1),u6=w(require("https"),1);function a6(t){let e=t.protocol==="https:";if(qGe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new e3(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new e3(`http://${r}`)}else return}i(a6,"getProxyUrl");function qGe(t){if(!t.hostname)return!1;let e=t.hostname;if(DGe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let o=[t.hostname.toUpperCase()];typeof n=="number"&&o.push(`${o[0]}:${n}`);for(let s of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(s==="*"||o.some(a=>a===s||a.endsWith(`.${s}`)||s.startsWith(".")&&a.endsWith(`${s}`)))return!0;return!1}i(qGe,"checkBypass");function DGe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(DGe,"isLoopbackAddress");var e3=class extends URL{static{i(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var oc=w(Yd(),1),F1e=w(ul(),1);var z1=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},n1;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(n1||(n1={}));var Qt;(function(t){t.Accept="accept",t.ContentType="content-type"})(Qt||(Qt={}));var Pi;(function(t){t.ApplicationJson="application/json"})(Pi||(Pi={}));var RGe=[n1.MovedPermanently,n1.ResourceMoved,n1.SeeOther,n1.TemporaryRedirect,n1.PermanentRedirect],NGe=[n1.BadGateway,n1.ServiceUnavailable,n1.GatewayTimeout],wGe=["OPTIONS","GET","DELETE","HEAD"],SGe=10,FGe=5,is=class t extends Error{static{i(this,"HttpClientError")}const
Line truncated
|
|
|
|
|
${kGe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function i3(t){return t instanceof _t?!0:xu(t)&&t.name==="RestError"}i(i3,"isRestError");function sr(t,e){return Buffer.from(t,e)}i(sr,"stringToUint8Array");var a3=w(require("node:http"),1),c3=w(require("node:https"),1),z6=w(require("node:zlib"),1),j1e=require("node:stream");var Bn=Sf("ts-http-runtime");var UGe={};function Ff(t){return t&&typeof t.pipe=="function"}i(Ff,"isReadableStream");function $1e(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=i(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}i($1e,"isStreamComplete");function K1e(t){return t&&typeof t.byteLength=="number"}i(K1e,"isArrayBuffer");var u3=class extends j1e.Transform{static{i(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.progressCallback=e}},g6=class{static{i(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new as("The operation was aborted. Request has already been canceled.");n=i(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let o;e.timeout>0&&(o=setTimeout(()=>{let p=new zo;Bn.info(`request to '${p.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),a=s?.includes("gzip")||s?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let p=VGe(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let z=e.onUploadProgress,O=new u3(z);O.on("error",y=>{Bn.error("Error in upload progress",y)}),Ff(c)?c.pipe(O):O.end(c),c=O}let p=await this.makeRequest(e,r,c);o!==void 0&&clearTimeout(o);let A=GGe(p),b={status:p.statusCode??0,headers:A,request:e};if(e.method==="HEAD")return p.resume(),b;u=a?HGe(p,A):p;let M=e.onDownloadProgress;if(M){let z=new u3(M);z.on("error",O=>{Bn.error("Error in download progress",O)}),u.pipe(z),u=z}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(b.status)?b.readableStreamBody=u:b.bodyAsText=await XGe(u),b}finally{if(e.abortSignal&&n){let p=Promise.resolve();Ff(c)&&(p=$1e(c));let A=Promise.resolve();Ff(u)&&(A=$1e(u)),Promise.all([p,A]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{Bn.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let o=new URL(e.url),s=o.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,s),hostname:o.hostname,path:`${o.pathname}${o.search}`,port:o.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((u,p)=>{let A=s?a3.default.request(c,u):c3.default.request(c,u);A.once("error",l=>{p(new _t(l.message,{code:l.code??_t.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new as("The operation was aborted. Rejecting from abort signal callback while making request.");A.destroy(l),p(l)}),n&&Ff(n)?n.pipe(A):n?typeof n=="string"||Buffer.isBuffer(n)?A.end(n):K1e(n)?A.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Bn.error("Unrecognized body type",n),p(new _t("Unrecognized body type"))):A.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?a3.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new a3.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return c3.default.globalAgent;let o=e.tlsSettings??UGe,s=this.cachedHttpsAgents.get(o);return s&&s.options.keepAlive===!n||(Bn.info("No cached TLS Agent exist, creating a new Agent"),s=new c3.default.Agent({keepAlive:!n,...o}),this.cachedHttpsAgents.set(o,s)),s}}};function GGe(t){let e=Gr();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}i(GGe,"getResponseHeaders");function HGe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=z6.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=z6.default.createInflate();return t.pipe(n),n}return t}i(HGe,"getDecodedResponseStream");function XGe(t){return new Promise((e,r)=>{let n=[];t.on("data",o=>{Buffer.isBuffer(o)?n.push(o):n.push(Buffer.from(o))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",o=>{o&&o?.name==="AbortError"?r(o):r(new _t(`Error reading response as text: ${o.message}`,{code:_t.PARSE_ERROR}))})})}i(XGe,"streamToText");function VGe(t){return t?Buffer.isBuffer(t)?t.length:
Line truncated
|
|
|
|
|
`;return e}i(yXe,"encodeHeaders");function BXe(t){return t instanceof Uint8Array?t.byteLength:F3(t)?t.size===-1?void 0:t.size:void 0}i(BXe,"getLength");function qXe(t){let e=0;for(let r of t){let n=BXe(r);if(n===void 0)return;e+=n}return e}i(qXe,"getTotalLength");async function DXe(t,e,r){let n=[sr(`--${r}`,"utf-8"),...e.flatMap(s=>[sr(`\r
|
|
|
|
|
`,"utf-8"),sr(yXe(s.headers),"utf-8"),sr(`\r
|
|
|
|
|
`,"utf-8"),s.body,sr(`\r
|
|
|
|
|
--${r}`,"utf-8")]),sr(`--\r
|
|
|
|
|
\r
|
|
|
|
|
`,"utf-8")],o=VHe(n);o&&t.headers.set("Content-Length",o),t.body=await Xte(n)}i(YHe,"buildRequestBody");var SM="multipartPolicy",JHe=70,jHe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function $He(t){if(t.length>JHe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!jHe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}i($He,"assertValidBoundary");function w3(){return{name:SM,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",o=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!o)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,s,a]=o;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?$He(r):r=GHe(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await YHe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}i(w3,"multipartPolicy");function S3(){return t3()}i(S3,"createEmptyPipeline");var Vte=Kg({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Ov0=Vte.logger;function cs(t){return Vte.createClientLogger(t)}i(cs,"createClientLogger");var us=cs("core-rest-pipeline");function R6(t={}){return a3({logger:us.info,...t})}i(R6,"logPolicy");var N6=c3;function w6(t={}){return u3(t)}i(w6,"redirectPolicy");var F3=w(require("node:os"),1),W3=w(require("node:process"),1);function Yte(){return"User-Agent"}i(Yte,"getHeaderName");async function Jte(t){if(W3.default&&W3.default.versions){let e=`${F3.default.type()} ${F3.default.release()}; ${F3.default.arch()}`,r=W3.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}i(Jte,"setPlatformSpecificData");var x3="1.22.2";function sXe(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join(" ")}i(sXe,"getUserAgentString");function jte(){return Yte()}i(jte,"getUserAgentHeaderName");async function T3(t){let e=new Map;e.set("core-rest-pipeline",x3),await Jte(e);let r=sXe(e);return t?`${t} ${r}`:r}i(T3,"getUserAgentValue");var $te=jte(),Kte="userAgentPolicy";function S6(t={}){let e=T3(t.userAgentPrefix);return{name:Kte,async sendRequest(r,n){return r.headers.has($te)||r.headers.set($te,await e),n(r)}}}i(S6,"userAgentPolicy");var Vr=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function F6(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((s,a)=>{function c(){a(new Vr(o??"The operation was aborted."))}i(c,"rejectOnAbort");function u(){n?.removeEventListener("abort",p)}i(u,"removeListeners");function p(){r?.(),u(),c()}if(i(p,"onAbort"),n?.aborted)return c();try{t(A=>{u(),s(A)},A=>{u(),a(A)})}catch(A){a(A)}n?.addEventListener("abort",p)})}i(F6,"createAbortablePromise");var pXe="The delay was aborted.";function FM(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return F6(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:i(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??pXe})}i(FM,"delay");function sc(t){if(Wu(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}i(sc,"getErrorMessage");function Zte(t){return Wu(t)}i(Zte,"isError");function Nl(){return Fu()}i(Nl,"randomUUID");var l0=vu;var ere=Symbol("rawContent");function x6(t){return typeof t[ere]=="function"}i(x6,"hasRawContent");function tre(t){return x6(t)?t[ere]():t}i(tre,"getRawContent");var v3=SM;function T6(){let t=w3();return{name:v3,sendRequest:i(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)x6(n.body)&&(n.body=tre(n.body));return t.sendRequest(e,r)},"sendRequest")}}i(T6,"multipartPolicy");var v6=p3;function L6(){return A3()}i(L6,"decompressResponsePolicy");function Q6(t={}){return b3(t)}i(Q6,"defaultRetryPolicy");function _6(){return M3()}i(_6,"formDataPolicy");function ic(t){return y6(t)}i(ic,"getDefaultProxySettings");function P6(t,e){return q3(t,e)}i(P6,"proxyPolicy");var rre="setClientRequestIdPolicy";function k6(t="x-ms-client-request-id"){return{name:rre,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}i(k6,"setClientRequestIdPolicy");function U6(t){return D3(t)}i(U6,"agentPolicy");function G6(t){return I3(t)}i(G6,"tlsPolicy");var wl={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function nre(t={}){let e=new H6(t.parentContext);return t.span&&(e=e.setValue(wl.span,t.span)),t.namespace&&(e=e.setValue(wl.namespace,t.namespace)),e}i(nre,"createTracingContext");var H6=class t{static{i(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e i
Line truncated
|
|
|
|
|
`&&t[s]!=="\r";s++)u+=t[s];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),s--),!WVe(u)){let l;return u.trim().length===0?l="Invalid space after '<'.":l="Tag '"+u+"' is an invalid name.",O1("InvalidTag",l,Pt(t,s))}let p=RVe(t,s);if(p===!1)return O1("InvalidAttr","Attributes for '"+u+"' have open quote.",Pt(t,s));let A=p.value;if(s=p.index,A[A.length-1]==="/"){let l=s-A.length;A=A.substring(0,A.length-1);let b=_re(A,e);if(b===!0)n=!0;else return O1(b.err.code,b.err.msg,Pt(t,l+b.err.line))}else if(c)if(p.tagClosed){if(A.trim().length>0)return O1("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Pt(t,a));if(r.length===0)return O1("InvalidTag","Closing tag '"+u+"' has not been opened.",Pt(t,a));{let l=r.pop();if(u!==l.tagName){let b=Pt(t,l.tagStartPos);return O1("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+b.line+", col "+b.col+") instead of closing tag '"+u+"'.",Pt(t,a))}r.length==0&&(o=!0)}}else return O1("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Pt(t,s));else{let l=_re(A,e);if(l!==!0)return O1(l.err.code,l.err.msg,Pt(t,s-A.length+l.err.line));if(o===!0)return O1("InvalidXml","Multiple possible root nodes found.",Pt(t,s));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),n=!0}for(s++;s<t.length;s++)if(t[s]==="<")if(t[s+1]==="!"){s++,s=Qre(t,s);continue}else if(t[s+1]==="?"){if(s=Lre(t,++s),s.err)return s}else break;else if(t[s]==="&"){let l=SVe(t,s);if(l==-1)return O1("InvalidChar","char '&' is not expected.",Pt(t,s));s=l}else if(o===!0&&!vre(t[s]))return O1("InvalidXml","Extra text at the end",Pt(t,s));t[s]==="<"&&s--}}else{if(vre(t[s]))continue;return O1("InvalidChar","char '"+t[s]+"' is not expected.",Pt(t,s))}if(n){if(r.length==1)return O1("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Pt(t,r[0].tagStartPos));if(r.length>0)return O1("InvalidXml","Invalid '"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return O1("InvalidXml","Start tag expected.",1);return!0}i(j3,"validate");function vre(t){return t===" "||t===" "||t===`
|
|
|
|
|
`||t==="\r"}i(vre,"isWhiteSpace");function Lre(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return O1("InvalidXml","XML declaration allowed only at the start of the document.",Pt(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}i(Lre,"readPI");function Qre(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}i(Qre,"readCommentAndCDATA");var DVe='"',IVe="'";function RVe(t,e){let r="",n="",o=!1;for(;e<t.length;e++){if(t[e]===DVe||t[e]===IVe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){o=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:o}}i(RVe,"readAttributeStr");var NVe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function _re(t,e){let r=Y3(t,NVe),n={};for(let o=0;o<r.length;o++){if(r[o][1].length===0)return O1("InvalidAttr","Attribute '"+r[o][2]+"' has no space in starting.",HM(r[o]));if(r[o][3]!==void 0&&r[o][4]===void 0)return O1("InvalidAttr","Attribute '"+r[o][2]+"' is without value.",HM(r[o]));if(r[o][3]===void 0&&!e.allowBooleanAttributes)return O1("InvalidAttr","boolean attribute '"+r[o][2]+"' is not allowed.",HM(r[o]));let s=r[o][2];if(!FVe(s))return O1("InvalidAttr","Attribute '"+s+"' is an invalid name.",HM(r[o]));if(!Object.prototype.hasOwnProperty.call(n,s))n[s]=1;else return O1("InvalidAttr","Attribute '"+s+"' is repeated.",HM(r[o]))}return!0}i(_re,"validateAttributeString");function wVe(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}i(wVe,"validateNumberAmpersand");function SVe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,wVe(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}i(SVe,"validateAmpersand");function O1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}i(O1,"getErrorObject");function FVe(t){return uS(t)}i(FVe,"validateAttrName");function WVe(t){return uS(t)}i(WVe,"validateTagName");function Pt(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}i(Pt,"getLineNumberForPosition");function HM(t){return t.startIndex+t[1].length}i(HM,"getPositionFromMatch");var Pre={amp:"&",AMP:"&",lt:"<",LT:"<",gt:">",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},kre={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},Ure={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\Line truncated
|
|
|
|
|
`);let e=new ur("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let o=this.options,s=new YM(o.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let p=t.charCodeAt(c+1);if(p===47){let A=Tl(t,">",c,"Closing Tag is not closed."),l=t.substring(c+2,A).trim();if(o.removeNSPrefix){let f=l.indexOf(":");f!==-1&&(l=l.substr(f+1))}l=mS(o.transformTagName,l,"",o).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let b=this.matcher.getCurrentTag();if(l&&o.unpairedTagsSet.has(l))throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);b&&o.unpairedTagsSet.has(b)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=A}else if(p===63){let A=hS(t,c,!1,"?>");if(!A)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let l=this.buildAttributesMap(A.tagExp,this.matcher,A.tagName,!0);if(l){let b=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(b)||1),s.setXmlVersion(Number(b)||1)}if(!(o.ignoreDeclaration&&A.tagName==="?xml"||o.ignorePiTags)){let b=new ur(A.tagName);b.add(o.textNodeName,""),A.tagName!==A.tagExp&&A.attrExpPresent&&o.ignoreAttributes!==!0&&(b[":@"]=l),this.addChild(r,b,this.readonlyMatcher,c)}c=A.closeIndex+1}else if(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let A=Tl(t,"-->",c+4,"Comment is not closed.");if(o.commentPropName){let l=t.substring(c+4,A-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(o.commentPropName,[{[o.textNodeName]:l}])}c=A}else if(p===33&&t.charCodeAt(c+2)===68){let A=s.readDocType(t,c);this.entityDecoder.addInputEntities(A.entities),c=A.i}else if(p===33&&t.charCodeAt(c+2)===91){let A=Tl(t,"]]>",c,"CDATA is not closed.")-2,l=t.substring(c+9,A);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let b=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);b==null&&(b=""),o.cdataPropName?r.add(o.cdataPropName,[{[o.textNodeName]:l}]):r.add(o.textNodeName,b),c=A+2}else{let A=hS(t,c,o.removeNSPrefix);if(!A){let x=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${x}"`)}let l=A.tagName,b=A.rawTagName,f=A.tagExp,z=A.attrExpPresent,g=A.closeIndex;if({tagName:l,tagExp:f}=mS(o.transformTagName,l,f,o),o.strictReservedNames&&(l===o.commentPropName||l===o.cdataPropName||l===o.textNodeName||l===o.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let y=r;y&&o.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(E=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),f=l):f=f.substr(0,f.length-1),z=l!==f);let B=null,q={},I;I=nYe(b),l!==e.tagname&&this.matcher.push(l,{},I),l!==f&&z&&(B=this.buildAttributesMap(f,this.matcher,l),B&&(q=rYe(B,o))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let W=c;if(this.isCurrentNodeStopNode){let x="";if(E)c=A.closeIndex;else if(o.unpairedTagsSet.has(l))c=A.closeIndex;else{let ue=this.readStopNodeData(t,b,g+1);if(!ue)throw new Error(`Unexpected end of ${b}`);c=ue.i,x=ue.tagContent}let Q=new ur(l);B&&(Q[":@"]=B),Q.add(o.textNodeName,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,Q,this.readonlyMatcher,W)}else{if(E){({tagName:l,tagExp:f}=mS(o.transformTagName,l,f,o));let x=new ur(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,W),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(o.unpairedTagsSet.has(l)){let x=new ur(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,W),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=A.closeIndex;continue}else{let x=new ur(l);if(this.tagsNodeStack.length>o.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,W),r=x}n="",c=g}}}else n+=t[c];return e.child},"parseXml");function uYe(t,e,r,n){this.options.captureMetaData||(n=void 0);let o=this.options.jPath?r.toString():r,s=this.options.updateTag(e.tagname,o,e[":@"]);s===!1||(typeof s=="string"&&(e.tagname=s),t.addChild(e,n))}i(uYe,"addChild");function pYe(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let o=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,o)))return t}if(n.tagFilter){let o=this.options.jPath?r.toString():r;if(!n.tagFilter(e,o))return t}return this.entityDecoder.decode(t)}i(pYe,"replaceEntitiesValue");function AYe(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}i(AYe,"saveTextToParentTag");function lYe(){return this.stopNodeExpressionsLine truncated
|
|
|
|
|
`;function gYe(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(yS(r)==="?xml"){let o=r[":@"];if(o){let s=e.attributeNamePrefix+"version";if(o[s])return o[s]}}return"1.0"}i(gYe,"detectXmlVersionFromArray");function une(t,e,r,n,o){return!r.sanitizeName||ku(t,{xmlVersion:o})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}i(une,"resolveTagName");function CS(t,e){let r="";e.format&&(r=OYe);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let c=e.stopNodes[a];typeof c=="string"?n.push(new jr(c)):c instanceof jr&&n.push(c)}let o=gYe(t,e),s=new ls;return pne(t,e,r,s,n,o)}i(CS,"toXml");function pne(t,e,r,n,o,s){let a="",c=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let u=t.toString();return u=ES(u,e),u}return""}for(let u=0;u<t.length;u++){let p=t[u],A=yS(p);if(A===void 0)continue;let b=A===e.textNodeName||A===e.cdataPropName||A===e.commentPropName||A[0]==="?"?A:une(A,!1,e,n,s),f=EYe(p[":@"],e);n.push(b,f);let z=yYe(n,o);if(b===e.textNodeName){let q=p[A];z||(q=e.tagValueProcessor(b,q),q=ES(q,e)),c&&(a+=r),a+=q,c=!1,n.pop();continue}else if(b===e.cdataPropName){c&&(a+=r);let q=p[A][0][e.textNodeName],I=tE(q);a+=`<![CDATA[${I}]]>`,c=!1,n.pop();continue}else if(b===e.commentPropName){let q=p[A][0][e.textNodeName],I=eE(q);a+=r+`<!--${I}-->`,c=!0,n.pop();continue}else if(b[0]==="?"){let q=cne(p[":@"],e,z,n,s);a+=(b==="?xml"?"":r)+`<${b}${q}?>`,c=!0,n.pop();continue}let g=r;g!==""&&(g+=e.indentBy);let y=cne(p[":@"],e,z,n,s),E=r+`<${b}${y}`,B;z?B=Ane(p[A],e):B=pne(p[A],e,g,n,o,s),e.unpairedTags.indexOf(b)!==-1?e.suppressUnpairedNode?a+=E+">":a+=E+"/>":(!B||B.length===0)&&e.suppressEmptyNode?a+=E+"/>":B&&B.endsWith(">")?a+=E+`>${B}${r}</${b}>`:(a+=E+">",B&&r!==""&&(B.includes("/>")||B.includes("</"))?a+=r+e.indentBy+B+r:a+=B,a+=`</${b}>`),c=!0,n.pop()}return a}i(pne,"arrToStr");function EYe(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let s=o.startsWith(e.attributeNamePrefix)?o.substr(e.attributeNamePrefix.length):o;r[s]=uc(t[o]),n=!0}return n?r:null}i(EYe,"extractAttributeValues");function Ane(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let o=t[n],s=yS(o);if(s===e.textNodeName)r+=o[s];else if(s===e.cdataPropName)r+=o[s][0][e.textNodeName];else if(s===e.commentPropName)r+=o[s][0][e.textNodeName];else{if(s&&s[0]==="?")continue;if(s){let a=CYe(o[":@"],e),c=Ane(o[s],e);!c||c.length===0?r+=`<${s}${a}/>`:r+=`<${s}${a}>${c}</${s}>`}}}return r}i(Ane,"getRawContent");function CYe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let o=t[n];o===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${uc(o)}"`}return r}i(CYe,"attr_to_str_raw");function yS(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let n=e[r];if(Object.prototype.hasOwnProperty.call(t,n)&&n!==":@")return n}}i(yS,"propName");function cne(t,e,r,n,o){let s="";if(t&&!e.ignoreAttributes)for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=a.substr(e.attributeNamePrefix.length),u=r?c:une(c,!0,e,n,o),p;r?p=t[a]:(p=e.attributeValueProcessor(a,t[a]),p=ES(p,e)),p===!0&&e.suppressBooleanAttributes?s+=` ${u}`:s+=` ${u}="${uc(p)}"`}return s}i(cne,"attr_to_str");function yYe(t,e){if(!e||e.length===0)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}i(yYe,"checkStopNode");function ES(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let n=e.entities[r];t=t.replace(n.regex,n.val)}return t}i(ES,"replaceEntitiesValue");function BS(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}i(BS,"getIgnoreAttributesFn");var BYe={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:i(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:i(function(t,e){return e},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function Ar(t){if(this.options=Object.assign({},BYe,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&ArraLine truncated
|
|
|
|
|
`,"utf-8")],o=qXe(n);o&&t.headers.set("Content-Length",o),t.body=await rre(n)}i(DXe,"buildRequestBody");var Tf="multipartPolicy",IXe=70,RXe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function NXe(t){if(t.length>IXe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!RXe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}i(NXe,"assertValidBoundary");function x3(){return{name:Tf,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",o=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!o)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,s,a]=o;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?NXe(r):r=CXe(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await DXe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}i(x3,"multipartPolicy");function T3(){return s3()}i(T3,"createEmptyPipeline");var nre=r3({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),nL0=nre.logger;function ps(t){return nre.createClientLogger(t)}i(ps,"createClientLogger");var As=ps("core-rest-pipeline");function Q6(t={}){return A3({logger:As.info,...t})}i(Q6,"logPolicy");var _6=l3;function P6(t={}){return d3(t)}i(P6,"redirectPolicy");var v3=w(require("node:os"),1),L3=w(require("node:process"),1);function ore(){return"User-Agent"}i(ore,"getHeaderName");async function sre(t){if(L3.default&&L3.default.versions){let e=`${v3.default.type()} ${v3.default.release()}; ${v3.default.arch()}`,r=L3.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}i(sre,"setPlatformSpecificData");var Q3="1.22.2";function LXe(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join(" ")}i(LXe,"getUserAgentString");function ire(){return ore()}i(ire,"getUserAgentHeaderName");async function _3(t){let e=new Map;e.set("core-rest-pipeline",Q3),await sre(e);let r=LXe(e);return t?`${t} ${r}`:r}i(_3,"getUserAgentValue");var are=ire(),cre="userAgentPolicy";function k6(t={}){let e=_3(t.userAgentPrefix);return{name:cre,async sendRequest(r,n){return r.headers.has(are)||r.headers.set(are,await e),n(r)}}}i(k6,"userAgentPolicy");var Yr=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function U6(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((s,a)=>{function c(){a(new Yr(o??"The operation was aborted."))}i(c,"rejectOnAbort");function u(){n?.removeEventListener("abort",p)}i(u,"removeListeners");function p(){r?.(),u(),c()}if(i(p,"onAbort"),n?.aborted)return c();try{t(A=>{u(),s(A)},A=>{u(),a(A)})}catch(A){a(A)}n?.addEventListener("abort",p)})}i(U6,"createAbortablePromise");var UXe="The delay was aborted.";function vf(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return U6(s=>{r=setTimeout(s,t)},{cleanupBeforeAbort:i(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??UXe})}i(vf,"delay");function ic(t){if(xu(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknown error ${e}`}}i(ic,"getErrorMessage");function ure(t){return xu(t)}i(ure,"isError");function Sl(){return Wu()}i(Sl,"randomUUID");var l0=Lu;var pre=Symbol("rawContent");function H6(t){return typeof t[pre]=="function"}i(H6,"hasRawContent");function Are(t){return H6(t)?t[pre]():t}i(Are,"getRawContent");var P3=Tf;function X6(){let t=x3();return{name:P3,sendRequest:i(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)H6(n.body)&&(n.body=Are(n.body));return t.sendRequest(e,r)},"sendRequest")}}i(X6,"multipartPolicy");var V6=b3;function Y6(){return f3()}i(Y6,"decompressResponsePolicy");function J6(t={}){return m3(t)}i(J6,"defaultRetryPolicy");function $6(){return z3()}i($6,"formDataPolicy");function ac(t){return W6(t)}i(ac,"getDefaultProxySettings");function j6(t,e){return N3(t,e)}i(j6,"proxyPolicy");var lre="setClientRequestIdPolicy";function K6(t="x-ms-client-request-id"){return{name:lre,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}i(K6,"setClientRequestIdPolicy");function Z6(t){return w3(t)}i(Z6,"agentPolicy");function eS(t){return S3(t)}i(eS,"tlsPolicy");var Fl={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function dre(t={}){let e=new tS(t.parentContext);return t.span&&(e=e.setValue(Fl.span,t.span)),t.namespace&&(e=e.setValue(Fl.namespace,t.namespace)),e}i(dre,"createTracingContext");var tS=class t{static{i(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e i
Line truncated
|
|
|
|
|
`&&t[s]!=="\r";s++)u+=t[s];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),s--),!dYe(u)){let l;return u.trim().length===0?l="Invalid space after '<'.":l="Tag '"+u+"' is an invalid name.",g1("InvalidTag",l,Pt(t,s))}let p=cYe(t,s);if(p===!1)return g1("InvalidAttr","Attributes for '"+u+"' have open quote.",Pt(t,s));let A=p.value;if(s=p.index,A[A.length-1]==="/"){let l=s-A.length;A=A.substring(0,A.length-1);let b=$re(A,e);if(b===!0)n=!0;else return g1(b.err.code,b.err.msg,Pt(t,l+b.err.line))}else if(c)if(p.tagClosed){if(A.trim().length>0)return g1("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",Pt(t,a));if(r.length===0)return g1("InvalidTag","Closing tag '"+u+"' has not been opened.",Pt(t,a));{let l=r.pop();if(u!==l.tagName){let b=Pt(t,l.tagStartPos);return g1("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+b.line+", col "+b.col+") instead of closing tag '"+u+"'.",Pt(t,a))}r.length==0&&(o=!0)}}else return g1("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",Pt(t,s));else{let l=$re(A,e);if(l!==!0)return g1(l.err.code,l.err.msg,Pt(t,s-A.length+l.err.line));if(o===!0)return g1("InvalidXml","Multiple possible root nodes found.",Pt(t,s));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),n=!0}for(s++;s<t.length;s++)if(t[s]==="<")if(t[s+1]==="!"){s++,s=Jre(t,s);continue}else if(t[s+1]==="?"){if(s=Yre(t,++s),s.err)return s}else break;else if(t[s]==="&"){let l=AYe(t,s);if(l==-1)return g1("InvalidChar","char '&' is not expected.",Pt(t,s));s=l}else if(o===!0&&!Vre(t[s]))return g1("InvalidXml","Extra text at the end",Pt(t,s));t[s]==="<"&&s--}}else{if(Vre(t[s]))continue;return g1("InvalidChar","char '"+t[s]+"' is not expected.",Pt(t,s))}if(n){if(r.length==1)return g1("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Pt(t,r[0].tagStartPos));if(r.length>0)return g1("InvalidXml","Invalid '"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return g1("InvalidXml","Start tag expected.",1);return!0}i(eE,"validate");function Vre(t){return t===" "||t===" "||t===`
|
|
|
|
|
`||t==="\r"}i(Vre,"isWhiteSpace");function Yre(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return g1("InvalidXml","XML declaration allowed only at the start of the document.",Pt(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}i(Yre,"readPI");function Jre(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}i(Jre,"readCommentAndCDATA");var iYe='"',aYe="'";function cYe(t,e){let r="",n="",o=!1;for(;e<t.length;e++){if(t[e]===iYe||t[e]===aYe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){o=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:o}}i(cYe,"readAttributeStr");var uYe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function $re(t,e){let r=K3(t,uYe),n={};for(let o=0;o<r.length;o++){if(r[o][1].length===0)return g1("InvalidAttr","Attribute '"+r[o][2]+"' has no space in starting.",Jf(r[o]));if(r[o][3]!==void 0&&r[o][4]===void 0)return g1("InvalidAttr","Attribute '"+r[o][2]+"' is without value.",Jf(r[o]));if(r[o][3]===void 0&&!e.allowBooleanAttributes)return g1("InvalidAttr","boolean attribute '"+r[o][2]+"' is not allowed.",Jf(r[o]));let s=r[o][2];if(!lYe(s))return g1("InvalidAttr","Attribute '"+s+"' is an invalid name.",Jf(r[o]));if(!Object.prototype.hasOwnProperty.call(n,s))n[s]=1;else return g1("InvalidAttr","Attribute '"+s+"' is repeated.",Jf(r[o]))}return!0}i($re,"validateAttributeString");function pYe(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}i(pYe,"validateNumberAmpersand");function AYe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,pYe(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}i(AYe,"validateAmpersand");function g1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}i(g1,"getErrorObject");function lYe(t){return zS(t)}i(lYe,"validateAttrName");function dYe(t){return zS(t)}i(dYe,"validateTagName");function Pt(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}i(Pt,"getLineNumberForPosition");function Jf(t){return t.startIndex+t[1].length}i(Jf,"getPositionFromMatch");var jre={amp:"&",AMP:"&",lt:"<",LT:"<",gt:">",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},Kre={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},Zre={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\Line truncated
|
|
|
|
|
`);let e=new ur("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let o=this.options,s=new Kf(o.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let p=t.charCodeAt(c+1);if(p===47){let A=Ll(t,">",c,"Closing Tag is not closed."),l=t.substring(c+2,A).trim();if(o.removeNSPrefix){let M=l.indexOf(":");M!==-1&&(l=l.substr(M+1))}l=DS(o.transformTagName,l,"",o).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let b=this.matcher.getCurrentTag();if(l&&o.unpairedTagsSet.has(l))throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);b&&o.unpairedTagsSet.has(b)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=A}else if(p===63){let A=IS(t,c,!1,"?>");if(!A)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let l=this.buildAttributesMap(A.tagExp,this.matcher,A.tagName,!0);if(l){let b=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(b)||1),s.setXmlVersion(Number(b)||1)}if(!(o.ignoreDeclaration&&A.tagName==="?xml"||o.ignorePiTags)){let b=new ur(A.tagName);b.add(o.textNodeName,""),A.tagName!==A.tagExp&&A.attrExpPresent&&o.ignoreAttributes!==!0&&(b[":@"]=l),this.addChild(r,b,this.readonlyMatcher,c)}c=A.closeIndex+1}else if(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let A=Ll(t,"-->",c+4,"Comment is not closed.");if(o.commentPropName){let l=t.substring(c+4,A-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(o.commentPropName,[{[o.textNodeName]:l}])}c=A}else if(p===33&&t.charCodeAt(c+2)===68){let A=s.readDocType(t,c);this.entityDecoder.addInputEntities(A.entities),c=A.i}else if(p===33&&t.charCodeAt(c+2)===91){let A=Ll(t,"]]>",c,"CDATA is not closed.")-2,l=t.substring(c+9,A);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let b=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);b==null&&(b=""),o.cdataPropName?r.add(o.cdataPropName,[{[o.textNodeName]:l}]):r.add(o.textNodeName,b),c=A+2}else{let A=IS(t,c,o.removeNSPrefix);if(!A){let x=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${x}"`)}let l=A.tagName,b=A.rawTagName,M=A.tagExp,z=A.attrExpPresent,O=A.closeIndex;if({tagName:l,tagExp:M}=DS(o.transformTagName,l,M,o),o.strictReservedNames&&(l===o.commentPropName||l===o.cdataPropName||l===o.textNodeName||l===o.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let y=r;y&&o.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;M.length>0&&M.lastIndexOf("/")===M.length-1&&(E=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),M=l):M=M.substr(0,M.length-1),z=l!==M);let B=null,q={},I;I=TYe(b),l!==e.tagname&&this.matcher.push(l,{},I),l!==M&&z&&(B=this.buildAttributesMap(M,this.matcher,l),B&&(q=xYe(B,o))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let W=c;if(this.isCurrentNodeStopNode){let x="";if(E)c=A.closeIndex;else if(o.unpairedTagsSet.has(l))c=A.closeIndex;else{let ue=this.readStopNodeData(t,b,O+1);if(!ue)throw new Error(`Unexpected end of ${b}`);c=ue.i,x=ue.tagContent}let L=new ur(l);B&&(L[":@"]=B),L.add(o.textNodeName,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,L,this.readonlyMatcher,W)}else{if(E){({tagName:l,tagExp:M}=DS(o.transformTagName,l,M,o));let x=new ur(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,W),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(o.unpairedTagsSet.has(l)){let x=new ur(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,W),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=A.closeIndex;continue}else{let x=new ur(l);if(this.tagsNodeStack.length>o.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,W),r=x}n="",c=O}}}else n+=t[c];return e.child},"parseXml");function kYe(t,e,r,n){this.options.captureMetaData||(n=void 0);let o=this.options.jPath?r.toString():r,s=this.options.updateTag(e.tagname,o,e[":@"]);s===!1||(typeof s=="string"&&(e.tagname=s),t.addChild(e,n))}i(kYe,"addChild");function UYe(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let o=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,o)))return t}if(n.tagFilter){let o=this.options.jPath?r.toString():r;if(!n.tagFilter(e,o))return t}return this.entityDecoder.decode(t)}i(UYe,"replaceEntitiesValue");function GYe(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}i(GYe,"saveTextToParentTag");function HYe(){return this.stopNodeExpressionsLine truncated
|
|
|
|
|
`;function eJe(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(WS(r)==="?xml"){let o=r[":@"];if(o){let s=e.attributeNamePrefix+"version";if(o[s])return o[s]}}return"1.0"}i(eJe,"detectXmlVersionFromArray");function zne(t,e,r,n,o){return!r.sanitizeName||Uu(t,{xmlVersion:o})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}i(zne,"resolveTagName");function FS(t,e){let r="";e.format&&(r=ZYe);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let c=e.stopNodes[a];typeof c=="string"?n.push(new jr(c)):c instanceof jr&&n.push(c)}let o=eJe(t,e),s=new bs;return gne(t,e,r,s,n,o)}i(FS,"toXml");function gne(t,e,r,n,o,s){let a="",c=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let u=t.toString();return u=SS(u,e),u}return""}for(let u=0;u<t.length;u++){let p=t[u],A=WS(p);if(A===void 0)continue;let b=A===e.textNodeName||A===e.cdataPropName||A===e.commentPropName||A[0]==="?"?A:zne(A,!1,e,n,s),M=tJe(p[":@"],e);n.push(b,M);let z=nJe(n,o);if(b===e.textNodeName){let q=p[A];z||(q=e.tagValueProcessor(b,q),q=SS(q,e)),c&&(a+=r),a+=q,c=!1,n.pop();continue}else if(b===e.cdataPropName){c&&(a+=r);let q=p[A][0][e.textNodeName],I=sE(q);a+=`<![CDATA[${I}]]>`,c=!1,n.pop();continue}else if(b===e.commentPropName){let q=p[A][0][e.textNodeName],I=oE(q);a+=r+`<!--${I}-->`,c=!0,n.pop();continue}else if(b[0]==="?"){let q=mne(p[":@"],e,z,n,s);a+=(b==="?xml"?"":r)+`<${b}${q}?>`,c=!0,n.pop();continue}let O=r;O!==""&&(O+=e.indentBy);let y=mne(p[":@"],e,z,n,s),E=r+`<${b}${y}`,B;z?B=One(p[A],e):B=gne(p[A],e,O,n,o,s),e.unpairedTags.indexOf(b)!==-1?e.suppressUnpairedNode?a+=E+">":a+=E+"/>":(!B||B.length===0)&&e.suppressEmptyNode?a+=E+"/>":B&&B.endsWith(">")?a+=E+`>${B}${r}</${b}>`:(a+=E+">",B&&r!==""&&(B.includes("/>")||B.includes("</"))?a+=r+e.indentBy+B+r:a+=B,a+=`</${b}>`),c=!0,n.pop()}return a}i(gne,"arrToStr");function tJe(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let s=o.startsWith(e.attributeNamePrefix)?o.substr(e.attributeNamePrefix.length):o;r[s]=pc(t[o]),n=!0}return n?r:null}i(tJe,"extractAttributeValues");function One(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let o=t[n],s=WS(o);if(s===e.textNodeName)r+=o[s];else if(s===e.cdataPropName)r+=o[s][0][e.textNodeName];else if(s===e.commentPropName)r+=o[s][0][e.textNodeName];else{if(s&&s[0]==="?")continue;if(s){let a=rJe(o[":@"],e),c=One(o[s],e);!c||c.length===0?r+=`<${s}${a}/>`:r+=`<${s}${a}>${c}</${s}>`}}}return r}i(One,"getRawContent");function rJe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let o=t[n];o===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${pc(o)}"`}return r}i(rJe,"attr_to_str_raw");function WS(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let n=e[r];if(Object.prototype.hasOwnProperty.call(t,n)&&n!==":@")return n}}i(WS,"propName");function mne(t,e,r,n,o){let s="";if(t&&!e.ignoreAttributes)for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=a.substr(e.attributeNamePrefix.length),u=r?c:zne(c,!0,e,n,o),p;r?p=t[a]:(p=e.attributeValueProcessor(a,t[a]),p=SS(p,e)),p===!0&&e.suppressBooleanAttributes?s+=` ${u}`:s+=` ${u}="${pc(p)}"`}return s}i(mne,"attr_to_str");function nJe(t,e){if(!e||e.length===0)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}i(nJe,"checkStopNode");function SS(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let n=e.entities[r];t=t.replace(n.regex,n.val)}return t}i(SS,"replaceEntitiesValue");function xS(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}i(xS,"getIgnoreAttributesFn");var oJe={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:i(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:i(function(t,e){return e},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function Ar(t){if(this.options=Object.assign({},oJe,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&ArraLine truncated
|
|
|
|
|
`,this.newLine=`
|
|
|
|
|
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}i(Ar,"Builder");function qYe(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let o=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(o)return o}let n=r[e.attributeNamePrefix+"version"];if(n)return n}return"1.0"}i(qYe,"detectXmlVersionFromObj");function qS(t,e,r,n,o){return!r.sanitizeName||ku(t,{xmlVersion:o})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}i(qS,"resolveTagName");Ar.prototype.build=function(t){if(this.options.preserveOrder)return CS(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new ls,r=qYe(t,this.options);return this.j2x(t,0,e,r).val}};Ar.prototype.j2x=function(t,e,r,n){let o="",s="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let a=this.options.jPath?r.toString():r,c=this.checkStopNode(r);for(let u in t){if(!Object.prototype.hasOwnProperty.call(t,u))continue;let A=u===this.options.textNodeName||u===this.options.cdataPropName||u===this.options.commentPropName||this.options.attributesGroupName&&u===this.options.attributesGroupName||this.isAttribute(u)||u[0]==="?"?u:qS(u,!1,this.options,r,n);if(typeof t[u]>"u")this.isAttribute(u)&&(s+="");else if(t[u]===null)this.isAttribute(u)||A===this.options.cdataPropName||A===this.options.commentPropName?s+="":A[0]==="?"?s+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(t[u]instanceof Date)s+=this.buildTextValNode(t[u],A,"",e,r);else if(typeof t[u]!="object"){let l=this.isAttribute(u);if(l&&!this.ignoreAttributesFn(l,a)){let b=qS(l,!0,this.options,r,n);o+=this.buildAttrPairStr(b,""+t[u],c)}else if(!l)if(u===this.options.textNodeName){let b=this.options.tagValueProcessor(u,""+t[u]);s+=this.replaceEntitiesValue(b)}else{r.push(A);let b=this.checkStopNode(r);if(r.pop(),b){let f=""+t[u];f===""?s+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:s+=this.indentate(e)+"<"+A+">"+f+"</"+A+this.tagEndChar}else s+=this.buildTextValNode(t[u],A,"",e,r)}}else if(Array.isArray(t[u])){let l=t[u].length,b="",f="";for(let z=0;z<l;z++){let g=t[u][z];if(!(typeof g>"u"))if(g===null)A[0]==="?"?s+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(typeof g=="object")if(this.options.oneListGroup){r.push(A);let y=this.j2x(g,e+1,r,n);r.pop(),b+=y.val,this.options.attributesGroupName&&g.hasOwnProperty(this.options.attributesGroupName)&&(f+=y.attrStr)}else b+=this.processTextOrObjNode(g,A,e,r,n);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(A,g);y=this.replaceEntitiesValue(y),b+=y}else{r.push(A);let y=this.checkStopNode(r);if(r.pop(),y){let E=""+g;E===""?b+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:b+=this.indentate(e)+"<"+A+">"+E+"</"+A+this.tagEndChar}else b+=this.buildTextValNode(g,A,"",e,r)}}this.options.oneListGroup&&(b=this.buildObjectNode(b,A,f,e)),s+=b}else if(this.options.attributesGroupName&&u===this.options.attributesGroupName){let l=Object.keys(t[u]),b=l.length;for(let f=0;f<b;f++){let z=qS(l[f],!0,this.options,r,n);o+=this.buildAttrPairStr(z,""+t[u][l[f]],c)}}else s+=this.processTextOrObjNode(t[u],A,e,r,n)}return{attrStr:o,val:s}};Ar.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+uc(e)+'"'};function DYe(t,e,r,n,o){let s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){let u=this.buildRawContent(t),p=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(u,e,p,r)}let c=this.j2x(t,r+1,n,o);return n.pop(),e[0]==="?"?this.buildTextValNode("",e,c.attrStr,r,n):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,c.attrStr,r,n):this.buildObjectNode(c.val,e,c.attrStr,r)}i(DYe,"processTextOrObjNode");Ar.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let n=t[this.options.attributesGroupName];for(let o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;let s=o.startsWith(this.options.attributeNamePrefix)?o.substring(this.options.attributeNamePrefix.length):o;e[s]=uc(n[o]),r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let o=this.isAttribute(n);o&&(e[o]=uc(t[n]),r=!0)}return r?e:null};Ar.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||this.isAttribute(r)||this.options.attributesGroupName&&r===this.o
Line truncated
|
|
|
|
|
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}i(Ar,"Builder");function sJe(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let o=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(o)return o}let n=r[e.attributeNamePrefix+"version"];if(n)return n}return"1.0"}i(sJe,"detectXmlVersionFromObj");function TS(t,e,r,n,o){return!r.sanitizeName||Uu(t,{xmlVersion:o})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}i(TS,"resolveTagName");Ar.prototype.build=function(t){if(this.options.preserveOrder)return FS(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new bs,r=sJe(t,this.options);return this.j2x(t,0,e,r).val}};Ar.prototype.j2x=function(t,e,r,n){let o="",s="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let a=this.options.jPath?r.toString():r,c=this.checkStopNode(r);for(let u in t){if(!Object.prototype.hasOwnProperty.call(t,u))continue;let A=u===this.options.textNodeName||u===this.options.cdataPropName||u===this.options.commentPropName||this.options.attributesGroupName&&u===this.options.attributesGroupName||this.isAttribute(u)||u[0]==="?"?u:TS(u,!1,this.options,r,n);if(typeof t[u]>"u")this.isAttribute(u)&&(s+="");else if(t[u]===null)this.isAttribute(u)||A===this.options.cdataPropName||A===this.options.commentPropName?s+="":A[0]==="?"?s+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(t[u]instanceof Date)s+=this.buildTextValNode(t[u],A,"",e,r);else if(typeof t[u]!="object"){let l=this.isAttribute(u);if(l&&!this.ignoreAttributesFn(l,a)){let b=TS(l,!0,this.options,r,n);o+=this.buildAttrPairStr(b,""+t[u],c)}else if(!l)if(u===this.options.textNodeName){let b=this.options.tagValueProcessor(u,""+t[u]);s+=this.replaceEntitiesValue(b)}else{r.push(A);let b=this.checkStopNode(r);if(r.pop(),b){let M=""+t[u];M===""?s+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:s+=this.indentate(e)+"<"+A+">"+M+"</"+A+this.tagEndChar}else s+=this.buildTextValNode(t[u],A,"",e,r)}}else if(Array.isArray(t[u])){let l=t[u].length,b="",M="";for(let z=0;z<l;z++){let O=t[u][z];if(!(typeof O>"u"))if(O===null)A[0]==="?"?s+=this.indentate(e)+"<"+A+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+A+"/"+this.tagEndChar;else if(typeof O=="object")if(this.options.oneListGroup){r.push(A);let y=this.j2x(O,e+1,r,n);r.pop(),b+=y.val,this.options.attributesGroupName&&O.hasOwnProperty(this.options.attributesGroupName)&&(M+=y.attrStr)}else b+=this.processTextOrObjNode(O,A,e,r,n);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(A,O);y=this.replaceEntitiesValue(y),b+=y}else{r.push(A);let y=this.checkStopNode(r);if(r.pop(),y){let E=""+O;E===""?b+=this.indentate(e)+"<"+A+this.closeTag(A)+this.tagEndChar:b+=this.indentate(e)+"<"+A+">"+E+"</"+A+this.tagEndChar}else b+=this.buildTextValNode(O,A,"",e,r)}}this.options.oneListGroup&&(b=this.buildObjectNode(b,A,M,e)),s+=b}else if(this.options.attributesGroupName&&u===this.options.attributesGroupName){let l=Object.keys(t[u]),b=l.length;for(let M=0;M<b;M++){let z=TS(l[M],!0,this.options,r,n);o+=this.buildAttrPairStr(z,""+t[u][l[M]],c)}}else s+=this.processTextOrObjNode(t[u],A,e,r,n)}return{attrStr:o,val:s}};Ar.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+pc(e)+'"'};function iJe(t,e,r,n,o){let s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){let u=this.buildRawContent(t),p=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(u,e,p,r)}let c=this.j2x(t,r+1,n,o);return n.pop(),e[0]==="?"?this.buildTextValNode("",e,c.attrStr,r,n):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,c.attrStr,r,n):this.buildObjectNode(c.val,e,c.attrStr,r)}i(iJe,"processTextOrObjNode");Ar.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let n=t[this.options.attributesGroupName];for(let o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;let s=o.startsWith(this.options.attributeNamePrefix)?o.substring(this.options.attributeNamePrefix.length):o;e[s]=pc(n[o]),r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let o=this.isAttribute(n);o&&(e[o]=pc(t[n]),r=!0)}return r?e:null};Ar.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||this.isAttribute(r)||this.options.attributesGroupName&&r===this.o
Line truncated
|
|
|
|
|
`)+`
|
|
|
|
|
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(Be.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===Be.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(o=>o.name.toLowerCase().startsWith(Be.PREFIX_FOR_STORAGE));r.sort((o,s)=>lE(o.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((o,s,a)=>!(s>0&&o.name.toLowerCase()===a[s-1].name.toLowerCase()));let n="";return r.forEach(o=>{n+=`${o.name.toLowerCase().trimRight()}:${o.value.trimLeft()}
|
|
|
|
|
`}),n}getCanonicalizedResourceString(e){let r=uE(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let o=pE(e.url),s={};if(o){let a=[];for(let c in o)if(Object.prototype.hasOwnProperty.call(o,c)){let u=c.toLowerCase();s[u]=o[c],a.push(u)}a.sort();for(let c of a)n+=`
|
|
|
|
|
${c}:${decodeURIComponent(s[c])}`}return n}};var o1=class extends Hu{static{i(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new ZM(e,r,this)}computeHMACSHA256(e){return(0,zne.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var Q1=cs("storage-common");var In;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(In||(In={}));var Ac={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:In.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},TYe=new Vr("The operation was aborted."),ef=class extends ds{static{i(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=Ac){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Ac.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Ac.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Ac.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Ac.maxRetryDelayInMs):Ac.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Ac.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Ac.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let o=e.clone(),s=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;s||(o.url=cE(o.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(o.url=pc(o.url,Hi.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(Q1.info(`RetryPolicy: =====> Try=${n} ${s?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(o),!this.shouldRetry(s,n,a))return a;r=r||!s&&a.status===404}catch(c){if(Q1.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(s,n,a,c))throw c}return await this.delay(s,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,o){if(r>=this.retryOptions.maxTries)return Q1.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let s=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(o){for(let a of s)if(o.name.toUpperCase().includes(a)||o.message.toUpperCase().includes(a)||o.code&&o.code.toString().toUpperCase()===a)return Q1.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||o){let a=n?n.status:o?o.statusCode:0;if(!e&&a===404)return Q1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return Q1.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(Be.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return o?.code==="PARSE_ERROR"&&o?.message.startsWith('Error "Error: Unclosed root tag')?(Q1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let o=0;if(e)switch(this.retryOptions.retryPolicyType){case In.EXPONENTIAL:o=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case In.FIXED:o=this.retryOptions.retryDelayInMs;break}else o=Math.random()*1e3;return Q1.info(`RetryPolicy: Delay for ${o}ms`),AE(o,n,TYe)}};var tf=class{static{i(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new ef(e,r,this.retryOptions)}};var vYe="storageBrowserPolicy";function One(){return{name:vYe,async sendRequest(t,e){return l0||((t.method==="GET"||t.method==="HEAD")&&(t.url=pc(t.url,Hi.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Be.COOKIE),t.headers.delete(Be.CONTENT_LENGTH)),e(t)}}}i(One,"storageBrowserPolicy");var LYe="StorageCorrectContentLengthPolicy";function gne(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Be.CONTENT_LENGTH,Buffer.byteLength(e.body))}return i(t,"correctContentLength"),{name:LYe,async sendRequest(e,r){return t(e),r(e)}}}i(gne,"storageCorrectContentLengthPolicy");var QYe="storageRetryPolicy",Ll={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:In.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},_Ye=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],PYe=new Vr("The operation was aborted.");function Ene(t={}){let e=t.retryPolicyType??Ll.retryPolicyType,r=t.maxTries??Ll.maxTries,n=t.retryDelayInMs??Ll.retryDelayInMs,o=t.maxRetryDelayInMs??Ll.maxRetryDelayInMs,s=t.secondaryHost??Ll.secondaryHost,a=t.tryTimeoutInMs??Ll.tryTimeoutInMs;function c({isPrimaryRetry:p,attempt:A,response:l,error:b}){if(A>=r)return
Line truncated
|
|
|
|
|
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(qe.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===qe.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(o=>o.name.toLowerCase().startsWith(qe.PREFIX_FOR_STORAGE));r.sort((o,s)=>ME(o.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((o,s,a)=>!(s>0&&o.name.toLowerCase()===a[s-1].name.toLowerCase()));let n="";return r.forEach(o=>{n+=`${o.name.toLowerCase().trimRight()}:${o.value.trimLeft()}
|
|
|
|
|
`}),n}getCanonicalizedResourceString(e){let r=dE(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let o=bE(e.url),s={};if(o){let a=[];for(let c in o)if(Object.prototype.hasOwnProperty.call(o,c)){let u=c.toLowerCase();s[u]=o[c],a.push(u)}a.sort();for(let c of a)n+=`
|
|
|
|
|
${c}:${decodeURIComponent(s[c])}`}return n}};var o1=class extends Xu{static{i(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new nM(e,r,this)}computeHMACSHA256(e){return(0,Rne.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var Q1=ps("storage-common");var Rn;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Rn||(Rn={}));var lc={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Rn.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},fJe=new Yr("The operation was aborted."),oM=class extends fs{static{i(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=lc){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:lc.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):lc.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:lc.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:lc.maxRetryDelayInMs):lc.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:lc.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:lc.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let o=e.clone(),s=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;s||(o.url=lE(o.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(o.url=Ac(o.url,Xi.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(Q1.info(`RetryPolicy: =====> Try=${n} ${s?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(o),!this.shouldRetry(s,n,a))return a;r=r||!s&&a.status===404}catch(c){if(Q1.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(s,n,a,c))throw c}return await this.delay(s,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,o){if(r>=this.retryOptions.maxTries)return Q1.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let s=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(o){for(let a of s)if(o.name.toUpperCase().includes(a)||o.message.toUpperCase().includes(a)||o.code&&o.code.toString().toUpperCase()===a)return Q1.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||o){let a=n?n.status:o?o.statusCode:0;if(!e&&a===404)return Q1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return Q1.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(qe.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return o?.code==="PARSE_ERROR"&&o?.message.startsWith('Error "Error: Unclosed root tag')?(Q1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let o=0;if(e)switch(this.retryOptions.retryPolicyType){case Rn.EXPONENTIAL:o=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Rn.FIXED:o=this.retryOptions.retryDelayInMs;break}else o=Math.random()*1e3;return Q1.info(`RetryPolicy: Delay for ${o}ms`),fE(o,n,fJe)}};var sM=class{static{i(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new oM(e,r,this.retryOptions)}};var MJe="storageBrowserPolicy";function Nne(){return{name:MJe,async sendRequest(t,e){return l0||((t.method==="GET"||t.method==="HEAD")&&(t.url=Ac(t.url,Xi.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(qe.COOKIE),t.headers.delete(qe.CONTENT_LENGTH)),e(t)}}}i(Nne,"storageBrowserPolicy");var hJe="StorageCorrectContentLengthPolicy";function wne(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(qe.CONTENT_LENGTH,Buffer.byteLength(e.body))}return i(t,"correctContentLength"),{name:hJe,async sendRequest(e,r){return t(e),r(e)}}}i(wne,"storageCorrectContentLengthPolicy");var mJe="storageRetryPolicy",_l={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Rn.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},zJe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],gJe=new Yr("The operation was aborted.");function Sne(t={}){let e=t.retryPolicyType??_l.retryPolicyType,r=t.maxTries??_l.maxTries,n=t.retryDelayInMs??_l.retryDelayInMs,o=t.maxRetryDelayInMs??_l.maxRetryDelayInMs,s=t.secondaryHost??_l.secondaryHost,a=t.tryTimeoutInMs??_l.tryTimeoutInMs;function c({isPrimaryRetry:p,attempt:A,response:l,error:b}){if(A>=r)return
Line truncated
|
|
|
|
|
`)+`
|
|
|
|
|
`+n(s)+o(s),c=(0,Cne.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");s.headers.set(Be.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}i(e,"signRequest");function r(s,a){let c=s.headers.get(a);return!c||a===Be.CONTENT_LENGTH&&c==="0"?"":c}i(r,"getHeaderValueToSign");function n(s){let a=[];for(let[u,p]of s.headers)u.toLowerCase().startsWith(Be.PREFIX_FOR_STORAGE)&&a.push({name:u,value:p});a.sort((u,p)=>lE(u.name.toLowerCase(),p.name.toLowerCase())),a=a.filter((u,p,A)=>!(p>0&&u.name.toLowerCase()===A[p-1].name.toLowerCase()));let c="";return a.forEach(u=>{c+=`${u.name.toLowerCase().trimRight()}:${u.value.trimLeft()}
|
|
|
|
|
`}),c}i(n,"getCanonicalizedHeadersString");function o(s){let a=uE(s.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=pE(s.url),p={};if(u){let A=[];for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let b=l.toLowerCase();p[b]=u[l],A.push(b)}A.sort();for(let l of A)c+=`
|
|
|
|
|
${l}:${decodeURIComponent(p[l])}`}return c}return i(o,"getCanonicalizedResourceString"),{name:kYe,async sendRequest(s,a){return e(s),a(s)}}}i(wS,"storageSharedKeyCredentialPolicy");var UYe="storageRequestFailureDetailsParserPolicy";function yne(){return{name:UYe,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
|
|
|
|
`),r}}}}i(yne,"storageRequestFailureDetailsParserPolicy");var Bne=require("node:crypto");var dE=class{static{i(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,Bne.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var bE="12.31.0",ME="2026-02-06";var fE="https://storage.azure.com/.default",Xi={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var ho="",SS="*",GYe=1*1024*1024;var HYe=4*GYe;var qne="AES256",Dne="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Ine=["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-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],Rne=["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"],Nne="BlobUsesCustomerSpecifiedEncryption",wne="BlobDoesNotUseCustomerSpecifiedEncryption",Sne=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Vi(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}i(Vi,"isPipelineLike");var rf=class{static{i(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function g1(t,e={}){t||(t=new H0);let r=new rf([],e);return r._credential=t,r}i(g1,"newPipeline");function XYe(t){let e=[VYe,Fne,YYe,JYe,jYe,$Ye,ZYe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(o=>o(n)));if(r.length){let n=r.some(o=>KYe(o));return{wrappedPolicies:aS(r),afterRetry:n}}}}i(XYe,"processDownlevelPipeline");function FS(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?cS(e):NS(),t._coreHttpClient=n);let o=t._corePipeline;if(!o){let s=`azsdk-js-azure-storage-blob/${bE}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${s}`:`${s}`;o=LM({...r,loggingOptions:{additionalAllowedHeaderNames:Ine,additionalAllowedQueryParameters:Rne,logger:nE.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:rE,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:IS,serializerOptions:{xml:{xmlCharKey:"#"}}}}),o.removePolicy({phase:"Retry"}),o.removePolicy({name:v6}),o.addPolicy(gne()),o.addPolicy(Ene(r.retryOptions),{phase:"R
Line truncated
|
|
|
|
|
`),s=e.computeHMACSHA256(o);return{sasQueryParameters:new Co(t.version,s,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:o}}i(Xje,"generateBlobSASQueryParameters20150405");function Vje(t,e){if(t=ep(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ns.parse(t.permissions.toString()).toString():o=ws.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",Zu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Eo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Co(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}i(Vje,"generateBlobSASQueryParameters20181109");function Yje(t,e){if(t=ep(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ns.parse(t.permissions.toString()).toString():o=ws.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",Zu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Eo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Co(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}i(Yje,"generateBlobSASQueryParameters20201206");function Jje(t,e){if(t=ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ns.parse(t.permissions.toString()).toString():o=ws.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",Zu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Eo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Co(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}i(Jje,"generateBlobSASQueryParametersUDK20181109");function jje(t,e){if(t=ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ns.parse(t.permissions.toString()).toString():o=ws.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",Zu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Eo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Co(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}i(jje,"generateBlobSASQueryParametersUDK20200210");function $je(t,e){if(t=ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ns.parse(t.permissions.toString()).toString():o=ws.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",Zu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Eo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Co(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}i($je,"generateBlobSASQueryParametersUDK20201206");function Kje(t,e){if(t=ep(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ns.parse(t.permissions.toString()).toString():o=ws.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",Zu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Eo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Co(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:s}}i(Kje,"generateBlobSASQueryParametersUDK20250705");function Zu(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}i(Zu,"getCanonicalName");function ep(t){let e=t.version?t.version:ME;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}i(ep,"SASSignatureValuesSanityCheckAndAutofill");var Mf=class{static{i(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=Nl()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==ho||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==ho||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ce.withSpan("BlobLeaseClient-acquireLease",r,async n=>de(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==ho||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==ho||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ce.withSpan("BlobLeaseClient-changeLease",r,async n=>{let o=de(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,o})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==ho||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==ho||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ce.withSpan("BlobLeaseClient-releaseLease",e,async r=>de(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==ho||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==ho||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default val
Line truncated
|
|
|
|
|
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};jl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var op=class extends Error{static{i(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
|
|
|
|
|
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};op.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var Bf=class extends Error{static{i(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var cKe=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},CT=class{static{i(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,o=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${o} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=i(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Tse(t,e,r){return cKe(this,void 0,void 0,function*(){var n;let o=new ea(t),s=o.getBlockBlobClient(),a=new CT((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),N(`BlobClient: ${o.name}:${o.accountName}:${o.containerName}`);let u=yield s.uploadFile(e,c);if(u._response.status>=400)throw new OC(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw Ke(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}i(Tse,"uploadCacheArchiveSDK");var Lse=w(require("buffer"),1),Ss=w(require("fs"),1),Qse=w(require("stream"),1),_se=w(require("util"),1);var gC=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function EC(t){return t?t>=200&&t<300:!1}i(EC,"isSuccessStatusCode");function uKe(t){return t?t>=500:!0}i(uKe,"isServerErrorStatusCode");function pKe(t){return t?[n1.BadGateway,n1.ServiceUnavailable,n1.GatewayTimeout].includes(t):!1}i(pKe,"isRetryableStatusCode");function AKe(t){return gC(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}i(AKe,"sleep");function vse(t,e,r){return gC(this,arguments,void 0,function*(n,o,s,a=Xg,c=Vg,u=void 0){let p="",A=1;for(;A<=a;){let l,b,f=!1;try{l=yield o()}catch(z){u&&(l=u(z)),f=!0,p=z.message}if(l&&(b=s(l),!uKe(b)))return l;if(b&&(f=pKe(b),p=`Cache service responded with ${b}`),N(`${n} - Attempt ${A} of ${a} failed with error: ${p}`),!f){N(`${n} - Error is not retryable`);break}yield AKe(c),A++}throw Error(`${n} failed: ${p}`)})}i(vse,"retry");function qf(t,e){return gC(this,arguments,void 0,function*(r,n,o=Xg,s=Vg){return yield vse(r,n,a=>a.statusCode,o,s,a=>{if(a instanceof os)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}i(qf,"retryTypedResponse");function $l(t,e){return gC(this,arguments,void 0,function*(r,n,o=Xg,s=Vg){return yield vse(r,n,a=>a.message.statusCode,o,s)})}i($l,"retryHttpClientResponse");var Fn=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function lKe(t,e){return Fn(this,void 0,void 0,function*(){yield _se.promisify(Qse.pipeline)(t.message,e)})}i(lKe,"pipeResponseToStream");var CC=class{static{i(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,N(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){th
Line truncated
|
|
|
|
|
Other caches with similar key:`);for(let c of s?.artifactCaches||[])N(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}i(zKe,"printCachesListForDiagnostics");function DT(t,e,r){return dr(this,void 0,void 0,function*(){let n=new jse.URL(t),o=Gse(r);n.hostname.endsWith(".blob.core.windows.net")?o.useAzureSdk?yield kse(t,e,o):o.concurrentBlobDownloads?yield Pse(t,e,o):yield yC(t,e):yield yC(t,e)})}i(DT,"downloadCache");function Kse(t,e,r){return dr(this,void 0,void 0,function*(){let n=qT(),o=gl(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:o,cacheSize:r?.cacheSize};return yield qf("reserveCache",()=>dr(this,void 0,void 0,function*(){return n.postJson(If("caches"),s)}))})}i(Kse,"reserveCache");function Jse(t,e){return`bytes ${t}-${e}/*`}i(Jse,"getContentRange");function OKe(t,e,r,n,o){return dr(this,void 0,void 0,function*(){N(`Uploading chunk of size ${o-n+1} bytes at offset ${n} with content range: ${Jse(n,o)}`);let s={"Content-Type":"application/octet-stream","Content-Range":Jse(n,o)},a=yield $l(`uploadChunk (start: ${n}, end: ${o})`,()=>dr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!EC(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}i(OKe,"uploadChunk");function gKe(t,e,r,n){return dr(this,void 0,void 0,function*(){let o=ns(r),s=If(`caches/${e.toString()}`),a=Kl.openSync(r,"r"),c=yT(n),u=jw("uploadConcurrency",c.uploadConcurrency),p=jw("uploadChunkSize",c.uploadChunkSize),A=[...new Array(u).keys()];N("Awaiting all uploads");let l=0;try{yield Promise.all(A.map(()=>dr(this,void 0,void 0,function*(){for(;l<o;){let b=Math.min(o-l,p),f=l,z=l+b-1;l+=p,yield OKe(t,s,()=>Kl.createReadStream(r,{fd:a,start:f,end:z,autoClose:!1}).on("error",g=>{throw new Error(`Cache upload failed because file read failed with ${g.message}`)}),f,z)}})))}finally{Kl.closeSync(a)}})}i(gKe,"uploadFile");function EKe(t,e,r){return dr(this,void 0,void 0,function*(){let n={size:r};return yield qf("commitCache",()=>dr(this,void 0,void 0,function*(){return t.postJson(If(`caches/${e.toString()}`),n)}))})}i(EKe,"commitCache");function IT(t,e,r,n){return dr(this,void 0,void 0,function*(){if(yT(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Tse(r,e,n)}else{let s=qT();N("Upload cache"),yield gKe(s,t,e,n),N("Commiting cache");let a=ns(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield EKe(s,t,a);if(!EC(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}i(IT,"saveCache");var Xie=w(Qie(),1),y1=w(C1(),1),Zr=w(C1(),1),up=w(C1(),1),pp=w(C1(),1),Ap=w(C1(),1);var Ev=w(C1(),1),Cv=w(C1(),1),Uie=w(C1(),1),Gie=w(C1(),1),Hie=w(C1(),1);var zv=w(C1(),1),Ov=w(C1(),1),_ie=w(C1(),1),Pie=w(C1(),1),kie=w(C1(),1);var gv=class extends kie.MessageType{static{i(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Pie.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,_ie.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let s=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:s.scope=e.string();break;case 2:s.permission=e.int64().toString();break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?Ov.UnknownFieldHandler.onRead:p)(this.typeName,s,c,u,A)}}return s}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,zv.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,zv.WireType.Varint).int64(e.permission);let o=n.writeUnknownFields;return o!==!1&&(o==!0?Ov.UnknownFieldHandler.onWrite:o)(this.typeName,e,r),r}},Ay=new gv;var yv=class extends Hie.MessageType{static{i(this,"CacheMetadata$Type")}constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:i(()=>Ay,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,Gie.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Uie.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let s=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:s.repositoryId=e.int64().toString();break;case 2:s.scope.push(Ay.internalBinaryRead(e,e.uint32(),n));break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?Cv.UnknownFieldHandler.onRead:p)(this.typeName,s,c,u,A)}}return s}internalBinaryWrite(e,r,n){e.repositoryId!==
Line truncated
|
|
|
|
|
`));let n=yield Qv(r,"create");yield _v(n,t)})}i(kv,"createTar");var M2=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},qo=class t extends Error{static{i(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},lp=class t extends Error{static{i(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},Uv="cache write denied:",b2=class t extends lp{static{i(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},My=class t extends Error{static{i(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function jie(t){if(!t||t.length===0)throw new qo("Path Validation Error: At least one directory or file path is required")}i(jie,"checkPaths");function Gv(t){if(t.length>512)throw new qo(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new qo(`Key Validation Error: ${t} cannot contain commas.`)}i(Gv,"checkKey");function Hv(){return Df()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}i(Hv,"isFeatureAvailable");function $ie(t,e,r,n){return M2(this,arguments,void 0,function*(o,s,a,c,u=!1){let p=Df();return N(`Cache service version: ${p}`),jie(o),p==="v2"?yield ve0(o,s,a,c,u):yield Te0(o,s,a,c,u)})}i($ie,"restoreCache");function Te0(t,e,r,n){return M2(this,arguments,void 0,function*(o,s,a,c,u=!1){a=a||[];let p=[s,...a];if(N("Resolved Keys:"),N(JSON.stringify(p)),p.length>10)throw new qo("Key Validation Error: Keys are limited to a maximum of 10.");for(let b of p)Gv(b);let A=yield BM(),l="";try{let b=yield $se(p,o,{compressionMethod:A,enableCrossOsArchive:u});if(!b?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),b.cacheKey;l=Gf.join(yield CM(),rc(A)),N(`Archive Path: ${l}`),yield DT(b.archiveLocation,l,c),Ti()&&(yield Uf(l,A));let f=ns(l);return S(`Cache Size: ~${Math.round(f/(1024*1024))} MB (${f} B)`),yield Pv(l,A),S("Cache restored successfully"),b.cacheKey}catch(b){let f=b;if(f.name===qo.name)throw b;f instanceof os&&typeof f.statusCode=="number"&&f.statusCode>=500?ul(`Failed to restore: ${b.message}`):Ke(`Failed to restore: ${b.message}`)}finally{try{yield yM(l)}catch(b){N(`Failed to delete archive: ${b}`)}}})}i(Te0,"restoreCacheV1");function ve0(t,e,r,n){return M2(this,arguments,void 0,function*(o,s,a,c,u=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let p=[s,...a];if(N("Resolved Keys:"),N(JSON.stringify(p)),p.length>10)throw new qo("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of p)Gv(l);let A="";try{let l=Lv(),b=yield BM(),f={key:s,restoreKeys:a,version:gl(o,b,u)},z=yield l.GetCacheEntryDownloadURL(f);if(!z.ok){N(`Cache not found for version ${f.version} of keys: ${p.join(", ")}`);return}if(f.key!==z.matchedKey?S(`Cache hit for restore-key: ${z.matchedKey}`):S(`Cache hit for: ${z.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),z.matchedKey;A=Gf.join(yield CM(),rc(b)),N(`Archive path: ${A}`),N(`Starting download of archive to: ${A}`),yield DT(z.signedDownloadUrl,A,c);let y=ns(A);return S(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),Ti()&&(yield Uf(A,b)),yield Pv(A,b),S("Cache restored successfully"),z.matchedKey}catch(l){let b=l;if(b.name===qo.name)throw l;b instanceof os&&typeof b.statusCode=="number"&&b.statusCode>=500?ul(`Failed to restore: ${l.message}`):Ke(`Failed to restore: ${l.message}`)}finally{try{A&&(yield yM(A))}catch(l){N(`Failed to delete archive: ${l}`)}}})}i(ve0,"restoreCacheV2");function Xv(t,e,r){return M2(this,arguments,void 0,function*(n,o,s,a=!1){let c=Df();return N(`Cache service version: ${c}`),jie(n),Gv(o),c==="v2"?yield Qe0(n,o,s,a):yield Le0(n,o,s,a)})}i(Xv,"saveCache");function Le0(t,e,r){return M2(this,arguments,void 0,function*(n,o,s,a=!1){var c,u,p,A,l,b;let f=yield BM(),z=-1,g=yield Jw(n);if(N("Cache Paths:"),N(`${JSON.stringify(g)}`),g.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 y=yield CM(),E=Gf.join(y,rc(f));N(`Archive Path: ${E}`);try{yield kv(y,g,f),Ti()&&(yield Uf(E,f));let B=10*1024*1024*1024,q=ns(E);if(N(`File Size: ${q}`),q>B&&!BT())throw new Error(`Cache size of ~${Math.round(q/(1024*1024))} MB (${q} B) is over the 10GB limit, not saving cache.`);N("Reserving Cache");let I=yield Kse(o,n,{compressionMethod:f,enableCrossOsArchive:a,cacheSize:q});if(!((c=I?.result)===null||c===void 0)&&c.cacheId)z=(u=I?.result)=
Line truncated
|
|
|
|
|
`+n(s)+o(s),c=(0,Fne.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");s.headers.set(qe.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}i(e,"signRequest");function r(s,a){let c=s.headers.get(a);return!c||a===qe.CONTENT_LENGTH&&c==="0"?"":c}i(r,"getHeaderValueToSign");function n(s){let a=[];for(let[u,p]of s.headers)u.toLowerCase().startsWith(qe.PREFIX_FOR_STORAGE)&&a.push({name:u,value:p});a.sort((u,p)=>ME(u.name.toLowerCase(),p.name.toLowerCase())),a=a.filter((u,p,A)=>!(p>0&&u.name.toLowerCase()===A[p-1].name.toLowerCase()));let c="";return a.forEach(u=>{c+=`${u.name.toLowerCase().trimRight()}:${u.value.trimLeft()}
|
|
|
|
|
`}),c}i(n,"getCanonicalizedHeadersString");function o(s){let a=dE(s.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=bE(s.url),p={};if(u){let A=[];for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let b=l.toLowerCase();p[b]=u[l],A.push(b)}A.sort();for(let l of A)c+=`
|
|
|
|
|
${l}:${decodeURIComponent(p[l])}`}return c}return i(o,"getCanonicalizedResourceString"),{name:OJe,async sendRequest(s,a){return e(s),a(s)}}}i(PS,"storageSharedKeyCredentialPolicy");var EJe="storageRequestFailureDetailsParserPolicy";function Wne(){return{name:EJe,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
|
|
|
|
`),r}}}}i(Wne,"storageRequestFailureDetailsParserPolicy");var xne=require("node:crypto");var hE=class{static{i(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,xne.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var mE="12.31.0",zE="2026-02-06";var gE="https://storage.azure.com/.default",Vi={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var go="",kS="*",CJe=1*1024*1024;var yJe=4*CJe;var Tne="AES256",vne="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Lne=["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-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],Qne=["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"],_ne="BlobUsesCustomerSpecifiedEncryption",Pne="BlobDoesNotUseCustomerSpecifiedEncryption",kne=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Yi(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}i(Yi,"isPipelineLike");var iM=class{static{i(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function O1(t,e={}){t||(t=new H0);let r=new iM([],e);return r._credential=t,r}i(O1,"newPipeline");function BJe(t){let e=[qJe,Une,DJe,IJe,RJe,NJe,SJe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(o=>o(n)));if(r.length){let n=r.some(o=>wJe(o));return{wrappedPolicies:hS(r),afterRetry:n}}}}i(BJe,"processDownlevelPipeline");function US(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?mS(e):_S(),t._coreHttpClient=n);let o=t._corePipeline;if(!o){let s=`azsdk-js-azure-storage-blob/${mE}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${s}`:`${s}`;o=kf({...r,loggingOptions:{additionalAllowedHeaderNames:Lne,additionalAllowedQueryParameters:Qne,logger:aE.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:iE,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:LS,serializerOptions:{xml:{xmlCharKey:"#"}}}}),o.removePolicy({phase:"Retry"}),o.removePolicy({name:V6}),o.addPolicy(wne()),o.addPolicy(Sne(r.retryOptions),{phase:"R
Line truncated
|
|
|
|
|
`),s=e.computeHMACSHA256(o);return{sasQueryParameters:new Bo(t.version,s,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:o}}i(Bje,"generateBlobSASQueryParameters20150405");function qje(t,e){if(t=tp(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ss.parse(t.permissions.toString()).toString():o=Fs.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Bo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}i(qje,"generateBlobSASQueryParameters20181109");function Dje(t,e){if(t=tp(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ss.parse(t.permissions.toString()).toString():o=Fs.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Bo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}i(Dje,"generateBlobSASQueryParameters20201206");function Ije(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ss.parse(t.permissions.toString()).toString():o=Fs.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Bo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}i(Ije,"generateBlobSASQueryParametersUDK20181109");function Rje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ss.parse(t.permissions.toString()).toString():o=Fs.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Bo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}i(Rje,"generateBlobSASQueryParametersUDK20200210");function Nje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ss.parse(t.permissions.toString()).toString():o=Fs.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Bo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}i(Nje,"generateBlobSASQueryParametersUDK20201206");function wje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let o;t.permissions&&(t.blobName?o=Ss.parse(t.permissions.toString()).toString():o=Fs.parse(t.permissions.toString()).toString());let s=[o||"",t.startsOn?d0(t.startsOn,!1):"",t.expiresOn?d0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?d0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?d0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new Bo(t.version,a,o,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:s}}i(wje,"generateBlobSASQueryParametersUDK20250705");function ep(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}i(ep,"getCanonicalName");function tp(t){let e=t.version?t.version:zE;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}i(tp,"SASSignatureValuesSanityCheckAndAutofill");var mM=class{static{i(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=Sl()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==go||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==go||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ce.withSpan("BlobLeaseClient-acquireLease",r,async n=>de(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==go||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==go||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ce.withSpan("BlobLeaseClient-changeLease",r,async n=>{let o=de(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,o})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==go||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==go||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ce.withSpan("BlobLeaseClient-releaseLease",e,async r=>de(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==go||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==go||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default val
Line truncated
|
|
|
|
|
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Kl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var sp=class extends Error{static{i(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
|
|
|
|
|
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};sp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var IM=class extends Error{static{i(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var PKe=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},FT=class{static{i(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,o=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${o} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=i(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Xse(t,e,r){return PKe(this,void 0,void 0,function*(){var n;let o=new ta(t),s=o.getBlockBlobClient(),a=new FT((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),N(`BlobClient: ${o.name}:${o.accountName}:${o.containerName}`);let u=yield s.uploadFile(e,c);if(u._response.status>=400)throw new yC(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw r0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}i(Xse,"uploadCacheArchiveSDK");var Yse=w(require("buffer"),1),Ws=w(require("fs"),1),Jse=w(require("stream"),1),$se=w(require("util"),1);var BC=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function qC(t){return t?t>=200&&t<300:!1}i(qC,"isSuccessStatusCode");function kKe(t){return t?t>=500:!0}i(kKe,"isServerErrorStatusCode");function UKe(t){return t?[n1.BadGateway,n1.ServiceUnavailable,n1.GatewayTimeout].includes(t):!1}i(UKe,"isRetryableStatusCode");function GKe(t){return BC(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}i(GKe,"sleep");function Vse(t,e,r){return BC(this,arguments,void 0,function*(n,o,s,a=JO,c=$O,u=void 0){let p="",A=1;for(;A<=a;){let l,b,M=!1;try{l=yield o()}catch(z){u&&(l=u(z)),M=!0,p=z.message}if(l&&(b=s(l),!kKe(b)))return l;if(b&&(M=UKe(b),p=`Cache service responded with ${b}`),N(`${n} - Attempt ${A} of ${a} failed with error: ${p}`),!M){N(`${n} - Error is not retryable`);break}yield GKe(c),A++}throw Error(`${n} failed: ${p}`)})}i(Vse,"retry");function RM(t,e){return BC(this,arguments,void 0,function*(r,n,o=JO,s=$O){return yield Vse(r,n,a=>a.statusCode,o,s,a=>{if(a instanceof is)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}i(RM,"retryTypedResponse");function Zl(t,e){return BC(this,arguments,void 0,function*(r,n,o=JO,s=$O){return yield Vse(r,n,a=>a.message.statusCode,o,s)})}i(Zl,"retryHttpClientResponse");var Wn=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})};function HKe(t,e){return Wn(this,void 0,void 0,function*(){yield $se.promisify(Jse.pipeline)(t.message,e)})}i(HKe,"pipeResponseToStream");var DC=class{static{i(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,N(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){th
Line truncated
|
|
|
|
|
Other caches with similar key:`);for(let c of s?.artifactCaches||[])N(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}i(KKe,"printCachesListForDiagnostics");function LT(t,e,r){return dr(this,void 0,void 0,function*(){let n=new uie.URL(t),o=eie(r);n.hostname.endsWith(".blob.core.windows.net")?o.useAzureSdk?yield Kse(t,e,o):o.concurrentBlobDownloads?yield jse(t,e,o):yield IC(t,e):yield IC(t,e)})}i(LT,"downloadCache");function Aie(t,e,r){return dr(this,void 0,void 0,function*(){let n=vT(),o=Cl(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:o,cacheSize:r?.cacheSize};return yield RM("reserveCache",()=>dr(this,void 0,void 0,function*(){return n.postJson(wM("caches"),s)}))})}i(Aie,"reserveCache");function cie(t,e){return`bytes ${t}-${e}/*`}i(cie,"getContentRange");function ZKe(t,e,r,n,o){return dr(this,void 0,void 0,function*(){N(`Uploading chunk of size ${o-n+1} bytes at offset ${n} with content range: ${cie(n,o)}`);let s={"Content-Type":"application/octet-stream","Content-Range":cie(n,o)},a=yield Zl(`uploadChunk (start: ${n}, end: ${o})`,()=>dr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!qC(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}i(ZKe,"uploadChunk");function eZe(t,e,r,n){return dr(this,void 0,void 0,function*(){let o=ss(r),s=wM(`caches/${e.toString()}`),a=e2.openSync(r,"r"),c=WT(n),u=i6("uploadConcurrency",c.uploadConcurrency),p=i6("uploadChunkSize",c.uploadChunkSize),A=[...new Array(u).keys()];N("Awaiting all uploads");let l=0;try{yield Promise.all(A.map(()=>dr(this,void 0,void 0,function*(){for(;l<o;){let b=Math.min(o-l,p),M=l,z=l+b-1;l+=p,yield ZKe(t,s,()=>e2.createReadStream(r,{fd:a,start:M,end:z,autoClose:!1}).on("error",O=>{throw new Error(`Cache upload failed because file read failed with ${O.message}`)}),M,z)}})))}finally{e2.closeSync(a)}})}i(eZe,"uploadFile");function tZe(t,e,r){return dr(this,void 0,void 0,function*(){let n={size:r};return yield RM("commitCache",()=>dr(this,void 0,void 0,function*(){return t.postJson(wM(`caches/${e.toString()}`),n)}))})}i(tZe,"commitCache");function QT(t,e,r,n){return dr(this,void 0,void 0,function*(){if(WT(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Xse(r,e,n)}else{let s=vT();N("Upload cache"),yield eZe(s,t,e,n),N("Commiting cache");let a=ss(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield tZe(s,t,a);if(!qC(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}i(QT,"saveCache");var sae=w(Kie(),1),y1=w(C1(),1),en=w(C1(),1),pp=w(C1(),1),Ap=w(C1(),1),lp=w(C1(),1);var Fv=w(C1(),1),Wv=w(C1(),1),rae=w(C1(),1),nae=w(C1(),1),oae=w(C1(),1);var Nv=w(C1(),1),wv=w(C1(),1),Zie=w(C1(),1),eae=w(C1(),1),tae=w(C1(),1);var Sv=class extends tae.MessageType{static{i(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,eae.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Zie.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let s=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:s.scope=e.string();break;case 2:s.permission=e.int64().toString();break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?wv.UnknownFieldHandler.onRead:p)(this.typeName,s,c,u,A)}}return s}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,Nv.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,Nv.WireType.Varint).int64(e.permission);let o=n.writeUnknownFields;return o!==!1&&(o==!0?wv.UnknownFieldHandler.onWrite:o)(this.typeName,e,r),r}},fy=new Sv;var xv=class extends oae.MessageType{static{i(this,"CacheMetadata$Type")}constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:i(()=>fy,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,nae.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,rae.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let s=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:s.repositoryId=e.int64().toString();break;case 2:s.scope.push(fy.internalBinaryRead(e,e.uint32(),n));break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?Wv.UnknownFieldHandler.onRead:p)(this.typeName,s,c,u,A)}}return s}internalBinaryWrite(e,r,n){e.repositoryId!==
Line truncated
|
|
|
|
|
`));let n=yield $v(r,"create");yield jv(n,t)})}i(Zv,"createTar");var M2=function(t,e,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return i(o,"adopt"),new(r||(r=Promise))(function(s,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}i(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}i(u,"rejected");function p(A){A.done?s(A.value):o(A.value).then(c,u)}i(p,"step"),p((n=n.apply(t,e||[])).next())})},Io=class t extends Error{static{i(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},dp=class t extends Error{static{i(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},eL="cache write denied:",zy=class t extends dp{static{i(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},uae=jO,gy=class t extends Error{static{i(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},Oy=class t extends Error{static{i(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function pae(t){if(!t||t.length===0)throw new Io("Path Validation Error: At least one directory or file path is required")}i(pae,"checkPaths");function tL(t){if(t.length>512)throw new Io(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Io(`Key Validation Error: ${t} cannot contain commas.`)}i(tL,"checkKey");function rL(){return NM()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}i(rL,"isFeatureAvailable");function Aae(t,e,r,n){return M2(this,arguments,void 0,function*(o,s,a,c,u=!1){let p=NM();N(`Cache service version: ${p}`),pae(o);let A=TT();if(!rie(A)){S(`Cache restore skipped: the effective cache-mode '${A}' does not permit reads.`),N(`Skipped restore for paths [${o.join(", ")}] with primary key '${s}'.`);return}return p==="v2"?yield M00(o,s,a,c,u):yield f00(o,s,a,c,u)})}i(Aae,"restoreCache");function f00(t,e,r,n){return M2(this,arguments,void 0,function*(o,s,a,c,u=!1){var p;a=a||[];let A=[s,...a];if(N("Resolved Keys:"),N(JSON.stringify(A)),A.length>10)throw new Io("Key Validation Error: Keys are limited to a maximum of 10.");for(let M of A)tL(M);let l=yield Rf(),b="";try{let M;try{M=yield pie(A,o,{compressionMethod:l,enableCrossOsArchive:u})}catch(O){let y=(p=O?.message)!==null&&p!==void 0?p:"";throw y.includes(uae)?new gy(y):O}if(!M?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),M.cacheKey;b=VM.join(yield Df(),nc(l)),N(`Archive Path: ${b}`),yield LT(M.archiveLocation,b,c),vi()&&(yield XM(b,l));let z=ss(b);return S(`Cache Size: ~${Math.round(z/(1024*1024))} MB (${z} B)`),yield Kv(b,l),S("Cache restored successfully"),M.cacheKey}catch(M){let z=M;if(z.name===Io.name)throw M;z instanceof is&&typeof z.statusCode=="number"&&z.statusCode>=500?ll(`Failed to restore: ${M.message}`):r0(`Failed to restore: ${M.message}`)}finally{try{yield If(b)}catch(M){N(`Failed to delete archive: ${M}`)}}})}i(f00,"restoreCacheV1");function M00(t,e,r,n){return M2(this,arguments,void 0,function*(o,s,a,c,u=!1){var p;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let A=[s,...a];if(N("Resolved Keys:"),N(JSON.stringify(A)),A.length>10)throw new Io("Key Validation Error: Keys are limited to a maximum of 10.");for(let b of A)tL(b);let l="";try{let b=Jv(),M=yield Rf(),z={key:s,restoreKeys:a,version:Cl(o,M,u)},O;try{O=yield b.GetCacheEntryDownloadURL(z)}catch(B){let q=(p=B?.message)!==null&&p!==void 0?p:"";throw q.includes(uae)?new gy(q):B}if(!O.ok){N(`Cache not found for version ${z.version} of keys: ${A.join(", ")}`);return}if(z.key!==O.matchedKey?S(`Cache hit for restore-key: ${O.matchedKey}`):S(`Cache hit for: ${O.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),O.matchedKey;l=VM.join(yield Df(),nc(M)),N(`Archive path: ${l}`),N(`Starting download of archive to: ${l}`),yield LT(O.signedDownloadUrl,l,c);let E=ss(l);return S(`Cache Size: ~${Math.round(E/(1024*1024))} MB (${E} B)`),vi()&&(yield XM(l,M)),yield Kv(l,M),S("Cache restored successfully"),O.matchedKey}catch(b){let M=b;if(M.name===Io.name)throw b;M instanceof is&&typeof M.statusCode=="number"&&M.statusCode>=500?ll(`Failed to restore: ${b.message}`):r0(`Failed to restore: ${b.message}`)}finally{try{l&&(yield If(l))}catch(b){N(`Failed to delete archive: ${b}`)}}})}i(M00,"restoreCacheV2");function nL(t,e,r){return M2(this,arguments,void 0,function*(n,o,s,a=!1){let c=NM();N(`Cache service version: ${c}`),pae(n),tL(o);let u=TT();return nie(u)?c==="v2"?yield m00(n,o,s,a):yield h00(n,o,s,a):(S(`Cache save skipped: the effective cache-mode '${u}' does not permit writes.`),N(`Skipped save for paths [${n.join(", ")}] with key '${o}'.`),-1)})}i(nL,"saveCache");function h00(t,e,r){return M2(this,arguments,void
Line truncated
|
|
|
|
|
`+t.errors.map(e=>` - ${e.message}`).join(`
|
|
|
|
|
`)}i(F00,"_buildMessageForResponseErrors");var W00=class extends Error{static{i(this,"GraphqlResponseError")}constructor(t,e,r){super(F00(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},x00=["method","baseUrl","url","headers","request","query","mediaType","operationName"],T00=["query","method","url"],Lae=/\/api\/v3\/?$/;function v00(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(T00.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,o=Object.keys(n).reduce((a,c)=>x00.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Lae.test(s)&&(o.url=s.replace(Lae,"/api/graphql")),t(o).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new W00(o,c,a.data)}return a.data.data})}i(v00,"graphql");function sL(t,e){let r=t.defaults(e);return Object.assign(i((o,s)=>v00(r,o,s),"newApi"),{defaults:sL.bind(null,r),endpoint:r.endpoint})}i(sL,"withDefaults");var KZ0=sL(Yf,{headers:{"user-agent":`octokit-graphql.js/${S00} ${Oc()}`},method:"POST",url:"/graphql"});function Qae(t){return sL(t,{method:"POST",url:"/graphql"})}i(Qae,"withCustomRequest");var iL="(?:[a-zA-Z0-9_-]+)",_ae="\\.",Pae=new RegExp(`^${iL}${_ae}${iL}${_ae}${iL}$`),L00=Pae.test.bind(Pae);async function Q00(t){let e=L00(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}i(Q00,"auth");function _00(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}i(_00,"withAuthorizationPrefix");async function P00(t,e,r,n){let o=e.endpoint.merge(r,n);return o.headers.authorization=_00(t),e(o)}i(P00,"hook");var kae=i(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(Q00.bind(null,e),{hook:P00.bind(null,e)})},"createTokenAuth2");var aL="7.0.6";var Uae=i(()=>{},"noop"),k00=console.warn.bind(console),U00=console.error.bind(console);function G00(t={}){return typeof t.debug!="function"&&(t.debug=Uae),typeof t.info!="function"&&(t.info=Uae),typeof t.warn!="function"&&(t.warn=k00),typeof t.error!="function"&&(t.error=U00),t}i(G00,"createLogger");var Gae=`octokit-core.js/${aL} ${Oc()}`,Iy=class{static{i(this,"Octokit")}static VERSION=aL;static defaults(e){return class extends this{static{i(this,"OctokitWithDefaults")}constructor(...n){let o=n[0]||{};if(typeof e=="function"){super(e(o));return}super(Object.assign({},e,o,o.userAgent&&e.userAgent?{userAgent:`${o.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{i(this,"NewOctokit")}static plugins=r.concat(e.filter(o=>!r.includes(o)))}}constructor(e={}){let r=new mae.Collection,n={baseUrl:Yf.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${Gae}`:Gae,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=Yf.defaults(n),this.graphql=Qae(this.request).defaults(n),this.log=G00(e.log),this.hook=r,e.authStrategy){let{authStrategy:s,...a}=e,c=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let s=kae(e.auth);r.wrap("request",s.hook),this.auth=s}let o=this.constructor;for(let s=0;s<o.plugins.length;++s)Object.assign(this,o.plugins[s](this,e))}request;graphql;log;hook;auth};var cL="17.0.0";var H00={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"
Line truncated
|
|
|
|
|
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);return b<f},"__needMoreData"),parse:i(function(n,o,s,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:f,raw:z,relax_quotes:g,rtrim:y,skip_empty_lines:E,to:B,to_line:q}=this.options,{comment:I,escape:W,quote:x,record_delimiter:Q}=this.options,{bomSkipped:ue,delimiterDiscovered:qe,delimiterBufPrevious:Qe,rawBuffer:Re,escapeIsQuote:ge}=this.state;if(!qe&&p){let _e;if(Qe===void 0?_e=n:Qe!==void 0&&n===void 0?_e=Qe:_e=Buffer.concat([Qe,n]),n=void 0,o||_e.length>p.size)this.options.delimiter=[Buffer.from(tle(_e,this.options.delimiter_auto))],this.state.previousBuf=_e,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=_e;return}}let{previousBuf:Ue}=this.state,pe;if(Ue===void 0)if(n===void 0){a();return}else pe=n;else Ue!==void 0&&n===void 0?pe=Ue:pe=Buffer.concat([Ue,n]);if(ue===!1)if(c===!1)this.state.bomSkipped=!0;else if(pe.length<3){if(o===!1){this.state.previousBuf=pe;return}}else{for(let _e in W2)if(W2[_e].compare(pe,0,W2[_e].length)===0){let g0=W2[_e].length;this.state.bufBytesStart+=g0,pe=pe.slice(g0);let ft=F2({...this.original_options,encoding:_e});for(let p0 in ft)this.options[p0]=ft[p0];({comment:I,escape:W,quote:x}=this.options);break}this.state.bomSkipped=!0}let Ge=pe.length,J;for(J=0;J<Ge&&!this.__needMoreData(J,Ge,o);J++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),q!==-1&&this.info.lines>q){this.state.stop=!0,a();return}this.state.quoting===!1&&Q.length===0&&this.__autoDiscoverRecordDelimiter(pe,J)&&(Q=this.options.record_delimiter);let _e=pe[J];if(z===!0&&Re.append(_e),(_e===Di0||_e===Ii0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(W!==null&&this.state.quoting===!0&&this.__isEscape(pe,J,_e)&&J+W.length<Ge)if(ge){if(this.__isQuote(pe,J+W.length)){this.state.escaping=!0,J+=W.length-1;continue}}else{this.state.escaping=!0,J+=W.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(pe,J))if(this.state.quoting===!0){let p0=pe[J+x.length],V1=y&&this.__isCharTrimable(pe,J+x.length),y0=I!==null&&this.__compareBytes(I,pe,J+x.length,p0),ne=this.__isDelimiter(pe,J+x.length,p0),vo=Q.length===0?this.__autoDiscoverRecordDelimiter(pe,J+x.length):this.__isRecordDelimiter(p0,pe,J+x.length);if(W!==null&&this.__isEscape(pe,J,_e)&&this.__isQuote(pe,J+W.length))J+=W.length-1;else if(!p0||ne||vo||y0||V1){this.state.quoting=!1,this.state.wasQuoting=!0,J+=x.length-1;continue}else if(g===!1){let cn=this.__error(new Ve("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(p0)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(cn!==void 0)return cn}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(x),J+=x.length-1}else if(this.state.field.length!==0){if(g===!1){let p0=this.__infoField(),V1=Object.keys(W2).map(ne=>W2[ne].equals(this.state.field.toString())?ne:!1).filter(Boolean)[0],y0=this.__error(new Ve("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(p0.column)} at line ${p0.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,V1?`(${V1} bom)`:void 0],this.options,p0,{field:this.state.field}));if(y0!==void 0)return y0}}else{this.state.quoting=!0,J+=x.length-1;continue}if(this.state.quoting===!1){let p0=this.__isRecordDelimiter(_e,pe,J);if(p0!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),J+=p0-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,J+=p0-1;continue}this.info.bytes=this.state.bufBytesStart+J;let ne=this.__onField();if(ne!==void 0)return ne;this.info.bytes=this.state.bufBytesStart+J+p0;let vo=this.__onRecord(s);if(vo!==void 0)return vo;if(B!==-1&&this.info.records>=B){this.state.stop=!0,a();return}}this.state.commenting=!1,J+=p0-1;continue}if(this.state.commenting)continue;if(I!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(I,pe,J,_e)!==0){this.state.commenting=!0;continue}let V1=this.__isDelimiter(pe,J,_e);if(V1!==0){this.info.bytes=this.state.bufBytesStart+J;let y0=this.__onField();if(y0!==void 0)return y0;J+=V1-1;continue}}}if(this.state.commenting===!1&&f!==0&&this.state.record_length+this.state.field.length>f)return this.__error(new Ve("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${f}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let g0=b===!1||th
Line truncated
|
|
|
|
|
`)}i(l10,"_buildMessageForResponseErrors");var d10=class extends Error{static{i(this,"GraphqlResponseError")}constructor(t,e,r){super(l10(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},b10=["method","baseUrl","url","headers","request","query","mediaType","operationName"],f10=["query","method","url"],Kae=/\/api\/v3\/?$/;function M10(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(f10.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,o=Object.keys(n).reduce((a,c)=>b10.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Kae.test(s)&&(o.url=s.replace(Kae,"/api/graphql")),t(o).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new d10(o,c,a.data)}return a.data.data})}i(M10,"graphql");function ML(t,e){let r=t.defaults(e);return Object.assign(i((o,s)=>M10(r,o,s),"newApi"),{defaults:ML.bind(null,r),endpoint:r.endpoint})}i(ML,"withDefaults");var ve1=ML(KM,{headers:{"user-agent":`octokit-graphql.js/${A10} ${Oc()}`},method:"POST",url:"/graphql"});function Zae(t){return ML(t,{method:"POST",url:"/graphql"})}i(Zae,"withCustomRequest");var hL="(?:[a-zA-Z0-9_-]+)",ece="\\.",tce=new RegExp(`^${hL}${ece}${hL}${ece}${hL}$`),h10=tce.test.bind(tce);async function m10(t){let e=h10(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}i(m10,"auth");function z10(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}i(z10,"withAuthorizationPrefix");async function g10(t,e,r,n){let o=e.endpoint.merge(r,n);return o.headers.authorization=z10(t),e(o)}i(g10,"hook");var rce=i(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(m10.bind(null,e),{hook:g10.bind(null,e)})},"createTokenAuth2");var mL="7.0.6";var nce=i(()=>{},"noop"),O10=console.warn.bind(console),E10=console.error.bind(console);function C10(t={}){return typeof t.debug!="function"&&(t.debug=nce),typeof t.info!="function"&&(t.info=nce),typeof t.warn!="function"&&(t.warn=O10),typeof t.error!="function"&&(t.error=E10),t}i(C10,"createLogger");var oce=`octokit-core.js/${mL} ${Oc()}`,Fy=class{static{i(this,"Octokit")}static VERSION=mL;static defaults(e){return class extends this{static{i(this,"OctokitWithDefaults")}constructor(...n){let o=n[0]||{};if(typeof e=="function"){super(e(o));return}super(Object.assign({},e,o,o.userAgent&&e.userAgent?{userAgent:`${o.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{i(this,"NewOctokit")}static plugins=r.concat(e.filter(o=>!r.includes(o)))}}constructor(e={}){let r=new wae.Collection,n={baseUrl:KM.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${oce}`:oce,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=KM.defaults(n),this.graphql=Zae(this.request).defaults(n),this.log=C10(e.log),this.hook=r,e.authStrategy){let{authStrategy:s,...a}=e,c=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let s=rce(e.auth);r.wrap("request",s.hook),this.auth=s}let o=this.constructor;for(let s=0;s<o.plugins.length;++s)Object.assign(this,o.plugins[s](this,e))}request;graphql;log;hook;auth};var zL="17.0.0";var y10={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"
Line truncated
|
|
|
|
|
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);return b<M},"__needMoreData"),parse:i(function(n,o,s,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:M,raw:z,relax_quotes:O,rtrim:y,skip_empty_lines:E,to:B,to_line:q}=this.options,{comment:I,escape:W,quote:x,record_delimiter:L}=this.options,{bomSkipped:ue,delimiterDiscovered:De,delimiterBufPrevious:Qe,rawBuffer:ye,escapeIsQuote:me}=this.state;if(!De&&p){let _e;if(Qe===void 0?_e=n:Qe!==void 0&&n===void 0?_e=Qe:_e=Buffer.concat([Qe,n]),n=void 0,o||_e.length>p.size)this.options.delimiter=[Buffer.from(yle(_e,this.options.delimiter_auto))],this.state.previousBuf=_e,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=_e;return}}let{previousBuf:Ue}=this.state,pe;if(Ue===void 0)if(n===void 0){a();return}else pe=n;else Ue!==void 0&&n===void 0?pe=Ue:pe=Buffer.concat([Ue,n]);if(ue===!1)if(c===!1)this.state.bomSkipped=!0;else if(pe.length<3){if(o===!1){this.state.previousBuf=pe;return}}else{for(let _e in x2)if(x2[_e].compare(pe,0,x2[_e].length)===0){let C0=x2[_e].length;this.state.bufBytesStart+=C0,pe=pe.slice(C0);let Mt=W2({...this.original_options,encoding:_e});for(let p0 in Mt)this.options[p0]=Mt[p0];({comment:I,escape:W,quote:x}=this.options);break}this.state.bomSkipped=!0}let Ge=pe.length,J;for(J=0;J<Ge&&!this.__needMoreData(J,Ge,o);J++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),q!==-1&&this.info.lines>q){this.state.stop=!0,a();return}this.state.quoting===!1&&L.length===0&&this.__autoDiscoverRecordDelimiter(pe,J)&&(L=this.options.record_delimiter);let _e=pe[J];if(z===!0&&ye.append(_e),(_e===pa0||_e===Aa0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(W!==null&&this.state.quoting===!0&&this.__isEscape(pe,J,_e)&&J+W.length<Ge)if(me){if(this.__isQuote(pe,J+W.length)){this.state.escaping=!0,J+=W.length-1;continue}}else{this.state.escaping=!0,J+=W.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(pe,J))if(this.state.quoting===!0){let p0=pe[J+x.length],V1=y&&this.__isCharTrimable(pe,J+x.length),q0=I!==null&&this.__compareBytes(I,pe,J+x.length,p0),ne=this.__isDelimiter(pe,J+x.length,p0),Qo=L.length===0?this.__autoDiscoverRecordDelimiter(pe,J+x.length):this.__isRecordDelimiter(p0,pe,J+x.length);if(W!==null&&this.__isEscape(pe,J,_e)&&this.__isQuote(pe,J+W.length))J+=W.length-1;else if(!p0||ne||Qo||q0||V1){this.state.quoting=!1,this.state.wasQuoting=!0,J+=x.length-1;continue}else if(O===!1){let un=this.__error(new Ve("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(p0)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(un!==void 0)return un}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(x),J+=x.length-1}else if(this.state.field.length!==0){if(O===!1){let p0=this.__infoField(),V1=Object.keys(x2).map(ne=>x2[ne].equals(this.state.field.toString())?ne:!1).filter(Boolean)[0],q0=this.__error(new Ve("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(p0.column)} at line ${p0.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,V1?`(${V1} bom)`:void 0],this.options,p0,{field:this.state.field}));if(q0!==void 0)return q0}}else{this.state.quoting=!0,J+=x.length-1;continue}if(this.state.quoting===!1){let p0=this.__isRecordDelimiter(_e,pe,J);if(p0!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),J+=p0-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,J+=p0-1;continue}this.info.bytes=this.state.bufBytesStart+J;let ne=this.__onField();if(ne!==void 0)return ne;this.info.bytes=this.state.bufBytesStart+J+p0;let Qo=this.__onRecord(s);if(Qo!==void 0)return Qo;if(B!==-1&&this.info.records>=B){this.state.stop=!0,a();return}}this.state.commenting=!1,J+=p0-1;continue}if(this.state.commenting)continue;if(I!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(I,pe,J,_e)!==0){this.state.commenting=!0;continue}let V1=this.__isDelimiter(pe,J,_e);if(V1!==0){this.info.bytes=this.state.bufBytesStart+J;let q0=this.__onField();if(q0!==void 0)return q0;J+=V1-1;continue}}}if(this.state.commenting===!1&&M!==0&&this.state.record_length+this.state.field.length>M)return this.__error(new Ve("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${M}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let C0=b===!1||th
Line truncated
|
|
|
|
|
`,s),Buffer.from(`
|
|
|
|
|
`,s),Buffer.from("\r",s)];e:for(let c=0;c<a.length;c++){let u=a[c].length;for(let p=0;p<u;p++)if(a[c][p]!==n[o+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:i(function(n){let{encoding:o,raw:s,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,s?this.state.rawBuffer.toString(o):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:i(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:i(function(){let{columns:n,raw:o,encoding:s}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:o?this.state.rawBuffer.toString(s):void 0}},"__infoRecord"),__infoField:i(function(){let{columns:n}=this.options,o=Array.isArray(n),s=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:s,column:o===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var F1=i(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=w4(e),o=i(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),s=i(()=>{},"close"),a=n.parse(t,!0,o,s);if(a!==void 0)throw a;return r},"parse");var c0=class t{static{i(this,"Util")}static getInputList(e,r){return this.getList(_r(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let o=F1(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let s of o)s.length==1?r?.ignoreComma?n.push(s[0]):n.push(...s[0].split(",")):r?.ignoreComma?n.push(s.join(",")):n.push(...s);return n.filter(s=>s).map(s=>r?.trimWhitespace===!1?s:s.trim())}static getInputNumber(e){let r=_r(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let n=0;n<e.length;n++)await r(e[n],n,e)}static isValidURL(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}static isValidRef(e){if(t.isValidURL(e))return!0;for(let r of["git://","github.com/","git@"])if(e.startsWith(r))return!0;return!1}static async powershellCommand(e,r){let n=await it("powershell",!0),o=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),s=[];if(r)for(let a in r)s.push(`-${a} '${r[a].replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${o}' ${s.join(" ")}`]}}static isDirectory(e){try{return nle.default.lstatSync(e).isDirectory()}catch{}return!1}static trimPrefix(e,r){return!e||!r||e.indexOf(r)!==0?e:e.substring(r.length)}static trimSuffix(e,r){if(!e||!r)return e;let n=e.lastIndexOf(r);return n===-1||n+r.length!==e.length?e:e.substring(0,n)}static sleep(e){return new Promise(r=>setTimeout(r,e*1e3))}static hash(e){return _Q.default.createHash("sha256").update(e).digest("hex")}static parseBool(e){if(e===void 0)return!1;switch(e){case"1":case"t":case"T":case"true":case"TRUE":case"True":return!0;case"0":case"f":case"F":case"false":case"FALSE":case"False":return!1;default:throw new Error(`parseBool syntax error: ${e}`)}}static parseBoolOrDefault(e,r=!1){try{return this.parseBool(e)}catch{return r}}static formatFileSize(e){if(e===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+n[o]}static generateRandomString(e=10){return _Q.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return ole.default.compile(e,r)(n)}static stringToUnicodeEntities(e){return Array.from(e).map(r=>`&#x${r.charCodeAt(0).toString(16)};`).join("")}static countLines(e){return e.split(/\r\n|\r|\n/).length}static isPathRelativeTo(e,r){let n=mm.default.resolve(e);return mm.default.resolve(r).startsWith(n.endsWith(mm.default.sep)?n:`${n}${mm.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),n=Math.floor(r/3600),o=Math.floor(r%3600/60),s=r%60,a=[];return n&&a.push(`${n}h`),o&&a.push(`${o}m`),(s||a.length===0)&&a.push(`${s}s`),a.join("")}};var Bt=class t{static{i(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||hm.default.join(sle.default.homedir(),".docker")}static configFile(){let e=hm.default.join(t.configDir,"config.json");if(PQ.default.existsSync(e))return JSON.parse(PQ.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await it("docker",!0).then(e=>(N(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(N(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}ca
Line truncated
|
|
|
|
|
More info: ${u.url}`);let f=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,z=!1;for(let g of a)if(g.remote||g.path.endsWith(p)&&g.content===A){c.push({title:l,message:b,file:g.path,startLine:f}),z=!0;break}z||N(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${p}: ${l}`)}return c}};var Cp=w(require("fs"),1),kQ=w(require("path"),1);var S4=class t{static{i(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new N0,this.iidFilename=`build-iidfile-${c0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${c0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},o=Object.entries(n).filter(([f])=>!r.has(f)),s=c0.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||Ht.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&c0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${a0.serverURL}/${Ht.repo.owner}/${Ht.repo.repo}.git`,u=e?.checksum||n.checksum,p=e?.subdir||n.subdir,A=e?.format;if(!A){if(A="fragment",o.length>0)A="query";else if(c0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(A="query")}catch{}}let l=Ht.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(l=typeof Ht.payload.pull_request?.head?.sha=="string"?Ht.payload.pull_request.head.sha:a);let b=u||l;if(A==="query"){let f=[`ref=${s||u?a:b}`],z=s?b:u;z&&f.push(`checksum=${z}`),p&&p!=="."&&f.push(`subdir=${p}`);for(let[g,y]of o)f.push(`${g}=${y}`);return`${c}?${f.join("&")}`}return`${c}#${b}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return kQ.default.join(s0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(Cp.default.existsSync(e))return Cp.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return kQ.default.join(s0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!Cp.default.existsSync(e))return;let r=Cp.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,o]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!Cp.default.existsSync(o))throw new Error(`secret file ${o} not found`);return[n,o]}let s=s0.tmpName({tmpdir:s0.tmpDir()});return Cp.default.writeFileSync(s,o),[n,s]}static getProvenanceInput(e){let r=_r(e);if(!r)return r;try{return L$(e)?`builder-id=${a0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${a0.workflowRunURL(!0)}`;let r=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(s=>s.trim())[0]=="builder-id")return e;return`${e},builder-id=${a0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",o="",s="",a=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?n=u[1]:u[0]==="repository"?o=u[1]:u[0]==="ghtoken"&&(s=u[1])}return n==="gha"&&(o||(e=`${e},repository=${a0.repository}`),!s&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let n=F1(r.join(`
|
|
|
|
|
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n){if(o.length==1&&!o[0].startsWith("type="))return e=="local";for(let[s,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(s=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=F1(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n)for(let[s,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(s=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=F1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let o of r)for(let s of o)try{let a=c0.parseBool(s);n.push(`disabled=${!a}`)}catch{n.push(s)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),o=e.substring(0,n),s=e.substring(n+1);if(o.length==0||s.length==0)throw new Error(`${e} is not a valid secret`);return r&&$o(s),[o,s]}};var UQ=w(require("fs"),1),ale=w(require("path"),1);var F4=class t{static{i(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new N0,this.metadataFilename=`bake-metadata-${c0.generateRandomString()}.json`}getMetadataFilePath(){return ale.default.join(s0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!UQ.default.existsSync(e))return;let r=UQ.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let n=["bake"],o,s=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!c0.isValidRef(u)){s.push(u);continue}if(o)throw new Error("Only one remote bake definition can be defined");o=u}}o&&n.push(o);for(let u of s)n.push("--file",u);if(e.overrides)for(let u of e.overrides)n.push("--set",u);if(e.vars)for(let u of e.vars)n.push("--var",u);if(e.allow)for(let u of e.allow)n.push("--allow",u);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await Oe.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannot parse bake definitions: ${u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(u.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let o=r.target[n];o.attest&&Array.isArray(o.attest)&&(o.attest=o.attest.map(s=>t.parseAttestEntry(s))),o["cache-from"]&&Array.isArray(o["cache-from"])&&(o["cache-from"]=o["cache-from"].map(s=>t.parseCacheEntry(s))),o["cache-to"]&&Array.isArray(o["cache-to"])&&(o["cache-to"]=o["cache-to"].map(s=>t.parseCacheEntry(s))),o.output&&Array.isArray(o.output)&&(o.output=o.output.map(s=>t.parseExportEntry(s))),o.secret&&Array.isArray(o.secret)&&(o.secret=o.secret.map(s=>t.parseSecretEntry(s))),o.ssh&&Array.isArray(o.ssh)&&(o.ssh=o.ssh.map(s=>t.parseSSHEntry(s)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let[s,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(s){case"type":r.type=a;break;case"disabled":r.disabled=c0.parseBool(a);break;default:r[s]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let o of n){let[s,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());s==="type"?r.type=a:r[s]=a}return r}static parseExportEntry(e){if(typeof e!="string")return e;let r={type:""},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&n[0]===e&&!e.startsWith("type="))return e!=="-"?(r.type="local",r.dest=e,r):(r.type="tar",r.dest=e,r);for(let o of n){let[s,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());s==="type"?r.type=a:r[s]=a}return r}static parseSecretEntry(e){if(typeof e!="string")return e;let r={},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0],o="";for(let s of n){let[a,c]=s.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());switch(a){case"type":o=c;break;case"id":r.id=c;break;case"source":case"src":r.src=c;break;case"env":r.env=c;break}}return o==="env"&&!r.env&&(r.env=r.src,r.src=void 0),r}static parseSSHEntry(e){if(typeof e!="string")return e;let r={},[n,o]=e.split("=",2);return r.id=n,
Line truncated
|
|
|
|
|
`)[0])}static async isHeadDetached(){return await t.exec(["branch","--show-current"]).then(e=>e.length==0)}static async getDetachedRef(){let e=await t.exec(["show","-s","--pretty=%D"]);N(`detached HEAD ref: ${e}`);let r=e.replace(/^grafted, /,"").trim();if(r==="HEAD")return await t.inferRefFromHead();let n=r.match(/^HEAD, (.*)$/);if(!n||!n[1])throw new Error(`Cannot find detached HEAD ref in "${e}"`);let o=n[1].trim();if(o.startsWith("tag: "))return await t.findDetachedTagRef(o,e);if(o.match(/^pull\/\d+\/(head|merge)$/))return`refs/${o}`;let a=o.match(/^[^/]+\/[^/]+, (.+)$/);if(a)return`refs/heads/${a[1].trim()}`;let c=o.match(/^[^/]+\/(.+)$/);if(c)return`refs/heads/${c[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await Oe.getExecOutput("git",e,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr);return r.stdout.trim()})}static async inferRefFromHead(){let e=await t.findContainingRef("refs/heads/");if(e)return e;let r=await t.findContainingRef("refs/remotes/");if(r){let s=r.match(/^refs\/remotes\/[^/]+\/(.+)$/);return s?`refs/heads/${s[1]}`:r}let n=await t.exec(["tag","--contains","HEAD"]),[o]=n.split(`
|
|
|
|
|
`).map(s=>s.trim()).filter(s=>s.length>0);if(o)return`refs/tags/${o}`;throw new Error("Cannot infer ref from detached HEAD")}static async findDetachedTagRef(e,r){let o=(await t.exec(["for-each-ref","--format=%(refname)","--points-at","HEAD","refs/tags/"])).split(`
|
|
|
|
|
`).map(s=>s.trim()).filter(s=>s.length>0).sort((s,a)=>a.length-s.length);for(let s of o){let a=`tag: ${s.slice(10)}`;if(e===a||e.startsWith(`${a}, `))return s}if(o.length===1)return o[0];throw new Error(`Cannot find detached tag ref in "${r}"`)}static async findContainingRef(e){let r=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e]),[n]=r.split(`
|
|
|
|
|
`).map(o=>o.trim()).filter(o=>o.length>0);return n}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var Cbe=require("crypto"),ei=w(require("fs"),1),ti=w(require("path"),1);var Ad=w($Q(),1),ybe=w(l_(),1),ld=w(zbe(),1);var fP=w($Q(),1);var gbe=w(_n(),1);var Obe="application/vnd.oci.empty.v1+json";var Zs=class{static{i(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Oe.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(N(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(N(`Cosign.isAvailable error: ${r}`),!1));return N(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Oe.getExecOutput(this.binPath,["version","--json"],{ignoreReturnCode:!0,silent:!0}).then(e=>{if(e.stderr.length>0&&e.exitCode!=0)throw new Error(e.stderr.trim());return JSON.parse(e.stdout.trim()).gitVersion}),this._version)}async printVersion(){await Oe.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return N("Cosign.versionSatisfies false: undefined version"),!1;let o=gbe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return N(`Cosign.versionSatisfies ${n} statisfies ${e}: ${o}`),o}static parseCommandOutput(e){let r,n,o,s;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let u;try{u=JSON.parse(c)}catch{continue}if(u&&Array.isArray(u.errors)&&u.errors.length>0&&(s=u.errors),!r&&u&&Array.isArray(u.manifests)&&u.manifests.length>0){let p=u.manifests[0];p?.artifactType===fP.BUNDLE_V03_MEDIA_TYPE&&typeof p.digest=="string"?r=p.digest:p?.artifactType===Obe&&typeof p.digest=="string"&&(n=p.digest)}if(!o&&u&&u.mediaType===fP.BUNDLE_V03_MEDIA_TYPE&&(o=u),o&&(r||n)){s=void 0;break}}return{bundle:o,signatureManifestDigest:r||n,errors:s}}};var mP=w(require("fs"),1);var pq=class t{static{i(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new N0}async getCommand(e){return await this.buildx.getCommand(["imagetools",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getCreateCommand(e){return await this.getCommand(["create",...e])}async inspectImage(e){return await this.inspect(e,"{{json .Image}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"config"),r;throw new Error("Unexpected output format")})}async inspectManifest(e){return await this.inspect(e,"{{json .Manifest}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"manifests"),r;throw new Error("Unexpected output format")})}async attestationDescriptors(e){let r=await this.inspectManifest(e);if(typeof r!="object"||r===null||!("manifests"in r)||!Array.isArray(r.manifests))throw new Error(`No descriptor found for ${e.name}`);let n=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return n;let o=e.platform,s=new Map;for(let a of r.manifests)a.digest&&s.set(a.digest,a);return n.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let u=s.get(c);return u?u.platform?.os===o.os&&u.platform?.architecture===o.architecture&&(u.platform?.variant??"")===(o.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],n=s0.tmpName({tmpdir:s0.tmpDir(),template:"imagetools-metadata-XXXXXX"}),o=[],s=[];for(let c of e.sources){if(c.startsWith("cwd://")){let u=c.substring(6);u.length>0&&o.push(u);continue}s.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",n);for(let c of o)r.push("--file",c);for(let c of s)r.push(c);let a=await this.getCreateCommand(r);if(e.skipExec){S(`[command]${a.command} ${a.args.join(" ")}`),S("Skipped create command");return}return await Oe.getExecOutput(a.command,a.args,{ignoreReturnCode:!0,silent:e.silent}).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(c.stderr.trim());if(!e.dryRun){if(!mP.default.existsSync(n))return;let u=mP.default.readFileSync(n,{encoding:"utf-8"}).trim();if(u===""||u==="null")return;let p=JSON.parse(u),A=p["containerimage.descriptor"];return A?{digest:p["containerimage.digest"]||A.digest,descriptor:A,imageNames:p["image.name"]?p["image.name"].split(",").map(l=>l.trim()):[]}:void 0}})}async inspect(e,r,n){let o=await this.getInspectCommand([e.name,"--format",r]);if(!e.retryOnManifestUnknown)return await this.execInspect(o.command,o.args,n);let s=e.retryLimit??15,a;for(let c=0;c<s;c++)try{return await this.execInspect(o.command,o.args,n
Line truncated
|
|
|
|
|
${a.message}`),await new Promise(p=>setTimeout(p,Math.pow(2,c)*100))}throw a??new Error(`ImageTools inspect command failed for ${e.name}`)}async execInspect(e,r,n){return await Oe.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(o=>{if(o.stderr.length>0&&o.exitCode!=0)throw new Error(o.stderr.trim());return n(JSON.parse(o.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown)/i.test(e)||/:\s*not found$/i.test(e)}};var Pp="https://search.sigstore.dev";var Ebe="slsaprovenance1",_c=class t{static{i(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Zs,this.imageTools=e?.imageTools||new pq}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog);for(let o of e.imageNames){let s=await this.imageTools.attestationDigests({name:`${o}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let a of s){let c=`${o}@${a}`;await at(`Signing attestation manifest ${c}`,async()=>{let u=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...n];S(`[command]${this.cosign.binPath} ${[...u,c].join(" ")}`);let p=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...u,c],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),A=Zs.parseCommandOutput(p.stderr.trim());if(p.exitCode!=0)if(A.errors&&A.errors.length>0){let b=A.errors.map(f=>`- [${f.code}] ${f.message} : ${f.detail}`).join(`
|
|
|
|
|
`,s),Buffer.from("\r",s)];e:for(let c=0;c<a.length;c++){let u=a[c].length;for(let p=0;p<u;p++)if(a[c][p]!==n[o+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:i(function(n){let{encoding:o,raw:s,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,s?this.state.rawBuffer.toString(o):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:i(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:i(function(){let{columns:n,raw:o,encoding:s}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:o?this.state.rawBuffer.toString(s):void 0}},"__infoRecord"),__infoField:i(function(){let{columns:n}=this.options,o=Array.isArray(n),s=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:s,column:o===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var F1=i(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=v4(e),o=i(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),s=i(()=>{},"close"),a=n.parse(t,!0,o,s);if(a!==void 0)throw a;return r},"parse");var c0=class t{static{i(this,"Util")}static getInputList(e,r){return this.getList(Pr(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let o=F1(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let s of o)s.length==1?r?.ignoreComma?n.push(s[0]):n.push(...s[0].split(",")):r?.ignoreComma?n.push(s.join(",")):n.push(...s);return n.filter(s=>s).map(s=>r?.trimWhitespace===!1?s:s.trim())}static getInputNumber(e){let r=Pr(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let n=0;n<e.length;n++)await r(e[n],n,e)}static isValidURL(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}static isValidRef(e){if(t.isValidURL(e))return!0;for(let r of["git://","github.com/","git@"])if(e.startsWith(r))return!0;return!1}static async powershellCommand(e,r){let n=await it("powershell",!0),o=e.replace(/'/g,"''"),s=[];if(r)for(let a in r)s.push(`-${a} '${r[a].replace(/'/g,"''")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-EncodedCommand",Buffer.from(`& '${o}' ${s.join(" ")}`,"utf16le").toString("base64")]}}static isDirectory(e){try{return qle.default.lstatSync(e).isDirectory()}catch{}return!1}static trimPrefix(e,r){return!e||!r||e.indexOf(r)!==0?e:e.substring(r.length)}static trimSuffix(e,r){if(!e||!r)return e;let n=e.lastIndexOf(r);return n===-1||n+r.length!==e.length?e:e.substring(0,n)}static sleep(e){return new Promise(r=>setTimeout(r,e*1e3))}static hash(e){return jQ.default.createHash("sha256").update(e).digest("hex")}static parseBool(e){if(e===void 0)return!1;switch(e){case"1":case"t":case"T":case"true":case"TRUE":case"True":return!0;case"0":case"f":case"F":case"false":case"FALSE":case"False":return!1;default:throw new Error(`parseBool syntax error: ${e}`)}}static parseBoolOrDefault(e,r=!1){try{return this.parseBool(e)}catch{return r}}static formatFileSize(e){if(e===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+n[o]}static generateRandomString(e=10){return jQ.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return Dle.default.compile(e,r)(n)}static stringToUnicodeEntities(e){return Array.from(e).map(r=>`&#x${r.charCodeAt(0).toString(16)};`).join("")}static countLines(e){return e.split(/\r\n|\r|\n/).length}static isPathRelativeTo(e,r){let n=Oh.default.resolve(e);return Oh.default.resolve(r).startsWith(n.endsWith(Oh.default.sep)?n:`${n}${Oh.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),n=Math.floor(r/3600),o=Math.floor(r%3600/60),s=r%60,a=[];return n&&a.push(`${n}h`),o&&a.push(`${o}m`),(s||a.length===0)&&a.push(`${s}s`),a.join("")}};var Bt=class t{static{i(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||Eh.default.join(Ile.default.homedir(),".docker")}static configFile(){let e=Eh.default.join(t.configDir,"config.json");if(KQ.default.existsSync(e))return JSON.parse(KQ.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await it("docker",!0).then(e=>(N(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(N(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0
Line truncated
|
|
|
|
|
${n}`)},"onRetry")})}static isPullTransientError(e){return/Client\.Timeout exceeded|TLS handshake timeout|i\/o timeout|context deadline exceeded|request canceled|connection reset by peer|connection refused|connection timed out|temporary failure|unexpected EOF|\bEOF\b|server misbehaving/i.test(e)||/\b(500|502|503|504)\b/.test(e)||/\b(service unavailable|bad gateway|gateway timeout|internal server error)\b/i.test(e)}};var m0=class t{static{i(this,"Buildx")}_version;_versionOnce;_standalone;static containerNamePrefix="buildx_buildkit_";constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}static get configDir(){return process.env.BUILDX_CONFIG||mr.default.join(Bt.configDir,"buildx")}static get refsDir(){return mr.default.join(t.configDir,"refs")}static get refsGroupDir(){return mr.default.join(t.refsDir,"__group__")}static get certsDir(){return mr.default.join(t.configDir,"certs")}async isStandalone(){let e=this._standalone??!await Bt.isAvailable();return N(`Buildx.isStandalone: ${e}`),e}async getCommand(e){let r=await this.isStandalone();return{command:r?"buildx":"docker",args:r?e:["buildx",...e]}}async isAvailable(){let e=await this.getCommand([]),r=await Oe.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(N(`Buildx.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(N(`Buildx.isAvailable error: ${n}`),!1));return N(`Buildx.isAvailable: ${r}`),r}async version(){if(this._versionOnce)return this._version;this._versionOnce=!0;let e=await this.getCommand(["version"]);return this._version=await Oe.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr.trim());return t.parseVersion(r.stdout.trim())}),this._version}async printVersion(){let e=await this.getCommand(["version"]);await Oe.exec(e.command,e.args,{failOnStdErr:!1})}static parseVersion(e){let r=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!r)throw new Error("Cannot parse buildx version");return r[1]}static getErrorMessage(e){let r=(0,wle.stripVTControlCharacters)(e).split(/[\r\n]/),n="";for(let o=r.length-1;o>=0;o--){let s=r[o].trim();if(s.startsWith("ERROR:"))return s.slice(6).trim()||"unknown error";n||=s}return n||"unknown error"}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return N("Buildx.versionSatisfies false: undefined version"),!1;let o=Sle.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return N(`Buildx.versionSatisfies ${n} statisfies ${e}: ${o}`),o}static resolveCertsDriverOpts(e,r,n){let o;try{o=new URL(r)}catch{return[]}if(o.protocol!="tcp:")return[];let s=[];if(Object.keys(n).length==0)return s;let a=o.hostname;if(o.port.length>0&&(a+=`-${o.port}`),n.cacert!==void 0){let c=mr.default.join(t.certsDir,`cacert_${a}.pem`);Hn.default.writeFileSync(c,n.cacert),s.push(`cacert=${c}`)}if(n.cert!==void 0){let c=mr.default.join(t.certsDir,`cert_${a}.pem`);Hn.default.writeFileSync(c,n.cert),s.push(`cert=${c}`)}if(n.key!==void 0){let c=mr.default.join(t.certsDir,`key_${a}.pem`);Hn.default.writeFileSync(c,n.key),s.push(`key=${c}`)}return e!="remote"?[]:s}static localState(e,r){let[n,o,s]=e.split("/");if(!n||!o||!s)throw new Error(`Invalid build reference: ${e}`);let a=mr.default.join(r||t.refsDir,n,o,s);if(!Hn.default.existsSync(a))throw new Error(`Local state not found in ${a}`);return t.fixLocalState(JSON.parse(Hn.default.readFileSync(a,"utf8")))}static fixLocalState(e){let r=i(function(a){let c=a.match(/(.*)(https?:\/{1,2}\S+|ssh:\/{1,2}\S+|git:\/{1,2}\S+)/i);if(c&&c.length==3){let u=c[1],p=c[2];return p.startsWith("https:/")&&!p.startsWith("https://")&&(p=p.replace("https:/","https://")),p.startsWith("http:/")&&!p.startsWith("http://")&&(p=p.replace("http:/","http://")),p.startsWith("ssh:/")&&!p.startsWith("ssh://")&&(p=p.replace("ssh:/","ssh://")),p.startsWith("git:/")&&!p.startsWith("git://")&&(p=p.replace("git:/","git://")),[p,u,!0]}return[a,"",!1]},"fnTrimToValidContext"),[n,o,s]=r(e.LocalPath);return s&&(e.LocalPath=n,e.DockerfilePath.indexOf(o)===0&&(e.DockerfilePath=e.DockerfilePath.substring(o.length))),e.LocalPath=e.LocalPath.endsWith("/-")?"-":e.LocalPath,e.DockerfilePath=e.DockerfilePath.endsWith("/-")?"-":e.DockerfilePath,e}static refs(e,r={}){let{dir:n,builderName:o,nodeName:s,since:a}=e,c=mr.default.resolve(n);if(e.builderName&&(c=mr.default.join(c,e.builderName)),e.nodeName&&(c=mr.default.join(c,e.nodeName)),!Hn.default.existsSync(c))return r;let u=Hn.default.readdirSync(c);for(let p of u){let A=mr.default.join(c,p),l=Hn.default.statSync(A);if(l.isDirectory()){let b={...e};if(o)s||(b.nodeName=p);else{if(p==="__group__")continue;b.builderName=p}t.refs(b,r)}else{if(a&&l.mtime<a)continue;let b=t.fixLocalState(JSON.parse(Hn.default.readFileSync(A,"utf8"))),M=`${o}/${s}/${p}`;r[M]=b}}return r}static async convertWarningsToGitHubAnnotations(e,r,n){if(e.length===0)return;let o=i(function(u){try{return $y.parseURL(u)}catch{}},"fnGitURL"),s=i(function
Line truncated
|
|
|
|
|
More info: ${u.url}`);let M=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,z=!1;for(let O of a)if(O.remote||O.path.endsWith(p)&&O.content===A){c.push({title:l,message:b,file:O.path,startLine:M}),z=!0;break}z||N(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${p}: ${l}`)}return c}};var Bp=w(require("fs"),1),ZQ=w(require("path"),1);var L4=class t{static{i(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new m0,this.iidFilename=`build-iidfile-${c0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${c0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},o=Object.entries(n).filter(([M])=>!r.has(M)),s=c0.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||Ht.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&c0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${a0.serverURL}/${Ht.repo.owner}/${Ht.repo.repo}.git`,u=e?.checksum||n.checksum,p=e?.subdir||n.subdir,A=e?.format;if(!A){if(A="fragment",o.length>0)A="query";else if(c0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(A="query")}catch{}}let l=Ht.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(l=typeof Ht.payload.pull_request?.head?.sha=="string"?Ht.payload.pull_request.head.sha:a);let b=u||l;if(A==="query"){let M=[`ref=${s||u?a:b}`],z=s?b:u;z&&M.push(`checksum=${z}`),p&&p!=="."&&M.push(`subdir=${p}`);for(let[O,y]of o)M.push(`${O}=${y}`);return`${c}?${M.join("&")}`}return`${c}#${b}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return ZQ.default.join(s0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(Bp.default.existsSync(e))return Bp.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return ZQ.default.join(s0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!Bp.default.existsSync(e))return;let r=Bp.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,o]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!Bp.default.existsSync(o))throw new Error(`secret file ${o} not found`);return[n,o]}let s=s0.tmpName({tmpdir:s0.tmpDir()});return Bp.default.writeFileSync(s,o),[n,s]}static getProvenanceInput(e){let r=Pr(e);if(!r)return r;try{return Yj(e)?`builder-id=${a0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${a0.workflowRunURL(!0)}`;let r=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(s=>s.trim())[0]=="builder-id")return e;return`${e},builder-id=${a0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",o="",s="",a=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?n=u[1]:u[0]==="repository"?o=u[1]:u[0]==="ghtoken"&&(s=u[1])}return n==="gha"&&(o||(e=`${e},repository=${a0.repository}`),!s&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let n=F1(r.join(`
|
|
|
|
|
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n){if(o.length==1&&!o[0].startsWith("type="))return e=="local";for(let[s,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(s=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=F1(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n)for(let[s,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(s=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=F1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let o of r)for(let s of o)try{let a=c0.parseBool(s);n.push(`disabled=${!a}`)}catch{n.push(s)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),o=e.substring(0,n),s=e.substring(n+1);if(o.length==0||s.length==0)throw new Error(`${e} is not a valid secret`);return r&&Zo(s),[o,s]}};var e8=w(require("fs"),1),Fle=w(require("path"),1);var Q4=class t{static{i(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new m0,this.metadataFilename=`bake-metadata-${c0.generateRandomString()}.json`}getMetadataFilePath(){return Fle.default.join(s0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!e8.default.existsSync(e))return;let r=e8.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let n=["bake"],o,s=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!c0.isValidRef(u)){s.push(u);continue}if(o)throw new Error("Only one remote bake definition can be defined");o=u}}o&&n.push(o);for(let u of s)n.push("--file",u);if(e.overrides)for(let u of e.overrides)n.push("--set",u);if(e.vars)for(let u of e.vars)n.push("--var",u);if(e.allow)for(let u of e.allow)n.push("--allow",u);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await Oe.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannot parse bake definitions: ${m0.getErrorMessage(u.stderr)}`);return t.parseDefinition(u.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let o=r.target[n];o.attest&&Array.isArray(o.attest)&&(o.attest=o.attest.map(s=>t.parseAttestEntry(s))),o["cache-from"]&&Array.isArray(o["cache-from"])&&(o["cache-from"]=o["cache-from"].map(s=>t.parseCacheEntry(s))),o["cache-to"]&&Array.isArray(o["cache-to"])&&(o["cache-to"]=o["cache-to"].map(s=>t.parseCacheEntry(s))),o.output&&Array.isArray(o.output)&&(o.output=o.output.map(s=>t.parseExportEntry(s))),o.secret&&Array.isArray(o.secret)&&(o.secret=o.secret.map(s=>t.parseSecretEntry(s))),o.ssh&&Array.isArray(o.ssh)&&(o.ssh=o.ssh.map(s=>t.parseSSHEntry(s)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let[s,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(s){case"type":r.type=a;break;case"disabled":r.disabled=c0.parseBool(a);break;default:r[s]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let o of n){let[s,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());s==="type"?r.type=a:r[s]=a}return r}static parseExportEntry(e){if(typeof e!="string")return e;let r={type:""},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&n[0]===e&&!e.startsWith("type="))return e!=="-"?(r.type="local",r.dest=e,r):(r.type="tar",r.dest=e,r);for(let o of n){let[s,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());s==="type"?r.type=a:r[s]=a}return r}static parseSecretEntry(e){if(typeof e!="string")return e;let r={},n=F1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0],o="";for(let s of n){let[a,c]=s.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());switch(a){case"type":o=c;break;case"id":r.id=c;break;case"source":case"src":r.src=c;break;case"env":r.env=c;break}}return o==="env"&&!r.env&&(r.env=r.src,r.src=void 0),r}static parseSSHEntry(e){if(typeof e!="string")return e;let r={},[n,o]=e.split("=",2);return r.id=n,o&&(r.paths=o.split(",")),r}
Line truncated
|
|
|
|
|
`)[0])}static async isHeadDetached(e){return await t.exec(["branch","--show-current"],e).then(r=>r.length==0)}static async getDetachedRef(e){let r=await t.exec(["show","-s","--pretty=%D"],e);N(`detached HEAD ref: ${r}`);let n=r.replace(/^grafted, /,"").trim();if(n==="HEAD")return await t.inferRefFromHead(e);let o=n.match(/^HEAD, (.*)$/);if(!o||!o[1])throw new Error(`Cannot find detached HEAD ref in "${r}"`);let s=o[1].trim();if(s.startsWith("tag: "))return await t.findDetachedTagRef(s,r,e);if(s.match(/^pull\/\d+\/(head|merge)$/))return`refs/${s}`;let c=s.match(/^[^/]+\/[^/]+, (.+)$/);if(c)return`refs/heads/${c[1].trim()}`;let u=s.match(/^[^/]+\/(.+)$/);if(u)return`refs/heads/${u[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${r}"`)}static async exec(e=[],r){return await Oe.getExecOutput("git",e,{cwd:r,ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr);return n.stdout.trim()})}static async inferRefFromHead(e){let r=await t.findContainingRef("refs/heads/",e);if(r)return r;let n=await t.findContainingRef("refs/remotes/",e);if(n){let a=n.match(/^refs\/remotes\/[^/]+\/(.+)$/);return a?`refs/heads/${a[1]}`:n}let o=await t.exec(["tag","--contains","HEAD"],e),[s]=o.split(`
|
|
|
|
|
`).map(a=>a.trim()).filter(a=>a.length>0);return s?`refs/tags/${s}`:""}static async findDetachedTagRef(e,r,n){let s=(await t.exec(["for-each-ref","--format=%(refname)","--points-at","HEAD","refs/tags/"],n)).split(`
|
|
|
|
|
`).map(a=>a.trim()).filter(a=>a.length>0).sort((a,c)=>c.length-a.length);for(let a of s){let c=`tag: ${a.slice(10)}`;if(e===c||e.startsWith(`${c}, `))return a}if(s.length===1)return s[0];throw new Error(`Cannot find detached tag ref in "${r}"`)}static async findContainingRef(e,r){let n=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e],r),[o]=n.split(`
|
|
|
|
|
`).map(s=>s.trim()).filter(s=>s.length>0);return o}static async commitDate(e,r){return new Date(await t.exec(["show","-s",'--format="%ci"',e],r))}};var Jbe=require("crypto"),ti=w(require("fs"),1),ri=w(require("path"),1);var dd=w(c8(),1),$be=w(C_(),1),bd=w(Gbe(),1);var Xbe=require("util");var qP=w(c8(),1);var Vbe=w(Pn(),1);var Hbe="application/vnd.oci.empty.v1+json";var yr=class{static{i(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Oe.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(N(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(N(`Cosign.isAvailable error: ${r}`),!1));return N(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Oe.getExecOutput(this.binPath,["version","--json"],{ignoreReturnCode:!0,silent:!0}).then(e=>{if(e.stderr.length>0&&e.exitCode!=0)throw new Error(e.stderr.trim());return JSON.parse(e.stdout.trim()).gitVersion}),this._version)}async printVersion(){await Oe.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}static getErrorMessage(e){let r=(0,Xbe.stripVTControlCharacters)(e).split(/[\r\n]/);for(let n=r.length-1;n>=0;n--){let o=r[n].trim();if(o)return o}return"unknown error"}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return N("Cosign.versionSatisfies false: undefined version"),!1;let o=Vbe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return N(`Cosign.versionSatisfies ${n} statisfies ${e}: ${o}`),o}static parseCommandOutput(e){let r,n,o,s;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let u;try{u=JSON.parse(c)}catch{continue}if(u&&Array.isArray(u.errors)&&u.errors.length>0&&(s=u.errors),!r&&u&&Array.isArray(u.manifests)&&u.manifests.length>0){let p=u.manifests[0];p?.artifactType===qP.BUNDLE_V03_MEDIA_TYPE&&typeof p.digest=="string"?r=p.digest:p?.artifactType===Hbe&&typeof p.digest=="string"&&(n=p.digest)}if(!o&&u&&u.mediaType===qP.BUNDLE_V03_MEDIA_TYPE&&(o=u),o&&(r||n)){s=void 0;break}}return{bundle:o,signatureManifestDigest:r||n,errors:s}}};var DP=w(require("fs"),1);var mq=class t{static{i(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new m0}async getCommand(e){return await this.buildx.getCommand(["imagetools",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getCreateCommand(e){return await this.getCommand(["create",...e])}async inspectImage(e){return await this.inspect(e,"{{json .Image}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"config"),r;throw new Error("Unexpected output format")})}async inspectManifest(e){return await this.inspect(e,"{{json .Manifest}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"manifests"),r;throw new Error("Unexpected output format")})}async attestationDescriptors(e){let r=await this.inspectManifest(e);if(typeof r!="object"||r===null||!("manifests"in r)||!Array.isArray(r.manifests))throw new Error(`No descriptor found for ${e.name}`);let n=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return n;let o=e.platform,s=new Map;for(let a of r.manifests)a.digest&&s.set(a.digest,a);return n.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let u=s.get(c);return u?u.platform?.os===o.os&&u.platform?.architecture===o.architecture&&(u.platform?.variant??"")===(o.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],n=s0.tmpName({tmpdir:s0.tmpDir(),template:"imagetools-metadata-XXXXXX"}),o=[],s=[];for(let c of e.sources){if(c.startsWith("cwd://")){let u=c.substring(6);u.length>0&&o.push(u);continue}s.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",n);for(let c of o)r.push("--file",c);for(let c of s)r.push(c);let a=await this.getCreateCommand(r);if(e.skipExec){S(`[command]${a.command} ${a.args.join(" ")}`),S("Skipped create command");return}return await Oe.getExecOutput(a.command,a.args,{ignoreReturnCode:!0,silent:e.silent}).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(c.stderr.trim());if(!e.dryRun){if(!DP.default.existsSync(n))return;let u=DP.default.readFileSync(n,{encoding:"utf-8"}).trim();if(u===""||u==="null")return;let p=JSON.parse(u),A=p["containerimage.descriptor"];return A?{digest:p["containerimage.digest"]||A.digest,descriptor:A,imageNames:p["image.name"]?p["image.name"].split(",").map(l=>l.trim()):[]}:void 0}})}async inspect(e,r,n){let o=await this.getInspectCommand([e
Line truncated
|
|
|
|
|
${a.message}`),await new Promise(p=>setTimeout(p,Math.pow(2,c)*100))}throw a??new Error(`ImageTools inspect command failed for ${e.name}`)}async execInspect(e,r,n){return await Oe.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(o=>{if(o.stderr.length>0&&o.exitCode!=0)throw new Error(o.stderr.trim());return n(JSON.parse(o.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown)/i.test(e)||/:\s*not found$/i.test(e)}};var ld="https://search.sigstore.dev";var Ybe="slsaprovenance1",Pc=class t{static{i(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new yr,this.imageTools=e?.imageTools||new mq}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n={noTransparencyLog:e.noTransparencyLog,rekorV2:e.rekorV2},o=await this.cosignSigningConfigArgs(n);for(let s of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${s}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let u=`${s}@${c}`;await at(`Signing attestation manifest ${u}`,async()=>{let p=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1",...await this.bundleFormatArgs(),...o];S(`[command]${this.cosign.binPath} ${[...p,u].join(" ")}`);let A=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...p,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),l=yr.parseCommandOutput(A.stderr.trim());if(A.exitCode!=0)if(l.errors&&l.errors.length>0){let M=l.errors.map(z=>`- [${z.code}] ${z.message} : ${z.detail}`).join(`
|
|
|
|
|
`);throw new Error(`Cosign sign command failed with errors:
|
|
|
|
|
${b}`)}else throw new Error(`Cosign sign command failed with: ${p.stderr.trim().split(/\r?\n/).filter(b=>b.length>0).pop()??"unknown error"}`);let l=t.parseBundle((0,Ad.bundleFromJSON)(A.bundle));l.tlogID&&S(`Uploaded to Rekor transparency log: ${Pp}?logIndex=${l.tlogID}`),S(`Signature manifest pushed: https://oci.dag.dev/?referrers=${c}`),r[c]={...l,imageName:o}})}}}catch(n){throw new Error(`Signing BuildKit attestation manifests failed: ${n.message}`)}return r}async verifySignedManifests(e,r){let n={};for(let[o,s]of Object.entries(e))await at(`Verifying signature of ${o}`,async()=>{let a=await this.verifyImageAttestation(o,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!s.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});S(`Signature manifest verified: https://oci.dag.dev/?image=${s.imageName}@${a.signatureManifestDigest}`),n[o]=a});return n}async verifyImageAttestations(e,r){let n={},o=await this.imageTools.attestationDigests({name:e,platform:r.platform,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});if(o.length===0)throw new Error(`No attestation manifests found for ${e}`);let s=e.split(":",1)[0];for(let a of o){let c=`${s}@${a}`,u=await this.verifyImageAttestation(c,r);S(`Signature manifest verified: https://oci.dag.dev/?image=${s}@${u.signatureManifestDigest}`),n[c]=u}return n}async verifyImageAttestation(e,r){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed manifests");let n=["verify","--experimental-oci11","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];if(r.noTransparencyLog&&n.push("--use-signed-timestamps","--insecure-ignore-tlog"),!r.retryOnManifestUnknown){S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);let a=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})});if(a.exitCode!==0)throw new Error(`Cosign verify command failed with: ${a.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`);let c=Zs.parseCommandOutput(a.stderr.trim());return{cosignArgs:n,signatureManifestDigest:c.signatureManifestDigest}}let o=r.retryLimit??15,s;S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);for(let a=0;a<o;a++){let c=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),u=Zs.parseCommandOutput(c.stderr.trim());if(c.exitCode===0)return{cosignArgs:n,signatureManifestDigest:u.signatureManifestDigest};if(u.errors&&u.errors.length>0){let p=u.errors.map(A=>`- [${A.code}] ${A.message} : ${A.detail}`).join(`
|
|
|
|
|
${M}`)}else throw new Error(`Cosign sign command failed with: ${yr.getErrorMessage(A.stderr)}`);let b=t.parseBundle((0,dd.bundleFromJSON)(l.bundle));b.tlogID&&await this.logTransparencyUpload(b.tlogID,n),S(`Signature manifest pushed: https://oci.dag.dev/?referrers=${u}`),r[u]={...b,imageName:s}})}}}catch(n){throw new Error(`Signing BuildKit attestation manifests failed: ${n.message}`)}return r}async verifySignedManifests(e,r){let n={};for(let[o,s]of Object.entries(e))await at(`Verifying signature of ${o}`,async()=>{let a=await this.verifyImageAttestation(o,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!s.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});S(`Signature manifest verified: https://oci.dag.dev/?image=${s.imageName}@${a.signatureManifestDigest}`),n[o]=a});return n}async verifyImageAttestations(e,r){let n={},o=await this.imageTools.attestationDigests({name:e,platform:r.platform,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});if(o.length===0)throw new Error(`No attestation manifests found for ${e}`);let s=e.split(":",1)[0];for(let a of o){let c=`${s}@${a}`,u=await this.verifyImageAttestation(c,r);S(`Signature manifest verified: https://oci.dag.dev/?image=${s}@${u.signatureManifestDigest}`),n[c]=u}return n}async verifyImageAttestation(e,r){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed manifests");let n=["verify","--experimental-oci11",...await this.bundleFormatArgs(),"--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];if(r.noTransparencyLog&&n.push("--use-signed-timestamps","--insecure-ignore-tlog"),!r.retryOnManifestUnknown){S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);let a=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})});if(a.exitCode!==0)throw new Error(`Cosign verify command failed with: ${yr.getErrorMessage(a.stderr)}`);let c=yr.parseCommandOutput(a.stderr.trim());return{cosignArgs:n,signatureManifestDigest:c.signatureManifestDigest}}let o=r.retryLimit??15,s;S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);for(let a=0;a<o;a++){let c=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),u=yr.parseCommandOutput(c.stderr.trim());if(c.exitCode===0)return{cosignArgs:n,signatureManifestDigest:u.signatureManifestDigest};if(u.errors&&u.errors.length>0){let p=u.errors.map(A=>`- [${A.code}] ${A.message} : ${A.detail}`).join(`
|
|
|
|
|
`);if(s=new Error(`Cosign verify command failed with errors:
|
|
|
|
|
${p}`),u.errors.some(A=>A.code==="MANIFEST_UNKNOWN"))S(`Cosign verify command failed with MANIFEST_UNKNOWN, retrying attempt ${a+1}/${o}...
|
|
|
|
|
${p}`),await new Promise(A=>setTimeout(A,Math.pow(2,a)*100));else throw s}else throw new Error(`Cosign verify command failed with: ${c.stderr.trim().split(/\r?\n/).filter(p=>p.length>0).pop()??"unknown error"}`)}throw s}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog),o=t.getProvenanceBlobs(e);for(let s of Object.keys(o))await at(`Signing ${s}`,async()=>{let a=o[s],c=ti.default.join(ti.default.dirname(s),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(a);if(u.length===0){Ke(`No subjects found in provenance ${s}, skip signing.`);return}let p=ti.default.join(ti.default.dirname(s),u[0].name),A=["attest-blob","--yes","--oidc-provider","github-actions","--new-bundle-format","--statement",s,"--type",Ebe,"--bundle",c,...n];S(`[command]${this.cosign.binPath} ${[...A,p].join(" ")}`);let l=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...A,p],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),b=Zs.parseCommandOutput(l.stderr.trim());if(l.exitCode!=0)if(b.errors&&b.errors.length>0){let z=b.errors.map(g=>`- [${g.code}] ${g.message} : ${g.detail}`).join(`
|
|
|
|
|
${p}`),await new Promise(A=>setTimeout(A,Math.pow(2,a)*100));else throw s}else throw new Error(`Cosign verify command failed with: ${yr.getErrorMessage(c.stderr)}`)}throw s}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n={noTransparencyLog:e.noTransparencyLog,rekorV2:e.rekorV2},o=await this.cosignSigningConfigArgs(n),s=t.getProvenanceBlobs(e);for(let a of Object.keys(s))await at(`Signing ${a}`,async()=>{let c=s[a],u=ri.default.join(ri.default.dirname(a),`${e.name??"provenance"}.sigstore.json`),p=t.getProvenanceSubjects(c);if(p.length===0){r0(`No subjects found in provenance ${a}, skip signing.`);return}let A=ri.default.join(ri.default.dirname(a),p[0].name),l=["attest-blob","--yes","--oidc-provider","github-actions",...await this.bundleFormatArgs(),"--statement",a,"--type",Ybe,"--bundle",u,...o];S(`[command]${this.cosign.binPath} ${[...l,A].join(" ")}`);let b=await Oe.getExecOutput(this.cosign.binPath,["--verbose",...l,A],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),M=yr.parseCommandOutput(b.stderr.trim());if(b.exitCode!=0)if(M.errors&&M.errors.length>0){let O=M.errors.map(y=>`- [${y.code}] ${y.message} : ${y.detail}`).join(`
|
|
|
|
|
`);throw new Error(`Cosign attest-blob command failed with errors:
|
|
|
|
|
${z}`)}else throw new Error(`Cosign attest-blob command failed with: ${l.stderr.trim().split(/\r?\n/).filter(z=>z.length>0).pop()??"unknown error"}`);let f=t.parseBundle((0,Ad.bundleFromJSON)(JSON.parse(ei.default.readFileSync(c,{encoding:"utf-8"}))));S("Provenance blob signed for:");for(let z of u){let[g,y]=Object.entries(z.digest)[0]||[];S(` - ${z.name} (${g}:${y})`)}f.tlogID&&S(`Attestation signature uploaded to Rekor transparency log: ${Pp}?logIndex=${f.tlogID}`),S(`Sigstore bundle written to: ${c}`),r[s]={...f,bundlePath:c,subjects:u}})}catch(n){throw new Error(`Signing BuildKit provenance blobs failed: ${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[o,s]of Object.entries(e)){let a=ti.default.dirname(o);await at(`Verifying signature bundle ${s.bundlePath}`,async()=>{for(let c of s.subjects){let u=ti.default.join(a,c.name);S(`Verifying signed artifact ${u}`);let p=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??Ebe];(r.noTransparencyLog||!s.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let A=await Oe.getExecOutput(this.cosign.binPath,[...p,"--bundle",s.bundlePath,u],{ignoreReturnCode:!0});if(A.stderr.length>0&&A.exitCode!=0)throw new Error(A.stderr);n[u]={bundlePath:s.bundlePath,cosignArgs:p}}})}return n}async verifyArtifact(e,r,n){S("Verifying keyless verification bundle signature");let o=JSON.parse(ei.default.readFileSync(r,"utf-8")),s=(0,Ad.bundleFromJSON)(o);S("Fetching Sigstore TUF trusted root metadata");let a=await ybe.getTrustedRoot(),c=(0,ld.toTrustMaterial)(a);try{S("Verifying artifact signature");let u=(0,ld.toSignedEntity)(s,ei.default.readFileSync(e)),p=t.parseCertificate(s),A=s.verificationMaterial.tlogEntries,l=A.length>0?A[0].logIndex:void 0;if(n?.subjectAlternativeName&&n?.subjectAlternativeName instanceof RegExp){let z=p.subjectAltName?.replace(/^uri:/i,"");if(z){if(!z.match(n.subjectAlternativeName))throw new Error(`Signing certificate subjectAlternativeName "${z}" does not match expected pattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let f=new ld.Verifier(c).verify(u,{subjectAlternativeName:n?.subjectAlternativeName&&typeof n.subjectAlternativeName=="string"?n.subjectAlternativeName:void 0,extensions:n?.issuer?{issuer:n.issuer}:void 0});return N(`Sigstore.verifyArtifact signer: ${JSON.stringify(f)}`),{payload:o,certificate:p.toString(),tlogID:l}}catch(u){throw new Error(`Failed to verify artifact signature: ${u}`)}}static noTransparencyLog(e){return e??a0.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e);return S(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")?await at("Creating Sigstore protobuf signing config",async()=>{let o=s0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:s0.tmpDir()}),s=["signing-config","create","--with-default-services=true",`--out=${o}`];n&&s.push("--no-default-rekor=true"),await Oe.exec(this.cosign.binPath,s,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),S(JSON.stringify(JSON.parse(ei.default.readFileSync(o,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${o}`)}):(r.push("--use-signing-config"),n&&r.push("--tlog-upload=false")),r}static getProvenanceBlobs(e){let r=ti.default.join(e.localExportDir,"provenance.json");if(ei.default.existsSync(r))return{[r]:ei.default.readFileSync(r)};let n=ei.default.readdirSync(e.localExportDir,{withFileTypes:!0}),o=n.filter(s=>s.isDirectory());if(o.length>0&&o.length===n.length&&o.every(s=>ei.default.existsSync(ti.default.join(e.localExportDir,s.name,"provenance.json")))){let s={};for(let a of o){let c=ti.default.join(e.localExportDir,a.name,"provenance.json");s[c]=ei.default.readFileSync(c)}return s}throw new Error(`No valid provenance.json found in ${e.localExportDir}`)}static getProvenanceSubjects(e){return JSON.parse(e.toString()).subject.map(n=>({name:n.name,digest:n.digest}))}static parseBundle(e){let r=t.parseCertificate(e),n=e.verificationMaterial.tlogEntries,o=n.length>0?n[0].logIndex:void 0;return{payload:(0,Ad.bundleToJSON)(e),certificate:r.toString(),tlogID:o}}static parseCertificate(e){let r;switch(e.verificationMaterial.content.$case){case"x509CertificateChain":r=e.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes;break;case"certificate":r=e.verificationMaterial.content.certificate.rawBytes;break;default:throw new Error("Bundle must contain an x509 certificate")}return new Cbe.X509Certificate(r)}};var Aq=class t{static{i(this,"Install")}standalone;githubToken;sigstore;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.sigstore=e?.sigstore||new _c}
Line truncated
|
|
|
|
|
`)){let[p,...A]=u.split(":"),l=p.toLowerCase(),b=A.map(f=>f.trim()).join(":");if(p.length!=0)switch(!0){case l=="name":n=void 0,r.name==null?r.name=b:(s&&o.gcPolicy&&(o.gcPolicy.push(s),s=void 0),o.name&&r.nodes.push(o),o={name:b});break;case l=="driver":n=void 0,r.driver=b;break;case l=="last activity":n=void 0,r.lastActivity=new Date(b);break;case l=="endpoint":n=void 0,o.endpoint=b;break;case l=="driver options":n=void 0,o["driver-opts"]=(b.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map(f=>f.replace(/^(.*)="(.*)"$/g,"$1=$2"));break;case l=="status":n=void 0,o.status=b;break;case l=="buildkit daemon flags":case l=="flags":n=void 0,o["buildkitd-flags"]=b;break;case l=="buildkit version":case l=="buildkit":n=void 0,o.buildkit=b;break;case l=="platforms":{if(n=void 0,!b)break;let f=[];if(b.includes("*"))for(let z of b.split(", "))z.includes("*")&&f.push(z.replace(/\*/g,""));else f=b.split(", ");o.platforms=f.join(",");break}case l=="features":n="features",o.features={};break;case l=="labels":n="label",o.labels={};break;case l=="devices":n="devices",o.devices=o.devices||[];break;case l.startsWith("gc policy rule#"):n="gcpolicy",o.gcPolicy&&s&&(o.gcPolicy.push(s),s=void 0);break;case l.startsWith("file#"):n="file",c=p.split("#")[1],o.files=o.files||{},o.files[c]="";break;default:switch(n&&n!=="devices"&&o.devices&&a&&(o.devices.push(a),a=void 0),n||""){case"features":{o.features=o.features||{},o.features[p.trim()]=!!b;break}case"label":{o.labels=o.labels||{},o.labels[p.trim()]=b;break}case"devices":{switch(l.trim()){case"name":{o.devices&&a&&o.devices.push(a),a={},a.name=b;break}case"on-demand":{a&&b&&(a.onDemand=b=="true");break}case"automatically allowed":{a&&b&&(a.autoAllow=b=="true");break}case"annotations":{a&&(a.annotations=a.annotations||{});break}default:a&&a.annotations&&(a.annotations[p.trim()]=b)}break}case"gcpolicy":{switch(o.gcPolicy=o.gcPolicy||[],s=s||{},l.trim()){case"all":{s.all=b=="true";break}case"filters":{b&&(s.filter=b.split(","));break}case"keep duration":{s.keepDuration=b;break}case"keep bytes":{s.keepBytes=b;break}case"reserved space":{s.reservedSpace=b;break}case"max used space":{s.maxUsedSpace=b;break}case"min free space":{s.minFreeSpace=b;break}}break}case"file":{c&&o.files&&(o.files[c].length>0&&(o.files[c]+=`
|
|
|
|
|
`),o.files[c]+=u.replace(/^\s>\s?/,""));break}}}}return a&&o.devices&&o.devices.push(a),s&&o.gcPolicy&&o.gcPolicy.push(s),o.name&&r.nodes.push(o),r}};var Bbe=w(_n(),1);var lq=w(require("fs"),1);var dq=class{static{i(this,"Config")}resolveFromString(e){return this.resolve(e,!1)}resolveFromFile(e){return this.resolve(e,!0)}resolve(e,r){if(r){if(!lq.default.existsSync(e))throw new Error(`config file ${e} not found`);e=lq.default.readFileSync(e,{encoding:"utf-8"})}let n=s0.tmpName({tmpdir:s0.tmpDir()});return lq.default.writeFileSync(n,e),n}};var bq=class{static{i(this,"BuildKit")}buildx;config;constructor(e){this.config=new dq,this.buildx=e?.buildx||new N0}async getVersion(e){if(!e.buildkit&&e.name)try{return await this.getVersionWithinImage(e.name)}catch(r){Ke(r)}return e.buildkit}async getVersionWithinImage(e){return N(`BuildKit.getVersionWithinImage nodeName: ${e}`),Bt.getExecOutput(["inspect","--format","{{.Config.Image}}",`${N0.containerNamePrefix}${e}`],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.exitCode==0&&r.stdout.length>0)return N(`BuildKit.getVersionWithinImage image: ${r.stdout.trim()}`),Bt.getExecOutput(["run","--rm",r.stdout.trim(),"--version"],{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.exitCode==0&&n.stdout.length>0)return`${r.stdout.trim()} => ${n.stdout.trim()}`;if(n.stderr.length>0)throw new Error(r.stderr.trim());return n.stdout.trim()});if(r.stderr.length>0)throw new Error(r.stderr.trim());return r.stdout.trim()})}async versionSatisfies(e,r,n){n||(n=await new bd({buildx:this.buildx}).inspect(e));for(let o of n.nodes){let s=o.buildkit;if(N(`BuildKit.versionSatisfies ${s}: ${r}`),!s)try{s=await this.getVersionWithinImage(o.name||"")}catch{return N(`BuildKit.versionSatisfies ${o.name}: can't get version`),!1}if(N(`BuildKit.versionSatisfies ${o.name}: version ${s}`),n.driver=="docker"&&!s.endsWith("-moby")||!Bbe.satisfies(s.replace(/-moby$/,""),r))return!1}return!0}};var Mq=class t{static{i(this,"Compose")}_version;_versionOnce;_standalone;constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}async isStandalone(){let e=this._standalone??!await Bt.isAvailable();return N(`Compose.isStandalone: ${e}`),e}async getCommand(e){let r=await this.isStandalone();return{command:r?"compose":"docker",args:r?e:["compose",...e]}}async isAvailable(){let e=await this.getCommand([]),r=await Oe.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(N(`Compose.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(N(`Compose.isAvailable error: ${n}`),!1));return N(`Compose.isAvailable: ${r}`),r}async version(){if(this._versionOnce)return this._version;this._versionOnce=!0;let e=await this.getCommand(["version"]);return this._version=await Oe.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr.trim());return t.parseVersion(r.stdout.trim())}),this._version}async printVersion(){let e=await this.getCommand(["version"]);await Oe.exec(e.command,e.args,{failOnStdErr:!1})}static parseVersion(e){let r=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!r)throw new Error("Cannot parse compose version");return r[1]}};var ma=w(require("fs"),1),ni=w(require("os"),1),Md=w(require("path"),1);var mq=w(_n(),1),zP=w(require("util"),1);var fq=class t{static{i(this,"Install")}standalone;githubToken;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN}async download(e,r){let n=await t.getDownloadVersion(e);N(`Install.download version: ${n.version}`);let o=await t.getRelease(n,this.githubToken);N(`Install.download release tag name: ${o.tag_name}`);let s=await this.vspec(o.tag_name);N(`Install.download vspec: ${s}`);let a=mq.clean(s)||"";if(!mq.valid(a))throw new Error(`Invalid Compose version "${s}".`);let c=new rt({htcName:n.key!="official"?`compose-dl-bin-${n.key}`:"compose-dl-bin",htcVersion:s,baseCacheDir:Md.default.join(ni.default.homedir(),".bin","docker-compose"),cacheFile:ni.default.platform()=="win32"?"docker-compose.exe":"docker-compose",ghaNoCache:r}),u=await c.find();if(u)return S(`Compose binary found in ${u}`),u;let p=zP.format(n.downloadURL,s,this.filename());S(`Downloading ${p}`);let A=await On(p,void 0,this.githubToken);N(`Install.download htcDownloadPath: ${A}`);let l=await c.save(A);return S(`Cached to ${l}`),l}async installStandalone(e,r){S("Standalone mode"),r=r||s0.tmpDir();let n=Md.default.join(r,"compose-bin-standalone");ma.default.existsSync(n)||ma.default.mkdirSync(n,{recursive:!0});let o=ni.default.platform()=="win32"?"compose.exe":"compose",s=Md.default.join(n,o);return ma.default.copyFileSync(e,s),S("Fixing perms"),ma.default.chmodSync(s,"0755"),Zo(n),S("Added Compose to PATH"),S(`Binary path: ${s}`),s}async installPlugin(e,r){S("Docker plugin mode"),r=r||Bt.configDir;let n=Md.default.join(r,"cli-plugins");ma.default.existsSync(n)||ma.default.mkdirSync(n,{recursive:!0});let o=ni.default
Line truncated
|
|
|
|
|
${O}`)}else throw new Error(`Cosign attest-blob command failed with: ${yr.getErrorMessage(b.stderr)}`);let z=t.parseBundle((0,dd.bundleFromJSON)(JSON.parse(ti.default.readFileSync(u,{encoding:"utf-8"}))));S("Provenance blob signed for:");for(let O of p){let[y,E]=Object.entries(O.digest)[0]||[];S(` - ${O.name} (${y}:${E})`)}z.tlogID&&await this.logTransparencyUpload(z.tlogID,n),S(`Sigstore bundle written to: ${u}`),r[a]={...z,bundlePath:u,subjects:p}})}catch(n){throw new Error(`Signing BuildKit provenance blobs failed: ${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[o,s]of Object.entries(e)){let a=ri.default.dirname(o);await at(`Verifying signature bundle ${s.bundlePath}`,async()=>{for(let c of s.subjects){let u=ri.default.join(a,c.name);S(`Verifying signed artifact ${u}`);let p=["verify-blob-attestation",...await this.bundleFormatArgs(),"--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??Ybe];(r.noTransparencyLog||!s.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let A=await Oe.getExecOutput(this.cosign.binPath,[...p,"--bundle",s.bundlePath,u],{ignoreReturnCode:!0});if(A.stderr.length>0&&A.exitCode!=0)throw new Error(A.stderr);n[u]={bundlePath:s.bundlePath,cosignArgs:p}}})}return n}async verifyArtifact(e,r,n){S("Verifying keyless verification bundle signature");let o=JSON.parse(ti.default.readFileSync(r,"utf-8")),s=(0,dd.bundleFromJSON)(o);S("Fetching Sigstore TUF trusted root metadata");let a=await $be.getTrustedRoot({retry:{retries:5}}),c=(0,bd.toTrustMaterial)(a);try{S("Verifying artifact signature");let u=(0,bd.toSignedEntity)(s,ti.default.readFileSync(e)),p=t.parseCertificate(s),A=s.verificationMaterial.tlogEntries,l=A.length>0?A[0].logIndex:void 0,M=new bd.Verifier(c).verify(u,{subjectAlternativeName:n?.subjectAlternativeName,extensions:n?.issuer?{issuer:n.issuer}:void 0});return N(`Sigstore.verifyArtifact signer: ${JSON.stringify(M)}`),{payload:o,certificate:p.toString(),tlogID:l}}catch(u){throw new Error(`Failed to verify artifact signature: ${u}`)}}static noTransparencyLog(e){return e??a0.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e.noTransparencyLog);if(S(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")){let o=await this.useRekorV2(e);await at("Creating Sigstore protobuf signing config",async()=>{let s=s0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:s0.tmpDir()}),a=["signing-config","create",o?"--with-default-rekor-v2=true":"--with-default-services=true",`--out=${s}`];n&&a.push("--no-default-rekor=true"),await Oe.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),S(JSON.stringify(JSON.parse(ti.default.readFileSync(s,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${s}`)})}else r.push("--use-signing-config"),n&&r.push("--tlog-upload=false");return r}async logTransparencyUpload(e,r){if(await this.useRekorV2(r)){S(`Attestation signature uploaded to Rekor v2 transparency log with index ${e}`);return}S(`Attestation signature uploaded to Rekor transparency log: ${ld}?logIndex=${e}`)}async useRekorV2(e){return e.rekorV2===!0&&!t.noTransparencyLog(e.noTransparencyLog)&&await this.cosign.versionSatisfies(">=3.1.1")}static getProvenanceBlobs(e){let r=ri.default.join(e.localExportDir,"provenance.json");if(ti.default.existsSync(r))return{[r]:ti.default.readFileSync(r)};let n=ti.default.readdirSync(e.localExportDir,{withFileTypes:!0}),o=n.filter(s=>s.isDirectory());if(o.length>0&&o.length===n.length&&o.every(s=>ti.default.existsSync(ri.default.join(e.localExportDir,s.name,"provenance.json")))){let s={};for(let a of o){let c=ri.default.join(e.localExportDir,a.name,"provenance.json");s[c]=ti.default.readFileSync(c)}return s}throw new Error(`No valid provenance.json found in ${e.localExportDir}`)}static getProvenanceSubjects(e){return JSON.parse(e.toString()).subject.map(n=>({name:n.name,digest:n.digest}))}static parseBundle(e){let r=t.parseCertificate(e),n=e.verificationMaterial.tlogEntries,o=n.length>0?n[0].logIndex:void 0;return{payload:(0,dd.bundleToJSON)(e),certificate:r.toString(),tlogID:o}}static parseCertificate(e){let r;switch(e.verificationMaterial.content.$case){case"x509CertificateChain":r=e.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes;break;case"certificate":r=e.verificationMaterial.content.certificate.rawBytes;break;default:throw new Error("Bundle must contain an x509 certificate")}return new Jbe.X509Certificate(r)}async bundleFormatArgs(){return await this.cosign.versionSatisfies(">=3.1.1")?[]:["--new-bundle-format"]}};var zq=class t{static{i(this,"Install")}standalone;githubToken;sigstore;constructor(e){this.standalone=e?.standalone,this.githubToke
Line truncated
|
|
|
|
|
`)){let[p,...A]=u.split(":"),l=p.toLowerCase(),b=A.map(M=>M.trim()).join(":");if(p.length!=0)switch(!0){case l=="name":n=void 0,r.name==null?r.name=b:(s&&o.gcPolicy&&(o.gcPolicy.push(s),s=void 0),o.name&&r.nodes.push(o),o={name:b});break;case l=="driver":n=void 0,r.driver=b;break;case l=="last activity":n=void 0,r.lastActivity=new Date(b);break;case l=="endpoint":n=void 0,o.endpoint=b;break;case l=="driver options":n=void 0,o["driver-opts"]=(b.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map(M=>M.replace(/^(.*)="(.*)"$/g,"$1=$2"));break;case l=="status":n=void 0,o.status=b;break;case l=="buildkit daemon flags":case l=="flags":n=void 0,o["buildkitd-flags"]=b;break;case l=="buildkit version":case l=="buildkit":n=void 0,o.buildkit=b;break;case l=="platforms":{if(n=void 0,!b)break;let M=[];if(b.includes("*"))for(let z of b.split(", "))z.includes("*")&&M.push(z.replace(/\*/g,""));else M=b.split(", ");o.platforms=M.join(",");break}case l=="features":n="features",o.features={};break;case l=="labels":n="label",o.labels={};break;case l=="devices":n="devices",o.devices=o.devices||[];break;case l.startsWith("gc policy rule#"):n="gcpolicy",o.gcPolicy&&s&&(o.gcPolicy.push(s),s=void 0);break;case l.startsWith("file#"):n="file",c=p.split("#")[1],o.files=o.files||{},o.files[c]="";break;default:switch(n&&n!=="devices"&&o.devices&&a&&(o.devices.push(a),a=void 0),n||""){case"features":{o.features=o.features||{},o.features[p.trim()]=!!b;break}case"label":{o.labels=o.labels||{},o.labels[p.trim()]=b;break}case"devices":{switch(l.trim()){case"name":{o.devices&&a&&o.devices.push(a),a={},a.name=b;break}case"on-demand":{a&&b&&(a.onDemand=b=="true");break}case"automatically allowed":{a&&b&&(a.autoAllow=b=="true");break}case"annotations":{a&&(a.annotations=a.annotations||{});break}default:a&&a.annotations&&(a.annotations[p.trim()]=b)}break}case"gcpolicy":{switch(o.gcPolicy=o.gcPolicy||[],s=s||{},l.trim()){case"all":{s.all=b=="true";break}case"filters":{b&&(s.filter=b.split(","));break}case"keep duration":{s.keepDuration=b;break}case"keep bytes":{s.keepBytes=b;break}case"reserved space":{s.reservedSpace=b;break}case"max used space":{s.maxUsedSpace=b;break}case"min free space":{s.minFreeSpace=b;break}}break}case"file":{c&&o.files&&(o.files[c].length>0&&(o.files[c]+=`
|
|
|
|
|
`),o.files[c]+=u.replace(/^\s>\s?/,""));break}}}}return a&&o.devices&&o.devices.push(a),s&&o.gcPolicy&&o.gcPolicy.push(s),o.name&&r.nodes.push(o),r}};var jbe=w(Pn(),1);var gq=w(require("fs"),1);var Oq=class{static{i(this,"Config")}resolveFromString(e){return this.resolve(e,!1)}resolveFromFile(e){return this.resolve(e,!0)}resolve(e,r){if(r){if(!gq.default.existsSync(e))throw new Error(`config file ${e} not found`);e=gq.default.readFileSync(e,{encoding:"utf-8"})}let n=s0.tmpName({tmpdir:s0.tmpDir()});return gq.default.writeFileSync(n,e),n}};var Eq=class{static{i(this,"BuildKit")}buildx;config;constructor(e){this.config=new Oq,this.buildx=e?.buildx||new m0}async getVersion(e){if(!e.buildkit&&e.name)try{return await this.getVersionWithinImage(e.name)}catch(r){r0(r)}return e.buildkit}async getVersionWithinImage(e){return N(`BuildKit.getVersionWithinImage nodeName: ${e}`),Bt.getExecOutput(["inspect","--format","{{.Config.Image}}",`${m0.containerNamePrefix}${e}`],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.exitCode==0&&r.stdout.length>0)return N(`BuildKit.getVersionWithinImage image: ${r.stdout.trim()}`),Bt.getExecOutput(["run","--rm",r.stdout.trim(),"--version"],{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.exitCode==0&&n.stdout.length>0)return`${r.stdout.trim()} => ${n.stdout.trim()}`;if(n.stderr.length>0)throw new Error(r.stderr.trim());return n.stdout.trim()});if(r.stderr.length>0)throw new Error(r.stderr.trim());return r.stdout.trim()})}async versionSatisfies(e,r,n){n||(n=await new Md({buildx:this.buildx}).inspect(e));for(let o of n.nodes){let s=o.buildkit;if(N(`BuildKit.versionSatisfies ${s}: ${r}`),!s)try{s=await this.getVersionWithinImage(o.name||"")}catch{return N(`BuildKit.versionSatisfies ${o.name}: can't get version`),!1}if(N(`BuildKit.versionSatisfies ${o.name}: version ${s}`),n.driver=="docker"&&!s.endsWith("-moby")||!jbe.satisfies(s.replace(/-moby$/,""),r))return!1}return!0}};var Cq=class t{static{i(this,"Compose")}_version;_versionOnce;_standalone;constructor(e){this._standalone=e?.standalone,this._version="",this._versionOnce=!1}async isStandalone(){let e=this._standalone??!await Bt.isAvailable();return N(`Compose.isStandalone: ${e}`),e}async getCommand(e){let r=await this.isStandalone();return{command:r?"compose":"docker",args:r?e:["compose",...e]}}async isAvailable(){let e=await this.getCommand([]),r=await Oe.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(n=>n.stderr.length>0&&n.exitCode!=0?(N(`Compose.isAvailable cmd err: ${n.stderr.trim()}`),!1):n.exitCode==0).catch(n=>(N(`Compose.isAvailable error: ${n}`),!1));return N(`Compose.isAvailable: ${r}`),r}async version(){if(this._versionOnce)return this._version;this._versionOnce=!0;let e=await this.getCommand(["version"]);return this._version=await Oe.getExecOutput(e.command,e.args,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr.trim());return t.parseVersion(r.stdout.trim())}),this._version}async printVersion(){let e=await this.getCommand(["version"]);await Oe.exec(e.command,e.args,{failOnStdErr:!1})}static parseVersion(e){let r=/\sv?([0-9a-f]{7}|[0-9.]+)/.exec(e);if(!r)throw new Error("Cannot parse compose version");return r[1]}};var ma=w(require("fs"),1),oi=w(require("os"),1),hd=w(require("path"),1);var Bq=w(Pn(),1),RP=w(require("util"),1);var yq=class t{static{i(this,"Install")}standalone;githubToken;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN}async download(e,r){let n=await t.getDownloadVersion(e);N(`Install.download version: ${n.version}`);let o=await t.getRelease(n,this.githubToken);N(`Install.download release tag name: ${o.tag_name}`);let s=await this.vspec(o.tag_name);N(`Install.download vspec: ${s}`);let a=Bq.clean(s)||"";if(!Bq.valid(a))throw new Error(`Invalid Compose version "${s}".`);let c=new rt({htcName:n.key!="official"?`compose-dl-bin-${n.key}`:"compose-dl-bin",htcVersion:s,baseCacheDir:hd.default.join(oi.default.homedir(),".bin","docker-compose"),cacheFile:oi.default.platform()=="win32"?"docker-compose.exe":"docker-compose",ghaNoCache:r}),u=await c.find();if(u)return S(`Compose binary found in ${u}`),u;let p=RP.format(n.downloadURL,s,this.filename());S(`Downloading ${p}`);let A=await On(p,void 0,this.githubToken);N(`Install.download htcDownloadPath: ${A}`);let l=await c.save(A);return S(`Cached to ${l}`),l}async installStandalone(e,r){S("Standalone mode"),r=r||s0.tmpDir();let n=hd.default.join(r,"compose-bin-standalone");ma.default.existsSync(n)||ma.default.mkdirSync(n,{recursive:!0});let o=oi.default.platform()=="win32"?"compose.exe":"compose",s=hd.default.join(n,o);return ma.default.copyFileSync(e,s),S("Fixing perms"),ma.default.chmodSync(s,"0755"),ts(n),S("Added Compose to PATH"),S(`Binary path: ${s}`),s}async installPlugin(e,r){S("Docker plugin mode"),r=r||Bt.configDir;let n=hd.default.join(r,"cli-plugins");ma.default.existsSync(n)||ma.default.mkdirSync(n,{recursive:!0});let o=oi.default
Line truncated
|
|
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
|
|
|
|
ARG GO_VERSION="1.24"
|
|
|
|
@@ -207,10 +208,10 @@ EOT
|
|
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
COPY --from=builder /out /
|
|
|
|
|
`;var hq=class t{static{i(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new N0,this.sigstore=e?.sigstore||new _c}async download(e){let r=await t.getDownloadVersion(e.version);N(`Install.download version: ${r.version}`);let n=await t.getRelease(r,this.githubToken);N(`Install.download release tag name: ${n.tag_name}`);let o=await this.vspec(n.tag_name);N(`Install.download vspec: ${o}`);let s=md.clean(o)||"";if(!md.valid(s))throw new Error(`Invalid Cosign version "${o}".`);let a=new rt({htcName:"cosign-dl-bin",htcVersion:o,baseCacheDir:fd.default.join(No.default.homedir(),".bin"),cacheFile:No.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=await a.find();if(c)return S(`Cosign binary found in ${c}`),c;let u=OP.format(r.downloadURL,o,this.filename());S(`Downloading ${u}`);let p=await On(u,void 0,this.githubToken);N(`Install.download htcDownloadPath: ${p}`),e.verifySignature&&md.satisfies(o,">=3.0.1")&&await this.verifySignature(p,u);let A=await a.save(p,e.skipState);return S(`Cached to ${A}`),A}async build(e,r,n){let o=await this.vspec(e);N(`Install.build vspec: ${o}`);let s=new rt({htcName:"cosign-build-bin",htcVersion:o,baseCacheDir:fd.default.join(No.default.homedir(),".bin"),cacheFile:No.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=await s.find();if(a)return S(`Cosign binary found in ${a}`),a;let c=fd.default.join(s0.tmpDir(),"cosign-build-cache"),u=await this.buildCommand(e,c),p=await Oe.getExecOutput(u.command,u.args,{ignoreReturnCode:!0,input:Buffer.from(qbe)}).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`build failed with: ${l.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return`${c}/cosign`}),A=await s.save(p,n);return S(`Cached to ${A}`),A}async install(e,r){r=r||s0.tmpDir();let n=fd.default.join(r,"cosign-bin");Hm.default.existsSync(n)||Hm.default.mkdirSync(n,{recursive:!0});let o=No.default.platform()=="win32"?"cosign.exe":"cosign",s=fd.default.join(n,o);return Hm.default.copyFileSync(e,s),S("Fixing perms"),Hm.default.chmodSync(s,"0755"),Zo(n),S("Added Cosign to PATH"),S(`Binary path: ${s}`),s}async buildCommand(e,r){let n=await new N0({standalone:!0}).isAvailable(),o=await new N0({standalone:!1}).isAvailable(),s=!1;if(await this.buildx.isStandalone()&&n)N("Install.buildCommand: Buildx standalone found, build with it"),s=!0;else if(!await this.buildx.isStandalone()&&o)N("Install.buildCommand: Buildx plugin found, build with it"),s=!1;else if(n)N("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),s=!0;else if(o)N("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),s=!1;else throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`);let a=["build","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${r}`];return process.env.GIT_AUTH_TOKEN&&a.push("--secret","id=GIT_AUTH_TOKEN"),a.push("-f-",e),await new N0({standalone:s}).getCommand(a)}async verifySignature(e,r){let n=`${r}.sigstore.json`;S(`Downloading keyless verification bundle at ${n}`);let o=await On(n,void 0,this.githubToken);N(`Install.verifySignature bundlePath: ${o}`);let s=await this.sigstore.verifyArtifact(e,o,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});S(`Cosign binary signature verified! ${s.tlogID?`${Pp}?logIndex=${s.tlogID}`:""}`)}filename(){let e;switch(No.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=No.default.arch();break}}let r=No.default.platform()=="win32"?"windows":No.default.platform(),n=No.default.platform()=="win32"?".exe":"";return OP.format("cosign-%s-%s%s",r,e,n)}async vspec(e){if(!c0.isValidRef(e)){let p=e.replace(/^v+|v+$/g,"");return S(`Use ${p} version spec cache key for ${e}`),p}let[r,n]=e.split("#");n.length==0&&(n="master");let o;n.match(/^[0-9a-fA-F]{40}$/)?o=n:o=await ua.remoteSha(r,n,process.env.GIT_AUTH_TOKEN);let[s,a]=r.substring(19).split("/"),c=`${s}/${c0.trimSuffix(a,".git")}/${o}`,u=c0.hash(c);return S(`Use ${u} version spec cache key for ${c}`),u}static async getDownloadVersion(e){return{version:e,downloadURL:"https://github.com/sigstore/cosign/releases/download/v%s/%s",contentOpts:{owner:"docker",repo:"actions-toolkit",ref:"main",path:".github/cosign-releases.json"}}}static async getRelease(e,r){let o=await new a0({token:r}).releases("Cosign",e.contentOpts);if(!o[e.version])throw new Error(`Cannot find Cosign release ${e.version} in releases JSON`);return o[e.version]}};var Dbe=w(_n(),1);var zq=class{static{i(this,"Regctl")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Oe.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,sil
Line truncated
|
|
|
|
|
`,sepLabels:_r("sep-labels",{trimWhitespace:!1})||`
|
|
|
|
|
`,sepAnnotations:_r("sep-annotations",{trimWhitespace:!1})||`
|
|
|
|
|
`,bakeTarget:_r("bake-target")||"docker-metadata-action",githubToken:_r("github-token")}}i(Rbe,"getInputs");async function Nbe(t,e){switch(t){case"workflow":return await x20(e);case"git":return await T20();default:throw new Error(`Invalid context source: ${t}`)}}i(Nbe,"getContext");async function x20(t){let e=a0.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await v20(e.sha,t),...e}}i(x20,"getContextFromWorkflow");async function T20(){let t=await ua.context();return{commitDate:await ua.commitDate(t.sha),...t}}i(T20,"getContextFromGit");async function v20(t,e){let r=a0.context.payload;if(r.commits){let n=r.commits.find(o=>o.id===t)?.timestamp;if(n)return new Date(n)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let n=await e.github.octokit.rest.repos.getCommit({owner:a0.context.repo.owner,repo:a0.context.repo.repo,ref:t});if(n.data.commit.committer?.date)return new Date(n.data.commit.committer.date);throw new Error("Committer date not found")}catch(n){return N(`Failed to get commit date from GitHub API: ${n.message}`),new Date}}i(v20,"getCommitDateFromWorkflow");var qa=w(vQ(),1),E4e=w(require("fs"),1),C4e=w(require("path"),1),Ph=w(Tbe(),1),an=w(m4e(),1),xd=w(_n(),1);function z4e(t){let e=[];if(t.length==1){let r=!1,n=F1(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let s=o.toString().split("=").map(a=>a.trim());if(s.length==1)e.push({name:s[0],enable:!0});else{r=!0;break}}if(!r)return h4e(e)}e=[];for(let r of t){let n={name:"",enable:!0},o=F1(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of o){let a=s.toString().split("=").map(c=>c.trim());if(a.length==1)n.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{n.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalid enable attribute value: ${r}`);n.enable=/true/i.test(u);break}default:throw new Error(`Unknown image attribute: ${r}`)}}}if(n.name.length==0)throw new Error(`Image name attribute empty: ${r}`);e.push(n)}return h4e(e)}i(z4e,"Transform");function h4e(t){Du("Processing images input");for(let e of t)S(`name=${e.name},enable=${e.enable}`);return Iu(),t}i(h4e,"output");var G7=(u=>(u.Schedule="schedule",u.Semver="semver",u.Pep440="pep440",u.Match="match",u.Edge="edge",u.Ref="ref",u.Raw="raw",u.Sha="sha",u))(G7||{}),hD=(n=>(n.Branch="branch",n.Tag="tag",n.PR="pr",n))(hD||{}),zD=(r=>(r.Short="short",r.Long="long",r))(zD||{}),U7=class{static{i(this,"Tag")}type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},D40={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function O4e(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let n of t)e.push(I40(n));let r=e.sort((n,o)=>Number(n.attrs.priority)<Number(o.attrs.priority)?1:Number(n.attrs.priority)>Number(o.attrs.priority)?-1:0);Du("Processing tags input");for(let n of r)S(n.toString());return Iu(),r}i(O4e,"Transform");function I40(t){let e=F1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new U7;for(let n of e){let o=n.toString().split(/(?<=^[^=]+?)=/).map(s=>s.trim());if(o.length==1)r.attrs.value=o[0];else{let s=o[0].toLowerCase(),a=o[1];switch(s){case"type":{if(!Object.values(G7).includes(a))throw new Error(`Unknown tag type attribute: ${a}`);r.type=a;break}default:{r.attrs[s]=a;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);if(Object.prototype.hasOwnProperty.call(r.attrs,"group")||(r.attrs.group="0"),isNaN(+r.attrs.group))throw new Error(`Invalid match group for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value="");break}case"edge":{Object.prototype.hasOwnProperty.call(r.attrs,"branch")||(r.attrs.branch="");break}case"ref":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"event"))throw new Error(`Missing event attribute for ${t}`);if(!Object.keys(hD).map(n=>hD[n]).includes(r.attrs.event))throw new Error(`Invalid event for ${t}`);r.attrs.event=="pr"&&!Object.prototype.hasOwnProperty.call(r.attrs,"prefix")&&(r.attrs.prefix="pr-");break}case"raw":{if(!Object.
Line truncated
|
|
|
|
|
`;var qq=class t{static{i(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new m0,this.sigstore=e?.sigstore||new Pc}async download(e){let r=await t.getDownloadVersion(e.version);N(`Install.download version: ${r.version}`);let n=await t.getRelease(r,this.githubToken);N(`Install.download release tag name: ${n.tag_name}`);let o=await this.vspec(n.tag_name);N(`Install.download vspec: ${o}`);let s=zd.clean(o)||"";if(!zd.valid(s))throw new Error(`Invalid Cosign version "${o}".`);let a=new rt({htcName:"cosign-dl-bin",htcVersion:o,baseCacheDir:md.default.join(So.default.homedir(),".bin"),cacheFile:So.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=await a.find();if(c)return S(`Cosign binary found in ${c}`),c;let u=NP.format(r.downloadURL,o,this.filename());S(`Downloading ${u}`);let p=await On(u,void 0,this.githubToken);N(`Install.download htcDownloadPath: ${p}`),e.verifySignature&&zd.satisfies(o,">=3.0.1")&&await this.verifySignature(p,u);let A=await a.save(p,e.skipState);return S(`Cached to ${A}`),A}async build(e,r,n){let o=await this.vspec(e);N(`Install.build vspec: ${o}`);let s=new rt({htcName:"cosign-build-bin",htcVersion:o,baseCacheDir:md.default.join(So.default.homedir(),".bin"),cacheFile:So.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=await s.find();if(a)return S(`Cosign binary found in ${a}`),a;let c=md.default.join(s0.tmpDir(),"cosign-build-cache"),u=await this.buildCommand(e,c),p=await Oe.getExecOutput(u.command,u.args,{ignoreReturnCode:!0,input:Buffer.from(Kbe)}).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`build failed with: ${m0.getErrorMessage(l.stderr)}`);return`${c}/cosign`}),A=await s.save(p,n);return S(`Cached to ${A}`),A}async install(e,r){r=r||s0.tmpDir();let n=md.default.join(r,"cosign-bin");Yh.default.existsSync(n)||Yh.default.mkdirSync(n,{recursive:!0});let o=So.default.platform()=="win32"?"cosign.exe":"cosign",s=md.default.join(n,o);return Yh.default.copyFileSync(e,s),S("Fixing perms"),Yh.default.chmodSync(s,"0755"),ts(n),S("Added Cosign to PATH"),S(`Binary path: ${s}`),s}async buildCommand(e,r){let n=await new m0({standalone:!0}).isAvailable(),o=await new m0({standalone:!1}).isAvailable(),s=!1;if(await this.buildx.isStandalone()&&n)N("Install.buildCommand: Buildx standalone found, build with it"),s=!0;else if(!await this.buildx.isStandalone()&&o)N("Install.buildCommand: Buildx plugin found, build with it"),s=!1;else if(n)N("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),s=!0;else if(o)N("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),s=!1;else throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`);let a=["build","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${r}`];return process.env.GIT_AUTH_TOKEN&&a.push("--secret","id=GIT_AUTH_TOKEN"),a.push("-f-",e),await new m0({standalone:s}).getCommand(a)}async verifySignature(e,r){let n=`${r}.sigstore.json`;S(`Downloading keyless verification bundle at ${n}`);let o=await On(n,void 0,this.githubToken);N(`Install.verifySignature bundlePath: ${o}`);let s=await this.sigstore.verifyArtifact(e,o,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});S(`Cosign binary signature verified! ${s.tlogID?`${ld}?logIndex=${s.tlogID}`:""}`)}filename(){let e;switch(So.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=So.default.arch();break}}let r=So.default.platform()=="win32"?"windows":So.default.platform(),n=So.default.platform()=="win32"?".exe":"";return NP.format("cosign-%s-%s%s",r,e,n)}async vspec(e){if(!c0.isValidRef(e)){let p=e.replace(/^v+|v+$/g,"");return S(`Use ${p} version spec cache key for ${e}`),p}let[r,n]=e.split("#");n.length==0&&(n="master");let o;n.match(/^[0-9a-fA-F]{40}$/)?o=n:o=await pa.remoteSha(r,n,process.env.GIT_AUTH_TOKEN);let[s,a]=r.substring(19).split("/"),c=`${s}/${c0.trimSuffix(a,".git")}/${o}`,u=c0.hash(c);return S(`Use ${u} version spec cache key for ${c}`),u}static async getDownloadVersion(e){return{version:e,downloadURL:"https://github.com/sigstore/cosign/releases/download/v%s/%s",contentOpts:{owner:"docker",repo:"actions-toolkit",ref:"main",path:".github/cosign-releases.json"}}}static async getRelease(e,r){let o=await new a0({token:r}).releases("Cosign",e.contentOpts);if(!o[e.version])throw new Error(`Cannot find Cosign release ${e.version} in releases JSON`);return o[e.version]}};var Zbe=w(Pn(),1);var Dq=class{static{i(this,"Regctl")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Oe.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stder
Line truncated
|
|
|
|
|
`,sepLabels:Pr("sep-labels",{trimWhitespace:!1})||`
|
|
|
|
|
`,sepAnnotations:Pr("sep-annotations",{trimWhitespace:!1})||`
|
|
|
|
|
`,bakeTarget:Pr("bake-target")||"docker-metadata-action",githubToken:Pr("github-token")}}i(rfe,"getInputs");async function nfe(t,e){if(t.startsWith("git:"))return await tfe(t.slice(4));switch(t){case"workflow":return await md0(e);case"git":return await tfe();default:throw new Error(`Invalid context source: ${t}`)}}i(nfe,"getContext");async function md0(t){let e=a0.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await zd0(e.sha,t),...e}}i(md0,"getContextFromWorkflow");async function tfe(t){let e=await pa.context(t);return{commitDate:await pa.commitDate(e.sha,t),...e}}i(tfe,"getContextFromGit");async function zd0(t,e){let r=a0.context.payload;if(r.commits){let n=r.commits.find(o=>o.id===t)?.timestamp;if(n)return new Date(n)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let n=await e.github.octokit.rest.repos.getCommit({owner:a0.context.repo.owner,repo:a0.context.repo.repo,ref:t});if(n.data.commit.committer?.date)return new Date(n.data.commit.committer.date);throw new Error("Committer date not found")}catch(n){return N(`Failed to get commit date from GitHub API: ${n.message}`),new Date}}i(zd0,"getCommitDateFromWorkflow");var Da=w(YQ(),1),J4e=w(require("fs"),1),$4e=w(require("path"),1),Gm=w(ufe(),1),cn=w(G4e(),1),vd=w(Pn(),1);function X4e(t){let e=[];if(t.length==1){let r=!1,n=F1(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let s=o.toString().split("=").map(a=>a.trim());if(s.length==1)e.push({name:s[0],enable:!0});else{r=!0;break}}if(!r)return H4e(e)}e=[];for(let r of t){let n={name:"",enable:!0},o=F1(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of o){let a=s.toString().split("=").map(c=>c.trim());if(a.length==1)n.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{n.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalid enable attribute value: ${r}`);n.enable=/true/i.test(u);break}default:throw new Error(`Unknown image attribute: ${r}`)}}}if(n.name.length==0)throw new Error(`Image name attribute empty: ${r}`);e.push(n)}return H4e(e)}i(X4e,"Transform");function H4e(t){Iu("Processing images input");for(let e of t)S(`name=${e.name},enable=${e.enable}`);return Ru(),t}i(H4e,"output");var e9=(u=>(u.Schedule="schedule",u.Semver="semver",u.Pep440="pep440",u.Match="match",u.Edge="edge",u.Ref="ref",u.Raw="raw",u.Sha="sha",u))(e9||{}),qD=(n=>(n.Branch="branch",n.Tag="tag",n.PR="pr",n))(qD||{}),DD=(r=>(r.Short="short",r.Long="long",r))(DD||{}),Z7=class{static{i(this,"Tag")}type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},uB0={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function V4e(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let n of t)e.push(pB0(n));let r=e.sort((n,o)=>Number(n.attrs.priority)<Number(o.attrs.priority)?1:Number(n.attrs.priority)>Number(o.attrs.priority)?-1:0);Iu("Processing tags input");for(let n of r)S(n.toString());return Ru(),r}i(V4e,"Transform");function pB0(t){let e=F1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new Z7;for(let n of e){let o=n.toString().split(/(?<=^[^=]+?)=/).map(s=>s.trim());if(o.length==1)r.attrs.value=o[0];else{let s=o[0].toLowerCase(),a=o[1];switch(s){case"type":{if(!Object.values(e9).includes(a))throw new Error(`Unknown tag type attribute: ${a}`);r.type=a;break}default:{r.attrs[s]=a;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing pattern attribute for ${t}`);if(Object.prototype.hasOwnProperty.call(r.attrs,"group")||(r.attrs.group="0"),isNaN(+r.attrs.group))throw new Error(`Invalid match group for ${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value="");break}case"edge":{Object.prototype.hasOwnProperty.call(r.attrs,"branch")||(r.attrs.branch="");break}case"ref":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"event"))throw new Error(`Missing event attribute for ${t}`);if(!Object.keys(qD).map(n=>qD[n]).includes(r.attrs.event))throw new Error(`Invalid event for ${t}`);r.attrs.event=="pr"&&!Object.prototype.hasOwnProperty.call(r.attrs,"pref
Line truncated
|
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
|
|
undici/lib/web/fetch/body.js:
|
|
|
|
@@ -237,7 +238,7 @@ moment/moment.js:
|
|
|
|
|
|
|
|
|
|
moment-timezone/moment-timezone.js:
|
|
|
|
|
(*! moment-timezone.js *)
|
|
|
|
|
(*! version : 0.6.2 *)
|
|
|
|
|
(*! version : 0.6.3 *)
|
|
|
|
|
(*! Copyright (c) JS Foundation and other contributors *)
|
|
|
|
|
(*! license : MIT *)
|
|
|
|
|
(*! github.com/moment/moment-timezone *)
|
|
|
|
|