mirror of
https://github.com/gradle/actions.git
synced 2026-10-16 19:57:12 +08:00
[bot] Update dist directory
This commit is contained in:
10 files changed
+613
-613
No files matched your search
+134
-134
@@ -1,120 +1,120 @@
|
||||
import {createRequire} from 'module';const require=createRequire(import.meta.url);
|
||||
var F8e=Object.create;var DM=Object.defineProperty;var M8e=Object.getOwnPropertyDescriptor;var L8e=Object.getOwnPropertyNames;var U8e=Object.getPrototypeOf,P8e=Object.prototype.hasOwnProperty;var b=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),wa=(t,e)=>{for(var r in e)DM(t,r,{get:e[r],enumerable:!0})},O8e=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of L8e(e))!P8e.call(t,s)&&s!==r&&DM(t,s,{get:()=>e[s],enumerable:!(n=M8e(e,s))||n.enumerable});return t};var Ae=(t,e,r)=>(r=t!=null?F8e(U8e(t)):{},O8e(e||!t||!t.__esModule?DM(r,"default",{value:t,enumerable:!0}):r,t));var vZ=E(vp=>{"use strict";var QWt=b("net"),W8e=b("tls"),FM=b("http"),RZ=b("https"),J8e=b("events"),wWt=b("assert"),z8e=b("util");vp.httpOverHttp=j8e;vp.httpsOverHttp=K8e;vp.httpOverHttps=$8e;vp.httpsOverHttps=X8e;function j8e(t){var e=new au(t);return e.request=FM.request,e}function K8e(t){var e=new au(t);return e.request=FM.request,e.createSocket=DZ,e.defaultPort=443,e}function $8e(t){var e=new au(t);return e.request=RZ.request,e}function X8e(t){var e=new au(t);return e.request=RZ.request,e.createSocket=DZ,e.defaultPort=443,e}function au(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||FM.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(n,s,i,o){for(var a=kZ(s,i,o),c=0,A=e.requests.length;c<A;++c){var u=e.requests[c];if(u.host===a.host&&u.port===a.port){e.requests.splice(c,1),u.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)})}z8e.inherits(au,J8e.EventEmitter);au.prototype.addRequest=function(e,r,n,s){var i=this,o=MM({request:e},i.options,kZ(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",A),a.on("agentRemove",A),e.onSocket(a);function c(){i.emit("free",a,o)}function A(u){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",A),a.removeListener("agentRemove",A)}})};au.prototype.createSocket=function(e,r){var n=this,s={};n.sockets.push(s);var i=MM({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Tl("making CONNECT request");var o=n.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",A),o.once("error",u),o.end();function a(l){l.upgrade=!0}function c(l,d,h){process.nextTick(function(){A(l,d,h)})}function A(l,d,h){if(o.removeAllListeners(),d.removeAllListeners(),l.statusCode!==200){Tl("tunneling socket could not be established, statusCode=%d",l.statusCode),d.destroy();var f=new Error("tunneling socket could not be established, statusCode="+l.statusCode);f.code="ECONNRESET",e.request.emit("error",f),n.removeSocket(s);return}if(h.length>0){Tl("got illegal response body from proxy"),d.destroy();var f=new Error("got illegal response body from proxy");f.code="ECONNRESET",e.request.emit("error",f),n.removeSocket(s);return}return Tl("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=d,r(d)}function u(l){o.removeAllListeners(),Tl(`tunneling socket could not be established, cause=%s
|
||||
`,l.message,l.stack);var d=new Error("tunneling socket could not be established, cause="+l.message);d.code="ECONNRESET",e.request.emit("error",d),n.removeSocket(s)}};au.prototype.removeSocket=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(s){n.request.onSocket(s)})}};function DZ(t,e){var r=this;au.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),i=MM({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),o=W8e.connect(0,i);r.sockets[r.sockets.indexOf(n)]=o,e(o)})}function kZ(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function MM(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var s=Object.keys(n),i=0,o=s.length;i<o;++i){var a=s[i];n[a]!==void 0&&(t[a]=n[a])}}return t}var Tl;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Tl=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)}:Tl=function(){};vp.debug=Tl});var LM=E((NWt,_Z)=>{_Z.exports=vZ()});var Br=E((TWt,FZ)=>{FZ.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 Lt=E((xWt,oee)=>{"use strict";var MZ=Symbol.for("undici.error.UND_ERR"),br=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[MZ]===!0}[MZ]=!0},LZ=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),UM=class extends br{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[LZ]===!0}[LZ]=!0},UZ=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),PM=class extends br{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[UZ]===!0}[UZ]=!0},PZ=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),OM=class extends br{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[PZ]===!0}[PZ]=!0},OZ=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),HM=class extends br{constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[OZ]===!0}[OZ]=!0},HZ=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),GM=class extends br{constructor(e,r,n,s){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=s,this.s
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function f5e(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let i=n.length;i!==0;i--){let o=n[i-1].trim();if(X6e.has(o)){s=o;break}}s!==""&&(t.referrerPolicy=s)}function g5e(){return"allowed"}function p5e(){return"success"}function m5e(){return"success"}function E5e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function C5e(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&&vL(t.origin)&&!vL(mI(t))&&(e=null);break;case"same-origin":tS(t,mI(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function qp(t,e){return t}function I5e(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:qp(t.domainLookupStartTime,r),domainLookupEndTime:qp(t.domainLookupEndTime,r),connectionStartTime:qp(t.connectionStartTime,r),connectionEndTime:qp(t.connectionEndTime,r),secureConnectionStartTime:qp(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function y5e(t){return qp(n5e.now(),t)}function B5e(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}}function Ite(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function b5e(t){return{referrerPolicy:t.referrerPolicy}}function Q5e(t){let e=t.referrerPolicy;Ph(e);let r=null;if(t.referrer==="client"){let a=fte();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=kL(r),s=kL(r,!0);n.toString().length>4096&&(n=s);let i=tS(t,n),o=pI(n)&&!pI(t.url);switch(e){case"origin":return s??kL(r,!0);case"unsafe-url":return n;case"same-origin":return i?s:"no-referrer";case"origin-when-cross-origin":return i?n:s;case"strict-origin-when-cross-origin":{let a=mI(t);return tS(n,a)?n:pI(n)&&!pI(a)?"no-referrer":s}default:return o?"no-referrer":s}}function kL(t,e){return Ph(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)}function pI(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"))}}function w5e(t,e){if(eS===void 0)return!0;let r=yte(e);if(r==="no metadata"||r.length===0)return!0;let n=N5e(r),s=T5e(r,n);for(let i of s){let o=i.algo,a=i.hash,c=eS.createHash(o).update(t).digest("base64");if(c[c.length-1]==="="&&(c[c.length-2]==="="?c=c.slice(0,-2):c=c.slice(0,-1)),x5e(c,a))return!0}return!1}var S5e=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function yte(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=S5e.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let i=s.groups.algo.toLowerCase();pte.includes(i)&&e.push(s.groups)}return r===!0?"no metadata":e}function N5e(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}function T5e(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}function x5e(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}function R5e(t){}function tS(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function D5e(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}function k5e(t){return t.controller.state==="aborted"}function v5e(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function _5e(t){return o5e[t.toLowerCase()]??t}function F5e(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Ph(typeof e=="string"),e}var M5e=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function Bte(t,e,r=0,n=1){class s{
Line truncated
|
||||
`);function dHe(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function hHe(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}function fHe(t,e){nS(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"),s=[],i={position:0};for(;t[i.position]===13&&t[i.position+1]===10;)i.position+=2;let o=t.length;for(;t[o-1]===10&&t[o-2]===13;)o-=2;for(o!==t.length&&(t=t.subarray(0,o));;){if(t.subarray(i.position,i.position+n.length).equals(n))i.position+=n.length;else return"failure";if(i.position===t.length-2&&sS(t,uHe,i)||i.position===t.length-4&&sS(t,lHe,i))return s;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=gHe(t,i);if(a==="failure")return"failure";let{name:c,filename:A,contentType:u,encoding:l}=a;i.position+=2;let d;{let f=t.indexOf(n.subarray(2),i.position);if(f===-1)return"failure";d=t.subarray(i.position,f-4),i.position+=d.length,l==="base64"&&(d=Buffer.from(d.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let h;A!==null?(u??="text/plain",dHe(u)||(u=""),h=new cHe([d],A,{type:u})):h=nHe(Buffer.from(d)),nS(_te(c)),nS(typeof h=="string"&&_te(h)||iHe(h)),s.push(oHe(c,h,A))}}function gHe(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:i};let o=Vp(a=>a!==10&&a!==13&&a!==58,t,e);if(o=OL(o,!0,!0,a=>a===9||a===32),!sHe.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,Vp(a=>a===32||a===9,t,e),rHe(o)){case"content-disposition":{if(r=n=null,!sS(t,AHe,e)||(e.position+=17,r=Lte(t,e),r===null))return"failure";if(sS(t,Mte,e)){let a=e.position+Mte.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,n=Lte(t,e),n===null))return"failure"}break}case"content-type":{let a=Vp(c=>c!==10&&c!==13,t,e);a=OL(a,!1,!0,c=>c===9||c===32),s=Fte(a);break}case"content-transfer-encoding":{let a=Vp(c=>c!==10&&c!==13,t,e);a=OL(a,!1,!0,c=>c===9||c===32),i=Fte(a);break}default:Vp(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function Lte(t,e){nS(t[e.position-1]===34);let r=Vp(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)}function Vp(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function OL(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}function sS(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}Ute.exports={multipartFormDataParser:fHe,validateBoundary:hHe}});var zp=E((e7t,jte)=>{"use strict";var II=ht(),{ReadableStreamFrom:pHe,isBlobLike:Ote,isReadableStreamLike:mHe,readableStreamClose:EHe,createDeferredPromise:CHe,fullyReadBody:IHe,extractMimeType:yHe,utf8DecodeBytes:qte}=Di(),{FormData:Hte}=CI(),{kState:Jp}=xl(),{webidl:BHe}=jn(),{Blob:bHe}=b("node:buffer"),HL=b("node:assert"),{isErrored:Yte,isDisturbed:QHe}=b("node:stream"),{isArrayBuffer:wHe}=b("node:util/types"),{serializeAMimeType:SHe}=ei(),{multipartFormDataParser:NHe}=Pte(),GL;try{let t=b("node:crypto");GL=e=>t.randomInt(0,e)}catch{GL=t=>Math.floor(Math.random(t))}var iS=new TextEncoder;function THe(){}var Vte=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,Wte;Vte&&(Wte=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!QHe(e)&&!Yte(e)&&e.cancel("Response object has been garbage collected").catch(THe)}));function Jte(t,e=!1){let r=null;t instanceof ReadableStream?r=t:Ote(t)?r=t.stream():r=new ReadableStream({async pull(c){let A=typeof s=="string"?iS.encode(s):s;A.byteLength&&c.enqueue(A),queueMicrotask(()=>EHe(c))},start(){},type:"bytes"}),HL(mHe(r));let n=null,s=null,i=null,o=null;if(typeof t=="string")s=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(wHe(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(II.isFormDataLike(t)){let c=`----formdata-undici-0${`${GL(1e11)}`.padStart(11,"0")}`,A=`--${c}\r
|
||||
var L8e=Object.create;var MM=Object.defineProperty;var U8e=Object.getOwnPropertyDescriptor;var P8e=Object.getOwnPropertyNames;var O8e=Object.getPrototypeOf,H8e=Object.prototype.hasOwnProperty;var b=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Sa=(t,e)=>{for(var r in e)MM(t,r,{get:e[r],enumerable:!0})},G8e=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of P8e(e))!H8e.call(t,s)&&s!==r&&MM(t,s,{get:()=>e[s],enumerable:!(n=U8e(e,s))||n.enumerable});return t};var Ae=(t,e,r)=>(r=t!=null?L8e(O8e(t)):{},G8e(e||!t||!t.__esModule?MM(r,"default",{value:t,enumerable:!0}):r,t));var kZ=E(Fp=>{"use strict";var x7t=b("net"),z8e=b("tls"),OM=b("http"),xZ=b("https"),j8e=b("events"),R7t=b("assert"),K8e=b("util");Fp.httpOverHttp=$8e;Fp.httpsOverHttp=X8e;Fp.httpOverHttps=Z8e;Fp.httpsOverHttps=e4e;function $8e(t){var e=new au(t);return e.request=OM.request,e}function X8e(t){var e=new au(t);return e.request=OM.request,e.createSocket=RZ,e.defaultPort=443,e}function Z8e(t){var e=new au(t);return e.request=xZ.request,e}function e4e(t){var e=new au(t);return e.request=xZ.request,e.createSocket=RZ,e.defaultPort=443,e}function au(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||OM.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(n,s,i,o){for(var a=DZ(s,i,o),c=0,A=e.requests.length;c<A;++c){var u=e.requests[c];if(u.host===a.host&&u.port===a.port){e.requests.splice(c,1),u.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)})}K8e.inherits(au,j8e.EventEmitter);au.prototype.addRequest=function(e,r,n,s){var i=this,o=HM({request:e},i.options,DZ(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",A),a.on("agentRemove",A),e.onSocket(a);function c(){i.emit("free",a,o)}function A(u){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",A),a.removeListener("agentRemove",A)}})};au.prototype.createSocket=function(e,r){var n=this,s={};n.sockets.push(s);var i=HM({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Tl("making CONNECT request");var o=n.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",A),o.once("error",u),o.end();function a(l){l.upgrade=!0}function c(l,d,h){process.nextTick(function(){A(l,d,h)})}function A(l,d,h){if(o.removeAllListeners(),d.removeAllListeners(),l.statusCode!==200){Tl("tunneling socket could not be established, statusCode=%d",l.statusCode),d.destroy();var f=new Error("tunneling socket could not be established, statusCode="+l.statusCode);f.code="ECONNRESET",e.request.emit("error",f),n.removeSocket(s);return}if(h.length>0){Tl("got illegal response body from proxy"),d.destroy();var f=new Error("got illegal response body from proxy");f.code="ECONNRESET",e.request.emit("error",f),n.removeSocket(s);return}return Tl("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=d,r(d)}function u(l){o.removeAllListeners(),Tl(`tunneling socket could not be established, cause=%s
|
||||
`,l.message,l.stack);var d=new Error("tunneling socket could not be established, cause="+l.message);d.code="ECONNRESET",e.request.emit("error",d),n.removeSocket(s)}};au.prototype.removeSocket=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(s){n.request.onSocket(s)})}};function RZ(t,e){var r=this;au.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),i=HM({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),o=z8e.connect(0,i);r.sockets[r.sockets.indexOf(n)]=o,e(o)})}function DZ(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function HM(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var s=Object.keys(n),i=0,o=s.length;i<o;++i){var a=s[i];n[a]!==void 0&&(t[a]=n[a])}}return t}var Tl;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Tl=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)}:Tl=function(){};Fp.debug=Tl});var GM=E((k7t,vZ)=>{vZ.exports=kZ()});var yr=E((v7t,_Z)=>{_Z.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 Lt=E((_7t,iee)=>{"use strict";var FZ=Symbol.for("undici.error.UND_ERR"),Br=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[FZ]===!0}[FZ]=!0},MZ=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),qM=class extends Br{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[MZ]===!0}[MZ]=!0},LZ=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),YM=class extends Br{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[LZ]===!0}[LZ]=!0},UZ=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),VM=class extends Br{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[UZ]===!0}[UZ]=!0},PZ=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),WM=class extends Br{constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[PZ]===!0}[PZ]=!0},OZ=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),JM=class extends Br{constructor(e,r,n,s){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=s,this.s
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function p5e(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let i=n.length;i!==0;i--){let o=n[i-1].trim();if(e5e.has(o)){s=o;break}}s!==""&&(t.referrerPolicy=s)}function m5e(){return"allowed"}function E5e(){return"success"}function C5e(){return"success"}function I5e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function y5e(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&&UL(t.origin)&&!UL(II(t))&&(e=null);break;case"same-origin":oS(t,II(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function Vp(t,e){return t}function B5e(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Vp(t.domainLookupStartTime,r),domainLookupEndTime:Vp(t.domainLookupEndTime,r),connectionStartTime:Vp(t.connectionStartTime,r),connectionEndTime:Vp(t.connectionEndTime,r),secureConnectionStartTime:Vp(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function b5e(t){return Vp(i5e.now(),t)}function Q5e(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}}function Cte(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function w5e(t){return{referrerPolicy:t.referrerPolicy}}function S5e(t){let e=t.referrerPolicy;Hh(e);let r=null;if(t.referrer==="client"){let a=hte();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=LL(r),s=LL(r,!0);n.toString().length>4096&&(n=s);let i=oS(t,n),o=CI(n)&&!CI(t.url);switch(e){case"origin":return s??LL(r,!0);case"unsafe-url":return n;case"same-origin":return i?s:"no-referrer";case"origin-when-cross-origin":return i?n:s;case"strict-origin-when-cross-origin":{let a=II(t);return oS(n,a)?n:CI(n)&&!CI(a)?"no-referrer":s}default:return o?"no-referrer":s}}function LL(t,e){return Hh(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)}function CI(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"))}}function N5e(t,e){if(iS===void 0)return!0;let r=Ite(e);if(r==="no metadata"||r.length===0)return!0;let n=x5e(r),s=R5e(r,n);for(let i of s){let o=i.algo,a=i.hash,c=iS.createHash(o).update(t).digest("base64");if(c[c.length-1]==="="&&(c[c.length-2]==="="?c=c.slice(0,-2):c=c.slice(0,-1)),D5e(c,a))return!0}return!1}var T5e=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function Ite(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=T5e.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let i=s.groups.algo.toLowerCase();gte.includes(i)&&e.push(s.groups)}return r===!0?"no metadata":e}function x5e(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}function R5e(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}function D5e(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}function k5e(t){}function oS(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function v5e(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}function _5e(t){return t.controller.state==="aborted"}function F5e(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function M5e(t){return c5e[t.toLowerCase()]??t}function L5e(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return Hh(typeof e=="string"),e}var U5e=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function yte(t,e,r=0,n=1){class s{
Line truncated
|
||||
`);function fHe(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function gHe(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}function pHe(t,e){cS(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"),s=[],i={position:0};for(;t[i.position]===13&&t[i.position+1]===10;)i.position+=2;let o=t.length;for(;t[o-1]===10&&t[o-2]===13;)o-=2;for(o!==t.length&&(t=t.subarray(0,o));;){if(t.subarray(i.position,i.position+n.length).equals(n))i.position+=n.length;else return"failure";if(i.position===t.length-2&&AS(t,dHe,i)||i.position===t.length-4&&AS(t,hHe,i))return s;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let a=mHe(t,i);if(a==="failure")return"failure";let{name:c,filename:A,contentType:u,encoding:l}=a;i.position+=2;let d;{let f=t.indexOf(n.subarray(2),i.position);if(f===-1)return"failure";d=t.subarray(i.position,f-4),i.position+=d.length,l==="base64"&&(d=Buffer.from(d.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let h;A!==null?(u??="text/plain",fHe(u)||(u=""),h=new uHe([d],A,{type:u})):h=iHe(Buffer.from(d)),cS(vte(c)),cS(typeof h=="string"&&vte(h)||aHe(h)),s.push(cHe(c,h,A))}}function mHe(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:i};let o=Jp(a=>a!==10&&a!==13&&a!==58,t,e);if(o=VL(o,!0,!0,a=>a===9||a===32),!oHe.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,Jp(a=>a===32||a===9,t,e),sHe(o)){case"content-disposition":{if(r=n=null,!AS(t,lHe,e)||(e.position+=17,r=Mte(t,e),r===null))return"failure";if(AS(t,Fte,e)){let a=e.position+Fte.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,n=Mte(t,e),n===null))return"failure"}break}case"content-type":{let a=Jp(c=>c!==10&&c!==13,t,e);a=VL(a,!1,!0,c=>c===9||c===32),s=_te(a);break}case"content-transfer-encoding":{let a=Jp(c=>c!==10&&c!==13,t,e);a=VL(a,!1,!0,c=>c===9||c===32),i=_te(a);break}default:Jp(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function Mte(t,e){cS(t[e.position-1]===34);let r=Jp(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)}function Jp(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function VL(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}function AS(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}Lte.exports={multipartFormDataParser:pHe,validateBoundary:gHe}});var Kp=E((iWt,zte)=>{"use strict";var bI=dt(),{ReadableStreamFrom:EHe,isBlobLike:Pte,isReadableStreamLike:CHe,readableStreamClose:IHe,createDeferredPromise:yHe,fullyReadBody:BHe,extractMimeType:bHe,utf8DecodeBytes:Gte}=Ti(),{FormData:Ote}=BI(),{kState:jp}=xl(),{webidl:QHe}=Kn(),{Blob:wHe}=b("node:buffer"),WL=b("node:assert"),{isErrored:qte,isDisturbed:SHe}=b("node:stream"),{isArrayBuffer:NHe}=b("node:util/types"),{serializeAMimeType:THe}=Ks(),{multipartFormDataParser:xHe}=Ute(),JL;try{let t=b("node:crypto");JL=e=>t.randomInt(0,e)}catch{JL=t=>Math.floor(Math.random(t))}var uS=new TextEncoder;function RHe(){}var Yte=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,Vte;Yte&&(Vte=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!SHe(e)&&!qte(e)&&e.cancel("Response object has been garbage collected").catch(RHe)}));function Wte(t,e=!1){let r=null;t instanceof ReadableStream?r=t:Pte(t)?r=t.stream():r=new ReadableStream({async pull(c){let A=typeof s=="string"?uS.encode(s):s;A.byteLength&&c.enqueue(A),queueMicrotask(()=>IHe(c))},start(){},type:"bytes"}),WL(CHe(r));let n=null,s=null,i=null,o=null;if(typeof t=="string")s=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(NHe(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(bI.isFormDataLike(t)){let c=`----formdata-undici-0${`${JL(1e11)}`.padStart(11,"0")}`,A=`--${c}\r
|
||||
Content-Disposition: form-data`;let u=I=>I.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),l=I=>I.replace(/\r?\n|\r/g,`\r
|
||||
`),d=[],h=new Uint8Array([13,10]);i=0;let f=!1;for(let[I,m]of t)if(typeof m=="string"){let C=iS.encode(A+`; name="${u(l(I))}"\r
|
||||
`),d=[],h=new Uint8Array([13,10]);i=0;let f=!1;for(let[I,m]of t)if(typeof m=="string"){let C=uS.encode(A+`; name="${u(l(I))}"\r
|
||||
\r
|
||||
${l(m)}\r
|
||||
`);d.push(C),i+=C.byteLength}else{let C=iS.encode(`${A}; name="${u(l(I))}"`+(m.name?`; filename="${u(m.name)}"`:"")+`\r
|
||||
`);d.push(C),i+=C.byteLength}else{let C=uS.encode(`${A}; name="${u(l(I))}"`+(m.name?`; filename="${u(m.name)}"`:"")+`\r
|
||||
Content-Type: ${m.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);d.push(C,m,h),typeof m.size=="number"?i+=C.byteLength+m.size+h.byteLength:f=!0}let p=iS.encode(`--${c}--\r
|
||||
`);d.push(p),i+=p.byteLength,f&&(i=null),s=t,n=async function*(){for(let I of d)I.stream?yield*I.stream():yield I},o=`multipart/form-data; boundary=${c}`}else if(Ote(t))s=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(II.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:pHe(t)}if((typeof s=="string"||II.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let c;r=new ReadableStream({async start(){c=n(t)[Symbol.asyncIterator]()},async pull(A){let{value:u,done:l}=await c.next();if(l)queueMicrotask(()=>{A.close(),A.byobRequest?.respond(0)});else if(!Yte(r)){let d=new Uint8Array(u);d.byteLength&&A.enqueue(d)}return A.desiredSize>0},async cancel(A){await c.return()},type:"bytes"})}return[{stream:r,source:s,length:i},o]}function xHe(t,e=!1){return t instanceof ReadableStream&&(HL(!II.isDisturbed(t),"The body has already been consumed."),HL(!t.locked,"The stream is locked.")),Jte(t,e)}function RHe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}function DHe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function kHe(t){return{blob(){return Wp(this,r=>{let n=Gte(this);return n===null?n="":n&&(n=SHe(n)),new bHe([r],{type:n})},t)},arrayBuffer(){return Wp(this,r=>new Uint8Array(r).buffer,t)},text(){return Wp(this,qte,t)},json(){return Wp(this,_He,t)},formData(){return Wp(this,r=>{let n=Gte(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=NHe(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Hte;return i[Jp]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new Hte;for(let[o,a]of s)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Wp(this,r=>new Uint8Array(r),t)}}}function vHe(t){Object.assign(t.prototype,kHe(t))}async function Wp(t,e,r){if(BHe.brandCheck(t,r),zte(t))throw new TypeError("Body is unusable: Body has already been read");DHe(t[Jp]);let n=CHe(),s=o=>n.reject(o),i=o=>{try{n.resolve(e(o))}catch(a){s(a)}};return t[Jp].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await IHe(t[Jp].body,i,s),n.promise)}function zte(t){let e=t[Jp].body;return e!=null&&(e.stream.locked||II.isDisturbed(e.stream))}function _He(t){return JSON.parse(qte(t))}function Gte(t){let e=t[Jp].headersList,r=yHe(e);return r==="failure"?null:r}jte.exports={extractBody:Jte,safelyExtractBody:xHe,cloneBody:RHe,mixinBody:vHe,streamRegistry:Wte,hasFinalizationRegistry:Vte,bodyUnusable:zte}});var ore=E((t7t,ire)=>{"use strict";var Ge=b("node:assert"),Ze=ht(),{channels:Kte}=Fp(),qL=QL(),{RequestContentLengthMismatchError:Oh,ResponseContentLengthMismatchError:FHe,RequestAbortedError:rre,HeadersTimeoutError:MHe,HeadersOverflowError:LHe,SocketError:lS,InformationalError:jp,BodyTimeoutError:UHe,HTTPParserError:PHe,ResponseExceededMaxSizeError:OHe}=Lt(),{kUrl:nre,kReset:ti,kClient:JL,kParser:Mr,kBlocking:bI,kRunning:as,kPending:HHe,kSize:$te,kWriting:Dl,kQueue:Na,kNoRef:yI,kKeepAliveDefaultTimeout:GHe,kHostHeader:qHe,kPendingIdx:YHe,kRunningIdx:Qo,kError:wo,kPipelining:AS,kSocket:Kp,kKeepAliveTimeoutValue:dS,kMaxHeadersSize:YL,kKeepAliveMaxTimeout:VHe,kKeepAliveTimeoutThreshold:WHe,kHeadersTimeout:JHe,kBodyTimeout:zHe,kStrictContentLength:zL,kMaxRequests:Xte,kCounter:jHe,kMaxResponseSize:KHe,kOnError:$He,kResume:Rl,kHTTPContext:sre}=Br(),Qc=Wee(),XHe=Buffer.alloc(0),oS=Buffer[Symbol.species],aS=Ze.addListener,ZHe=Ze.removeAllListeners,VL;async function e9e(){let t=process.env.JEST_WORKER_ID?NL():void 0,e;try{e=await WebAssembly.compile(jee())}catch{e=await WebAssembly.compile(t||NL())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{Ge(fn.ptr===r);let i=n-Sc+wc.byteOffset;return fn.onStatus(new oS(wc.buffer,i,s))||0},wasm_on_message_begin:r=>(Ge(fn.ptr===r),fn.onMessageBegin()||0),wasm_on_header_field:(r,n,s)=>{Ge(fn.ptr===r);let i=n-Sc+wc.byteOffset;return fn.onHeaderField(new oS(wc.buffer,i,s))||0},wasm_on_header_value:(r,n,s)=>{Ge(fn.ptr===r);let i=n-Sc+wc.byteOffset;return fn.onHeaderValue(new oS(wc.buffer,i,s))||0},wasm_on_headers_complete:(r,n,s,i)=>(Ge(fn.ptr===r),fn.onHeadersComplete(n,!!s,!!i)||0),wasm_on_body:(r,n,s)=>{Ge(fn.ptr===r);let i=n-Sc+wc.byteOffset;return fn.onBody(new oS(wc.buffer,i,s))||0},wasm_on_message_complete:r=>(Ge(fn.ptr===r),fn.onMessageComplete()||0)}})}var WL=null,jL=e9e();jL.catch();var fn=null,wc=null,cS=0,Sc=null,t9e=0,BI=1,$p=2|BI,uS=4|BI,KL=8|t9e,$L=class{constructor(e,r,{exports:n}){Ge(Number.isFinite(e[YL])&&e[YL]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Qc.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],thi
Line truncated
|
||||
`);d.push(C,m,h),typeof m.size=="number"?i+=C.byteLength+m.size+h.byteLength:f=!0}let p=uS.encode(`--${c}--\r
|
||||
`);d.push(p),i+=p.byteLength,f&&(i=null),s=t,n=async function*(){for(let I of d)I.stream?yield*I.stream():yield I},o=`multipart/form-data; boundary=${c}`}else if(Pte(t))s=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(bI.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:EHe(t)}if((typeof s=="string"||bI.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let c;r=new ReadableStream({async start(){c=n(t)[Symbol.asyncIterator]()},async pull(A){let{value:u,done:l}=await c.next();if(l)queueMicrotask(()=>{A.close(),A.byobRequest?.respond(0)});else if(!qte(r)){let d=new Uint8Array(u);d.byteLength&&A.enqueue(d)}return A.desiredSize>0},async cancel(A){await c.return()},type:"bytes"})}return[{stream:r,source:s,length:i},o]}function DHe(t,e=!1){return t instanceof ReadableStream&&(WL(!bI.isDisturbed(t),"The body has already been consumed."),WL(!t.locked,"The stream is locked.")),Wte(t,e)}function kHe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}function vHe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function _He(t){return{blob(){return zp(this,r=>{let n=Hte(this);return n===null?n="":n&&(n=THe(n)),new wHe([r],{type:n})},t)},arrayBuffer(){return zp(this,r=>new Uint8Array(r).buffer,t)},text(){return zp(this,Gte,t)},json(){return zp(this,MHe,t)},formData(){return zp(this,r=>{let n=Hte(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=xHe(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Ote;return i[jp]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new Ote;for(let[o,a]of s)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return zp(this,r=>new Uint8Array(r),t)}}}function FHe(t){Object.assign(t.prototype,_He(t))}async function zp(t,e,r){if(QHe.brandCheck(t,r),Jte(t))throw new TypeError("Body is unusable: Body has already been read");vHe(t[jp]);let n=yHe(),s=o=>n.reject(o),i=o=>{try{n.resolve(e(o))}catch(a){s(a)}};return t[jp].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await BHe(t[jp].body,i,s),n.promise)}function Jte(t){let e=t[jp].body;return e!=null&&(e.stream.locked||bI.isDisturbed(e.stream))}function MHe(t){return JSON.parse(Gte(t))}function Hte(t){let e=t[jp].headersList,r=bHe(e);return r==="failure"?null:r}zte.exports={extractBody:Wte,safelyExtractBody:DHe,cloneBody:kHe,mixinBody:FHe,streamRegistry:Vte,hasFinalizationRegistry:Yte,bodyUnusable:Jte}});var ire=E((oWt,sre)=>{"use strict";var Ge=b("node:assert"),Xe=dt(),{channels:jte}=Lp(),zL=xL(),{RequestContentLengthMismatchError:Gh,ResponseContentLengthMismatchError:LHe,RequestAbortedError:tre,HeadersTimeoutError:UHe,HeadersOverflowError:PHe,SocketError:pS,InformationalError:$p,BodyTimeoutError:OHe,HTTPParserError:HHe,ResponseExceededMaxSizeError:GHe}=Lt(),{kUrl:rre,kReset:$s,kClient:XL,kParser:Mr,kBlocking:SI,kRunning:cs,kPending:qHe,kSize:Kte,kWriting:Dl,kQueue:Ta,kNoRef:QI,kKeepAliveDefaultTimeout:YHe,kHostHeader:VHe,kPendingIdx:WHe,kRunningIdx:bo,kError:Qo,kPipelining:fS,kSocket:Xp,kKeepAliveTimeoutValue:mS,kMaxHeadersSize:jL,kKeepAliveMaxTimeout:JHe,kKeepAliveTimeoutThreshold:zHe,kHeadersTimeout:jHe,kBodyTimeout:KHe,kStrictContentLength:ZL,kMaxRequests:$te,kCounter:$He,kMaxResponseSize:XHe,kOnError:ZHe,kResume:Rl,kHTTPContext:nre}=yr(),wc=Vee(),e9e=Buffer.alloc(0),lS=Buffer[Symbol.species],dS=Xe.addListener,t9e=Xe.removeAllListeners,KL;async function r9e(){let t=process.env.JEST_WORKER_ID?kL():void 0,e;try{e=await WebAssembly.compile(zee())}catch{e=await WebAssembly.compile(t||kL())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{Ge(gn.ptr===r);let i=n-Nc+Sc.byteOffset;return gn.onStatus(new lS(Sc.buffer,i,s))||0},wasm_on_message_begin:r=>(Ge(gn.ptr===r),gn.onMessageBegin()||0),wasm_on_header_field:(r,n,s)=>{Ge(gn.ptr===r);let i=n-Nc+Sc.byteOffset;return gn.onHeaderField(new lS(Sc.buffer,i,s))||0},wasm_on_header_value:(r,n,s)=>{Ge(gn.ptr===r);let i=n-Nc+Sc.byteOffset;return gn.onHeaderValue(new lS(Sc.buffer,i,s))||0},wasm_on_headers_complete:(r,n,s,i)=>(Ge(gn.ptr===r),gn.onHeadersComplete(n,!!s,!!i)||0),wasm_on_body:(r,n,s)=>{Ge(gn.ptr===r);let i=n-Nc+Sc.byteOffset;return gn.onBody(new lS(Sc.buffer,i,s))||0},wasm_on_message_complete:r=>(Ge(gn.ptr===r),gn.onMessageComplete()||0)}})}var $L=null,eU=r9e();eU.catch();var gn=null,Sc=null,hS=0,Nc=null,n9e=0,wI=1,Zp=2|wI,gS=4|wI,tU=8|n9e,rU=class{constructor(e,r,{exports:n}){Ge(Number.isFinite(e[jL])&&e[jL]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(wc.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],thi
Line truncated
|
||||
`;if(typeof s=="string"?p+=`host: ${s}\r
|
||||
`:p+=t[qHe],i?p+=`connection: upgrade\r
|
||||
`:p+=t[VHe],i?p+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[AS]&&!h[ti]?p+=`connection: keep-alive\r
|
||||
`:t[fS]&&!h[$s]?p+=`connection: keep-alive\r
|
||||
`:p+=`connection: close\r
|
||||
`,Array.isArray(A))for(let I=0;I<A.length;I+=2){let m=A[I+0],C=A[I+1];if(Array.isArray(C))for(let y=0;y<C.length;y++)p+=`${m}: ${C[y]}\r
|
||||
`;else p+=`${m}: ${C}\r
|
||||
`}return Kte.sendHeaders.hasSubscribers&&Kte.sendHeaders.publish({request:e,headers:p,socket:h}),!c||d===0?ere(f,null,t,e,h,u,p,l):Ze.isBuffer(c)?ere(f,c,t,e,h,u,p,l):Ze.isBlobLike(c)?typeof c.stream=="function"?tre(f,c.stream(),t,e,h,u,p,l):a9e(f,c,t,e,h,u,p,l):Ze.isStream(c)?o9e(f,c,t,e,h,u,p,l):Ze.isIterable(c)?tre(f,c,t,e,h,u,p,l):Ge(!1),!0}function o9e(t,e,r,n,s,i,o,a){Ge(i!==0||r[as]===0,"stream body cannot be pipelined");let c=!1,A=new hS({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(f){if(!c)try{!A.write(f)&&this.pause&&this.pause()}catch(p){Ze.destroy(this,p)}},l=function(){c||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let f=new rre;queueMicrotask(()=>h(f))}},h=function(f){if(!c){if(c=!0,Ge(s.destroyed||s[Dl]&&r[as]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!f)try{A.end()}catch(p){f=p}A.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?Ze.destroy(e,f):Ze.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.on("drain",l).on("error",h),e.errorEmitted??e.errored?setImmediate(()=>h(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>h(null)),(e.closeEmitted??e.closed)&&setImmediate(d)}function ere(t,e,r,n,s,i,o,a){try{e?Ze.isBuffer(e)&&(Ge(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`}return jte.sendHeaders.hasSubscribers&&jte.sendHeaders.publish({request:e,headers:p,socket:h}),!c||d===0?Zte(f,null,t,e,h,u,p,l):Xe.isBuffer(c)?Zte(f,c,t,e,h,u,p,l):Xe.isBlobLike(c)?typeof c.stream=="function"?ere(f,c.stream(),t,e,h,u,p,l):A9e(f,c,t,e,h,u,p,l):Xe.isStream(c)?c9e(f,c,t,e,h,u,p,l):Xe.isIterable(c)?ere(f,c,t,e,h,u,p,l):Ge(!1),!0}function c9e(t,e,r,n,s,i,o,a){Ge(i!==0||r[cs]===0,"stream body cannot be pipelined");let c=!1,A=new ES({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(f){if(!c)try{!A.write(f)&&this.pause&&this.pause()}catch(p){Xe.destroy(this,p)}},l=function(){c||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let f=new tre;queueMicrotask(()=>h(f))}},h=function(f){if(!c){if(c=!0,Ge(s.destroyed||s[Dl]&&r[cs]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!f)try{A.end()}catch(p){f=p}A.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?Xe.destroy(e,f):Xe.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.on("drain",l).on("error",h),e.errorEmitted??e.errored?setImmediate(()=>h(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>h(null)),(e.closeEmitted??e.closed)&&setImmediate(d)}function Zte(t,e,r,n,s,i,o,a){try{e?Xe.isBuffer(e)&&(Ge(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[ti]=!0)):i===0?s.write(`${o}content-length: 0\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[$s]=!0)):i===0?s.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(Ge(i===null,"no body must not have content length"),s.write(`${o}\r
|
||||
`,"latin1")),n.onRequestSent(),r[Rl]()}catch(c){t(c)}}async function a9e(t,e,r,n,s,i,o,a){Ge(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Oh;let c=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`,"latin1")),n.onRequestSent(),r[Rl]()}catch(c){t(c)}}async function A9e(t,e,r,n,s,i,o,a){Ge(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Gh;let c=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(c),s.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(s[ti]=!0),r[Rl]()}catch(c){t(c)}}async function tre(t,e,r,n,s,i,o,a){Ge(i!==0||r[as]===0,"iterator body cannot be pipelined");let c=null;function A(){if(c){let d=c;c=null,d()}}let u=()=>new Promise((d,h)=>{Ge(c===null),s[wo]?h(s[wo]):c=d});s.on("close",A).on("drain",A);let l=new hS({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[wo])throw s[wo];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",A).off("drain",A)}}var hS=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Dl]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[wo])throw r[wo];if(r.destroyed)return!1;let A=Buffer.byteLength(e);if(!A)return!0;if(s!==null&&o+A>s){if(i[zL])throw new Oh;process.emitWarning(new Oh)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[ti]=!0),s===null?r.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"),s.write(c),s.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(s[$s]=!0),r[Rl]()}catch(c){t(c)}}async function ere(t,e,r,n,s,i,o,a){Ge(i!==0||r[cs]===0,"iterator body cannot be pipelined");let c=null;function A(){if(c){let d=c;c=null,d()}}let u=()=>new Promise((d,h)=>{Ge(c===null),s[Qo]?h(s[Qo]):c=d});s.on("close",A).on("drain",A);let l=new ES({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[Qo])throw s[Qo];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",A).off("drain",A)}}var ES=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Dl]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[Qo])throw r[Qo];if(r.destroyed)return!1;let A=Buffer.byteLength(e);if(!A)return!0;if(s!==null&&o+A>s){if(i[ZL])throw new Gh;process.emitWarning(new Gh)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[$s]=!0),s===null?r.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${c}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1")),s===null&&r.write(`\r
|
||||
${A.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=A;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[Mr].timeout&&r[Mr].timeoutType===$p&&r[Mr].timeout.refresh&&r[Mr].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Dl]=!1,e[wo])throw e[wo];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=A;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[Mr].timeout&&r[Mr].timeoutType===Zp&&r[Mr].timeout.refresh&&r[Mr].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Dl]=!1,e[Qo])throw e[Qo];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${o}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&s!==r){if(n[zL])throw new Oh;process.emitWarning(new Oh)}e[Mr].timeout&&e[Mr].timeoutType===$p&&e[Mr].timeout.refresh&&e[Mr].timeout.refresh(),n[Rl]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Dl]=!1,e&&(Ge(n[as]<=1,"pipeline should only contain this request"),s(e))}};ire.exports=r9e});var fre=E((r7t,hre)=>{"use strict";var So=b("node:assert"),{pipeline:c9e}=b("node:stream"),Et=ht(),{RequestContentLengthMismatchError:XL,RequestAbortedError:are,SocketError:QI,InformationalError:ZL}=Lt(),{kUrl:fS,kReset:pS,kClient:Xp,kRunning:mS,kPending:A9e,kQueue:kl,kPendingIdx:eU,kRunningIdx:Ta,kError:Ra,kSocket:Rn,kStrictContentLength:u9e,kOnError:tU,kMaxConcurrentStreams:dre,kHTTP2Session:xa,kResume:vl,kSize:l9e,kHTTPContext:d9e}=Br(),hu=Symbol("open streams"),cre,Are=!1,gS;try{gS=b("node:http2")}catch{gS={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:h9e,HTTP2_HEADER_METHOD:f9e,HTTP2_HEADER_PATH:g9e,HTTP2_HEADER_SCHEME:p9e,HTTP2_HEADER_CONTENT_LENGTH:m9e,HTTP2_HEADER_EXPECT:E9e,HTTP2_HEADER_STATUS:C9e}}=gS;function I9e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}async function y9e(t,e){t[Rn]=e,Are||(Are=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=gS.connect(t[fS],{createConnection:()=>e,peerMaxConcurrentStreams:t[dre]});r[hu]=0,r[Xp]=t,r[Rn]=e,Et.addListener(r,"error",b9e),Et.addListener(r,"frameError",Q9e),Et.addListener(r,"end",w9e),Et.addListener(r,"goaway",S9e),Et.addListener(r,"close",function(){let{[Xp]:s}=this,{[Rn]:i}=s,o=this[Rn][Ra]||this[Ra]||new QI("closed",Et.getSocketInfo(i));if(s[xa]=null,s.destroyed){So(s[A9e]===0);let a=s[kl].splice(s[Ta]);for(let c=0;c<a.length;c++){let A=a[c];Et.errorRequest(s,A,o)}}}),r.unref(),t[xa]=r,e[xa]=r,Et.addListener(e,"error",function(s){So(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Ra]=s,this[Xp][tU](s)}),Et.addListener(e,"end",function(){Et.destroy(this,new QI("other side closed",Et.getSocketInfo(this)))}),Et.addListener(e,"close",function(){let s=this[Ra]||new QI("closed",Et.getSocketInfo(this));t[Rn]=null,this[xa]!=null&&this[xa].destroy(s),t[eU]=t[Ta],So(t[mS]===0),t.emit("disconnect",t[fS],[t],s),t[vl]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return T9e(t,...s)},resume(){B9e(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function B9e(t){let e=t[Rn];e?.destroyed===!1&&(t[l9e]===0&&t[dre]===0?(e.unref(),t[xa].unref()):(e.ref(),t[xa].ref()))}function b9e(t){So(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Rn][Ra]=t,this[Xp][tU](t)}function Q9e(t,e,r){if(r===0){let n=new ZL(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Rn][Ra]=n,this[Xp][tU](n)}}function w9e(){let t=new QI("other side closed",Et.getSocketInfo(this[Rn]));this.destroy(t),Et.destroy(this[Rn],t)}function S9e(t){let e=this[Ra]||new QI(`HTTP/2: "GOAWAY" frame received with code ${t}`,Et.getSocketInfo(this)),r=this[Xp];if(r[Rn]=null,r[d9e]=null,this[xa]!=null&&(this[xa].destroy(e),this[xa]=null),Et.destroy(this[Rn],e),r[Ta]<r[kl].length){let n=r[kl][r[Ta]];r[kl][r[Ta]++]=null,Et.errorRequest(r,n,e),r[eU]=r[Ta]}So(r[mS]===0),r.emit("disconnect",r[fS],[r],e),r[vl]()}function N9e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function T9e(t,e){let r=t[xa],{method:n,path:s,host:i,upgrade:o,expectContinue:a,signal:c,headers:A}=e,{body:u}=e;if(o)return Et.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let N=0;N<A.length;N+=2){let M=A[N+0],q=A[N+1];if(Array.isArray(q))for(let k=0;k<q.length;k++)l[M]?l[M]+=`,${q[k]}`:l[M]=q[k];else l[M]=q}let d,{hostname:h,port:f}=t[fS];l[h9e]=i||`${h}${f?`:${f}`:""}`,l[f9e]=n;let p=N=>{e.aborted||e.completed||(N=N||new are,Et.errorRequest(t,e,N),d!=null&&Et.destroy(d,N),Et.destroy(u,N),t[kl][t[Ta]++]=null,t[vl]())};try{e.onConnect(p)}catch(N){Et.errorRequest(t,e,N)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),d=r.request(l,{endStream:!1,signal:c}),d.id&&!d.pending?(e.onUpgrade(null,null,d),++r[hu],t[kl][t[Ta]++]=null):d.once("ready",()=>{e.onUpgrade(null,null,d),++r[hu],t[kl][t[Ta]++]=null}),d.once("close",()=>{r[hu]-=1,r[hu]===0&&r.unref()}),!0;l[g9e]=s,l[p9e]="https";let I=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let m=Et.bodyLength(u);if(Et.isFormDataLike(u)){cre??=zp().extractBody;let[N,M]=cre(u);l["content-type"]=M,u=N.stream,m=N.length}if(m==null&&(m=e.contentLength),(m===0||!I)&&(m=null),N9e(n)&&m>0&&e.contentLength!=null&&e.contentLength!==m){if(t[u9e])return Et.errorRequest(t,e,new XL),!1;process.emitWarning(new XL)}m!=null&&(So(u,"no body must not have content length"),l[m9e]=`${m}`),r.ref();let C=n==="GET"||n==="HEAD"||u===null;return a?(l[E9e]="100-continue",d=r.request(l,{endStream:C,signal:c}),d.once("cont
Line truncated
|
||||
`,this[eGe]=c??3e5,this[Z9e]=s??3e5,this[tGe]=C??!0,this[rGe]=N,this[iU]=q,this[Fl]=null,this[aGe]=P>-1?P:-1,this[AGe]=ee??100,this[Kr]=null,this[Da]=[],this[gu]=0,this[ka]=0,this[TI]=ce=>aU(this,ce),this[cGe]=ce=>Sre(this,ce)}get pipelining(){return this[yS]}set pipelining(e){this[yS]=e,this[TI](!0)}get[DI](){return this[Da].length-this[ka]}get[RI](){return this[ka]-this[gu]}get[xI](){return this[Da].length-this[gu]}get[W9e](){return!!this[Kr]&&!this[em]&&!this[Kr].destroyed}get[sU](){return!!(this[Kr]?.busy(null)||this[xI]>=(wre(this)||1)||this[DI]>0)}[V9e](e){Nre(this),this.once("connect",e)}[oGe](e,r){let n=e.origin||this[Tc].origin,s=new P9e(n,e,r);return this[Da].push(s),this[Gh]||(Hh.bodyLength(s.body)==null&&Hh.isIterable(s.body)?(this[Gh]=1,queueMicrotask(()=>aU(this))):this[TI](!0)),this[Gh]&&this[Ml]!==2&&this[sU]&&(this[Ml]=2),this[Ml]<2}async[sGe](){return new Promise(e=>{this[xI]?this[Fl]=e:e(null)})}async[iGe](e){return new Promise(r=>{let n=this[Da].splice(this[ka]);for(let i=0;i<n.length;i++){let o=n[i];Hh.errorRequest(this,o,e)}let s=()=>{this[Fl]&&(this[Fl](),this[Fl]=null),r(null)};this[Kr]?(this[Kr].destroy(e,s),this[Kr]=null):queueMicrotask(s),this[TI]()})}},dGe=IS();function Sre(t,e){if(t[RI]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){fu(t[ka]===t[gu]);let r=t[Da].splice(t[gu]);for(let n=0;n<r.length;n++){let s=r[n];Hh.errorRequest(t,s,e)}fu(t[xI]===0)}}async function Nre(t){fu(!t[em]),fu(!t[Kr]);let{host:e,hostname:r,protocol:n,port:s}=t[Tc];if(r[0]==="["){let i=r.indexOf("]");fu(i!==-1);let o=r.substring(1,i);fu(Qre.isIP(o)),r=o}t[em]=!0,Zp.beforeConnect.hasSubscribers&&Zp.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Kr]?.version,servername:t[_l],localAddress:t[NI]},connector:t[SI]});try{let i=await new Promise((o,a)=>{t[SI]({host:e,hostname:r,protocol:n,port:s,servername:t[_l],localAddress:t[NI]},(c,A)=>{c?a(c):o(A)})});if(t.destroyed){Hh.destroy(i.on("error",Bre),new G9e);return}fu(i);try{t[Kr]=i.alpnProtocol==="h2"?await lGe(t,i):await uGe(t,i)}catch(o){throw i.destroy().on("error",Bre),o}t[em]=!1,i[nGe]=0,i[iU]=t[iU],i[Y9e]=t,i[z9e]=null,Zp.connected.hasSubscribers&&Zp.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Kr]?.version,servername:t[_l],localAddress:t[NI]},connector:t[SI],socket:i}),t.emit("connect",t[Tc],[t])}catch(i){if(t.destroyed)return;if(t[em]=!1,Zp.connectError.hasSubscribers&&Zp.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Kr]?.version,servername:t[_l],localAddress:t[NI]},connector:t[SI],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(fu(t[RI]===0);t[DI]>0&&t[Da][t[ka]].servername===t[_l];){let o=t[Da][t[ka]++];Hh.errorRequest(t,o,i)}else Sre(t,i);t.emit("connectionError",t[Tc],[t],i)}t[TI]()}function bre(t){t[Ml]=0,t.emit("drain",t[Tc],[t])}function aU(t,e){t[Gh]!==2&&(t[Gh]=2,hGe(t,e),t[Gh]=0,t[gu]>256&&(t[Da].splice(0,t[gu]),t[ka]-=t[gu],t[gu]=0))}function hGe(t,e){for(;;){if(t.destroyed){fu(t[DI]===0);return}if(t[Fl]&&!t[xI]){t[Fl](),t[Fl]=null;return}if(t[Kr]&&t[Kr].resume(),t[sU])t[Ml]=2;else if(t[Ml]===2){e?(t[Ml]=1,queueMicrotask(()=>bre(t))):bre(t);continue}if(t[DI]===0||t[RI]>=(wre(t)||1))return;let r=t[Da][t[ka]];if(t[Tc].protocol==="https:"&&t[_l]!==r.servername){if(t[RI]>0)return;t[_l]=r.servername,t[Kr]?.destroy(new H9e("servername changed"),()=>{t[Kr]=null,aU(t)})}if(t[em])return;if(!t[Kr]){Nre(t);return}if(t[Kr].destroyed||t[Kr].busy(r))return;!r.aborted&&t[Kr].write(r)?t[ka]++:t[Da].splice(t[ka],1)}}Tre.exports=oU});var cU=E((a7t,xre)=>{"use strict";var BS=class{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)}};xre.exports=class{constructor(){this.head=this.tail=new BS}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new BS),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Dre=E((c7t,Rre)=>{var{kFree:fGe,kConnected:gGe,kPending:pGe,kQueued:mGe,kRunning:EGe,kSize:CGe}=Br(),qh=Symbol("pool"),AU=class{constructor(e){this[qh]=e}get connected(){return this[qh][gGe]}get free(){return this[qh][fGe]}get pending(){return this[qh][pGe]}get queued(){return this[qh][mGe]}get running(){return this[qh][EGe]}get size(){return this[qh][CGe]}};Rre.exports=AU});var gU=E((A7t,Hre)=>{"use strict";var IGe=Pp(),yGe=cU(),{kConnected:uU,kSize:kre,kRunning:vre,kPending:_re,kQueued:kI,kBusy:BGe,kFree:bGe,kUrl:QGe,kClose:wGe,kDestroy:SGe,kDispatch:NGe}=Br(),TGe=Dre(),ri=Symbol("clients"),xs=Symbol("needDrain"),vI=Symbol("queue"),lU=Symbol("closed resolve"),dU=Symbol("onDrain"),Fre=Symbol("onConnect"),Mre=Symbol("onDisconnect"),Lre=Symbol("onC
Line truncated
|
||||
`,"latin1"),r!==null&&s!==r){if(n[ZL])throw new Gh;process.emitWarning(new Gh)}e[Mr].timeout&&e[Mr].timeoutType===Zp&&e[Mr].timeout.refresh&&e[Mr].timeout.refresh(),n[Rl]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Dl]=!1,e&&(Ge(n[cs]<=1,"pipeline should only contain this request"),s(e))}};sre.exports=s9e});var hre=E((aWt,dre)=>{"use strict";var wo=b("node:assert"),{pipeline:u9e}=b("node:stream"),Et=dt(),{RequestContentLengthMismatchError:nU,RequestAbortedError:ore,SocketError:NI,InformationalError:sU}=Lt(),{kUrl:CS,kReset:yS,kClient:em,kRunning:BS,kPending:l9e,kQueue:kl,kPendingIdx:iU,kRunningIdx:xa,kError:Da,kSocket:Dn,kStrictContentLength:d9e,kOnError:oU,kMaxConcurrentStreams:lre,kHTTP2Session:Ra,kResume:vl,kSize:h9e,kHTTPContext:f9e}=yr(),hu=Symbol("open streams"),are,cre=!1,IS;try{IS=b("node:http2")}catch{IS={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:g9e,HTTP2_HEADER_METHOD:p9e,HTTP2_HEADER_PATH:m9e,HTTP2_HEADER_SCHEME:E9e,HTTP2_HEADER_CONTENT_LENGTH:C9e,HTTP2_HEADER_EXPECT:I9e,HTTP2_HEADER_STATUS:y9e}}=IS;function B9e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}async function b9e(t,e){t[Dn]=e,cre||(cre=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=IS.connect(t[CS],{createConnection:()=>e,peerMaxConcurrentStreams:t[lre]});r[hu]=0,r[em]=t,r[Dn]=e,Et.addListener(r,"error",w9e),Et.addListener(r,"frameError",S9e),Et.addListener(r,"end",N9e),Et.addListener(r,"goaway",T9e),Et.addListener(r,"close",function(){let{[em]:s}=this,{[Dn]:i}=s,o=this[Dn][Da]||this[Da]||new NI("closed",Et.getSocketInfo(i));if(s[Ra]=null,s.destroyed){wo(s[l9e]===0);let a=s[kl].splice(s[xa]);for(let c=0;c<a.length;c++){let A=a[c];Et.errorRequest(s,A,o)}}}),r.unref(),t[Ra]=r,e[Ra]=r,Et.addListener(e,"error",function(s){wo(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Da]=s,this[em][oU](s)}),Et.addListener(e,"end",function(){Et.destroy(this,new NI("other side closed",Et.getSocketInfo(this)))}),Et.addListener(e,"close",function(){let s=this[Da]||new NI("closed",Et.getSocketInfo(this));t[Dn]=null,this[Ra]!=null&&this[Ra].destroy(s),t[iU]=t[xa],wo(t[BS]===0),t.emit("disconnect",t[CS],[t],s),t[vl]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return R9e(t,...s)},resume(){Q9e(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function Q9e(t){let e=t[Dn];e?.destroyed===!1&&(t[h9e]===0&&t[lre]===0?(e.unref(),t[Ra].unref()):(e.ref(),t[Ra].ref()))}function w9e(t){wo(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Dn][Da]=t,this[em][oU](t)}function S9e(t,e,r){if(r===0){let n=new sU(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Dn][Da]=n,this[em][oU](n)}}function N9e(){let t=new NI("other side closed",Et.getSocketInfo(this[Dn]));this.destroy(t),Et.destroy(this[Dn],t)}function T9e(t){let e=this[Da]||new NI(`HTTP/2: "GOAWAY" frame received with code ${t}`,Et.getSocketInfo(this)),r=this[em];if(r[Dn]=null,r[f9e]=null,this[Ra]!=null&&(this[Ra].destroy(e),this[Ra]=null),Et.destroy(this[Dn],e),r[xa]<r[kl].length){let n=r[kl][r[xa]];r[kl][r[xa]++]=null,Et.errorRequest(r,n,e),r[iU]=r[xa]}wo(r[BS]===0),r.emit("disconnect",r[CS],[r],e),r[vl]()}function x9e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function R9e(t,e){let r=t[Ra],{method:n,path:s,host:i,upgrade:o,expectContinue:a,signal:c,headers:A}=e,{body:u}=e;if(o)return Et.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let N=0;N<A.length;N+=2){let M=A[N+0],Y=A[N+1];if(Array.isArray(Y))for(let k=0;k<Y.length;k++)l[M]?l[M]+=`,${Y[k]}`:l[M]=Y[k];else l[M]=Y}let d,{hostname:h,port:f}=t[CS];l[g9e]=i||`${h}${f?`:${f}`:""}`,l[p9e]=n;let p=N=>{e.aborted||e.completed||(N=N||new ore,Et.errorRequest(t,e,N),d!=null&&Et.destroy(d,N),Et.destroy(u,N),t[kl][t[xa]++]=null,t[vl]())};try{e.onConnect(p)}catch(N){Et.errorRequest(t,e,N)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),d=r.request(l,{endStream:!1,signal:c}),d.id&&!d.pending?(e.onUpgrade(null,null,d),++r[hu],t[kl][t[xa]++]=null):d.once("ready",()=>{e.onUpgrade(null,null,d),++r[hu],t[kl][t[xa]++]=null}),d.once("close",()=>{r[hu]-=1,r[hu]===0&&r.unref()}),!0;l[m9e]=s,l[E9e]="https";let I=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let m=Et.bodyLength(u);if(Et.isFormDataLike(u)){are??=Kp().extractBody;let[N,M]=are(u);l["content-type"]=M,u=N.stream,m=N.length}if(m==null&&(m=e.contentLength),(m===0||!I)&&(m=null),x9e(n)&&m>0&&e.contentLength!=null&&e.contentLength!==m){if(t[d9e])return Et.errorRequest(t,e,new nU),!1;process.emitWarning(new nU)}m!=null&&(wo(u,"no body must not have content length"),l[C9e]=`${m}`),r.ref();let C=n==="GET"||n==="HEAD"||u===null;return a?(l[I9e]="100-continue",d=r.request(l,{endStream:C,signal:c}),d.once("cont
Line truncated
|
||||
`,this[rGe]=c??3e5,this[tGe]=s??3e5,this[nGe]=C??!0,this[sGe]=N,this[uU]=Y,this[Fl]=null,this[AGe]=O>-1?O:-1,this[lGe]=ee??100,this[Kr]=null,this[ka]=[],this[gu]=0,this[va]=0,this[DI]=ce=>dU(this,ce),this[uGe]=ce=>wre(this,ce)}get pipelining(){return this[SS]}set pipelining(e){this[SS]=e,this[DI](!0)}get[_I](){return this[ka].length-this[va]}get[vI](){return this[va]-this[gu]}get[kI](){return this[ka].length-this[gu]}get[z9e](){return!!this[Kr]&&!this[rm]&&!this[Kr].destroyed}get[AU](){return!!(this[Kr]?.busy(null)||this[kI]>=(Qre(this)||1)||this[_I]>0)}[J9e](e){Sre(this),this.once("connect",e)}[cGe](e,r){let n=e.origin||this[xc].origin,s=new H9e(n,e,r);return this[ka].push(s),this[Yh]||(qh.bodyLength(s.body)==null&&qh.isIterable(s.body)?(this[Yh]=1,queueMicrotask(()=>dU(this))):this[DI](!0)),this[Yh]&&this[Ml]!==2&&this[AU]&&(this[Ml]=2),this[Ml]<2}async[oGe](){return new Promise(e=>{this[kI]?this[Fl]=e:e(null)})}async[aGe](e){return new Promise(r=>{let n=this[ka].splice(this[va]);for(let i=0;i<n.length;i++){let o=n[i];qh.errorRequest(this,o,e)}let s=()=>{this[Fl]&&(this[Fl](),this[Fl]=null),r(null)};this[Kr]?(this[Kr].destroy(e,s),this[Kr]=null):queueMicrotask(s),this[DI]()})}},fGe=wS();function wre(t,e){if(t[vI]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){fu(t[va]===t[gu]);let r=t[ka].splice(t[gu]);for(let n=0;n<r.length;n++){let s=r[n];qh.errorRequest(t,s,e)}fu(t[kI]===0)}}async function Sre(t){fu(!t[rm]),fu(!t[Kr]);let{host:e,hostname:r,protocol:n,port:s}=t[xc];if(r[0]==="["){let i=r.indexOf("]");fu(i!==-1);let o=r.substring(1,i);fu(bre.isIP(o)),r=o}t[rm]=!0,tm.beforeConnect.hasSubscribers&&tm.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Kr]?.version,servername:t[_l],localAddress:t[RI]},connector:t[xI]});try{let i=await new Promise((o,a)=>{t[xI]({host:e,hostname:r,protocol:n,port:s,servername:t[_l],localAddress:t[RI]},(c,A)=>{c?a(c):o(A)})});if(t.destroyed){qh.destroy(i.on("error",yre),new Y9e);return}fu(i);try{t[Kr]=i.alpnProtocol==="h2"?await hGe(t,i):await dGe(t,i)}catch(o){throw i.destroy().on("error",yre),o}t[rm]=!1,i[iGe]=0,i[uU]=t[uU],i[W9e]=t,i[K9e]=null,tm.connected.hasSubscribers&&tm.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Kr]?.version,servername:t[_l],localAddress:t[RI]},connector:t[xI],socket:i}),t.emit("connect",t[xc],[t])}catch(i){if(t.destroyed)return;if(t[rm]=!1,tm.connectError.hasSubscribers&&tm.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Kr]?.version,servername:t[_l],localAddress:t[RI]},connector:t[xI],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(fu(t[vI]===0);t[_I]>0&&t[ka][t[va]].servername===t[_l];){let o=t[ka][t[va]++];qh.errorRequest(t,o,i)}else wre(t,i);t.emit("connectionError",t[xc],[t],i)}t[DI]()}function Bre(t){t[Ml]=0,t.emit("drain",t[xc],[t])}function dU(t,e){t[Yh]!==2&&(t[Yh]=2,gGe(t,e),t[Yh]=0,t[gu]>256&&(t[ka].splice(0,t[gu]),t[va]-=t[gu],t[gu]=0))}function gGe(t,e){for(;;){if(t.destroyed){fu(t[_I]===0);return}if(t[Fl]&&!t[kI]){t[Fl](),t[Fl]=null;return}if(t[Kr]&&t[Kr].resume(),t[AU])t[Ml]=2;else if(t[Ml]===2){e?(t[Ml]=1,queueMicrotask(()=>Bre(t))):Bre(t);continue}if(t[_I]===0||t[vI]>=(Qre(t)||1))return;let r=t[ka][t[va]];if(t[xc].protocol==="https:"&&t[_l]!==r.servername){if(t[vI]>0)return;t[_l]=r.servername,t[Kr]?.destroy(new q9e("servername changed"),()=>{t[Kr]=null,dU(t)})}if(t[rm])return;if(!t[Kr]){Sre(t);return}if(t[Kr].destroyed||t[Kr].busy(r))return;!r.aborted&&t[Kr].write(r)?t[va]++:t[ka].splice(t[va],1)}}Nre.exports=lU});var hU=E((dWt,Tre)=>{"use strict";var NS=class{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)}};Tre.exports=class{constructor(){this.head=this.tail=new NS}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new NS),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Rre=E((hWt,xre)=>{var{kFree:pGe,kConnected:mGe,kPending:EGe,kQueued:CGe,kRunning:IGe,kSize:yGe}=yr(),Vh=Symbol("pool"),fU=class{constructor(e){this[Vh]=e}get connected(){return this[Vh][mGe]}get free(){return this[Vh][pGe]}get pending(){return this[Vh][EGe]}get queued(){return this[Vh][CGe]}get running(){return this[Vh][IGe]}get size(){return this[Vh][yGe]}};xre.exports=fU});var IU=E((fWt,Ore)=>{"use strict";var BGe=Hp(),bGe=hU(),{kConnected:gU,kSize:Dre,kRunning:kre,kPending:vre,kQueued:FI,kBusy:QGe,kFree:wGe,kUrl:SGe,kClose:NGe,kDestroy:TGe,kDispatch:xGe}=yr(),RGe=Rre(),Xs=Symbol("clients"),ws=Symbol("needDrain"),MI=Symbol("queue"),pU=Symbol("closed resolve"),mU=Symbol("onDrain"),_re=Symbol("onConnect"),Fre=Symbol("onDisconnect"),Mre=Symbol("onC
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};Jse.exports=gP});var OS=E((L7t,Xse)=>{"use strict";var jse=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:eVe}=Lt(),tVe=nm();$se()===void 0&&Kse(new tVe);function Kse(t){if(!t||typeof t.dispatch!="function")throw new eVe("Argument agent must implement Agent");Object.defineProperty(globalThis,jse,{value:t,writable:!0,enumerable:!1,configurable:!1})}function $se(){return globalThis[jse]}Xse.exports={setGlobalDispatcher:Kse,getGlobalDispatcher:$se}});var HS=E((P7t,Zse)=>{"use strict";Zse.exports=class{#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 tie=E((O7t,eie)=>{"use strict";var rVe=CS();eie.exports=t=>{let e=t?.maxRedirections;return r=>function(s,i){let{maxRedirections:o=e,...a}=s;if(!o)return r(s,i);let c=new rVe(r,o,s,i);return r(a,c)}}});var nie=E((H7t,rie)=>{"use strict";var nVe=RS();rie.exports=t=>e=>function(n,s){return e(n,new nVe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))}});var iie=E((G7t,sie)=>{"use strict";var sVe=ht(),{InvalidArgumentError:iVe,RequestAbortedError:oVe}=Lt(),aVe=HS(),pP=class extends aVe{#e=1024*1024;#t=null;#n=!1;#r=!1;#s=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new iVe("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.#o.bind(this))}#o(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,s){let o=sVe.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new oVe(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,s)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function cVe({maxSize:t}={maxSize:1024*1024}){return e=>function(n,s){let{dumpMaxSize:i=t}=n,o=new pP({maxSize:i},s);return e(n,o)}}sie.exports=cVe});var cie=E((q7t,aie)=>{"use strict";var{isIP:AVe}=b("node:net"),{lookup:uVe}=b("node:dns"),lVe=HS(),{InvalidArgumentError:hm,InformationalError:dVe}=Lt(),oie=Math.pow(2,31)-1,mP=class{#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.#s}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let s=this.#n.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,i,(o,a)=>{if(o||a==null||a.length===0){n(o??new dVe("No DNS entries found"));return}this.setRecords(e,a);let c=this.#n.get(e.hostname),A=this.pick(e,c,i.affinity),u;typeof A.port=="number"?u=`:${A.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${A.family===6?`[${A.address}]`:A.address}${u}`)});else{let o=this.pick(e,s,i.affinity);if(o==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let a;typeof o.port=="number"?a=`:${o.port}`:e.port!==""?a=`:${e.port}`:a="",n(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${a}`)}}#r(e,r,n){uVe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,i)=>{if(s)return n(s);let o=new Map;for(let a of i)o.set(`${a.address}:${a.family}`,a);n(null,o.values())})}#s(e,r,n){let s=null,{records:i,offset:o}=r,a;if(this.dualStack?(n==null&&(o==null||o===oie?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),i[n]!=null&&i[n].ips.length>0?a=i[n]:a=i[n===4?6:4]):a=i[n],a==null||a.ips.length===0)return s;a.offset==null||a.offset===oie?a.offset=0:a.offset++;let c=a.offset%a.ips.length;return s=a.ips[c]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(a.ips.splice(c,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let i of r){i.timestamp=n,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let o=s.records[i.family]??{ips:[]};o.ips.push(i),s.records[i.family]=o}this.#n.set(e.hostname,s)}getHandler(e,r){return new EP(this,e,r)}},EP=class extends lVe{#e=null;#t=null;#n=null;#r=null;#s=null;constructor(e,{origin:r,handler:n,dispatch:s},i){super(n),this.#s=r,this.#r=n,this.#t={...i},this.#e=e,this.#n=s}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#s,this.#t,(r,n)=>{if(r)
Line truncated
|
||||
${i}`;break;case"retry":Hae(i)&&(r[s]=i);break;case"id":Gae(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&Hae(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Gae(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}}};qae.exports={EventSourceStream:nO}});var Xae=E((IJt,$ae)=>{"use strict";var{pipeline:Bze}=b("node:stream"),{fetching:bze}=WI(),{makeRequest:Qze}=pm(),{webidl:Iu}=jn(),{EventSourceStream:wze}=Yae(),{parseMIMEType:Sze}=ei(),{createFastMessageEvent:Nze}=Bm(),{isNetworkError:Vae}=YI(),{delay:Tze}=tO(),{kEnumerableProperty:sf}=ht(),{environmentSettingsObject:Wae}=Di(),Jae=!1,zae=3e3,iy=0,jae=1,oy=2,xze="anonymous",Rze="use-credentials",Nm=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#n=!1;#r=iy;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),Iu.util.markAsUncloneable(this);let n="EventSource constructor";Iu.argumentLengthCheck(arguments,1,n),Jae||(Jae=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Iu.converters.USVString(e,n,"url"),r=Iu.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:zae};let s=Wae,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=i.href;let o=xze;r.withCredentials&&(o=Rze,this.#n=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=Wae.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#s=Qze(a),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===oy)return;this.#r=iy;let e={request:this.#s,dispatcher:this.#a},r=n=>{Vae(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#A()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(Vae(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#A();return}let s=n.headersList.get("content-type",!0),i=s!==null?Sze(s):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=jae,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let a=new wze({eventSourceSettings:this.#o,push:c=>{this.dispatchEvent(Nze(c.type,c.options))}});Bze(n.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=bze(e)}async#A(){this.#r!==oy&&(this.#r=iy,this.dispatchEvent(new Event("error")),await Tze(this.#o.reconnectionTime),this.#r===iy&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#c()))}close(){Iu.brandCheck(this,t),this.#r!==oy&&(this.#r=oy,this.#i.abort(),this.#s=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}},Kae={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:iy,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:jae,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:oy,writable:!1}};Object.defineProperties(Nm,Kae);Object.defineProperties(Nm.prototype,Kae);Object.defineProperties(Nm.prototype,{close:sf,onerror:sf,onmessage:sf,onopen:sf,readyState:sf,url:sf,withCredentials:sf});Iu.converters.EventSourceInitDict=Iu.dictionaryConverter([{key:"withCredentials",converter:Iu.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Iu.converters.any}]);$ae.exports={EventSource:Nm,defaultReconnectionTime:zae}});var xN=E((yJt,Ye)=>{"use strict";var Dze=tm(),Zae=uI(),kze=rm(),vze=Kre(),_ze=nm(),Fze=TU(),Mze=Ine(),Lze=Sne(),ece=Lt(),TN=ht(),{InvalidArgumentError:NN}=ece,Tm=dse(),Uze=dI(),Pze=AP(),Oze=zse(),Hze=dP(),Gze=KU(),qze=RS(),{getGlobalDispatcher:tce,setGlobalDispatcher:Yze}=OS(),Vze=HS(),Wze=CS(),Jze=IS();Object.assign(Zae.prototype,Tm);Ye.exports.Dispatcher=Zae;Ye.exports.Client=Dze;Ye.exports.Pool=kze;Ye.exports.BalancedPool=vze;Ye.exports.Agent=_ze;Ye.exports.ProxyAgent=Fze;Ye.exports.EnvHttpProxyAgent=Mze;Ye.exports
Line truncated
|
||||
%s`,M,M,C,n);var q=C.type==="*"?jO:C.type==="?"?zO:"\\"+C.type;s=!0,n=n.slice(0,C.reStart)+q+"\\("+M}f(),i&&(n+="\\\\");var k=!1;switch(n.charAt(0)){case"[":case".":case"(":k=!0}for(var P=a.length-1;P>-1;P--){var D=a[P],z=n.slice(0,D.reStart),ee=n.slice(D.reStart,D.reEnd-8),ne=n.slice(D.reEnd-8,D.reEnd),ce=n.slice(D.reEnd);ne+=ce;var ge=z.split("(").length-1,De=ce;for(p=0;p<ge;p++)De=De.replace(/\)[+*?]?/,"");ce=De;var $e="";ce===""&&e!==ZN&&($e="$");var it=z+ee+ce+$e+ne;n=it}if(n!==""&&s&&(n="(?=.)"+n),k&&(n=d+n),e===ZN)return[n,s];if(!s)return G$e(t);var Wt=r.nocase?"i":"";try{var vt=new RegExp("^"+n+"$",Wt)}catch{return new RegExp("$.")}return vt._glob=t,vt._src=n,vt}Hi.makeRe=function(t,e){return new cn(t,e||{}).makeRe()};cn.prototype.makeRe=H$e;function H$e(){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?jO:e.dot?v$e:_$e,n=e.nocase?"i":"",s=t.map(function(i){return i.map(function(o){return o===uf?r:typeof o=="string"?q$e(o):o._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}Hi.match=function(t,e,r){r=r||{};var n=new cn(e,r);return t=t.filter(function(s){return n.match(s)}),n.options.nonull&&!t.length&&t.push(e),t};cn.prototype.match=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;Ey.sep!=="/"&&(e=e.split(Ey.sep).join("/")),e=e.split(JAe),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var i,o;for(o=e.length-1;o>=0&&(i=e[o],!i);o--);for(o=0;o<s.length;o++){var a=s[o],c=e;n.matchBase&&a.length===1&&(c=[i]);var A=this.matchOne(c,a,r);if(A)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};cn.prototype.matchOne=function(t,e,r){return e.indexOf(uf)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};cn.prototype._matchGlobstar=function(t,e,r,n,s){var i,o=-1;for(i=s;i<e.length;i++)if(e[i]===uf){o=i;break}var a=-1;for(i=e.length-1;i>=0;i--)if(e[i]===uf){a=i;break}var c=e.slice(s,o),A=r?e.slice(o+1):e.slice(o+1,a),u=r?[]:e.slice(a+1);if(c.length){var l=t.slice(n,n+c.length);if(!this._matchOne(l,c,r,0,0))return!1;n+=c.length}var d=0;if(u.length){if(u.length+n>t.length)return!1;var h=t.length-u.length;if(this._matchOne(t,u,r,h,0))d=u.length;else{if(t[t.length-1]!==""||n+u.length===t.length||(h--,!this._matchOne(t,u,r,h,0)))return!1;d=u.length+1}}if(!A.length){var f=!!d;for(i=n;i<t.length-d;i++){var p=String(t[i]);if(f=!0,p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1}return r||f}for(var I=[[[],0]],m=I[0],C=0,y=[0],N=0;N<A.length;N++){var M=A[N];M===uf?(y.push(C),m=[[],0],I.push(m)):(m[0].push(M),C++)}for(var q=I.length-1,k=t.length-d,P=0;P<I.length;P++)I[P][1]=k-(y[q--]+I[P][0].length);return!!this._matchGlobStarBodySections(t,I,n,0,r,0,!!d)};cn.prototype._matchGlobStarBodySections=function(t,e,r,n,s,i,o){var a=e[n];if(!a){for(var c=r;c<t.length;c++){o=!0;var A=t[c];if(A==="."||A===".."||!this.options.dot&&A.charAt(0)===".")return!1}return o}for(var u=a[0],l=a[1];r<=l;){var d=this._matchOne(t.slice(0,r+u.length),u,s,r,0);if(d&&i<this.maxGlobstarRecursion){var h=this._matchGlobStarBodySections(t,e,r+u.length,n+1,s,i+1,o);if(h!==!1)return h}var A=t[r];if(A==="."||A===".."||!this.options.dot&&A.charAt(0)===".")return!1;r++}return s||null};cn.prototype._matchOne=function(t,e,r,n,s){var i,o,a,c;for(i=n,o=s,a=t.length,c=e.length;i<a&&o<c;i++,o++){this.debug("matchOne loop");var A=e[o],u=t[i];if(this.debug(e,A,u),A===!1||A===uf)return!1;var l;if(typeof A=="string"?(l=u===A,this.debug("string match",A,u,l)):(l=u.match(A),this.debug("pattern match",A,u,l)),!l)return!1}if(i===a&&o===c)return!0;if(i===a)return r;if(o===c)return i===a-1&&t[i]==="";throw new Error("wtf?")};function G$e(t){return t.replace(/\\(.)/g,"$1")}function q$e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Lm=E((mjt,eue)=>{"use strict";var $$e="2.0.0",X$e=Number.MAX_SAFE_INTEGER||9007199254740991,Z$e=16,eXe=250,tXe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];eue.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Z$e,MAX_SAFE_BUILD_LENGTH:eXe,MAX_SAFE_INTEGER:X$e,RELEASE_TYPES:tXe,SEMVER_SPEC_VERSION:$$e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var By=E((Ejt,tue)=>{"use strict";var rXe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};tue.exports=rXe});var Um=E((Fc,rue)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:$O,MAX_SAFE_BUILD_LENGTH:nXe,MAX_LENGTH:sXe}=Lm(),iXe=By();Fc=rue.exports={};var oXe=Fc.re=[],aXe=Fc.safeRe=[],me=Fc.src=[],cXe=Fc.safeSrc=[],Ee=Fc.t={},AXe=0,XO="[a-zA-Z0-9-]",uXe=[["\\s",1],["\\d",sXe],[XO,nXe]],lXe=t=>{for(let[e,r]of uXe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${eLine truncated
|
||||
`.trim())}};Wse.exports=IP});var VS=E((GWt,$se)=>{"use strict";var zse=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:rVe}=Lt(),nVe=im();Kse()===void 0&&jse(new nVe);function jse(t){if(!t||typeof t.dispatch!="function")throw new rVe("Argument agent must implement Agent");Object.defineProperty(globalThis,zse,{value:t,writable:!0,enumerable:!1,configurable:!1})}function Kse(){return globalThis[zse]}$se.exports={setGlobalDispatcher:jse,getGlobalDispatcher:Kse}});var WS=E((YWt,Xse)=>{"use strict";Xse.exports=class{#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 eie=E((VWt,Zse)=>{"use strict";var sVe=QS();Zse.exports=t=>{let e=t?.maxRedirections;return r=>function(s,i){let{maxRedirections:o=e,...a}=s;if(!o)return r(s,i);let c=new sVe(r,o,s,i);return r(a,c)}}});var rie=E((WWt,tie)=>{"use strict";var iVe=FS();tie.exports=t=>e=>function(n,s){return e(n,new iVe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))}});var sie=E((JWt,nie)=>{"use strict";var oVe=dt(),{InvalidArgumentError:aVe,RequestAbortedError:cVe}=Lt(),AVe=WS(),yP=class extends AVe{#e=1024*1024;#t=null;#n=!1;#r=!1;#s=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new aVe("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.#o.bind(this))}#o(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,s){let o=oVe.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new cVe(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,s)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function uVe({maxSize:t}={maxSize:1024*1024}){return e=>function(n,s){let{dumpMaxSize:i=t}=n,o=new yP({maxSize:i},s);return e(n,o)}}nie.exports=uVe});var aie=E((zWt,oie)=>{"use strict";var{isIP:lVe}=b("node:net"),{lookup:dVe}=b("node:dns"),hVe=WS(),{InvalidArgumentError:gm,InformationalError:fVe}=Lt(),iie=Math.pow(2,31)-1,BP=class{#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.#s}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let s=this.#n.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,i,(o,a)=>{if(o||a==null||a.length===0){n(o??new fVe("No DNS entries found"));return}this.setRecords(e,a);let c=this.#n.get(e.hostname),A=this.pick(e,c,i.affinity),u;typeof A.port=="number"?u=`:${A.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${A.family===6?`[${A.address}]`:A.address}${u}`)});else{let o=this.pick(e,s,i.affinity);if(o==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let a;typeof o.port=="number"?a=`:${o.port}`:e.port!==""?a=`:${e.port}`:a="",n(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${a}`)}}#r(e,r,n){dVe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,i)=>{if(s)return n(s);let o=new Map;for(let a of i)o.set(`${a.address}:${a.family}`,a);n(null,o.values())})}#s(e,r,n){let s=null,{records:i,offset:o}=r,a;if(this.dualStack?(n==null&&(o==null||o===iie?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),i[n]!=null&&i[n].ips.length>0?a=i[n]:a=i[n===4?6:4]):a=i[n],a==null||a.ips.length===0)return s;a.offset==null||a.offset===iie?a.offset=0:a.offset++;let c=a.offset%a.ips.length;return s=a.ips[c]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(a.ips.splice(c,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let i of r){i.timestamp=n,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let o=s.records[i.family]??{ips:[]};o.ips.push(i),s.records[i.family]=o}this.#n.set(e.hostname,s)}getHandler(e,r){return new bP(this,e,r)}},bP=class extends hVe{#e=null;#t=null;#n=null;#r=null;#s=null;constructor(e,{origin:r,handler:n,dispatch:s},i){super(n),this.#s=r,this.#r=n,this.#t={...i},this.#e=e,this.#n=s}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#s,this.#t,(r,n)=>{if(r)
Line truncated
|
||||
${i}`;break;case"retry":Oae(i)&&(r[s]=i);break;case"id":Hae(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&Oae(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Hae(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}}};Gae.exports={EventSourceStream:cO}});var $ae=E((wJt,Kae)=>{"use strict";var{pipeline:Qze}=b("node:stream"),{fetching:wze}=jI(),{makeRequest:Sze}=Em(),{webidl:Iu}=Kn(),{EventSourceStream:Nze}=qae(),{parseMIMEType:Tze}=Ks(),{createFastMessageEvent:xze}=Qm(),{isNetworkError:Yae}=JI(),{delay:Rze}=oO(),{kEnumerableProperty:af}=dt(),{environmentSettingsObject:Vae}=Ti(),Wae=!1,Jae=3e3,cy=0,zae=1,Ay=2,Dze="anonymous",kze="use-credentials",xm=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#n=!1;#r=cy;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),Iu.util.markAsUncloneable(this);let n="EventSource constructor";Iu.argumentLengthCheck(arguments,1,n),Wae||(Wae=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Iu.converters.USVString(e,n,"url"),r=Iu.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:Jae};let s=Vae,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=i.href;let o=Dze;r.withCredentials&&(o=kze,this.#n=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=Vae.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#s=Sze(a),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===Ay)return;this.#r=cy;let e={request:this.#s,dispatcher:this.#a},r=n=>{Yae(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#A()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(Yae(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#A();return}let s=n.headersList.get("content-type",!0),i=s!==null?Tze(s):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=zae,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let a=new Nze({eventSourceSettings:this.#o,push:c=>{this.dispatchEvent(xze(c.type,c.options))}});Qze(n.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=wze(e)}async#A(){this.#r!==Ay&&(this.#r=cy,this.dispatchEvent(new Event("error")),await Rze(this.#o.reconnectionTime),this.#r===cy&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#c()))}close(){Iu.brandCheck(this,t),this.#r!==Ay&&(this.#r=Ay,this.#i.abort(),this.#s=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}},jae={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:cy,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:zae,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Ay,writable:!1}};Object.defineProperties(xm,jae);Object.defineProperties(xm.prototype,jae);Object.defineProperties(xm.prototype,{close:af,onerror:af,onmessage:af,onopen:af,readyState:af,url:af,withCredentials:af});Iu.converters.EventSourceInitDict=Iu.dictionaryConverter([{key:"withCredentials",converter:Iu.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Iu.converters.any}]);Kae.exports={EventSource:xm,defaultReconnectionTime:Jae}});var _N=E((SJt,Ye)=>{"use strict";var vze=nm(),Xae=hI(),_ze=sm(),Fze=jre(),Mze=im(),Lze=vU(),Uze=Cne(),Pze=wne(),Zae=Lt(),vN=dt(),{InvalidArgumentError:kN}=Zae,Rm=lse(),Oze=gI(),Hze=fP(),Gze=Jse(),qze=mP(),Yze=tP(),Vze=FS(),{getGlobalDispatcher:ece,setGlobalDispatcher:Wze}=VS(),Jze=WS(),zze=QS(),jze=wS();Object.assign(Xae.prototype,Rm);Ye.exports.Dispatcher=Xae;Ye.exports.Client=vze;Ye.exports.Pool=_ze;Ye.exports.BalancedPool=Fze;Ye.exports.Agent=Mze;Ye.exports.ProxyAgent=Lze;Ye.exports.EnvHttpProxyAgent=Uze;Ye.exports
Line truncated
|
||||
%s`,M,M,C,n);var Y=C.type==="*"?e3:C.type==="?"?ZO:"\\"+C.type;s=!0,n=n.slice(0,C.reStart)+Y+"\\("+M}f(),i&&(n+="\\\\");var k=!1;switch(n.charAt(0)){case"[":case".":case"(":k=!0}for(var O=a.length-1;O>-1;O--){var D=a[O],z=n.slice(0,D.reStart),ee=n.slice(D.reStart,D.reEnd-8),te=n.slice(D.reEnd-8,D.reEnd),ce=n.slice(D.reEnd);te+=ce;var ge=z.split("(").length-1,De=ce;for(p=0;p<ge;p++)De=De.replace(/\)[+*?]?/,"");ce=De;var $e="";ce===""&&e!==sT&&($e="$");var st=z+ee+ce+$e+te;n=st}if(n!==""&&s&&(n="(?=.)"+n),k&&(n=d+n),e===sT)return[n,s];if(!s)return Y$e(t);var Yt=r.nocase?"i":"";try{var vt=new RegExp("^"+n+"$",Yt)}catch{return new RegExp("$.")}return vt._glob=t,vt._src=n,vt}Pi.makeRe=function(t,e){return new cn(t,e||{}).makeRe()};cn.prototype.makeRe=q$e;function q$e(){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?e3:e.dot?F$e:M$e,n=e.nocase?"i":"",s=t.map(function(i){return i.map(function(o){return o===df?r:typeof o=="string"?V$e(o):o._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}Pi.match=function(t,e,r){r=r||{};var n=new cn(e,r);return t=t.filter(function(s){return n.match(s)}),n.options.nonull&&!t.length&&t.push(e),t};cn.prototype.match=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;yy.sep!=="/"&&(e=e.split(yy.sep).join("/")),e=e.split(WAe),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var i,o;for(o=e.length-1;o>=0&&(i=e[o],!i);o--);for(o=0;o<s.length;o++){var a=s[o],c=e;n.matchBase&&a.length===1&&(c=[i]);var A=this.matchOne(c,a,r);if(A)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};cn.prototype.matchOne=function(t,e,r){return e.indexOf(df)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};cn.prototype._matchGlobstar=function(t,e,r,n,s){var i,o=-1;for(i=s;i<e.length;i++)if(e[i]===df){o=i;break}var a=-1;for(i=e.length-1;i>=0;i--)if(e[i]===df){a=i;break}var c=e.slice(s,o),A=r?e.slice(o+1):e.slice(o+1,a),u=r?[]:e.slice(a+1);if(c.length){var l=t.slice(n,n+c.length);if(!this._matchOne(l,c,r,0,0))return!1;n+=c.length}var d=0;if(u.length){if(u.length+n>t.length)return!1;var h=t.length-u.length;if(this._matchOne(t,u,r,h,0))d=u.length;else{if(t[t.length-1]!==""||n+u.length===t.length||(h--,!this._matchOne(t,u,r,h,0)))return!1;d=u.length+1}}if(!A.length){var f=!!d;for(i=n;i<t.length-d;i++){var p=String(t[i]);if(f=!0,p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1}return r||f}for(var I=[[[],0]],m=I[0],C=0,y=[0],N=0;N<A.length;N++){var M=A[N];M===df?(y.push(C),m=[[],0],I.push(m)):(m[0].push(M),C++)}for(var Y=I.length-1,k=t.length-d,O=0;O<I.length;O++)I[O][1]=k-(y[Y--]+I[O][0].length);return!!this._matchGlobStarBodySections(t,I,n,0,r,0,!!d)};cn.prototype._matchGlobStarBodySections=function(t,e,r,n,s,i,o){var a=e[n];if(!a){for(var c=r;c<t.length;c++){o=!0;var A=t[c];if(A==="."||A===".."||!this.options.dot&&A.charAt(0)===".")return!1}return o}for(var u=a[0],l=a[1];r<=l;){var d=this._matchOne(t.slice(0,r+u.length),u,s,r,0);if(d&&i<this.maxGlobstarRecursion){var h=this._matchGlobStarBodySections(t,e,r+u.length,n+1,s,i+1,o);if(h!==!1)return h}var A=t[r];if(A==="."||A===".."||!this.options.dot&&A.charAt(0)===".")return!1;r++}return s||null};cn.prototype._matchOne=function(t,e,r,n,s){var i,o,a,c;for(i=n,o=s,a=t.length,c=e.length;i<a&&o<c;i++,o++){this.debug("matchOne loop");var A=e[o],u=t[i];if(this.debug(e,A,u),A===!1||A===df)return!1;var l;if(typeof A=="string"?(l=u===A,this.debug("string match",A,u,l)):(l=u.match(A),this.debug("pattern match",A,u,l)),!l)return!1}if(i===a&&o===c)return!0;if(i===a)return r;if(o===c)return i===a-1&&t[i]==="";throw new Error("wtf?")};function Y$e(t){return t.replace(/\\(.)/g,"$1")}function V$e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Pm=E((Bjt,ZAe)=>{"use strict";var Z$e="2.0.0",eXe=Number.MAX_SAFE_INTEGER||9007199254740991,tXe=16,rXe=250,nXe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ZAe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:tXe,MAX_SAFE_BUILD_LENGTH:rXe,MAX_SAFE_INTEGER:eXe,RELEASE_TYPES:nXe,SEMVER_SPEC_VERSION:Z$e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var wy=E((bjt,eue)=>{"use strict";var sXe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};eue.exports=sXe});var Om=E((Fc,tue)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:r3,MAX_SAFE_BUILD_LENGTH:iXe,MAX_LENGTH:oXe}=Pm(),aXe=wy();Fc=tue.exports={};var cXe=Fc.re=[],AXe=Fc.safeRe=[],me=Fc.src=[],uXe=Fc.safeSrc=[],Ee=Fc.t={},lXe=0,n3="[a-zA-Z0-9-]",dXe=[["\\s",1],["\\d",oXe],[n3,iXe]],hXe=t=>{for(let[e,r]of dXe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${eLine truncated
|
||||
`).join(`
|
||||
`+i),t.push(s+"m+"+UT.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=ert()+e+" "+t[0]}function ert(){return kn.inspectOpts.hideDate?"":new Date().toISOString()+" "}function trt(...t){return process.stderr.write(LT.formatWithOptions(kn.inspectOpts,...t)+`
|
||||
`)}function rrt(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function nrt(){return process.env.DEBUG}function srt(t){t.inspectOpts={};let e=Object.keys(kn.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=kn.inspectOpts[e[r]]}UT.exports=P3()(kn);var{formatters:_de}=UT.exports;_de.o=function(t){return this.inspectOpts.colors=this.useColors,LT.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};_de.O=function(t){return this.inspectOpts.colors=this.useColors,LT.inspect(t,this.inspectOpts)}});var PT=E((q$t,G3)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?G3.exports=Tde():G3.exports=Fde()});var Ude=E(Ai=>{"use strict";var irt=Ai&&Ai.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ort=Ai&&Ai.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mde=Ai&&Ai.__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)&&irt(e,t,r);return ort(e,t),e};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.req=Ai.json=Ai.toBuffer=void 0;var art=Mde(b("http")),crt=Mde(b("https"));async function Lde(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}Ai.toBuffer=Lde;async function Art(t){let r=(await Lde(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}Ai.json=Art;function urt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?crt:art).request(t,e),s=new Promise((i,o)=>{n.once("response",i).once("error",o).end()});return n.then=s.then.bind(s),n}Ai.req=urt});var Y3=E(Yi=>{"use strict";var Ode=Yi&&Yi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lrt=Yi&&Yi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hde=Yi&&Yi.__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)&&Ode(e,t,r);return lrt(e,t),e},drt=Yi&&Yi.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ode(e,t,r)};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.Agent=void 0;var hrt=Hde(b("net")),Pde=Hde(b("http")),frt=b("https");drt(Ude(),Yi);var Uc=Symbol("AgentBaseInternalState"),q3=class extends Pde.Agent{constructor(e){super(e),this[Uc]={}}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 hrt.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],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?frt.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),o=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(i,o),a instanceof Pde.Agent)try{return a.addRequest(e,s)}catch(c){return n(c)}this[Uc].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(i,o),n(a)})}createConnection(){let e=this[Uc].currentSocket;if(this[Uc].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Uc].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Uc]&&(this[Uc].defaultPort=e)}get protocol(){return this[Uc].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Uc]&&(this[Uc].protocol=e)}};Yi.Agent=q3});var Gde=E(Jm=>{"use strict";var grt=Jm&&Jm.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.parseProxyResponse=void 0;var prt=grt(PT()),OT=(0,prt.default)("https-proxy-agent:parse-proxy-response");function mrt(t){return new Promise((e,r)=>{let n=0,s=[];function i(){let u=t.read();u?A(u):t.once("readable",i)}function o(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",i)}function a(){o(),OT("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(u){o(),OT("onerror %o",u),r(u)}function A(u){s.push(u),n+=u.length;let l=Buffer.concat(s,n),d=l.indexOf(`\r
|
||||
`+i),t.push(s+"m+"+GT.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=rrt()+e+" "+t[0]}function rrt(){return vn.inspectOpts.hideDate?"":new Date().toISOString()+" "}function nrt(...t){return process.stderr.write(HT.formatWithOptions(vn.inspectOpts,...t)+`
|
||||
`)}function srt(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function irt(){return process.env.DEBUG}function ort(t){t.inspectOpts={};let e=Object.keys(vn.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=vn.inspectOpts[e[r]]}GT.exports=W3()(vn);var{formatters:xde}=GT.exports;xde.o=function(t){return this.inspectOpts.colors=this.useColors,HT.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};xde.O=function(t){return this.inspectOpts.colors=this.useColors,HT.inspect(t,this.inspectOpts)}});var qT=E((Z$t,j3)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?j3.exports=bde():j3.exports=Rde()});var vde=E(oi=>{"use strict";var art=oi&&oi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),crt=oi&&oi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Dde=oi&&oi.__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)&&art(e,t,r);return crt(e,t),e};Object.defineProperty(oi,"__esModule",{value:!0});oi.req=oi.json=oi.toBuffer=void 0;var Art=Dde(b("http")),urt=Dde(b("https"));async function kde(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}oi.toBuffer=kde;async function lrt(t){let r=(await kde(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}oi.json=lrt;function drt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?urt:Art).request(t,e),s=new Promise((i,o)=>{n.once("response",i).once("error",o).end()});return n.then=s.then.bind(s),n}oi.req=drt});var $3=E(Gi=>{"use strict";var Fde=Gi&&Gi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hrt=Gi&&Gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mde=Gi&&Gi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Fde(e,t,r);return hrt(e,t),e},frt=Gi&&Gi.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Fde(e,t,r)};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.Agent=void 0;var grt=Mde(b("net")),_de=Mde(b("http")),prt=b("https");frt(vde(),Gi);var Uc=Symbol("AgentBaseInternalState"),K3=class extends _de.Agent{constructor(e){super(e),this[Uc]={}}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 grt.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],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?prt.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),o=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(i,o),a instanceof _de.Agent)try{return a.addRequest(e,s)}catch(c){return n(c)}this[Uc].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(i,o),n(a)})}createConnection(){let e=this[Uc].currentSocket;if(this[Uc].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Uc].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Uc]&&(this[Uc].defaultPort=e)}get protocol(){return this[Uc].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Uc]&&(this[Uc].protocol=e)}};Gi.Agent=K3});var Lde=E(jm=>{"use strict";var mrt=jm&&jm.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jm,"__esModule",{value:!0});jm.parseProxyResponse=void 0;var Ert=mrt(qT()),YT=(0,Ert.default)("https-proxy-agent:parse-proxy-response");function Crt(t){return new Promise((e,r)=>{let n=0,s=[];function i(){let u=t.read();u?A(u):t.once("readable",i)}function o(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",i)}function a(){o(),YT("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(u){o(),YT("onerror %o",u),r(u)}function A(u){s.push(u),n+=u.length;let l=Buffer.concat(s,n),d=l.indexOf(`\r
|
||||
\r
|
||||
`);if(d===-1){OT("have not received end of HTTP headers yet..."),i();return}let h=l.slice(0,d).toString("ascii").split(`\r
|
||||
`),f=h.shift();if(!f)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let p=f.split(" "),I=+p[1],m=p.slice(2).join(" "),C={};for(let y of h){if(!y)continue;let N=y.indexOf(":");if(N===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${y}"`));let M=y.slice(0,N).toLowerCase(),q=y.slice(N+1).trimStart(),k=C[M];typeof k=="string"?C[M]=[k,q]:Array.isArray(k)?k.push(q):C[M]=q}OT("got proxy server response: %o %o",f,C),o(),e({connect:{statusCode:I,statusText:m,headers:C},buffered:l})}t.on("error",c),t.on("end",a),i()})}Jm.parseProxyResponse=mrt});var zde=E(Fo=>{"use strict";var Ert=Fo&&Fo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Crt=Fo&&Fo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Wde=Fo&&Fo.__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)&&Ert(e,t,r);return Crt(e,t),e},Jde=Fo&&Fo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fo,"__esModule",{value:!0});Fo.HttpsProxyAgent=void 0;var HT=Wde(b("net")),qde=Wde(b("tls")),Irt=Jde(b("assert")),yrt=Jde(PT()),Brt=Y3(),brt=b("url"),Qrt=Gde(),My=(0,yrt.default)("https-proxy-agent"),Yde=t=>t.servername===void 0&&t.host&&!HT.isIP(t.host)?{...t,servername:t.host}:t,GT=class extends Brt.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new brt.URL(e):e,this.proxyHeaders=r?.headers??{},My("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Vde(r,"headers"):null,host:n,port:s}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let s;n.protocol==="https:"?(My("Creating `tls.Socket`: %o",this.connectOpts),s=qde.connect(Yde(this.connectOpts))):(My("Creating `net.Socket`: %o",this.connectOpts),s=HT.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=HT.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
|
||||
`);if(d===-1){YT("have not received end of HTTP headers yet..."),i();return}let h=l.slice(0,d).toString("ascii").split(`\r
|
||||
`),f=h.shift();if(!f)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let p=f.split(" "),I=+p[1],m=p.slice(2).join(" "),C={};for(let y of h){if(!y)continue;let N=y.indexOf(":");if(N===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${y}"`));let M=y.slice(0,N).toLowerCase(),Y=y.slice(N+1).trimStart(),k=C[M];typeof k=="string"?C[M]=[k,Y]:Array.isArray(k)?k.push(Y):C[M]=Y}YT("got proxy server response: %o %o",f,C),o(),e({connect:{statusCode:I,statusText:m,headers:C},buffered:l})}t.on("error",c),t.on("end",a),i()})}jm.parseProxyResponse=Crt});var qde=E(vo=>{"use strict";var Irt=vo&&vo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),yrt=vo&&vo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Hde=vo&&vo.__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)&&Irt(e,t,r);return yrt(e,t),e},Gde=vo&&vo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vo,"__esModule",{value:!0});vo.HttpsProxyAgent=void 0;var VT=Hde(b("net")),Ude=Hde(b("tls")),Brt=Gde(b("assert")),brt=Gde(qT()),Qrt=$3(),wrt=b("url"),Srt=Lde(),Oy=(0,brt.default)("https-proxy-agent"),Pde=t=>t.servername===void 0&&t.host&&!VT.isIP(t.host)?{...t,servername:t.host}:t,WT=class extends Qrt.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new wrt.URL(e):e,this.proxyHeaders=r?.headers??{},Oy("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Ode(r,"headers"):null,host:n,port:s}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let s;n.protocol==="https:"?(Oy("Creating `tls.Socket`: %o",this.connectOpts),s=Ude.connect(Pde(this.connectOpts))):(Oy("Creating `net.Socket`: %o",this.connectOpts),s=VT.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=VT.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
|
||||
`;if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))a+=`${d}: ${i[d]}\r
|
||||
`;let c=(0,Qrt.parseProxyResponse)(s);s.write(`${a}\r
|
||||
`);let{connect:A,buffered:u}=await c;if(e.emit("proxyConnect",A),this.emit("proxyConnect",A,e),A.statusCode===200)return e.once("socket",wrt),r.secureEndpoint?(My("Upgrading socket connection to TLS"),qde.connect({...Vde(Yde(r),"host","path","port"),socket:s})):s;s.destroy();let l=new HT.Socket({writable:!1});return l.readable=!0,e.once("socket",d=>{My("Replaying proxy buffer for failed request"),(0,Irt.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),l}};GT.protocols=["http","https"];Fo.HttpsProxyAgent=GT;function wrt(t){t.resume()}function Vde(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var $de=E(Mo=>{"use strict";var Srt=Mo&&Mo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Nrt=Mo&&Mo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kde=Mo&&Mo.__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)&&Srt(e,t,r);return Nrt(e,t),e},Trt=Mo&&Mo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.HttpProxyAgent=void 0;var xrt=Kde(b("net")),Rrt=Kde(b("tls")),Drt=Trt(PT()),krt=b("events"),vrt=Y3(),jde=b("url"),zm=(0,Drt.default)("http-proxy-agent"),qT=class extends vrt.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new jde.URL(e):e,this.proxyHeaders=r?.headers??{},zm("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?_rt(r,"headers"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",o=`${s}//${i}`,a=new jde.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let A=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(A).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(c)){let u=c[A];u&&e.setHeader(A,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;zm("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(zm("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
|
||||
`;let c=(0,Srt.parseProxyResponse)(s);s.write(`${a}\r
|
||||
`);let{connect:A,buffered:u}=await c;if(e.emit("proxyConnect",A),this.emit("proxyConnect",A,e),A.statusCode===200)return e.once("socket",Nrt),r.secureEndpoint?(Oy("Upgrading socket connection to TLS"),Ude.connect({...Ode(Pde(r),"host","path","port"),socket:s})):s;s.destroy();let l=new VT.Socket({writable:!1});return l.readable=!0,e.once("socket",d=>{Oy("Replaying proxy buffer for failed request"),(0,Brt.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),l}};WT.protocols=["http","https"];vo.HttpsProxyAgent=WT;function Nrt(t){t.resume()}function Ode(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var Wde=E(_o=>{"use strict";var Trt=_o&&_o.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xrt=_o&&_o.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Vde=_o&&_o.__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)&&Trt(e,t,r);return xrt(e,t),e},Rrt=_o&&_o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_o,"__esModule",{value:!0});_o.HttpProxyAgent=void 0;var Drt=Vde(b("net")),krt=Vde(b("tls")),vrt=Rrt(qT()),_rt=b("events"),Frt=$3(),Yde=b("url"),Km=(0,vrt.default)("http-proxy-agent"),JT=class extends Frt.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new Yde.URL(e):e,this.proxyHeaders=r?.headers??{},Km("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?Mrt(r,"headers"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",o=`${s}//${i}`,a=new Yde.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let A=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(A).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(c)){let u=c[A];u&&e.setHeader(A,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;Km("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Km("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
|
||||
\r
|
||||
`)+4,e.outputData[0].data=e._header+n.substring(s),zm("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(zm("Creating `tls.Socket`: %o",this.connectOpts),i=Rrt.connect(this.connectOpts)):(zm("Creating `net.Socket`: %o",this.connectOpts),i=xrt.connect(this.connectOpts)),await(0,krt.once)(i,"connect"),i}};qT.protocols=["http","https"];Mo.HttpProxyAgent=qT;function _rt(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var xhe=E(nx=>{"use strict";Object.defineProperty(nx,"__esModule",{value:!0});nx.state=void 0;nx.state={instrumenterImplementation:void 0}});var Whe=E(cx=>{"use strict";Object.defineProperty(cx,"__esModule",{value:!0});cx.state=void 0;cx.state={operationRequestMap:new WeakMap}});var ipe=E((mfr,xct)=>{xct.exports={name:"@actions/cache",version:"6.0.0",description:"Actions cache lib",keywords:["github","actions","cache"],homepage:"https://github.com/actions/toolkit/tree/main/packages/cache",license:"MIT",type:"module",main:"lib/cache.js",types:"lib/cache.d.ts",exports:{".":{types:"./lib/cache.d.ts",import:"./lib/cache.js"}},directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/cache"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:'echo "Error: run tests from root" && exit 1',tsc:"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^3.0.0","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.0","@actions/io":"^3.0.0","@azure/core-rest-pipeline":"^1.22.0","@azure/storage-blob":"^12.30.0","@protobuf-ts/runtime-rpc":"^2.11.1",semver:"^7.7.3"},devDependencies:{"@protobuf-ts/plugin":"^2.9.4","@types/node":"^25.1.0","@types/semver":"^7.7.1",typescript:"^5.2.2"},overrides:{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}});var ape=E((Efr,ope)=>{var Rct=ipe();ope.exports={version:Rct.version}});var kR=E(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});p0.isJsonObject=p0.typeofJsonValue=void 0;function Pct(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}p0.typeofJsonValue=Pct;function Oct(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}p0.isJsonObject=Oct});var _R=E(m0=>{"use strict";Object.defineProperty(m0,"__esModule",{value:!0});m0.base64encode=m0.base64decode=void 0;var Ou="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),vR=[];for(let t=0;t<Ou.length;t++)vR[Ou[t].charCodeAt(0)]=t;vR[45]=Ou.indexOf("+");vR[95]=Ou.indexOf("/");function Hct(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,s=0,i,o=0;for(let a=0;a<t.length;a++){if(i=vR[t.charCodeAt(a)],i===void 0)switch(t[a]){case"=":s=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:o=i,s=1;break;case 1:r[n++]=o<<2|(i&48)>>4,o=i,s=2;break;case 2:r[n++]=(o&15)<<4|(i&60)>>2,o=i,s=3;break;case 3:r[n++]=(o&3)<<6|i,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}m0.base64decode=Hct;function Gct(t){let e="",r=0,n,s=0;for(let i=0;i<t.length;i++)switch(n=t[i],r){case 0:e+=Ou[n>>2],s=(n&3)<<4,r=1;break;case 1:e+=Ou[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=Ou[s|n>>6],e+=Ou[n&63],r=0;break}return r&&(e+=Ou[s],e+="=",r==1&&(e+="=")),e}m0.base64encode=Gct});var dpe=E(FR=>{"use strict";Object.defineProperty(FR,"__esModule",{value:!0});FR.utf8read=void 0;var LH=t=>String.fromCharCode.apply(String,t);function qct(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,i,o=t.length;for(;e<o;)i=t[e++],i<128?n[s++]=i:i>191&&i<224?n[s++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(i>>10),n[s++]=56320+(i&1023)):n[s++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(LH(n)),s=0);return r.length?(s&&r.push(LH(n.slice(0,s))),r.join("")):LH(n.slice(0,s))}FR.utf8read=qct});var RB=E(AA=>{"use strict";Object.defineProperty(AA,"__esModule",{value:!0});AA.WireType=AA.mergeBinaryOptions=AA.UnknownFieldHandler=void 0;var Yct;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,i,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:i,data:o})},t.onWrite=(r,n,s)=>{for(let{no:i,wireType:o,data:a}of t.list(n))s.tag(i,o).raw(a)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(i=>i.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(Yct=AA.UnknownFieldHandler||(AA.UnknownFieldHandler={}));function Vct(t,e){return Object.assign(Object.assign({},t),e)}AA.mergeBinaryOptions=Vct;var Wct;(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"})(Wct=AA.WireType||(AA.WireType={}))});var LR=E(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.varint32read=gi.varint32write=gi.int64toString=gi.int64fromString=gi.varint64write=gi.varint64read=void 0;function Jct(){let t=0,e=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(t|=(s&127)<<n,(s&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 s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}gi.varint64read=Jct;function zct(t,e,r){for(let i=0;i<28;i=i+7){let o=t>>>i,a=!(!(o>>>7)&&e==0),c=(a?o|128:o)&255;if(r.push(c),!a)return}let n=t>>>28&15|(e&7)<<4,s=e>>3!=0;if(r.push((s?n|128:n)&255),!!s){for(let i=3;i<31;i=i+7){let o=e>>>i,a=!!(o>>>7),c=(a?o|128:o)&255;if(r.push(c),!a)return}r.push(e>>>31&1)}}gi.varint64write=zct;var MR=65536*65536;function jct(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function i(o,a){let c=Number(t.slice(o,a));s*=r,n=n*r+c,n>=MR&&(s=s+(n/MR|0),n=n%MR)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,n,s]}gi.int64fromString=jct;function Kct(t,e){if(e>>>0<=2097151)return""+(MR*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,i=r+n*6777216+s*6710656,o=n+s*8147497,a=s*2,c=1e7;i>=c&&(o+=Math.floor(i/c),i%=c),o>=c&&(a+=Math.floor(o/c),o%=c);function A(u,l){let d=u?String(u):"";return l?"0000000".slice(d.length)+d:d}return A(a,0)+A(o,a)+A(i,1)}gi.int64toString=Kct;function $ct(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)}}gi.varint32write=$ct;function Xct(){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}gi.varint32read=Xct});var fd=E(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.PbLong=hd.PbULong=hd.detectBi=void 0;var DB=LR(),or;function hpe(){let t=new DataView(new ArrayBuffer(8));or=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("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}hd.detectBi=hpe;hpe();function fpe(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var gpe=/^-?[0-9]+$/,PR=4294967296,UR=2147483648,OR=c
Line truncated
|
||||
`)}};uD.RpcError=u9});var d9=E(dD=>{"use strict";Object.defineProperty(dD,"__esModule",{value:!0});dD.mergeRpcOptions=void 0;var Vpe=ut();function Iut(t,e){if(!e)return t;let r={};lD(t,r),lD(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=Vpe.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Vpe.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},lD(t.meta,r.meta),lD(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}dD.mergeRpcOptions=Iut;function lD(t,e){if(!t)return;let r=e;for(let[n,s]of Object.entries(t))s instanceof Date?r[n]=new Date(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}});var f9=E(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.Deferred=Gf.DeferredState=void 0;var dA;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(dA=Gf.DeferredState||(Gf.DeferredState={}));var h9=class{constructor(e=!0){this._state=dA.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!==dA.PENDING)throw new Error(`cannot resolve ${dA[this.state].toLowerCase()}`);this._resolve(e),this._state=dA.RESOLVED}reject(e){if(this.state!==dA.PENDING)throw new Error(`cannot reject ${dA[this.state].toLowerCase()}`);this._reject(e),this._state=dA.REJECTED}resolvePending(e){this._state===dA.PENDING&&this.resolve(e)}rejectPending(e){this._state===dA.PENDING&&this.reject(e)}};Gf.Deferred=h9});var p9=E(hD=>{"use strict";Object.defineProperty(hD,"__esModule",{value:!0});hD.RpcOutputStreamController=void 0;var Wpe=f9(),qf=ut(),g9=class{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){qf.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){qf.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){qf.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(){qf.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:()=>{let e=this._itState;qf.assert(e,"bad state"),qf.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 Wpe.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;qf.assert(n.state==Wpe.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};hD.RpcOutputStreamController=g9});var E9=E(Q0=>{"use strict";var yut=Q0&&Q0.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};Object.defineProperty(Q0,"__esModule",{value:!0});Q0.UnaryCall=void 0;var m9=class{constructor(e,r,n,s,i,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=i,this.status=o,this.trailers=a}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 yut(this,void 0,void 0,function*(){let[e,r,n,s]=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:s}})}};Q0.UnaryCall=m9});var I9=E(w0=>{"use strict";var But=w0&&w0.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};Object.defineProperty(w0,"__esModule",{value:!0});w0.ServerStreamingCall=void 0;var C9=class{constructor(e
Line truncated
|
||||
`)+4,e.outputData[0].data=e._header+n.substring(s),Km("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(Km("Creating `tls.Socket`: %o",this.connectOpts),i=krt.connect(this.connectOpts)):(Km("Creating `net.Socket`: %o",this.connectOpts),i=Drt.connect(this.connectOpts)),await(0,_rt.once)(i,"connect"),i}};JT.protocols=["http","https"];_o.HttpProxyAgent=JT;function Mrt(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var She=E(cx=>{"use strict";Object.defineProperty(cx,"__esModule",{value:!0});cx.state=void 0;cx.state={instrumenterImplementation:void 0}});var qhe=E(hx=>{"use strict";Object.defineProperty(hx,"__esModule",{value:!0});hx.state=void 0;hx.state={operationRequestMap:new WeakMap}});var rpe=E((Mfr,Fct)=>{Fct.exports={name:"@actions/cache",version:"6.0.1",description:"Actions cache lib",keywords:["github","actions","cache"],homepage:"https://github.com/actions/toolkit/tree/main/packages/cache",license:"MIT",type:"module",main:"lib/cache.js",types:"lib/cache.d.ts",exports:{".":{types:"./lib/cache.d.ts",import:"./lib/cache.js"}},directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/cache"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:'echo "Error: run tests from root" && exit 1',tsc:"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^3.0.1","@actions/exec":"^3.0.0","@actions/glob":"^0.6.1","@actions/http-client":"^4.0.1","@actions/io":"^3.0.2","@azure/core-rest-pipeline":"^1.23.0","@azure/storage-blob":"^12.31.0","@protobuf-ts/runtime-rpc":"^2.11.1",semver:"^7.7.4"},devDependencies:{"@protobuf-ts/plugin":"^2.11.1","@types/node":"^25.6.0","@types/semver":"^7.7.1",typescript:"^5.9.3"},overrides:{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}});var spe=E((Lfr,npe)=>{var Mct=rpe();npe.exports={version:Mct.version}});var LR=E(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.isJsonObject=E0.typeofJsonValue=void 0;function Vct(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}E0.typeofJsonValue=Vct;function Wct(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}E0.isJsonObject=Wct});var PR=E(C0=>{"use strict";Object.defineProperty(C0,"__esModule",{value:!0});C0.base64encode=C0.base64decode=void 0;var Ou="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),UR=[];for(let t=0;t<Ou.length;t++)UR[Ou[t].charCodeAt(0)]=t;UR[45]=Ou.indexOf("+");UR[95]=Ou.indexOf("/");function Jct(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,s=0,i,o=0;for(let a=0;a<t.length;a++){if(i=UR[t.charCodeAt(a)],i===void 0)switch(t[a]){case"=":s=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:o=i,s=1;break;case 1:r[n++]=o<<2|(i&48)>>4,o=i,s=2;break;case 2:r[n++]=(o&15)<<4|(i&60)>>2,o=i,s=3;break;case 3:r[n++]=(o&3)<<6|i,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}C0.base64decode=Jct;function zct(t){let e="",r=0,n,s=0;for(let i=0;i<t.length;i++)switch(n=t[i],r){case 0:e+=Ou[n>>2],s=(n&3)<<4,r=1;break;case 1:e+=Ou[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=Ou[s|n>>6],e+=Ou[n&63],r=0;break}return r&&(e+=Ou[s],e+="=",r==1&&(e+="=")),e}C0.base64encode=zct});var Ape=E(OR=>{"use strict";Object.defineProperty(OR,"__esModule",{value:!0});OR.utf8read=void 0;var HH=t=>String.fromCharCode.apply(String,t);function jct(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,i,o=t.length;for(;e<o;)i=t[e++],i<128?n[s++]=i:i>191&&i<224?n[s++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(i>>10),n[s++]=56320+(i&1023)):n[s++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(HH(n)),s=0);return r.length?(s&&r.push(HH(n.slice(0,s))),r.join("")):HH(n.slice(0,s))}OR.utf8read=jct});var FB=E(AA=>{"use strict";Object.defineProperty(AA,"__esModule",{value:!0});AA.WireType=AA.mergeBinaryOptions=AA.UnknownFieldHandler=void 0;var Kct;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,i,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:i,data:o})},t.onWrite=(r,n,s)=>{for(let{no:i,wireType:o,data:a}of t.list(n))s.tag(i,o).raw(a)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(i=>i.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(Kct=AA.UnknownFieldHandler||(AA.UnknownFieldHandler={}));function $ct(t,e){return Object.assign(Object.assign({},t),e)}AA.mergeBinaryOptions=$ct;var Xct;(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"})(Xct=AA.WireType||(AA.WireType={}))});var GR=E(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.varint32read=di.varint32write=di.int64toString=di.int64fromString=di.varint64write=di.varint64read=void 0;function Zct(){let t=0,e=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(t|=(s&127)<<n,(s&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 s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}di.varint64read=Zct;function eAt(t,e,r){for(let i=0;i<28;i=i+7){let o=t>>>i,a=!(!(o>>>7)&&e==0),c=(a?o|128:o)&255;if(r.push(c),!a)return}let n=t>>>28&15|(e&7)<<4,s=e>>3!=0;if(r.push((s?n|128:n)&255),!!s){for(let i=3;i<31;i=i+7){let o=e>>>i,a=!!(o>>>7),c=(a?o|128:o)&255;if(r.push(c),!a)return}r.push(e>>>31&1)}}di.varint64write=eAt;var HR=65536*65536;function tAt(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function i(o,a){let c=Number(t.slice(o,a));s*=r,n=n*r+c,n>=HR&&(s=s+(n/HR|0),n=n%HR)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,n,s]}di.int64fromString=tAt;function rAt(t,e){if(e>>>0<=2097151)return""+(HR*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,i=r+n*6777216+s*6710656,o=n+s*8147497,a=s*2,c=1e7;i>=c&&(o+=Math.floor(i/c),i%=c),o>=c&&(a+=Math.floor(o/c),o%=c);function A(u,l){let d=u?String(u):"";return l?"0000000".slice(d.length)+d:d}return A(a,0)+A(o,a)+A(i,1)}di.int64toString=rAt;function nAt(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)}}di.varint32write=nAt;function sAt(){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}di.varint32read=sAt});var pd=E(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.PbLong=gd.PbULong=gd.detectBi=void 0;var MB=GR(),ir;function upe(){let t=new DataView(new ArrayBuffer(8));ir=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("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}gd.detectBi=upe;upe();function lpe(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var dpe=/^-?[0-9]+$/,YR=4294967296,qR=2147483648,VR=c
Line truncated
|
||||
`)}};gD.RpcError=f9});var p9=E(mD=>{"use strict";Object.defineProperty(mD,"__esModule",{value:!0});mD.mergeRpcOptions=void 0;var Gpe=At();function Sut(t,e){if(!e)return t;let r={};pD(t,r),pD(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=Gpe.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Gpe.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},pD(t.meta,r.meta),pD(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}mD.mergeRpcOptions=Sut;function pD(t,e){if(!t)return;let r=e;for(let[n,s]of Object.entries(t))s instanceof Date?r[n]=new Date(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}});var E9=E(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.Deferred=qf.DeferredState=void 0;var dA;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(dA=qf.DeferredState||(qf.DeferredState={}));var m9=class{constructor(e=!0){this._state=dA.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!==dA.PENDING)throw new Error(`cannot resolve ${dA[this.state].toLowerCase()}`);this._resolve(e),this._state=dA.RESOLVED}reject(e){if(this.state!==dA.PENDING)throw new Error(`cannot reject ${dA[this.state].toLowerCase()}`);this._reject(e),this._state=dA.REJECTED}resolvePending(e){this._state===dA.PENDING&&this.resolve(e)}rejectPending(e){this._state===dA.PENDING&&this.reject(e)}};qf.Deferred=m9});var I9=E(ED=>{"use strict";Object.defineProperty(ED,"__esModule",{value:!0});ED.RpcOutputStreamController=void 0;var qpe=E9(),Yf=At(),C9=class{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){Yf.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){Yf.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){Yf.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(){Yf.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:()=>{let e=this._itState;Yf.assert(e,"bad state"),Yf.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 qpe.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Yf.assert(n.state==qpe.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};ED.RpcOutputStreamController=C9});var B9=E(S0=>{"use strict";var Nut=S0&&S0.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};Object.defineProperty(S0,"__esModule",{value:!0});S0.UnaryCall=void 0;var y9=class{constructor(e,r,n,s,i,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=i,this.status=o,this.trailers=a}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 Nut(this,void 0,void 0,function*(){let[e,r,n,s]=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:s}})}};S0.UnaryCall=y9});var Q9=E(N0=>{"use strict";var Tut=N0&&N0.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};Object.defineProperty(N0,"__esModule",{value:!0});N0.ServerStreamingCall=void 0;var b9=class{constructor(e
Line truncated
|
||||
\v\f\r\x1B !"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041FLine truncated
|
||||
\v\f\r\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0`},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F"},viscii:{type:"_sbcs",chars:`\0\u1EB2\u1EB4\u1EAA\x07\b
|
||||
\v\f\r\u1EF6\u1EF8\x1B\u1EF4 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE`},iso646cn:{type:"_sbcs",chars:`\0\x07\b
|
||||
\v\f\r\x1B !"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},iso646jp:{type:"_sbcs",chars:`\0\x07\b
|
||||
\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}});var eIe=E(ZCe=>{"use strict";var pY=Xu().Buffer;ZCe._dbcs=Zu;var Xn=-1,XCe=-2,ia=-10,Gs=-1e3,nE=new Array(256),xb=-1;for(K2=0;K2<256;K2++)nE[K2]=Xn;var K2;function Zu(t,e){if(this.encodingName=t.encodingName,!t)throw new Error("DBCS codec is called without the data.");if(!t.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var r=t.table();this.decodeTables=[],this.decodeTables[0]=nE.slice(0),this.decodeTableSeq=[];for(var n=0;n<r.length;n++)this._addDecodeChunk(r[n]);if(typeof t.gb18030=="function"){this.gb18030=t.gb18030();var s=this.decodeTables.length;this.decodeTables.push(nE.slice(0));var i=this.decodeTables.length;this.decodeTables.push(nE.slice(0));for(var o=this.decodeTables[0],n=129;n<=254;n++)for(var a=this.decodeTables[Gs-o[n]],c=48;c<=57;c++){if(a[c]===Xn)a[c]=Gs-s;else if(a[c]>Gs)throw new Error("gb18030 decode tables conflict at byte 2");for(var A=this.decodeTables[Gs-a[c]],u=129;u<=254;u++){if(A[u]===Xn)A[u]=Gs-i;else{if(A[u]===Gs-i)continue;if(A[u]>Gs)throw new Error("gb18030 decode tables conflict at byte 3")}for(var l=this.decodeTables[Gs-A[u]],d=48;d<=57;d++)l[d]===Xn&&(l[d]=XCe)}}}this.defaultCharUnicode=e.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var h={};if(t.encodeSkipVals)for(var n=0;n<t.encodeSkipValsLine truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function IIt(t){let e=(t.headersList.get("referrer-policy",!0)??"").split(","),r="";if(e.length)for(let n=e.length;n!==0;n--){let s=e[n-1].trim();if(iIt.has(s)){r=s;break}}return r}function yIt(t,e){let r=IIt(e);r!==""&&(t.referrerPolicy=r)}function BIt(){return"allowed"}function bIt(){return"success"}function QIt(){return"success"}function wIt(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function SIt(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&&_V(t.origin)&&!_V(Eg(t))&&(e=null);break;case"same-origin":Ub(t,Eg(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function cE(t,e){return t}function NIt(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:cE(t.domainLookupStartTime,r),domainLookupEndTime:cE(t.domainLookupEndTime,r),connectionStartTime:cE(t.connectionStartTime,r),connectionEndTime:cE(t.connectionEndTime,r),secureConnectionStartTime:cE(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function TIt(t){return cE(AIt.now(),t)}function xIt(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}}function RBe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function RIt(t){return{referrerPolicy:t.referrerPolicy}}function DIt(t){let e=t.referrerPolicy;Pb(e);let r=null;if(t.referrer==="client"){let i=wBe();if(!i||i.origin==="null")return"no-referrer";r=new URL(i)}else Ud.is.URL(t.referrer)&&(r=t.referrer);let n=vV(r),s=vV(r,!0);switch(n.toString().length>4096&&(n=s),e){case"no-referrer":return"no-referrer";case"origin":return s??vV(r,!0);case"unsafe-url":return n;case"strict-origin":{let i=Eg(t);return mg(n)&&!mg(i)?"no-referrer":s}case"strict-origin-when-cross-origin":{let i=Eg(t);return Ub(n,i)?n:mg(n)&&!mg(i)?"no-referrer":s}case"same-origin":return Ub(t,n)?n:"no-referrer";case"origin-when-cross-origin":return Ub(t,n)?n:s;case"no-referrer-when-downgrade":{let i=Eg(t);return mg(n)&&!mg(i)?"no-referrer":n}}}function vV(t,e=!1){return Pb(Ud.is.URL(t)),t=new URL(t),_Be(t)?"no-referrer":(t.username="",t.password="",t.hash="",e===!0&&(t.pathname="",t.search=""),t)}var kIt=RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/),vIt=RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);function DBe(t){return t.includes(":")?(t[0]==="["&&t[t.length-1]==="]"&&(t=t.slice(1,-1)),vIt(t)):kIt(t)}function _It(t){return t==null||t==="null"?!1:(t=new URL(t),!!(t.protocol==="https:"||t.protocol==="wss:"||DBe(t.hostname)||t.hostname==="localhost"||t.hostname==="localhost."||t.hostname.endsWith(".localhost")||t.hostname.endsWith(".localhost.")||t.protocol==="file:"))}function mg(t){return Ud.is.URL(t)?t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="blob:"?!0:_It(t.origin):!1}function FIt(t){}function Ub(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function MIt(t){return t.controller.state==="aborted"}function LIt(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function UIt(t){return lIt[t.toLowerCase()]??t}var PIt=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function kBe(t,e,r=0,n=1){class s{#e;#t;#n;constructor(o,a){this.#e=o,this.#t=a,this.#n=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let o=this.#n,a=e(this.#e),c=a.length;if(o>=c)return{value:void 0,done:!0};let{[r]:A,[n]:u}=a[o];this.#n=o+1;let l;switch(this.#t){case"key":l=A;break;case"value":l=u;break;case"key+value":l=[A,u];break}return{value:l,done:!1}}}return delete s.prototype.constructor,Object.setPrototypeOf(s.prototype,PIt),Object.defineProperties(s.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(i,o){return new s(i,o)}}function OIt(t,e,r,n=0,s=1){let i=kBe(t,r,n,s),o={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return Ud.brandCheck(this,e),i(this,"key")}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return Ud.brandCheck(this,e),i(this,"value
Line truncated
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"')}else{let o=ca(a=>qV(a)&&a!==59,t,e);i=HV.decode(o)}return{name:n,value:i}}function uyt(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10){if(r===null)throw bi("header name is null");return{name:r,filename:n,contentType:s,encoding:i}}let o=ca(a=>a!==10&&a!==13&&a!==58,t,e);if(o=GV(o,!0,!0,a=>a===9||a===32),!ryt.test(o.toString()))throw bi("header name does not match the field-name token production");if(t[e.position]!==58)throw bi("expected :");switch(e.position++,ca(a=>a===32||a===9,t,e),tyt(o)){case"content-disposition":{if(r=n=null,ca(c=>qV(c),t,e).toString("ascii").toLowerCase()!=="form-data")throw bi("expected form-data for content-disposition header");for(;e.position<t.length&&t[e.position]!==13&&t[e.position+1]!==10;){let c=Ayt(t,e);if(!c)break;c.name==="name"?r=c.value:c.name==="filename"&&(n=c.value)}if(r===null)throw bi("name attribute is required in content-disposition header");break}case"content-type":{let a=ca(c=>c!==10&&c!==13,t,e);a=GV(a,!1,!0,c=>c===9||c===32),s=OBe(a);break}case"content-transfer-encoding":{let a=ca(c=>c!==10&&c!==13,t,e);a=GV(a,!1,!0,c=>c===9||c===32),i=OBe(a);break}default:ca(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)throw bi("expected CRLF");e.position+=2}}function ca(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function GV(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}function lyt(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}function bi(t){return new TypeError("Failed to parse body as FormData.",{cause:new TypeError(t)})}function dyt(t){return t<=31||t===127}function hyt(t){return t===40||t===41||t===60||t===62||t===64||t===44||t===59||t===58||t===92||t===34||t===47||t===91||t===93||t===63||t===61}function qV(t){return t<=127&&t!==32&&t!==9&&!dyt(t)&&!hyt(t)}HBe.exports={multipartFormDataParser:cyt,validateBoundary:ayt}});var Ob=E((Byr,qBe)=>{"use strict";function fyt(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}qBe.exports={createDeferredPromise:fyt}});var lE=E((byr,zBe)=>{"use strict";var WV=et(),{ReadableStreamFrom:gyt,readableStreamClose:pyt,fullyReadBody:myt,extractMimeType:Eyt}=no(),{FormData:YBe,setFormDataState:Cyt}=yk(),{webidl:oc}=Zn(),YV=b("node:assert"),{isErrored:VV,isDisturbed:Iyt}=b("node:stream"),{isUint8Array:yyt}=b("node:util/types"),{serializeAMimeType:Byt}=aa(),{multipartFormDataParser:byt}=GBe(),{createDeferredPromise:Qyt}=Ob(),{parseJSONFromBytes:wyt}=rl(),{utf8DecodeBytes:Syt}=gk(),{runtimeFeatures:Nyt}=nl(),Tyt=Nyt.has("crypto")?b("node:crypto").randomInt:t=>Math.floor(Math.random()*t),Bk=new TextEncoder;function xyt(){}var Ryt=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!Iyt(e)&&!VV(e)&&e.cancel("Response object has been garbage collected").catch(xyt)});function WBe(t,e=!1){let r=null,n=null;oc.is.ReadableStream(t)?r=t:oc.is.Blob(t)?r=t.stream():r=new ReadableStream({pull(){},start(A){n=A},cancel(){},type:"bytes"}),YV(oc.is.ReadableStream(r));let s=null,i=null,o=null,a=null;if(typeof t=="string")i=t,a="text/plain;charset=UTF-8";else if(oc.is.URLSearchParams(t))i=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(oc.is.BufferSource(t))i=oc.util.getCopyOfBytesHeldByBufferSource(t);else if(oc.is.FormData(t)){let A=`----formdata-undici-0${`${Tyt(1e11)}`.padStart(11,"0")}`,u=`--${A}\r
|
||||
\v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_\`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD`},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD"},macintosh:{type:"_sbcs",chars:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"},ascii:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"},tis620:{type:"_sbcs",chars:"\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD"}}});var $Ce=E(KCe=>{"use strict";var IY=Xu().Buffer;KCe._dbcs=Zu;var Zn=-1,jCe=-2,na=-10,Us=-1e3,iE=new Array(256),_b=-1;for(tk=0;tk<256;tk++)iE[tk]=Zn;var tk;function Zu(t,e){if(this.encodingName=t.encodingName,!t)throw new Error("DBCS codec is called without the data.");if(!t.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var r=t.table();this.decodeTables=[],this.decodeTables[0]=iE.slice(0),this.decodeTableSeq=[];for(var n=0;n<r.length;n++)this._addDecodeChunk(r[n]);if(typeof t.gb18030=="function"){this.gb18030=t.gb18030();var s=this.decodeTables.length;this.decodeTables.push(iE.slice(0));var i=this.decodeTables.length;this.decodeTables.push(iE.slice(0));for(var o=this.decodeTables[0],n=129;n<=254;n++)for(var a=this.decodeTables[Us-o[n]],c=48;c<=57;c++){if(a[c]===Zn)a[c]=Us-s;else if(a[c]>Us)throw new Error("gb18030 decode tables conflict at byte 2");for(var A=this.decodeTables[Us-a[c]],u=129;u<=254;u++){if(A[u]===Zn)A[u]=Us-i;else{if(A[u]===Us-i)continue;if(A[u]>Us)throw new Error("gb18030 decode tables conflict at byte 3")}for(var l=this.decodeTables[Us-A[u]],d=48;d<=57;d++)l[d]===Zn&&(l[d]=jCe)}}}this.defaultCharUnicode=e.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var h={};if(t.encodeSkipVals)for(var n=0;n<t.encodeSkipValsLine truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function SIt(t){let e=(t.headersList.get("referrer-policy",!0)??"").split(","),r="";if(e.length)for(let n=e.length;n!==0;n--){let s=e[n-1].trim();if(lIt.has(s)){r=s;break}}return r}function NIt(t,e){let r=SIt(e);r!==""&&(t.referrerPolicy=r)}function TIt(){return"allowed"}function xIt(){return"success"}function RIt(){return"success"}function DIt(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function kIt(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&&UV(t.origin)&&!UV(Cg(t))&&(e=null);break;case"same-origin":qb(t,Cg(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function uE(t,e){return t}function vIt(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:uE(t.domainLookupStartTime,r),domainLookupEndTime:uE(t.domainLookupEndTime,r),connectionStartTime:uE(t.connectionStartTime,r),connectionEndTime:uE(t.connectionEndTime,r),secureConnectionStartTime:uE(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function _It(t){return uE(gIt.now(),t)}function FIt(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}}function NBe(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function MIt(t){return{referrerPolicy:t.referrerPolicy}}function LIt(t){let e=t.referrerPolicy;Yb(e);let r=null;if(t.referrer==="client"){let i=BBe();if(!i||i.origin==="null")return"no-referrer";r=new URL(i)}else Od.is.URL(t.referrer)&&(r=t.referrer);let n=LV(r),s=LV(r,!0);switch(n.toString().length>4096&&(n=s),e){case"no-referrer":return"no-referrer";case"origin":return s??LV(r,!0);case"unsafe-url":return n;case"strict-origin":{let i=Cg(t);return Eg(n)&&!Eg(i)?"no-referrer":s}case"strict-origin-when-cross-origin":{let i=Cg(t);return qb(n,i)?n:Eg(n)&&!Eg(i)?"no-referrer":s}case"same-origin":return qb(t,n)?n:"no-referrer";case"origin-when-cross-origin":return qb(t,n)?n:s;case"no-referrer-when-downgrade":{let i=Cg(t);return Eg(n)&&!Eg(i)?"no-referrer":n}}}function LV(t,e=!1){return Yb(Od.is.URL(t)),t=new URL(t),DBe(t)?"no-referrer":(t.username="",t.password="",t.hash="",e===!0&&(t.pathname="",t.search=""),t)}var UIt=RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/),PIt=RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);function TBe(t){return t.includes(":")?(t[0]==="["&&t[t.length-1]==="]"&&(t=t.slice(1,-1)),PIt(t)):UIt(t)}function OIt(t){return t==null||t==="null"?!1:(t=new URL(t),!!(t.protocol==="https:"||t.protocol==="wss:"||TBe(t.hostname)||t.hostname==="localhost"||t.hostname==="localhost."||t.hostname.endsWith(".localhost")||t.hostname.endsWith(".localhost.")||t.protocol==="file:"))}function Eg(t){return Od.is.URL(t)?t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="blob:"?!0:OIt(t.origin):!1}function HIt(t){}function qb(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function GIt(t){return t.controller.state==="aborted"}function qIt(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function YIt(t){return mIt[t.toLowerCase()]??t}var VIt=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function xBe(t,e,r=0,n=1){class s{#e;#t;#n;constructor(o,a){this.#e=o,this.#t=a,this.#n=0}next(){if(typeof this!="object"||this===null||!(#e in this))throw new TypeError(`'next' called on an object that does not implement interface ${t} Iterator.`);let o=this.#n,a=e(this.#e),c=a.length;if(o>=c)return{value:void 0,done:!0};let{[r]:A,[n]:u}=a[o];this.#n=o+1;let l;switch(this.#t){case"key":l=A;break;case"value":l=u;break;case"key+value":l=[A,u];break}return{value:l,done:!1}}}return delete s.prototype.constructor,Object.setPrototypeOf(s.prototype,VIt),Object.defineProperties(s.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${t} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(i,o){return new s(i,o)}}function WIt(t,e,r,n=0,s=1){let i=xBe(t,r,n,s),o={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return Od.brandCheck(this,e),i(this,"key")}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return Od.brandCheck(this,e),i(this,"value
Line truncated
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"')}else{let o=oa(a=>JV(a)&&a!==59,t,e);i=VV.decode(o)}return{name:n,value:i}}function pyt(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10){if(r===null)throw Ii("header name is null");return{name:r,filename:n,contentType:s,encoding:i}}let o=oa(a=>a!==10&&a!==13&&a!==58,t,e);if(o=WV(o,!0,!0,a=>a===9||a===32),!cyt.test(o.toString()))throw Ii("header name does not match the field-name token production");if(t[e.position]!==58)throw Ii("expected :");switch(e.position++,oa(a=>a===32||a===9,t,e),ayt(o)){case"content-disposition":{if(r=n=null,oa(c=>JV(c),t,e).toString("ascii").toLowerCase()!=="form-data")throw Ii("expected form-data for content-disposition header");for(;e.position<t.length&&t[e.position]!==13&&t[e.position+1]!==10;){let c=gyt(t,e);if(!c)break;c.name==="name"?r=c.value:c.name==="filename"&&(n=c.value)}if(r===null)throw Ii("name attribute is required in content-disposition header");break}case"content-type":{let a=oa(c=>c!==10&&c!==13,t,e);a=WV(a,!1,!0,c=>c===9||c===32),s=LBe(a);break}case"content-transfer-encoding":{let a=oa(c=>c!==10&&c!==13,t,e);a=WV(a,!1,!0,c=>c===9||c===32),i=LBe(a);break}default:oa(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)throw Ii("expected CRLF");e.position+=2}}function oa(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function WV(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}function myt(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}function Ii(t){return new TypeError("Failed to parse body as FormData.",{cause:new TypeError(t)})}function Eyt(t){return t<=31||t===127}function Cyt(t){return t===40||t===41||t===60||t===62||t===64||t===44||t===59||t===58||t===92||t===34||t===47||t===91||t===93||t===63||t===61}function JV(t){return t<=127&&t!==32&&t!==9&&!Eyt(t)&&!Cyt(t)}UBe.exports={multipartFormDataParser:fyt,validateBoundary:hyt}});var Vb=E((Hyr,OBe)=>{"use strict";function Iyt(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}OBe.exports={createDeferredPromise:Iyt}});var hE=E((Gyr,VBe)=>{"use strict";var KV=Ze(),{ReadableStreamFrom:yyt,readableStreamClose:Byt,fullyReadBody:byt,extractMimeType:Qyt}=to(),{FormData:HBe,setFormDataState:wyt}=Sk(),{webidl:ac}=es(),zV=b("node:assert"),{isErrored:jV,isDisturbed:Syt}=b("node:stream"),{isUint8Array:Nyt}=b("node:util/types"),{serializeAMimeType:Tyt}=ia(),{multipartFormDataParser:xyt}=PBe(),{createDeferredPromise:Ryt}=Vb(),{parseJSONFromBytes:Dyt}=rl(),{utf8DecodeBytes:kyt}=Ik(),{runtimeFeatures:vyt}=nl(),_yt=vyt.has("crypto")?b("node:crypto").randomInt:t=>Math.floor(Math.random()*t),Nk=new TextEncoder;function Fyt(){}var Myt=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!Syt(e)&&!jV(e)&&e.cancel("Response object has been garbage collected").catch(Fyt)});function qBe(t,e=!1){let r=null,n=null;ac.is.ReadableStream(t)?r=t:ac.is.Blob(t)?r=t.stream():r=new ReadableStream({pull(){},start(A){n=A},cancel(){},type:"bytes"}),zV(ac.is.ReadableStream(r));let s=null,i=null,o=null,a=null;if(typeof t=="string")i=t,a="text/plain;charset=UTF-8";else if(ac.is.URLSearchParams(t))i=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(ac.is.BufferSource(t))i=ac.util.getCopyOfBytesHeldByBufferSource(t);else if(ac.is.FormData(t)){let A=`----formdata-undici-0${`${_yt(1e11)}`.padStart(11,"0")}`,u=`--${A}\r
|
||||
Content-Disposition: form-data`;let l=m=>m.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),d=m=>m.replace(/\r?\n|\r/g,`\r
|
||||
`),h=[],f=new Uint8Array([13,10]);o=0;let p=!1;for(let[m,C]of t)if(typeof C=="string"){let y=Bk.encode(u+`; name="${l(d(m))}"\r
|
||||
`),h=[],f=new Uint8Array([13,10]);o=0;let p=!1;for(let[m,C]of t)if(typeof C=="string"){let y=Nk.encode(u+`; name="${l(d(m))}"\r
|
||||
\r
|
||||
${d(C)}\r
|
||||
`);h.push(y),o+=y.byteLength}else{let y=Bk.encode(`${u}; name="${l(d(m))}"`+(C.name?`; filename="${l(C.name)}"`:"")+`\r
|
||||
`);h.push(y),o+=y.byteLength}else{let y=Nk.encode(`${u}; name="${l(d(m))}"`+(C.name?`; filename="${l(C.name)}"`:"")+`\r
|
||||
Content-Type: ${C.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);h.push(y,C,f),typeof C.size=="number"?o+=y.byteLength+C.size+f.byteLength:p=!0}let I=Bk.encode(`--${A}--\r
|
||||
`);h.push(I),o+=I.byteLength,p&&(o=null),i=t,s=async function*(){for(let m of h)m.stream?yield*m.stream():yield m},a=`multipart/form-data; boundary=${A}`}else if(oc.is.Blob(t))i=t,o=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(WV.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=oc.is.ReadableStream(t)?t:gyt(t)}return(typeof i=="string"||yyt(i))&&(s=()=>(o=typeof i=="string"?Buffer.byteLength(i):i.length,i)),s!=null&&(async()=>{let A=s(),u=A?.[Symbol.asyncIterator]?.();if(u)for await(let l of u){if(VV(r))break;l.length&&n.enqueue(new Uint8Array(l))}else A?.length&&!VV(r)&&n.enqueue(typeof A=="string"?Bk.encode(A):new Uint8Array(A));queueMicrotask(()=>pyt(n))})(),[{stream:r,source:i,length:o},a]}function Dyt(t,e=!1){return oc.is.ReadableStream(t)&&(YV(!WV.isDisturbed(t),"The body has already been consumed."),YV(!t.locked,"The stream is locked.")),WBe(t,e)}function kyt(t){let{0:e,1:r}=t.stream.tee();return t.stream=e,{stream:r,length:t.length,source:t.source}}function vyt(t,e){return{blob(){return uE(this,n=>{let s=VBe(e(this));return s===null?s="":s&&(s=Byt(s)),new Blob([n],{type:s})},t,e)},arrayBuffer(){return uE(this,n=>new Uint8Array(n).buffer,t,e)},text(){return uE(this,Syt,t,e)},json(){return uE(this,wyt,t,e)},formData(){return uE(this,n=>{let s=VBe(e(this));if(s!==null)switch(s.essence){case"multipart/form-data":{let i=byt(n,s),o=new YBe;return Cyt(o,i),o}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(n.toString()),o=new YBe;for(let[a,c]of i)o.append(a,c);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t,e)},bytes(){return uE(this,n=>new Uint8Array(n),t,e)}}}function _yt(t,e){Object.assign(t.prototype,vyt(t,e))}function uE(t,e,r,n){try{oc.brandCheck(t,r)}catch(a){return Promise.reject(a)}if(t=n(t),JBe(t))return Promise.reject(new TypeError("Body is unusable: Body has already been read"));let s=Qyt(),i=s.reject,o=a=>{try{s.resolve(e(a))}catch(c){i(c)}};return t.body==null?(o(Buffer.allocUnsafe(0)),s.promise):(myt(t.body,o,i),s.promise)}function JBe(t){let e=t.body;return e!=null&&(e.stream.locked||WV.isDisturbed(e.stream))}function VBe(t){let e=t.headersList,r=Eyt(e);return r==="failure"?null:r}zBe.exports={extractBody:WBe,safelyExtractBody:Dyt,cloneBody:kyt,mixinBody:_yt,streamRegistry:Ryt,bodyUnusable:JBe}});var ibe=E((Qyr,sbe)=>{"use strict";var We=b("node:assert"),Je=et(),{channels:jBe}=Md(),JV=TY(),{RequestContentLengthMismatchError:Cg,ResponseContentLengthMismatchError:Fyt,RequestAbortedError:tbe,HeadersTimeoutError:Myt,HeadersOverflowError:Lyt,SocketError:qb,InformationalError:dE,BodyTimeoutError:Uyt,HTTPParserError:Pyt,ResponseExceededMaxSizeError:Oyt}=Ke(),{kUrl:rbe,kReset:Qi,kClient:eW,kParser:Wr,kBlocking:Yb,kRunning:ps,kPending:Hyt,kSize:KBe,kWriting:Od,kQueue:ac,kNoRef:Hb,kKeepAliveDefaultTimeout:Gyt,kHostHeader:qyt,kPendingIdx:Yyt,kRunningIdx:Aa,kError:ua,kPipelining:wk,kSocket:hE,kKeepAliveTimeoutValue:Nk,kMaxHeadersSize:Vyt,kKeepAliveMaxTimeout:Wyt,kKeepAliveTimeoutThreshold:Jyt,kHeadersTimeout:zyt,kBodyTimeout:jyt,kStrictContentLength:KV,kMaxRequests:$Be,kCounter:Kyt,kMaxResponseSize:$yt,kOnError:Xyt,kResume:Pd,kHTTPContext:nbe,kClosed:$V}=$t(),bA=zye(),Zyt=Buffer.alloc(0),bk=Buffer[Symbol.species],eBt=Je.removeAllListeners,zV;function tBt(){let t=process.env.JEST_WORKER_ID?IV():void 0,e,r=process.arch!=="ppc64";if(process.env.UNDICI_NO_WASM_SIMD==="1"?r=!0:process.env.UNDICI_NO_WASM_SIMD==="0"&&(r=!1),r)try{e=new WebAssembly.Module($ye())}catch{}return e||(e=new WebAssembly.Module(t||IV())),new WebAssembly.Instance(e,{env:{wasm_on_url:(n,s,i)=>0,wasm_on_status:(n,s,i)=>{We(Bn.ptr===n);let o=s-wA+QA.byteOffset;return Bn.onStatus(new bk(QA.buffer,o,i))},wasm_on_message_begin:n=>(We(Bn.ptr===n),Bn.onMessageBegin()),wasm_on_header_field:(n,s,i)=>{We(Bn.ptr===n);let o=s-wA+QA.byteOffset;return Bn.onHeaderField(new bk(QA.buffer,o,i))},wasm_on_header_value:(n,s,i)=>{We(Bn.ptr===n);let o=s-wA+QA.byteOffset;return Bn.onHeaderValue(new bk(QA.buffer,o,i))},wasm_on_headers_complete:(n,s,i,o)=>(We(Bn.ptr===n),Bn.onHeadersComplete(s,i===1,o===1)),wasm_on_body:(n,s,i)=>{We(Bn.ptr===n);let o=s-wA+QA.byteOffset;return Bn.onBody(new bk(QA.buffer,o,i))},wasm_on_message_complete:n=>(We(Bn.ptr===n),Bn.onMessageComplete())}})}var jV=null,Bn=null,QA=null,Qk=0,wA=null,rBt=0,Gb=1,fE=2|Gb,Sk=4|Gb,XV=8|rBt,ZV=class{constructor(e,r,{exports:n}){this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(bA.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=0,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[Vyt],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[$yt]}setTi
Line truncated
|
||||
`);h.push(y,C,f),typeof C.size=="number"?o+=y.byteLength+C.size+f.byteLength:p=!0}let I=Nk.encode(`--${A}--\r
|
||||
`);h.push(I),o+=I.byteLength,p&&(o=null),i=t,s=async function*(){for(let m of h)m.stream?yield*m.stream():yield m},a=`multipart/form-data; boundary=${A}`}else if(ac.is.Blob(t))i=t,o=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(KV.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=ac.is.ReadableStream(t)?t:yyt(t)}return(typeof i=="string"||Nyt(i))&&(s=()=>(o=typeof i=="string"?Buffer.byteLength(i):i.length,i)),s!=null&&(async()=>{let A=s(),u=A?.[Symbol.asyncIterator]?.();if(u)for await(let l of u){if(jV(r))break;l.length&&n.enqueue(new Uint8Array(l))}else A?.length&&!jV(r)&&n.enqueue(typeof A=="string"?Nk.encode(A):new Uint8Array(A));queueMicrotask(()=>Byt(n))})(),[{stream:r,source:i,length:o},a]}function Lyt(t,e=!1){return ac.is.ReadableStream(t)&&(zV(!KV.isDisturbed(t),"The body has already been consumed."),zV(!t.locked,"The stream is locked.")),qBe(t,e)}function Uyt(t){let{0:e,1:r}=t.stream.tee();return t.stream=e,{stream:r,length:t.length,source:t.source}}function Pyt(t,e){return{blob(){return dE(this,n=>{let s=GBe(e(this));return s===null?s="":s&&(s=Tyt(s)),new Blob([n],{type:s})},t,e)},arrayBuffer(){return dE(this,n=>new Uint8Array(n).buffer,t,e)},text(){return dE(this,kyt,t,e)},json(){return dE(this,Dyt,t,e)},formData(){return dE(this,n=>{let s=GBe(e(this));if(s!==null)switch(s.essence){case"multipart/form-data":{let i=xyt(n,s),o=new HBe;return wyt(o,i),o}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(n.toString()),o=new HBe;for(let[a,c]of i)o.append(a,c);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t,e)},bytes(){return dE(this,n=>new Uint8Array(n),t,e)}}}function Oyt(t,e){Object.assign(t.prototype,Pyt(t,e))}function dE(t,e,r,n){try{ac.brandCheck(t,r)}catch(a){return Promise.reject(a)}if(t=n(t),YBe(t))return Promise.reject(new TypeError("Body is unusable: Body has already been read"));let s=Ryt(),i=s.reject,o=a=>{try{s.resolve(e(a))}catch(c){i(c)}};return t.body==null?(o(Buffer.allocUnsafe(0)),s.promise):(byt(t.body,o,i),s.promise)}function YBe(t){let e=t.body;return e!=null&&(e.stream.locked||KV.isDisturbed(e.stream))}function GBe(t){let e=t.headersList,r=Qyt(e);return r==="failure"?null:r}VBe.exports={extractBody:qBe,safelyExtractBody:Lyt,cloneBody:Uyt,mixinBody:Oyt,streamRegistry:Myt,bodyUnusable:YBe}});var rbe=E((qyr,tbe)=>{"use strict";var We=b("node:assert"),Je=Ze(),{channels:WBe}=Ud(),$V=kY(),{RequestContentLengthMismatchError:Ig,ResponseContentLengthMismatchError:Hyt,RequestAbortedError:XBe,HeadersTimeoutError:Gyt,HeadersOverflowError:qyt,SocketError:zb,InformationalError:fE,BodyTimeoutError:Yyt,HTTPParserError:Vyt,ResponseExceededMaxSizeError:Wyt}=Ke(),{kUrl:ZBe,kReset:yi,kClient:s7,kParser:Wr,kBlocking:jb,kRunning:ms,kPending:Jyt,kSize:JBe,kWriting:Gd,kQueue:cc,kNoRef:Wb,kKeepAliveDefaultTimeout:zyt,kHostHeader:jyt,kPendingIdx:Kyt,kRunningIdx:aa,kError:ca,kPipelining:Rk,kSocket:gE,kKeepAliveTimeoutValue:kk,kMaxHeadersSize:$yt,kKeepAliveMaxTimeout:Xyt,kKeepAliveTimeoutThreshold:Zyt,kHeadersTimeout:eBt,kBodyTimeout:tBt,kStrictContentLength:e7,kMaxRequests:zBe,kCounter:rBt,kMaxResponseSize:nBt,kOnError:sBt,kResume:Hd,kHTTPContext:ebe,kClosed:t7}=Kt(),bA=Vye(),iBt=Buffer.alloc(0),Tk=Buffer[Symbol.species],oBt=Je.removeAllListeners,XV;function aBt(){let t=process.env.JEST_WORKER_ID?QV():void 0,e,r=process.arch!=="ppc64";if(process.env.UNDICI_NO_WASM_SIMD==="1"?r=!0:process.env.UNDICI_NO_WASM_SIMD==="0"&&(r=!1),r)try{e=new WebAssembly.Module(zye())}catch{}return e||(e=new WebAssembly.Module(t||QV())),new WebAssembly.Instance(e,{env:{wasm_on_url:(n,s,i)=>0,wasm_on_status:(n,s,i)=>{We(bn.ptr===n);let o=s-wA+QA.byteOffset;return bn.onStatus(new Tk(QA.buffer,o,i))},wasm_on_message_begin:n=>(We(bn.ptr===n),bn.onMessageBegin()),wasm_on_header_field:(n,s,i)=>{We(bn.ptr===n);let o=s-wA+QA.byteOffset;return bn.onHeaderField(new Tk(QA.buffer,o,i))},wasm_on_header_value:(n,s,i)=>{We(bn.ptr===n);let o=s-wA+QA.byteOffset;return bn.onHeaderValue(new Tk(QA.buffer,o,i))},wasm_on_headers_complete:(n,s,i,o)=>(We(bn.ptr===n),bn.onHeadersComplete(s,i===1,o===1)),wasm_on_body:(n,s,i)=>{We(bn.ptr===n);let o=s-wA+QA.byteOffset;return bn.onBody(new Tk(QA.buffer,o,i))},wasm_on_message_complete:n=>(We(bn.ptr===n),bn.onMessageComplete())}})}var ZV=null,bn=null,QA=null,xk=0,wA=null,cBt=0,Jb=1,pE=2|Jb,Dk=4|Jb,r7=8|cBt,n7=class{constructor(e,r,{exports:n}){this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(bA.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=0,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[$yt],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[nBt]}setTi
Line truncated
|
||||
`;if(typeof s=="string"?p+=`host: ${s}\r
|
||||
`:p+=t[qyt],i?p+=`connection: upgrade\r
|
||||
`:p+=t[jyt],i?p+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[wk]&&!h[Qi]?p+=`connection: keep-alive\r
|
||||
`:t[Rk]&&!h[yi]?p+=`connection: keep-alive\r
|
||||
`:p+=`connection: close\r
|
||||
`,Array.isArray(A))for(let I=0;I<A.length;I+=2){let m=A[I+0],C=A[I+1];if(Array.isArray(C))for(let y=0;y<C.length;y++)p+=`${m}: ${C[y]}\r
|
||||
`;else p+=`${m}: ${C}\r
|
||||
`}return jBe.sendHeaders.hasSubscribers&&jBe.sendHeaders.publish({request:e,headers:p,socket:h}),!c||d===0?ZBe(f,null,t,e,h,u,p,l):Je.isBuffer(c)?ZBe(f,c,t,e,h,u,p,l):Je.isBlobLike(c)?typeof c.stream=="function"?ebe(f,c.stream(),t,e,h,u,p,l):hBt(f,c,t,e,h,u,p,l):Je.isStream(c)?dBt(f,c,t,e,h,u,p,l):Je.isIterable(c)?ebe(f,c,t,e,h,u,p,l):We(!1),!0}function dBt(t,e,r,n,s,i,o,a){We(i!==0||r[ps]===0,"stream body cannot be pipelined");let c=!1,A=new Tk({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(f){if(!c)try{!A.write(f)&&this.pause&&this.pause()}catch(p){Je.destroy(this,p)}},l=function(){c||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let f=new tbe;queueMicrotask(()=>h(f))}},h=function(f){if(!c){if(c=!0,We(s.destroyed||s[Od]&&r[ps]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!f)try{A.end()}catch(p){f=p}A.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?Je.destroy(e,f):Je.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.on("drain",l).on("error",h),e.errorEmitted??e.errored?setImmediate(h,e.errored):(e.endEmitted??e.readableEnded)&&setImmediate(h,null),(e.closeEmitted??e.closed)&&setImmediate(d)}function ZBe(t,e,r,n,s,i,o,a){try{e?Je.isBuffer(e)&&(We(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`}return WBe.sendHeaders.hasSubscribers&&WBe.sendHeaders.publish({request:e,headers:p,socket:h}),!c||d===0?KBe(f,null,t,e,h,u,p,l):Je.isBuffer(c)?KBe(f,c,t,e,h,u,p,l):Je.isBlobLike(c)?typeof c.stream=="function"?$Be(f,c.stream(),t,e,h,u,p,l):CBt(f,c,t,e,h,u,p,l):Je.isStream(c)?EBt(f,c,t,e,h,u,p,l):Je.isIterable(c)?$Be(f,c,t,e,h,u,p,l):We(!1),!0}function EBt(t,e,r,n,s,i,o,a){We(i!==0||r[ms]===0,"stream body cannot be pipelined");let c=!1,A=new vk({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o}),u=function(f){if(!c)try{!A.write(f)&&this.pause&&this.pause()}catch(p){Je.destroy(this,p)}},l=function(){c||e.resume&&e.resume()},d=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let f=new XBe;queueMicrotask(()=>h(f))}},h=function(f){if(!c){if(c=!0,We(s.destroyed||s[Gd]&&r[ms]<=1),s.off("drain",l).off("error",h),e.removeListener("data",u).removeListener("end",h).removeListener("close",d),!f)try{A.end()}catch(p){f=p}A.destroy(f),f&&(f.code!=="UND_ERR_INFO"||f.message!=="reset")?Je.destroy(e,f):Je.destroy(e)}};e.on("data",u).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.on("drain",l).on("error",h),e.errorEmitted??e.errored?setImmediate(h,e.errored):(e.endEmitted??e.readableEnded)&&setImmediate(h,null),(e.closeEmitted??e.closed)&&setImmediate(d)}function KBe(t,e,r,n,s,i,o,a){try{e?Je.isBuffer(e)&&(We(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[Qi]=!0)):i===0?s.write(`${o}content-length: 0\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[yi]=!0)):i===0?s.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(We(i===null,"no body must not have content length"),s.write(`${o}\r
|
||||
`,"latin1")),n.onRequestSent(),r[Pd]()}catch(c){t(c)}}async function hBt(t,e,r,n,s,i,o,a){We(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Cg;let c=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
`,"latin1")),n.onRequestSent(),r[Hd]()}catch(c){t(c)}}async function CBt(t,e,r,n,s,i,o,a){We(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Ig;let c=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${o}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(c),s.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(s[Qi]=!0),r[Pd]()}catch(c){t(c)}}async function ebe(t,e,r,n,s,i,o,a){We(i!==0||r[ps]===0,"iterator body cannot be pipelined");let c=null;function A(){if(c){let d=c;c=null,d()}}let u=()=>new Promise((d,h)=>{We(c===null),s[ua]?h(s[ua]):c=d});s.on("close",A).on("drain",A);let l=new Tk({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[ua])throw s[ua];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",A).off("drain",A)}}var Tk=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Od]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[ua])throw r[ua];if(r.destroyed)return!1;let A=Buffer.byteLength(e);if(!A)return!0;if(s!==null&&o+A>s){if(i[KV])throw new Cg;process.emitWarning(new Cg)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[Qi]=!0),s===null?r.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"),s.write(c),s.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(s[yi]=!0),r[Hd]()}catch(c){t(c)}}async function $Be(t,e,r,n,s,i,o,a){We(i!==0||r[ms]===0,"iterator body cannot be pipelined");let c=null;function A(){if(c){let d=c;c=null,d()}}let u=()=>new Promise((d,h)=>{We(c===null),s[ca]?h(s[ca]):c=d});s.on("close",A).on("drain",A);let l=new vk({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let d of e){if(s[ca])throw s[ca];l.write(d)||await u()}l.end()}catch(d){l.destroy(d)}finally{s.off("close",A).off("drain",A)}}var vk=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Gd]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[ca])throw r[ca];if(r.destroyed)return!1;let A=Buffer.byteLength(e);if(!A)return!0;if(s!==null&&o+A>s){if(i[e7])throw new Ig;process.emitWarning(new Ig)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[yi]=!0),s===null?r.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${c}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1")),s===null&&r.write(`\r
|
||||
${A.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=A;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[Wr].timeout&&r[Wr].timeoutType===fE&&r[Wr].timeout.refresh&&r[Wr].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Od]=!1,e[ua])throw e[ua];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
`,"latin1"),this.bytesWritten+=A;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[Wr].timeout&&r[Wr].timeoutType===pE&&r[Wr].timeout.refresh&&r[Wr].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:i,header:o,request:a}=this;if(a.onRequestSent(),e[Gd]=!1,e[ca])throw e[ca];if(!e.destroyed){if(s===0?i?e.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${o}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&s!==r){if(n[KV])throw new Cg;process.emitWarning(new Cg)}e[Wr].timeout&&e[Wr].timeoutType===fE&&e[Wr].timeout.refresh&&e[Wr].timeout.refresh(),n[Pd]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Od]=!1,e&&(We(n[ps]<=1,"pipeline should only contain this request"),s(e))}};sbe.exports=nBt});var fbe=E((wyr,hbe)=>{"use strict";var da=b("node:assert"),{pipeline:fBt}=b("node:stream"),lt=et(),{RequestContentLengthMismatchError:sW,RequestAbortedError:gBt,SocketError:zb,InformationalError:Hd,InvalidArgumentError:pBt}=Ke(),{kUrl:Jb,kReset:kk,kClient:so,kRunning:jb,kPending:mBt,kQueue:Gd,kPendingIdx:oW,kRunningIdx:cc,kError:io,kSocket:kr,kStrictContentLength:EBt,kOnError:gE,kMaxConcurrentStreams:Rk,kPingInterval:obe,kHTTP2Session:il,kHTTP2InitialWindowSize:CBt,kHTTP2ConnectionWindowSize:IBt,kResume:SA,kSize:yBt,kHTTPContext:aW,kClosed:iW,kBodyTimeout:BBt,kEnableConnectProtocol:Vb,kRemoteSettings:Wb,kHTTP2Stream:xk,kHTTP2SessionState:cW}=$t(),{channels:abe}=Md(),la=Symbol("open streams"),cbe,Dk;try{Dk=b("node:http2")}catch{Dk={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:bBt,HTTP2_HEADER_METHOD:Abe,HTTP2_HEADER_PATH:ube,HTTP2_HEADER_SCHEME:tW,HTTP2_HEADER_CONTENT_LENGTH:QBt,HTTP2_HEADER_EXPECT:wBt,HTTP2_HEADER_STATUS:rW,HTTP2_HEADER_PROTOCOL:SBt,NGHTTP2_REFUSED_STREAM:NBt,NGHTTP2_CANCEL:TBt}}=Dk;function nW(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}function xBt(t,e){t[kr]=e;let r=t[CBt],n=t[IBt],s=Dk.connect(t[Jb],{createConnection:()=>e,peerMaxConcurrentStreams:t[Rk],settings:{enablePush:!1,...r!=null?{initialWindowSize:r}:null}});return t[kr]=e,s[la]=0,s[so]=t,s[kr]=e,s[cW]={ping:{interval:t[obe]===0?null:setInterval(vBt,t[obe],s).unref()}},s[Vb]=!1,s[Wb]=!1,n&<.addListener(s,"connect",DBt.bind(s,n)),lt.addListener(s,"error",_Bt),lt.addListener(s,"frameError",FBt),lt.addListener(s,"end",MBt),lt.addListener(s,"goaway",LBt),lt.addListener(s,"close",UBt),lt.addListener(s,"remoteSettings",kBt),s.unref(),t[il]=s,e[il]=s,lt.addListener(e,"error",OBt),lt.addListener(e,"end",HBt),lt.addListener(e,"close",PBt),e[iW]=!1,e.on("close",GBt),{version:"h2",defaultPipelining:1/0,write(i){return YBt(t,i)},resume(){RBt(t)},destroy(i,o){e[iW]?queueMicrotask(o):e.destroy(i).on("close",o)},get destroyed(){return e.destroyed},busy(i){if(i!=null)if(t[jb]>0){if(i.idempotent===!1||(i.upgrade==="websocket"||i.method==="CONNECT")&&s[Wb]===!1||lt.bodyLength(i.body)!==0&&(lt.isStream(i.body)||lt.isAsyncIterable(i.body)||lt.isFormDataLike(i.body)))return!0}else return(i.upgrade==="websocket"||i.method==="CONNECT")&&s[Wb]===!1;return!1}}}function RBt(t){let e=t[kr];e?.destroyed===!1&&(t[yBt]===0||t[Rk]===0?(e.unref(),t[il].unref()):(e.ref(),t[il].ref()))}function DBt(t){try{typeof this.setLocalWindowSize=="function"&&this.setLocalWindowSize(t)}catch{}}function kBt(t){if(this[so][Rk]=t.maxConcurrentStreams??this[so][Rk],this[Wb]===!0&&this[Vb]===!0&&t.enableConnectProtocol===!1){let e=new Hd("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[kr][io]=e,this[so][gE](e);return}this[Vb]=t.enableConnectProtocol??this[Vb],this[Wb]=!0,this[so][SA]()}function vBt(t){let e=t[cW];if((t.closed||t.destroyed)&&e.ping.interval!=null){clearInterval(e.ping.interval),e.ping.interval=null;return}t.ping(r.bind(t));function r(n,s){let i=this[so],o=this[so];if(n!=null){let a=new Hd(`HTTP/2: "PING" errored - type ${n.message}`);o[io]=a,i[gE](a)}else i.emit("ping",s)}}function _Bt(t){da(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[kr][io]=t,this[so][gE](t)}function FBt(t,e,r){if(r===0){let n=new Hd(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[kr][io]=n,this[so][gE](n)}}function MBt(){let t=new zb("other side closed",lt.getSocketInfo(this[kr]));this.destroy(t),lt.destroy(this[kr],t)}function LBt(t){let e=this[io]||new zb(`HTTP/2: "GOAWAY" frame received with code ${t}`,lt.getSocketInfo(this[kr])),r=this[so];if(r[kr]=null,r[aW]=null,this.close(),this[il]=null,lt.destroy(this[kr],e),r[cc]<r[Gd].length){let n=r[Gd][r[cc]];r[Gd][r[cc]++]=null,lt.errorRequest(r,n,e),r[oW]=r[cc]}da(r[jb]===0),r.emit("disconnect",r[Jb],[r],e),r.emit("connectionError",r[Jb],[r],e),r[SA]()}function UBt(){let{[so]:t,[cW]:e}=this,{[kr]:r}=t,n=this[kr][io]||this[io]||new zb("closed",lt.getSocketInfo(r));if(t[kr]=null,t[aW]=null,e.ping.interval!=null&&(clearInterval(e.ping.interval),e.ping.interval=null),t.destroyed){da(t[mBt]===0);let s=t[Gd].splice(t[cc]);for(let i=0;i<s.length;i++){let o=s[i];lt.errorRequest(t,o,n)}}}function PBt(){let t=this[io]||new zb("closed",lt.getSocketInfo(this)),e=this[il][so];e[kr]=null,e[aW]=null,this[il]!==null&&this[il].destroy(t),e[oW]=e[cc],da(e[jb]===0),e.emit("disconnect",e[Jb],[e],t),e[SA]()}function OBt(t){da(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[io]=t,this[so][gE](t)}function HBt(){lt.destroy(this,new zb("other side closed",lt.getSocketInfo(this)))}func
Line truncated
|
||||
`;abe.sendHeaders.publish({request:e,headers:k,socket:n[kr]})}let N=s==="GET"||s==="HEAD"||d===null;c?(h[wBt]="100-continue",f=n.request(h,{endStream:N,signal:A}),f[xk]=!0,f.once("continue",q)):(f=n.request(h,{endStream:N,signal:A}),f[xk]=!0,q()),++n[la],f.setTimeout(r);let M=!1;return f.once("response",k=>{let{[rW]:P,...D}=k;if(e.onResponseStarted(),M=!0,e.aborted){f.removeAllListeners("data");return}e.onHeaders(Number(P),nW(D),f.resume.bind(f),"")===!1&&f.pause(),f.on("data",z=>{e.aborted||e.completed||e.onData(z)===!1&&f.pause()})}),f.once("end",()=>{f.removeAllListeners("data"),M?(!e.aborted&&!e.completed&&e.onComplete({}),t[Gd][t[cc]++]=null,t[SA]()):(m(new Hd("HTTP/2: stream half-closed (remote)")),t[Gd][t[cc]++]=null,t[oW]=t[cc],t[SA]())}),f.once("close",()=>{f.removeAllListeners("data"),n[la]-=1,n[la]===0&&n.unref()}),f.once("error",function(k){f.removeAllListeners("data"),m(k)}),f.once("frameError",(k,P)=>{f.removeAllListeners("data"),m(new Hd(`HTTP/2: "frameError" received - type ${k}, code ${P}`))}),f.on("aborted",()=>{f.removeAllListeners("data")}),f.on("timeout",()=>{let k=new Hd(`HTTP/2: "stream timeout after ${r}"`);f.removeAllListeners("data"),n[la]-=1,n[la]===0&&n.unref(),m(k)}),f.once("trailers",k=>{e.aborted||e.completed||(f.removeAllListeners("data"),e.onComplete(k))}),!0;function q(){!d||y===0?lbe(m,f,null,t,e,t[kr],y,C):lt.isBuffer(d)?lbe(m,f,d,t,e,t[kr],y,C):lt.isBlobLike(d)?typeof d.stream=="function"?dbe(m,f,d.stream(),t,e,t[kr],y,C):WBt(m,f,d,t,e,t[kr],y,C):lt.isStream(d)?VBt(m,t[kr],C,f,d,t,e,y):lt.isIterable(d)?dbe(m,f,d,t,e,t[kr],y,C):da(!1)}}function lbe(t,e,r,n,s,i,o,a){try{r!=null&<.isBuffer(r)&&(da(o===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),s.onBodySent(r)),a||(i[kk]=!0),s.onRequestSent(),n[SA]()}catch(c){t(c)}}function VBt(t,e,r,n,s,i,o,a){da(a!==0||i[jb]===0,"stream body cannot be pipelined");let c=fBt(s,n,u=>{u?(lt.destroy(c,u),t(u)):(lt.removeAllListeners(c),o.onRequestSent(),r||(e[kk]=!0),i[SA]())});lt.addListener(c,"data",A);function A(u){o.onBodySent(u)}}async function WBt(t,e,r,n,s,i,o,a){da(o===r.size,"blob body must have content length");try{if(o!=null&&o!==r.size)throw new sW;let c=Buffer.from(await r.arrayBuffer());e.cork(),e.write(c),e.uncork(),e.end(),s.onBodySent(c),s.onRequestSent(),a||(i[kk]=!0),n[SA]()}catch(c){t(c)}}async function dbe(t,e,r,n,s,i,o,a){da(o!==0||n[jb]===0,"iterator body cannot be pipelined");let c=null;function A(){if(c){let l=c;c=null,l()}}let u=()=>new Promise((l,d)=>{da(c===null),i[io]?d(i[io]):c=l});e.on("close",A).on("drain",A);try{for await(let l of r){if(i[io])throw i[io];let d=e.write(l);s.onBodySent(l),d||await u()}e.end(),s.onRequestSent(),a||(i[kk]=!0),n[SA]()}catch(l){t(l)}finally{e.off("close",A).off("drain",A)}}hbe.exports=xBt});var Jd=E((Syr,bbe)=>{"use strict";var ol=b("node:assert"),Cbe=b("node:net"),Kb=b("node:http"),Ig=et(),{ClientStats:JBt}=nV(),{channels:pE}=Md(),zBt=Mye(),jBt=fg(),{InvalidArgumentError:pr,InformationalError:KBt,ClientDestroyedError:$Bt}=Ke(),XBt=gg(),{kUrl:NA,kServerName:Wd,kClient:ZBt,kBusy:AW,kConnect:ebt,kResuming:yg,kRunning:eQ,kPending:tQ,kSize:$b,kQueue:Ac,kConnected:tbt,kConnecting:mE,kNeedDrain:Yd,kKeepAliveDefaultTimeout:gbe,kHostHeader:rbt,kPendingIdx:uc,kRunningIdx:al,kError:nbt,kPipelining:vk,kKeepAliveTimeoutValue:sbt,kMaxHeadersSize:ibt,kKeepAliveMaxTimeout:obt,kKeepAliveTimeoutThreshold:abt,kHeadersTimeout:cbt,kBodyTimeout:Abt,kStrictContentLength:ubt,kConnector:Xb,kMaxRequests:uW,kCounter:lbt,kClose:dbt,kDestroy:hbt,kDispatch:fbt,kLocalAddress:Zb,kMaxResponseSize:gbt,kOnError:pbt,kHTTPContext:nn,kMaxConcurrentStreams:mbt,kHTTP2InitialWindowSize:Ebt,kHTTP2ConnectionWindowSize:Cbt,kResume:Vd,kPingInterval:Ibt}=$t(),ybt=ibe(),Bbt=fbe(),qd=Symbol("kClosedResolve"),bbt=Kb&&Kb.maxHeaderSize&&Number.isInteger(Kb.maxHeaderSize)&&Kb.maxHeaderSize>0?()=>Kb.maxHeaderSize:()=>{throw new pr("http module not available or http.maxHeaderSize invalid")},pbe=()=>{};function Ibe(t){return t[vk]??t[nn]?.defaultPipelining??1}var lW=class extends jBt{constructor(e,{maxHeaderSize:r,headersTimeout:n,socketTimeout:s,requestTimeout:i,connectTimeout:o,bodyTimeout:a,idleTimeout:c,keepAlive:A,keepAliveTimeout:u,maxKeepAliveTimeout:l,keepAliveMaxTimeout:d,keepAliveTimeoutThreshold:h,socketPath:f,pipelining:p,tls:I,strictContentLength:m,maxCachedSessions:C,connect:y,maxRequestsPerClient:N,localAddress:M,maxResponseSize:q,autoSelectFamily:k,autoSelectFamilyAttemptTimeout:P,maxConcurrentStreams:D,allowH2:z,useH2c:ee,initialWindowSize:ne,connectionWindowSize:ce,pingInterval:ge}={}){if(A!==void 0)throw new pr("unsupported keepAlive, use pipelining=0 instead");if(s!==void 0)throw new pr("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(i!==void 0)throw new pr("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(c!==void 0)throw new pr("unsupported idleTimeout, use keepAliveTimeout instead");if(l!==void 0)throw new pr("uns
Line truncated
|
||||
`,this[Abt]=a??3e5,this[cbt]=n??3e5,this[ubt]=m??!0,this[uW]=N,this[qd]=null,this[gbt]=q>-1?q:-1,this[nn]=null,this[mbt]=D??100,this[Ebt]=ne??262144,this[Cbt]=ce??524288,this[Ibt]=ge??6e4,this[Ac]=[],this[al]=0,this[uc]=0,this[Vd]=De=>dW(this,De),this[pbt]=De=>ybe(this,De)}get pipelining(){return this[vk]}set pipelining(e){this[vk]=e,this[Vd](!0)}get stats(){return new JBt(this)}get[tQ](){return this[Ac].length-this[uc]}get[eQ](){return this[uc]-this[al]}get[$b](){return this[Ac].length-this[al]}get[tbt](){return!!this[nn]&&!this[mE]&&!this[nn].destroyed}get[AW](){return!!(this[nn]?.busy(null)||this[$b]>=(Ibe(this)||1)||this[tQ]>0)}[ebt](e){Bbe(this),this.once("connect",e)}[fbt](e,r){let n=new zBt(this[NA].origin,e,r);return this[Ac].push(n),this[yg]||(Ig.bodyLength(n.body)==null&&Ig.isIterable(n.body)?(this[yg]=1,queueMicrotask(()=>dW(this))):this[Vd](!0)),this[yg]&&this[Yd]!==2&&this[AW]&&(this[Yd]=2),this[Yd]<2}[dbt](){return new Promise(e=>{this[$b]?this[qd]=e:e(null)})}[hbt](e){return new Promise(r=>{let n=this[Ac].splice(this[uc]);for(let i=0;i<n.length;i++){let o=n[i];Ig.errorRequest(this,o,e)}let s=()=>{this[qd]&&(this[qd](),this[qd]=null),r(null)};this[nn]?(this[nn].destroy(e,s),this[nn]=null):queueMicrotask(s),this[Vd]()})}};function ybe(t,e){if(t[eQ]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){ol(t[uc]===t[al]);let r=t[Ac].splice(t[al]);for(let n=0;n<r.length;n++){let s=r[n];Ig.errorRequest(t,s,e)}ol(t[$b]===0)}}function Bbe(t){ol(!t[mE]),ol(!t[nn]);let{host:e,hostname:r,protocol:n,port:s}=t[NA];if(r[0]==="["){let i=r.indexOf("]");ol(i!==-1);let o=r.substring(1,i);ol(Cbe.isIPv6(o)),r=o}t[mE]=!0,pE.beforeConnect.hasSubscribers&&pE.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[nn]?.version,servername:t[Wd],localAddress:t[Zb]},connector:t[Xb]}),t[Xb]({host:e,hostname:r,protocol:n,port:s,servername:t[Wd],localAddress:t[Zb]},(i,o)=>{if(i){mbe(t,i,{host:e,hostname:r,protocol:n,port:s}),t[Vd]();return}if(t.destroyed){Ig.destroy(o.on("error",pbe),new $Bt),t[Vd]();return}ol(o);try{t[nn]=o.alpnProtocol==="h2"?Bbt(t,o):ybt(t,o)}catch(a){o.destroy().on("error",pbe),mbe(t,a,{host:e,hostname:r,protocol:n,port:s}),t[Vd]();return}t[mE]=!1,o[lbt]=0,o[uW]=t[uW],o[ZBt]=t,o[nbt]=null,pE.connected.hasSubscribers&&pE.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[nn]?.version,servername:t[Wd],localAddress:t[Zb]},connector:t[Xb],socket:o}),t.emit("connect",t[NA],[t]),t[Vd]()})}function mbe(t,e,{host:r,hostname:n,protocol:s,port:i}){if(!t.destroyed){if(t[mE]=!1,pE.connectError.hasSubscribers&&pE.connectError.publish({connectParams:{host:r,hostname:n,protocol:s,port:i,version:t[nn]?.version,servername:t[Wd],localAddress:t[Zb]},connector:t[Xb],error:e}),e.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(ol(t[eQ]===0);t[tQ]>0&&t[Ac][t[uc]].servername===t[Wd];){let o=t[Ac][t[uc]++];Ig.errorRequest(t,o,e)}else ybe(t,e);t.emit("connectionError",t[NA],[t],e)}}function Ebe(t){t[Yd]=0,t.emit("drain",t[NA],[t])}function dW(t,e){t[yg]!==2&&(t[yg]=2,Qbt(t,e),t[yg]=0,t[al]>256&&(t[Ac].splice(0,t[al]),t[uc]-=t[al],t[al]=0))}function Qbt(t,e){for(;;){if(t.destroyed){ol(t[tQ]===0);return}if(t[qd]&&!t[$b]){t[qd](),t[qd]=null;return}if(t[nn]&&t[nn].resume(),t[AW])t[Yd]=2;else if(t[Yd]===2){e?(t[Yd]=1,queueMicrotask(()=>Ebe(t))):Ebe(t);continue}if(t[tQ]===0||t[eQ]>=(Ibe(t)||1))return;let r=t[Ac][t[uc]];if(r===null)return;if(t[NA].protocol==="https:"&&t[Wd]!==r.servername){if(t[eQ]>0)return;t[Wd]=r.servername,t[nn]?.destroy(new KBt("servername changed"),()=>{t[nn]=null,dW(t)})}if(t[mE])return;if(!t[nn]){Bbe(t);return}if(t[nn].destroyed||t[nn].busy(r))return;!r.aborted&&t[nn].write(r)?t[uc]++:t[Ac].splice(t[uc],1)}}bbe.exports=lW});var hW=E((Tyr,Qbe)=>{"use strict";var _k=class{bottom=0;top=0;list=new Array(2048).fill(void 0);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)}};Qbe.exports=class{constructor(){this.head=this.tail=new _k}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new _k),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),r}}});var Fk=E((xyr,vbe)=>{"use strict";var{PoolStats:wbt}=nV(),Sbt=fg(),Nbt=hW(),{kConnected:fW,kSize:wbe,kRunning:Sbe,kPending:Nbe,kQueued:rQ,kBusy:Tbt,kFree:xbt,kUrl:Rbt,kClose:Dbt,kDestroy:kbt,kDispatch:vbt}=$t(),Yn=Symbol("clients"),qs=Symbol("needDrain"),nQ=Symbol("queue"),gW=Symbol("closed resolve"),pW=Symbol("onDrain"),Tbe=Symbol("onConnect"),xbe=Symbol("onDisconnect"),Rbe=Symbol("onConnectionError"),mW=Symbol("get dispatcher"),Dbe=Symbol("add client"),kbe=Symbol("remove client"),EW=class extends Sbt{[nQ]=new Nbt;[rQ]=0;[Yn]=[];[qs]=!1;[pW](e,r,n){let s=this[nQ],i=!1;for(;!i;){let o=s.shi
Line truncated
|
||||
`,"latin1"),r!==null&&s!==r){if(n[e7])throw new Ig;process.emitWarning(new Ig)}e[Wr].timeout&&e[Wr].timeoutType===pE&&e[Wr].timeout.refresh&&e[Wr].timeout.refresh(),n[Hd]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Gd]=!1,e&&(We(n[ms]<=1,"pipeline should only contain this request"),s(e))}};tbe.exports=ABt});var lbe=E((Yyr,ube)=>{"use strict";var ua=b("node:assert"),{pipeline:IBt}=b("node:stream"),ut=Ze(),{RequestContentLengthMismatchError:c7,RequestAbortedError:yBt,SocketError:Zb,InformationalError:qd,InvalidArgumentError:BBt}=Ke(),{kUrl:Xb,kReset:Lk,kClient:ro,kRunning:eQ,kPending:bBt,kQueue:Yd,kPendingIdx:u7,kRunningIdx:Ac,kError:no,kSocket:Dr,kStrictContentLength:QBt,kOnError:mE,kMaxConcurrentStreams:Fk,kPingInterval:nbe,kHTTP2Session:il,kHTTP2InitialWindowSize:wBt,kHTTP2ConnectionWindowSize:SBt,kResume:SA,kSize:NBt,kHTTPContext:l7,kClosed:A7,kBodyTimeout:TBt,kEnableConnectProtocol:Kb,kRemoteSettings:$b,kHTTP2Stream:_k,kHTTP2SessionState:d7}=Kt(),{channels:sbe}=Ud(),Aa=Symbol("open streams"),ibe,Mk;try{Mk=b("node:http2")}catch{Mk={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:xBt,HTTP2_HEADER_METHOD:obe,HTTP2_HEADER_PATH:abe,HTTP2_HEADER_SCHEME:i7,HTTP2_HEADER_CONTENT_LENGTH:RBt,HTTP2_HEADER_EXPECT:DBt,HTTP2_HEADER_STATUS:o7,HTTP2_HEADER_PROTOCOL:kBt,NGHTTP2_REFUSED_STREAM:vBt,NGHTTP2_CANCEL:_Bt}}=Mk;function a7(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}function FBt(t,e){t[Dr]=e;let r=t[wBt],n=t[SBt],s=Mk.connect(t[Xb],{createConnection:()=>e,peerMaxConcurrentStreams:t[Fk],settings:{enablePush:!1,...r!=null?{initialWindowSize:r}:null}});return t[Dr]=e,s[Aa]=0,s[ro]=t,s[Dr]=e,s[d7]={ping:{interval:t[nbe]===0?null:setInterval(PBt,t[nbe],s).unref()}},s[Kb]=!1,s[$b]=!1,n&&ut.addListener(s,"connect",LBt.bind(s,n)),ut.addListener(s,"error",OBt),ut.addListener(s,"frameError",HBt),ut.addListener(s,"end",GBt),ut.addListener(s,"goaway",qBt),ut.addListener(s,"close",YBt),ut.addListener(s,"remoteSettings",UBt),s.unref(),t[il]=s,e[il]=s,ut.addListener(e,"error",WBt),ut.addListener(e,"end",JBt),ut.addListener(e,"close",VBt),e[A7]=!1,e.on("close",zBt),{version:"h2",defaultPipelining:1/0,write(i){return KBt(t,i)},resume(){MBt(t)},destroy(i,o){e[A7]?queueMicrotask(o):e.destroy(i).on("close",o)},get destroyed(){return e.destroyed},busy(i){if(i!=null)if(t[eQ]>0){if(i.idempotent===!1||(i.upgrade==="websocket"||i.method==="CONNECT")&&s[$b]===!1||ut.bodyLength(i.body)!==0&&(ut.isStream(i.body)||ut.isAsyncIterable(i.body)||ut.isFormDataLike(i.body)))return!0}else return(i.upgrade==="websocket"||i.method==="CONNECT")&&s[$b]===!1;return!1}}}function MBt(t){let e=t[Dr];e?.destroyed===!1&&(t[NBt]===0||t[Fk]===0?(e.unref(),t[il].unref()):(e.ref(),t[il].ref()))}function LBt(t){try{typeof this.setLocalWindowSize=="function"&&this.setLocalWindowSize(t)}catch{}}function UBt(t){if(this[ro][Fk]=t.maxConcurrentStreams??this[ro][Fk],this[$b]===!0&&this[Kb]===!0&&t.enableConnectProtocol===!1){let e=new qd("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[Dr][no]=e,this[ro][mE](e);return}this[Kb]=t.enableConnectProtocol??this[Kb],this[$b]=!0,this[ro][SA]()}function PBt(t){let e=t[d7];if((t.closed||t.destroyed)&&e.ping.interval!=null){clearInterval(e.ping.interval),e.ping.interval=null;return}t.ping(r.bind(t));function r(n,s){let i=this[ro],o=this[ro];if(n!=null){let a=new qd(`HTTP/2: "PING" errored - type ${n.message}`);o[no]=a,i[mE](a)}else i.emit("ping",s)}}function OBt(t){ua(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Dr][no]=t,this[ro][mE](t)}function HBt(t,e,r){if(r===0){let n=new qd(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Dr][no]=n,this[ro][mE](n)}}function GBt(){let t=new Zb("other side closed",ut.getSocketInfo(this[Dr]));this.destroy(t),ut.destroy(this[Dr],t)}function qBt(t){let e=this[no]||new Zb(`HTTP/2: "GOAWAY" frame received with code ${t}`,ut.getSocketInfo(this[Dr])),r=this[ro];if(r[Dr]=null,r[l7]=null,this.close(),this[il]=null,ut.destroy(this[Dr],e),r[Ac]<r[Yd].length){let n=r[Yd][r[Ac]];r[Yd][r[Ac]++]=null,ut.errorRequest(r,n,e),r[u7]=r[Ac]}ua(r[eQ]===0),r.emit("disconnect",r[Xb],[r],e),r.emit("connectionError",r[Xb],[r],e),r[SA]()}function YBt(){let{[ro]:t,[d7]:e}=this,{[Dr]:r}=t,n=this[Dr][no]||this[no]||new Zb("closed",ut.getSocketInfo(r));if(t[Dr]=null,t[l7]=null,e.ping.interval!=null&&(clearInterval(e.ping.interval),e.ping.interval=null),t.destroyed){ua(t[bBt]===0);let s=t[Yd].splice(t[Ac]);for(let i=0;i<s.length;i++){let o=s[i];ut.errorRequest(t,o,n)}}}function VBt(){let t=this[no]||new Zb("closed",ut.getSocketInfo(this)),e=this[il][ro];e[Dr]=null,e[l7]=null,this[il]!==null&&this[il].destroy(t),e[u7]=e[Ac],ua(e[eQ]===0),e.emit("disconnect",e[Xb],[e],t),e[SA]()}function WBt(t){ua(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[no]=t,this[ro][mE](t)}function JBt(){ut.destroy(this,new Zb("other side closed",ut.getSocketInfo(this)))}func
Line truncated
|
||||
`;sbe.sendHeaders.publish({request:e,headers:k,socket:n[Dr]})}let N=s==="GET"||s==="HEAD"||d===null;c?(h[DBt]="100-continue",f=n.request(h,{endStream:N,signal:A}),f[_k]=!0,f.once("continue",Y)):(f=n.request(h,{endStream:N,signal:A}),f[_k]=!0,Y()),++n[Aa],f.setTimeout(r);let M=!1;return f.once("response",k=>{let{[o7]:O,...D}=k;if(e.onResponseStarted(),M=!0,e.aborted){f.removeAllListeners("data");return}e.onHeaders(Number(O),a7(D),f.resume.bind(f),"")===!1&&f.pause(),f.on("data",z=>{e.aborted||e.completed||e.onData(z)===!1&&f.pause()})}),f.once("end",()=>{f.removeAllListeners("data"),M?(!e.aborted&&!e.completed&&e.onComplete({}),t[Yd][t[Ac]++]=null,t[SA]()):(m(new qd("HTTP/2: stream half-closed (remote)")),t[Yd][t[Ac]++]=null,t[u7]=t[Ac],t[SA]())}),f.once("close",()=>{f.removeAllListeners("data"),n[Aa]-=1,n[Aa]===0&&n.unref()}),f.once("error",function(k){f.removeAllListeners("data"),m(k)}),f.once("frameError",(k,O)=>{f.removeAllListeners("data"),m(new qd(`HTTP/2: "frameError" received - type ${k}, code ${O}`))}),f.on("aborted",()=>{f.removeAllListeners("data")}),f.on("timeout",()=>{let k=new qd(`HTTP/2: "stream timeout after ${r}"`);f.removeAllListeners("data"),n[Aa]-=1,n[Aa]===0&&n.unref(),m(k)}),f.once("trailers",k=>{e.aborted||e.completed||(f.removeAllListeners("data"),e.onComplete(k))}),!0;function Y(){!d||y===0?cbe(m,f,null,t,e,t[Dr],y,C):ut.isBuffer(d)?cbe(m,f,d,t,e,t[Dr],y,C):ut.isBlobLike(d)?typeof d.stream=="function"?Abe(m,f,d.stream(),t,e,t[Dr],y,C):XBt(m,f,d,t,e,t[Dr],y,C):ut.isStream(d)?$Bt(m,t[Dr],C,f,d,t,e,y):ut.isIterable(d)?Abe(m,f,d,t,e,t[Dr],y,C):ua(!1)}}function cbe(t,e,r,n,s,i,o,a){try{r!=null&&ut.isBuffer(r)&&(ua(o===r.byteLength,"buffer body must have content length"),e.cork(),e.write(r),e.uncork(),e.end(),s.onBodySent(r)),a||(i[Lk]=!0),s.onRequestSent(),n[SA]()}catch(c){t(c)}}function $Bt(t,e,r,n,s,i,o,a){ua(a!==0||i[eQ]===0,"stream body cannot be pipelined");let c=IBt(s,n,u=>{u?(ut.destroy(c,u),t(u)):(ut.removeAllListeners(c),o.onRequestSent(),r||(e[Lk]=!0),i[SA]())});ut.addListener(c,"data",A);function A(u){o.onBodySent(u)}}async function XBt(t,e,r,n,s,i,o,a){ua(o===r.size,"blob body must have content length");try{if(o!=null&&o!==r.size)throw new c7;let c=Buffer.from(await r.arrayBuffer());e.cork(),e.write(c),e.uncork(),e.end(),s.onBodySent(c),s.onRequestSent(),a||(i[Lk]=!0),n[SA]()}catch(c){t(c)}}async function Abe(t,e,r,n,s,i,o,a){ua(o!==0||n[eQ]===0,"iterator body cannot be pipelined");let c=null;function A(){if(c){let l=c;c=null,l()}}let u=()=>new Promise((l,d)=>{ua(c===null),i[no]?d(i[no]):c=l});e.on("close",A).on("drain",A);try{for await(let l of r){if(i[no])throw i[no];let d=e.write(l);s.onBodySent(l),d||await u()}e.end(),s.onRequestSent(),a||(i[Lk]=!0),n[SA]()}catch(l){t(l)}finally{e.off("close",A).off("drain",A)}}ube.exports=FBt});var jd=E((Vyr,Ibe)=>{"use strict";var ol=b("node:assert"),pbe=b("node:net"),tQ=b("node:http"),yg=Ze(),{ClientStats:ZBt}=aV(),{channels:EE}=Ud(),ebt=vye(),tbt=gg(),{InvalidArgumentError:gr,InformationalError:rbt,ClientDestroyedError:nbt}=Ke(),sbt=pg(),{kUrl:NA,kServerName:zd,kClient:ibt,kBusy:h7,kConnect:obt,kResuming:Bg,kRunning:iQ,kPending:oQ,kSize:rQ,kQueue:uc,kConnected:abt,kConnecting:CE,kNeedDrain:Wd,kKeepAliveDefaultTimeout:dbe,kHostHeader:cbt,kPendingIdx:lc,kRunningIdx:al,kError:Abt,kPipelining:Uk,kKeepAliveTimeoutValue:ubt,kMaxHeadersSize:lbt,kKeepAliveMaxTimeout:dbt,kKeepAliveTimeoutThreshold:hbt,kHeadersTimeout:fbt,kBodyTimeout:gbt,kStrictContentLength:pbt,kConnector:nQ,kMaxRequests:f7,kCounter:mbt,kClose:Ebt,kDestroy:Cbt,kDispatch:Ibt,kLocalAddress:sQ,kMaxResponseSize:ybt,kOnError:Bbt,kHTTPContext:nn,kMaxConcurrentStreams:bbt,kHTTP2InitialWindowSize:Qbt,kHTTP2ConnectionWindowSize:wbt,kResume:Jd,kPingInterval:Sbt}=Kt(),Nbt=rbe(),Tbt=lbe(),Vd=Symbol("kClosedResolve"),xbt=tQ&&tQ.maxHeaderSize&&Number.isInteger(tQ.maxHeaderSize)&&tQ.maxHeaderSize>0?()=>tQ.maxHeaderSize:()=>{throw new gr("http module not available or http.maxHeaderSize invalid")},hbe=()=>{};function mbe(t){return t[Uk]??t[nn]?.defaultPipelining??1}var g7=class extends tbt{constructor(e,{maxHeaderSize:r,headersTimeout:n,socketTimeout:s,requestTimeout:i,connectTimeout:o,bodyTimeout:a,idleTimeout:c,keepAlive:A,keepAliveTimeout:u,maxKeepAliveTimeout:l,keepAliveMaxTimeout:d,keepAliveTimeoutThreshold:h,socketPath:f,pipelining:p,tls:I,strictContentLength:m,maxCachedSessions:C,connect:y,maxRequestsPerClient:N,localAddress:M,maxResponseSize:Y,autoSelectFamily:k,autoSelectFamilyAttemptTimeout:O,maxConcurrentStreams:D,allowH2:z,useH2c:ee,initialWindowSize:te,connectionWindowSize:ce,pingInterval:ge}={}){if(A!==void 0)throw new gr("unsupported keepAlive, use pipelining=0 instead");if(s!==void 0)throw new gr("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(i!==void 0)throw new gr("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(c!==void 0)throw new gr("unsupported idleTimeout, use keepAliveTimeout instead");if(l!==void 0)throw new gr("uns
Line truncated
|
||||
`,this[gbt]=a??3e5,this[fbt]=n??3e5,this[pbt]=m??!0,this[f7]=N,this[Vd]=null,this[ybt]=Y>-1?Y:-1,this[nn]=null,this[bbt]=D??100,this[Qbt]=te??262144,this[wbt]=ce??524288,this[Sbt]=ge??6e4,this[uc]=[],this[al]=0,this[lc]=0,this[Jd]=De=>p7(this,De),this[Bbt]=De=>Ebe(this,De)}get pipelining(){return this[Uk]}set pipelining(e){this[Uk]=e,this[Jd](!0)}get stats(){return new ZBt(this)}get[oQ](){return this[uc].length-this[lc]}get[iQ](){return this[lc]-this[al]}get[rQ](){return this[uc].length-this[al]}get[abt](){return!!this[nn]&&!this[CE]&&!this[nn].destroyed}get[h7](){return!!(this[nn]?.busy(null)||this[rQ]>=(mbe(this)||1)||this[oQ]>0)}[obt](e){Cbe(this),this.once("connect",e)}[Ibt](e,r){let n=new ebt(this[NA].origin,e,r);return this[uc].push(n),this[Bg]||(yg.bodyLength(n.body)==null&&yg.isIterable(n.body)?(this[Bg]=1,queueMicrotask(()=>p7(this))):this[Jd](!0)),this[Bg]&&this[Wd]!==2&&this[h7]&&(this[Wd]=2),this[Wd]<2}[Ebt](){return new Promise(e=>{this[rQ]?this[Vd]=e:e(null)})}[Cbt](e){return new Promise(r=>{let n=this[uc].splice(this[lc]);for(let i=0;i<n.length;i++){let o=n[i];yg.errorRequest(this,o,e)}let s=()=>{this[Vd]&&(this[Vd](),this[Vd]=null),r(null)};this[nn]?(this[nn].destroy(e,s),this[nn]=null):queueMicrotask(s),this[Jd]()})}};function Ebe(t,e){if(t[iQ]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){ol(t[lc]===t[al]);let r=t[uc].splice(t[al]);for(let n=0;n<r.length;n++){let s=r[n];yg.errorRequest(t,s,e)}ol(t[rQ]===0)}}function Cbe(t){ol(!t[CE]),ol(!t[nn]);let{host:e,hostname:r,protocol:n,port:s}=t[NA];if(r[0]==="["){let i=r.indexOf("]");ol(i!==-1);let o=r.substring(1,i);ol(pbe.isIPv6(o)),r=o}t[CE]=!0,EE.beforeConnect.hasSubscribers&&EE.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[nn]?.version,servername:t[zd],localAddress:t[sQ]},connector:t[nQ]}),t[nQ]({host:e,hostname:r,protocol:n,port:s,servername:t[zd],localAddress:t[sQ]},(i,o)=>{if(i){fbe(t,i,{host:e,hostname:r,protocol:n,port:s}),t[Jd]();return}if(t.destroyed){yg.destroy(o.on("error",hbe),new nbt),t[Jd]();return}ol(o);try{t[nn]=o.alpnProtocol==="h2"?Tbt(t,o):Nbt(t,o)}catch(a){o.destroy().on("error",hbe),fbe(t,a,{host:e,hostname:r,protocol:n,port:s}),t[Jd]();return}t[CE]=!1,o[mbt]=0,o[f7]=t[f7],o[ibt]=t,o[Abt]=null,EE.connected.hasSubscribers&&EE.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[nn]?.version,servername:t[zd],localAddress:t[sQ]},connector:t[nQ],socket:o}),t.emit("connect",t[NA],[t]),t[Jd]()})}function fbe(t,e,{host:r,hostname:n,protocol:s,port:i}){if(!t.destroyed){if(t[CE]=!1,EE.connectError.hasSubscribers&&EE.connectError.publish({connectParams:{host:r,hostname:n,protocol:s,port:i,version:t[nn]?.version,servername:t[zd],localAddress:t[sQ]},connector:t[nQ],error:e}),e.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(ol(t[iQ]===0);t[oQ]>0&&t[uc][t[lc]].servername===t[zd];){let o=t[uc][t[lc]++];yg.errorRequest(t,o,e)}else Ebe(t,e);t.emit("connectionError",t[NA],[t],e)}}function gbe(t){t[Wd]=0,t.emit("drain",t[NA],[t])}function p7(t,e){t[Bg]!==2&&(t[Bg]=2,Rbt(t,e),t[Bg]=0,t[al]>256&&(t[uc].splice(0,t[al]),t[lc]-=t[al],t[al]=0))}function Rbt(t,e){for(;;){if(t.destroyed){ol(t[oQ]===0);return}if(t[Vd]&&!t[rQ]){t[Vd](),t[Vd]=null;return}if(t[nn]&&t[nn].resume(),t[h7])t[Wd]=2;else if(t[Wd]===2){e?(t[Wd]=1,queueMicrotask(()=>gbe(t))):gbe(t);continue}if(t[oQ]===0||t[iQ]>=(mbe(t)||1))return;let r=t[uc][t[lc]];if(r===null)return;if(t[NA].protocol==="https:"&&t[zd]!==r.servername){if(t[iQ]>0)return;t[zd]=r.servername,t[nn]?.destroy(new rbt("servername changed"),()=>{t[nn]=null,p7(t)})}if(t[CE])return;if(!t[nn]){Cbe(t);return}if(t[nn].destroyed||t[nn].busy(r))return;!r.aborted&&t[nn].write(r)?t[lc]++:t[uc].splice(t[lc],1)}}Ibe.exports=g7});var m7=E((Jyr,ybe)=>{"use strict";var Pk=class{bottom=0;top=0;list=new Array(2048).fill(void 0);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)}};ybe.exports=class{constructor(){this.head=this.tail=new Pk}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Pk),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),r}}});var Ok=E((zyr,Rbe)=>{"use strict";var{PoolStats:Dbt}=aV(),kbt=gg(),vbt=m7(),{kConnected:E7,kSize:Bbe,kRunning:bbe,kPending:Qbe,kQueued:aQ,kBusy:_bt,kFree:Fbt,kUrl:Mbt,kClose:Lbt,kDestroy:Ubt,kDispatch:Pbt}=Kt(),Vn=Symbol("clients"),Ps=Symbol("needDrain"),cQ=Symbol("queue"),C7=Symbol("closed resolve"),I7=Symbol("onDrain"),wbe=Symbol("onConnect"),Sbe=Symbol("onDisconnect"),Nbe=Symbol("onConnectionError"),y7=Symbol("get dispatcher"),Tbe=Symbol("add client"),xbe=Symbol("remove client"),B7=class extends kbt{[cQ]=new vbt;[aQ]=0;[Vn]=[];[Ps]=!1;[I7](e,r,n){let s=this[cQ],i=!1;for(;!i;){let o=s.shi
Line truncated
|
||||
|
||||
${e.format(r)}`.trim():`${r.length} interceptors are pending:
|
||||
|
||||
${e.format(r)}`.trim())}};t1e.exports=v7});var F7=E((oBr,i1e)=>{"use strict";var{InvalidArgumentError:R1t}=Ke(),{runtimeFeatures:D1t}=nl();function k1t(t={}){let{ignoreHeaders:e=[],excludeHeaders:r=[],matchHeaders:n=[],caseSensitive:s=!1}=t;return{ignore:new Set(e.map(i=>s?i:i.toLowerCase())),exclude:new Set(r.map(i=>s?i:i.toLowerCase())),match:new Set(n.map(i=>s?i:i.toLowerCase()))}}var r1e=D1t.has("crypto")?b("node:crypto"):null,v1t=r1e?.hash?t=>r1e.hash("sha256",t,"base64url"):t=>Buffer.from(t).toString("base64url");function s1e(t){return Array.isArray(t)&&(t.length&1)===0}function _1t(t=[]){return t.length===0?()=>!1:function(r){let n;for(let s of t)if(typeof s=="string"){if(n||(n=r.toLowerCase()),n.includes(s.toLowerCase()))return!0}else if(s instanceof RegExp&&s.test(r))return!0;return!1}}function F1t(t){let e={};if(!t)return e;if(s1e(t)){for(let r=0;r<t.length;r+=2){let n=t[r],s=t[r+1];if(n&&s!==void 0){let i=Buffer.isBuffer(n)?n.toString():n,o=Buffer.isBuffer(s)?s.toString():s;e[i.toLowerCase()]=o}}return e}if(t&&typeof t=="object")for(let[r,n]of Object.entries(t))r&&typeof r=="string"&&(e[r.toLowerCase()]=Array.isArray(n)?n.join(", "):String(n));return e}var n1e=["record","playback","update"];function M1t(t){if(!n1e.includes(t))throw new R1t(`Invalid snapshot mode: ${t}. Must be one of: ${n1e.join(", ")}`)}i1e.exports={createHeaderFilters:k1t,hashId:v1t,isUndiciHeaders:s1e,normalizeHeaders:F1t,isUrlExcludedFactory:_1t,validateSnapshotMode:M1t}});var f1e=E((aBr,h1e)=>{"use strict";var{writeFile:L1t,readFile:U1t,mkdir:P1t}=b("node:fs/promises"),{dirname:O1t,resolve:o1e}=b("node:path"),{setTimeout:H1t,clearTimeout:a1e}=b("node:timers"),{InvalidArgumentError:c1e,UndiciError:G1t}=Ke(),{hashId:q1t,isUrlExcludedFactory:Y1t,normalizeHeaders:A1e,createHeaderFilters:u1e}=F7();function mQ(t,e,r={}){let n=new URL(t.path,t.origin),s=t._normalizedHeaders||A1e(t.headers);return t._normalizedHeaders||(t._normalizedHeaders=s),{method:t.method||"GET",url:r.matchQuery!==!1?n.toString():`${n.origin}${n.pathname}`,headers:l1e(s,e,r),body:r.matchBody!==!1&&t.body?String(t.body):""}}function l1e(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,s={},{ignore:i,exclude:o,match:a}=e;for(let[c,A]of Object.entries(t)){let u=n?c:c.toLowerCase();o.has(u)||i.has(u)||a.size!==0&&!a.has(u)||(s[u]=A)}return s}function d1e(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,s={},{exclude:i}=e;for(let[o,a]of Object.entries(t)){let c=n?o:o.toLowerCase();i.has(c)||(s[c]=a)}return s}function EQ(t){let e=[t.method,t.url];if(t.headers&&typeof t.headers=="object"){let n=Object.keys(t.headers).sort();for(let s of n){let i=Array.isArray(t.headers[s])?t.headers[s]:[t.headers[s]];e.push(s);for(let o of i.sort())e.push(String(o))}}e.push(t.body);let r=e.join("|");return q1t(r)}var M7=class{#e;#t;#n=new Map;#r;#s=1/0;#i=!1;#a;constructor(e={}){this.#r=e.snapshotPath,this.#s=e.maxSnapshots||1/0,this.#i=e.autoFlush||!1,this.flushInterval=e.flushInterval||3e4,this._flushTimer=null,this.matchOptions={matchHeaders:e.matchHeaders||[],ignoreHeaders:e.ignoreHeaders||[],excludeHeaders:e.excludeHeaders||[],matchBody:e.matchBody!==!1,matchQuery:e.matchQuery!==!1,caseSensitive:e.caseSensitive||!1},this.#a=u1e(this.matchOptions),this.shouldRecord=e.shouldRecord||(()=>!0),this.shouldPlayback=e.shouldPlayback||(()=>!0),this.#t=Y1t(e.excludeUrls),this.#i&&this.#r&&this.#o()}async record(e,r){if(!this.shouldRecord(e)||this.isUrlExcluded(e))return;let n=mQ(e,this.#a,this.matchOptions),s=EQ(n),i=A1e(r.headers),o={statusCode:r.statusCode,headers:d1e(i,this.#a,this.matchOptions),body:Buffer.isBuffer(r.body)?r.body.toString("base64"):Buffer.from(String(r.body||"")).toString("base64"),trailers:r.trailers};if(this.#n.size>=this.#s&&!this.#n.has(s)){let c=this.#n.keys().next().value;this.#n.delete(c)}let a=this.#n.get(s);a&&a.responses?(a.responses.push(o),a.timestamp=new Date().toISOString()):this.#n.set(s,{request:n,responses:[o],callCount:0,timestamp:new Date().toISOString()}),this.#i&&this.#r&&this.#A()}isUrlExcluded(e){let r=new URL(e.path,e.origin).toString();return this.#t(r)}findSnapshot(e){if(!this.shouldPlayback(e)||this.isUrlExcluded(e))return;let r=mQ(e,this.#a,this.matchOptions),n=EQ(r),s=this.#n.get(n);if(!s)return;let i=s.callCount||0,o=Math.min(i,s.responses.length-1);return s.callCount=i+1,{...s,response:s.responses[o]}}async loadSnapshots(e){let r=e||this.#r;if(!r)throw new c1e("Snapshot path is required");try{let n=await U1t(o1e(r),"utf8"),s=JSON.parse(n);if(Array.isArray(s)){this.#n.clear();for(let{hash:i,snapshot:o}of s)this.#n.set(i,o)}else this.#n=new Map(Object.entries(s))}catch(n){if(n.code==="ENOENT")this.#n.clear();else throw new G1t(`Failed to load snapshots from ${r}`,{cause:n})}}async saveSnapshots(e){let r=e||this.#r;if(!r)throw new c1e("Snapshot path is required");let n=o1e(r);await P1t(O1t(n),{recursive:!0});let s=Array.from(this.#n.entries()).map(([i,o])=>({hash:i,snapshot:o}));await L1t(n,JSON.s
Line truncated
|
||||
${e.format(r)}`.trim())}};Xwe.exports=LW});var PW=E((wBr,r1e)=>{"use strict";var{InvalidArgumentError:M1t}=Ke(),{runtimeFeatures:L1t}=nl();function U1t(t={}){let{ignoreHeaders:e=[],excludeHeaders:r=[],matchHeaders:n=[],caseSensitive:s=!1}=t;return{ignore:new Set(e.map(i=>s?i:i.toLowerCase())),exclude:new Set(r.map(i=>s?i:i.toLowerCase())),match:new Set(n.map(i=>s?i:i.toLowerCase()))}}var Zwe=L1t.has("crypto")?b("node:crypto"):null,P1t=Zwe?.hash?t=>Zwe.hash("sha256",t,"base64url"):t=>Buffer.from(t).toString("base64url");function t1e(t){return Array.isArray(t)&&(t.length&1)===0}function O1t(t=[]){return t.length===0?()=>!1:function(r){let n;for(let s of t)if(typeof s=="string"){if(n||(n=r.toLowerCase()),n.includes(s.toLowerCase()))return!0}else if(s instanceof RegExp&&s.test(r))return!0;return!1}}function H1t(t){let e={};if(!t)return e;if(t1e(t)){for(let r=0;r<t.length;r+=2){let n=t[r],s=t[r+1];if(n&&s!==void 0){let i=Buffer.isBuffer(n)?n.toString():n,o=Buffer.isBuffer(s)?s.toString():s;e[i.toLowerCase()]=o}}return e}if(t&&typeof t=="object")for(let[r,n]of Object.entries(t))r&&typeof r=="string"&&(e[r.toLowerCase()]=Array.isArray(n)?n.join(", "):String(n));return e}var e1e=["record","playback","update"];function G1t(t){if(!e1e.includes(t))throw new M1t(`Invalid snapshot mode: ${t}. Must be one of: ${e1e.join(", ")}`)}r1e.exports={createHeaderFilters:U1t,hashId:P1t,isUndiciHeaders:t1e,normalizeHeaders:H1t,isUrlExcludedFactory:O1t,validateSnapshotMode:G1t}});var l1e=E((SBr,u1e)=>{"use strict";var{writeFile:q1t,readFile:Y1t,mkdir:V1t}=b("node:fs/promises"),{dirname:W1t,resolve:n1e}=b("node:path"),{setTimeout:J1t,clearTimeout:s1e}=b("node:timers"),{InvalidArgumentError:i1e,UndiciError:z1t}=Ke(),{hashId:j1t,isUrlExcludedFactory:K1t,normalizeHeaders:o1e,createHeaderFilters:a1e}=PW();function BQ(t,e,r={}){let n=new URL(t.path,t.origin),s=t._normalizedHeaders||o1e(t.headers);return t._normalizedHeaders||(t._normalizedHeaders=s),{method:t.method||"GET",url:r.matchQuery!==!1?n.toString():`${n.origin}${n.pathname}`,headers:c1e(s,e,r),body:r.matchBody!==!1&&t.body?String(t.body):""}}function c1e(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,s={},{ignore:i,exclude:o,match:a}=e;for(let[c,A]of Object.entries(t)){let u=n?c:c.toLowerCase();o.has(u)||i.has(u)||a.size!==0&&!a.has(u)||(s[u]=A)}return s}function A1e(t,e,r={}){if(!t||typeof t!="object")return{};let{caseSensitive:n=!1}=r,s={},{exclude:i}=e;for(let[o,a]of Object.entries(t)){let c=n?o:o.toLowerCase();i.has(c)||(s[c]=a)}return s}function bQ(t){let e=[t.method,t.url];if(t.headers&&typeof t.headers=="object"){let n=Object.keys(t.headers).sort();for(let s of n){let i=Array.isArray(t.headers[s])?t.headers[s]:[t.headers[s]];e.push(s);for(let o of i.sort())e.push(String(o))}}e.push(t.body);let r=e.join("|");return j1t(r)}var OW=class{#e;#t;#n=new Map;#r;#s=1/0;#i=!1;#a;constructor(e={}){this.#r=e.snapshotPath,this.#s=e.maxSnapshots||1/0,this.#i=e.autoFlush||!1,this.flushInterval=e.flushInterval||3e4,this._flushTimer=null,this.matchOptions={matchHeaders:e.matchHeaders||[],ignoreHeaders:e.ignoreHeaders||[],excludeHeaders:e.excludeHeaders||[],matchBody:e.matchBody!==!1,matchQuery:e.matchQuery!==!1,caseSensitive:e.caseSensitive||!1},this.#a=a1e(this.matchOptions),this.shouldRecord=e.shouldRecord||(()=>!0),this.shouldPlayback=e.shouldPlayback||(()=>!0),this.#t=K1t(e.excludeUrls),this.#i&&this.#r&&this.#o()}async record(e,r){if(!this.shouldRecord(e)||this.isUrlExcluded(e))return;let n=BQ(e,this.#a,this.matchOptions),s=bQ(n),i=o1e(r.headers),o={statusCode:r.statusCode,headers:A1e(i,this.#a,this.matchOptions),body:Buffer.isBuffer(r.body)?r.body.toString("base64"):Buffer.from(String(r.body||"")).toString("base64"),trailers:r.trailers};if(this.#n.size>=this.#s&&!this.#n.has(s)){let c=this.#n.keys().next().value;this.#n.delete(c)}let a=this.#n.get(s);a&&a.responses?(a.responses.push(o),a.timestamp=new Date().toISOString()):this.#n.set(s,{request:n,responses:[o],callCount:0,timestamp:new Date().toISOString()}),this.#i&&this.#r&&this.#A()}isUrlExcluded(e){let r=new URL(e.path,e.origin).toString();return this.#t(r)}findSnapshot(e){if(!this.shouldPlayback(e)||this.isUrlExcluded(e))return;let r=BQ(e,this.#a,this.matchOptions),n=bQ(r),s=this.#n.get(n);if(!s)return;let i=s.callCount||0,o=Math.min(i,s.responses.length-1);return s.callCount=i+1,{...s,response:s.responses[o]}}async loadSnapshots(e){let r=e||this.#r;if(!r)throw new i1e("Snapshot path is required");try{let n=await Y1t(n1e(r),"utf8"),s=JSON.parse(n);if(Array.isArray(s)){this.#n.clear();for(let{hash:i,snapshot:o}of s)this.#n.set(i,o)}else this.#n=new Map(Object.entries(s))}catch(n){if(n.code==="ENOENT")this.#n.clear();else throw new z1t(`Failed to load snapshots from ${r}`,{cause:n})}}async saveSnapshots(e){let r=e||this.#r;if(!r)throw new i1e("Snapshot path is required");let n=n1e(r);await V1t(W1t(n),{recursive:!0});let s=Array.from(this.#n.entries()).map(([i,o])=>({hash:i,snapshot:o}));await q1t(n,JSON.s
Line truncated
|
||||
PRAGMA journal_mode = WAL;
|
||||
PRAGMA synchronous = NORMAL;
|
||||
PRAGMA temp_store = memory;
|
||||
PRAGMA optimize;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS cacheInterceptorV${co} (
|
||||
CREATE TABLE IF NOT EXISTS cacheInterceptorV${oo} (
|
||||
-- Data specific to us
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
url TEXT NOT NULL,
|
||||
@@ -133,8 +133,8 @@ ${e.format(r)}`.trim())}};t1e.exports=v7});var F7=E((oBr,i1e)=>{"use strict";var
|
||||
staleAt INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${co}_getValuesQuery ON cacheInterceptorV${co}(url, method, deleteAt);
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${co}_deleteByUrlQuery ON cacheInterceptorV${co}(deleteAt);
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${oo}_getValuesQuery ON cacheInterceptorV${oo}(url, method, deleteAt);
|
||||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${oo}_deleteByUrlQuery ON cacheInterceptorV${oo}(deleteAt);
|
||||
`),this.#r=this.#n.prepare(`
|
||||
SELECT
|
||||
id,
|
||||
@@ -148,14 +148,14 @@ ${e.format(r)}`.trim())}};t1e.exports=v7});var F7=E((oBr,i1e)=>{"use strict";var
|
||||
vary,
|
||||
cachedAt,
|
||||
staleAt
|
||||
FROM cacheInterceptorV${co}
|
||||
FROM cacheInterceptorV${oo}
|
||||
WHERE
|
||||
url = ?
|
||||
AND method = ?
|
||||
ORDER BY
|
||||
deleteAt ASC
|
||||
`),this.#s=this.#n.prepare(`
|
||||
UPDATE cacheInterceptorV${co} SET
|
||||
UPDATE cacheInterceptorV${oo} SET
|
||||
body = ?,
|
||||
deleteAt = ?,
|
||||
statusCode = ?,
|
||||
@@ -168,7 +168,7 @@ ${e.format(r)}`.trim())}};t1e.exports=v7});var F7=E((oBr,i1e)=>{"use strict";var
|
||||
WHERE
|
||||
id = ?
|
||||
`),this.#i=this.#n.prepare(`
|
||||
INSERT INTO cacheInterceptorV${co} (
|
||||
INSERT INTO cacheInterceptorV${oo} (
|
||||
url,
|
||||
method,
|
||||
body,
|
||||
@@ -182,105 +182,105 @@ ${e.format(r)}`.trim())}};t1e.exports=v7});var F7=E((oBr,i1e)=>{"use strict";var
|
||||
cachedAt,
|
||||
staleAt
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
`),this.#o=this.#n.prepare(`DELETE FROM cacheInterceptorV${co} WHERE url = ?`),this.#c=this.#n.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${co}`),this.#a=this.#n.prepare(`DELETE FROM cacheInterceptorV${co} WHERE deleteAt <= ?`),this.#A=this.#t===1/0?null:this.#n.prepare(`
|
||||
DELETE FROM cacheInterceptorV${co}
|
||||
`),this.#o=this.#n.prepare(`DELETE FROM cacheInterceptorV${oo} WHERE url = ?`),this.#c=this.#n.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${oo}`),this.#a=this.#n.prepare(`DELETE FROM cacheInterceptorV${oo} WHERE deleteAt <= ?`),this.#A=this.#t===1/0?null:this.#n.prepare(`
|
||||
DELETE FROM cacheInterceptorV${oo}
|
||||
WHERE id IN (
|
||||
SELECT
|
||||
id
|
||||
FROM cacheInterceptorV${co}
|
||||
FROM cacheInterceptorV${oo}
|
||||
ORDER BY cachedAt DESC
|
||||
LIMIT ?
|
||||
)
|
||||
`)}close(){this.#n.close()}get(e){sJ(e);let r=this.#h(e);return r?{body:r.body?Buffer.from(r.body.buffer,r.body.byteOffset,r.body.byteLength):void 0,statusCode:r.statusCode,statusMessage:r.statusMessage,headers:r.headers?JSON.parse(r.headers):void 0,etag:r.etag?r.etag:void 0,vary:r.vary?JSON.parse(r.vary):void 0,cacheControlDirectives:r.cacheControlDirectives?JSON.parse(r.cacheControlDirectives):void 0,cachedAt:r.cachedAt,staleAt:r.staleAt,deleteAt:r.deleteAt}:void 0}set(e,r){sJ(e);let n=this.#d(e),s=Array.isArray(r.body)?Buffer.concat(r.body):r.body,i=s?.byteLength;if(i&&i>this.#e)return;let o=this.#h(e,!0);o?this.#s.run(s,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.cachedAt,r.staleAt,o.id):(this.#u(),this.#i.run(n,e.method,s,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.vary?JSON.stringify(r.vary):null,r.cachedAt,r.staleAt))}createWriteStream(e,r){sJ(e),RNt(r);let n=0,s=[],i=this;return new xNt({decodeStrings:!0,write(o,a,c){n+=o.byteLength,n<i.#e?s.push(o):this.destroy(),c()},final(o){i.set(e,{...r,body:s}),o()}})}delete(e){if(typeof e!="object")throw new TypeError(`expected key to be object, got ${typeof e}`);this.#o.run(this.#d(e))}#u(){if(Number.isFinite(this.#t)&&this.size<=this.#t)return 0;{let e=this.#a.run(Date.now()).changes;if(e)return e}{let e=this.#A?.run(Math.max(Math.floor(this.#t*.1),1)).changes;if(e)return e}return 0}get size(){let{total:e}=this.#c.get();return e}#d(e){return`${e.origin}/${e.path}`}#h(e,r=!1){let n=this.#d(e),{headers:s,method:i}=e,o=this.#r.all(n,i);if(o.length===0)return;let a=Date.now();for(let c of o){if(a>=c.deleteAt&&!r)return;let A=!0;if(c.vary){let u=JSON.parse(c.vary);for(let l in u)if(!DNt(s[l],u[l])){A=!1;break}}if(A)return c}}};function DNt(t,e){return t==null&&e==null?!0:t==null&&e!=null||t!=null&&e==null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:t.every((r,n)=>r===e[n]):t===e}});var Fg=E((xBr,ySe)=>{"use strict";var{kConstruct:kNt}=$t(),{kEnumerableProperty:kE}=et(),{iteratorMixin:vNt,isValidHeaderName:BQ,isValidHeaderValue:pSe}=no(),{webidl:wt}=Zn(),oJ=b("node:assert"),dv=b("node:util");function gSe(t){return t===10||t===13||t===9||t===32}function mSe(t){let e=0,r=t.length;for(;r>e&&gSe(t.charCodeAt(r-1));)--r;for(;r>e&&gSe(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}function ESe(t,e){if(Array.isArray(e))for(let r=0;r<e.length;++r){let n=e[r];if(n.length!==2)throw wt.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${n.length}.`});aJ(t,n[0],n[1])}else if(typeof e=="object"&&e!==null){let r=Object.keys(e);for(let n=0;n<r.length;++n)aJ(t,r[n],e[r[n]])}else throw wt.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}function aJ(t,e,r){if(r=mSe(r),BQ(e)){if(!pSe(r))throw wt.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw wt.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(ISe(t)==="immutable")throw new TypeError("immutable");return fv(t).append(e,r,!1)}function _Nt(t){let e=fv(t);if(!e)return[];if(e.sortedMap)return e.sortedMap;let r=[],n=e.toSortedArray(),s=e.cookies;if(s===null||s.length===1)return e.sortedMap=n;for(let i=0;i<n.length;++i){let{0:o,1:a}=n[i];if(o==="set-cookie")for(let c=0;c<s.length;++c)r.push([o,s[c]]);else r.push([o,a])}return e.sortedMap=r}function CSe(t,e){return t[0]<e[0]?-1:1}var hv=class t{cookies=null;sortedMap;headersMap;constructor(e){e instanceof t?(this.headersMap=new Map(e.headersMap),this.sortedMap=e.sortedMap,this.cookies=e.cookies===null?null:[...e.cookies]):(this.headersMap=new Map(e),this.sortedMap=null)}contains(e,r){return this.headersMap.has(r?e:e.toLowerCase())}clear(){this.headersMap.clear(),this.sortedMap=null,this.cookies=null}append(e,r,n){this.sortedMap=null;let s=n?e:e.toLowerCase(),i=this.headersMap.get(s);if(i){let o=s==="cookie"?"; ":", ";this.headersMap.set(s,{name:i.name,value:`${i.value}${o}${r}`})}else this.headersMap.set(s,{name:e,value:r});s==="set-cookie"&&(this.cookies??=[]).push(r)}set(e,r,n){this.sortedMap=null;let s=n?e:e.toLowerCase();s==="set-cookie"&&(this.cookies=[r]),this.headersMap.set(s,{name:e,value:r})}delete(e,r){this.sortedMap=null,r||(e=e.toLowerCase()),e==="set-cookie"&&(this.cookies=null),this.headersMap.delete(e)}get(e,r){return this.headersMap.get(r?e:e.toLowerCase())?.value??null}*[Symbol.iterator](){for(let{0:e,1:{value:r}}of this.headersMap)yield[e,r]}get entries(){let e={};if(this.headersMap.size!==0)for(let{name:r,value:n}of this.headersMap.values())e[r]=n;return e}rawValues(){return this.headersMap.values()}get entriesList(){let e=[];if(this.headersMap.size!
Line truncated
|
||||
${i}`;break;case"retry":TTe(i)&&(r[s]=i);break;case"id":xTe(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&TTe(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id!==void 0&&xTe(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}}};RTe.exports={EventSourceStream:YJ}});var PTe=E((ebr,UTe)=>{"use strict";var{pipeline:$Dt}=b("node:stream"),{fetching:XDt}=NQ(),{makeRequest:ZDt}=_E(),{webidl:Vs}=Zn(),{EventSourceStream:e2t}=DTe(),{parseMIMEType:t2t}=aa(),{createFastMessageEvent:r2t}=Pv(),{isNetworkError:kTe}=QQ(),{kEnumerableProperty:qg}=et(),{environmentSettingsObject:vTe}=no(),_Te=!1,FTe=3e3,_Q=0,MTe=1,FQ=2,n2t="anonymous",s2t="use-credentials",YE=class t extends EventTarget{#e={open:null,error:null,message:null};#t;#n=!1;#r=_Q;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),Vs.util.markAsUncloneable(this);let n="EventSource constructor";Vs.argumentLengthCheck(arguments,1,n),_Te||(_Te=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Vs.converters.USVString(e),r=Vs.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.node.dispatcher||r.dispatcher,this.#o={lastEventId:"",reconnectionTime:r.node.reconnectionTime};let s=vTe,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=i.href;let o=n2t;r.withCredentials===!0&&(o=s2t,this.#n=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=vTe.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#s=ZDt(a),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===FQ)return;this.#r=_Q;let e={request:this.#s,dispatcher:this.#a},r=n=>{if(!kTe(n))return this.#A()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(kTe(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#A();return}let s=n.headersList.get("content-type",!0),i=s!==null?t2t(s):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=MTe,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let a=new e2t({eventSourceSettings:this.#o,push:c=>{this.dispatchEvent(r2t(c.type,c.options))}});$Dt(n.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=XDt(e)}#A(){this.#r!==FQ&&(this.#r=_Q,this.dispatchEvent(new Event("error")),setTimeout(()=>{this.#r===_Q&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#c())},this.#o.reconnectionTime)?.unref())}close(){Vs.brandCheck(this,t),this.#r!==FQ&&(this.#r=FQ,this.#i.abort(),this.#s=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open);let r=Vs.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message);let r=Vs.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error);let r=Vs.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}},LTe={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:_Q,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:MTe,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:FQ,writable:!1}};Object.defineProperties(YE,LTe);Object.defineProperties(YE.prototype,LTe);Object.defineProperties(YE.prototype,{close:qg,onerror:qg,onmessage:qg,onopen:qg,readyState:qg,url:qg,withCredentials:qg});Vs.converters.EventSourceInitDict=Vs.dictionaryConverter([{key:"withCredentials",converter:Vs.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Vs.converters.any},{key:"node",converter:Vs.dictionaryConverter([{key:"reconnectionTime",converter:Vs.converters["unsigned long"],defaultValue:()=>FTe},{key:"dispatcher",converter:Vs.converters.any}]),defaultValue:()=>({})}]);UTe.exports={EventSource:YE,defaultReconnectionTime:FTe}});var VTe=E((tbr,pe)=>{"use strict";var i2t=Jd(),HTe=vb(),o2t=Bg(),a2t=Hbe(),c2t=Vbe(),A2t=wg(),u2t=UW(),l2t=_W(),d2t=TQe(),h2t=_Qe(),f2t=LQe(),GTe=Ke(),Xv=et(),{InvalidArgumentError:$v}=GTe,VE=Ewe(),g2t=gg(),p2t=B7(),{MockCallHistory:m2
Line truncated
|
||||
`)}close(){this.#n.close()}get(e){cJ(e);let r=this.#h(e);return r?{body:r.body?Buffer.from(r.body.buffer,r.body.byteOffset,r.body.byteLength):void 0,statusCode:r.statusCode,statusMessage:r.statusMessage,headers:r.headers?JSON.parse(r.headers):void 0,etag:r.etag?r.etag:void 0,vary:r.vary?JSON.parse(r.vary):void 0,cacheControlDirectives:r.cacheControlDirectives?JSON.parse(r.cacheControlDirectives):void 0,cachedAt:r.cachedAt,staleAt:r.staleAt,deleteAt:r.deleteAt}:void 0}set(e,r){cJ(e);let n=this.#d(e),s=Array.isArray(r.body)?Buffer.concat(r.body):r.body,i=s?.byteLength;if(i&&i>this.#e)return;let o=this.#h(e,!0);o?this.#s.run(s,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.cachedAt,r.staleAt,o.id):(this.#u(),this.#i.run(n,e.method,s,r.deleteAt,r.statusCode,r.statusMessage,r.headers?JSON.stringify(r.headers):null,r.etag?r.etag:null,r.cacheControlDirectives?JSON.stringify(r.cacheControlDirectives):null,r.vary?JSON.stringify(r.vary):null,r.cachedAt,r.staleAt))}createWriteStream(e,r){cJ(e),MNt(r);let n=0,s=[],i=this;return new FNt({decodeStrings:!0,write(o,a,c){n+=o.byteLength,n<i.#e?s.push(o):this.destroy(),c()},final(o){i.set(e,{...r,body:s}),o()}})}delete(e){if(typeof e!="object")throw new TypeError(`expected key to be object, got ${typeof e}`);this.#o.run(this.#d(e))}#u(){if(Number.isFinite(this.#t)&&this.size<=this.#t)return 0;{let e=this.#a.run(Date.now()).changes;if(e)return e}{let e=this.#A?.run(Math.max(Math.floor(this.#t*.1),1)).changes;if(e)return e}return 0}get size(){let{total:e}=this.#c.get();return e}#d(e){return`${e.origin}/${e.path}`}#h(e,r=!1){let n=this.#d(e),{headers:s,method:i}=e,o=this.#r.all(n,i);if(o.length===0)return;let a=Date.now();for(let c of o){if(a>=c.deleteAt&&!r)return;let A=!0;if(c.vary){let u=JSON.parse(c.vary);for(let l in u)if(!LNt(s[l],u[l])){A=!1;break}}if(A)return c}}};function LNt(t,e){return t==null&&e==null?!0:t==null&&e!=null||t!=null&&e==null?!1:Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:t.every((r,n)=>r===e[n]):t===e}});var Mg=E((zBr,ESe)=>{"use strict";var{kConstruct:UNt}=Kt(),{kEnumerableProperty:_E}=Ze(),{iteratorMixin:PNt,isValidHeaderName:NQ,isValidHeaderValue:hSe}=to(),{webidl:wt}=es(),uJ=b("node:assert"),mv=b("node:util");function dSe(t){return t===10||t===13||t===9||t===32}function fSe(t){let e=0,r=t.length;for(;r>e&&dSe(t.charCodeAt(r-1));)--r;for(;r>e&&dSe(t.charCodeAt(e));)++e;return e===0&&r===t.length?t:t.substring(e,r)}function gSe(t,e){if(Array.isArray(e))for(let r=0;r<e.length;++r){let n=e[r];if(n.length!==2)throw wt.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${n.length}.`});lJ(t,n[0],n[1])}else if(typeof e=="object"&&e!==null){let r=Object.keys(e);for(let n=0;n<r.length;++n)lJ(t,r[n],e[r[n]])}else throw wt.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}function lJ(t,e,r){if(r=fSe(r),NQ(e)){if(!hSe(r))throw wt.errors.invalidArgument({prefix:"Headers.append",value:r,type:"header value"})}else throw wt.errors.invalidArgument({prefix:"Headers.append",value:e,type:"header name"});if(mSe(t)==="immutable")throw new TypeError("immutable");return Cv(t).append(e,r,!1)}function ONt(t){let e=Cv(t);if(!e)return[];if(e.sortedMap)return e.sortedMap;let r=[],n=e.toSortedArray(),s=e.cookies;if(s===null||s.length===1)return e.sortedMap=n;for(let i=0;i<n.length;++i){let{0:o,1:a}=n[i];if(o==="set-cookie")for(let c=0;c<s.length;++c)r.push([o,s[c]]);else r.push([o,a])}return e.sortedMap=r}function pSe(t,e){return t[0]<e[0]?-1:1}var Ev=class t{cookies=null;sortedMap;headersMap;constructor(e){e instanceof t?(this.headersMap=new Map(e.headersMap),this.sortedMap=e.sortedMap,this.cookies=e.cookies===null?null:[...e.cookies]):(this.headersMap=new Map(e),this.sortedMap=null)}contains(e,r){return this.headersMap.has(r?e:e.toLowerCase())}clear(){this.headersMap.clear(),this.sortedMap=null,this.cookies=null}append(e,r,n){this.sortedMap=null;let s=n?e:e.toLowerCase(),i=this.headersMap.get(s);if(i){let o=s==="cookie"?"; ":", ";this.headersMap.set(s,{name:i.name,value:`${i.value}${o}${r}`})}else this.headersMap.set(s,{name:e,value:r});s==="set-cookie"&&(this.cookies??=[]).push(r)}set(e,r,n){this.sortedMap=null;let s=n?e:e.toLowerCase();s==="set-cookie"&&(this.cookies=[r]),this.headersMap.set(s,{name:e,value:r})}delete(e,r){this.sortedMap=null,r||(e=e.toLowerCase()),e==="set-cookie"&&(this.cookies=null),this.headersMap.delete(e)}get(e,r){return this.headersMap.get(r?e:e.toLowerCase())?.value??null}*[Symbol.iterator](){for(let{0:e,1:{value:r}}of this.headersMap)yield[e,r]}get entries(){let e={};if(this.headersMap.size!==0)for(let{name:r,value:n}of this.headersMap.values())e[r]=n;return e}rawValues(){return this.headersMap.values()}get entriesList(){let e=[];if(this.headersMap.size!
Line truncated
|
||||
${i}`;break;case"retry":wTe(i)&&(r[s]=i);break;case"id":STe(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&wTe(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id!==void 0&&STe(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}}};NTe.exports={EventSourceStream:zJ}});var MTe=E((Cbr,FTe)=>{"use strict";var{pipeline:n2t}=b("node:stream"),{fetching:s2t}=kQ(),{makeRequest:i2t}=ME(),{webidl:Hs}=es(),{EventSourceStream:o2t}=TTe(),{parseMIMEType:a2t}=ia(),{createFastMessageEvent:c2t}=Yv(),{isNetworkError:xTe}=xQ(),{kEnumerableProperty:Yg}=Ze(),{environmentSettingsObject:RTe}=to(),DTe=!1,kTe=3e3,PQ=0,vTe=1,OQ=2,A2t="anonymous",u2t="use-credentials",WE=class t extends EventTarget{#e={open:null,error:null,message:null};#t;#n=!1;#r=PQ;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),Hs.util.markAsUncloneable(this);let n="EventSource constructor";Hs.argumentLengthCheck(arguments,1,n),DTe||(DTe=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Hs.converters.USVString(e),r=Hs.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.node.dispatcher||r.dispatcher,this.#o={lastEventId:"",reconnectionTime:r.node.reconnectionTime};let s=RTe,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=i.href;let o=A2t;r.withCredentials===!0&&(o=u2t,this.#n=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=RTe.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#s=i2t(a),this.#c()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#c(){if(this.#r===OQ)return;this.#r=PQ;let e={request:this.#s,dispatcher:this.#a},r=n=>{if(!xTe(n))return this.#A()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(xTe(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#A();return}let s=n.headersList.get("content-type",!0),i=s!==null?a2t(s):"failure",o=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=vTe,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let a=new o2t({eventSourceSettings:this.#o,push:c=>{this.dispatchEvent(c2t(c.type,c.options))}});n2t(n.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=s2t(e)}#A(){this.#r!==OQ&&(this.#r=PQ,this.dispatchEvent(new Event("error")),setTimeout(()=>{this.#r===PQ&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#c())},this.#o.reconnectionTime)?.unref())}close(){Hs.brandCheck(this,t),this.#r!==OQ&&(this.#r=OQ,this.#i.abort(),this.#s=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open);let r=Hs.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("open",r),this.#e.open=e):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message);let r=Hs.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("message",r),this.#e.message=e):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error);let r=Hs.converters.EventHandlerNonNull(e);r!==null?(this.addEventListener("error",r),this.#e.error=e):this.#e.error=null}},_Te={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:PQ,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:vTe,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:OQ,writable:!1}};Object.defineProperties(WE,_Te);Object.defineProperties(WE.prototype,_Te);Object.defineProperties(WE.prototype,{close:Yg,onerror:Yg,onmessage:Yg,onopen:Yg,readyState:Yg,url:Yg,withCredentials:Yg});Hs.converters.EventSourceInitDict=Hs.dictionaryConverter([{key:"withCredentials",converter:Hs.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Hs.converters.any},{key:"node",converter:Hs.dictionaryConverter([{key:"reconnectionTime",converter:Hs.converters["unsigned long"],defaultValue:()=>kTe},{key:"dispatcher",converter:Hs.converters.any}]),defaultValue:()=>({})}]);FTe.exports={EventSource:WE,defaultReconnectionTime:kTe}});var GTe=E((Ibr,pe)=>{"use strict";var l2t=jd(),UTe=Ub(),d2t=bg(),h2t=Ube(),f2t=Gbe(),g2t=Sg(),p2t=G7(),m2t=U7(),E2t=wQe(),C2t=DQe(),I2t=_Qe(),PTe=Ke(),n_=Ze(),{InvalidArgumentError:r_}=PTe,JE=gwe(),y2t=pg(),B2t=SW(),{MockCallHistory:b2
Line truncated
|
||||
`).slice(1).join(`
|
||||
`);t.stack=r?`${r}
|
||||
${i}`:s.stack}pe.exports.fetch=function(e,r=void 0){return T2t(e,r).catch(n=>{throw OTe?YTe(n,OTe):n&&typeof n=="object"&&Error.captureStackTrace(n,pe.exports.fetch),n})};pe.exports.Headers=Fg().Headers;pe.exports.Response=QQ().Response;pe.exports.Request=_E().Request;pe.exports.FormData=yk().FormData;var{setGlobalOrigin:x2t,getGlobalOrigin:R2t}=bV();pe.exports.setGlobalOrigin=x2t;pe.exports.getGlobalOrigin=R2t;var{CacheStorage:D2t}=QNe(),{kConstruct:k2t}=$t();pe.exports.caches=new D2t(k2t);var{deleteCookie:v2t,getCookies:_2t,getSetCookies:F2t,setCookie:M2t,parseCookie:L2t}=LNe();pe.exports.deleteCookie=v2t;pe.exports.getCookies=_2t;pe.exports.getSetCookies=F2t;pe.exports.setCookie=M2t;pe.exports.parseCookie=L2t;var{parseMIMEType:U2t,serializeAMimeType:P2t}=aa();pe.exports.parseMIMEType=U2t;pe.exports.serializeAMimeType=P2t;var{CloseEvent:O2t,ErrorEvent:H2t,MessageEvent:G2t}=Pv(),{WebSocket:q2t,ping:Y2t}=mTe();pe.exports.WebSocket=q2t;pe.exports.CloseEvent=O2t;pe.exports.ErrorEvent=H2t;pe.exports.MessageEvent=G2t;pe.exports.ping=Y2t;pe.exports.WebSocketStream=wTe().WebSocketStream;pe.exports.WebSocketError=PJ().WebSocketError;pe.exports.request=MQ(VE.request);pe.exports.stream=MQ(VE.stream);pe.exports.pipeline=MQ(VE.pipeline);pe.exports.connect=MQ(VE.connect);pe.exports.upgrade=MQ(VE.upgrade);pe.exports.MockClient=p2t;pe.exports.MockCallHistory=m2t;pe.exports.MockCallHistoryLog=E2t;pe.exports.MockPool=I2t;pe.exports.MockAgent=C2t;pe.exports.SnapshotAgent=y2t;pe.exports.mockErrors=B2t;var{EventSource:V2t}=PTe();pe.exports.EventSource=V2t;function W2t(){globalThis.fetch=pe.exports.fetch,globalThis.Headers=pe.exports.Headers,globalThis.Response=pe.exports.Response,globalThis.Request=pe.exports.Request,globalThis.FormData=pe.exports.FormData,globalThis.WebSocket=pe.exports.WebSocket,globalThis.CloseEvent=pe.exports.CloseEvent,globalThis.ErrorEvent=pe.exports.ErrorEvent,globalThis.MessageEvent=pe.exports.MessageEvent,globalThis.EventSource=pe.exports.EventSource}pe.exports.install=W2t});var LQ=E(oh=>{"use strict";oh.removeLeadingAndTrailingHTTPWhitespace=t=>t.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");oh.removeTrailingHTTPWhitespace=t=>t.replace(/[ \t\n\r]+$/u,"");oh.isHTTPWhitespaceChar=t=>t===" "||t===" "||t===`
|
||||
`||t==="\r";oh.solelyContainsHTTPTokenCodePoints=t=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(t);oh.soleyContainsHTTPQuotedStringTokenCodePoints=t=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(t);oh.asciiLowercase=t=>t.replace(/[A-Z]/ug,e=>e.toLowerCase());oh.collectAnHTTPQuotedString=(t,e)=>{let r="";for(e++;;){for(;e<t.length&&t[e]!=='"'&&t[e]!=="\\";)r+=t[e],++e;if(e>=t.length)break;let n=t[e];if(++e,n==="\\"){if(e>=t.length){r+="\\";break}r+=t[e],++e}else break}return[r,e]}});var JTe=E((sbr,WTe)=>{"use strict";var{asciiLowercase:Zv,solelyContainsHTTPTokenCodePoints:J2t,soleyContainsHTTPQuotedStringTokenCodePoints:z2t}=LQ();WTe.exports=class{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=Zv(String(e)),this._map.get(e)}has(e){return e=Zv(String(e)),this._map.has(e)}set(e,r){if(e=Zv(String(e)),r=String(r),!J2t(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!z2t(r))throw new Error(`Invalid MIME type parameter value "${r}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,r)}clear(){this._map.clear()}delete(e){return e=Zv(String(e)),this._map.delete(e)}forEach(e,r){this._map.forEach(e,r)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}});var KTe=E((ibr,jTe)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:j2t,removeTrailingHTTPWhitespace:zTe,isHTTPWhitespaceChar:K2t,solelyContainsHTTPTokenCodePoints:VJ,soleyContainsHTTPQuotedStringTokenCodePoints:$2t,asciiLowercase:WJ,collectAnHTTPQuotedString:X2t}=LQ();jTe.exports=t=>{t=j2t(t);let e=0,r="";for(;e<t.length&&t[e]!=="/";)r+=t[e],++e;if(r.length===0||!VJ(r)||e>=t.length)return null;++e;let n="";for(;e<t.length&&t[e]!==";";)n+=t[e],++e;if(n=zTe(n),n.length===0||!VJ(n))return null;let s={type:WJ(r),subtype:WJ(n),parameters:new Map};for(;e<t.length;){for(++e;K2t(t[e]);)++e;let i="";for(;e<t.length&&t[e]!==";"&&t[e]!=="=";)i+=t[e],++e;if(i=WJ(i),e<t.length){if(t[e]===";")continue;++e}let o=null;if(t[e]==='"')for([o,e]=X2t(t,e);e<t.length&&t[e]!==";";)++e;else{for(o="";e<t.length&&t[e]!==";";)o+=t[e],++e;if(o=zTe(o),o==="")continue}i.length>0&&VJ(i)&&$2t(o)&&!s.parameters.has(i)&&s.parameters.set(i,o)}return s}});var XTe=E((obr,$Te)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:Z2t}=LQ();$Te.exports=t=>{let e=`${t.type}/${t.subtype}`;if(t.parameters.size===0)return e;for(let[r,n]of t.parameters)e+=";",e+=r,e+="=",(!Z2t(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var rxe=E((cbr,txe)=>{"use strict";var ekt=JTe(),tkt=KTe(),rkt=XTe(),{asciiLowercase:ZTe,solelyContainsHTTPTokenCodePoints:exe}=LQ();txe.exports=class{constructor(e){e=String(e);let r=tkt(e);if(r===null)throw new Error(`Could not parse MIME type string "${e}"`);this._type=r.type,this._subtype=r.subtype,this._parameters=new ekt(r.parameters)}static parse(e){try{return new this(e)}catch{return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(e=ZTe(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!exe(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(e=ZTe(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!exe(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return rkt(this)}isJavaScript({prohibitParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}default:return!1}}isXML(){return this._subtype==="xml"&&(this._type==="text"||this._type==="application")||this._subtype.endsWith("+xml")}isHTML(){return this._subtype==="html"&&this._type==="text"}}});var Ixe=E(bn=>{"use strict";var ZJ=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),wkt=ZJ(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sync=t.isexe=void 0;var e=b("node:fs"),r=b("node:fs/promises"),n=async(a,c={})=>{let{ignoreErrors:A=!1}=c;try{return i(await(0,r.stat)(a),c)}catch(u){let l=u;if(A||l.code==="EACCES")return!1;throw l}};t.isexe=n;var s=(a,c={})=>{let{ignoreErrors:A=!1}=c;try{return i((0,e.statSync)(a),c)}catch(u){let l=u;if(A||l.code==="EACCES")return!1;throw l}};t.sync=s;var i=(a,c)=>a.isFile()&&o(a,c),o=(a,c)=>{let A=c.uid??process.getuid?.(),u=c.groups??process.getgroups?.()Line truncated
|
||||
%s`,k,k,f,s);let P=f.type==="*"?zz:f.type==="?"?$z:"\\"+f.type;i=!0,s=s.slice(0,f.reStart)+P+"\\("+k}N(),o&&(s+="\\\\");let M=kvt[s.charAt(0)];for(let k=c.length-1;k>-1;k--){let P=c[k],D=s.slice(0,P.reStart),z=s.slice(P.reStart,P.reEnd-8),ee=s.slice(P.reEnd),ne=s.slice(P.reEnd-8,P.reEnd)+ee,ce=D.split(")").length,ge=D.split("(").length-ce,De=ee;for(let it=0;it<ge;it++)De=De.replace(/\)[+*?]?/,"");ee=De;let $e=ee===""&&r!==jz?"(?:$|\\/)":"";s=D+z+ee+$e+ne}if(s!==""&&i&&(s="(?=.)"+s),M&&(s=C()+s),r===jz)return[s,i];if(n.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return _vt(e);let q=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+s+"$",q),{_glob:e,_src:s})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?zz:r.dot?Rvt:Dvt,s=r.nocase?"i":"",i=e.map(o=>(o=o.map(a=>typeof a=="string"?Mvt(a):a===Ws?Ws:a._src).reduce((a,c)=>(a[a.length-1]===Ws&&c===Ws||a.push(c),a),[]),o.forEach((a,c)=>{a!==Ws||o[c-1]===Ws||(c===0?o.length>1?o[c+1]="(?:\\/|"+n+"\\/)?"+o[c+1]:o[c]=n:c===o.length-1?o[c-1]+="(?:\\/|"+n+")?":(o[c-1]+="(?:\\/|\\/"+n+"\\/)"+o[c+1],o[c+1]=Ws))}),o.filter(a=>a!==Ws).join("/"))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,s)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;Kz.sep!=="/"&&(e=e.split(Kz.sep).join("/")),e=e.split(qRe),this.debug(this.pattern,"split",e);let s=this.set;this.debug(this.pattern,"set",s);let i;for(let o=e.length-1;o>=0&&(i=e[o],!i);o--);for(let o=0;o<s.length;o++){let a=s[o],c=e;if(n.matchBase&&a.length===1&&(c=[i]),this.matchOne(c,a,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return go.defaults(e).Minimatch}};go.Minimatch=$E});var $Re=E((owr,KRe)=>{KRe.exports=jRe;var ej=b("fs"),{EventEmitter:Uvt}=b("events"),{Minimatch:Zz}=WRe(),{resolve:Pvt}=b("path");function Ovt(t,e){return new Promise((r,n)=>{ej.readdir(t,{withFileTypes:!0},(s,i)=>{if(s)switch(s.code){case"ENOTDIR":e?n(s):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:n(s);break}else r(i)})})}function JRe(t,e){return new Promise((r,n)=>{(e?ej.stat:ej.lstat)(t,(i,o)=>{i?i.code==="ENOENT"?r(e?JRe(t,!1):null):r(null):r(o)})})}async function*zRe(t,e,r,n,s,i){let o=await Ovt(e+t,i);for(let a of o){let c=a.name;c===void 0&&(c=a,n=!0);let A=t+"/"+c,u=A.slice(1),l=e+"/"+u,d=null;(n||r)&&(d=await JRe(l,r)),!d&&a.name!==void 0&&(d=a),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?s(u)||(yield{relative:u,absolute:l,stats:d},yield*zRe(A,e,r,n,s,!1)):yield{relative:u,absolute:l,stats:d}}}async function*Hvt(t,e,r,n){yield*zRe("",t,e,r,n,!0)}function Gvt(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var f_=class extends Uvt{constructor(e,r,n){if(super(),typeof r=="function"&&(n=r,r=null),this.options=Gvt(r||{}),this.matchers=[],this.options.pattern){let s=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=s.map(i=>new Zz(i,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let s=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=s.map(i=>new Zz(i,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let s=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=s.map(i=>new Zz(i,{dot:!0}))}this.iterator=Hvt(Pvt(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",s=>this._matches.push(this.options.absolute?s.absolute:s.relative)),this.on("error",s=>n(s)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let n=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(s=>s.match(n)))&&!this.ignoreMatchers.some(s=>s.match(n))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let n=e.value.relative,s=e.value.absolute;this.options.mark&&r&&(n+="/",s+="/"),this.options.stat?this.emit("match",{relative:n,absolute:s,stat:e.value.stats}):this.emit("match",{relative:n,absolute:s})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive
Line truncated
|
||||
`,w);w=G===-1?Q.length:G}else if(F!==-1&&Q[w]==="/"&&Q[w+1]==="*"){let G=Q.indexOf("*/",w);G!==-1?(w=G+2,F=Q.indexOf("*/",w)):(B+=Q[w],w++)}else B+=Q[w],w++;return B}function $C(Q){let B=KC(Q.toString()),w=B.match(BM);if(w||(w=B.match(bM)),!w)throw new Error(`could not parse args in autoInject
|
||||
${i}`:s.stack}pe.exports.fetch=function(e,r=void 0){return _2t(e,r).catch(n=>{throw LTe?HTe(n,LTe):n&&typeof n=="object"&&Error.captureStackTrace(n,pe.exports.fetch),n})};pe.exports.Headers=Mg().Headers;pe.exports.Response=xQ().Response;pe.exports.Request=ME().Request;pe.exports.FormData=Sk().FormData;var{setGlobalOrigin:F2t,getGlobalOrigin:M2t}=NV();pe.exports.setGlobalOrigin=F2t;pe.exports.getGlobalOrigin=M2t;var{CacheStorage:L2t}=yNe(),{kConstruct:U2t}=Kt();pe.exports.caches=new L2t(U2t);var{deleteCookie:P2t,getCookies:O2t,getSetCookies:H2t,setCookie:G2t,parseCookie:q2t}=_Ne();pe.exports.deleteCookie=P2t;pe.exports.getCookies=O2t;pe.exports.getSetCookies=H2t;pe.exports.setCookie=G2t;pe.exports.parseCookie=q2t;var{parseMIMEType:Y2t,serializeAMimeType:V2t}=ia();pe.exports.parseMIMEType=Y2t;pe.exports.serializeAMimeType=V2t;var{CloseEvent:W2t,ErrorEvent:J2t,MessageEvent:z2t}=Yv(),{WebSocket:j2t,ping:K2t}=fTe();pe.exports.WebSocket=j2t;pe.exports.CloseEvent=W2t;pe.exports.ErrorEvent=J2t;pe.exports.MessageEvent=z2t;pe.exports.ping=K2t;pe.exports.WebSocketStream=BTe().WebSocketStream;pe.exports.WebSocketError=qJ().WebSocketError;pe.exports.request=HQ(JE.request);pe.exports.stream=HQ(JE.stream);pe.exports.pipeline=HQ(JE.pipeline);pe.exports.connect=HQ(JE.connect);pe.exports.upgrade=HQ(JE.upgrade);pe.exports.MockClient=B2t;pe.exports.MockCallHistory=b2t;pe.exports.MockCallHistoryLog=Q2t;pe.exports.MockPool=S2t;pe.exports.MockAgent=w2t;pe.exports.SnapshotAgent=N2t;pe.exports.mockErrors=T2t;var{EventSource:$2t}=MTe();pe.exports.EventSource=$2t;function X2t(){globalThis.fetch=pe.exports.fetch,globalThis.Headers=pe.exports.Headers,globalThis.Response=pe.exports.Response,globalThis.Request=pe.exports.Request,globalThis.FormData=pe.exports.FormData,globalThis.WebSocket=pe.exports.WebSocket,globalThis.CloseEvent=pe.exports.CloseEvent,globalThis.ErrorEvent=pe.exports.ErrorEvent,globalThis.MessageEvent=pe.exports.MessageEvent,globalThis.EventSource=pe.exports.EventSource}pe.exports.install=X2t});var GQ=E(ch=>{"use strict";ch.removeLeadingAndTrailingHTTPWhitespace=t=>t.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");ch.removeTrailingHTTPWhitespace=t=>t.replace(/[ \t\n\r]+$/u,"");ch.isHTTPWhitespaceChar=t=>t===" "||t===" "||t===`
|
||||
`||t==="\r";ch.solelyContainsHTTPTokenCodePoints=t=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(t);ch.soleyContainsHTTPQuotedStringTokenCodePoints=t=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(t);ch.asciiLowercase=t=>t.replace(/[A-Z]/ug,e=>e.toLowerCase());ch.collectAnHTTPQuotedString=(t,e)=>{let r="";for(e++;;){for(;e<t.length&&t[e]!=='"'&&t[e]!=="\\";)r+=t[e],++e;if(e>=t.length)break;let n=t[e];if(++e,n==="\\"){if(e>=t.length){r+="\\";break}r+=t[e],++e}else break}return[r,e]}});var YTe=E((bbr,qTe)=>{"use strict";var{asciiLowercase:s_,solelyContainsHTTPTokenCodePoints:Z2t,soleyContainsHTTPQuotedStringTokenCodePoints:ekt}=GQ();qTe.exports=class{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=s_(String(e)),this._map.get(e)}has(e){return e=s_(String(e)),this._map.has(e)}set(e,r){if(e=s_(String(e)),r=String(r),!Z2t(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!ekt(r))throw new Error(`Invalid MIME type parameter value "${r}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,r)}clear(){this._map.clear()}delete(e){return e=s_(String(e)),this._map.delete(e)}forEach(e,r){this._map.forEach(e,r)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}});var JTe=E((Qbr,WTe)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:tkt,removeTrailingHTTPWhitespace:VTe,isHTTPWhitespaceChar:rkt,solelyContainsHTTPTokenCodePoints:jJ,soleyContainsHTTPQuotedStringTokenCodePoints:nkt,asciiLowercase:KJ,collectAnHTTPQuotedString:skt}=GQ();WTe.exports=t=>{t=tkt(t);let e=0,r="";for(;e<t.length&&t[e]!=="/";)r+=t[e],++e;if(r.length===0||!jJ(r)||e>=t.length)return null;++e;let n="";for(;e<t.length&&t[e]!==";";)n+=t[e],++e;if(n=VTe(n),n.length===0||!jJ(n))return null;let s={type:KJ(r),subtype:KJ(n),parameters:new Map};for(;e<t.length;){for(++e;rkt(t[e]);)++e;let i="";for(;e<t.length&&t[e]!==";"&&t[e]!=="=";)i+=t[e],++e;if(i=KJ(i),e<t.length){if(t[e]===";")continue;++e}let o=null;if(t[e]==='"')for([o,e]=skt(t,e);e<t.length&&t[e]!==";";)++e;else{for(o="";e<t.length&&t[e]!==";";)o+=t[e],++e;if(o=VTe(o),o==="")continue}i.length>0&&jJ(i)&&nkt(o)&&!s.parameters.has(i)&&s.parameters.set(i,o)}return s}});var jTe=E((wbr,zTe)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:ikt}=GQ();zTe.exports=t=>{let e=`${t.type}/${t.subtype}`;if(t.parameters.size===0)return e;for(let[r,n]of t.parameters)e+=";",e+=r,e+="=",(!ikt(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var ZTe=E((Nbr,XTe)=>{"use strict";var okt=YTe(),akt=JTe(),ckt=jTe(),{asciiLowercase:KTe,solelyContainsHTTPTokenCodePoints:$Te}=GQ();XTe.exports=class{constructor(e){e=String(e);let r=akt(e);if(r===null)throw new Error(`Could not parse MIME type string "${e}"`);this._type=r.type,this._subtype=r.subtype,this._parameters=new okt(r.parameters)}static parse(e){try{return new this(e)}catch{return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(e=KTe(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!$Te(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(e=KTe(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!$Te(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return ckt(this)}isJavaScript({prohibitParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}default:return!1}}isXML(){return this._subtype==="xml"&&(this._type==="text"||this._type==="application")||this._subtype.endsWith("+xml")}isHTML(){return this._subtype==="html"&&this._type==="text"}}});var mxe=E(Qn=>{"use strict";var nz=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Dkt=nz(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sync=t.isexe=void 0;var e=b("node:fs"),r=b("node:fs/promises"),n=async(a,c={})=>{let{ignoreErrors:A=!1}=c;try{return i(await(0,r.stat)(a),c)}catch(u){let l=u;if(A||l.code==="EACCES")return!1;throw l}};t.isexe=n;var s=(a,c={})=>{let{ignoreErrors:A=!1}=c;try{return i((0,e.statSync)(a),c)}catch(u){let l=u;if(A||l.code==="EACCES")return!1;throw l}};t.sync=s;var i=(a,c)=>a.isFile()&&o(a,c),o=(a,c)=>{let A=c.uid??process.getuid?.(),u=c.groups??process.getgroups?.()Line truncated
|
||||
%s`,k,k,f,s);let O=f.type==="*"?zz:f.type==="?"?$z:"\\"+f.type;i=!0,s=s.slice(0,f.reStart)+O+"\\("+k}N(),o&&(s+="\\\\");let M=_vt[s.charAt(0)];for(let k=c.length-1;k>-1;k--){let O=c[k],D=s.slice(0,O.reStart),z=s.slice(O.reStart,O.reEnd-8),ee=s.slice(O.reEnd),te=s.slice(O.reEnd-8,O.reEnd)+ee,ce=D.split(")").length,ge=D.split("(").length-ce,De=ee;for(let st=0;st<ge;st++)De=De.replace(/\)[+*?]?/,"");ee=De;let $e=ee===""&&r!==jz?"(?:$|\\/)":"";s=D+z+ee+$e+te}if(s!==""&&i&&(s="(?=.)"+s),M&&(s=C()+s),r===jz)return[s,i];if(n.nocase&&!i&&(i=e.toUpperCase()!==e.toLowerCase()),!i)return Mvt(e);let Y=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+s+"$",Y),{_glob:e,_src:s})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?zz:r.dot?kvt:vvt,s=r.nocase?"i":"",i=e.map(o=>(o=o.map(a=>typeof a=="string"?Uvt(a):a===Gs?Gs:a._src).reduce((a,c)=>(a[a.length-1]===Gs&&c===Gs||a.push(c),a),[]),o.forEach((a,c)=>{a!==Gs||o[c-1]===Gs||(c===0?o.length>1?o[c+1]="(?:\\/|"+n+"\\/)?"+o[c+1]:o[c]=n:c===o.length-1?o[c-1]+="(?:\\/|"+n+")?":(o[c-1]+="(?:\\/|\\/"+n+"\\/)"+o[c+1],o[c+1]=Gs))}),o.filter(a=>a!==Gs).join("/"))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,s)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;Kz.sep!=="/"&&(e=e.split(Kz.sep).join("/")),e=e.split(ORe),this.debug(this.pattern,"split",e);let s=this.set;this.debug(this.pattern,"set",s);let i;for(let o=e.length-1;o>=0&&(i=e[o],!i);o--);for(let o=0;o<s.length;o++){let a=s[o],c=e;if(n.matchBase&&a.length===1&&(c=[i]),this.matchOne(c,a,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return fo.defaults(e).Minimatch}};fo.Minimatch=eC});var zRe=E((wwr,JRe)=>{JRe.exports=WRe;var ej=b("fs"),{EventEmitter:Ovt}=b("events"),{Minimatch:Zz}=qRe(),{resolve:Hvt}=b("path");function Gvt(t,e){return new Promise((r,n)=>{ej.readdir(t,{withFileTypes:!0},(s,i)=>{if(s)switch(s.code){case"ENOTDIR":e?n(s):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:n(s);break}else r(i)})})}function YRe(t,e){return new Promise((r,n)=>{(e?ej.stat:ej.lstat)(t,(i,o)=>{i?i.code==="ENOENT"?r(e?YRe(t,!1):null):r(null):r(o)})})}async function*VRe(t,e,r,n,s,i){let o=await Gvt(e+t,i);for(let a of o){let c=a.name;c===void 0&&(c=a,n=!0);let A=t+"/"+c,u=A.slice(1),l=e+"/"+u,d=null;(n||r)&&(d=await YRe(l,r)),!d&&a.name!==void 0&&(d=a),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?s(u)||(yield{relative:u,absolute:l,stats:d},yield*VRe(A,e,r,n,s,!1)):yield{relative:u,absolute:l,stats:d}}}async function*qvt(t,e,r,n){yield*VRe("",t,e,r,n,!0)}function Yvt(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var E_=class extends Ovt{constructor(e,r,n){if(super(),typeof r=="function"&&(n=r,r=null),this.options=Yvt(r||{}),this.matchers=[],this.options.pattern){let s=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=s.map(i=>new Zz(i,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let s=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=s.map(i=>new Zz(i,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let s=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=s.map(i=>new Zz(i,{dot:!0}))}this.iterator=qvt(Hvt(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",s=>this._matches.push(this.options.absolute?s.absolute:s.relative)),this.on("error",s=>n(s)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let n=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(s=>s.match(n)))&&!this.ignoreMatchers.some(s=>s.match(n))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let n=e.value.relative,s=e.value.absolute;this.options.mark&&r&&(n+="/",s+="/"),this.options.stat?this.emit("match",{relative:n,absolute:s,stat:e.value.stats}):this.emit("match",{relative:n,absolute:s})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive
Line truncated
|
||||
`,w);w=G===-1?Q.length:G}else if(F!==-1&&Q[w]==="/"&&Q[w+1]==="*"){let G=Q.indexOf("*/",w);G!==-1?(w=G+2,F=Q.indexOf("*/",w)):(B+=Q[w],w++)}else B+=Q[w],w++;return B}function eI(Q){let B=ZC(Q.toString()),w=B.match(NM);if(w||(w=B.match(TM)),!w)throw new Error(`could not parse args in autoInject
|
||||
Source:
|
||||
`+B);let[,F]=w;return F.replace(/\s/g,"").split(c1).map(G=>G.replace(A1,"").trim())}function XC(Q,B){var w={};return Object.keys(Q).forEach(F=>{var G=Q[F],V,J=h(G),j=!J&&G.length===1||J&&G.length===0;if(Array.isArray(G))V=[...G],G=V.pop(),w[F]=V.concat(V.length>0?te:G);else if(j)w[F]=G;else{if(V=$C(G),G.length===0&&!J&&V.length===0)throw new Error("autoInject task functions require explicit parameters.");J||V.pop(),w[F]=V.concat(te)}function te(Se,Bt){var Ft=V.map(St=>Se[St]);Ft.push(Bt),I(G)(...Ft)}}),jC(w,B)}class ZC{constructor(){this.head=this.tail=null,this.length=0}removeLink(B){return B.prev?B.prev.next=B.next:this.head=B.next,B.next?B.next.prev=B.prev:this.tail=B.prev,B.prev=B.next=null,this.length-=1,B}empty(){for(;this.head;)this.shift();return this}insertAfter(B,w){w.prev=B,w.next=B.next,B.next?B.next.prev=w:this.tail=w,B.next=w,this.length+=1}insertBefore(B,w){w.prev=B.prev,w.next=B,B.prev?B.prev.next=w:this.head=w,B.prev=w,this.length+=1}unshift(B){this.head?this.insertBefore(this.head,B):eI(this,B)}push(B){this.tail?this.insertAfter(this.tail,B):eI(this,B)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var B=this.head;B;)yield B.data,B=B.next}remove(B){for(var w=this.head;w;){var{next:F}=w;B(w)&&this.removeLink(w),w=F}return this}}function eI(Q,B){Q.length=1,Q.head=Q.tail=B}function Tp(Q,B,w){if(B==null)B=1;else if(B===0)throw new RangeError("Concurrency must not be zero");var F=I(Q),G=0,V=[];let J={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function j(Ue,be){J[Ue].push(be)}function te(Ue,be){let Pe=(...Nt)=>{Se(Ue,Pe),be(...Nt)};J[Ue].push(Pe)}function Se(Ue,be){if(!Ue)return Object.keys(J).forEach(Pe=>J[Pe]=[]);if(!be)return J[Ue]=[];J[Ue]=J[Ue].filter(Pe=>Pe!==be)}function Bt(Ue,...be){J[Ue].forEach(Pe=>Pe(...be))}var Ft=!1;function St(Ue,be,Pe,Nt){if(Nt!=null&&typeof Nt!="function")throw new Error("task callback must be a function");Mt.started=!0;var yr,Tn;function Bo(Fh,...aI){if(Fh)return Pe?Tn(Fh):yr();if(aI.length<=1)return yr(aI[0]);yr(aI)}var kp=Mt._createTaskItem(Ue,Pe?Bo:Nt||Bo);if(be?Mt._tasks.unshift(kp):Mt._tasks.push(kp),Ft||(Ft=!0,A(()=>{Ft=!1,Mt.process()})),Pe||!Nt)return new Promise((Fh,aI)=>{yr=Fh,Tn=aI})}function yo(Ue){return function(be,...Pe){G-=1;for(var Nt=0,yr=Ue.length;Nt<yr;Nt++){var Tn=Ue[Nt],Bo=V.indexOf(Tn);Bo===0?V.shift():Bo>0&&V.splice(Bo,1),Tn.callback(be,...Pe),be!=null&&Bt("error",be,Tn.data)}G<=Mt.concurrency-Mt.buffer&&Bt("unsaturated"),Mt.idle()&&Bt("drain"),Mt.process()}}function Dp(Ue){return Ue.length===0&&Mt.idle()?(A(()=>Bt("drain")),!0):!1}let _h=Ue=>be=>{if(!be)return new Promise((Pe,Nt)=>{te(Ue,(yr,Tn)=>{if(yr)return Nt(yr);Pe(Tn)})});Se(Ue),j(Ue,be)};var oI=!1,Mt={_tasks:new ZC,_createTaskItem(Ue,be){return{data:Ue,callback:be}},*[Symbol.iterator](){yield*Mt._tasks[Symbol.iterator]()},concurrency:B,payload:w,buffer:B/4,started:!1,paused:!1,push(Ue,be){return Array.isArray(Ue)?Dp(Ue)?void 0:Ue.map(Pe=>St(Pe,!1,!1,be)):St(Ue,!1,!1,be)},pushAsync(Ue,be){return Array.isArray(Ue)?Dp(Ue)?void 0:Ue.map(Pe=>St(Pe,!1,!0,be)):St(Ue,!1,!0,be)},kill(){Se(),Mt._tasks.empty()},unshift(Ue,be){return Array.isArray(Ue)?Dp(Ue)?void 0:Ue.map(Pe=>St(Pe,!0,!1,be)):St(Ue,!0,!1,be)},unshiftAsync(Ue,be){return Array.isArray(Ue)?Dp(Ue)?void 0:Ue.map(Pe=>St(Pe,!0,!0,be)):St(Ue,!0,!0,be)},remove(Ue){Mt._tasks.remove(Ue)},process(){if(!oI){for(oI=!0;!Mt.paused&&G<Mt.concurrency&&Mt._tasks.length;){var Ue=[],be=[],Pe=Mt._tasks.length;Mt.payload&&(Pe=Math.min(Pe,Mt.payload));for(var Nt=0;Nt<Pe;Nt++){var yr=Mt._tasks.shift();Ue.push(yr),V.push(yr),be.push(yr.data)}G+=1,Mt._tasks.length===0&&Bt("empty"),G===Mt.concurrency&&Bt("saturated");var Tn=ne(yo(Ue));F(be,Tn)}oI=!1}},length(){return Mt._tasks.length},running(){return G},workersList(){return V},idle(){return Mt._tasks.length+G===0},pause(){Mt.paused=!0},resume(){Mt.paused!==!1&&(Mt.paused=!1,A(Mt.process))}};return Object.defineProperties(Mt,{saturated:{writable:!1,value:_h("saturated")},unsaturated:{writable:!1,value:_h("unsaturated")},empty:{writable:!1,value:_h("empty")},drain:{writable:!1,value:_h("drain")},error:{writable:!1,value:_h("error")}}),Mt}function tI(Q,B){return Tp(Q,1,B)}function xp(Q,B,w){return Tp(Q,B,w)}function Io(Q,B,w,F){F=q(F);var G=I(w);return Zs(Q,(V,J,j)=>{G(B,V,(te,Se)=>{B=Se,j(te)})},V=>F(V,B))}var Qa=m(Io,4);function Rp(...Q){var B=Q.map(I);return function(...w){var F=this,G=w[w.length-1];return typeof G=="function"?w.pop():G=ou(),Qa(B,w,(V,J,j)=>{J.apply(F,V.concat((te,...Se)=>{j(te,Se)}))},(V,J)=>G(V,...J)),G[iu]}}function u1(...Q){return Rp(...Q.reverse())}function we(Q,B,w,F){return y(ge(B),Q,w,F)}var H=m(we,4);function T(Q,B,w,F){var G=I(w);return H(Q,B,(V,J)=>{G(V,(j,...te)=>j?J(j):J(j,te))},(V,J)=>{for(var j=[],te=0;te<J.length;te++)J[te]&&(j=j.concat(...J[te]));return F(V,j)})}var Y=m(T,4);function K(Q,B,w){return Y(Q,1/0,B,w)}var X=m(K,3);function oe(Q,B,w){retur
Line truncated
|
||||
GFS4: `),console.error(t)});vr[ts]||(aDe=global[ts]||[],ADe(vr,aDe),vr.close=(function(t){function e(r,n){return t.call(vr,r,function(s){s||cDe(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,C_,{value:t}),e})(vr.close),vr.closeSync=(function(t){function e(r){t.apply(vr,arguments),cDe()}return Object.defineProperty(e,C_,{value:t}),e})(vr.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Kg(vr[ts]),b("assert").equal(vr[ts].length,0)}));var aDe;global[ts]||ADe(global,vr[ts]);sj.exports=rj($vt(vr));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!vr.__patched&&(sj.exports=rj(vr),vr.__patched=!0);function rj(t){jvt(t),t.gracefulify=rj,t.createReadStream=M,t.createWriteStream=q;var e=t.readFile;t.readFile=r;function r(D,z,ee){return typeof z=="function"&&(ee=z,z=null),ne(D,z,ee);function ne(ce,ge,De,$e){return e(ce,ge,function(it){it&&(it.code==="EMFILE"||it.code==="ENFILE")?XE([ne,[ce,ge,De],it,$e||Date.now(),Date.now()]):typeof De=="function"&&De.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=s;function s(D,z,ee,ne){return typeof ee=="function"&&(ne=ee,ee=null),ce(D,z,ee,ne);function ce(ge,De,$e,it,Wt){return n(ge,De,$e,function(vt){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?XE([ce,[ge,De,$e,it],vt,Wt||Date.now(),Date.now()]):typeof it=="function"&&it.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=o);function o(D,z,ee,ne){return typeof ee=="function"&&(ne=ee,ee=null),ce(D,z,ee,ne);function ce(ge,De,$e,it,Wt){return i(ge,De,$e,function(vt){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?XE([ce,[ge,De,$e,it],vt,Wt||Date.now(),Date.now()]):typeof it=="function"&&it.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(D,z,ee,ne){return typeof ee=="function"&&(ne=ee,ee=0),ce(D,z,ee,ne);function ce(ge,De,$e,it,Wt){return a(ge,De,$e,function(vt){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?XE([ce,[ge,De,$e,it],vt,Wt||Date.now(),Date.now()]):typeof it=="function"&&it.apply(this,arguments)})}}var A=t.readdir;t.readdir=l;var u=/^v[0-5]\./;function l(D,z,ee){typeof z=="function"&&(ee=z,z=null);var ne=u.test(process.version)?function(De,$e,it,Wt){return A(De,ce(De,$e,it,Wt))}:function(De,$e,it,Wt){return A(De,$e,ce(De,$e,it,Wt))};return ne(D,z,ee);function ce(ge,De,$e,it){return function(Wt,vt){Wt&&(Wt.code==="EMFILE"||Wt.code==="ENFILE")?XE([ne,[ge,De,$e],Wt,it||Date.now(),Date.now()]):(vt&&vt.sort&&vt.sort(),typeof $e=="function"&&$e.call(this,Wt,vt))}}}if(process.version.substr(0,4)==="v0.8"){var d=Kvt(t);m=d.ReadStream,y=d.WriteStream}var h=t.ReadStream;h&&(m.prototype=Object.create(h.prototype),m.prototype.open=C);var f=t.WriteStream;f&&(y.prototype=Object.create(f.prototype),y.prototype.open=N),Object.defineProperty(t,"ReadStream",{get:function(){return m},set:function(D){m=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return y},set:function(D){y=D},enumerable:!0,configurable:!0});var p=m;Object.defineProperty(t,"FileReadStream",{get:function(){return p},set:function(D){p=D},enumerable:!0,configurable:!0});var I=y;Object.defineProperty(t,"FileWriteStream",{get:function(){return I},set:function(D){I=D},enumerable:!0,configurable:!0});function m(D,z){return this instanceof m?(h.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}function C(){var D=this;P(D.path,D.flags,D.mode,function(z,ee){z?(D.autoClose&&D.destroy(),D.emit("error",z)):(D.fd=ee,D.emit("open",ee),D.read())})}function y(D,z){return this instanceof y?(f.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function N(){var D=this;P(D.path,D.flags,D.mode,function(z,ee){z?(D.destroy(),D.emit("error",z)):(D.fd=ee,D.emit("open",ee))})}function M(D,z){return new t.ReadStream(D,z)}function q(D,z){return new t.WriteStream(D,z)}var k=t.open;t.open=P;function P(D,z,ee,ne){return typeof ee=="function"&&(ne=ee,ee=null),ce(D,z,ee,ne);function ce(ge,De,$e,it,Wt){return k(ge,De,$e,function(vt,hn){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?XE([ce,[ge,De,$e,it],vt,Wt||Date.now(),Date.now()]):typeof it=="function"&&it.apply(this,arguments)})}}return t}function XE(t){Kg("ENQUEUE",t[0].name,t[1]),vr[ts].push(t),nj()}var E_;function cDe(){for(var t=Date.now(),e=0;e<vr[ts].length;++e)vr[ts][e].length>2&&(vr[ts][e][3]=t,vr[ts][e][4]=t);nj()}function nj(){if(clearTimeout(E_),E_=void 0,vr[ts].length!==0){var t=vr[ts].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)Kg("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){Kg("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-i,c=Math.max(i-s,1),A=Math.min(c*1.2,100);a>=A?(Kg("RETRY",e.name,r),e.apply(null,r.concat([s]))):vr[ts].push(t)}E_===void 0&&(E_=setTimeout(nj,0))}}});var I_=E((lwr,uDe)=>{"use strict";var VA=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";VA.writable=t=>VA(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";VA.readable=
Line truncated
|
||||
`;super(r),this.name="AggregateError",this.errors=e}};Gke.exports={AggregateError:Oj,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var Hj=E((y1r,qke)=>{"use strict";qke.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let s=e.shift();return n==="f"?s.toFixed(6):n==="j"?JSON.stringify(s):n==="s"&&typeof s=="object"?`${s.constructor!==Object?s.constructor.name:""} {}`.trim():s.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var Qs=E((B1r,Wke)=>{"use strict";var{format:IUt,inspect:P_}=Hj(),{AggregateError:yUt}=xr(),BUt=globalThis.AggregateError||yUt,bUt=Symbol("kIsNodeError"),QUt=["string","function","number","object","Function","Object","boolean","bigint","symbol"],wUt=/^([A-Z][a-z0-9]*)+$/,SUt="__node_internal_",O_={};function Zg(t,e){if(!t)throw new O_.ERR_INTERNAL_ASSERTION(e)}function Yke(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function NUt(t,e,r){if(typeof e=="function")return Zg(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return Zg(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:IUt(e,...r)}function ns(t,e,r){r||(r=Error);class n extends r{constructor(...i){super(NUt(t,e,i))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[bUt]=!0,O_[t]=n}function Vke(t){let e=SUt+t.name;return Object.defineProperty(t,"name",{value:e}),t}function TUt(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new BUt([e,t],e.message);return r.code=e.code,r}return t||e}var Gj=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new O_.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};ns("ERR_ASSERTION","%s",Error);ns("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Zg(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let s=[],i=[],o=[];for(let c of e)Zg(typeof c=="string","All expected entries have to be of type string"),QUt.includes(c)?s.push(c.toLowerCase()):wUt.test(c)?i.push(c):(Zg(c!=="object",'The value "object" should be written as "Object"'),o.push(c));if(i.length>0){let c=s.indexOf("object");c!==-1&&(s.splice(s,c,1),i.push("Object"))}if(s.length>0){switch(s.length){case 1:n+=`of type ${s[0]}`;break;case 2:n+=`one of type ${s[0]} or ${s[1]}`;break;default:{lLine truncated
|
||||
`+B);let[,F]=w;return F.replace(/\s/g,"").split(h1).map(G=>G.replace(f1,"").trim())}function tI(Q,B){var w={};return Object.keys(Q).forEach(F=>{var G=Q[F],V,J=h(G),j=!J&&G.length===1||J&&G.length===0;if(Array.isArray(G))V=[...G],G=V.pop(),w[F]=V.concat(V.length>0?re:G);else if(j)w[F]=G;else{if(V=eI(G),G.length===0&&!J&&V.length===0)throw new Error("autoInject task functions require explicit parameters.");J||V.pop(),w[F]=V.concat(re)}function re(Se,Bt){var Ft=V.map(St=>Se[St]);Ft.push(Bt),I(G)(...Ft)}}),XC(w,B)}class rI{constructor(){this.head=this.tail=null,this.length=0}removeLink(B){return B.prev?B.prev.next=B.next:this.head=B.next,B.next?B.next.prev=B.prev:this.tail=B.prev,B.prev=B.next=null,this.length-=1,B}empty(){for(;this.head;)this.shift();return this}insertAfter(B,w){w.prev=B,w.next=B.next,B.next?B.next.prev=w:this.tail=w,B.next=w,this.length+=1}insertBefore(B,w){w.prev=B.prev,w.next=B,B.prev?B.prev.next=w:this.head=w,B.prev=w,this.length+=1}unshift(B){this.head?this.insertBefore(this.head,B):nI(this,B)}push(B){this.tail?this.insertAfter(this.tail,B):nI(this,B)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var B=this.head;B;)yield B.data,B=B.next}remove(B){for(var w=this.head;w;){var{next:F}=w;B(w)&&this.removeLink(w),w=F}return this}}function nI(Q,B){Q.length=1,Q.head=Q.tail=B}function Rp(Q,B,w){if(B==null)B=1;else if(B===0)throw new RangeError("Concurrency must not be zero");var F=I(Q),G=0,V=[];let J={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function j(Ue,be){J[Ue].push(be)}function re(Ue,be){let Pe=(...Nt)=>{Se(Ue,Pe),be(...Nt)};J[Ue].push(Pe)}function Se(Ue,be){if(!Ue)return Object.keys(J).forEach(Pe=>J[Pe]=[]);if(!be)return J[Ue]=[];J[Ue]=J[Ue].filter(Pe=>Pe!==be)}function Bt(Ue,...be){J[Ue].forEach(Pe=>Pe(...be))}var Ft=!1;function St(Ue,be,Pe,Nt){if(Nt!=null&&typeof Nt!="function")throw new Error("task callback must be a function");Mt.started=!0;var Ir,xn;function yo(Lh,...uI){if(Lh)return Pe?xn(Lh):Ir();if(uI.length<=1)return Ir(uI[0]);Ir(uI)}var _p=Mt._createTaskItem(Ue,Pe?yo:Nt||yo);if(be?Mt._tasks.unshift(_p):Mt._tasks.push(_p),Ft||(Ft=!0,A(()=>{Ft=!1,Mt.process()})),Pe||!Nt)return new Promise((Lh,uI)=>{Ir=Lh,xn=uI})}function Io(Ue){return function(be,...Pe){G-=1;for(var Nt=0,Ir=Ue.length;Nt<Ir;Nt++){var xn=Ue[Nt],yo=V.indexOf(xn);yo===0?V.shift():yo>0&&V.splice(yo,1),xn.callback(be,...Pe),be!=null&&Bt("error",be,xn.data)}G<=Mt.concurrency-Mt.buffer&&Bt("unsaturated"),Mt.idle()&&Bt("drain"),Mt.process()}}function vp(Ue){return Ue.length===0&&Mt.idle()?(A(()=>Bt("drain")),!0):!1}let Mh=Ue=>be=>{if(!be)return new Promise((Pe,Nt)=>{re(Ue,(Ir,xn)=>{if(Ir)return Nt(Ir);Pe(xn)})});Se(Ue),j(Ue,be)};var AI=!1,Mt={_tasks:new rI,_createTaskItem(Ue,be){return{data:Ue,callback:be}},*[Symbol.iterator](){yield*Mt._tasks[Symbol.iterator]()},concurrency:B,payload:w,buffer:B/4,started:!1,paused:!1,push(Ue,be){return Array.isArray(Ue)?vp(Ue)?void 0:Ue.map(Pe=>St(Pe,!1,!1,be)):St(Ue,!1,!1,be)},pushAsync(Ue,be){return Array.isArray(Ue)?vp(Ue)?void 0:Ue.map(Pe=>St(Pe,!1,!0,be)):St(Ue,!1,!0,be)},kill(){Se(),Mt._tasks.empty()},unshift(Ue,be){return Array.isArray(Ue)?vp(Ue)?void 0:Ue.map(Pe=>St(Pe,!0,!1,be)):St(Ue,!0,!1,be)},unshiftAsync(Ue,be){return Array.isArray(Ue)?vp(Ue)?void 0:Ue.map(Pe=>St(Pe,!0,!0,be)):St(Ue,!0,!0,be)},remove(Ue){Mt._tasks.remove(Ue)},process(){if(!AI){for(AI=!0;!Mt.paused&&G<Mt.concurrency&&Mt._tasks.length;){var Ue=[],be=[],Pe=Mt._tasks.length;Mt.payload&&(Pe=Math.min(Pe,Mt.payload));for(var Nt=0;Nt<Pe;Nt++){var Ir=Mt._tasks.shift();Ue.push(Ir),V.push(Ir),be.push(Ir.data)}G+=1,Mt._tasks.length===0&&Bt("empty"),G===Mt.concurrency&&Bt("saturated");var xn=te(Io(Ue));F(be,xn)}AI=!1}},length(){return Mt._tasks.length},running(){return G},workersList(){return V},idle(){return Mt._tasks.length+G===0},pause(){Mt.paused=!0},resume(){Mt.paused!==!1&&(Mt.paused=!1,A(Mt.process))}};return Object.defineProperties(Mt,{saturated:{writable:!1,value:Mh("saturated")},unsaturated:{writable:!1,value:Mh("unsaturated")},empty:{writable:!1,value:Mh("empty")},drain:{writable:!1,value:Mh("drain")},error:{writable:!1,value:Mh("error")}}),Mt}function sI(Q,B){return Rp(Q,1,B)}function Dp(Q,B,w){return Rp(Q,B,w)}function Co(Q,B,w,F){F=Y(F);var G=I(w);return js(Q,(V,J,j)=>{G(B,V,(re,Se)=>{B=Se,j(re)})},V=>F(V,B))}var wa=m(Co,4);function kp(...Q){var B=Q.map(I);return function(...w){var F=this,G=w[w.length-1];return typeof G=="function"?w.pop():G=ou(),wa(B,w,(V,J,j)=>{J.apply(F,V.concat((re,...Se)=>{j(re,Se)}))},(V,J)=>G(V,...J)),G[iu]}}function g1(...Q){return kp(...Q.reverse())}function we(Q,B,w,F){return y(ge(B),Q,w,F)}var H=m(we,4);function T(Q,B,w,F){var G=I(w);return H(Q,B,(V,J)=>{G(V,(j,...re)=>j?J(j):J(j,re))},(V,J)=>{for(var j=[],re=0;re<J.length;re++)J[re]&&(j=j.concat(...J[re]));return F(V,j)})}var q=m(T,4);function K(Q,B,w){return q(Q,1/0,B,w)}var X=m(K,3);function oe(Q,B,w){retur
Line truncated
|
||||
GFS4: `),console.error(t)});vr[rs]||(sDe=global[rs]||[],oDe(vr,sDe),vr.close=(function(t){function e(r,n){return t.call(vr,r,function(s){s||iDe(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,b_,{value:t}),e})(vr.close),vr.closeSync=(function(t){function e(r){t.apply(vr,arguments),iDe()}return Object.defineProperty(e,b_,{value:t}),e})(vr.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Xg(vr[rs]),b("assert").equal(vr[rs].length,0)}));var sDe;global[rs]||oDe(global,vr[rs]);sj.exports=rj(Zvt(vr));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!vr.__patched&&(sj.exports=rj(vr),vr.__patched=!0);function rj(t){$vt(t),t.gracefulify=rj,t.createReadStream=M,t.createWriteStream=Y;var e=t.readFile;t.readFile=r;function r(D,z,ee){return typeof z=="function"&&(ee=z,z=null),te(D,z,ee);function te(ce,ge,De,$e){return e(ce,ge,function(st){st&&(st.code==="EMFILE"||st.code==="ENFILE")?tC([te,[ce,ge,De],st,$e||Date.now(),Date.now()]):typeof De=="function"&&De.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=s;function s(D,z,ee,te){return typeof ee=="function"&&(te=ee,ee=null),ce(D,z,ee,te);function ce(ge,De,$e,st,Yt){return n(ge,De,$e,function(vt){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?tC([ce,[ge,De,$e,st],vt,Yt||Date.now(),Date.now()]):typeof st=="function"&&st.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=o);function o(D,z,ee,te){return typeof ee=="function"&&(te=ee,ee=null),ce(D,z,ee,te);function ce(ge,De,$e,st,Yt){return i(ge,De,$e,function(vt){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?tC([ce,[ge,De,$e,st],vt,Yt||Date.now(),Date.now()]):typeof st=="function"&&st.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(D,z,ee,te){return typeof ee=="function"&&(te=ee,ee=0),ce(D,z,ee,te);function ce(ge,De,$e,st,Yt){return a(ge,De,$e,function(vt){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?tC([ce,[ge,De,$e,st],vt,Yt||Date.now(),Date.now()]):typeof st=="function"&&st.apply(this,arguments)})}}var A=t.readdir;t.readdir=l;var u=/^v[0-5]\./;function l(D,z,ee){typeof z=="function"&&(ee=z,z=null);var te=u.test(process.version)?function(De,$e,st,Yt){return A(De,ce(De,$e,st,Yt))}:function(De,$e,st,Yt){return A(De,$e,ce(De,$e,st,Yt))};return te(D,z,ee);function ce(ge,De,$e,st){return function(Yt,vt){Yt&&(Yt.code==="EMFILE"||Yt.code==="ENFILE")?tC([te,[ge,De,$e],Yt,st||Date.now(),Date.now()]):(vt&&vt.sort&&vt.sort(),typeof $e=="function"&&$e.call(this,Yt,vt))}}}if(process.version.substr(0,4)==="v0.8"){var d=Xvt(t);m=d.ReadStream,y=d.WriteStream}var h=t.ReadStream;h&&(m.prototype=Object.create(h.prototype),m.prototype.open=C);var f=t.WriteStream;f&&(y.prototype=Object.create(f.prototype),y.prototype.open=N),Object.defineProperty(t,"ReadStream",{get:function(){return m},set:function(D){m=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return y},set:function(D){y=D},enumerable:!0,configurable:!0});var p=m;Object.defineProperty(t,"FileReadStream",{get:function(){return p},set:function(D){p=D},enumerable:!0,configurable:!0});var I=y;Object.defineProperty(t,"FileWriteStream",{get:function(){return I},set:function(D){I=D},enumerable:!0,configurable:!0});function m(D,z){return this instanceof m?(h.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}function C(){var D=this;O(D.path,D.flags,D.mode,function(z,ee){z?(D.autoClose&&D.destroy(),D.emit("error",z)):(D.fd=ee,D.emit("open",ee),D.read())})}function y(D,z){return this instanceof y?(f.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function N(){var D=this;O(D.path,D.flags,D.mode,function(z,ee){z?(D.destroy(),D.emit("error",z)):(D.fd=ee,D.emit("open",ee))})}function M(D,z){return new t.ReadStream(D,z)}function Y(D,z){return new t.WriteStream(D,z)}var k=t.open;t.open=O;function O(D,z,ee,te){return typeof ee=="function"&&(te=ee,ee=null),ce(D,z,ee,te);function ce(ge,De,$e,st,Yt){return k(ge,De,$e,function(vt,fn){vt&&(vt.code==="EMFILE"||vt.code==="ENFILE")?tC([ce,[ge,De,$e,st],vt,Yt||Date.now(),Date.now()]):typeof st=="function"&&st.apply(this,arguments)})}}return t}function tC(t){Xg("ENQUEUE",t[0].name,t[1]),vr[rs].push(t),nj()}var B_;function iDe(){for(var t=Date.now(),e=0;e<vr[rs].length;++e)vr[rs][e].length>2&&(vr[rs][e][3]=t,vr[rs][e][4]=t);nj()}function nj(){if(clearTimeout(B_),B_=void 0,vr[rs].length!==0){var t=vr[rs].shift(),e=t[0],r=t[1],n=t[2],s=t[3],i=t[4];if(s===void 0)Xg("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-s>=6e4){Xg("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-i,c=Math.max(i-s,1),A=Math.min(c*1.2,100);a>=A?(Xg("RETRY",e.name,r),e.apply(null,r.concat([s]))):vr[rs].push(t)}B_===void 0&&(B_=setTimeout(nj,0))}}});var Q_=E((Rwr,aDe)=>{"use strict";var VA=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";VA.writable=t=>VA(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";VA.readable=
Line truncated
|
||||
`;super(r),this.name="AggregateError",this.errors=e}};Pke.exports={AggregateError:Oj,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var Hj=E((O1r,Oke)=>{"use strict";Oke.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let s=e.shift();return n==="f"?s.toFixed(6):n==="j"?JSON.stringify(s):n==="s"&&typeof s=="object"?`${s.constructor!==Object?s.constructor.name:""} {}`.trim():s.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var Is=E((H1r,qke)=>{"use strict";var{format:BUt,inspect:q_}=Hj(),{AggregateError:bUt}=Tr(),QUt=globalThis.AggregateError||bUt,wUt=Symbol("kIsNodeError"),SUt=["string","function","number","object","Function","Object","boolean","bigint","symbol"],NUt=/^([A-Z][a-z0-9]*)+$/,TUt="__node_internal_",Y_={};function tp(t,e){if(!t)throw new Y_.ERR_INTERNAL_ASSERTION(e)}function Hke(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function xUt(t,e,r){if(typeof e=="function")return tp(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return tp(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:BUt(e,...r)}function ss(t,e,r){r||(r=Error);class n extends r{constructor(...i){super(xUt(t,e,i))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[wUt]=!0,Y_[t]=n}function Gke(t){let e=TUt+t.name;return Object.defineProperty(t,"name",{value:e}),t}function RUt(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new QUt([e,t],e.message);return r.code=e.code,r}return t||e}var Gj=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Y_.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};ss("ERR_ASSERTION","%s",Error);ss("ERR_INVALID_ARG_TYPE",(t,e,r)=>{tp(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let s=[],i=[],o=[];for(let c of e)tp(typeof c=="string","All expected entries have to be of type string"),SUt.includes(c)?s.push(c.toLowerCase()):NUt.test(c)?i.push(c):(tp(c!=="object",'The value "object" should be written as "Object"'),o.push(c));if(i.length>0){let c=s.indexOf("object");c!==-1&&(s.splice(s,c,1),i.push("Object"))}if(s.length>0){switch(s.length){case 1:n+=`of type ${s[0]}`;break;case 2:n+=`one of type ${s[0]} or ${s[1]}`;break;default:{lLine truncated
|
||||
`)),e.linkname&&(r+=IX(" linkpath="+e.linkname+`
|
||||
`));let n=e.pax;if(n)for(let s in n)r+=IX(" "+s+"="+n[s]+`
|
||||
`);return kt.from(r)};PC.decodePax=function(e){let r={};for(;e.length;){let n=0;for(;n<e.length&&e[n]!==32;)n++;let s=parseInt(kt.toString(e.subarray(0,n)),10);if(!s)return r;let i=kt.toString(e.subarray(n+1,s-1)),o=i.indexOf("=");if(o===-1)return r;r[i.slice(0,o)]=i.slice(o+1),e=e.subarray(s)}return r};PC.encode=function(e){let r=kt.alloc(512),n=e.name,s="";if(e.typeflag===5&&n[n.length-1]!=="/"&&(n+="/"),kt.byteLength(n)!==n.length)return null;for(;kt.byteLength(n)>100;){let i=n.indexOf("/");if(i===-1)return null;s+=s?"/"+n.slice(0,i):n.slice(0,i),n=n.slice(i+1)}return kt.byteLength(n)>100||kt.byteLength(s)>155||e.linkname&&kt.byteLength(e.linkname)>100?null:(kt.write(r,n),kt.write(r,Sh(e.mode&PYt,6),100),kt.write(r,Sh(e.uid,6),108),kt.write(r,Sh(e.gid,6),116),WYt(e.size,r,124),kt.write(r,Sh(e.mtime.getTime()/1e3|0,11),136),r[156]=fM+YYt(e.type),e.linkname&&kt.write(r,e.linkname,157),kt.copy(fOe,r,e1),kt.copy(MYt,r,yX),e.uname&&kt.write(r,e.uname,265),e.gname&&kt.write(r,e.gname,297),kt.write(r,Sh(e.devmajor||0,6),329),kt.write(r,Sh(e.devminor||0,6),337),s&&kt.write(r,s,345),kt.write(r,Sh(pOe(r),6),148),r)};PC.decode=function(e,r,n){let s=e[156]===0?0:e[156]-fM,i=UC(e,0,100,r),o=wh(e,100,8),a=wh(e,108,8),c=wh(e,116,8),A=wh(e,124,12),u=wh(e,136,12),l=qYt(s),d=e[157]===0?null:UC(e,157,100,r),h=UC(e,265,32),f=UC(e,297,32),p=wh(e,329,8),I=wh(e,337,8),m=pOe(e);if(m===256)return null;if(m!==wh(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(OYt(e))e[345]&&(i=UC(e,345,155,r)+"/"+i);else if(!HYt(e)){if(!n)throw new Error("Invalid tar header: unknown format.")}return s===0&&i&&i[i.length-1]==="/"&&(s=5),{name:i,mode:o,uid:a,gid:c,size:A,mtime:new Date(1e3*u),type:l,linkname:d,uname:h,gname:f,devmajor:p,devminor:I,pax:null}};function OYt(t){return kt.equals(fOe,t.subarray(e1,e1+6))}function HYt(t){return kt.equals(LYt,t.subarray(e1,e1+6))&&kt.equals(UYt,t.subarray(yX,yX+2))}function GYt(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function qYt(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function YYt(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function gOe(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}function pOe(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function Sh(t,e){return t=t.toString(8),t.length>e?FYt.slice(0,e)+" ":_Yt.slice(0,e-t.length)+t+" "}function VYt(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=t&255,t=Math.floor(t/256)}function WYt(t,e,r){t.toString(8).length>11?VYt(t,e,r):kt.write(e,Sh(t,11),r)}function JYt(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],n;for(n=t.length-1;n>0;n--){let o=t[n];e?r.push(o):r.push(255-o)}let s=0,i=r.length;for(n=0;n<i;n++)s+=r[n]*Math.pow(256,n);return e?s:-1*s}function wh(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return JYt(t);{for(;e<t.length&&t[e]===32;)e++;let n=GYt(gOe(t,32,e,t.length),t.length,t.length);for(;e<n&&t[e]===0;)e++;return n===e?0:parseInt(kt.toString(t.subarray(e,n)),8)}}function UC(t,e,r,n){return kt.toString(t.subarray(e,gOe(t,0,e,e+r)),n)}function IX(t){let e=kt.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var yOe=E((zNr,IOe)=>{var{Writable:zYt,Readable:jYt,getStreamError:mOe}=CX(),KYt=sX(),EOe=vC(),OC=BX(),$Yt=EOe.alloc(0),QX=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new KYt,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return $Yt;let r=this._next(e);if(e===r.byteLength)return r;let n=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),n.push(r);return EOe.concat(n)}_next(e){let r=this.queue.peek(),n=r.byteLength-this._offset;if(e>=n){let s=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,s}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},wX=class extends jYt{constructor(e,r,n){super(),this.header=r,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(mOe(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=COe(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},SX=class extends zYt{constru
Line truncated
|
||||
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}function yce(t,e){if(process.env.GITHUB_OUTPUT||"")return cI("OUTPUT",v1(t,e));process.stdout.write(hO.EOL),Sa("set-output",{name:t},Ic(e))}function Kl(t){process.exitCode=dO.Failure,_c(t)}function Pa(){return process.env.RUNNER_DEBUG==="1"}function O(t){Sa("debug",{},t)}function _c(t,e={}){Sa("error",R1(e),t instanceof Error?t.toString():t)}function Ve(t,e={}){Sa("warning",R1(e),t instanceof Error?t.toString():t)}function Bce(t,e={}){Sa("notice",R1(e),t instanceof Error?t.toString():t)}function $(t){process.stdout.write(t+hO.EOL)}function _je(t){vM("group",t)}function Fje(){vM("endgroup")}function UN(t,e){return vje(this,void 0,void 0,function*(){_je(t);let r;try{r=yield e()}finally{Fje()}return r})}function bu(t,e){if(process.env.GITHUB_STATE||"")return cI("STATE",v1(t,e));Sa("save-state",{name:t},Ic(e))}function xm(t){return process.env[`STATE_${t}`]||""}import*as $J from"fs";import*as XJ from"path";import*as r_ from"os";import{readFileSync as Mje,existsSync as Lje}from"fs";import{EOL as Uje}from"os";var Rm=class{constructor(){var e,r,n;if(this.payload={},process.env.GITHUB_EVENT_PATH)if(Lje(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse(Mje(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let s=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${s} does not exist${Uje}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(n=process.env.GITHUB_GRAPHQL_URL)!==null&&n!==void 0?n:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,r]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:r}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};var EO=Ae(Nce(),1),Tce=Ae(xN(),1),$je=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function xce(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}function Rce(t){return new EO.HttpClient().getAgent(t)}function Xje(t){return new EO.HttpClient().getAgentDispatcher(t)}function Dce(t){let e=Xje(t);return(n,s)=>$je(this,void 0,void 0,function*(){return(0,Tce.fetch)(n,Object.assign(Object.assign({},s),{dispatcher:e}))})}function kce(){return process.env.GITHUB_API_URL||"https://api.github.com"}function CO(t){var e;let r=(e=process.env.ACTIONS_ORCHESTRATION_ID)===null||e===void 0?void 0:e.trim();if(r){let s=`actions_orchestration_id/${r.replace(/[^a-z0-9_.-]/gi,"_")}`;return t?.includes(s)?t:`${t?`${t} `:""}${s}`}return t}function VN(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}function WN(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce((s,i)=>WN.bind(null,t,i,s,n),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((s,i)=>i.hook.bind(null,s,n),r)():r(n))}function vce(t,e,r,n){let s=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=(i,o)=>Promise.resolve().then(s.bind(null,o)).then(i.bind(null,o))),e==="after"&&(n=(i,o)=>{let a;return Promise.resolve().then(i.bind(null,o)).then(c=>(a=c,s(a,o))).then(()=>a)}),e==="error"&&(n=(i,o)=>Promise.resolve().then(i.bind(null,o)).catch(a=>s(a,o))),t.registry[r].push({hook:n,orig:s})}function _ce(t,e,r){if(!t.registry[e])return;let n=t.registry[e].map(s=>s.orig).indexOf(r);n!==-1&&t.registry[e].splice(n,1)}var Fce=Function.bind,Mce=Fce.bind(Fce);function Lce(t,e,r){let n=Mce(_ce,null).apply(null,r?[e,r]:[e]);t.api={remove:n},t.remove=n,["before","error","after","wrap"].forEach(s=>{let i=r?[e,s,r]:[e,s];t[s]=t.api[s]=Mce(vce,null).
Line truncated
|
||||
`);return kt.from(r)};GC.decodePax=function(e){let r={};for(;e.length;){let n=0;for(;n<e.length&&e[n]!==32;)n++;let s=parseInt(kt.toString(e.subarray(0,n)),10);if(!s)return r;let i=kt.toString(e.subarray(n+1,s-1)),o=i.indexOf("=");if(o===-1)return r;r[i.slice(0,o)]=i.slice(o+1),e=e.subarray(s)}return r};GC.encode=function(e){let r=kt.alloc(512),n=e.name,s="";if(e.typeflag===5&&n[n.length-1]!=="/"&&(n+="/"),kt.byteLength(n)!==n.length)return null;for(;kt.byteLength(n)>100;){let i=n.indexOf("/");if(i===-1)return null;s+=s?"/"+n.slice(0,i):n.slice(0,i),n=n.slice(i+1)}return kt.byteLength(n)>100||kt.byteLength(s)>155||e.linkname&&kt.byteLength(e.linkname)>100?null:(kt.write(r,n),kt.write(r,Th(e.mode&HYt,6),100),kt.write(r,Th(e.uid,6),108),kt.write(r,Th(e.gid,6),116),zYt(e.size,r,124),kt.write(r,Th(e.mtime.getTime()/1e3|0,11),136),r[156]=EM+WYt(e.type),e.linkname&&kt.write(r,e.linkname,157),kt.copy(lOe,r,s1),kt.copy(UYt,r,yX),e.uname&&kt.write(r,e.uname,265),e.gname&&kt.write(r,e.gname,297),kt.write(r,Th(e.devmajor||0,6),329),kt.write(r,Th(e.devminor||0,6),337),s&&kt.write(r,s,345),kt.write(r,Th(hOe(r),6),148),r)};GC.decode=function(e,r,n){let s=e[156]===0?0:e[156]-EM,i=HC(e,0,100,r),o=Nh(e,100,8),a=Nh(e,108,8),c=Nh(e,116,8),A=Nh(e,124,12),u=Nh(e,136,12),l=VYt(s),d=e[157]===0?null:HC(e,157,100,r),h=HC(e,265,32),f=HC(e,297,32),p=Nh(e,329,8),I=Nh(e,337,8),m=hOe(e);if(m===256)return null;if(m!==Nh(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(GYt(e))e[345]&&(i=HC(e,345,155,r)+"/"+i);else if(!qYt(e)){if(!n)throw new Error("Invalid tar header: unknown format.")}return s===0&&i&&i[i.length-1]==="/"&&(s=5),{name:i,mode:o,uid:a,gid:c,size:A,mtime:new Date(1e3*u),type:l,linkname:d,uname:h,gname:f,devmajor:p,devminor:I,pax:null}};function GYt(t){return kt.equals(lOe,t.subarray(s1,s1+6))}function qYt(t){return kt.equals(PYt,t.subarray(s1,s1+6))&&kt.equals(OYt,t.subarray(yX,yX+2))}function YYt(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function VYt(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function WYt(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function dOe(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}function hOe(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function Th(t,e){return t=t.toString(8),t.length>e?LYt.slice(0,e)+" ":MYt.slice(0,e-t.length)+t+" "}function JYt(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=t&255,t=Math.floor(t/256)}function zYt(t,e,r){t.toString(8).length>11?JYt(t,e,r):kt.write(e,Th(t,11),r)}function jYt(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],n;for(n=t.length-1;n>0;n--){let o=t[n];e?r.push(o):r.push(255-o)}let s=0,i=r.length;for(n=0;n<i;n++)s+=r[n]*Math.pow(256,n);return e?s:-1*s}function Nh(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return jYt(t);{for(;e<t.length&&t[e]===32;)e++;let n=YYt(dOe(t,32,e,t.length),t.length,t.length);for(;e<n&&t[e]===0;)e++;return n===e?0:parseInt(kt.toString(t.subarray(e,n)),8)}}function HC(t,e,r,n){return kt.toString(t.subarray(e,dOe(t,0,e,e+r)),n)}function IX(t){let e=kt.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var EOe=E((hTr,mOe)=>{var{Writable:KYt,Readable:$Yt,getStreamError:fOe}=CX(),XYt=sX(),gOe=MC(),qC=BX(),ZYt=gOe.alloc(0),QX=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new XYt,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return ZYt;let r=this._next(e);if(e===r.byteLength)return r;let n=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),n.push(r);return gOe.concat(n)}_next(e){let r=this.queue.peek(),n=r.byteLength-this._offset;if(e>=n){let s=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,s}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},wX=class extends $Yt{constructor(e,r,n){super(),this.header=r,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(fOe(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=pOe(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},SX=class extends KYt{constru
Line truncated
|
||||
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}function Ice(t,e){if(process.env.GITHUB_OUTPUT||"")return lI("OUTPUT",U1(t,e));process.stdout.write(EO.EOL),Na("set-output",{name:t},yc(e))}function Kl(t){process.exitCode=mO.Failure,Ui(t)}function Oa(){return process.env.RUNNER_DEBUG==="1"}function P(t){Na("debug",{},t)}function Ui(t,e={}){Na("error",F1(e),t instanceof Error?t.toString():t)}function Ve(t,e={}){Na("warning",F1(e),t instanceof Error?t.toString():t)}function yce(t,e={}){Na("notice",F1(e),t instanceof Error?t.toString():t)}function $(t){process.stdout.write(t+EO.EOL)}function Mje(t){UM("group",t)}function Lje(){UM("endgroup")}function qN(t,e){return Fje(this,void 0,void 0,function*(){Mje(t);let r;try{r=yield e()}finally{Lje()}return r})}function bu(t,e){if(process.env.GITHUB_STATE||"")return lI("STATE",U1(t,e));Na("save-state",{name:t},yc(e))}function Dm(t){return process.env[`STATE_${t}`]||""}import*as tz from"fs";import*as rz from"path";import*as a_ from"os";import{readFileSync as Uje,existsSync as Pje}from"fs";import{EOL as Oje}from"os";var km=class{constructor(){var e,r,n;if(this.payload={},process.env.GITHUB_EVENT_PATH)if(Pje(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse(Uje(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let s=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${s} does not exist${Oje}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10),this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(r=process.env.GITHUB_SERVER_URL)!==null&&r!==void 0?r:"https://github.com",this.graphqlUrl=(n=process.env.GITHUB_GRAPHQL_URL)!==null&&n!==void 0?n:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,r]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:r}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};var bO=Ae(Sce(),1),Nce=Ae(_N(),1),Zje=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function Tce(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}function xce(t){return new bO.HttpClient().getAgent(t)}function eKe(t){return new bO.HttpClient().getAgentDispatcher(t)}function Rce(t){let e=eKe(t);return(n,s)=>Zje(this,void 0,void 0,function*(){return(0,Nce.fetch)(n,Object.assign(Object.assign({},s),{dispatcher:e}))})}function Dce(){return process.env.GITHUB_API_URL||"https://api.github.com"}function QO(t){var e;let r=(e=process.env.ACTIONS_ORCHESTRATION_ID)===null||e===void 0?void 0:e.trim();if(r){let s=`actions_orchestration_id/${r.replace(/[^a-z0-9_.-]/gi,"_")}`;return t?.includes(s)?t:`${t?`${t} `:""}${s}`}return t}function KN(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&process.version!==void 0?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}function $N(t,e,r,n){if(typeof r!="function")throw new Error("method for before hook must be a function");return n||(n={}),Array.isArray(e)?e.reverse().reduce((s,i)=>$N.bind(null,t,i,s,n),r)():Promise.resolve().then(()=>t.registry[e]?t.registry[e].reduce((s,i)=>i.hook.bind(null,s,n),r)():r(n))}function kce(t,e,r,n){let s=n;t.registry[r]||(t.registry[r]=[]),e==="before"&&(n=(i,o)=>Promise.resolve().then(s.bind(null,o)).then(i.bind(null,o))),e==="after"&&(n=(i,o)=>{let a;return Promise.resolve().then(i.bind(null,o)).then(c=>(a=c,s(a,o))).then(()=>a)}),e==="error"&&(n=(i,o)=>Promise.resolve().then(i.bind(null,o)).catch(a=>s(a,o))),t.registry[r].push({hook:n,orig:s})}function vce(t,e,r){if(!t.registry[e])return;let n=t.registry[e].map(s=>s.orig).indexOf(r);n!==-1&&t.registry[e].splice(n,1)}var _ce=Function.bind,Fce=_ce.bind(_ce);function Mce(t,e,r){let n=Fce(vce,null).apply(null,r?[e,r]:[e]);t.api={remove:n},t.remove=n,["before","error","after","wrap"].forEach(s=>{let i=r?[e,s,r]:[e,s];t[s]=t.api[s]=Fce(kce,null).
Line truncated
|
||||
`+t.errors.map(e=>` - ${e.message}`).join(`
|
||||
`)}var KKe=class extends Error{constructor(t,e,r){super(jKe(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},$Ke=["method","baseUrl","url","headers","request","query","mediaType","operationName"],XKe=["query","method","url"],AAe=/\/api\/v3\/?$/;function ZKe(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let o in r)if(XKe.includes(o))return Promise.reject(new Error(`[@octokit/graphql] "${o}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((o,a)=>$Ke.includes(a)?(o[a]=n[a],o):(o.variables||(o.variables={}),o.variables[a]=n[a],o),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return AAe.test(i)&&(s.url=i.replace(AAe,"/api/graphql")),t(s).then(o=>{if(o.data.errors){let a={};for(let c of Object.keys(o.headers))a[c]=o.headers[c];throw new KKe(s,a,o.data)}return o.data.data})}function vO(t,e){let r=t.defaults(e);return Object.assign((s,i)=>ZKe(r,s,i),{defaults:vO.bind(null,r),endpoint:r.endpoint})}var Bzt=vO(uAe.request,{headers:{"user-agent":`octokit-graphql.js/${zKe} ${VN()}`},method:"POST",url:"/graphql"});function lAe(t){return vO(t,{method:"POST",url:"/graphql"})}var _O="(?:[a-zA-Z0-9_-]+)",dAe="\\.",hAe=new RegExp(`^${_O}${dAe}${_O}${dAe}${_O}$`),e$e=hAe.test.bind(hAe);async function t$e(t){let e=e$e(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"}}function r$e(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function n$e(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=r$e(t),e(s)}var fAe=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(t$e.bind(null,e),{hook:n$e.bind(null,e)})};var FO="7.0.6";var gAe=()=>{},s$e=console.warn.bind(console),i$e=console.error.bind(console);function o$e(t={}){return typeof t.debug!="function"&&(t.debug=gAe),typeof t.info!="function"&&(t.info=gAe),typeof t.warn!="function"&&(t.warn=s$e),typeof t.error!="function"&&(t.error=i$e),t}var pAe=`octokit-core.js/${FO} ${VN()}`,jN=class{static VERSION=FO;static defaults(e){return class extends this{constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new Uce.Collection,n={baseUrl:MO.request.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} ${pAe}`:pAe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=MO.request.defaults(n),this.graphql=lAe(this.request).defaults(n),this.log=o$e(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...o}=e,a=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));r.wrap("request",a.hook),this.auth=a}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=fAe(e.auth);r.wrap("request",i.hook),this.auth=i}let s=this.constructor;for(let i=0;i<s.plugins.length;++i)Object.assign(this,s.plugins[i](this,e))}request;graphql;log;hook;auth};var LO="17.0.0";var a$e={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"],createHostedRunnerForOrg:["POST /orgs/{org}/actions/hosted-runners"],createOrUpdateEnvironmentSecret:["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secr
Line truncated
|
||||
`)}var XKe=class extends Error{constructor(t,e,r){super($Ke(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},ZKe=["method","baseUrl","url","headers","request","query","mediaType","operationName"],e$e=["query","method","url"],cAe=/\/api\/v3\/?$/;function t$e(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let o in r)if(e$e.includes(o))return Promise.reject(new Error(`[@octokit/graphql] "${o}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((o,a)=>ZKe.includes(a)?(o[a]=n[a],o):(o.variables||(o.variables={}),o.variables[a]=n[a],o),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return cAe.test(i)&&(s.url=i.replace(cAe,"/api/graphql")),t(s).then(o=>{if(o.data.errors){let a={};for(let c of Object.keys(o.headers))a[c]=o.headers[c];throw new XKe(s,a,o.data)}return o.data.data})}function UO(t,e){let r=t.defaults(e);return Object.assign((s,i)=>t$e(r,s,i),{defaults:UO.bind(null,r),endpoint:r.endpoint})}var Nzt=UO(AAe.request,{headers:{"user-agent":`octokit-graphql.js/${KKe} ${KN()}`},method:"POST",url:"/graphql"});function uAe(t){return UO(t,{method:"POST",url:"/graphql"})}var PO="(?:[a-zA-Z0-9_-]+)",lAe="\\.",dAe=new RegExp(`^${PO}${lAe}${PO}${lAe}${PO}$`),r$e=dAe.test.bind(dAe);async function n$e(t){let e=r$e(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"}}function s$e(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function i$e(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=s$e(t),e(s)}var hAe=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(n$e.bind(null,e),{hook:i$e.bind(null,e)})};var OO="7.0.6";var fAe=()=>{},o$e=console.warn.bind(console),a$e=console.error.bind(console);function c$e(t={}){return typeof t.debug!="function"&&(t.debug=fAe),typeof t.info!="function"&&(t.info=fAe),typeof t.warn!="function"&&(t.warn=o$e),typeof t.error!="function"&&(t.error=a$e),t}var gAe=`octokit-core.js/${OO} ${KN()}`,eT=class{static VERSION=OO;static defaults(e){return class extends this{constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new Lce.Collection,n={baseUrl:HO.request.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=HO.request.defaults(n),this.graphql=uAe(this.request).defaults(n),this.log=c$e(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...o}=e,a=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));r.wrap("request",a.hook),this.auth=a}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=hAe(e.auth);r.wrap("request",i.hook),this.auth=i}let s=this.constructor;for(let i=0;i<s.plugins.length;++i)Object.assign(this,s.plugins[i](this,e))}request;graphql;log;hook;auth};var GO="17.0.0";var A$e={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"],createHostedRunnerForOrg:["POST /orgs/{org}/actions/hosted-runners"],createOrUpdateEnvironmentSecret:["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secr
Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let s=e.split(`
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new Iy(i));return n.searchPaths.push(...VO(n.patterns)),n})}static stat(e,r,n){return KO(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield Mm.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){O(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else s=yield Mm.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield Mm.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===i)){O(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};var j$e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function ZAe(t,e){return j$e(this,void 0,void 0,function*(){return yield tT.create(t,e)})}var Vle=Ae(Ny(),1);import*as mT from"crypto";import*as Om from"fs";import*as ff from"path";import*as Wle from"util";var Ty;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Ty||(Ty={}));var _s;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(_s||(_s={}));var Gi;(function(t){t.GNU="gnu",t.BSD="bsd"})(Gi||(Gi={}));var gT=2,pT=5e3,m3=5e3,E3=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,Yle=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,xy="cache.tar",C3="manifest.txt",cKt=10*Math.pow(1024,3);var Pm=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},itt=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(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(A){i({value:A,done:a})},o)}},ott="1.0";function Ry(){return Pm(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=ff.join(n,"actions","temp")}let r=ff.join(e,mT.randomUUID());return yield of(r),r})}function Mc(t){return Om.statSync(t).size}function I3(t){return Pm(this,void 0,void 0,function*(){var e,r,n,s,i;let o=[],a=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),c=yield ZAe(t.join(`
|
||||
`),{implicitDescendants:!1});try{for(var A=!0,u=itt(c.globGenerator()),l;l=yield u.next(),e=l.done,!e;A=!0){s=l.value,A=!1;let h=ff.relative(a,s).replace(new RegExp(`\\${ff.sep}`,"g"),"/");O(`Matched: ${h}`),h===""?o.push("."):o.push(`${h}`)}}catch(d){r={error:d}}finally{try{!A&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return o})}function Dy(t){return Pm(this,void 0,void 0,function*(){return Wle.promisify(Om.unlink)(t)})}function Jle(t){return Pm(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),O(`Checking ${e} ${r.join(" ")}`);try{yield Ua(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:s=>n+=s.toString(),stderr:s=>n+=s.toString()}})}catch(s){O(s.message)}return n=n.trim(),O(n),n})}function ky(){return Pm(this,void 0,void 0,function*(){let t=yield Jle("zstd",["--quiet"]),e=Vle.clean(t);return O(`zstd version: ${e}`),t===""?_s.Gzip:_s.ZstdWithoutLong})}function td(t){return t===_s.Gzip?Ty.Gzip:Ty.Zstd}function zle(){return Pm(this,void 0,void 0,function*(){return Om.existsSync(E3)?E3:(yield Jle("tar")).toLowerCase().includes("gnu tar")?Oi("tar"):""})}function y3(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}function Hm(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(ott),mT.createHash("sha256").update(n.join("|")).digest("hex")}function jle(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}import*as g0 from"fs";import{URL as Dct}from"url";var Lc=class extends Error{constructor(e){super(e),this.name="AbortError"}};import{EOL as att}from"node:os";import ctt from"node:util";import Att from"node:process";function Kle(t,...e){Att.stderr.write(`${ctt.format(t,...e)}${att}`)}var $le=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Zle,B3=[],b3=[],CT=[];$le&&Q3($le);var ede=Object.assign(t=>tde(t),{enable:Q3,enabled:w3,disable:utt,log:Kle});function Q3(t){Zle=t,B3=[],b3=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?b3.push(r.substring(1)):B3.push(r);for(let r of CT)r.enabled=w3(r.namespace)}function w3(t){if(t.endsWith("*"))return!0;for(let e of b3)if(Xle(t,e))return!1;for(let e of B3)if(Xle(t,e))return!0;return!1}function Xle(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let d=[],h="";for(let f of e)f==="*"&&h==="*"||(h=f,d.push(f));r=d.join("")}let n=0,s=0,i=r.length,o=t.length,a=-1,c=-1;for(;n<o&&s<i;)if(r[s]==="*"){if(a=s,s++,s===i)return!0;for(;t[n]!==r[s];)if(n++,n===o)return!1;c=n,n++,s++;continue}else if(r[s]===t[n])s++,n++;else if(a>=0){if(s=a+1,n=c+1,n===o)return!1;for(;t[n]!==r[s];)if(n++,n===o)return!1;c=n,n++,s++;continue}else return!1;let A=n===t.length,u=s===r.length,l=s===r.length-1&&r[s]==="*";return A&&(u||l)}function utt(){let t=Zle||"";return Q3(""),t}function tde(t){let e=Object.assign(r,{enabled:w3(t),destroy:ltt,log:ede.log,namespace:t,extend:dtt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return CT.push(e),e}function ltt(){let t=CT.indexOf(this);return t>=0?(CT.splice(t,1),!0):!1}function dtt(t){let e=tde(`${this.namespace}:${t}`);return e.log=this.log,e}var Gm=ede;var S3=["verbose","info","warning","error"],rde={verbose:400,info:300,warning:200,error:100};function nde(t,e){e.log=(...r)=>{t.log(...r)}}function sde(t){return S3.includes(t)}function htt(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,n,s=Gm(t.namespace);s.log=(...u)=>{Gm.log(...u)};function i(u){if(u&&!sde(u))throw new Error(`Unknown log level '${u}'. Acceptable values: ${S3.join(",")}`);n=u;let l=[];for(let d of e)o(d)&&l.push(d.namespace);Gm.enable(l.join(","))}r&&(sde(r)?i(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${S3.join(", ")}.`));function o(u){return!!(n&&rde[u.level]<=rde[n])}function a(u,l){let d=Object.assign(u.extend(l),{level:l});if(nde(u,d),o(d)){let h=Gm.disable();Gm.enable(h+","+d.namespace)}return e.add(d),d}function c(){return n}function A(u){let l=s.extend(u);return nde(s,l),{error:a(l,"error"),warning:a(l,"warning"),info:a(l,"info"),verbose:a(l,"verbose")}}return{setLogLevel:i,getLogLevel:c,createClientLogger:A,logger:s}}var ide=htt({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),ftt=ide.logger;function vy(t){return ide.createClientLogger(t)}function IT(t){return t.toLowerCase()}function*gtt(t){for(let e of t.values())yield[e.name,e.value]}var N3=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(IT(e),{name:e,value:String(r).trim()})}get(e){return this._headersMap.get(IT(e))?.value}has(e){return this._headersMap.has(IT(e))}delete(e){this._headersMap.delete(IT(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.values())r[n.name]=
Line truncated
|
||||
${Ctt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function bT(t){return t instanceof Fs?!0:pf(t)&&t.name==="RestError"}function ai(t,e){return Buffer.from(t,e)}import D3 from"node:http";import k3 from"node:https";import cde from"node:zlib";import{Transform as Itt}from"node:stream";var vo=vy("ts-http-runtime");var ytt={};function _y(t){return t&&typeof t.pipe=="function"}function Ade(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function ude(t){return t&&typeof t.byteLength=="number"}var QT=class extends Itt{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},v3=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Lc("The operation was aborted. Request has already been canceled.");n=A=>{A.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let A=new qa;vo.info(`request to '${A.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),o=i?.includes("gzip")||i?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let A=wtt(a);A!==null&&e.headers.set("Content-Length",A)}let c;try{if(a&&e.onUploadProgress){let f=e.onUploadProgress,p=new QT(f);p.on("error",I=>{vo.error("Error in upload progress",I)}),_y(a)?a.pipe(p):p.end(a),a=p}let A=await this.makeRequest(e,r,a);s!==void 0&&clearTimeout(s);let u=Btt(A),d={status:A.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return A.resume(),d;c=o?btt(A,u):A;let h=e.onDownloadProgress;if(h){let f=new QT(h);f.on("error",p=>{vo.error("Error in download progress",p)}),c.pipe(f),c=f}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=c:d.bodyAsText=await Qtt(c),d}finally{if(e.abortSignal&&n){let A=Promise.resolve();_y(a)&&(A=Ade(a));let u=Promise.resolve();_y(c)&&(u=Ade(c)),Promise.all([A,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{vo.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,A)=>{let u=i?D3.request(a,c):k3.request(a,c);u.once("error",l=>{A(new Fs(l.message,{code:l.code??Fs.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new Lc("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(l),A(l)}),n&&_y(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):ude(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(vo.error("Unrecognized body type",n),A(new Fs("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?D3.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new D3.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return k3.globalAgent;let s=e.tlsSettings??ytt,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||(vo.info("No cached TLS Agent exist, creating a new Agent"),i=new k3.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,i)),i}}};function Btt(t){let e=qi();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}function btt(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=cde.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=cde.createInflate();return t.pipe(n),n}return t}function Qtt(t){return new Promise((e,r)=>{let n=[];t.on("data",s=>{Buffer.isBuffer(s)?n.push(s):n.push(Buffer.from(s))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",s=>{s&&s?.name==="AbortError"?r(s):r(new Fs(`Error reading response as text: ${s.message}`,{code:Fs.PARSE_ERROR}))})})}function wtt(t){return t?Buffer.isBuffer(t)?t.length:_y(t)?null:ude(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function lde(){return new v3}function wT(){return lde()}var _3="logPolicy";function ST(t={}){let e=t.logger??vo.info,r=new qa({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:_3,async sendRequest(n,s){if(!e.
Line truncated
|
||||
`;return e}function Jrt(t){return t instanceof Uint8Array?t.byteLength:zT(t)?t.size===-1?void 0:t.size:void 0}function zrt(t){let e=0;for(let r of t){let n=Jrt(r);if(n===void 0)return;e+=n}return e}async function jrt(t,e,r){let n=[ai(`--${r}`,"utf-8"),...e.flatMap(i=>[ai(`\r
|
||||
`,"utf-8"),ai(Wrt(i.headers),"utf-8"),ai(`\r
|
||||
`,"utf-8"),i.body,ai(`\r
|
||||
--${r}`,"utf-8")]),ai(`--\r
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new by(i));return n.searchPaths.push(...KO(n.patterns)),n})}static stat(e,r,n){return t3(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield Um.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){P(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else s=yield Um.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield Um.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===i)){P(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};var $$e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function XAe(t,e){return $$e(this,void 0,void 0,function*(){return yield oT.create(t,e)})}var Yle=Ae(Ry(),1);import*as BT from"crypto";import*as Gm from"fs";import*as pf from"path";import*as Vle from"util";var Dy;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Dy||(Dy={}));var Rs;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Rs||(Rs={}));var Oi;(function(t){t.GNU="gnu",t.BSD="bsd"})(Oi||(Oi={}));var IT=2,yT=5e3,B3=5e3,b3=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,qle=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,ky="cache.tar",Q3="manifest.txt",hKt=10*Math.pow(1024,3);var Hm=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},att=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(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(A){i({value:A,done:a})},o)}},ctt="1.0";function vy(){return Hm(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=pf.join(n,"actions","temp")}let r=pf.join(e,BT.randomUUID());return yield cf(r),r})}function Mc(t){return Gm.statSync(t).size}function w3(t){return Hm(this,void 0,void 0,function*(){var e,r,n,s,i;let o=[],a=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),c=yield XAe(t.join(`
|
||||
`),{implicitDescendants:!1});try{for(var A=!0,u=att(c.globGenerator()),l;l=yield u.next(),e=l.done,!e;A=!0){s=l.value,A=!1;let h=pf.relative(a,s).replace(new RegExp(`\\${pf.sep}`,"g"),"/");P(`Matched: ${h}`),h===""?o.push("."):o.push(`${h}`)}}catch(d){r={error:d}}finally{try{!A&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return o})}function _y(t){return Hm(this,void 0,void 0,function*(){return Vle.promisify(Gm.unlink)(t)})}function Wle(t){return Hm(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),P(`Checking ${e} ${r.join(" ")}`);try{yield Pa(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:s=>n+=s.toString(),stderr:s=>n+=s.toString()}})}catch(s){P(s.message)}return n=n.trim(),P(n),n})}function Fy(){return Hm(this,void 0,void 0,function*(){let t=yield Wle("zstd",["--quiet"]),e=Yle.clean(t);return P(`zstd version: ${e}`),t===""?Rs.Gzip:Rs.ZstdWithoutLong})}function td(t){return t===Rs.Gzip?Dy.Gzip:Dy.Zstd}function Jle(){return Hm(this,void 0,void 0,function*(){return Gm.existsSync(b3)?b3:(yield Wle("tar")).toLowerCase().includes("gnu tar")?Li("tar"):""})}function S3(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}function qm(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(ctt),BT.createHash("sha256").update(n.join("|")).digest("hex")}function zle(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}import*as m0 from"fs";import{URL as Lct}from"url";var Lc=class extends Error{constructor(e){super(e),this.name="AbortError"}};import{EOL as Att}from"node:os";import utt from"node:util";import ltt from"node:process";function jle(t,...e){ltt.stderr.write(`${utt.format(t,...e)}${Att}`)}import My from"node:process";function QT(t){return My.env[t]}var Kle=typeof My.versions.deno=="string"&&My.versions.deno.length>0,$le=typeof My.versions.bun=="string"&&My.versions.bun.length>0,wT=!0;var Xle=QT("DEBUG"),ede,N3=[],T3=[],ST=[];Xle&&x3(Xle);var tde=Object.assign(t=>rde(t),{enable:x3,enabled:R3,disable:dtt,log:jle});function x3(t){ede=t,N3=[],T3=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?T3.push(r.substring(1)):N3.push(r);for(let r of ST)r.enabled=R3(r.namespace)}function R3(t){if(t.endsWith("*"))return!0;for(let e of T3)if(Zle(t,e))return!1;for(let e of N3)if(Zle(t,e))return!0;return!1}function Zle(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let d=[],h="";for(let f of e)f==="*"&&h==="*"||(h=f,d.push(f));r=d.join("")}let n=0,s=0,i=r.length,o=t.length,a=-1,c=-1;for(;n<o&&s<i;)if(r[s]==="*"){if(a=s,s++,s===i)return!0;for(;t[n]!==r[s];)if(n++,n===o)return!1;c=n,n++,s++;continue}else if(r[s]===t[n])s++,n++;else if(a>=0){if(s=a+1,n=c+1,n===o)return!1;for(;t[n]!==r[s];)if(n++,n===o)return!1;c=n,n++,s++;continue}else return!1;let A=n===t.length,u=s===r.length,l=s===r.length-1&&r[s]==="*";return A&&(u||l)}function dtt(){let t=ede||"";return x3(""),t}function rde(t){let e=Object.assign(r,{enabled:R3(t),destroy:htt,log:tde.log,namespace:t,extend:ftt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return ST.push(e),e}function htt(){let t=ST.indexOf(this);return t>=0?(ST.splice(t,1),!0):!1}function ftt(t){let e=rde(`${this.namespace}:${t}`);return e.log=this.log,e}var Ym=tde;var D3=["verbose","info","warning","error"],nde={verbose:400,info:300,warning:200,error:100};function sde(t,e){e.log=(...r)=>{t.log(...r)}}function ide(t){return D3.includes(t)}function gtt(t){let e=new Set,r=QT(t.logLevelEnvVarName),n,s=Ym(t.namespace);s.log=(...u)=>{Ym.log(...u)};function i(u){if(u&&!ide(u))throw new Error(`Unknown log level '${u}'. Acceptable values: ${D3.join(",")}`);n=u;let l=[];for(let d of e)o(d)&&l.push(d.namespace);Ym.enable(l.join(","))}r&&(ide(r)?i(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${D3.join(", ")}.`));function o(u){return!!(n&&nde[u.level]<=nde[n])}function a(u,l){let d=Object.assign(u.extend(l),{level:l});if(sde(u,d),o(d)){let h=Ym.disable();Ym.enable(h+","+d.namespace)}return e.add(d),d}function c(){return n}function A(u){let l=s.extend(u);return sde(s,l),{error:a(l,"error"),warning:a(l,"warning"),info:a(l,"info"),verbose:a(l,"verbose")}}return{setLogLevel:i,getLogLevel:c,createClientLogger:A,logger:s}}var ode=gtt({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),ptt=ode.logger;function Ly(t){return ode.createClientLogger(t)}function NT(t){return t.toLowerCase()}function mtt(t){return String(t).trim().replace(/[\r\n]/g,"")}function*Ett(t){for(let e of t.values())yield[e.name,e.value]}var k3=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(NT(e),{name:e,value:mtt(r)})}get(e){return this._headersMap.get(NT(e))?.value}has(e){return this
Line truncated
|
||||
${Btt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Vm(t){return t instanceof Ds?!0:Ef(t)&&t.name==="RestError"}function ni(t,e){return Buffer.from(t,e)}import M3 from"node:http";import L3 from"node:https";import Ade from"node:zlib";import{Transform as btt}from"node:stream";var si=Ly("ts-http-runtime");var Qtt={};function Uy(t){return t&&typeof t.pipe=="function"}function ude(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function lde(t){return t&&typeof t.byteLength=="number"}var RT=class extends btt{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},U3=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Lc("The operation was aborted. Request has already been canceled.");n=A=>{A.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let A=new Ya;si.info(`request to '${A.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),o=i?.includes("gzip")||i?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let A=Ttt(a);A!==null&&e.headers.set("Content-Length",A)}let c;try{if(a&&e.onUploadProgress){let f=e.onUploadProgress,p=new RT(f);p.on("error",I=>{si.error("Error in upload progress",I)}),Uy(a)?a.pipe(p):p.end(a),a=p}let A=await this.makeRequest(e,r,a);s!==void 0&&clearTimeout(s);let u=wtt(A),d={status:A.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return A.resume(),d;c=o?Stt(A,u):A;let h=e.onDownloadProgress;if(h){let f=new RT(h);f.on("error",p=>{si.error("Error in download progress",p)}),c.pipe(f),c=f}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=c:d.bodyAsText=await Ntt(c),d}finally{if(e.abortSignal&&n){let A=Promise.resolve();Uy(a)&&(A=ude(a));let u=Promise.resolve();Uy(c)&&(u=ude(c)),Promise.all([A,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{si.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,A)=>{let u=i?M3.request(a,c):L3.request(a,c);u.once("error",l=>{A(new Ds(l.message,{code:l.code??Ds.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new Lc("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(l),A(l)}),n&&Uy(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):lde(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer,n.byteOffset,n.byteLength):Buffer.from(n)):(si.error("Unrecognized body type",n),A(new Ds("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?M3.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new M3.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return L3.globalAgent;let s=e.tlsSettings??Qtt,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||(si.info("No cached TLS Agent exist, creating a new Agent"),i=new L3.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,i)),i}}};function wtt(t){let e=Hi();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}function Stt(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=Ade.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=Ade.createInflate();return t.pipe(n),n}return t}function Ntt(t){return new Promise((e,r)=>{let n=[];t.on("data",s=>{Buffer.isBuffer(s)?n.push(s):n.push(Buffer.from(s))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",s=>{s&&s?.name==="AbortError"?r(s):r(new Ds(`Error reading response as text: ${s.message}`,{code:Ds.PARSE_ERROR}))})})}function Ttt(t){return t?Buffer.isBuffer(t)?t.length:Uy(t)?null:lde(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function dde(){return new U3}function DT(){return dde()}var P3="logPolicy";function kT(t={}){let e=t.logger??si.info,r=new Ya({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additionalAllowedQueryParameters});return{name:P3,asy
Line truncated
|
||||
`;return e}function jrt(t){return t instanceof Uint8Array?t.byteLength:Hy(t)?t.size===-1?void 0:t.size:void 0}function Krt(t){let e=0;for(let r of t){let n=jrt(r);if(n===void 0)return;e+=n}return e}async function $rt(t,e,r){let n=[ni(`--${r}`,"utf-8"),...e.flatMap(i=>[ni(`\r
|
||||
`,"utf-8"),ni(zrt(i.headers),"utf-8"),ni(`\r
|
||||
`,"utf-8"),i.body,ni(`\r
|
||||
--${r}`,"utf-8")]),ni(`--\r
|
||||
\r
|
||||
`,"utf-8")],s=zrt(n);s&&t.headers.set("Content-Length",s),t.body=await ahe(n)}var Ly="multipartPolicy",Krt=70,$rt=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Xrt(t){if(t.length>Krt)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!$rt.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function jT(){return{name:Ly,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",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,o]=s;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return r??=o,r?Xrt(r):r=Vrt(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await jrt(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function KT(){return BT()}import{EOL as ent}from"node:os";import tnt from"node:util";import*as che from"node:process";function Ahe(t,...e){che.stderr.write(`${tnt.format(t,...e)}${ent}`)}var uhe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,lhe,X3=[],Z3=[],$T=[];uhe&&e8(uhe);var dhe=Object.assign(t=>hhe(t),{enable:e8,enabled:t8,disable:rnt,log:Ahe});function e8(t){lhe=t,X3=[],Z3=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?Z3.push(new RegExp(`^${n.substr(1)}$`)):X3.push(new RegExp(`^${n}$`));for(let n of $T)n.enabled=t8(n.namespace)}function t8(t){if(t.endsWith("*"))return!0;for(let e of Z3)if(e.test(t))return!1;for(let e of X3)if(e.test(t))return!0;return!1}function rnt(){let t=lhe||"";return e8(""),t}function hhe(t){let e=Object.assign(r,{enabled:t8(t),destroy:nnt,log:dhe.log,namespace:t,extend:snt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return $T.push(e),e}function nnt(){let t=$T.indexOf(this);return t>=0?($T.splice(t,1),!0):!1}function snt(t){let e=hhe(`${this.namespace}:${t}`);return e.log=this.log,e}var jm=dhe;var ghe=new Set,XT=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,r8,n8=jm("azure");n8.log=(...t)=>{jm.log(...t)};var s8=["verbose","info","warning","error"];XT&&(Ehe(XT)?int(XT):console.error(`AZURE_LOG_LEVEL set to unknown log level '${XT}'; logging is not enabled. Acceptable values: ${s8.join(", ")}.`));function int(t){if(t&&!Ehe(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${s8.join(",")}`);r8=t;let e=[];for(let r of ghe)mhe(r)&&e.push(r.namespace);jm.enable(e.join(","))}var fhe={verbose:400,info:300,warning:200,error:100};function Lo(t){let e=n8.extend(t);return phe(n8,e),{error:ZT(e,"error"),warning:ZT(e,"warning"),info:ZT(e,"info"),verbose:ZT(e,"verbose")}}function phe(t,e){e.log=(...r)=>{t.log(...r)}}function ZT(t,e){let r=Object.assign(t.extend(e),{level:e});if(phe(t,r),mhe(r)){let n=jm.disable();jm.enable(n+","+r.namespace)}return ghe.add(r),r}function mhe(t){return!!(r8&&fhe[t.level]<=fhe[r8])}function Ehe(t){return s8.includes(t)}var Pc=Lo("core-rest-pipeline");function i8(t={}){return ST({logger:Pc.info,...t})}var o8=NT;function a8(t={}){return TT(t)}import c8 from"node:os";import A8 from"node:process";function Che(){return"User-Agent"}async function Ihe(t){if(A8&&A8.versions){let e=`${c8.type()} ${c8.release()}; ${c8.arch()}`,r=A8.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})`)}}var ex="1.22.2";function dnt(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}function yhe(){return Che()}async function tx(t){let e=new Map;e.set("core-rest-pipeline",ex),await Ihe(e);let r=dnt(e);return t?`${t} ${r}`:r}var Bhe=yhe(),bhe="userAgentPolicy";function u8(t={}){let e=tx(t.userAgentPrefix);return{name:bhe,async sendRequest(r,n){return r.headers.has(Bhe)||r.headers.set(Bhe,await e),n(r)}}}var Uy=class extends Error{constructor(e){super(e),this.name="AbortError"}};function l8(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((i,o)=>{function a(){o(new Uy(s??"The operation was aborted."))}function c(){n?.removeEventListener("abort",A)}function A(){r?.(),c(),a()}if(n?.aborted)return a();try{t(u=>{c(),i(u)},u=>{c(),o(u)})}catch(u){o(u)}n?.addEventListener("abort",A)})}var mnt="The delay was aborted.";function Km(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return l8(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:n,abortErrorMsg:s??mnt})}function nd(t){if(pf(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}`}}function Qhe(t){return pf(t)}function $m(){return gf()}var Ot=Cf;var whe=S
Line truncated
|
||||
`&&t[i]!=="\r";i++)c+=t[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!Hst(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",Zr("InvalidTag",l,Ms(t,i))}let A=Mst(t,i);if(A===!1)return Zr("InvalidAttr","Attributes for '"+c+"' have open quote.",Ms(t,i));let u=A.value;if(i=A.index,u[u.length-1]==="/"){let l=i-u.length;u=u.substring(0,u.length-1);let d=lfe(u,e);if(d===!0)n=!0;else return Zr(d.err.code,d.err.msg,Ms(t,l+d.err.line))}else if(a)if(A.tagClosed){if(u.trim().length>0)return Zr("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Ms(t,o));if(r.length===0)return Zr("InvalidTag","Closing tag '"+c+"' has not been opened.",Ms(t,o));{let l=r.pop();if(c!==l.tagName){let d=Ms(t,l.tagStartPos);return Zr("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+c+"'.",Ms(t,o))}r.length==0&&(s=!0)}}else return Zr("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Ms(t,i));else{let l=lfe(u,e);if(l!==!0)return Zr(l.err.code,l.err.msg,Ms(t,i-u.length+l.err.line));if(s===!0)return Zr("InvalidXml","Multiple possible root nodes found.",Ms(t,i));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=ufe(t,i);continue}else if(t[i+1]==="?"){if(i=Afe(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=Pst(t,i);if(l==-1)return Zr("InvalidChar","char '&' is not expected.",Ms(t,i));i=l}else if(s===!0&&!cfe(t[i]))return Zr("InvalidXml","Extra text at the end",Ms(t,i));t[i]==="<"&&i--}}else{if(cfe(t[i]))continue;return Zr("InvalidChar","char '"+t[i]+"' is not expected.",Ms(t,i))}if(n){if(r.length==1)return Zr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ms(t,r[0].tagStartPos));if(r.length>0)return Zr("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Zr("InvalidXml","Start tag expected.",1);return!0}function cfe(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}function Afe(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 Zr("InvalidXml","XML declaration allowed only at the start of the document.",Ms(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function ufe(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}var _st='"',Fst="'";function Mst(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===_st||t[e]===Fst)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}var Lst=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function lfe(t,e){let r=hx(t,Lst),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return Zr("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",Ky(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return Zr("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",Ky(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return Zr("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",Ky(r[s]));let i=r[s][2];if(!Ost(i))return Zr("InvalidAttr","Attribute '"+i+"' is an invalid name.",Ky(r[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return Zr("InvalidAttr","Attribute '"+i+"' is repeated.",Ky(r[s]))}return!0}function Ust(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function Pst(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Ust(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function Zr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Ost(t){return t0(t)}function Hst(t){return t0(t)}function Ms(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Ky(t){return t.startIndex+t[1].length}var dfe=t=>jy.includes(t)?"__"+t:t,Gst={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:dfe};function qst(t,e){if(typeof t!="string")return;let r=t.toLowerCase();if(jy.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(fx.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function hfe(t){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??100),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:hfe(!0)}var ffe=function(t){let e=Object.assign({},Gst,t),r=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(let{value:n,name:s}of r)n&&qst(n,s);return e.onDangerousProperty===null&&(e.onDangerousProperty=dfe),e.processEntities=hfe(e.processEntities),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(n=>typeof n=="string"&&n.startsWith("*.")?".."+n.substring(2):n)),e};var px;typeof Symbol!="function"?px="@@xmlMetadata":px=Symbol("XML Node Metadata");var ui=class{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&ObjLine truncated
|
||||
`);let e=new ui("!xml"),r=e,n="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=new Xy(this.options.processEntities);for(let i=0;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="/"){let a=Qf(t,">",i,"Closing Tag is not closed."),c=t.substring(i+2,a).trim();if(this.options.removeNSPrefix){let u=c.indexOf(":");u!==-1&&(c=c.substr(u+1))}c=q8(this.options.transformTagName,c,"",this.options).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let A=this.matcher.getCurrentTag();if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);A&&this.options.unpairedTags.indexOf(A)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",i=a}else if(t[i+1]==="?"){let a=Y8(t,i,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,this.readonlyMatcher),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){let c=new ui(a.tagName);c.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(c[":@"]=this.buildAttributesMap(a.tagExp,this.matcher,a.tagName)),this.addChild(r,c,this.readonlyMatcher,i)}i=a.closeIndex+1}else if(t.substr(i+1,3)==="!--"){let a=Qf(t,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){let c=t.substring(i+4,a-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}i=a}else if(t.substr(i+1,2)==="!D"){let a=s.readDocType(t,i);this.docTypeEntities=a.entities,i=a.i}else if(t.substr(i+1,2)==="!["){let a=Qf(t,"]]>",i,"CDATA is not closed.")-2,c=t.substring(i+9,a);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let A=this.parseTextData(c,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);A==null&&(A=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):r.add(this.options.textNodeName,A),i=a+2}else{let a=Y8(t,i,this.options.removeNSPrefix);if(!a){let y=t.substring(Math.max(0,i-50),Math.min(t.length,i+50));throw new Error(`readTagExp returned undefined at position ${i}. Context: "${y}"`)}let c=a.tagName,A=a.rawTagName,u=a.tagExp,l=a.attrExpPresent,d=a.closeIndex;if({tagName:c,tagExp:u}=q8(this.options.transformTagName,c,u,this.options),this.options.strictReservedNames&&(c===this.options.commentPropName||c===this.options.cdataPropName||c===this.options.textNodeName||c===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${c}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let h=r;h&&this.options.unpairedTags.indexOf(h.tagname)!==-1&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let f=!1;u.length>0&&u.lastIndexOf("/")===u.length-1&&(f=!0,c[c.length-1]==="/"?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),l=c!==u);let p=null,I={},m;m=eit(A),c!==e.tagname&&this.matcher.push(c,{},m),c!==u&&l&&(p=this.buildAttributesMap(u,this.matcher,c),p&&(I=Zst(p,this.options))),c!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let C=i;if(this.isCurrentNodeStopNode){let y="";if(f)i=a.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)i=a.closeIndex;else{let M=this.readStopNodeData(t,A,d+1);if(!M)throw new Error(`Unexpected end of ${A}`);i=M.i,y=M.tagContent}let N=new ui(c);p&&(N[":@"]=p),N.add(this.options.textNodeName,y),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,N,this.readonlyMatcher,C)}else{if(f){({tagName:c,tagExp:u}=q8(this.options.transformTagName,c,u,this.options));let y=new ui(c);p&&(y[":@"]=p),this.addChild(r,y,this.readonlyMatcher,C),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(c)!==-1){let y=new ui(c);p&&(y[":@"]=p),this.addChild(r,y,this.readonlyMatcher,C),this.matcher.pop(),this.isCurrentNodeStopNode=!1,i=a.closeIndex;continue}else{let y=new ui(c);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),p&&(y[":@"]=p),this.addChild(r,y,this.readonlyMatcher,C),r=y}n="",i=d}}else n+=t[i];return e.child};function ait(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.jPath?r.toString():r,i=this.options.updateTag(e.tagname,s,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}function cit(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let s=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return t}if(n.tagFilter){let s=this.options.jPath?r.toString():r;if(!n.tagFilter(e,s))return t}for(let s of Object.keys(this.docTypeEntities)){let i=this.docTypeEntities[s],o=t.match(i.regx);if(o){if(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded
Line truncated
|
||||
`;function j8(t,e){let r="";e.format&&e.indentBy.length>0&&(r=mit);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let i=0;i<e.stopNodes.length;i++){let o=e.stopNodes[i];typeof o=="string"?n.push(new Ji(o)):o instanceof Ji&&n.push(o)}let s=new Gc;return Cfe(t,e,r,s,n)}function Cfe(t,e,r,n,s){let i="",o=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let a=t.toString();return a=z8(a,e),a}return""}for(let a=0;a<t.length;a++){let c=t[a],A=yfe(c);if(A===void 0)continue;let u=Eit(c[":@"],e);n.push(A,u);let l=Iit(n,s);if(A===e.textNodeName){let I=c[A];l||(I=e.tagValueProcessor(A,I),I=z8(I,e)),o&&(i+=r),i+=I,o=!1,n.pop();continue}else if(A===e.cdataPropName){o&&(i+=r),i+=`<![CDATA[${c[A][0][e.textNodeName]}]]>`,o=!1,n.pop();continue}else if(A===e.commentPropName){i+=r+`<!--${c[A][0][e.textNodeName]}-->`,o=!0,n.pop();continue}else if(A[0]==="?"){let I=Efe(c[":@"],e,l),m=A==="?xml"?"":r,C=c[A][0][e.textNodeName];C=C.length!==0?" "+C:"",i+=m+`<${A}${C}${I}?>`,o=!0,n.pop();continue}let d=r;d!==""&&(d+=e.indentBy);let h=Efe(c[":@"],e,l),f=r+`<${A}${h}`,p;l?p=Ife(c[A],e):p=Cfe(c[A],e,d,n,s),e.unpairedTags.indexOf(A)!==-1?e.suppressUnpairedNode?i+=f+">":i+=f+"/>":(!p||p.length===0)&&e.suppressEmptyNode?i+=f+"/>":p&&p.endsWith(">")?i+=f+`>${p}${r}</${A}>`:(i+=f+">",p&&r!==""&&(p.includes("/>")||p.includes("</"))?i+=r+e.indentBy+p+r:i+=p,i+=`</${A}>`),o=!0,n.pop()}return i}function Eit(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s;r[i]=t[s],n=!0}return n?r:null}function Ife(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let s=t[n],i=yfe(s);if(i===e.textNodeName)r+=s[i];else if(i===e.cdataPropName)r+=s[i][0][e.textNodeName];else if(i===e.commentPropName)r+=s[i][0][e.textNodeName];else{if(i&&i[0]==="?")continue;if(i){let o=Cit(s[":@"],e),a=Ife(s[i],e);!a||a.length===0?r+=`<${i}${o}/>`:r+=`<${i}${o}>${a}</${i}>`}}}return r}function Cit(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=t[n];s===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return r}function yfe(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}}function Efe(t,e,r){let n="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i;r?i=t[s]:(i=e.attributeValueProcessor(s,t[s]),i=z8(i,e)),i===!0&&e.suppressBooleanAttributes?n+=` ${s.substr(e.attributeNamePrefix.length)}`:n+=` ${s.substr(e.attributeNamePrefix.length)}="${i}"`}return n}function Iit(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}function z8(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}function K8(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}var yit={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function di(t){if(this.options=Object.assign({},yit,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&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let r=this.options.stopNodes[e];typeof r=="string"?this.stopNodeExpressions.push(new Ji(r)):r instanceof Ji&&this.stopNodeExpressions.push(r)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=K8(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Qit),this.processTextOrObjNode=Bit,this.options.format?(this.indentate=bit,this.tagEndChar=`>
|
||||
`,"utf-8")],s=Krt(n);s&&t.headers.set("Content-Length",s),t.body=await she(n)}var Gy="multipartPolicy",Xrt=70,Zrt=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function ent(t){if(t.length>Xrt)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!Zrt.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function ex(){return{name:Gy,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",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,o]=s;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return r??=o,r?ent(r):r=Jrt(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await $rt(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function tx(){return xT()}import{EOL as rnt}from"node:os";import nnt from"node:util";import*as ihe from"node:process";function ohe(t,...e){ihe.stderr.write(`${nnt.format(t,...e)}${rnt}`)}var ahe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,che,n8=[],s8=[],rx=[];ahe&&i8(ahe);var Ahe=Object.assign(t=>uhe(t),{enable:i8,enabled:o8,disable:snt,log:ohe});function i8(t){che=t,n8=[],s8=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?s8.push(new RegExp(`^${n.substr(1)}$`)):n8.push(new RegExp(`^${n}$`));for(let n of rx)n.enabled=o8(n.namespace)}function o8(t){if(t.endsWith("*"))return!0;for(let e of s8)if(e.test(t))return!1;for(let e of n8)if(e.test(t))return!0;return!1}function snt(){let t=che||"";return i8(""),t}function uhe(t){let e=Object.assign(r,{enabled:o8(t),destroy:int,log:Ahe.log,namespace:t,extend:ont});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return rx.push(e),e}function int(){let t=rx.indexOf(this);return t>=0?(rx.splice(t,1),!0):!1}function ont(t){let e=uhe(`${this.namespace}:${t}`);return e.log=this.log,e}var $m=Ahe;var dhe=new Set,nx=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,a8,c8=$m("azure");c8.log=(...t)=>{$m.log(...t)};var A8=["verbose","info","warning","error"];nx&&(ghe(nx)?ant(nx):console.error(`AZURE_LOG_LEVEL set to unknown log level '${nx}'; logging is not enabled. Acceptable values: ${A8.join(", ")}.`));function ant(t){if(t&&!ghe(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${A8.join(",")}`);a8=t;let e=[];for(let r of dhe)fhe(r)&&e.push(r.namespace);$m.enable(e.join(","))}var lhe={verbose:400,info:300,warning:200,error:100};function Fo(t){let e=c8.extend(t);return hhe(c8,e),{error:sx(e,"error"),warning:sx(e,"warning"),info:sx(e,"info"),verbose:sx(e,"verbose")}}function hhe(t,e){e.log=(...r)=>{t.log(...r)}}function sx(t,e){let r=Object.assign(t.extend(e),{level:e});if(hhe(t,r),fhe(r)){let n=$m.disable();$m.enable(n+","+r.namespace)}return dhe.add(r),r}function fhe(t){return!!(a8&&lhe[t.level]<=lhe[a8])}function ghe(t){return A8.includes(t)}var Pc=Fo("core-rest-pipeline");function u8(t={}){return kT({logger:Pc.info,...t})}var l8=XT;function d8(t={}){return ZT(t)}import h8 from"node:os";import sd from"node:process";function phe(){return"User-Agent"}async function mhe(t){if(sd&&sd.versions){let e=`${h8.type()} ${h8.release()}; ${h8.arch()}`;sd.versions.bun?t.set("Bun",`${sd.versions.bun} (${e})`):sd.versions.deno?t.set("Deno",`${sd.versions.deno} (${e})`):sd.versions.node&&t.set("Node",`${sd.versions.node} (${e})`)}}var ix="1.24.0";function fnt(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}function Ehe(){return phe()}async function ox(t){let e=new Map;e.set("core-rest-pipeline",ix),await mhe(e);let r=fnt(e);return t?`${t} ${r}`:r}var Che=Ehe(),Ihe="userAgentPolicy";function f8(t={}){let e=ox(t.userAgentPrefix);return{name:Ihe,async sendRequest(r,n){return r.headers.has(Che)||r.headers.set(Che,await e),n(r)}}}var yhe=Symbol("rawContent");function g8(t){return typeof t[yhe]=="function"}function Bhe(t){return g8(t)?t[yhe]():t}var ax=Gy;function p8(){let t=ex();return{name:ax,sendRequest:async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)g8(n.body)&&(n.body=Bhe(n.body));return t.sendRequest(e,r)}}}var m8=KT;function E8(){return $T()}function C8(t={}){return FT(t)}function I8(){return MT()}var qy=class extends Error{constructor(e){super(e),this.name="AbortError"}};function y8(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((i,o)=>{function a(){o(new qy(s??"The operation was aborted."))}function c(){n?.removeEventListener("abort",A)}function A(){r?.(),c(),a()}if(n?.aborted)return a();try{t(u=>{c(),i(u)},u=>{c(),o(u)})}catch(u){o(u)}n?.addEventListener("abort",A)})}var
Line truncated
|
||||
`&&t[i]!=="\r";i++)c+=t[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!Jst(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",Zr("InvalidTag",l,ks(t,i))}let A=Gst(t,i);if(A===!1)return Zr("InvalidAttr","Attributes for '"+c+"' have open quote.",ks(t,i));let u=A.value;if(i=A.index,u[u.length-1]==="/"){let l=i-u.length;u=u.substring(0,u.length-1);let d=cfe(u,e);if(d===!0)n=!0;else return Zr(d.err.code,d.err.msg,ks(t,l+d.err.line))}else if(a)if(A.tagClosed){if(u.trim().length>0)return Zr("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",ks(t,o));if(r.length===0)return Zr("InvalidTag","Closing tag '"+c+"' has not been opened.",ks(t,o));{let l=r.pop();if(c!==l.tagName){let d=ks(t,l.tagStartPos);return Zr("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+c+"'.",ks(t,o))}r.length==0&&(s=!0)}}else return Zr("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",ks(t,i));else{let l=cfe(u,e);if(l!==!0)return Zr(l.err.code,l.err.msg,ks(t,i-u.length+l.err.line));if(s===!0)return Zr("InvalidXml","Multiple possible root nodes found.",ks(t,i));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=afe(t,i);continue}else if(t[i+1]==="?"){if(i=ofe(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=Vst(t,i);if(l==-1)return Zr("InvalidChar","char '&' is not expected.",ks(t,i));i=l}else if(s===!0&&!ife(t[i]))return Zr("InvalidXml","Extra text at the end",ks(t,i));t[i]==="<"&&i--}}else{if(ife(t[i]))continue;return Zr("InvalidChar","char '"+t[i]+"' is not expected.",ks(t,i))}if(n){if(r.length==1)return Zr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ks(t,r[0].tagStartPos));if(r.length>0)return Zr("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Zr("InvalidXml","Start tag expected.",1);return!0}function ife(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}function ofe(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 Zr("InvalidXml","XML declaration allowed only at the start of the document.",ks(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function afe(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}var Ost='"',Hst="'";function Gst(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===Ost||t[e]===Hst)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}var qst=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function cfe(t,e){let r=Ex(t,qst),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return Zr("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",tB(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return Zr("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",tB(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return Zr("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",tB(r[s]));let i=r[s][2];if(!Wst(i))return Zr("InvalidAttr","Attribute '"+i+"' is an invalid name.",tB(r[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return Zr("InvalidAttr","Attribute '"+i+"' is repeated.",tB(r[s]))}return!0}function Yst(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function Vst(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Yst(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function Zr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Wst(t){return n0(t)}function Jst(t){return n0(t)}function ks(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function tB(t){return t.startIndex+t[1].length}var Afe=t=>eB.includes(t)?"__"+t:t,zst={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Afe};function jst(t,e){if(typeof t!="string")return;let r=t.toLowerCase();if(eB.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(Cx.some(n=>r===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function ufe(t){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??100),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:ufe(!0)}var lfe=function(t){let e=Object.assign({},zst,t),r=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(let{value:n,name:s}of r)n&&jst(n,s);return e.onDangerousProperty===null&&(e.onDangerousProperty=Afe),e.processEntities=ufe(e.processEntities),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(n=>typeof n=="string"&&n.startsWith("*.")?".."+n.substring(2):n)),e};var yx;typeof Symbol!="function"?yx="@@xmlMetadata":yx=Symbol("XML Node Metadata");var ai=class{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&ObjLine truncated
|
||||
`);let e=new ai("!xml"),r=e,n="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=new nB(this.options.processEntities);for(let i=0;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="/"){let a=wf(t,">",i,"Closing Tag is not closed."),c=t.substring(i+2,a).trim();if(this.options.removeNSPrefix){let u=c.indexOf(":");u!==-1&&(c=c.substr(u+1))}c=J8(this.options.transformTagName,c,"",this.options).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let A=this.matcher.getCurrentTag();if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);A&&this.options.unpairedTags.indexOf(A)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",i=a}else if(t[i+1]==="?"){let a=z8(t,i,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,this.readonlyMatcher),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){let c=new ai(a.tagName);c.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(c[":@"]=this.buildAttributesMap(a.tagExp,this.matcher,a.tagName)),this.addChild(r,c,this.readonlyMatcher,i)}i=a.closeIndex+1}else if(t.substr(i+1,3)==="!--"){let a=wf(t,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){let c=t.substring(i+4,a-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}i=a}else if(t.substr(i+1,2)==="!D"){let a=s.readDocType(t,i);this.docTypeEntities=a.entities,i=a.i}else if(t.substr(i+1,2)==="!["){let a=wf(t,"]]>",i,"CDATA is not closed.")-2,c=t.substring(i+9,a);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let A=this.parseTextData(c,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);A==null&&(A=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):r.add(this.options.textNodeName,A),i=a+2}else{let a=z8(t,i,this.options.removeNSPrefix);if(!a){let y=t.substring(Math.max(0,i-50),Math.min(t.length,i+50));throw new Error(`readTagExp returned undefined at position ${i}. Context: "${y}"`)}let c=a.tagName,A=a.rawTagName,u=a.tagExp,l=a.attrExpPresent,d=a.closeIndex;if({tagName:c,tagExp:u}=J8(this.options.transformTagName,c,u,this.options),this.options.strictReservedNames&&(c===this.options.commentPropName||c===this.options.cdataPropName||c===this.options.textNodeName||c===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${c}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let h=r;h&&this.options.unpairedTags.indexOf(h.tagname)!==-1&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let f=!1;u.length>0&&u.lastIndexOf("/")===u.length-1&&(f=!0,c[c.length-1]==="/"?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),l=c!==u);let p=null,I={},m;m=oit(A),c!==e.tagname&&this.matcher.push(c,{},m),c!==u&&l&&(p=this.buildAttributesMap(u,this.matcher,c),p&&(I=iit(p,this.options))),c!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let C=i;if(this.isCurrentNodeStopNode){let y="";if(f)i=a.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)i=a.closeIndex;else{let M=this.readStopNodeData(t,A,d+1);if(!M)throw new Error(`Unexpected end of ${A}`);i=M.i,y=M.tagContent}let N=new ai(c);p&&(N[":@"]=p),N.add(this.options.textNodeName,y),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,N,this.readonlyMatcher,C)}else{if(f){({tagName:c,tagExp:u}=J8(this.options.transformTagName,c,u,this.options));let y=new ai(c);p&&(y[":@"]=p),this.addChild(r,y,this.readonlyMatcher,C),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(c)!==-1){let y=new ai(c);p&&(y[":@"]=p),this.addChild(r,y,this.readonlyMatcher,C),this.matcher.pop(),this.isCurrentNodeStopNode=!1,i=a.closeIndex;continue}else{let y=new ai(c);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),p&&(y[":@"]=p),this.addChild(r,y,this.readonlyMatcher,C),r=y}n="",i=d}}else n+=t[i];return e.child};function hit(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.jPath?r.toString():r,i=this.options.updateTag(e.tagname,s,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}function fit(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let s=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return t}if(n.tagFilter){let s=this.options.jPath?r.toString():r;if(!n.tagFilter(e,s))return t}for(let s of Object.keys(this.docTypeEntities)){let i=this.docTypeEntities[s],o=t.match(i.regx);if(o){if(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded
Line truncated
|
||||
`;function Z8(t,e){let r="";e.format&&e.indentBy.length>0&&(r=bit);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let i=0;i<e.stopNodes.length;i++){let o=e.stopNodes[i];typeof o=="string"?n.push(new Vi(o)):o instanceof Vi&&n.push(o)}let s=new Gc;return pfe(t,e,r,s,n)}function pfe(t,e,r,n,s){let i="",o=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let a=t.toString();return a=X8(a,e),a}return""}for(let a=0;a<t.length;a++){let c=t[a],A=Efe(c);if(A===void 0)continue;let u=Qit(c[":@"],e);n.push(A,u);let l=Sit(n,s);if(A===e.textNodeName){let I=c[A];l||(I=e.tagValueProcessor(A,I),I=X8(I,e)),o&&(i+=r),i+=I,o=!1,n.pop();continue}else if(A===e.cdataPropName){o&&(i+=r),i+=`<![CDATA[${c[A][0][e.textNodeName]}]]>`,o=!1,n.pop();continue}else if(A===e.commentPropName){i+=r+`<!--${c[A][0][e.textNodeName]}-->`,o=!0,n.pop();continue}else if(A[0]==="?"){let I=gfe(c[":@"],e,l),m=A==="?xml"?"":r,C=c[A][0][e.textNodeName];C=C.length!==0?" "+C:"",i+=m+`<${A}${C}${I}?>`,o=!0,n.pop();continue}let d=r;d!==""&&(d+=e.indentBy);let h=gfe(c[":@"],e,l),f=r+`<${A}${h}`,p;l?p=mfe(c[A],e):p=pfe(c[A],e,d,n,s),e.unpairedTags.indexOf(A)!==-1?e.suppressUnpairedNode?i+=f+">":i+=f+"/>":(!p||p.length===0)&&e.suppressEmptyNode?i+=f+"/>":p&&p.endsWith(">")?i+=f+`>${p}${r}</${A}>`:(i+=f+">",p&&r!==""&&(p.includes("/>")||p.includes("</"))?i+=r+e.indentBy+p+r:i+=p,i+=`</${A}>`),o=!0,n.pop()}return i}function Qit(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s;r[i]=t[s],n=!0}return n?r:null}function mfe(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let s=t[n],i=Efe(s);if(i===e.textNodeName)r+=s[i];else if(i===e.cdataPropName)r+=s[i][0][e.textNodeName];else if(i===e.commentPropName)r+=s[i][0][e.textNodeName];else{if(i&&i[0]==="?")continue;if(i){let o=wit(s[":@"],e),a=mfe(s[i],e);!a||a.length===0?r+=`<${i}${o}/>`:r+=`<${i}${o}>${a}</${i}>`}}}return r}function wit(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=t[n];s===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return r}function Efe(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}}function gfe(t,e,r){let n="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i;r?i=t[s]:(i=e.attributeValueProcessor(s,t[s]),i=X8(i,e)),i===!0&&e.suppressBooleanAttributes?n+=` ${s.substr(e.attributeNamePrefix.length)}`:n+=` ${s.substr(e.attributeNamePrefix.length)}="${i}"`}return n}function Sit(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}function X8(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}function e4(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}var Nit={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function Ai(t){if(this.options=Object.assign({},Nit,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&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let r=this.options.stopNodes[e];typeof r=="string"?this.stopNodeExpressions.push(new Vi(r)):r instanceof Vi&&this.stopNodeExpressions.push(r)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e4(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Rit),this.processTextOrObjNode=Tit,this.options.format?(this.indentate=xit,this.tagEndChar=`>
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}di.prototype.build=function(t){if(this.options.preserveOrder)return j8(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Gc;return this.j2x(t,0,e).val}};di.prototype.j2x=function(t,e,r){let n="",s="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let i=this.options.jPath?r.toString():r,o=this.checkStopNode(r);for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a))if(typeof t[a]>"u")this.isAttribute(a)&&(s+="");else if(t[a]===null)this.isAttribute(a)||a===this.options.cdataPropName?s+="":a[0]==="?"?s+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)s+=this.buildTextValNode(t[a],a,"",e,r);else if(typeof t[a]!="object"){let c=this.isAttribute(a);if(c&&!this.ignoreAttributesFn(c,i))n+=this.buildAttrPairStr(c,""+t[a],o);else if(!c)if(a===this.options.textNodeName){let A=this.options.tagValueProcessor(a,""+t[a]);s+=this.replaceEntitiesValue(A)}else{r.push(a);let A=this.checkStopNode(r);if(r.pop(),A){let u=""+t[a];u===""?s+=this.indentate(e)+"<"+a+this.closeTag(a)+this.tagEndChar:s+=this.indentate(e)+"<"+a+">"+u+"</"+a+this.tagEndChar}else s+=this.buildTextValNode(t[a],a,"",e,r)}}else if(Array.isArray(t[a])){let c=t[a].length,A="",u="";for(let l=0;l<c;l++){let d=t[a][l];if(!(typeof d>"u"))if(d===null)a[0]==="?"?s+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(typeof d=="object")if(this.options.oneListGroup){r.push(a);let h=this.j2x(d,e+1,r);r.pop(),A+=h.val,this.options.attributesGroupName&&d.hasOwnProperty(this.options.attributesGroupName)&&(u+=h.attrStr)}else A+=this.processTextOrObjNode(d,a,e,r);else if(this.options.oneListGroup){let h=this.options.tagValueProcessor(a,d);h=this.replaceEntitiesValue(h),A+=h}else{r.push(a);let h=this.checkStopNode(r);if(r.pop(),h){let f=""+d;f===""?A+=this.indentate(e)+"<"+a+this.closeTag(a)+this.tagEndChar:A+=this.indentate(e)+"<"+a+">"+f+"</"+a+this.tagEndChar}else A+=this.buildTextValNode(d,a,"",e,r)}}this.options.oneListGroup&&(A=this.buildObjectNode(A,a,u,e)),s+=A}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){let c=Object.keys(t[a]),A=c.length;for(let u=0;u<A;u++)n+=this.buildAttrPairStr(c[u],""+t[a][c[u]],o)}else s+=this.processTextOrObjNode(t[a],a,e,r);return{attrStr:n,val:s}};di.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+'="'+e+'"'};function Bit(t,e,r,n){let s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){let a=this.buildRawContent(t),c=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(a,e,c,r)}let o=this.j2x(t,r+1,n);return n.pop(),t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,o.attrStr,r,n):this.buildObjectNode(o.val,e,o.attrStr,r)}di.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 s in n){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let i=s.startsWith(this.options.attributeNamePrefix)?s.substring(this.options.attributeNamePrefix.length):s;e[i]=n[s],r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=this.isAttribute(n);s&&(e[s]=t[n],r=!0)}return r?e:null};di.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.options.attributesGroupName)continue;let n=t[r];if(r===this.options.textNodeName)e+=n;else if(Array.isArray(n)){for(let s of n)if(typeof s=="string"||typeof s=="number")e+=`<${r}>${s}</${r}>`;else if(typeof s=="object"&&s!==null){let i=this.buildRawContent(s),o=this.buildAttributesForStopNode(s);i===""?e+=`<${r}${o}/>`:e+=`<${r}${o}>${i}</${r}>`}}else if(typeof n=="object"&&n!==null){let s=this.buildRawContent(n),i=this.buildAttributesForStopNode(n);s===""?e+=`<${r}${i}/>`:e+=`<${r}${i}>${s}</${r}>`}else e+=`<${r}>${n}</${r}>`}return e};di.prototype.buildAttributesForStopNode=function(t){if(!t||typeof t!="object")return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let r=t[this.options.attributesGroupName];for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n))continue;let s=n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):
Line truncated
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Ai.prototype.build=function(t){if(this.options.preserveOrder)return Z8(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Gc;return this.j2x(t,0,e).val}};Ai.prototype.j2x=function(t,e,r){let n="",s="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let i=this.options.jPath?r.toString():r,o=this.checkStopNode(r);for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a))if(typeof t[a]>"u")this.isAttribute(a)&&(s+="");else if(t[a]===null)this.isAttribute(a)||a===this.options.cdataPropName?s+="":a[0]==="?"?s+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)s+=this.buildTextValNode(t[a],a,"",e,r);else if(typeof t[a]!="object"){let c=this.isAttribute(a);if(c&&!this.ignoreAttributesFn(c,i))n+=this.buildAttrPairStr(c,""+t[a],o);else if(!c)if(a===this.options.textNodeName){let A=this.options.tagValueProcessor(a,""+t[a]);s+=this.replaceEntitiesValue(A)}else{r.push(a);let A=this.checkStopNode(r);if(r.pop(),A){let u=""+t[a];u===""?s+=this.indentate(e)+"<"+a+this.closeTag(a)+this.tagEndChar:s+=this.indentate(e)+"<"+a+">"+u+"</"+a+this.tagEndChar}else s+=this.buildTextValNode(t[a],a,"",e,r)}}else if(Array.isArray(t[a])){let c=t[a].length,A="",u="";for(let l=0;l<c;l++){let d=t[a][l];if(!(typeof d>"u"))if(d===null)a[0]==="?"?s+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(typeof d=="object")if(this.options.oneListGroup){r.push(a);let h=this.j2x(d,e+1,r);r.pop(),A+=h.val,this.options.attributesGroupName&&d.hasOwnProperty(this.options.attributesGroupName)&&(u+=h.attrStr)}else A+=this.processTextOrObjNode(d,a,e,r);else if(this.options.oneListGroup){let h=this.options.tagValueProcessor(a,d);h=this.replaceEntitiesValue(h),A+=h}else{r.push(a);let h=this.checkStopNode(r);if(r.pop(),h){let f=""+d;f===""?A+=this.indentate(e)+"<"+a+this.closeTag(a)+this.tagEndChar:A+=this.indentate(e)+"<"+a+">"+f+"</"+a+this.tagEndChar}else A+=this.buildTextValNode(d,a,"",e,r)}}this.options.oneListGroup&&(A=this.buildObjectNode(A,a,u,e)),s+=A}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){let c=Object.keys(t[a]),A=c.length;for(let u=0;u<A;u++)n+=this.buildAttrPairStr(c[u],""+t[a][c[u]],o)}else s+=this.processTextOrObjNode(t[a],a,e,r);return{attrStr:n,val:s}};Ai.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+'="'+e+'"'};function Tit(t,e,r,n){let s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){let a=this.buildRawContent(t),c=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(a,e,c,r)}let o=this.j2x(t,r+1,n);return n.pop(),t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,o.attrStr,r,n):this.buildObjectNode(o.val,e,o.attrStr,r)}Ai.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 s in n){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let i=s.startsWith(this.options.attributeNamePrefix)?s.substring(this.options.attributeNamePrefix.length):s;e[i]=n[s],r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=this.isAttribute(n);s&&(e[s]=t[n],r=!0)}return r?e:null};Ai.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.options.attributesGroupName)continue;let n=t[r];if(r===this.options.textNodeName)e+=n;else if(Array.isArray(n)){for(let s of n)if(typeof s=="string"||typeof s=="number")e+=`<${r}>${s}</${r}>`;else if(typeof s=="object"&&s!==null){let i=this.buildRawContent(s),o=this.buildAttributesForStopNode(s);i===""?e+=`<${r}${o}/>`:e+=`<${r}${o}>${i}</${r}>`}}else if(typeof n=="object"&&n!==null){let s=this.buildRawContent(n),i=this.buildAttributesForStopNode(n);s===""?e+=`<${r}${i}/>`:e+=`<${r}${i}>${s}</${r}>`}else e+=`<${r}>${n}</${r}>`}return e};Ai.prototype.buildAttributesForStopNode=function(t){if(!t||typeof t!="object")return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let r=t[this.options.attributesGroupName];for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n))continue;let s=n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(je.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===je.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(je.PREFIX_FOR_STORAGE));r.sort((s,i)=>Nx(s.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((s,i,o)=>!(i>0&&s.name.toLowerCase()===o[i-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=Qx(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=wx(e.url),i={};if(s){let o=[];for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){let c=a.toLowerCase();i[c]=s[a],o.push(c)}o.sort();for(let a of o)n+=`
|
||||
${a}:${decodeURIComponent(i[a])}`}return n}};var Ur=class extends Sf{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new nB(e,r,this)}computeHMACSHA256(e){return _it("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var Nf=class extends Error{constructor(e){super(e),this.name="AbortError"}};var mn=Lo("storage-common");var Uo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Uo||(Uo={}));var cd={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Uo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Fit=new Nf("The operation was aborted."),sB=class extends qc{retryOptions;constructor(e,r,n=cd){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:cd.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):cd.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:cd.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:cd.maxRetryDelayInMs):cd.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:cd.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:cd.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=bx(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=ad(s.url,Du.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(mn.info(`RetryPolicy: =====> Try=${n} ${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,o))return o;r=r||!i&&o.status===404}catch(a){if(mn.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(i,n,o,a))throw a}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return mn.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(let o of i)if(s.name.toUpperCase().includes(o)||s.message.toUpperCase().includes(o)||s.code&&s.code.toString().toUpperCase()===o)return mn.info(`RetryPolicy: Network error ${o} found, will retry.`),!0}if(n||s){let o=n?n.status:s?s.statusCode:0;if(!e&&o===404)return mn.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return mn.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(n&&n?.status>=400){let o=n.headers.get(je.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(mn.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case Uo.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Uo.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return mn.info(`RetryPolicy: Delay for ${s}ms`),Sx(s,n,Fit)}};var iB=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new sB(e,r,this.retryOptions)}};var Mit="storageBrowserPolicy";function Sfe(){return{name:Mit,async sendRequest(t,e){return Ot||((t.method==="GET"||t.method==="HEAD")&&(t.url=ad(t.url,Du.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(je.COOKIE),t.headers.delete(je.CONTENT_LENGTH)),e(t)}}}var Lit="StorageCorrectContentLengthPolicy";function Nfe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(je.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:Lit,async sendRequest(e,r){return t(e),r(e)}}}var Uit="storageRetryPolicy",n0={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Uo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Pit=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],Oit=new Nf("The operation was aborted.");function Tfe(t={}){let e=t.retryPolicyType??n0.retryPolicyType,r=t.maxTries??n0.maxTries,n=t.retryDelayInMs??n0.retryDelayInMs,s=t.maxRetryDelayInMs??n0.maxRetryDelayInMs,i=t.secondaryHost??n0.secondaryHost,o=t.tryTimeoutInMs??n0.tryTimeoutInMs;function a({isPrimaryRetry:A,attempt:u,response:l,error:d}){if(u>=r)return mn.info(`RetryPolicy: Attempt(s) ${u} >= maxTries ${r}, no further try.`),!1;if(d){for(let h of Pit)if(d.name.toUpperCase().includes(h)||d.message.toUpperCase().in
Line truncated
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(je.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===je.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(je.PREFIX_FOR_STORAGE));r.sort((s,i)=>kx(s.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((s,i,o)=>!(i>0&&s.name.toLowerCase()===o[i-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=xx(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=Rx(e.url),i={};if(s){let o=[];for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){let c=a.toLowerCase();i[c]=s[a],o.push(c)}o.sort();for(let a of o)n+=`
|
||||
${a}:${decodeURIComponent(i[a])}`}return n}};var Ur=class extends Nf{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new cB(e,r,this)}computeHMACSHA256(e){return Oit("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var Tf=class extends Error{constructor(e){super(e),this.name="AbortError"}};var En=Fo("storage-common");var Mo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Mo||(Mo={}));var ud={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Mo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Hit=new Tf("The operation was aborted."),AB=class extends qc{retryOptions;constructor(e,r,n=ud){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:ud.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):ud.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:ud.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:ud.maxRetryDelayInMs):ud.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:ud.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:ud.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=Tx(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=Ad(s.url,Du.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(En.info(`RetryPolicy: =====> Try=${n} ${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,o))return o;r=r||!i&&o.status===404}catch(a){if(En.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(i,n,o,a))throw a}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return En.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(let o of i)if(s.name.toUpperCase().includes(o)||s.message.toUpperCase().includes(o)||s.code&&s.code.toString().toUpperCase()===o)return En.info(`RetryPolicy: Network error ${o} found, will retry.`),!0}if(n||s){let o=n?n.status:s?s.statusCode:0;if(!e&&o===404)return En.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return En.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(n&&n?.status>=400){let o=n.headers.get(je.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(En.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case Mo.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Mo.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return En.info(`RetryPolicy: Delay for ${s}ms`),Dx(s,n,Hit)}};var uB=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new AB(e,r,this.retryOptions)}};var Git="storageBrowserPolicy";function bfe(){return{name:Git,async sendRequest(t,e){return Wt||((t.method==="GET"||t.method==="HEAD")&&(t.url=Ad(t.url,Du.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(je.COOKIE),t.headers.delete(je.CONTENT_LENGTH)),e(t)}}}var qit="StorageCorrectContentLengthPolicy";function Qfe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(je.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:qit,async sendRequest(e,r){return t(e),r(e)}}}var Yit="storageRetryPolicy",i0={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Mo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Vit=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],Wit=new Tf("The operation was aborted.");function wfe(t={}){let e=t.retryPolicyType??i0.retryPolicyType,r=t.maxTries??i0.maxTries,n=t.retryDelayInMs??i0.retryDelayInMs,s=t.maxRetryDelayInMs??i0.maxRetryDelayInMs,i=t.secondaryHost??i0.secondaryHost,o=t.tryTimeoutInMs??i0.tryTimeoutInMs;function a({isPrimaryRetry:A,attempt:u,response:l,error:d}){if(u>=r)return En.info(`RetryPolicy: Attempt(s) ${u} >= maxTries ${r}, no further try.`),!1;if(d){for(let h of Vit)if(d.name.toUpperCase().includes(h)||d.message.toUpperCase().in
Line truncated
|
||||
`)+`
|
||||
`+n(i)+s(i),a=Hit("sha256",t.accountKey).update(o,"utf8").digest("base64");i.headers.set(je.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(i,o){let a=i.headers.get(o);return!a||o===je.CONTENT_LENGTH&&a==="0"?"":a}function n(i){let o=[];for(let[c,A]of i.headers)c.toLowerCase().startsWith(je.PREFIX_FOR_STORAGE)&&o.push({name:c,value:A});o.sort((c,A)=>Nx(c.name.toLowerCase(),A.name.toLowerCase())),o=o.filter((c,A,u)=>!(A>0&&c.name.toLowerCase()===u[A-1].name.toLowerCase()));let a="";return o.forEach(c=>{a+=`${c.name.toLowerCase().trimRight()}:${c.value.trimLeft()}
|
||||
`}),a}function s(i){let o=Qx(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=wx(i.url),A={};if(c){let u=[];for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let d=l.toLowerCase();A[d]=c[l],u.push(d)}u.sort();for(let l of u)a+=`
|
||||
${l}:${decodeURIComponent(A[l])}`}return a}return{name:Git,async sendRequest(i,o){return e(i),o(i)}}}var qit="storageRequestFailureDetailsParserPolicy";function xfe(){return{name:qit,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}}}}import{createHmac as Yit}from"node:crypto";var Tx=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return Yit("sha256",this.key).update(e,"utf8").digest("base64")}};var xx="12.31.0",Rx="2026-02-06";var Dx="https://storage.azure.com/.default",ku={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var Ya="",r4="*",Vit=1*1024*1024;var Wit=4*Vit;var Rfe="AES256",Dfe="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",kfe=["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"],vfe=["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"],_fe="BlobUsesCustomerSpecifiedEncryption",Ffe="BlobDoesNotUseCustomerSpecifiedEncryption",Mfe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function vu(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}var oB=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function en(t,e={}){t||(t=new Sr);let r=new oB([],e);return r._credential=t,r}function Jit(t){let e=[zit,Lfe,jit,Kit,$it,Xit,eot];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>Zit(s));return{wrappedPolicies:P8(r),afterRetry:n}}}}function n4(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?O8(e):e4(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let i=`azsdk-js-azure-storage-blob/${xx}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;s=qy({...r,loggingOptions:{additionalAllowedHeaderNames:kfe,additionalAllowedQueryParameters:vfe,logger:Ex.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:mx,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:X8,serializerOptions:{xml:{xmlCharKey:"#"}}}}),s.removePolicy({phase:"Retry"}),s.removePolicy({name:g8}),s.addPolicy(Nfe()),s.addPolicy(Tfe(r.retryOptions),{phase:"Retry"}),s.addPolicy(xfe()),s.addPolicy(Sfe());let a=Jit(t);a&&s.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let c=s4(t);Vi(c)?s.addPolicy(Zm({credential:c,scopes:r.audience??
Line truncated
|
||||
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new ja(t.version,i,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:s}}function zat(t,e){if(t=Mf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ht(t.startsOn,!1):"",t.expiresOn?Ht(t.expiresOn,!1):"",Ff(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?za(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(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ja(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function jat(t,e){if(t=Mf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ht(t.startsOn,!1):"",t.expiresOn?Ht(t.expiresOn,!1):"",Ff(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?za(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(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ja(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function Kat(t,e){if(t=Mf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ht(t.startsOn,!1):"",t.expiresOn?Ht(t.expiresOn,!1):"",Ff(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ht(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ht(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?za(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ja(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}function $at(t,e){if(t=Mf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ht(t.startsOn,!1):"",t.expiresOn?Ht(t.expiresOn,!1):"",Ff(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ht(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ht(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?za(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ja(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function Xat(t,e){if(t=Mf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ht(t.startsOn,!1):"",t.expiresOn?Ht(t.expiresOn,!1):"",Ff(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ht(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ht(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?za(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ja(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function Zat(t,e){if(t=Mf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ht(t.startsOn,!1):"",t.expiresOn?Ht(t.expiresOn,!1):"",Ff(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ht(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ht(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?za(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new ja(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function Ff(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function Mf(t){let e=t.version?t.version:Rx;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var EB=class{_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=$m()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Ya||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ya||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 Be.withSpan("BlobLeaseClient-acquireLease",r,async n=>ve(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!==Ya||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ya||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 Be.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=ve(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Ya||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Ya||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 Be.withSpan("BlobLeaseClient-releaseLease",e,async r=>ve(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!==Ya||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Ya||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 Be.withSpan("BlobLeaseClient-renewLease",e,async r=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.ab
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"}};h0.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Pf=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
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"}};Pf.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var SB=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var Bct=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},DH=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);$(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Kge(t,e,r){return Bct(this,void 0,void 0,function*(){var n;let s=new Ka(t),i=s.getBlockBlobClient(),o=new DH((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),O(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new wR(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw Ve(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}import*as Xge from"buffer";import*as cA from"fs";import*as Zge from"stream";import*as epe from"util";var SR=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function NR(t){return t?t>=200&&t<300:!1}function bct(t){return t?t>=500:!0}function Qct(t){return t?[tr.BadGateway,tr.ServiceUnavailable,tr.GatewayTimeout].includes(t):!1}function wct(t){return SR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function $ge(t,e,r){return SR(this,arguments,void 0,function*(n,s,i,o=gT,a=pT,c=void 0){let A="",u=1;for(;u<=o;){let l,d,h=!1;try{l=yield s()}catch(f){c&&(l=c(f)),h=!0,A=f.message}if(l&&(d=i(l),!bct(d)))return l;if(d&&(h=Qct(d),A=`Cache service responded with ${d}`),O(`${n} - Attempt ${u} of ${o} failed with error: ${A}`),!h){O(`${n} - Error is not retryable`);break}yield wct(a),u++}throw Error(`${n} failed: ${A}`)})}function NB(t,e){return SR(this,arguments,void 0,function*(r,n,s=gT,i=pT){return yield $ge(r,n,o=>o.statusCode,s,i,o=>{if(o instanceof kc)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function f0(t,e){return SR(this,arguments,void 0,function*(r,n,s=gT,i=pT){return yield $ge(r,n,o=>o.message.statusCode,s,i)})}var qo=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function Sct(t,e){return qo(this,void 0,void 0,function*(){yield epe.promisify(Zge.pipeline)(t.message,e)})}var TR=class{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,O(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.segmentOffset+this.receivedBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);$(`Received ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3)
Line truncated
|
||||
Other caches with similar key:`);for(let a of i?.artifactCaches||[])O(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function FH(t,e,r){return fi(this,void 0,void 0,function*(){let n=new Dct(t),s=spe(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield rpe(t,e,s):s.concurrentBlobDownloads?yield tpe(t,e,s):yield xR(t,e):yield xR(t,e)})}function lpe(t,e,r){return fi(this,void 0,void 0,function*(){let n=_H(),s=Hm(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield NB("reserveCache",()=>fi(this,void 0,void 0,function*(){return n.postJson(xB("caches"),i)}))})}function Ape(t,e){return`bytes ${t}-${e}/*`}function Fct(t,e,r,n,s){return fi(this,void 0,void 0,function*(){O(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${Ape(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":Ape(n,s)},o=yield f0(`uploadChunk (start: ${n}, end: ${s})`,()=>fi(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!NR(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function Mct(t,e,r,n){return fi(this,void 0,void 0,function*(){let s=Mc(r),i=xB(`caches/${e.toString()}`),o=g0.openSync(r,"r"),a=kH(n),c=y3("uploadConcurrency",a.uploadConcurrency),A=y3("uploadChunkSize",a.uploadChunkSize),u=[...new Array(c).keys()];O("Awaiting all uploads");let l=0;try{yield Promise.all(u.map(()=>fi(this,void 0,void 0,function*(){for(;l<s;){let d=Math.min(s-l,A),h=l,f=l+d-1;l+=A,yield Fct(t,i,()=>g0.createReadStream(r,{fd:o,start:h,end:f,autoClose:!1}).on("error",p=>{throw new Error(`Cache upload failed because file read failed with ${p.message}`)}),h,f)}})))}finally{g0.closeSync(o)}})}function Lct(t,e,r){return fi(this,void 0,void 0,function*(){let n={size:r};return yield NB("commitCache",()=>fi(this,void 0,void 0,function*(){return t.postJson(xB(`caches/${e.toString()}`),n)}))})}function MH(t,e,r,n){return fi(this,void 0,void 0,function*(){if(kH(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Kge(r,e,n)}else{let i=_H();O("Upload cache"),yield Mct(i,t,e,n),O("Commiting cache");let o=Mc(e);$(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield Lct(i,t,o);if(!NR(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);$("Cache saved successfully")}})}var sme=Ae(N9(),1),rn=Ae(ut(),1),Ki=Ae(ut(),1),Yf=Ae(ut(),1),Vf=Ae(ut(),1),Wf=Ae(ut(),1);var D9=Ae(ut(),1),k9=Ae(ut(),1),tme=Ae(ut(),1),rme=Ae(ut(),1),nme=Ae(ut(),1);var T9=Ae(ut(),1),x9=Ae(ut(),1),Xpe=Ae(ut(),1),Zpe=Ae(ut(),1),eme=Ae(ut(),1),R9=class extends eme.MessageType{constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Zpe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Xpe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let A=n.readUnknownField;if(A==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let u=e.skip(c);A!==!1&&(A===!0?x9.UnknownFieldHandler.onRead:A)(this.typeName,i,a,c,u)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,T9.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,T9.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?x9.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},pD=new R9;var v9=class extends nme.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>pD}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,rme.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,tme.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(pD.internalBinaryRead(e,e.uint32(),n));break;default:let A=n.readUnknownField;if(A==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let u=e.skip(c);A!==!1&&(A===!0?k9.UnknownFieldHandler.onRead:A)(this.typeName,i,a,c,u)}}return i}internalBinaryWrite(e,r,n){e.repositoryId!=="0"&&r.tag(1,D9.WireType.Varint).int64(e.repositoryId);for(let i=0;i<e.scope.length;i++)pD.internalBinaryWrite(e.scope[i],r.tag(2,D9.WireType.LengthDelimited).fork(),n).join();let s=n.writeUnknownFields;return s!==!1&&(s==!0?k9.UnknownFieldHandler.onWrite:s
Line truncated
|
||||
`));let n=yield z9(r,"create");yield j9(n,t)})}var D0=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},Xi=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},md=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},CD=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function cme(t){if(!t||t.length===0)throw new Xi("Path Validation Error: At least one directory or file path is required")}function X9(t){if(t.length>512)throw new Xi(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Xi(`Key Validation Error: ${t} cannot contain commas.`)}function Ame(){return TB()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function ID(t,e,r,n){return D0(this,arguments,void 0,function*(s,i,o,a,c=!1){let A=TB();return O(`Cache service version: ${A}`),cme(s),A==="v2"?yield elt(s,i,o,a,c):yield Zut(s,i,o,a,c)})}function Zut(t,e,r,n){return D0(this,arguments,void 0,function*(s,i,o,a,c=!1){o=o||[];let A=[i,...o];if(O("Resolved Keys:"),O(JSON.stringify(A)),A.length>10)throw new Xi("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of A)X9(d);let u=yield ky(),l="";try{let d=yield upe(A,s,{compressionMethod:u,enableCrossOsArchive:c});if(!d?.archiveLocation)return;if(a?.lookupOnly)return $("Lookup only - skipping download"),d.cacheKey;l=VB.join(yield Ry(),td(u)),O(`Archive Path: ${l}`),yield FH(d.archiveLocation,l,a),Pa()&&(yield YB(l,u));let h=Mc(l);return $(`Cache Size: ~${Math.round(h/(1024*1024))} MB (${h} B)`),yield K9(l,u),$("Cache restored successfully"),d.cacheKey}catch(d){let h=d;if(h.name===Xi.name)throw d;h instanceof kc&&typeof h.statusCode=="number"&&h.statusCode>=500?_c(`Failed to restore: ${d.message}`):Ve(`Failed to restore: ${d.message}`)}finally{try{yield Dy(l)}catch(d){O(`Failed to delete archive: ${d}`)}}})}function elt(t,e,r,n){return D0(this,arguments,void 0,function*(s,i,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let A=[i,...o];if(O("Resolved Keys:"),O(JSON.stringify(A)),A.length>10)throw new Xi("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of A)X9(l);let u="";try{let l=J9(),d=yield ky(),h={key:i,restoreKeys:o,version:Hm(s,d,c)},f=yield l.GetCacheEntryDownloadURL(h);if(!f.ok){O(`Cache not found for version ${h.version} of keys: ${A.join(", ")}`);return}if(h.key!==f.matchedKey?$(`Cache hit for restore-key: ${f.matchedKey}`):$(`Cache hit for: ${f.matchedKey}`),a?.lookupOnly)return $("Lookup only - skipping download"),f.matchedKey;u=VB.join(yield Ry(),td(d)),O(`Archive path: ${u}`),O(`Starting download of archive to: ${u}`),yield FH(f.signedDownloadUrl,u,a);let I=Mc(u);return $(`Cache Size: ~${Math.round(I/(1024*1024))} MB (${I} B)`),Pa()&&(yield YB(u,d)),yield K9(u,d),$("Cache restored successfully"),f.matchedKey}catch(l){let d=l;if(d.name===Xi.name)throw l;d instanceof kc&&typeof d.statusCode=="number"&&d.statusCode>=500?_c(`Failed to restore: ${l.message}`):Ve(`Failed to restore: ${l.message}`)}finally{try{u&&(yield Dy(u))}catch(l){O(`Failed to delete archive: ${l}`)}}})}function yD(t,e,r){return D0(this,arguments,void 0,function*(n,s,i,o=!1){let a=TB();return O(`Cache service version: ${a}`),cme(n),X9(s),a==="v2"?yield rlt(n,s,i,o):yield tlt(n,s,i,o)})}function tlt(t,e,r){return D0(this,arguments,void 0,function*(n,s,i,o=!1){var a,c,A,u,l;let d=yield ky(),h=-1,f=yield I3(n);if(O("Cache Paths:"),O(`${JSON.stringify(f)}`),f.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let p=yield Ry(),I=VB.join(p,td(d));O(`Archive Path: ${I}`);try{yield $9(p,f,d),Pa()&&(yield YB(I,d));let m=10*1024*1024*1024,C=Mc(I);if(O(`File Size: ${C}`),C>m&&!vH())throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`);O("Reserving Cache");let y=yield lpe(s,n,{compressionMethod:d,enableCrossOsArchive:o,cacheSize:C});if(!((a=y?.result)===null||a===void 0)&&a.cacheId)h=(c=y?.result)===null||c===void 0?void 0:c.cacheId;else throw y?.statusCode===400?new Error((u=(A=y?.error)===null||A===void 0?void 0:A.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the data cap limit, not saving cache.`):new md(`Unable to reserve cache with key ${s}, another job may be creating this cache. More details: ${(l=y?.error)===null||l===void 0?void 0:l.message}`);O(`Saving Cache (ID: ${h})`),yield MH(h,I,"",i)}catch(m){let C=m;if(C.name===Xi.name)throw m;C.name===md.name
Line truncated
|
||||
See ${r.getDocumentationLink()}`;ume.push(n),Kl(n)}function dme(){bu("deprecation-collector_deprecations",JSON.stringify(eG)),bu("deprecation-collector_errors",JSON.stringify(ume))}import*as QD from"path";var hme="GRADLE_ACTION_ID";var xD=".setup-gradle",wD=class t{getDependencyGraphOption(){let e=hr("dependency-graph");switch(e.toLowerCase().trim()){case"disabled":return"disabled";case"generate":return"generate";case"generate-and-submit":return"generate-and-submit";case"generate-submit-and-upload":return"generate-submit-and-upload";case"generate-and-upload":return"generate-and-upload";case"download-and-submit":return"download-and-submit"}throw TypeError(`The value '${e}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-submit-and-upload, generate-and-upload, download-and-submit].`)}getDependencyGraphContinueOnFailure(){return fA("dependency-graph-continue-on-failure",!0)}getArtifactRetentionDays(){let e=hr("artifact-retention-days");return olt("artifact-retention-days",e,0)}getJobCorrelator(){return t.constructJobCorrelator(oi.workflow,oi.job,ilt())}getReportDirectory(){let e=hr("dependency-graph-report-dir");return QD.resolve(Gu(),e)}getDownloadArtifactName(){return process.env.DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME}getExcludeProjects(){return Jf("dependency-graph-exclude-projects")}getIncludeProjects(){return Jf("dependency-graph-include-projects")}getExcludeConfigurations(){return Jf("dependency-graph-exclude-configurations")}getIncludeConfigurations(){return Jf("dependency-graph-include-configurations")}getPluginRepository(){return new SD}static constructJobCorrelator(e,r,n){let s=this.describeMatrix(n),i=s?`${e}-${r}-${s}`:`${e}-${r}`;return this.sanitize(i)}static describeMatrix(e){O(`Got matrix json: ${e}`);let r=JSON.parse(e);return r?Object.values(r).join("-"):""}static sanitize(e){return e.replace(/[^a-zA-Z0-9_-\s]/g,"").replace(/\s+/g,"_").toLowerCase()}};var k0=class{isCacheDisabled(){return Ame()?fA("cache-disabled"):!0}isCacheReadOnly(){return!this.isCacheWriteOnly()&&fA("cache-read-only")}isCacheWriteOnly(){return fA("cache-write-only")}isCacheOverwriteExisting(){return fA("cache-overwrite-existing")}isCacheStrictMatch(){return fA("gradle-home-cache-strict-match")}getCacheCleanupOption(){let e=WB("gradle-home-cache-cleanup");if(e!==void 0)return bD("The `gradle-home-cache-cleanup` input parameter has been replaced by `cache-cleanup`"),e?"always".toString():"never".toString();let r=hr("cache-cleanup");switch(r.toLowerCase().trim()){case"always":return"always".toString();case"on-success":return"on-success".toString();case"never":return"never".toString()}throw TypeError(`The value '${r}' is not valid for cache-cleanup. Valid values are: [never, always, on-success].`)}getCacheEncryptionKey(){return hr("cache-encryption-key")}getCacheIncludes(){return fO("gradle-home-cache-includes")}getCacheExcludes(){return fO("gradle-home-cache-excludes")}isCacheLicenseAccepted(){let e=new Jo;return e.getDevelocityAccessKey()!==""||e.hasTermsOfUseAgreement()}getCacheProvider(){let e=hr("cache-provider");switch(e.toLowerCase().trim()){case"basic":return"basic";case"enhanced":case"":return"enhanced"}throw TypeError(`The value '${e}' is not valid for 'cache-provider'. Valid values are: [basic, enhanced].`)}};var Jo=class t{static{this.DevelocityAccessKeyEnvVar="DEVELOCITY_ACCESS_KEY"}static{this.GradleEnterpriseAccessKeyEnvVar="GRADLE_ENTERPRISE_ACCESS_KEY"}getBuildScanPublishEnabled(){return fA("build-scan-publish")&&this.verifyTermsOfUseAgreement()}getTermsOfUseUrl(){return hr("build-scan-terms-of-use-url")}getTermsOfUseAgree(){return hr("build-scan-terms-of-use-agree")}getDevelocityAccessKey(){return hr("develocity-access-key")||process.env[t.DevelocityAccessKeyEnvVar]||process.env[t.GradleEnterpriseAccessKeyEnvVar]||""}getDevelocityTokenExpiry(){return hr("develocity-token-expiry")}getDevelocityInjectionEnabled(){return WB("develocity-injection-enabled")}getDevelocityUrl(){return hr("develocity-url")}getDevelocityAllowUntrustedServer(){return WB("develocity-allow-untrusted-server")}getDevelocityCaptureFileFingerprints(){return WB("develocity-capture-file-fingerprints")}getDevelocityEnforceUrl(){return WB("develocity-enforce-url")}getDevelocityPluginVersion(){return hr("develocity-plugin-version")}getDevelocityCcudPluginVersion(){return hr("develocity-ccud-plugin-version")}getPluginRepository(){return new SD}hasTermsOfUseAgreement(){let e=this.getDevelocityAccessKey()!=="",r=this.getTermsOfUseUrl()==="https://gradle.com/terms-of-service"||this.getTermsOfUseUrl()==="https://gradle.com/help/legal-terms-of-use",n=this.getTermsOfUseAgree()==="yes";return e||r&&n}verifyTermsOfUseAgreement(){return this.hasTermsOfUseAgreement()?!0:(Ve("Terms of use at 'https://gradle.com/help/legal-terms-of-use' must be agreed in order to publish build scans."),!1)}},SD=class{getUrl(){return Jf("gradle-plugin-repository-url")}getUsername(){return Jf("gradle-plugin-repository
Line truncated
|
||||
`+n(i)+s(i),a=Jit("sha256",t.accountKey).update(o,"utf8").digest("base64");i.headers.set(je.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(i,o){let a=i.headers.get(o);return!a||o===je.CONTENT_LENGTH&&a==="0"?"":a}function n(i){let o=[];for(let[c,A]of i.headers)c.toLowerCase().startsWith(je.PREFIX_FOR_STORAGE)&&o.push({name:c,value:A});o.sort((c,A)=>kx(c.name.toLowerCase(),A.name.toLowerCase())),o=o.filter((c,A,u)=>!(A>0&&c.name.toLowerCase()===u[A-1].name.toLowerCase()));let a="";return o.forEach(c=>{a+=`${c.name.toLowerCase().trimRight()}:${c.value.trimLeft()}
|
||||
`}),a}function s(i){let o=xx(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=Rx(i.url),A={};if(c){let u=[];for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let d=l.toLowerCase();A[d]=c[l],u.push(d)}u.sort();for(let l of u)a+=`
|
||||
${l}:${decodeURIComponent(A[l])}`}return a}return{name:zit,async sendRequest(i,o){return e(i),o(i)}}}var jit="storageRequestFailureDetailsParserPolicy";function Sfe(){return{name:jit,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}}}}import{createHmac as Kit}from"node:crypto";var vx=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return Kit("sha256",this.key).update(e,"utf8").digest("base64")}};var _x="12.31.0",Fx="2026-02-06";var Mx="https://storage.azure.com/.default",ku={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var Va="",o4="*",$it=1*1024*1024;var Xit=4*$it;var Nfe="AES256",Tfe="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",xfe=["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"],Rfe=["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"],Dfe="BlobUsesCustomerSpecifiedEncryption",kfe="BlobDoesNotUseCustomerSpecifiedEncryption",vfe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function vu(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}var lB=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function en(t,e={}){t||(t=new wr);let r=new lB([],e);return r._credential=t,r}function Zit(t){let e=[eot,_fe,tot,rot,not,sot,oot];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>iot(s));return{wrappedPolicies:q8(r),afterRetry:n}}}}function a4(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?Y8(e):s4(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let i=`azsdk-js-azure-storage-blob/${_x}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;s=zy({...r,loggingOptions:{additionalAllowedHeaderNames:xfe,additionalAllowedQueryParameters:Rfe,logger:bx.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:Bx,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:r4,serializerOptions:{xml:{xmlCharKey:"#"}}}}),s.removePolicy({phase:"Retry"}),s.removePolicy({name:m8}),s.addPolicy(Qfe()),s.addPolicy(wfe(r.retryOptions),{phase:"Retry"}),s.addPolicy(Sfe()),s.addPolicy(bfe());let a=Zit(t);a&&s.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let c=c4(t);qi(c)?s.addPolicy(t0({credential:c,scopes:r.audience??
Line truncated
|
||||
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new Ka(t.version,i,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:s}}function ect(t,e){if(t=Lf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ot(t.startsOn,!1):"",t.expiresOn?Ot(t.expiresOn,!1):"",Mf(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ja(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(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Ka(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function tct(t,e){if(t=Lf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ot(t.startsOn,!1):"",t.expiresOn?Ot(t.expiresOn,!1):"",Mf(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ja(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(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Ka(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function rct(t,e){if(t=Lf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ot(t.startsOn,!1):"",t.expiresOn?Ot(t.expiresOn,!1):"",Mf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ot(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ot(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?ja(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Ka(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}function nct(t,e){if(t=Lf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ot(t.startsOn,!1):"",t.expiresOn?Ot(t.expiresOn,!1):"",Mf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ot(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ot(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ja(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Ka(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function sct(t,e){if(t=Lf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ot(t.startsOn,!1):"",t.expiresOn?Ot(t.expiresOn,!1):"",Mf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ot(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ot(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ja(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Ka(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function ict(t,e){if(t=Lf(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 s;t.permissions&&(t.blobName?s=oA.parse(t.permissions.toString()).toString():s=aA.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ot(t.startsOn,!1):"",t.expiresOn?Ot(t.expiresOn,!1):"",Mf(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ot(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ot(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?ja(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Ka(t.version,o,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function Mf(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function Lf(t){let e=t.version?t.version:Fx;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var bB=class{_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=Zm()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Va||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Va||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Be.withSpan("BlobLeaseClient-acquireLease",r,async n=>ve(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!==Va||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Va||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Be.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=ve(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Va||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Va||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 Be.withSpan("BlobLeaseClient-releaseLease",e,async r=>ve(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!==Va||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Va||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 Be.withSpan("BlobLeaseClient-renewLease",e,async r=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.ab
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"}};g0.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Of=class extends Error{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"}};Of.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var DB=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var Tct=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},FH=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);$(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Jge(t,e,r){return Tct(this,void 0,void 0,function*(){var n;let s=new $a(t),i=s.getBlockBlobClient(),o=new FH((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),P(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new RR(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw Ve(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}import*as jge from"buffer";import*as cA from"fs";import*as Kge from"stream";import*as $ge from"util";var DR=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function kR(t){return t?t>=200&&t<300:!1}function xct(t){return t?t>=500:!0}function Rct(t){return t?[er.BadGateway,er.ServiceUnavailable,er.GatewayTimeout].includes(t):!1}function Dct(t){return DR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function zge(t,e,r){return DR(this,arguments,void 0,function*(n,s,i,o=IT,a=yT,c=void 0){let A="",u=1;for(;u<=o;){let l,d,h=!1;try{l=yield s()}catch(f){c&&(l=c(f)),h=!0,A=f.message}if(l&&(d=i(l),!xct(d)))return l;if(d&&(h=Rct(d),A=`Cache service responded with ${d}`),P(`${n} - Attempt ${u} of ${o} failed with error: ${A}`),!h){P(`${n} - Error is not retryable`);break}yield Dct(a),u++}throw Error(`${n} failed: ${A}`)})}function kB(t,e){return DR(this,arguments,void 0,function*(r,n,s=IT,i=yT){return yield zge(r,n,o=>o.statusCode,s,i,o=>{if(o instanceof vc)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function p0(t,e){return DR(this,arguments,void 0,function*(r,n,s=IT,i=yT){return yield zge(r,n,o=>o.message.statusCode,s,i)})}var Ho=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function kct(t,e){return Ho(this,void 0,void 0,function*(){yield $ge.promisify(Kge.pipeline)(t.message,e)})}var vR=class{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,P(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.segmentOffset+this.receivedBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);$(`Received ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(e=1e3)
Line truncated
|
||||
Other caches with similar key:`);for(let a of i?.artifactCaches||[])P(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function PH(t,e,r){return li(this,void 0,void 0,function*(){let n=new Lct(t),s=tpe(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield Zge(t,e,s):s.concurrentBlobDownloads?yield Xge(t,e,s):yield _R(t,e):yield _R(t,e)})}function cpe(t,e,r){return li(this,void 0,void 0,function*(){let n=UH(),s=qm(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield kB("reserveCache",()=>li(this,void 0,void 0,function*(){return n.postJson(_B("caches"),i)}))})}function ope(t,e){return`bytes ${t}-${e}/*`}function Hct(t,e,r,n,s){return li(this,void 0,void 0,function*(){P(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${ope(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":ope(n,s)},o=yield p0(`uploadChunk (start: ${n}, end: ${s})`,()=>li(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!kR(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function Gct(t,e,r,n){return li(this,void 0,void 0,function*(){let s=Mc(r),i=_B(`caches/${e.toString()}`),o=m0.openSync(r,"r"),a=MH(n),c=S3("uploadConcurrency",a.uploadConcurrency),A=S3("uploadChunkSize",a.uploadChunkSize),u=[...new Array(c).keys()];P("Awaiting all uploads");let l=0;try{yield Promise.all(u.map(()=>li(this,void 0,void 0,function*(){for(;l<s;){let d=Math.min(s-l,A),h=l,f=l+d-1;l+=A,yield Hct(t,i,()=>m0.createReadStream(r,{fd:o,start:h,end:f,autoClose:!1}).on("error",p=>{throw new Error(`Cache upload failed because file read failed with ${p.message}`)}),h,f)}})))}finally{m0.closeSync(o)}})}function qct(t,e,r){return li(this,void 0,void 0,function*(){let n={size:r};return yield kB("commitCache",()=>li(this,void 0,void 0,function*(){return t.postJson(_B(`caches/${e.toString()}`),n)}))})}function OH(t,e,r,n){return li(this,void 0,void 0,function*(){if(MH(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Jge(r,e,n)}else{let i=UH();P("Upload cache"),yield Gct(i,t,e,n),P("Commiting cache");let o=Mc(e);$(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield qct(i,t,o);if(!kR(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);$("Cache saved successfully")}})}var tme=Ae(D9(),1),rn=Ae(At(),1),zi=Ae(At(),1),Vf=Ae(At(),1),Wf=Ae(At(),1),Jf=Ae(At(),1);var F9=Ae(At(),1),M9=Ae(At(),1),Xpe=Ae(At(),1),Zpe=Ae(At(),1),eme=Ae(At(),1);var k9=Ae(At(),1),v9=Ae(At(),1),jpe=Ae(At(),1),Kpe=Ae(At(),1),$pe=Ae(At(),1),_9=class extends $pe.MessageType{constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Kpe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,jpe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let A=n.readUnknownField;if(A==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let u=e.skip(c);A!==!1&&(A===!0?v9.UnknownFieldHandler.onRead:A)(this.typeName,i,a,c,u)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,k9.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,k9.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?v9.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},yD=new _9;var L9=class extends eme.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>yD}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,Zpe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Xpe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(yD.internalBinaryRead(e,e.uint32(),n));break;default:let A=n.readUnknownField;if(A==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let u=e.skip(c);A!==!1&&(A===!0?M9.UnknownFieldHandler.onRead:A)(this.typeName,i,a,c,u)}}return i}internalBinaryWrite(e,r,n){e.repositoryId!=="0"&&r.tag(1,F9.WireType.Varint).int64(e.repositoryId);for(let i=0;i<e.scope.length;i++)yD.internalBinaryWrite(e.scope[i],r.tag(2,F9.WireType.LengthDelimited).fork(),n).join();let s=n.writeUnknownFields;return s!==!1&&(s==!0?M9.UnknownFieldHandler.onWrite:s
Line truncated
|
||||
`));let n=yield X9(r,"create");yield Z9(n,t)})}var v0=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},Ki=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Cd=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},QD=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function ime(t){if(!t||t.length===0)throw new Ki("Path Validation Error: At least one directory or file path is required")}function rG(t){if(t.length>512)throw new Ki(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Ki(`Key Validation Error: ${t} cannot contain commas.`)}function ome(){return vB()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function wD(t,e,r,n){return v0(this,arguments,void 0,function*(s,i,o,a,c=!1){let A=vB();return P(`Cache service version: ${A}`),ime(s),A==="v2"?yield olt(s,i,o,a,c):yield ilt(s,i,o,a,c)})}function ilt(t,e,r,n){return v0(this,arguments,void 0,function*(s,i,o,a,c=!1){o=o||[];let A=[i,...o];if(P("Resolved Keys:"),P(JSON.stringify(A)),A.length>10)throw new Ki("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of A)rG(d);let u=yield Fy(),l="";try{let d=yield ape(A,s,{compressionMethod:u,enableCrossOsArchive:c});if(!d?.archiveLocation)return;if(a?.lookupOnly)return $("Lookup only - skipping download"),d.cacheKey;l=KB.join(yield vy(),td(u)),P(`Archive Path: ${l}`),yield PH(d.archiveLocation,l,a),Oa()&&(yield jB(l,u));let h=Mc(l);return $(`Cache Size: ~${Math.round(h/(1024*1024))} MB (${h} B)`),yield eG(l,u),$("Cache restored successfully"),d.cacheKey}catch(d){let h=d;if(h.name===Ki.name)throw d;h instanceof vc&&typeof h.statusCode=="number"&&h.statusCode>=500?Ui(`Failed to restore: ${d.message}`):Ve(`Failed to restore: ${d.message}`)}finally{try{yield _y(l)}catch(d){P(`Failed to delete archive: ${d}`)}}})}function olt(t,e,r,n){return v0(this,arguments,void 0,function*(s,i,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let A=[i,...o];if(P("Resolved Keys:"),P(JSON.stringify(A)),A.length>10)throw new Ki("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of A)rG(l);let u="";try{let l=$9(),d=yield Fy(),h={key:i,restoreKeys:o,version:qm(s,d,c)},f=yield l.GetCacheEntryDownloadURL(h);if(!f.ok){P(`Cache not found for version ${h.version} of keys: ${A.join(", ")}`);return}if(h.key!==f.matchedKey?$(`Cache hit for restore-key: ${f.matchedKey}`):$(`Cache hit for: ${f.matchedKey}`),a?.lookupOnly)return $("Lookup only - skipping download"),f.matchedKey;u=KB.join(yield vy(),td(d)),P(`Archive path: ${u}`),P(`Starting download of archive to: ${u}`),yield PH(f.signedDownloadUrl,u,a);let I=Mc(u);return $(`Cache Size: ~${Math.round(I/(1024*1024))} MB (${I} B)`),Oa()&&(yield jB(u,d)),yield eG(u,d),$("Cache restored successfully"),f.matchedKey}catch(l){let d=l;if(d.name===Ki.name)throw l;d instanceof vc&&typeof d.statusCode=="number"&&d.statusCode>=500?Ui(`Failed to restore: ${l.message}`):Ve(`Failed to restore: ${l.message}`)}finally{try{u&&(yield _y(u))}catch(l){P(`Failed to delete archive: ${l}`)}}})}function SD(t,e,r){return v0(this,arguments,void 0,function*(n,s,i,o=!1){let a=vB();return P(`Cache service version: ${a}`),ime(n),rG(s),a==="v2"?yield clt(n,s,i,o):yield alt(n,s,i,o)})}function alt(t,e,r){return v0(this,arguments,void 0,function*(n,s,i,o=!1){var a,c,A,u,l;let d=yield Fy(),h=-1,f=yield w3(n);if(P("Cache Paths:"),P(`${JSON.stringify(f)}`),f.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let p=yield vy(),I=KB.join(p,td(d));P(`Archive Path: ${I}`);try{yield tG(p,f,d),Oa()&&(yield jB(I,d));let m=10*1024*1024*1024,C=Mc(I);if(P(`File Size: ${C}`),C>m&&!LH())throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`);P("Reserving Cache");let y=yield cpe(s,n,{compressionMethod:d,enableCrossOsArchive:o,cacheSize:C});if(!((a=y?.result)===null||a===void 0)&&a.cacheId)h=(c=y?.result)===null||c===void 0?void 0:c.cacheId;else throw y?.statusCode===400?new Error((u=(A=y?.error)===null||A===void 0?void 0:A.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the data cap limit, not saving cache.`):new Cd(`Unable to reserve cache with key ${s}, another job may be creating this cache. More details: ${(l=y?.error)===null||l===void 0?void 0:l.message}`);P(`Saving Cache (ID: ${h})`),yield OH(h,I,"",i)}catch(m){let C=m;if(C.name===Ki.name)throw m;C.name===Cd.name
Line truncated
|
||||
See ${r.getDocumentationLink()}`;ame.push(n),Kl(n)}function Ame(){bu("deprecation-collector_deprecations",JSON.stringify(sG)),bu("deprecation-collector_errors",JSON.stringify(ame))}import*as xD from"path";var ume="GRADLE_ACTION_ID";var _D=".setup-gradle",RD=class t{getDependencyGraphOption(){let e=dr("dependency-graph");switch(e.toLowerCase().trim()){case"disabled":return"disabled";case"generate":return"generate";case"generate-and-submit":return"generate-and-submit";case"generate-submit-and-upload":return"generate-submit-and-upload";case"generate-and-upload":return"generate-and-upload";case"download-and-submit":return"download-and-submit"}throw TypeError(`The value '${e}' is not valid for 'dependency-graph'. Valid values are: [disabled, generate, generate-and-submit, generate-submit-and-upload, generate-and-upload, download-and-submit].`)}getDependencyGraphContinueOnFailure(){return fA("dependency-graph-continue-on-failure",!0)}getArtifactRetentionDays(){let e=dr("artifact-retention-days");return dlt("artifact-retention-days",e,0)}getJobCorrelator(){return t.constructJobCorrelator(ri.workflow,ri.job,llt())}getReportDirectory(){let e=dr("dependency-graph-report-dir");return xD.resolve(Gu(),e)}getDownloadArtifactName(){return process.env.DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME}getExcludeProjects(){return zf("dependency-graph-exclude-projects")}getIncludeProjects(){return zf("dependency-graph-include-projects")}getExcludeConfigurations(){return zf("dependency-graph-exclude-configurations")}getIncludeConfigurations(){return zf("dependency-graph-include-configurations")}getPluginRepository(){return new DD}static constructJobCorrelator(e,r,n){let s=this.describeMatrix(n),i=s?`${e}-${r}-${s}`:`${e}-${r}`;return this.sanitize(i)}static describeMatrix(e){P(`Got matrix json: ${e}`);let r=JSON.parse(e);return r?Object.values(r).join("-"):""}static sanitize(e){return e.replace(/[^a-zA-Z0-9_-\s]/g,"").replace(/\s+/g,"_").toLowerCase()}};var _0=class{isCacheDisabled(){return ome()?fA("cache-disabled"):!0}isCacheReadOnly(){return!this.isCacheWriteOnly()&&fA("cache-read-only")}isCacheWriteOnly(){return fA("cache-write-only")}isCacheOverwriteExisting(){return fA("cache-overwrite-existing")}isCacheStrictMatch(){return fA("gradle-home-cache-strict-match")}getCacheCleanupOption(){let e=$B("gradle-home-cache-cleanup");if(e!==void 0)return TD("The `gradle-home-cache-cleanup` input parameter has been replaced by `cache-cleanup`"),e?"always".toString():"never".toString();let r=dr("cache-cleanup");switch(r.toLowerCase().trim()){case"always":return"always".toString();case"on-success":return"on-success".toString();case"never":return"never".toString()}throw TypeError(`The value '${r}' is not valid for cache-cleanup. Valid values are: [never, always, on-success].`)}getCacheEncryptionKey(){return dr("cache-encryption-key")}getCacheIncludes(){return CO("gradle-home-cache-includes")}getCacheExcludes(){return CO("gradle-home-cache-excludes")}isCacheLicenseAccepted(){let e=new Vo;return e.getDevelocityAccessKey()!==""||e.hasTermsOfUseAgreement()}getCacheProvider(){let e=dr("cache-provider");switch(e.toLowerCase().trim()){case"basic":return"basic";case"enhanced":case"":return"enhanced"}throw TypeError(`The value '${e}' is not valid for 'cache-provider'. Valid values are: [basic, enhanced].`)}};var Vo=class t{static{this.DevelocityAccessKeyEnvVar="DEVELOCITY_ACCESS_KEY"}static{this.GradleEnterpriseAccessKeyEnvVar="GRADLE_ENTERPRISE_ACCESS_KEY"}getBuildScanPublishEnabled(){return fA("build-scan-publish")&&this.verifyTermsOfUseAgreement()}getTermsOfUseUrl(){return dr("build-scan-terms-of-use-url")}getTermsOfUseAgree(){return dr("build-scan-terms-of-use-agree")}getDevelocityAccessKey(){return dr("develocity-access-key")||process.env[t.DevelocityAccessKeyEnvVar]||process.env[t.GradleEnterpriseAccessKeyEnvVar]||""}getDevelocityTokenExpiry(){return dr("develocity-token-expiry")}getDevelocityInjectionEnabled(){return $B("develocity-injection-enabled")}getDevelocityUrl(){return dr("develocity-url")}getDevelocityAllowUntrustedServer(){return $B("develocity-allow-untrusted-server")}getDevelocityCaptureFileFingerprints(){return $B("develocity-capture-file-fingerprints")}getDevelocityEnforceUrl(){return $B("develocity-enforce-url")}getDevelocityPluginVersion(){return dr("develocity-plugin-version")}getDevelocityCcudPluginVersion(){return dr("develocity-ccud-plugin-version")}getPluginRepository(){return new DD}hasTermsOfUseAgreement(){let e=this.getDevelocityAccessKey()!=="",r=this.getTermsOfUseUrl()==="https://gradle.com/terms-of-service"||this.getTermsOfUseUrl()==="https://gradle.com/help/legal-terms-of-use",n=this.getTermsOfUseAgree()==="yes";return e||r&&n}verifyTermsOfUseAgreement(){return this.hasTermsOfUseAgreement()?!0:(Ve("Terms of use at 'https://gradle.com/help/legal-terms-of-use' must be agreed in order to publish build scans."),!1)}},DD=class{getUrl(){return zf("gradle-plugin-repository-url")}getUsername(){return zf("gradle-plugin-repository
Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let s=e.split(`
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new ZB(i));return n.searchPaths.push(...iG(n.patterns)),n})}static stat(e,r,n){return dG(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield F0.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){O(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else s=yield F0.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield F0.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===i)){O(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};import*as hG from"crypto";import*as MD from"fs";import*as Hme from"stream";import*as Gme from"util";import*as qme from"path";var ydt=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},Bdt=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(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(A){i({value:A,done:a})},o)}};function Yme(t,e){return ydt(this,arguments,void 0,function*(r,n,s=!1){var i,o,a,c,A;let u=s?$:O,l=!1,d=n||((A=process.env.GITHUB_WORKSPACE)!==null&&A!==void 0?A:process.cwd()),h=hG.createHash("sha256"),f=0;try{for(var p=!0,I=Bdt(r.globGenerator()),m;m=yield I.next(),i=m.done,!i;p=!0){c=m.value,p=!1;let C=c;if(u(C),!C.startsWith(`${d}${qme.sep}`)){u(`Ignore '${C}' since it is not under GITHUB_WORKSPACE.`);continue}if(MD.statSync(C).isDirectory()){u(`Skip directory '${C}'.`);continue}let y=hG.createHash("sha256");yield Gme.promisify(Hme.pipeline)(MD.createReadStream(C),y),h.write(y.digest()),f++,l||(l=!0)}}catch(C){o={error:C}}finally{try{!p&&!i&&(a=I.return)&&(yield a.call(I))}finally{if(o)throw o.error}}return h.end(),l?(u(`Found ${f} files to hash.`),h.digest("hex")):(u("No matches found for glob"),"")})}var Vme=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function fG(t,e){return Vme(this,void 0,void 0,function*(){return yield _D.create(t,e)})}function Wme(t){return Vme(this,arguments,void 0,function*(e,r="",n,s=!1){let i=!0;n&&typeof n.followSymbolicLinks=="boolean"&&(i=n.followSymbolicLinks);let o=yield fG(e,{followSymbolicLinks:i});return Yme(o,r,s)})}import*as pG from"path";var zme="BASIC_CACHE_PRIMARY_KEY",gG="BASIC_CACHE_RESTORED_KEY",bdt="setup-java",jme=["**/*.gradle*","**/gradle-wrapper.properties","buildSrc/**/Versions.kt","buildSrc/**/Dependencies.kt","gradle/*.versions.toml","**/versions.properties"],LD=class{async restore(e,r){let n=Kme(e),s=await Qdt();bu(zme,s);try{let i=await ID(n,s);i?(bu(gG,i),$(`Basic caching restored from cache key: ${i}`)):$("Basic caching did not find an entry to restore. Will start with empty state.")}catch(i){Ve(`Basic caching failed to restore from cache: ${i}`)}}async save(e,r,n){if(n.readOnly){let a=xm(gG);return a?`Basic caching was read-only. Restored from cache key \`${a}\`.`:"Basic caching was read-only. No cache entry was found to restore."}let s=xm(zme);if(xm(gG)===s)return $(`Basic caching restored entry with key \`${s}\`. Save was skipped.`),`Basic caching restored entry with key \`${s}\`. Save was skipped.`;let o=Kme(e);try{return await yD(o,s),$(`Basic caching saved entry with key: ${s}`),`Basic caching saved entry with key \`${s}\`.`}catch(a){return Ve(`Basic caching failed to save entry with key \`${s}\`: ${a}`),`Basic caching save failed: ${a}`}}};function Kme(t){return[pG.join(t,"caches"),pG.join(t,"wrapper")]}async function Qdt(){let t=await Wme(jme.join(`
|
||||
`));if(!t)throw new Error(`No file in ${process.cwd()} matched to [${jme}], make sure you have checked out the target repository`);return`${bdt}-${process.env.RUNNER_OS}-${process.arch}-gradle-${t}`}var Sdt=`
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new sb(i));return n.searchPaths.push(...AG(n.patterns)),n})}static stat(e,r,n){return pG(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield L0.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){P(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else s=yield L0.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield L0.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===i)){P(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};import*as mG from"crypto";import*as HD from"fs";import*as Ume from"stream";import*as Pme from"util";import*as Ome from"path";var Ndt=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},Tdt=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(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(A){i({value:A,done:a})},o)}};function Hme(t,e){return Ndt(this,arguments,void 0,function*(r,n,s=!1){var i,o,a,c,A;let u=s?$:P,l=!1,d=n||((A=process.env.GITHUB_WORKSPACE)!==null&&A!==void 0?A:process.cwd()),h=mG.createHash("sha256"),f=0;try{for(var p=!0,I=Tdt(r.globGenerator()),m;m=yield I.next(),i=m.done,!i;p=!0){c=m.value,p=!1;let C=c;if(u(C),!C.startsWith(`${d}${Ome.sep}`)){u(`Ignore '${C}' since it is not under GITHUB_WORKSPACE.`);continue}if(HD.statSync(C).isDirectory()){u(`Skip directory '${C}'.`);continue}let y=mG.createHash("sha256");yield Pme.promisify(Ume.pipeline)(HD.createReadStream(C),y),h.write(y.digest()),f++,l||(l=!0)}}catch(C){o={error:C}}finally{try{!p&&!i&&(a=I.return)&&(yield a.call(I))}finally{if(o)throw o.error}}return h.end(),l?(u(`Found ${f} files to hash.`),h.digest("hex")):(u("No matches found for glob"),"")})}var Gme=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function EG(t,e){return Gme(this,void 0,void 0,function*(){return yield PD.create(t,e)})}function qme(t){return Gme(this,arguments,void 0,function*(e,r="",n,s=!1){let i=!0;n&&typeof n.followSymbolicLinks=="boolean"&&(i=n.followSymbolicLinks);let o=yield EG(e,{followSymbolicLinks:i});return Hme(o,r,s)})}import*as IG from"path";var Vme="BASIC_CACHE_PRIMARY_KEY",CG="BASIC_CACHE_RESTORED_KEY",xdt="setup-java",Wme=["**/*.gradle*","**/gradle-wrapper.properties","buildSrc/**/Versions.kt","buildSrc/**/Dependencies.kt","gradle/*.versions.toml","**/versions.properties"],GD=class{async restore(e,r){let n=Jme(e),s=await Rdt();bu(Vme,s);try{let i=await wD(n,s);i?(bu(CG,i),$(`Basic caching restored from cache key: ${i}`)):$("Basic caching did not find an entry to restore. Will start with empty state.")}catch(i){Ve(`Basic caching failed to restore from cache: ${i}`)}}async save(e,r,n){if(n.readOnly){let a=Dm(CG);return a?`Basic caching was read-only. Restored from cache key \`${a}\`.`:"Basic caching was read-only. No cache entry was found to restore."}let s=Dm(Vme);if(Dm(CG)===s)return $(`Basic caching restored entry with key \`${s}\`. Save was skipped.`),`Basic caching restored entry with key \`${s}\`. Save was skipped.`;let o=Jme(e);try{return await SD(o,s),$(`Basic caching saved entry with key: ${s}`),`Basic caching saved entry with key \`${s}\`.`}catch(a){return Ve(`Basic caching failed to save entry with key \`${s}\`: ${a}`),`Basic caching save failed: ${a}`}}};function Jme(t){return[IG.join(t,"caches"),IG.join(t,"wrapper")]}async function Rdt(){let t=await qme(Wme.join(`
|
||||
`));if(!t)throw new Error(`No file in ${process.cwd()} matched to [${Wme}], make sure you have checked out the target repository`);return`${xdt}-${process.env.RUNNER_OS}-${process.arch}-gradle-${t}`}var kdt=`
|
||||
[Cache was disabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#disabling-caching). Gradle User Home was not restored from or saved to the cache.
|
||||
`,Ndt="Enhanced Caching: This build is using the proprietary 'gradle-actions-caching' provider for optimized caching support. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for terms of use and opt-out instructions.",Tdt=`
|
||||
`,vdt="Enhanced Caching: This build is using the proprietary 'gradle-actions-caching' provider for optimized caching support. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for terms of use and opt-out instructions.",_dt=`
|
||||
> [!NOTE]
|
||||
> ### \u26A1\uFE0F Enhanced Caching enabled
|
||||
> This build provides optimized caching support via the proprietary **gradle-actions-caching** provider.
|
||||
> See [DISTRIBUTION.md](https://github.com/gradle/actions/blob/main/DISTRIBUTION.md) for terms of use and opt-out instructions.
|
||||
`,xdt="Basic Caching: This build uses the open-source caching provider for reliable, path-based caching of Gradle dependencies. Upgrade available: for faster builds and advanced features, consider switching to the Enhanced Caching provider. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for details.",Rdt=`
|
||||
`,Fdt="Basic Caching: This build uses the open-source caching provider for reliable, path-based caching of Gradle dependencies. Upgrade available: for faster builds and advanced features, consider switching to the Enhanced Caching provider. See https://github.com/gradle/actions/blob/main/DISTRIBUTION.md for details.",Mdt=`
|
||||
> [!NOTE]
|
||||
> ### \u{1F6E1}\uFE0F Basic Caching enabled
|
||||
> This build uses the open-source caching provider for reliable, path-based caching of Gradle dependencies.
|
||||
>
|
||||
> **Upgrade Available:** For faster builds and advanced features, consider switching to the **Enhanced Caching** provider.
|
||||
> See [DISTRIBUTION.md](https://github.com/gradle/actions/blob/main/DISTRIBUTION.md) for details.`,EG=class{async restore(e,r){}async save(e,r,n){return Sdt}},UD=class{constructor(e,r){this.delegate=e,this.summary=r}async restore(e,r){await this.delegate.restore(e,r)}async save(e,r,n){return`${await this.delegate.save(e,r,n)}
|
||||
${this.summary}`}};async function Zme(t){if(t.isCacheDisabled())return mG("Cache is disabled: will not restore state from previous builds."),new EG;if(t.getCacheProvider()==="basic")return mG(xdt),new UD(new LD,Rdt);mG(Ndt);let e=await Ddt();return t.isCacheLicenseAccepted()?e:new UD(e,Tdt)}async function Ddt(){let t=kdt();return await import(wdt(t).href)}function kdt(){let t=import.meta.dirname,e=Xme.resolve(t,"../../../sources/vendor/gradle-actions-caching/index.js");if($me.existsSync(e))return e;throw new Error(`Unable to locate vendored cache library at ${e}.`)}function mG(t){console.info(t)}import PD from"fs";import e0e from"path";var OD=class{constructor(e){this.cacheFile=e0e.resolve(e,xD,"valid-wrappers.json")}load(){if(PD.existsSync(this.cacheFile))try{return JSON.parse(PD.readFileSync(this.cacheFile,"utf-8"))}catch(e){Ve(`Failed to parse checksum cache file: ${e}`)}return[]}save(e){let r=[...new Set(e)];PD.mkdirSync(e0e.dirname(this.cacheFile),{recursive:!0}),PD.writeFileSync(this.cacheFile,JSON.stringify(r))}};var o0e=Ae(s0e(),1);import*as i0e from"util";import*as HD from"path";import*as GD from"fs";var Udt=i0e.promisify(GD.readdir);async function a0e(t){return(await c0e(t)).filter(r=>(0,o0e.default)(r).endsWith("gradle-wrapper.jar")).map(r=>HD.relative(t,r)).sort((r,n)=>r.localeCompare(n))}async function c0e(t){let e=await Udt(t),r=await Promise.all(e.map(async n=>{let s=HD.resolve(t,n),i=GD.lstatSync(s,{throwIfNoEntry:!1});return i===void 0?[]:i.isDirectory()?c0e(s):new Promise(o=>o([s]))}));return Array.prototype.concat(...r)}var Odt={_useHtmlParser2:!1};function M0(t,e){if(!t)return e??Odt;let r={_useHtmlParser2:!!t.xmlMode,...e,...t};return t.xml?(r._useHtmlParser2=!0,r.xmlMode=!0,t.xml!==!0&&Object.assign(r,t.xml)):t.xmlMode&&(r._useHtmlParser2=!0),r}var GG={};wa(GG,{contains:()=>n2,extract:()=>_ht,html:()=>Rht,merge:()=>D0e,parseHTML:()=>kht,root:()=>vht,text:()=>sg,xml:()=>Dht});var Sd={};wa(Sd,{DocumentPosition:()=>$o,append:()=>dht,appendChild:()=>lht,compareDocumentPosition:()=>N0e,existsOne:()=>w0e,filter:()=>H0,find:()=>ZD,findAll:()=>pht,findOne:()=>e2,findOneChild:()=>ght,getAttributeValue:()=>aht,getChildren:()=>O0,getElementById:()=>Iht,getElements:()=>Cht,getElementsByClassName:()=>yht,getElementsByTagName:()=>ng,getElementsByTagType:()=>Bht,getFeed:()=>HG,getInnerHTML:()=>oht,getName:()=>Aht,getOuterHTML:()=>b0e,getParent:()=>Q0e,getSiblings:()=>PG,getText:()=>KD,hasAttrib:()=>cht,hasChildren:()=>rr,innerText:()=>ib,isCDATA:()=>L0,isComment:()=>rg,isDocument:()=>Ko,isTag:()=>Qe,isText:()=>Ei,nextElementSibling:()=>$D,prepend:()=>fht,prependChild:()=>hht,prevElementSibling:()=>XD,removeElement:()=>zu,removeSubsets:()=>bht,replaceElement:()=>uht,testElement:()=>Eht,textContent:()=>Ju,uniqueSort:()=>Qd});var jo={};wa(jo,{CDATA:()=>NG,Comment:()=>bG,Directive:()=>BG,Doctype:()=>TG,ElementType:()=>bt,Root:()=>IG,Script:()=>QG,Style:()=>wG,Tag:()=>SG,Text:()=>yG,isTag:()=>CG});var bt;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(bt||(bt={}));function CG(t){return t.type===bt.Tag||t.type===bt.Script||t.type===bt.Style}var IG=bt.Root,yG=bt.Text,BG=bt.Directive,bG=bt.Comment,QG=bt.Script,wG=bt.Style,SG=bt.Tag,NG=bt.CDATA,TG=bt.Doctype;var qD=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return U0(this,e)}},tb=class extends qD{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},pA=class extends tb{constructor(){super(...arguments),this.type=bt.Text}get nodeType(){return 3}},Zf=class extends tb{constructor(){super(...arguments),this.type=bt.Comment}get nodeType(){return 8}},eg=class extends tb{constructor(e,r){super(r),this.name=e,this.type=bt.Directive}get nodeType(){return 1}},rb=class extends qD{constructor(e){super(),this.children=e}get firstChild(){var e;return(e=this.children[0])!==null&&e!==void 0?e:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},nb=class extends rb{constructor(){super(...arguments),this.type=bt.CDATA}get nodeType(){return 4}},Zi=class extends rb{constructor(){super(...arguments),this.type=bt.Root}get nodeType(){return 9}},tg=class extends rb{constructor(e,r,n=[],s=e==="script"?bt.Script:e==="style"?bt.Style:bt.Tag){super(n),this.name=e,this.attribs=r,this.type=s}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>{var r,n;return{name:e,value:this.attribs[e],namespace:(r=this["x-attribsNamespace"])===null||r===void
Line truncated
|
||||
`:KD(t.children):L0(t)?KD(t.children):Ei(t)?t.data:""}function Ju(t){return Array.isArray(t)?t.map(Ju).join(""):rr(t)&&!rg(t)?Ju(t.children):Ei(t)?t.data:""}function ib(t){return Array.isArray(t)?t.map(ib).join(""):rr(t)&&(t.type===bt.Tag||L0(t))?ib(t.children):Ei(t)?t.data:""}function O0(t){return rr(t)?t.children:[]}function Q0e(t){return t.parent||null}function PG(t){let e=Q0e(t);if(e!=null)return O0(e);let r=[t],{prev:n,next:s}=t;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;s!=null;)r.push(s),{next:s}=s;return r}function aht(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}function cht(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}function Aht(t){return t.name}function $D(t){let{next:e}=t;for(;e!==null&&!Qe(e);)({next:e}=e);return e}function XD(t){let{prev:e}=t;for(;e!==null&&!Qe(e);)({prev:e}=e);return e}function zu(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,r=e.lastIndexOf(t);r>=0&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}function uht(t,e){let r=e.prev=t.prev;r&&(r.next=e);let n=e.next=t.next;n&&(n.prev=e);let s=e.parent=t.parent;if(s){let i=s.children;i[i.lastIndexOf(t)]=e,t.parent=null}}function lht(t,e){if(zu(e),e.next=null,e.parent=t,t.children.push(e)>1){let r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}function dht(t,e){zu(e);let{parent:r}=t,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){let s=r.children;s.splice(s.lastIndexOf(n),0,e)}}else r&&r.children.push(e)}function hht(t,e){if(zu(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){let r=t.children[1];r.prev=e,e.next=r}else e.next=null}function fht(t,e){zu(e);let{parent:r}=t;if(r){let n=r.children;n.splice(n.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}function H0(t,e,r=!0,n=1/0){return ZD(t,Array.isArray(e)?e:[e],r,n)}function ZD(t,e,r,n){let s=[],i=[Array.isArray(e)?e:[e]],o=[0];for(;;){if(o[0]>=i[0].length){if(o.length===1)return s;i.shift(),o.shift();continue}let a=i[0][o[0]++];if(t(a)&&(s.push(a),--n<=0))return s;r&&rr(a)&&a.children.length>0&&(o.unshift(0),i.unshift(a.children))}}function ght(t,e){return e.find(t)}function e2(t,e,r=!0){let n=Array.isArray(e)?e:[e];for(let s=0;s<n.length;s++){let i=n[s];if(Qe(i)&&t(i))return i;if(r&&rr(i)&&i.children.length>0){let o=e2(t,i.children,!0);if(o)return o}}return null}function w0e(t,e){return(Array.isArray(e)?e:[e]).some(r=>Qe(r)&&t(r)||rr(r)&&w0e(t,r.children))}function pht(t,e){let r=[],n=[Array.isArray(e)?e:[e]],s=[0];for(;;){if(s[0]>=n[0].length){if(n.length===1)return r;n.shift(),s.shift();continue}let i=n[0][s[0]++];Qe(i)&&t(i)&&r.push(i),rr(i)&&i.children.length>0&&(s.unshift(0),n.unshift(i.children))}}var t2={tag_name(t){return typeof t=="function"?e=>Qe(e)&&t(e.name):t==="*"?Qe:e=>Qe(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>Ei(e)&&t(e.data):e=>Ei(e)&&e.data===t}};function OG(t,e){return typeof e=="function"?r=>Qe(r)&&e(r.attribs[t]):r=>Qe(r)&&r.attribs[t]===e}function mht(t,e){return r=>t(r)||e(r)}function S0e(t){let e=Object.keys(t).map(r=>{let n=t[r];return Object.prototype.hasOwnProperty.call(t2,r)?t2[r](n):OG(r,n)});return e.length===0?null:e.reduce(mht)}function Eht(t,e){let r=S0e(t);return r?r(e):!0}function Cht(t,e,r,n=1/0){let s=S0e(t);return s?H0(s,e,r,n):[]}function Iht(t,e,r=!0){return Array.isArray(e)||(e=[e]),e2(OG("id",t),e,r)}function ng(t,e,r=!0,n=1/0){return H0(t2.tag_name(t),e,r,n)}function yht(t,e,r=!0,n=1/0){return H0(OG("class",t),e,r,n)}function Bht(t,e,r=!0,n=1/0){return H0(t2.tag_type(t),e,r,n)}function bht(t){let e=t.length;for(;--e>=0;){let r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(let n=r.parent;n;n=n.parent)if(t.includes(n)){t.splice(e,1);break}}return t}var $o;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})($o||($o={}));function N0e(t,e){let r=[],n=[];if(t===e)return 0;let s=rr(t)?t:t.parent;for(;s;)r.unshift(s),s=s.parent;for(s=rr(e)?e:e.parent;s;)n.unshift(s),s=s.parent;let i=Math.min(r.length,n.length),o=0;for(;o<i&&r[o]===n[o];)o++;if(o===0)return $o.DISCONNECTED;let a=r[o-1],c=a.children,A=r[o],u=n[o];return c.indexOf(A)>c.indexOf(u)?a===e?$o.FOLLOWING|$o.CONTAINED_BY:$o.FOLLOWING:a===t?$o.PRECEDING|$o.CONTAINS:$o.PRECEDING}function Qd(t){return t=t.filter((e,r,n)=>!n.includes(e,r+1)),t.sort((e,r)=>{let n=N0e(e,r);return n&$o.PRECEDING?-1:n&$o.FOLLOWING?1:0}),t}function HG(t){let e=r2(Tht,t);return e?e.name==="feed"?Qht(e):wht(e):null}function Qht(t){var e;let r=t.children,n={type:"atom",items:ng("entry",r).map(o=>{var a;let{children:c}=o,A={media:T0e(c)};Ci(A,"id","id",c),Ci(A,"title","title",c);let u=(a=r2("link",c))===null||a===void 0?void 0:a.attribs.href;u&&(A.link=u);let l=wd("summary",c)||wd("conten
Line truncated
|
||||
> See [DISTRIBUTION.md](https://github.com/gradle/actions/blob/main/DISTRIBUTION.md) for details.`,BG=class{async restore(e,r){}async save(e,r,n){return kdt}},qD=class{constructor(e,r){this.delegate=e,this.summary=r}async restore(e,r){await this.delegate.restore(e,r)}async save(e,r,n){return`${await this.delegate.save(e,r,n)}
|
||||
${this.summary}`}};async function Kme(t){if(t.isCacheDisabled())return yG("Cache is disabled: will not restore state from previous builds."),new BG;if(t.getCacheProvider()==="basic")return yG(Fdt),new qD(new GD,Mdt);yG(vdt);let e=await Ldt();return t.isCacheLicenseAccepted()?e:new qD(e,_dt)}async function Ldt(){let t=Udt();return await import(Ddt(t).href)}function Udt(){let t=import.meta.dirname,e=jme.resolve(t,"../../../sources/vendor/gradle-actions-caching/index.js");if(zme.existsSync(e))return e;throw new Error(`Unable to locate vendored cache library at ${e}.`)}function yG(t){console.info(t)}import YD from"fs";import $me from"path";var VD=class{constructor(e){this.cacheFile=$me.resolve(e,_D,"valid-wrappers.json")}load(){if(YD.existsSync(this.cacheFile))try{return JSON.parse(YD.readFileSync(this.cacheFile,"utf-8"))}catch(e){Ve(`Failed to parse checksum cache file: ${e}`)}return[]}save(e){let r=[...new Set(e)];YD.mkdirSync($me.dirname(this.cacheFile),{recursive:!0}),YD.writeFileSync(this.cacheFile,JSON.stringify(r))}};var n0e=Ae(t0e(),1);import*as r0e from"util";import*as WD from"path";import*as JD from"fs";var Ydt=r0e.promisify(JD.readdir);async function s0e(t){return(await i0e(t)).filter(r=>(0,n0e.default)(r).endsWith("gradle-wrapper.jar")).map(r=>WD.relative(t,r)).sort((r,n)=>r.localeCompare(n))}async function i0e(t){let e=await Ydt(t),r=await Promise.all(e.map(async n=>{let s=WD.resolve(t,n),i=JD.lstatSync(s,{throwIfNoEntry:!1});return i===void 0?[]:i.isDirectory()?i0e(s):new Promise(o=>o([s]))}));return Array.prototype.concat(...r)}var Wdt={_useHtmlParser2:!1};function U0(t,e){if(!t)return e??Wdt;let r={_useHtmlParser2:!!t.xmlMode,...e,...t};return t.xml?(r._useHtmlParser2=!0,r.xmlMode=!0,t.xml!==!0&&Object.assign(r,t.xml)):t.xmlMode&&(r._useHtmlParser2=!0),r}var WG={};Sa(WG,{contains:()=>c2,extract:()=>Oht,html:()=>Mht,merge:()=>T0e,parseHTML:()=>Uht,root:()=>Pht,text:()=>ig,xml:()=>Lht});var Td={};Sa(Td,{DocumentPosition:()=>jo,append:()=>Eht,appendChild:()=>mht,compareDocumentPosition:()=>Q0e,existsOne:()=>B0e,filter:()=>q0,find:()=>s2,findAll:()=>Bht,findOne:()=>i2,findOneChild:()=>yht,getAttributeValue:()=>hht,getChildren:()=>G0,getElementById:()=>Sht,getElements:()=>wht,getElementsByClassName:()=>Nht,getElementsByTagName:()=>sg,getElementsByTagType:()=>Tht,getFeed:()=>VG,getInnerHTML:()=>dht,getName:()=>ght,getOuterHTML:()=>I0e,getParent:()=>y0e,getSiblings:()=>qG,getText:()=>t2,hasAttrib:()=>fht,hasChildren:()=>tr,innerText:()=>ub,isCDATA:()=>P0,isComment:()=>ng,isDocument:()=>zo,isTag:()=>Qe,isText:()=>gi,nextElementSibling:()=>r2,prepend:()=>Iht,prependChild:()=>Cht,prevElementSibling:()=>n2,removeElement:()=>zu,removeSubsets:()=>xht,replaceElement:()=>pht,testElement:()=>Qht,textContent:()=>Ju,uniqueSort:()=>Sd});var Jo={};Sa(Jo,{CDATA:()=>DG,Comment:()=>NG,Directive:()=>SG,Doctype:()=>kG,ElementType:()=>bt,Root:()=>QG,Script:()=>TG,Style:()=>xG,Tag:()=>RG,Text:()=>wG,isTag:()=>bG});var bt;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(bt||(bt={}));function bG(t){return t.type===bt.Tag||t.type===bt.Script||t.type===bt.Style}var QG=bt.Root,wG=bt.Text,SG=bt.Directive,NG=bt.Comment,TG=bt.Script,xG=bt.Style,RG=bt.Tag,DG=bt.CDATA,kG=bt.Doctype;var zD=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return O0(this,e)}},ob=class extends zD{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},pA=class extends ob{constructor(){super(...arguments),this.type=bt.Text}get nodeType(){return 3}},eg=class extends ob{constructor(){super(...arguments),this.type=bt.Comment}get nodeType(){return 8}},tg=class extends ob{constructor(e,r){super(r),this.name=e,this.type=bt.Directive}get nodeType(){return 1}},ab=class extends zD{constructor(e){super(),this.children=e}get firstChild(){var e;return(e=this.children[0])!==null&&e!==void 0?e:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},cb=class extends ab{constructor(){super(...arguments),this.type=bt.CDATA}get nodeType(){return 4}},$i=class extends ab{constructor(){super(...arguments),this.type=bt.Root}get nodeType(){return 9}},rg=class extends ab{constructor(e,r,n=[],s=e==="script"?bt.Script:e==="style"?bt.Style:bt.Tag){super(n),this.name=e,this.attribs=r,this.type=s}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>{var r,n;return{name:e,value:this.attribs[e],namespace:(r=this["x-attribsNamespace"])===null||r===void
Line truncated
|
||||
`:t2(t.children):P0(t)?t2(t.children):gi(t)?t.data:""}function Ju(t){return Array.isArray(t)?t.map(Ju).join(""):tr(t)&&!ng(t)?Ju(t.children):gi(t)?t.data:""}function ub(t){return Array.isArray(t)?t.map(ub).join(""):tr(t)&&(t.type===bt.Tag||P0(t))?ub(t.children):gi(t)?t.data:""}function G0(t){return tr(t)?t.children:[]}function y0e(t){return t.parent||null}function qG(t){let e=y0e(t);if(e!=null)return G0(e);let r=[t],{prev:n,next:s}=t;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;s!=null;)r.push(s),{next:s}=s;return r}function hht(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}function fht(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}function ght(t){return t.name}function r2(t){let{next:e}=t;for(;e!==null&&!Qe(e);)({next:e}=e);return e}function n2(t){let{prev:e}=t;for(;e!==null&&!Qe(e);)({prev:e}=e);return e}function zu(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,r=e.lastIndexOf(t);r>=0&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}function pht(t,e){let r=e.prev=t.prev;r&&(r.next=e);let n=e.next=t.next;n&&(n.prev=e);let s=e.parent=t.parent;if(s){let i=s.children;i[i.lastIndexOf(t)]=e,t.parent=null}}function mht(t,e){if(zu(e),e.next=null,e.parent=t,t.children.push(e)>1){let r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}function Eht(t,e){zu(e);let{parent:r}=t,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){let s=r.children;s.splice(s.lastIndexOf(n),0,e)}}else r&&r.children.push(e)}function Cht(t,e){if(zu(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){let r=t.children[1];r.prev=e,e.next=r}else e.next=null}function Iht(t,e){zu(e);let{parent:r}=t;if(r){let n=r.children;n.splice(n.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}function q0(t,e,r=!0,n=1/0){return s2(t,Array.isArray(e)?e:[e],r,n)}function s2(t,e,r,n){let s=[],i=[Array.isArray(e)?e:[e]],o=[0];for(;;){if(o[0]>=i[0].length){if(o.length===1)return s;i.shift(),o.shift();continue}let a=i[0][o[0]++];if(t(a)&&(s.push(a),--n<=0))return s;r&&tr(a)&&a.children.length>0&&(o.unshift(0),i.unshift(a.children))}}function yht(t,e){return e.find(t)}function i2(t,e,r=!0){let n=Array.isArray(e)?e:[e];for(let s=0;s<n.length;s++){let i=n[s];if(Qe(i)&&t(i))return i;if(r&&tr(i)&&i.children.length>0){let o=i2(t,i.children,!0);if(o)return o}}return null}function B0e(t,e){return(Array.isArray(e)?e:[e]).some(r=>Qe(r)&&t(r)||tr(r)&&B0e(t,r.children))}function Bht(t,e){let r=[],n=[Array.isArray(e)?e:[e]],s=[0];for(;;){if(s[0]>=n[0].length){if(n.length===1)return r;n.shift(),s.shift();continue}let i=n[0][s[0]++];Qe(i)&&t(i)&&r.push(i),tr(i)&&i.children.length>0&&(s.unshift(0),n.unshift(i.children))}}var o2={tag_name(t){return typeof t=="function"?e=>Qe(e)&&t(e.name):t==="*"?Qe:e=>Qe(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>gi(e)&&t(e.data):e=>gi(e)&&e.data===t}};function YG(t,e){return typeof e=="function"?r=>Qe(r)&&e(r.attribs[t]):r=>Qe(r)&&r.attribs[t]===e}function bht(t,e){return r=>t(r)||e(r)}function b0e(t){let e=Object.keys(t).map(r=>{let n=t[r];return Object.prototype.hasOwnProperty.call(o2,r)?o2[r](n):YG(r,n)});return e.length===0?null:e.reduce(bht)}function Qht(t,e){let r=b0e(t);return r?r(e):!0}function wht(t,e,r,n=1/0){let s=b0e(t);return s?q0(s,e,r,n):[]}function Sht(t,e,r=!0){return Array.isArray(e)||(e=[e]),i2(YG("id",t),e,r)}function sg(t,e,r=!0,n=1/0){return q0(o2.tag_name(t),e,r,n)}function Nht(t,e,r=!0,n=1/0){return q0(YG("class",t),e,r,n)}function Tht(t,e,r=!0,n=1/0){return q0(o2.tag_type(t),e,r,n)}function xht(t){let e=t.length;for(;--e>=0;){let r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(let n=r.parent;n;n=n.parent)if(t.includes(n)){t.splice(e,1);break}}return t}var jo;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(jo||(jo={}));function Q0e(t,e){let r=[],n=[];if(t===e)return 0;let s=tr(t)?t:t.parent;for(;s;)r.unshift(s),s=s.parent;for(s=tr(e)?e:e.parent;s;)n.unshift(s),s=s.parent;let i=Math.min(r.length,n.length),o=0;for(;o<i&&r[o]===n[o];)o++;if(o===0)return jo.DISCONNECTED;let a=r[o-1],c=a.children,A=r[o],u=n[o];return c.indexOf(A)>c.indexOf(u)?a===e?jo.FOLLOWING|jo.CONTAINED_BY:jo.FOLLOWING:a===t?jo.PRECEDING|jo.CONTAINS:jo.PRECEDING}function Sd(t){return t=t.filter((e,r,n)=>!n.includes(e,r+1)),t.sort((e,r)=>{let n=Q0e(e,r);return n&jo.PRECEDING?-1:n&jo.FOLLOWING?1:0}),t}function VG(t){let e=a2(_ht,t);return e?e.name==="feed"?Rht(e):Dht(e):null}function Rht(t){var e;let r=t.children,n={type:"atom",items:sg("entry",r).map(o=>{var a;let{children:c}=o,A={media:w0e(c)};pi(A,"id","id",c),pi(A,"title","title",c);let u=(a=a2("link",c))===null||a===void 0?void 0:a.attribs.href;u&&(A.link=u);let l=Nd("summary",c)||Nd("conten
Line truncated
|
||||
:is(button, input, select, textarea, optgroup, option)[disabled],
|
||||
optgroup[disabled] > option,
|
||||
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
||||
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var ea=Ae(Nd(),1);var sq={};function iq(t,e){return t===ea.default.falseFunc?ea.default.falseFunc:r=>e.isTag(r)&&t(r)}function oq(t,e){let r=e.getSiblings(t);if(r.length<=1)return[];let n=r.indexOf(t);return n<0||n===r.length-1?[]:r.slice(n+1).filter(e.isTag)}function nq(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var rq=(t,e,r,n,s)=>{let i=s(e,nq(r),n);return i===ea.default.trueFunc?t:i===ea.default.falseFunc?ea.default.falseFunc:o=>i(o)&&t(o)},g2={is:rq,matches:rq,where:rq,not(t,e,r,n,s){let i=s(e,nq(r),n);return i===ea.default.falseFunc?t:i===ea.default.trueFunc?ea.default.falseFunc:o=>!i(o)&&t(o)},has(t,e,r,n,s){let{adapter:i}=r,o=nq(r);o.relativeSelector=!0;let a=e.some(u=>u.some(db))?[sq]:void 0,c=s(e,o,a);if(c===ea.default.falseFunc)return ea.default.falseFunc;let A=iq(c,i);if(a&&c!==ea.default.trueFunc){let{shouldTestNextSiblings:u=!1}=c;return l=>{if(!t(l))return!1;a[0]=l;let d=i.getChildren(l),h=u?[...d,...oq(l,i)]:d;return i.existsOne(A,h)}}return u=>t(u)&&i.existsOne(A,i.getChildren(u))}};function pEe(t,e,r,n,s){var i;let{name:o,data:a}=e;if(Array.isArray(a)){if(!(o in g2))throw new Error(`Unknown pseudo-class :${o}(${a})`);return g2[o](t,a,r,n,s)}let c=(i=r.pseudos)===null||i===void 0?void 0:i[o],A=typeof c=="string"?c:f2[o];if(typeof A=="string"){if(a!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let u=(0,gEe.parse)(A);return g2.is(t,u,r,n,s)}if(typeof c=="function")return tq(c,o,a,1),u=>c(u,a)&&t(u);if(o in K0)return K0[o](t,a,r,n);if(o in fb){let u=fb[o];return tq(u,o,a,2),l=>u(l,r,a)&&t(l)}throw new Error(`Unknown pseudo-class :${o}`)}var ta=Ae(z0(),1);function aq(t,e){let r=e.getParent(t);return r&&e.isTag(r)?r:null}function mEe(t,e,r,n,s){let{adapter:i,equals:o}=r;switch(e.type){case ta.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case ta.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case ta.SelectorType.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),lEe[e.action](t,e,r)}case ta.SelectorType.Pseudo:return pEe(t,e,r,n,s);case ta.SelectorType.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=e;return(!r.xmlMode||r.lowerCaseTags)&&(a=a.toLowerCase()),function(A){return i.getName(A)===a&&t(A)}}case ta.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(A){let u=A;for(;u=aq(u,i);)if(t(u))return!0;return!1};let a=new WeakSet;return function(A){let u=A;for(;u=aq(u,i);)if(!a.has(u)){if(i.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(c){let A=c;do if(t(A))return!0;while(A=aq(A,i));return!1};case ta.SelectorType.Parent:return function(c){return i.getChildren(c).some(A=>i.isTag(A)&&t(A))};case ta.SelectorType.Child:return function(c){let A=i.getParent(c);return A!=null&&i.isTag(A)&&t(A)};case ta.SelectorType.Sibling:return function(c){let A=i.getSiblings(c);for(let u=0;u<A.length;u++){let l=A[u];if(o(c,l))break;if(i.isTag(l)&&t(l))return!0}return!1};case ta.SelectorType.Adjacent:return i.prevElementSibling?function(c){let A=i.prevElementSibling(c);return A!=null&&t(A)}:function(c){let A=i.getSiblings(c),u;for(let l=0;l<A.length;l++){let d=A[l];if(o(c,d))break;i.isTag(d)&&(u=d)}return!!u&&t(u)};case ta.SelectorType.Universal:{if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}}function EEe(t,e,r){let n=p2(t,e,r);return iq(n,e.adapter)}function p2(t,e,r){let n=typeof t=="string"?(0,rc.parse)(t):t;return m2(n,e,r)}function CEe(t){return t.type===rc.SelectorType.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(CEe)))}var Cft={type:rc.SelectorType.Descendant},Ift={type:"_flexibleDescendant"},yft={type:rc.SelectorType.Pseudo,name:"scope",data:null};function Bft(t,{adapter:e},r){let n=!!r?.every(s=>{let i=e.isTag(s)&&e.getParent(s);return s===sq||i&&e.isTag(i)});fo
Line truncated
|
||||
`)})):{name:s,value:i.replace(FEe,`\r
|
||||
`)}}).toArray()}var bq={};wa(bq,{extract:()=>Lgt});function Mgt(t){var e;return typeof t=="string"?{selector:t,value:"textContent"}:{selector:t.selector,value:(e=t.value)!==null&&e!==void 0?e:"textContent"}}function Lgt(t){let e={};for(let r in t){let n=t[r],s=Array.isArray(n),{selector:i,value:o}=Mgt(s?n[0]:n),a=typeof o=="function"?o:typeof o=="string"?c=>this._make(c).prop(o):c=>this._make(c).extract(o);if(s)e[r]=this._findBySelector(i,Number.POSITIVE_INFINITY).map((c,A)=>a(A,r,e)).get();else{let c=this._findBySelector(i,1);e[r]=c.length>0?a(c[0],r,e):void 0}}return e}var Rd=class{constructor(e,r,n){if(this.length=0,this.options=n,this._root=r,e){for(let s=0;s<e.length;s++)this[s]=e[s];this.length=e.length}}};Rd.prototype.cheerio="[cheerio object]";Rd.prototype.splice=Array.prototype.splice;Rd.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Rd.prototype,KG,Cq,Iq,yq,Bq,bq);function MEe(t,e){return function r(n,s,i=!0){if(n==null)throw new Error("cheerio.load() expects a string");let o=M0(s),a=t(n,o,i,null);class c extends Rd{_make(l,d){let h=A(l,d);return h.prevObject=this,h}_parse(l,d,h,f){return t(l,d,h,f)}_render(l){return e(l,this.options)}}function A(u,l,d=a,h){if(u&&Xo(u))return u;let f=M0(h,o),p=typeof d=="string"?[t(d,f,!1,null)]:"length"in d?d:[d],I=Xo(p)?p:new c(p,null,f);if(I._root=I,!u)return new c(void 0,I,f);let m=typeof u=="string"&&ob(u)?t(u,f,!1,null).children:Ugt(u)?[u]:Array.isArray(u)?u:void 0,C=new c(m,I,f);if(m)return C;if(typeof u!="string")throw new TypeError("Unexpected type of selector");let y=u,N=l?typeof l=="string"?ob(l)?new c([t(l,f,!1,null)],I,f):(y=`${l} ${y}`,I):Xo(l)?l:new c(Array.isArray(l)?l:[l],I,f):I;return N?N.find(y):C}return Object.assign(A,GG,{load:r,_root:a,_options:o,fn:c.prototype,prototype:c.prototype}),A}}function Ugt(t){return!!t.name||t.type===jo.Root||t.type===jo.Text||t.type===jo.Comment}var Pgt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),lr="\uFFFD",S;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(S||(S={}));var Hs={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function b2(t){return t>=55296&&t<=57343}function LEe(t){return t>=56320&&t<=57343}function UEe(t,e){return(t-55296)*1024+9216+e}function Q2(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function w2(t){return t>=64976&&t<=65007||Pgt.has(t)}var W;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keywo
Line truncated
|
||||
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var Xo=Ae(xd(),1);var cq={};function Aq(t,e){return t===Xo.default.falseFunc?Xo.default.falseFunc:r=>e.isTag(r)&&t(r)}function uq(t,e){let r=e.getSiblings(t);if(r.length<=1)return[];let n=r.indexOf(t);return n<0||n===r.length-1?[]:r.slice(n+1).filter(e.isTag)}function aq(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var oq=(t,e,r,n,s)=>{let i=s(e,aq(r),n);return i===Xo.default.trueFunc?t:i===Xo.default.falseFunc?Xo.default.falseFunc:o=>i(o)&&t(o)},I2={is:oq,matches:oq,where:oq,not(t,e,r,n,s){let i=s(e,aq(r),n);return i===Xo.default.falseFunc?t:i===Xo.default.trueFunc?Xo.default.falseFunc:o=>!i(o)&&t(o)},has(t,e,r,n,s){let{adapter:i}=r,o=aq(r);o.relativeSelector=!0;let a=e.some(u=>u.some(mb))?[cq]:void 0,c=s(e,o,a);if(c===Xo.default.falseFunc)return Xo.default.falseFunc;let A=Aq(c,i);if(a&&c!==Xo.default.trueFunc){let{shouldTestNextSiblings:u=!1}=c;return l=>{if(!t(l))return!1;a[0]=l;let d=i.getChildren(l),h=u?[...d,...uq(l,i)]:d;return i.existsOne(A,h)}}return u=>t(u)&&i.existsOne(A,i.getChildren(u))}};function hEe(t,e,r,n,s){var i;let{name:o,data:a}=e;if(Array.isArray(a)){if(!(o in I2))throw new Error(`Unknown pseudo-class :${o}(${a})`);return I2[o](t,a,r,n,s)}let c=(i=r.pseudos)===null||i===void 0?void 0:i[o],A=typeof c=="string"?c:C2[o];if(typeof A=="string"){if(a!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let u=(0,dEe.parse)(A);return I2.is(t,u,r,n,s)}if(typeof c=="function")return iq(c,o,a,1),u=>c(u,a)&&t(u);if(o in X0)return X0[o](t,a,r,n);if(o in Cb){let u=Cb[o];return iq(u,o,a,2),l=>u(l,r,a)&&t(l)}throw new Error(`Unknown pseudo-class :${o}`)}var Zo=Ae(K0(),1);function lq(t,e){let r=e.getParent(t);return r&&e.isTag(r)?r:null}function fEe(t,e,r,n,s){let{adapter:i,equals:o}=r;switch(e.type){case Zo.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Zo.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Zo.SelectorType.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),cEe[e.action](t,e,r)}case Zo.SelectorType.Pseudo:return hEe(t,e,r,n,s);case Zo.SelectorType.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=e;return(!r.xmlMode||r.lowerCaseTags)&&(a=a.toLowerCase()),function(A){return i.getName(A)===a&&t(A)}}case Zo.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(A){let u=A;for(;u=lq(u,i);)if(t(u))return!0;return!1};let a=new WeakSet;return function(A){let u=A;for(;u=lq(u,i);)if(!a.has(u)){if(i.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(c){let A=c;do if(t(A))return!0;while(A=lq(A,i));return!1};case Zo.SelectorType.Parent:return function(c){return i.getChildren(c).some(A=>i.isTag(A)&&t(A))};case Zo.SelectorType.Child:return function(c){let A=i.getParent(c);return A!=null&&i.isTag(A)&&t(A)};case Zo.SelectorType.Sibling:return function(c){let A=i.getSiblings(c);for(let u=0;u<A.length;u++){let l=A[u];if(o(c,l))break;if(i.isTag(l)&&t(l))return!0}return!1};case Zo.SelectorType.Adjacent:return i.prevElementSibling?function(c){let A=i.prevElementSibling(c);return A!=null&&t(A)}:function(c){let A=i.getSiblings(c),u;for(let l=0;l<A.length;l++){let d=A[l];if(o(c,d))break;i.isTag(d)&&(u=d)}return!!u&&t(u)};case Zo.SelectorType.Universal:{if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}}function gEe(t,e,r){let n=y2(t,e,r);return Aq(n,e.adapter)}function y2(t,e,r){let n=typeof t=="string"?(0,nc.parse)(t):t;return B2(n,e,r)}function pEe(t){return t.type===nc.SelectorType.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(pEe)))}var wft={type:nc.SelectorType.Descendant},Sft={type:"_flexibleDescendant"},Nft={type:nc.SelectorType.Pseudo,name:"scope",data:null};function Tft(t,{adapter:e},r){let n=!!r?.every(s=>{let i=e.isTag(s)&&e.getParent(s);return s===cq||i&&e.isTag(i)});fo
Line truncated
|
||||
`)})):{name:s,value:i.replace(kEe,`\r
|
||||
`)}}).toArray()}var Nq={};Sa(Nq,{extract:()=>qgt});function Ggt(t){var e;return typeof t=="string"?{selector:t,value:"textContent"}:{selector:t.selector,value:(e=t.value)!==null&&e!==void 0?e:"textContent"}}function qgt(t){let e={};for(let r in t){let n=t[r],s=Array.isArray(n),{selector:i,value:o}=Ggt(s?n[0]:n),a=typeof o=="function"?o:typeof o=="string"?c=>this._make(c).prop(o):c=>this._make(c).extract(o);if(s)e[r]=this._findBySelector(i,Number.POSITIVE_INFINITY).map((c,A)=>a(A,r,e)).get();else{let c=this._findBySelector(i,1);e[r]=c.length>0?a(c[0],r,e):void 0}}return e}var kd=class{constructor(e,r,n){if(this.length=0,this.options=n,this._root=r,e){for(let s=0;s<e.length;s++)this[s]=e[s];this.length=e.length}}};kd.prototype.cheerio="[cheerio object]";kd.prototype.splice=Array.prototype.splice;kd.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(kd.prototype,eq,bq,Qq,wq,Sq,Nq);function vEe(t,e){return function r(n,s,i=!0){if(n==null)throw new Error("cheerio.load() expects a string");let o=U0(s),a=t(n,o,i,null);class c extends kd{_make(l,d){let h=A(l,d);return h.prevObject=this,h}_parse(l,d,h,f){return t(l,d,h,f)}_render(l){return e(l,this.options)}}function A(u,l,d=a,h){if(u&&Ko(u))return u;let f=U0(h,o),p=typeof d=="string"?[t(d,f,!1,null)]:"length"in d?d:[d],I=Ko(p)?p:new c(p,null,f);if(I._root=I,!u)return new c(void 0,I,f);let m=typeof u=="string"&&lb(u)?t(u,f,!1,null).children:Ygt(u)?[u]:Array.isArray(u)?u:void 0,C=new c(m,I,f);if(m)return C;if(typeof u!="string")throw new TypeError("Unexpected type of selector");let y=u,N=l?typeof l=="string"?lb(l)?new c([t(l,f,!1,null)],I,f):(y=`${l} ${y}`,I):Ko(l)?l:new c(Array.isArray(l)?l:[l],I,f):I;return N?N.find(y):C}return Object.assign(A,WG,{load:r,_root:a,_options:o,fn:c.prototype,prototype:c.prototype}),A}}function Ygt(t){return!!t.name||t.type===Jo.Root||t.type===Jo.Text||t.type===Jo.Comment}var Vgt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ur="\uFFFD",S;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(S||(S={}));var Ls={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function T2(t){return t>=55296&&t<=57343}function _Ee(t){return t>=56320&&t<=57343}function FEe(t,e){return(t-55296)*1024+9216+e}function x2(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function R2(t){return t>=64976&&t<=65007||Vgt.has(t)}var W;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keywo
Line truncated
|
||||
${t.toDisplayList(this.invalid)}`),this.valid.length>0&&(e.length>0&&(e+=`
|
||||
`),e+=`\u2713 Found known Gradle Wrapper JAR files:
|
||||
${t.toDisplayList(this.valid)}`),e}static toDisplayList(e){return` ${e.map(r=>r.toDisplayString()).join(`
|
||||
`)}`}},t_=class{constructor(e,r){this.path=e,this.checksum=r}toDisplayString(){return`${this.checksum} ${this.path}`}};var Yg=class extends Error{constructor(e){e instanceof Error?(super(e.message),this.name=e.name,this.stack=e.stack):super(String(e))}};function uxe(t){if(t instanceof AggregateError){Kl("Multiple errors returned");for(let e of t.errors)_c(`Error ${t.errors.indexOf(e)}: ${e.message}`),e.stack&&$(e.stack)}else t instanceof Yg?(Kl(String(t)),t.stack&&$(t.stack)):(Kl(String(t)),t instanceof Error&&t.stack&&$(t.stack))}async function lxe(t,e,r){if(!t.doValidateWrappers())return;let n=new OD(r),s=process.env.ALLOWED_GRADLE_WRAPPER_CHECKSUMS?.split(",")||[],i=n.load(),o=await Axe(e,t.allowSnapshotWrappers(),s,i);if(o.isValid())await UN("All Gradle Wrapper jars are valid",async()=>{O(`Loaded previously validated checksums from cache: ${i.join(", ")}`),$(o.toDisplayString())});else throw $(o.toDisplayString()),new Yg(`At least one Gradle Wrapper Jar failed validation!
|
||||
`)}`}},o_=class{constructor(e,r){this.path=e,this.checksum=r}toDisplayString(){return`${this.checksum} ${this.path}`}};var Vg=class extends Error{constructor(e){e instanceof Error?(super(e.message),this.name=e.name,this.stack=e.stack):super(String(e))}};function axe(t){if(t instanceof AggregateError){Kl("Multiple errors returned");for(let e of t.errors)Ui(`Error ${t.errors.indexOf(e)}: ${e.message}`),e.stack&&$(e.stack)}else t instanceof Vg?(Kl(String(t)),t.stack&&$(t.stack)):(Kl(String(t)),t instanceof Error&&t.stack&&$(t.stack))}async function cxe(t,e,r){if(!t.doValidateWrappers())return;let n=new VD(r),s=process.env.ALLOWED_GRADLE_WRAPPER_CHECKSUMS?.split(",")||[],i=n.load(),o=await oxe(e,t.allowSnapshotWrappers(),s,i);if(o.isValid())await qN("All Gradle Wrapper jars are valid",async()=>{P(`Loaded previously validated checksums from cache: ${i.join(", ")}`),$(o.toDisplayString())});else throw $(o.toDisplayString()),new Vg(`At least one Gradle Wrapper Jar failed validation!
|
||||
See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures
|
||||
${o.toDisplayString()}`);n.save(o.valid.map(a=>a.checksum))}import fo from"fs";import Vg from"path";function dxe(t,e,r){let n=Vg.resolve(e,xD);fo.mkdirSync(n,{recursive:!0}),gkt(e),pkt(t),Pa()&&mkt(e),r&&gn("GRADLE_ENCRYPTION_KEY",r)}function gkt(t){let e=Vg.resolve(t,"init.d");fo.mkdirSync(e,{recursive:!0});let r=["gradle-actions.build-result-capture.init.gradle","gradle-actions.build-result-capture-service.plugin.groovy","gradle-actions.github-dependency-graph.init.gradle","gradle-actions.github-dependency-graph-gradle-plugin-apply.groovy","gradle-actions.inject-develocity.init.gradle"];for(let n of r){let s=Ekt("init-scripts",n),i=Vg.resolve(e,n);fo.writeFileSync(i,s)}}function pkt(t){let e=Ckt();if(e==null)return;let r=Vg.resolve(t,".m2"),n=Vg.resolve(r,"toolchains.xml");if(!fo.existsSync(n))fo.mkdirSync(r,{recursive:!0}),fo.writeFileSync(n,e),$(`Wrote default JDK locations to ${n}`);else{let s=fo.readFileSync(n,"utf8"),i=Ikt(s,e);fo.writeFileSync(n,i),$(`Merged default JDK locations into ${n}`)}}function mkt(t){let e=`org.gradle.logging.level=info
|
||||
${o.toDisplayString()}`);n.save(o.valid.map(a=>a.checksum))}import lo from"fs";import Wg from"path";function Axe(t,e,r){let n=Wg.resolve(e,_D);lo.mkdirSync(n,{recursive:!0}),ykt(e),Bkt(t),Oa()&&bkt(e),r&&pn("GRADLE_ENCRYPTION_KEY",r)}function ykt(t){let e=Wg.resolve(t,"init.d");lo.mkdirSync(e,{recursive:!0});let r=["gradle-actions.build-result-capture.init.gradle","gradle-actions.build-result-capture-service.plugin.groovy","gradle-actions.github-dependency-graph.init.gradle","gradle-actions.github-dependency-graph-gradle-plugin-apply.groovy","gradle-actions.inject-develocity.init.gradle"];for(let n of r){let s=Qkt("init-scripts",n),i=Wg.resolve(e,n);lo.writeFileSync(i,s)}}function Bkt(t){let e=wkt();if(e==null)return;let r=Wg.resolve(t,".m2"),n=Wg.resolve(r,"toolchains.xml");if(!lo.existsSync(n))lo.mkdirSync(r,{recursive:!0}),lo.writeFileSync(n,e),$(`Wrote default JDK locations to ${n}`);else{let s=lo.readFileSync(n,"utf8"),i=Skt(s,e);lo.writeFileSync(n,i),$(`Merged default JDK locations into ${n}`)}}function bkt(t){let e=`org.gradle.logging.level=info
|
||||
org.gradle.logging.stacktrace=all
|
||||
`,r=Vg.resolve(t,"gradle.properties");if(fo.existsSync(r)){$(`Merged --info and --stacktrace into existing ${r} file`);let n=fo.readFileSync(r,"utf-8");fo.writeFileSync(r,`${e}
|
||||
${n}`)}else $(`Created a new ${r} with --info and --stacktrace`),fo.writeFileSync(r,e)}function Ekt(...t){let e=import.meta.dirname,r=Vg.resolve(e,"..","..","..","sources","src","resources",...t);return fo.readFileSync(r,"utf8")}function Ckt(){let t=Object.entries(process.env).filter(([e])=>e.startsWith("JAVA_HOME_")&&process.env[e]).map(([e,r])=>({jdkVersion:e.match(/JAVA_HOME_(\d+)_/)?.[1]??null,jdkPath:r})).filter(e=>e.jdkVersion!==null);return t.length===0?null:`<?xml version="1.0" encoding="UTF-8"?>
|
||||
`,r=Wg.resolve(t,"gradle.properties");if(lo.existsSync(r)){$(`Merged --info and --stacktrace into existing ${r} file`);let n=lo.readFileSync(r,"utf-8");lo.writeFileSync(r,`${e}
|
||||
${n}`)}else $(`Created a new ${r} with --info and --stacktrace`),lo.writeFileSync(r,e)}function Qkt(...t){let e=import.meta.dirname,r=Wg.resolve(e,"..","..","..","sources","src","resources",...t);return lo.readFileSync(r,"utf8")}function wkt(){let t=Object.entries(process.env).filter(([e])=>e.startsWith("JAVA_HOME_")&&process.env[e]).map(([e,r])=>({jdkVersion:e.match(/JAVA_HOME_(\d+)_/)?.[1]??null,jdkPath:r})).filter(e=>e.jdkVersion!==null);return t.length===0?null:`<?xml version="1.0" encoding="UTF-8"?>
|
||||
<toolchains>
|
||||
<!-- JDK Toolchains installed by default on GitHub-hosted runners -->
|
||||
${t.map(({jdkVersion:e,jdkPath:r})=>` <toolchain>
|
||||
@@ -294,55 +294,55 @@ ${t.map(({jdkVersion:e,jdkPath:r})=>` <toolchain>
|
||||
</toolchain>`).join(`
|
||||
`)}
|
||||
</toolchains>
|
||||
`}function Ikt(t,e){let r=e.split("<toolchains>").pop();return t.replace("</toolchains>",r)}var KJ="GRADLE_BUILD_ACTION_SETUP_COMPLETED",ykt="GRADLE_USER_HOME";async function hxe(t,e,r){let n=await fxe(),s=await bkt();return process.env[KJ]?($("Gradle setup only performed on first gradle/actions step in workflow."),!1):(gn(KJ,!0),bu(KJ,!0),bu(ykt,s),dxe(n,s,t.getCacheEncryptionKey()),await(await Zme(t)).restore(s,Bkt(t)),await lxe(r,Gu(),s),await mme(e),!0)}function Bkt(t){return{disabled:t.isCacheDisabled(),readOnly:t.isCacheReadOnly(),writeOnly:t.isCacheWriteOnly(),overwriteExisting:t.isCacheOverwriteExisting(),strictMatch:t.isCacheStrictMatch(),cleanup:t.getCacheCleanupOption(),encryptionKey:t.getCacheEncryptionKey()||void 0,includes:t.getCacheIncludes(),excludes:t.getCacheExcludes()}}async function bkt(){let t=process.env.GRADLE_USER_HOME;if(t){let r=Gu();return XJ.resolve(r,t)}let e=XJ.resolve(await fxe(),".gradle");if($J.existsSync(e))return $(`Gradle User Home already exists at ${e}`),gn("GRADLE_USER_HOME",e),e;if(r_.platform()==="win32"&&e.startsWith("C:\\")&&$J.existsSync("D:\\a\\")){let r="D:\\a\\.gradle";return $(`Setting GRADLE_USER_HOME to ${r} to leverage (potentially) faster drive.`),gn("GRADLE_USER_HOME",r),r}return gn("GRADLE_USER_HOME",e),e}async function fxe(){let t=await dy("java",["-XshowSettings:properties","-version"],{silent:!0}),e=/user\.home = (\S*)/i,r=t.stderr.match(e);if(r==null||r.length<=1)return $("Could not determine user.home from java -version output. Using os.homedir()."),r_.homedir();let n=r[1];return O(`Determined user.home from java -version output: '${n}'`),n}var tRe=Ae(Rxe(),1),nz=Ae(Ny(),1);import*as WE from"fs";import*as Jxe from"os";import*as ah from"path";import*as tz from"crypto";import*as Jg from"fs";var Lkt=Ae(Ny(),1);import*as UQ from"path";var i_=Ae(Ny(),1);import*as kxe from"stream";import*as vxe from"util";import{ok as Pkt}from"assert";var Dxe=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},n_=class{constructor(e,r,n){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,r){return Dxe(this,void 0,void 0,function*(){let n=1;for(;n<this.maxAttempts;){try{return yield e()}catch(i){if(r&&!r(i))throw i;$(i.message)}let s=this.getSleepAmount();$(`Waiting ${s} seconds before trying again`),yield this.sleep(s),n++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return Dxe(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e*1e3))})}};var Wg=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},s_=class extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},Okt=process.platform==="win32",Xbr=process.platform==="darwin",Hkt="actions/tool-cache";function _xe(t,e,r,n){return Wg(this,void 0,void 0,function*(){e=e||UQ.join(Mxe(),tz.randomUUID()),yield of(UQ.dirname(e)),O(`Downloading ${t}`),O(`Destination ${e}`);let s=3,i=ez("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=ez("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new n_(s,i,o).execute(()=>Wg(this,void 0,void 0,function*(){return yield Gkt(t,e||"",r,n)}),c=>!(c instanceof s_&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}function Gkt(t,e,r,n){return Wg(this,void 0,void 0,function*(){if(Jg.existsSync(e))throw new Error(`Destination file path ${e} already exists`);let s=new Lr(Hkt,[],{allowRetries:!1});r&&(O("set auth"),n===void 0&&(n={}),n.authorization=r);let i=yield s.get(t,n);if(i.message.statusCode!==200){let u=new s_(i.message.statusCode);throw O(`Failed to download from "${t}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),u}let o=vxe.promisify(kxe.pipeline),c=ez("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>i.message)(),A=!1;try{return yield o(c,Jg.createWriteStream(e)),O("download complete"),A=!0,e}finally{if(!A){O("download failed");try{yield lce(e)}catch(u){O(`Failed to delete '${e}'. ${u.message}`)}}}})}function Fxe(t,e){return Wg(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'file' is required");return e=yield Vkt(e),Okt?yield qkt(t,e):yield Ykt(t,e),e})}function qkt(t,e){return Wg(this,void 0,void 0,function*(){let r=
Line truncated
|
||||
`," Line feed \\n"]]),fRe=new Map([...qz,["\\"," Backslash \\"],["/"," Forward slash /"]]);function gRe(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of fRe)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
|
||||
`}function Skt(t,e){let r=e.split("<toolchains>").pop();return t.replace("</toolchains>",r)}var ez="GRADLE_BUILD_ACTION_SETUP_COMPLETED",Nkt="GRADLE_USER_HOME";async function uxe(t,e,r){let n=await lxe(),s=await xkt();return process.env[ez]?($("Gradle setup only performed on first gradle/actions step in workflow."),!1):(pn(ez,!0),bu(ez,!0),bu(Nkt,s),Axe(n,s,t.getCacheEncryptionKey()),await(await Kme(t)).restore(s,Tkt(t)),await cxe(r,Gu(),s),await fme(e),!0)}function Tkt(t){return{disabled:t.isCacheDisabled(),readOnly:t.isCacheReadOnly(),writeOnly:t.isCacheWriteOnly(),overwriteExisting:t.isCacheOverwriteExisting(),strictMatch:t.isCacheStrictMatch(),cleanup:t.getCacheCleanupOption(),encryptionKey:t.getCacheEncryptionKey()||void 0,includes:t.getCacheIncludes(),excludes:t.getCacheExcludes()}}async function xkt(){let t=process.env.GRADLE_USER_HOME;if(t){let r=Gu();return rz.resolve(r,t)}let e=rz.resolve(await lxe(),".gradle");if(tz.existsSync(e))return $(`Gradle User Home already exists at ${e}`),pn("GRADLE_USER_HOME",e),e;if(a_.platform()==="win32"&&e.startsWith("C:\\")&&tz.existsSync("D:\\a\\")){let r="D:\\a\\.gradle";return $(`Setting GRADLE_USER_HOME to ${r} to leverage (potentially) faster drive.`),pn("GRADLE_USER_HOME",r),r}return pn("GRADLE_USER_HOME",e),e}async function lxe(){let t=await gy("java",["-XshowSettings:properties","-version"],{silent:!0}),e=/user\.home = (\S*)/i,r=t.stderr.match(e);if(r==null||r.length<=1)return $("Could not determine user.home from java -version output. Using os.homedir()."),a_.homedir();let n=r[1];return P(`Determined user.home from java -version output: '${n}'`),n}var Xxe=Ae(Nxe(),1),az=Ae(Ry(),1);import*as zE from"fs";import*as Yxe from"os";import*as Ah from"path";import*as iz from"crypto";import*as zg from"fs";var qkt=Ae(Ry(),1);import*as qQ from"path";var u_=Ae(Ry(),1);import*as xxe from"stream";import*as Rxe from"util";import{ok as Vkt}from"assert";var Txe=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},c_=class{constructor(e,r,n){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,r){return Txe(this,void 0,void 0,function*(){let n=1;for(;n<this.maxAttempts;){try{return yield e()}catch(i){if(r&&!r(i))throw i;$(i.message)}let s=this.getSleepAmount();$(`Waiting ${s} seconds before trying again`),yield this.sleep(s),n++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return Txe(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e*1e3))})}};var Jg=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},A_=class extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},Wkt=process.platform==="win32",mQr=process.platform==="darwin",Jkt="actions/tool-cache";function Dxe(t,e,r,n){return Jg(this,void 0,void 0,function*(){e=e||qQ.join(vxe(),iz.randomUUID()),yield cf(qQ.dirname(e)),P(`Downloading ${t}`),P(`Destination ${e}`);let s=3,i=sz("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=sz("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new c_(s,i,o).execute(()=>Jg(this,void 0,void 0,function*(){return yield zkt(t,e||"",r,n)}),c=>!(c instanceof A_&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}function zkt(t,e,r,n){return Jg(this,void 0,void 0,function*(){if(zg.existsSync(e))throw new Error(`Destination file path ${e} already exists`);let s=new Lr(Jkt,[],{allowRetries:!1});r&&(P("set auth"),n===void 0&&(n={}),n.authorization=r);let i=yield s.get(t,n);if(i.message.statusCode!==200){let u=new A_(i.message.statusCode);throw P(`Failed to download from "${t}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),u}let o=Rxe.promisify(xxe.pipeline),c=sz("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>i.message)(),A=!1;try{return yield o(c,zg.createWriteStream(e)),P("download complete"),A=!0,e}finally{if(!A){P("download failed");try{yield uce(e)}catch(u){P(`Failed to delete '${e}'. ${u.message}`)}}}})}function kxe(t,e){return Jg(this,void 0,void 0,function*(){if(!t)throw new Error("parameter 'file' is required");return e=yield $kt(e),Wkt?yield jkt(t,e):yield Kkt(t,e),e})}function jkt(t,e){return Jg(this,void 0,void 0,function*(){let r=
Line truncated
|
||||
`," Line feed \\n"]]),lRe=new Map([...qz,["\\"," Backslash \\"],["/"," Forward slash /"]]);function dRe(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of lRe)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(fRe.values()).toString()}
|
||||
Invalid characters include: ${Array.from(lRe.values()).toString()}
|
||||
|
||||
These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);$("Artifact name is valid!")}function Yz(t){if(!t)throw new Error("Provided file path input during validation is empty");for(let[e,r]of qz)if(t.includes(e))throw new Error(`The path for one of the files in artifact is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(qz.values()).toString()}
|
||||
|
||||
The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
|
||||
`)}var CRe=Ae(ERe(),1);function GA(){return`@actions/artifact-${CRe.version}`}var u_=class extends Error{constructor(e=[]){let r="No files were found to upload";e.length>0&&(r+=`: ${e.join(", ")}`),super(r),this.files=e,this.name="FilesNotFoundError"}},fl=class extends Error{constructor(e){super(e),this.name="InvalidResponseError"}},gl=class extends Error{constructor(e="Artifact not found"){super(e),this.name="ArtifactNotFoundError"}},ch=class extends Error{constructor(e="@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES."){super(e),this.name="GHESNotSupportedError"}},pl=class extends Error{constructor(e){let r=`Unable to make request: ${e}
|
||||
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"}};pl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var zg=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.
|
||||
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"}};zg.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var jg=class extends Error{};jg.prototype.name="InvalidTokenError";function Cvt(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Ivt(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Cvt(e)}catch{return atob(e)}}function IRe(t,e){if(typeof t!="string")throw new jg("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new jg(`Invalid token specified: missing part #${r+1}`);let s;try{s=Ivt(n)}catch(i){throw new jg(`Invalid token specified: invalid base64 for part #${r+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new jg(`Invalid token specified: invalid json for part #${r+1} (${i.message})`)}}var l_=new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims");function qA(){let t=c_(),e=IRe(t);if(!e.scp)throw l_;let r=e.scp.split(" ");if(r.length===0)throw l_;for(let n of r){let s=n.split(":");if(s?.[0]!=="Actions.Results")continue;if(s.length!==3)throw l_;let i={workflowRunBackendId:s[1],workflowJobRunBackendId:s[2]};return O(`Workflow Run Backend ID: ${i.workflowRunBackendId}`),O(`Workflow Job Run Backend ID: ${i.workflowJobRunBackendId}`),i}throw l_}function yRe(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&(La(r),La(encodeURIComponent(r)))}catch(e){O(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}function BRe(t){if(typeof t!="object"||t===null){O("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&yRe(t.signed_upload_url),"signed_url"in t&&typeof t.signed_url=="string"&&yRe(t.signed_url)}var d_=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},Vz=class{constructor(e,r,n,s){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=c_();this.baseUrl=nRe(),r&&(this.maxAttempts=r),n&&(this.baseRetryIntervalMilliseconds=n),s&&(this.retryMultiplier=s),this.httpClient=new Lr(e,[new Bu(i)])}request(e,r,n,s){return d_(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;O(`[Request] ${r} ${i}`);let o={"Content-Type":n};try{let{body:a}=yield this.retryableRequest(()=>d_(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(s),o)}));return a}catch(a){throw new Error(`Failed to ${r}: ${a.message}`)}})}retryableRequest(e){return d_(this,void 0,void 0,function*(){let r=0,n="",s="";for(;r<this.maxAttempts;){let i=!1;try{let a=yield e(),c=a.message.statusCode;s=yield a.readBody(),O(`[Response] - ${a.message.statusCode}`),O(`Headers: ${JSON.stringify(a.message.headers,null,2)}`);let A=JSON.parse(s);if(BRe(A),O(`Body: ${JSON.stringify(A,null,2)}`),this.isSuccessStatusCode(c))return{response:a,body:A};if(i=this.isRetryableHttpStatusCode(c),n=`Failed request: (${c}) ${a.message.statusMessage}`,A.msg){if(zg.isUsageErrorMessage(A.msg))throw new zg;n=`${n}: ${A.msg}`}}catch(a){if(a instanceof SyntaxError&&O(`Raw Body: ${s}`),a instanceof zg)throw a;if(pl.isNetworkErrorCode(a?.code))throw new pl(a?.code);i=!0,n=a.message}if(!i)throw new Error(`Received non-retryable error: ${n}`);if(r+1===this.maxAttempts)throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let o=this.getExponentialRetryTimeMilliseconds(r);$(`Attempt ${r+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${o} ms...`),yield this.sleep(o),r++}throw new Error("Request failed")})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[tr.BadGateway,tr.GatewayTimeout,tr.InternalServerError,tr.ServiceUnavailable,tr.TooManyRequests].includes(e):!1}sleep(e){return d_(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),n=r*this.retryMultiplier;return Math.trunc(Math.random()*(n-r)+r)}};function YA(t){let e=new Vz(GA(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new A_(e)}import*as KE from"fs";import{normalize as bRe,resolve as QRe}from"path";function wRe(t){if(!KE.existsSync(t))throw ne
Line truncated
|
||||
Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);c.length>1&&Ve("Multiple artifacts found, defaulting to first.");let A={workflowRunBackendId:c[0].workflowRunBackendId,workflowJobRunBackendId:c[0].workflowJobRunBackendId,name:c[0].name},{signedUrl:u}=yield n.GetSignedArtifactURL(A);$(`Redirecting to blob download url: ${D3e(u)}`);try{$(`Starting download of artifact to: ${r}`);let l=yield k3e(u,r,e?.skipDecompress);$("Artifact download completed successfully."),e?.expectedHash&&e?.expectedHash!==l.sha256Digest&&(s=!0,O(`Computed digest: ${l.sha256Digest}`),O(`Expected digest: ${e.expectedHash}`))}catch(l){throw new Error(`Unable to download and extract artifact: ${l.message}`)}return{downloadPath:r,digestMismatch:s}})}function F3e(){return YC(this,arguments,void 0,function*(t=sRe()){return(yield zVt(t))?O(`Artifact destination folder already exists: ${t}`):(O(`Artifact destination folder does not exist, creating: ${t}`),yield S3e.mkdir(t,{recursive:!0})),t})}var KVt=5,$Vt=[400,401,403,404,422];function VC(t,e=KVt,r=$Vt){var n;if(e<=0)return[{enabled:!1},t.request];let s={enabled:!0};r.length>0&&(s.doNotRetry=r);let i=Object.assign(Object.assign({},t.request),{retries:e});return O(`GitHub client configured with: (retries: ${i.retries}, retry-exempt-status-code: ${(n=s.doNotRetry)!==null&&n!==void 0?n:"octokit default: [400, 401, 403, 404, 422]"})`),[s,i]}var M3e="6.0.0";function Qp(t){t.hook.wrap("request",(e,r)=>{t.log.debug("request",r);let n=Date.now(),s=t.request.endpoint.parse(r),i=s.url.replace(r.baseUrl,"");return e(r).then(o=>{let a=o.headers["x-github-request-id"];return t.log.info(`${s.method} ${i} - ${o.status} with id ${a} in ${Date.now()-n}ms`),o}).catch(o=>{let a=o.response?.headers["x-github-request-id"]||"UNKNOWN";throw t.log.error(`${s.method} ${i} - ${o.status} with id ${a} in ${Date.now()-n}ms`),o})})}Qp.VERSION=M3e;var P3e=Ae(L3e(),1),O3e=Ae(TO(),1),XVt="0.0.0-development";async function U3e(t,e,r,n){if(!r.request||!r.request.request)throw r;if(r.status>=400&&!t.doNotRetry.includes(r.status)){let s=n.request.retries!=null?n.request.retries:t.retries,i=Math.pow((n.request.retryCount||0)+1,2);throw e.retry.retryRequest(r,s,i)}throw r}async function ZVt(t,e,r,n){let s=new P3e.default;return s.on("failed",function(i,o){let a=~~i.request.request.retries,c=~~i.request.request.retryAfter;if(n.request.retryCount=o.retryCount+1,a>o.retryCount)return c*t.retryAfterBaseValue}),s.schedule(eWt.bind(null,t,e,r),n)}async function eWt(t,e,r,n){let s=await r(r,n);if(s.data&&s.data.errors&&s.data.errors.length>0&&/Something went wrong while executing your query/.test(s.data.errors[0].message)){let i=new O3e.RequestError(s.data.errors[0].message,500,{request:n,response:s});return U3e(t,e,i,n)}return s}function wp(t,e){let r=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},e.retry);return r.enabled&&(t.hook.error("request",U3e.bind(null,r,t)),t.hook.wrap("request",ZVt.bind(null,r,t))),{retry:{retryRequest:(n,s,i)=>(n.request.request=Object.assign({},n.request.request,{retries:s,retryAfter:i}),n)}}}wp.VERSION=XVt;var H3e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function EM(t,e,r,n,s){return H3e(this,void 0,void 0,function*(){var i;let[o,a]=VC(cf),c={log:void 0,userAgent:GA(),previews:void 0,retry:o,request:a},u=yield Oa(s,c,wp,Qp).request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}",{owner:r,repo:n,run_id:e,name:t});if(u.status!==200)throw new fl(`Invalid response from GitHub API: ${u.status} (${(i=u?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);if(u.data.artifacts.length===0)throw new gl(`Artifact not found for name: ${t}
|
||||
`)}var pRe=Ae(gRe(),1);function GA(){return`@actions/artifact-${pRe.version}`}var XE=class extends Error{constructor(e=[]){let r="No files were found to upload";e.length>0&&(r+=`: ${e.join(", ")}`),super(r),this.files=e,this.name="FilesNotFoundError"}},fl=class extends Error{constructor(e){super(e),this.name="InvalidResponseError"}},gl=class extends Error{constructor(e="Artifact not found"){super(e),this.name="ArtifactNotFoundError"}},uh=class extends Error{constructor(e="@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES."){super(e),this.name="GHESNotSupportedError"}},pl=class extends Error{constructor(e){let r=`Unable to make request: ${e}
|
||||
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"}};pl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Kg=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts.
|
||||
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"}};Kg.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var $g=class extends Error{};$g.prototype.name="InvalidTokenError";function yvt(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Bvt(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return yvt(e)}catch{return atob(e)}}function mRe(t,e){if(typeof t!="string")throw new $g("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new $g(`Invalid token specified: missing part #${r+1}`);let s;try{s=Bvt(n)}catch(i){throw new $g(`Invalid token specified: invalid base64 for part #${r+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new $g(`Invalid token specified: invalid json for part #${r+1} (${i.message})`)}}var g_=new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims");function qA(){let t=h_(),e=mRe(t);if(!e.scp)throw g_;let r=e.scp.split(" ");if(r.length===0)throw g_;for(let n of r){let s=n.split(":");if(s?.[0]!=="Actions.Results")continue;if(s.length!==3)throw g_;let i={workflowRunBackendId:s[1],workflowJobRunBackendId:s[2]};return P(`Workflow Run Backend ID: ${i.workflowRunBackendId}`),P(`Workflow Job Run Backend ID: ${i.workflowJobRunBackendId}`),i}throw g_}function ERe(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&(Ua(r),Ua(encodeURIComponent(r)))}catch(e){P(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}function CRe(t){if(typeof t!="object"||t===null){P("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&ERe(t.signed_upload_url),"signed_url"in t&&typeof t.signed_url=="string"&&ERe(t.signed_url)}var p_=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},Vz=class{constructor(e,r,n,s){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let i=h_();this.baseUrl=eRe(),r&&(this.maxAttempts=r),n&&(this.baseRetryIntervalMilliseconds=n),s&&(this.retryMultiplier=s),this.httpClient=new Lr(e,[new Bu(i)])}request(e,r,n,s){return p_(this,void 0,void 0,function*(){let i=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;P(`[Request] ${r} ${i}`);let o={"Content-Type":n};try{let{body:a}=yield this.retryableRequest(()=>p_(this,void 0,void 0,function*(){return this.httpClient.post(i,JSON.stringify(s),o)}));return a}catch(a){throw new Error(`Failed to ${r}: ${a.message}`)}})}retryableRequest(e){return p_(this,void 0,void 0,function*(){let r=0,n="",s="";for(;r<this.maxAttempts;){let i=!1;try{let a=yield e(),c=a.message.statusCode;s=yield a.readBody(),P(`[Response] - ${a.message.statusCode}`),P(`Headers: ${JSON.stringify(a.message.headers,null,2)}`);let A=JSON.parse(s);if(CRe(A),P(`Body: ${JSON.stringify(A,null,2)}`),this.isSuccessStatusCode(c))return{response:a,body:A};if(i=this.isRetryableHttpStatusCode(c),n=`Failed request: (${c}) ${a.message.statusMessage}`,A.msg){if(Kg.isUsageErrorMessage(A.msg))throw new Kg;n=`${n}: ${A.msg}`}}catch(a){if(a instanceof SyntaxError&&P(`Raw Body: ${s}`),a instanceof Kg)throw a;if(pl.isNetworkErrorCode(a?.code))throw new pl(a?.code);i=!0,n=a.message}if(!i)throw new Error(`Received non-retryable error: ${n}`);if(r+1===this.maxAttempts)throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${n}`);let o=this.getExponentialRetryTimeMilliseconds(r);$(`Attempt ${r+1} of ${this.maxAttempts} failed with error: ${n}. Retrying request in ${o} ms...`),yield this.sleep(o),r++}throw new Error("Request failed")})}isSuccessStatusCode(e){return e?e>=200&&e<300:!1}isRetryableHttpStatusCode(e){return e?[er.BadGateway,er.GatewayTimeout,er.InternalServerError,er.ServiceUnavailable,er.TooManyRequests].includes(e):!1}sleep(e){return p_(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e))})}getExponentialRetryTimeMilliseconds(e){if(e<0)throw new Error("attempt should be a positive integer");if(e===0)return this.baseRetryIntervalMilliseconds;let r=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,e),n=r*this.retryMultiplier;return Math.trunc(Math.random()*(n-r)+r)}};function YA(t){let e=new Vz(GA(),t?.maxAttempts,t?.retryIntervalMs,t?.retryMultiplier);return new f_(e)}import*as ZE from"fs";import{normalize as IRe,resolve as yRe}from"path";function BRe(t){if(!ZE.existsSync(t))throw ne
Line truncated
|
||||
Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);c.length>1&&Ve("Multiple artifacts found, defaulting to first.");let A={workflowRunBackendId:c[0].workflowRunBackendId,workflowJobRunBackendId:c[0].workflowJobRunBackendId,name:c[0].name},{signedUrl:u}=yield n.GetSignedArtifactURL(A);$(`Redirecting to blob download url: ${v3e(u)}`);try{$(`Starting download of artifact to: ${r}`);let l=yield _3e(u,r,e?.skipDecompress);$("Artifact download completed successfully."),e?.expectedHash&&e?.expectedHash!==l.sha256Digest&&(s=!0,P(`Computed digest: ${l.sha256Digest}`),P(`Expected digest: ${e.expectedHash}`))}catch(l){throw new Error(`Unable to download and extract artifact: ${l.message}`)}return{downloadPath:r,digestMismatch:s}})}function L3e(){return JC(this,arguments,void 0,function*(t=tRe()){return(yield ZVt(t))?P(`Artifact destination folder already exists: ${t}`):(P(`Artifact destination folder does not exist, creating: ${t}`),yield T3e.mkdir(t,{recursive:!0})),t})}var t7t=5,r7t=[400,401,403,404,422];function zC(t,e=t7t,r=r7t){var n;if(e<=0)return[{enabled:!1},t.request];let s={enabled:!0};r.length>0&&(s.doNotRetry=r);let i=Object.assign(Object.assign({},t.request),{retries:e});return P(`GitHub client configured with: (retries: ${i.retries}, retry-exempt-status-code: ${(n=s.doNotRetry)!==null&&n!==void 0?n:"octokit default: [400, 401, 403, 404, 422]"})`),[s,i]}var U3e="6.0.0";function Sp(t){t.hook.wrap("request",(e,r)=>{t.log.debug("request",r);let n=Date.now(),s=t.request.endpoint.parse(r),i=s.url.replace(r.baseUrl,"");return e(r).then(o=>{let a=o.headers["x-github-request-id"];return t.log.info(`${s.method} ${i} - ${o.status} with id ${a} in ${Date.now()-n}ms`),o}).catch(o=>{let a=o.response?.headers["x-github-request-id"]||"UNKNOWN";throw t.log.error(`${s.method} ${i} - ${o.status} with id ${a} in ${Date.now()-n}ms`),o})})}Sp.VERSION=U3e;var H3e=Ae(P3e(),1),G3e=Ae(vO(),1),n7t="0.0.0-development";async function O3e(t,e,r,n){if(!r.request||!r.request.request)throw r;if(r.status>=400&&!t.doNotRetry.includes(r.status)){let s=n.request.retries!=null?n.request.retries:t.retries,i=Math.pow((n.request.retryCount||0)+1,2);throw e.retry.retryRequest(r,s,i)}throw r}async function s7t(t,e,r,n){let s=new H3e.default;return s.on("failed",function(i,o){let a=~~i.request.request.retries,c=~~i.request.request.retryAfter;if(n.request.retryCount=o.retryCount+1,a>o.retryCount)return c*t.retryAfterBaseValue}),s.schedule(i7t.bind(null,t,e,r),n)}async function i7t(t,e,r,n){let s=await r(r,n);if(s.data&&s.data.errors&&s.data.errors.length>0&&/Something went wrong while executing your query/.test(s.data.errors[0].message)){let i=new G3e.RequestError(s.data.errors[0].message,500,{request:n,response:s});return O3e(t,e,i,n)}return s}function Np(t,e){let r=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},e.retry);return r.enabled&&(t.hook.error("request",O3e.bind(null,r,t)),t.hook.wrap("request",s7t.bind(null,r,t))),{retry:{retryRequest:(n,s,i)=>(n.request.request=Object.assign({},n.request.request,{retries:s,retryAfter:i}),n)}}}Np.VERSION=n7t;var q3e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function bM(t,e,r,n,s){return q3e(this,void 0,void 0,function*(){var i;let[o,a]=zC(uf),c={log:void 0,userAgent:GA(),previews:void 0,retry:o,request:a},u=yield Ha(s,c,Np,Sp).request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}",{owner:r,repo:n,run_id:e,name:t});if(u.status!==200)throw new fl(`Invalid response from GitHub API: ${u.status} (${(i=u?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);if(u.data.artifacts.length===0)throw new gl(`Artifact not found for name: ${t}
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let l=u.data.artifacts[0];return u.data.artifacts.length>1&&(l=u.data.artifacts.sort((d,h)=>h.id-d.id)[0],O(`More than one artifact found for a single name, returning newest (id: ${l.id})`)),{artifact:{name:l.name,id:l.id,size:l.size_in_bytes,createdAt:l.created_at?new Date(l.created_at):void 0,digest:l.digest}}})}function G3e(t){return H3e(this,void 0,void 0,function*(){var e;let r=YA(),{workflowRunBackendId:n,workflowJobRunBackendId:s}=qA(),i={workflowRunBackendId:n,workflowJobRunBackendId:s,nameFilter:Cs.create({value:t})},o=yield r.ListArtifacts(i);if(o.artifacts.length===0)throw new gl(`Artifact not found for name: ${t}
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let l=u.data.artifacts[0];return u.data.artifacts.length>1&&(l=u.data.artifacts.sort((d,h)=>h.id-d.id)[0],P(`More than one artifact found for a single name, returning newest (id: ${l.id})`)),{artifact:{name:l.name,id:l.id,size:l.size_in_bytes,createdAt:l.created_at?new Date(l.created_at):void 0,digest:l.digest}}})}function Y3e(t){return q3e(this,void 0,void 0,function*(){var e;let r=YA(),{workflowRunBackendId:n,workflowJobRunBackendId:s}=qA(),i={workflowRunBackendId:n,workflowJobRunBackendId:s,nameFilter:dn.create({value:t})},o=yield r.ListArtifacts(i);if(o.artifacts.length===0)throw new gl(`Artifact not found for name: ${t}
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let a=o.artifacts[0];return o.artifacts.length>1&&(a=o.artifacts.sort((c,A)=>Number(A.databaseId)-Number(c.databaseId))[0],O(`More than one artifact found for a single name, returning newest (id: ${a.databaseId})`)),{artifact:{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?Es.toDate(a.createdAt):void 0,digest:(e=a.digest)===null||e===void 0?void 0:e.value}}})}var q3e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function Y3e(t,e,r,n,s){return q3e(this,void 0,void 0,function*(){var i;let[o,a]=VC(cf),c={log:void 0,userAgent:GA(),previews:void 0,retry:o,request:a},A=Oa(s,c,wp,Qp),u=yield EM(t,e,r,n,s),l=yield A.rest.actions.deleteArtifact({owner:r,repo:n,artifact_id:u.artifact.id});if(l.status!==204)throw new fl(`Invalid response from GitHub API: ${l.status} (${(i=l?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);return{id:u.artifact.id}})}function V3e(t){return q3e(this,void 0,void 0,function*(){let e=YA(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=qA(),s={workflowRunBackendId:r,workflowJobRunBackendId:n,nameFilter:Cs.create({value:t})},i=yield e.ListArtifacts(s);if(i.artifacts.length===0)throw new gl(`Artifact not found for name: ${t}`);let o=i.artifacts[0];i.artifacts.length>1&&(o=i.artifacts.sort((A,u)=>Number(u.databaseId)-Number(A.databaseId))[0],O(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`));let a={workflowRunBackendId:o.workflowRunBackendId,workflowJobRunBackendId:o.workflowJobRunBackendId,name:o.name},c=yield e.DeleteArtifact(a);return $(`Artifact '${t}' (ID: ${c.artifactId}) deleted`),{id:Number(c.artifactId)}})}var W3e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},CM=aRe(),IM=100,tWt=Math.ceil(CM/IM);function J3e(t,e,r,n){return W3e(this,arguments,void 0,function*(s,i,o,a,c=!1){$(`Fetching artifact list for workflow run ${s} in repository ${i}/${o}`);let A=[],[u,l]=VC(cf),d={log:void 0,userAgent:GA(),previews:void 0,retry:u,request:l},h=Oa(a,d,wp,Qp),f=1,{data:p}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:s,per_page:IM,page:f}),I=Math.ceil(p.total_count/IM),m=p.total_count;m>CM&&(Ve(`Workflow run ${s} has ${m} artifacts, exceeding the limit of ${CM}. Results will be incomplete as only the first ${CM} artifacts will be returned`),I=tWt);for(let C of p.artifacts)A.push({name:C.name,id:C.id,size:C.size_in_bytes,createdAt:C.created_at?new Date(C.created_at):void 0,digest:C.digest});for(f++,f;f<=I;f++){O(`Fetching page ${f} of artifact list`);let{data:C}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:s,per_page:IM,page:f});for(let y of C.artifacts)A.push({name:y.name,id:y.id,size:y.size_in_bytes,createdAt:y.created_at?new Date(y.created_at):void 0,digest:y.digest})}return c&&(A=j3e(A)),$(`Found ${A.length} artifact(s)`),{artifacts:A}})}function z3e(){return W3e(this,arguments,void 0,function*(t=!1){let e=YA(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=qA(),s={workflowRunBackendId:r,workflowJobRunBackendId:n},o=(yield e.ListArtifacts(s)).artifacts.map(a=>{var c;return{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?Es.toDate(a.createdAt):void 0,digest:(c=a.digest)===null||c===void 0?void 0:c.value}});return t&&(o=j3e(o)),$(`Found ${o.length} artifact(s)`),{artifacts:o}})}function j3e(t){t.sort((n,s)=>s.id-n.id);let e=[],r=new Set;for(let n of t)r.has(n.name)||(e.push(n),r.add(n.name));return e}var o1=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},rWt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r},Sp=class{uploadArtifact(e,r,n,s){return o1(this,void 0,void 0,function*(){try{if(JE())throw new ch;return VOe(e,r,n,s)}catch(i){throw Ve(`Artifact upload failed with error: ${i}.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let a=o.artifacts[0];return o.artifacts.length>1&&(a=o.artifacts.sort((c,A)=>Number(A.databaseId)-Number(c.databaseId))[0],P(`More than one artifact found for a single name, returning newest (id: ${a.databaseId})`)),{artifact:{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?ho.toDate(a.createdAt):void 0,digest:(e=a.digest)===null||e===void 0?void 0:e.value}}})}var V3e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})};function W3e(t,e,r,n,s){return V3e(this,void 0,void 0,function*(){var i;let[o,a]=zC(uf),c={log:void 0,userAgent:GA(),previews:void 0,retry:o,request:a},A=Ha(s,c,Np,Sp),u=yield bM(t,e,r,n,s),l=yield A.rest.actions.deleteArtifact({owner:r,repo:n,artifact_id:u.artifact.id});if(l.status!==204)throw new fl(`Invalid response from GitHub API: ${l.status} (${(i=l?.headers)===null||i===void 0?void 0:i["x-github-request-id"]})`);return{id:u.artifact.id}})}function J3e(t){return V3e(this,void 0,void 0,function*(){let e=YA(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=qA(),s={workflowRunBackendId:r,workflowJobRunBackendId:n,nameFilter:dn.create({value:t})},i=yield e.ListArtifacts(s);if(i.artifacts.length===0)throw new gl(`Artifact not found for name: ${t}`);let o=i.artifacts[0];i.artifacts.length>1&&(o=i.artifacts.sort((A,u)=>Number(u.databaseId)-Number(A.databaseId))[0],P(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`));let a={workflowRunBackendId:o.workflowRunBackendId,workflowJobRunBackendId:o.workflowJobRunBackendId,name:o.name},c=yield e.DeleteArtifact(a);return $(`Artifact '${t}' (ID: ${c.artifactId}) deleted`),{id:Number(c.artifactId)}})}var z3e=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},QM=sRe(),wM=100,o7t=Math.ceil(QM/wM);function j3e(t,e,r,n){return z3e(this,arguments,void 0,function*(s,i,o,a,c=!1){$(`Fetching artifact list for workflow run ${s} in repository ${i}/${o}`);let A=[],[u,l]=zC(uf),d={log:void 0,userAgent:GA(),previews:void 0,retry:u,request:l},h=Ha(a,d,Np,Sp),f=1,{data:p}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:s,per_page:wM,page:f}),I=Math.ceil(p.total_count/wM),m=p.total_count;m>QM&&(Ve(`Workflow run ${s} has ${m} artifacts, exceeding the limit of ${QM}. Results will be incomplete as only the first ${QM} artifacts will be returned`),I=o7t);for(let C of p.artifacts)A.push({name:C.name,id:C.id,size:C.size_in_bytes,createdAt:C.created_at?new Date(C.created_at):void 0,digest:C.digest});for(f++,f;f<=I;f++){P(`Fetching page ${f} of artifact list`);let{data:C}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:i,repo:o,run_id:s,per_page:wM,page:f});for(let y of C.artifacts)A.push({name:y.name,id:y.id,size:y.size_in_bytes,createdAt:y.created_at?new Date(y.created_at):void 0,digest:y.digest})}return c&&(A=$3e(A)),$(`Found ${A.length} artifact(s)`),{artifacts:A}})}function K3e(){return z3e(this,arguments,void 0,function*(t=!1){let e=YA(),{workflowRunBackendId:r,workflowJobRunBackendId:n}=qA(),s={workflowRunBackendId:r,workflowJobRunBackendId:n},o=(yield e.ListArtifacts(s)).artifacts.map(a=>{var c;return{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?ho.toDate(a.createdAt):void 0,digest:(c=a.digest)===null||c===void 0?void 0:c.value}});return t&&(o=$3e(o)),$(`Found ${o.length} artifact(s)`),{artifacts:o}})}function $3e(t){t.sort((n,s)=>s.id-n.id);let e=[],r=new Set;for(let n of t)r.has(n.name)||(e.push(n),r.add(n.name));return e}var l1=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{A(n.next(u))}catch(l){o(l)}}function c(u){try{A(n.throw(u))}catch(l){o(l)}}function A(u){u.done?i(u.value):s(u.value).then(a,c)}A((n=n.apply(t,e||[])).next())})},a7t=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r},Tp=class{uploadArtifact(e,r,n,s){return l1(this,void 0,void 0,function*(){try{if(jE())throw new uh;return JOe(e,r,n,s)}catch(i){throw Ve(`Artifact upload failed with error: ${i}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),i}})}downloadArtifact(e,r){return o1(this,void 0,void 0,function*(){try{if(JE())throw new ch;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:s,token:i}}=r,o=rWt(r,["findBy"]);return v3e(e,n,s,i,o)}return _3e(e,r)}catch(n){throw Ve(`Download Artifact failed with error: ${n}.
|
||||
If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),i}})}downloadArtifact(e,r){return l1(this,void 0,void 0,function*(){try{if(jE())throw new uh;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:s,token:i}}=r,o=a7t(r,["findBy"]);return F3e(e,n,s,i,o)}return M3e(e,r)}catch(n){throw Ve(`Download Artifact failed with error: ${n}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}listArtifacts(e){return o1(this,void 0,void 0,function*(){try{if(JE())throw new ch;if(e?.findBy){let{findBy:{workflowRunId:r,repositoryOwner:n,repositoryName:s,token:i}}=e;return J3e(r,n,s,i,e?.latest)}return z3e(e?.latest)}catch(r){throw Ve(`Listing Artifacts failed with error: ${r}.
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}listArtifacts(e){return l1(this,void 0,void 0,function*(){try{if(jE())throw new uh;if(e?.findBy){let{findBy:{workflowRunId:r,repositoryOwner:n,repositoryName:s,token:i}}=e;return j3e(r,n,s,i,e?.latest)}return K3e(e?.latest)}catch(r){throw Ve(`Listing Artifacts failed with error: ${r}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),r}})}getArtifact(e,r){return o1(this,void 0,void 0,function*(){try{if(JE())throw new ch;if(r?.findBy){let{findBy:{workflowRunId:n,repositoryOwner:s,repositoryName:i,token:o}}=r;return EM(e,n,s,i,o)}return G3e(e)}catch(n){throw Ve(`Get Artifact failed with error: ${n}.
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),r}})}getArtifact(e,r){return l1(this,void 0,void 0,function*(){try{if(jE())throw new uh;if(r?.findBy){let{findBy:{workflowRunId:n,repositoryOwner:s,repositoryName:i,token:o}}=r;return bM(e,n,s,i,o)}return Y3e(e)}catch(n){throw Ve(`Get Artifact failed with error: ${n}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}deleteArtifact(e,r){return o1(this,void 0,void 0,function*(){try{if(JE())throw new ch;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:s,workflowRunId:i,token:o}}=r;return Y3e(e,i,n,s,o)}return V3e(e)}catch(n){throw Ve(`Delete Artifact failed with error: ${n}.
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}deleteArtifact(e,r){return l1(this,void 0,void 0,function*(){try{if(jE())throw new uh;if(r?.findBy){let{findBy:{repositoryOwner:n,repositoryName:s,workflowRunId:i,token:o}}=r;return W3e(e,i,n,s,o)}return J3e(e)}catch(n){throw Ve(`Delete Artifact failed with error: ${n}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}};var Pxr=new Sp;import*as yM from"path";import GX from"fs";var $3e="dependency-graph_";async function X3e(t){let e=t.getDependencyGraphOption();if(e==="disabled"){gn("GITHUB_DEPENDENCY_GRAPH_ENABLED","false");return}if(e==="download-and-submit"){Xs("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),await sWt(t);return}$("Enabling dependency graph generation"),gn("GITHUB_DEPENDENCY_GRAPH_ENABLED","true"),Xs("GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE",t.getDependencyGraphContinueOnFailure()),Xs("GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR",t.getJobCorrelator()),Xs("GITHUB_DEPENDENCY_GRAPH_JOB_ID",oi.runId.toString()),Xs("GITHUB_DEPENDENCY_GRAPH_REF",oi.ref),Xs("GITHUB_DEPENDENCY_GRAPH_SHA",hWt()),Xs("GITHUB_DEPENDENCY_GRAPH_WORKSPACE",Gu()),Xs("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),Xs("DEPENDENCY_GRAPH_EXCLUDE_PROJECTS",t.getExcludeProjects()),Xs("DEPENDENCY_GRAPH_INCLUDE_PROJECTS",t.getIncludeProjects()),Xs("DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS",t.getExcludeConfigurations()),Xs("DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS",t.getIncludeConfigurations()),Xs("GRADLE_PLUGIN_REPOSITORY_URL",t.getPluginRepository().getUrl()),Xs("GRADLE_PLUGIN_REPOSITORY_USERNAME",t.getPluginRepository().getUsername()),Xs("GRADLE_PLUGIN_REPOSITORY_PASSWORD",t.getPluginRepository().getPassword())}function Xs(t,e){process.env[t]||e!==void 0&&gn(t,e)}async function Z3e(t){let e=t.getDependencyGraphOption();try{switch(e){case"disabled":case"generate":case"download-and-submit":return;case"generate-and-submit":await K3e(t,!1);return;case"generate-submit-and-upload":await K3e(t,!0);return;case"generate-and-upload":await iWt(t)}}catch(r){t8e(t,e,r)}}async function sWt(t){if(VX()){$("Dependency graph not supported in the ACT environment.");return}try{await e8e(await oWt(t))}catch(e){t8e(t,"download-and-submit",e)}}async function K3e(t,e){if(VX()){$("Dependency graph not supported in the ACT environment.");return}let r=await qX();try{await e8e(r)}catch(n){try{await HX(r,t)}catch(s){$(String(s))}throw n}e&&await HX(r,t)}async function iWt(t){if(VX()){$("Dependency graph not supported in the ACT environment.");return}await HX(await qX(),t)}async function oWt(t){let e=oi.payload.workflow_run?{token:RD(),workflowRunId:oi.payload.workflow_run.id,repositoryName:oi.repo.repo,repositoryOwner:oi.repo.owner}:void 0,r=new Sp,n=(await r.listArtifacts({latest:!0,findBy:e})).artifacts.filter(i=>i.name.startsWith($3e)),s=t.getDownloadArtifactName();s&&($(`Filtering for artifacts ending with ${s}`),n=n.filter(i=>i.name.includes(s)));for(let i of n){let o=await r.downloadArtifact(i.id,{findBy:e});$(`Downloading dependency-graph artifact ${i.name} to ${o.downloadPath}`)}return qX()}async function qX(){let r=(await(await fG(`${AWt()}/**/*.json`)).glob()).filter(n=>!uWt(n));return r.forEach(lWt),$(`Found dependency graph files: ${r.join(", ")}`),r}async function HX(t,e){if(t.length===0){$("No dependency graph files found to upload.");return}let r=Gu(),n=new Sp;for(let s of t){let i=YX(s);$(`Uploading dependency graph file: ${i}`);let o=`${$3e}${yM.basename(s)}`;await n.uploadArtifact(o,[s],r,{retentionDays:e.getArtifactRetentionDays()})}}async function e8e(t){if(t.length===0){$("No dependency graph files found to submit.");return}for(let e of t)try{await cWt(e)}catch(r){throw r instanceof Error&&r.name==="HttpError"&&(r.message=aWt(e,r)),r}}function aWt(t,e){let n=`Dependency submission failed for ${YX(t)}.
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),n}})}};var lRr=new Tp;import*as SM from"path";import HX from"fs";var Z3e="dependency-graph_";async function e8e(t){let e=t.getDependencyGraphOption();if(e==="disabled"){pn("GITHUB_DEPENDENCY_GRAPH_ENABLED","false");return}if(e==="download-and-submit"){zs("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),await A7t(t);return}$("Enabling dependency graph generation"),pn("GITHUB_DEPENDENCY_GRAPH_ENABLED","true"),zs("GITHUB_DEPENDENCY_GRAPH_CONTINUE_ON_FAILURE",t.getDependencyGraphContinueOnFailure()),zs("GITHUB_DEPENDENCY_GRAPH_JOB_CORRELATOR",t.getJobCorrelator()),zs("GITHUB_DEPENDENCY_GRAPH_JOB_ID",ri.runId.toString()),zs("GITHUB_DEPENDENCY_GRAPH_REF",ri.ref),zs("GITHUB_DEPENDENCY_GRAPH_SHA",E7t()),zs("GITHUB_DEPENDENCY_GRAPH_WORKSPACE",Gu()),zs("DEPENDENCY_GRAPH_REPORT_DIR",t.getReportDirectory()),zs("DEPENDENCY_GRAPH_EXCLUDE_PROJECTS",t.getExcludeProjects()),zs("DEPENDENCY_GRAPH_INCLUDE_PROJECTS",t.getIncludeProjects()),zs("DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS",t.getExcludeConfigurations()),zs("DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS",t.getIncludeConfigurations()),zs("GRADLE_PLUGIN_REPOSITORY_URL",t.getPluginRepository().getUrl()),zs("GRADLE_PLUGIN_REPOSITORY_USERNAME",t.getPluginRepository().getUsername()),zs("GRADLE_PLUGIN_REPOSITORY_PASSWORD",t.getPluginRepository().getPassword())}function zs(t,e){process.env[t]||e!==void 0&&pn(t,e)}async function t8e(t){let e=t.getDependencyGraphOption();try{switch(e){case"disabled":case"generate":case"download-and-submit":return;case"generate-and-submit":await X3e(t,!1);return;case"generate-submit-and-upload":await X3e(t,!0);return;case"generate-and-upload":await u7t(t)}}catch(r){n8e(t,e,r)}}async function A7t(t){if(YX()){$("Dependency graph not supported in the ACT environment.");return}try{await r8e(await l7t(t))}catch(e){n8e(t,"download-and-submit",e)}}async function X3e(t,e){if(YX()){$("Dependency graph not supported in the ACT environment.");return}let r=await GX();try{await r8e(r)}catch(n){try{await OX(r,t)}catch(s){$(String(s))}throw n}e&&await OX(r,t)}async function u7t(t){if(YX()){$("Dependency graph not supported in the ACT environment.");return}await OX(await GX(),t)}async function l7t(t){let e=ri.payload.workflow_run?{token:FD(),workflowRunId:ri.payload.workflow_run.id,repositoryName:ri.repo.repo,repositoryOwner:ri.repo.owner}:void 0,r=new Tp,n=(await r.listArtifacts({latest:!0,findBy:e})).artifacts.filter(i=>i.name.startsWith(Z3e)),s=t.getDownloadArtifactName();s&&($(`Filtering for artifacts ending with ${s}`),n=n.filter(i=>i.name.includes(s)));for(let i of n){let o=await r.downloadArtifact(i.id,{findBy:e});$(`Downloading dependency-graph artifact ${i.name} to ${o.downloadPath}`)}return GX()}async function GX(){let r=(await(await EG(`${f7t()}/**/*.json`)).glob()).filter(n=>!g7t(n));return r.forEach(p7t),$(`Found dependency graph files: ${r.join(", ")}`),r}async function OX(t,e){if(t.length===0){$("No dependency graph files found to upload.");return}let r=Gu(),n=new Tp;for(let s of t){let i=qX(s);$(`Uploading dependency graph file: ${i}`);let o=`${Z3e}${SM.basename(s)}`;await n.uploadArtifact(o,[s],r,{retentionDays:e.getArtifactRetentionDays()})}}async function r8e(t){if(t.length===0){$("No dependency graph files found to submit.");return}for(let e of t)try{await h7t(e)}catch(r){throw r instanceof Error&&r.name==="HttpError"&&(r.message=d7t(e,r)),r}}function d7t(t,e){let n=`Dependency submission failed for ${qX(t)}.
|
||||
${e.message}`;return e.message==="Resource not accessible by integration"?`${n}
|
||||
Please ensure that the 'contents: write' permission is available for the workflow job.
|
||||
Note that this permission is never available for a 'pull_request' trigger from a repository fork.
|
||||
`:n}async function cWt(t){let e=dWt(),r=GX.readFileSync(t,"utf8"),n=JSON.parse(r);n.owner=oi.repo.owner,n.repo=oi.repo.repo;let s=await e.request("POST /repos/{owner}/{repo}/dependency-graph/snapshots",n),i=YX(t);Bce(`Submitted ${i}: ${s.data.message}`)}function AWt(){return process.env.DEPENDENCY_GRAPH_REPORT_DIR}function uWt(t){let e=`${t}.processed`;return GX.existsSync(e)}function lWt(t){let e=`${t}.processed`;GX.writeFileSync(e,"")}function t8e(t,e,r){if(!t.getDependencyGraphContinueOnFailure())throw new Yg(r);Ve(`Failed to ${e} dependency graph. Will continue.
|
||||
${String(r)}`)}function dWt(){return Oa(RD())}function YX(t){let e=Gu();return yM.relative(e,t)}function hWt(){let t=oi;return["pull_request","pull_request_comment","pull_request_review","pull_request_review_comment"].includes(t.eventName)?t.payload.pull_request.head.sha:t.sha}function VX(){return process.env.ACT!==void 0}function WX(t,e,r){var n=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi,s=t,i=[];e&&i.push(e),r&&i.push(r);var o;do o=n.exec(s),o!==null&&i.push(gWt(o[1],o[6],o[0]));while(o!==null);return i}function gWt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++){var n=t[r];if(typeof n=="string")return n}}function pWt(t=process.platform){return t==="win32"?50:0}async function r8e(t=process.platform){let e=pWt(t);return e>0&&await new Promise(r=>setTimeout(r,e)),process.exit()}async function mWt(){try{fme("gradle/actions/dependency-submission"),await hxe(new k0,new Jo,new TD);let t=process.env.GITHUB_DEPENDENCY_GRAPH_ENABLED,e=new wD;if(await X3e(e),e.getDependencyGraphOption()==="download-and-submit")return;let r=new ND,n=r.getDependencyResolutionTask(),s=r.getAdditionalArguments(),i=`
|
||||
`:n}async function h7t(t){let e=m7t(),r=HX.readFileSync(t,"utf8"),n=JSON.parse(r);n.owner=ri.repo.owner,n.repo=ri.repo.repo;let s=await e.request("POST /repos/{owner}/{repo}/dependency-graph/snapshots",n),i=qX(t);yce(`Submitted ${i}: ${s.data.message}`)}function f7t(){return process.env.DEPENDENCY_GRAPH_REPORT_DIR}function g7t(t){let e=`${t}.processed`;return HX.existsSync(e)}function p7t(t){let e=`${t}.processed`;HX.writeFileSync(e,"")}function n8e(t,e,r){if(!t.getDependencyGraphContinueOnFailure())throw new Vg(r);Ve(`Failed to ${e} dependency graph. Will continue.
|
||||
${String(r)}`)}function m7t(){return Ha(FD())}function qX(t){let e=Gu();return SM.relative(e,t)}function E7t(){let t=ri;return["pull_request","pull_request_comment","pull_request_review","pull_request_review_comment"].includes(t.eventName)?t.payload.pull_request.head.sha:t.sha}function YX(){return process.env.ACT!==void 0}function VX(t,e,r){var n=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi,s=t,i=[];e&&i.push(e),r&&i.push(r);var o;do o=n.exec(s),o!==null&&i.push(I7t(o[1],o[6],o[0]));while(o!==null);return i}function I7t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++){var n=t[r];if(typeof n=="string")return n}}function y7t(t=process.platform){return t==="win32"?50:0}async function s8e(t=process.platform){let e=y7t(t);return e>0&&await new Promise(r=>setTimeout(r,e)),process.exit()}async function B7t(){try{lme("gradle/actions/dependency-submission"),await uxe(new _0,new Vo,new vD);let t=process.env.GITHUB_DEPENDENCY_GRAPH_ENABLED,e=new RD;if(await e8e(e),e.getDependencyGraphOption()==="download-and-submit")return;let r=new kD,n=r.getDependencyResolutionTask(),s=r.getAdditionalArguments(),i=`
|
||||
-Dorg.gradle.configureondemand=false
|
||||
-Dorg.gradle.dependency.verification=off
|
||||
-Dorg.gradle.unsafe.isolated-projects=false
|
||||
${n}
|
||||
${s}
|
||||
`,o=WX(i);await rRe(r.getGradleVersion(),r.getBuildRootDirectory(),o),await Z3e(e),gn("GITHUB_DEPENDENCY_GRAPH_ENABLED",t),dme()}catch(t){uxe(t)}await r8e()}mWt();export{mWt as run};
|
||||
`,o=VX(i);await Zxe(r.getGradleVersion(),r.getBuildRootDirectory(),o),await t8e(e),pn("GITHUB_DEPENDENCY_GRAPH_ENABLED",t),Ame()}catch(t){axe(t)}await s8e()}B7t();export{B7t as run};
|
||||
/*! Bundled license information:
|
||||
|
||||
undici/lib/web/fetch/body.js:
|
||||
|
||||
Reference in new issue
Block a user