Astro+Directus(Visual-Editing)+Snipcart Test-Stack
This commit is contained in:
commit
1459e99cb0
10119 files changed
+1499318
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";var y=Object.defineProperty;var c=(R,o)=>y(R,"name",{value:o,configurable:!0});const node=require("../node.cjs");require("node:http"),require("node:https"),require("node:zlib"),require("node:stream"),require("node:buffer"),require("node:util"),require("../shared/node-fetch-native.DhEqb06g.cjs"),require("node:url"),require("node:net"),require("node:fs"),require("node:path");let s=0;const S={START_BOUNDARY:s++,HEADER_FIELD_START:s++,HEADER_FIELD:s++,HEADER_VALUE_START:s++,HEADER_VALUE:s++,HEADER_VALUE_ALMOST_DONE:s++,HEADERS_ALMOST_DONE:s++,PART_DATA_START:s++,PART_DATA:s++,END:s++};let f=1;const F={PART_BOUNDARY:f,LAST_BOUNDARY:f*=2},LF=10,CR=13,SPACE=32,HYPHEN=45,COLON=58,A=97,Z=122,lower=c(R=>R|32,"lower"),noop=c(()=>{},"noop"),g=class g{constructor(o){this.index=0,this.flags=0,this.onHeaderEnd=noop,this.onHeaderField=noop,this.onHeadersEnd=noop,this.onHeaderValue=noop,this.onPartBegin=noop,this.onPartData=noop,this.onPartEnd=noop,this.boundaryChars={},o=`\r
|
||||
--`+o;const t=new Uint8Array(o.length);for(let n=0;n<o.length;n++)t[n]=o.charCodeAt(n),this.boundaryChars[t[n]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=S.START_BOUNDARY}write(o){let t=0;const n=o.length;let E=this.index,{lookbehind:l,boundary:h,boundaryChars:H,index:e,state:a,flags:d}=this;const b=this.boundary.length,m=b-1,O=o.length;let r,P;const u=c(D=>{this[D+"Mark"]=t},"mark"),i=c(D=>{delete this[D+"Mark"]},"clear"),T=c((D,p,_,N)=>{(p===void 0||p!==_)&&this[D](N&&N.subarray(p,_))},"callback"),L=c((D,p)=>{const _=D+"Mark";_ in this&&(p?(T(D,this[_],t,o),delete this[_]):(T(D,this[_],o.length,o),this[_]=0))},"dataCallback");for(t=0;t<n;t++)switch(r=o[t],a){case S.START_BOUNDARY:if(e===h.length-2){if(r===HYPHEN)d|=F.LAST_BOUNDARY;else if(r!==CR)return;e++;break}else if(e-1===h.length-2){if(d&F.LAST_BOUNDARY&&r===HYPHEN)a=S.END,d=0;else if(!(d&F.LAST_BOUNDARY)&&r===LF)e=0,T("onPartBegin"),a=S.HEADER_FIELD_START;else return;break}r!==h[e+2]&&(e=-2),r===h[e+2]&&e++;break;case S.HEADER_FIELD_START:a=S.HEADER_FIELD,u("onHeaderField"),e=0;case S.HEADER_FIELD:if(r===CR){i("onHeaderField"),a=S.HEADERS_ALMOST_DONE;break}if(e++,r===HYPHEN)break;if(r===COLON){if(e===1)return;L("onHeaderField",!0),a=S.HEADER_VALUE_START;break}if(P=lower(r),P<A||P>Z)return;break;case S.HEADER_VALUE_START:if(r===SPACE)break;u("onHeaderValue"),a=S.HEADER_VALUE;case S.HEADER_VALUE:r===CR&&(L("onHeaderValue",!0),T("onHeaderEnd"),a=S.HEADER_VALUE_ALMOST_DONE);break;case S.HEADER_VALUE_ALMOST_DONE:if(r!==LF)return;a=S.HEADER_FIELD_START;break;case S.HEADERS_ALMOST_DONE:if(r!==LF)return;T("onHeadersEnd"),a=S.PART_DATA_START;break;case S.PART_DATA_START:a=S.PART_DATA,u("onPartData");case S.PART_DATA:if(E=e,e===0){for(t+=m;t<O&&!(o[t]in H);)t+=b;t-=m,r=o[t]}if(e<h.length)h[e]===r?(e===0&&L("onPartData",!0),e++):e=0;else if(e===h.length)e++,r===CR?d|=F.PART_BOUNDARY:r===HYPHEN?d|=F.LAST_BOUNDARY:e=0;else if(e-1===h.length)if(d&F.PART_BOUNDARY){if(e=0,r===LF){d&=~F.PART_BOUNDARY,T("onPartEnd"),T("onPartBegin"),a=S.HEADER_FIELD_START;break}}else d&F.LAST_BOUNDARY&&r===HYPHEN?(T("onPartEnd"),a=S.END,d=0):e=0;if(e>0)l[e-1]=r;else if(E>0){const D=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);T("onPartData",0,E,D),E=0,u("onPartData"),t--}break;case S.END:break;default:throw new Error(`Unexpected state entered: ${a}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=e,this.state=a,this.flags=d}end(){if(this.state===S.HEADER_FIELD_START&&this.index===0||this.state===S.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==S.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};c(g,"MultipartParser");let MultipartParser=g;function _fileName(R){const o=R.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!o)return;const t=o[2]||o[3]||"";let n=t.slice(t.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(E,l)=>String.fromCharCode(l)),n}c(_fileName,"_fileName");async function toFormData(R,o){if(!/multipart/i.test(o))throw new TypeError("Failed to fetch");const t=o.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!t)throw new TypeError("no or bad content-type header, no multipart boundary");const n=new MultipartParser(t[1]||t[2]);let E,l,h,H,e,a;const d=[],b=new node.FormData,m=c(i=>{h+=u.decode(i,{stream:!0})},"onPartData"),O=c(i=>{d.push(i)},"appendToFile"),r=c(()=>{const i=new node.File(d,a,{type:e});b.append(H,i)},"appendFileToFormData"),P=c(()=>{b.append(H,h)},"appendEntryToFormData"),u=new TextDecoder("utf-8");u.decode(),n.onPartBegin=function(){n.onPartData=m,n.onPartEnd=P,E="",l="",h="",H="",e="",a=null,d.length=0},n.onHeaderField=function(i){E+=u.decode(i,{stream:!0})},n.onHeaderValue=function(i){l+=u.decode(i,{stream:!0})},n.onHeaderEnd=function(){if(l+=u.decode(),E=E.toLowerCase(),E==="content-disposition"){const i=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);i&&(H=i[2]||i[3]||""),a=_fileName(l),a&&(n.onPartData=O,n.onPartEnd=r)}else E==="content-type"&&(e=l);l="",E=""};for await(const i of R)n.write(i);return n.end(),b}c(toFormData,"toFormData"),exports.toFormData=toFormData;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
var B=Object.defineProperty;var E=(u,a)=>B(u,"name",{value:a,configurable:!0});import{FormData as V,File as Y}from"../node.mjs";import"node:http";import"node:https";import"node:zlib";import"node:stream";import"node:buffer";import"node:util";import"../shared/node-fetch-native.DfbY2q-x.mjs";import"node:url";import"node:net";import"node:fs";import"node:path";let D=0;const t={START_BOUNDARY:D++,HEADER_FIELD_START:D++,HEADER_FIELD:D++,HEADER_VALUE_START:D++,HEADER_VALUE:D++,HEADER_VALUE_ALMOST_DONE:D++,HEADERS_ALMOST_DONE:D++,PART_DATA_START:D++,PART_DATA:D++,END:D++};let w=1;const R={PART_BOUNDARY:w,LAST_BOUNDARY:w*=2},g=10,N=13,x=32,P=45,C=58,I=97,M=122,$=E(u=>u|32,"lower"),m=E(()=>{},"noop"),F=class F{constructor(a){this.index=0,this.flags=0,this.onHeaderEnd=m,this.onHeaderField=m,this.onHeadersEnd=m,this.onHeaderValue=m,this.onPartBegin=m,this.onPartData=m,this.onPartEnd=m,this.boundaryChars={},a=`\r
|
||||
--`+a;const n=new Uint8Array(a.length);for(let r=0;r<a.length;r++)n[r]=a.charCodeAt(r),this.boundaryChars[n[r]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=t.START_BOUNDARY}write(a){let n=0;const r=a.length;let d=this.index,{lookbehind:l,boundary:c,boundaryChars:p,index:e,state:i,flags:A}=this;const H=this.boundary.length,O=H-1,y=a.length;let o,L;const f=E(h=>{this[h+"Mark"]=n},"mark"),s=E(h=>{delete this[h+"Mark"]},"clear"),T=E((h,S,_,U)=>{(S===void 0||S!==_)&&this[h](U&&U.subarray(S,_))},"callback"),b=E((h,S)=>{const _=h+"Mark";_ in this&&(S?(T(h,this[_],n,a),delete this[_]):(T(h,this[_],a.length,a),this[_]=0))},"dataCallback");for(n=0;n<r;n++)switch(o=a[n],i){case t.START_BOUNDARY:if(e===c.length-2){if(o===P)A|=R.LAST_BOUNDARY;else if(o!==N)return;e++;break}else if(e-1===c.length-2){if(A&R.LAST_BOUNDARY&&o===P)i=t.END,A=0;else if(!(A&R.LAST_BOUNDARY)&&o===g)e=0,T("onPartBegin"),i=t.HEADER_FIELD_START;else return;break}o!==c[e+2]&&(e=-2),o===c[e+2]&&e++;break;case t.HEADER_FIELD_START:i=t.HEADER_FIELD,f("onHeaderField"),e=0;case t.HEADER_FIELD:if(o===N){s("onHeaderField"),i=t.HEADERS_ALMOST_DONE;break}if(e++,o===P)break;if(o===C){if(e===1)return;b("onHeaderField",!0),i=t.HEADER_VALUE_START;break}if(L=$(o),L<I||L>M)return;break;case t.HEADER_VALUE_START:if(o===x)break;f("onHeaderValue"),i=t.HEADER_VALUE;case t.HEADER_VALUE:o===N&&(b("onHeaderValue",!0),T("onHeaderEnd"),i=t.HEADER_VALUE_ALMOST_DONE);break;case t.HEADER_VALUE_ALMOST_DONE:if(o!==g)return;i=t.HEADER_FIELD_START;break;case t.HEADERS_ALMOST_DONE:if(o!==g)return;T("onHeadersEnd"),i=t.PART_DATA_START;break;case t.PART_DATA_START:i=t.PART_DATA,f("onPartData");case t.PART_DATA:if(d=e,e===0){for(n+=O;n<y&&!(a[n]in p);)n+=H;n-=O,o=a[n]}if(e<c.length)c[e]===o?(e===0&&b("onPartData",!0),e++):e=0;else if(e===c.length)e++,o===N?A|=R.PART_BOUNDARY:o===P?A|=R.LAST_BOUNDARY:e=0;else if(e-1===c.length)if(A&R.PART_BOUNDARY){if(e=0,o===g){A&=~R.PART_BOUNDARY,T("onPartEnd"),T("onPartBegin"),i=t.HEADER_FIELD_START;break}}else A&R.LAST_BOUNDARY&&o===P?(T("onPartEnd"),i=t.END,A=0):e=0;if(e>0)l[e-1]=o;else if(d>0){const h=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);T("onPartData",0,d,h),d=0,f("onPartData"),n--}break;case t.END:break;default:throw new Error(`Unexpected state entered: ${i}`)}b("onHeaderField"),b("onHeaderValue"),b("onPartData"),this.index=e,this.state=i,this.flags=A}end(){if(this.state===t.HEADER_FIELD_START&&this.index===0||this.state===t.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==t.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};E(F,"MultipartParser");let k=F;function v(u){const a=u.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!a)return;const n=a[2]||a[3]||"";let r=n.slice(n.lastIndexOf("\\")+1);return r=r.replace(/%22/g,'"'),r=r.replace(/&#(\d{4});/g,(d,l)=>String.fromCharCode(l)),r}E(v,"_fileName");async function Z(u,a){if(!/multipart/i.test(a))throw new TypeError("Failed to fetch");const n=a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");const r=new k(n[1]||n[2]);let d,l,c,p,e,i;const A=[],H=new V,O=E(s=>{c+=f.decode(s,{stream:!0})},"onPartData"),y=E(s=>{A.push(s)},"appendToFile"),o=E(()=>{const s=new Y(A,i,{type:e});H.append(p,s)},"appendFileToFormData"),L=E(()=>{H.append(p,c)},"appendEntryToFormData"),f=new TextDecoder("utf-8");f.decode(),r.onPartBegin=function(){r.onPartData=O,r.onPartEnd=L,d="",l="",c="",p="",e="",i=null,A.length=0},r.onHeaderField=function(s){d+=f.decode(s,{stream:!0})},r.onHeaderValue=function(s){l+=f.decode(s,{stream:!0})},r.onHeaderEnd=function(){if(l+=f.decode(),d=d.toLowerCase(),d==="content-disposition"){const s=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);s&&(p=s[2]||s[3]||""),i=v(l),i&&(r.onPartData=y,r.onPartEnd=o)}else d==="content-type"&&(e=l);l="",d=""};for await(const s of u)r.write(s);return r.end(),H}E(Z,"toFormData");export{Z as toFormData};
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const node=require("./node.cjs");require("node:http"),require("node:https"),require("node:zlib"),require("node:stream"),require("node:buffer"),require("node:util"),require("./shared/node-fetch-native.DhEqb06g.cjs"),require("node:url"),require("node:net"),require("node:fs"),require("node:path");const o=!!globalThis.process?.env?.FORCE_NODE_FETCH,fetch=!o&&globalThis.fetch||node.fetch,Blob=!o&&globalThis.Blob||node.Blob,File=!o&&globalThis.File||node.File,FormData=!o&&globalThis.FormData||node.FormData,Headers=!o&&globalThis.Headers||node.Headers,Request=!o&&globalThis.Request||node.Request,Response=!o&&globalThis.Response||node.Response,AbortController=!o&&globalThis.AbortController||node.AbortController;exports.AbortError=node.AbortError,exports.FetchError=node.FetchError,exports.blobFrom=node.blobFrom,exports.blobFromSync=node.blobFromSync,exports.fileFrom=node.fileFrom,exports.fileFromSync=node.fileFromSync,exports.isRedirect=node.isRedirect,exports.AbortController=AbortController,exports.Blob=Blob,exports.File=File,exports.FormData=FormData,exports.Headers=Headers,exports.Request=Request,exports.Response=Response,exports.default=fetch,exports.fetch=fetch;
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{fetch as e,Blob as t,File as s,FormData as l,Headers as a,Request as i,Response as b,AbortController as m}from"./node.mjs";export{AbortError,FetchError,blobFrom,blobFromSync,fileFrom,fileFromSync,isRedirect}from"./node.mjs";import"node:http";import"node:https";import"node:zlib";import"node:stream";import"node:buffer";import"node:util";import"./shared/node-fetch-native.DfbY2q-x.mjs";import"node:url";import"node:net";import"node:fs";import"node:path";const o=!!globalThis.process?.env?.FORCE_NODE_FETCH,r=!o&&globalThis.fetch||e,p=!o&&globalThis.Blob||t,F=!o&&globalThis.File||s,h=!o&&globalThis.FormData||l,n=!o&&globalThis.Headers||a,c=!o&&globalThis.Request||i,R=!o&&globalThis.Response||b,T=!o&&globalThis.AbortController||m;export{T as AbortController,p as Blob,F as File,h as FormData,n as Headers,c as Request,R as Response,r as default,r as fetch};
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Blob=globalThis.Blob,File=globalThis.File,FormData=globalThis.FormData,Headers=globalThis.Headers,Request=globalThis.Request,Response=globalThis.Response,AbortController=globalThis.AbortController,fetch=globalThis.fetch||(()=>{throw new Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!")});exports.AbortController=AbortController,exports.Blob=Blob,exports.File=File,exports.FormData=FormData,exports.Headers=Headers,exports.Request=Request,exports.Response=Response,exports.default=fetch,exports.fetch=fetch;
|
||||
+1
@@ -0,0 +1 @@
|
||||
const e=globalThis.Blob,o=globalThis.File,a=globalThis.FormData,s=globalThis.Headers,t=globalThis.Request,h=globalThis.Response,i=globalThis.AbortController,l=globalThis.fetch||(()=>{throw new Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!")});export{i as AbortController,e as Blob,o as File,a as FormData,s as Headers,t as Request,h as Response,l as default,l as fetch};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
"use strict";var ys=Object.defineProperty;var Po=c=>{throw TypeError(c)};var u=(c,l)=>ys(c,"name",{value:l,configurable:!0});var vo=(c,l,d)=>l.has(c)||Po("Cannot "+d);var D=(c,l,d)=>(vo(c,l,"read from private field"),d?d.call(c):l.get(c)),ye=(c,l,d)=>l.has(c)?Po("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(c):l.set(c,d),ne=(c,l,d,g)=>(vo(c,l,"write to private field"),g?g.call(c,d):l.set(c,d),d);var Pe,gt,ot,Zt,Oe,_t,St,it,oe,st,xe,Ue,at;Object.defineProperty(exports,"__esModule",{value:!0});const http=require("node:http"),https=require("node:https"),zlib=require("node:zlib"),Stream=require("node:stream"),require$$0=require("node:buffer"),require$$0$1=require("node:util"),_commonjsHelpers=require("./shared/node-fetch-native.DhEqb06g.cjs"),require$$1=require("node:url"),require$$0$2=require("node:net"),node_fs=require("node:fs"),node_path=require("node:path");function _interopDefaultCompat(c){return c&&typeof c=="object"&&"default"in c?c.default:c}u(_interopDefaultCompat,"_interopDefaultCompat");const http__default=_interopDefaultCompat(http),https__default=_interopDefaultCompat(https),zlib__default=_interopDefaultCompat(zlib),Stream__default=_interopDefaultCompat(Stream);function dataUriToBuffer(c){if(!/^data:/i.test(c))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');c=c.replace(/\r?\n/g,"");const l=c.indexOf(",");if(l===-1||l<=4)throw new TypeError("malformed data: URI");const d=c.substring(5,l).split(";");let g="",b=!1;const R=d[0]||"text/plain";let w=R;for(let I=1;I<d.length;I++)d[I]==="base64"?b=!0:d[I]&&(w+=`;${d[I]}`,d[I].indexOf("charset=")===0&&(g=d[I].substring(8)));!d[0]&&!g.length&&(w+=";charset=US-ASCII",g="US-ASCII");const A=b?"base64":"ascii",z=unescape(c.substring(l+1)),B=Buffer.from(z,A);return B.type=R,B.typeFull=w,B.charset=g,B}u(dataUriToBuffer,"dataUriToBuffer");var streams={},ponyfill_es2018$1={exports:{}};/**
|
||||
* @license
|
||||
* web-streams-polyfill v3.3.3
|
||||
* Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
|
||||
* This code is released under the MIT license.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/var ponyfill_es2018=ponyfill_es2018$1.exports,hasRequiredPonyfill_es2018;function requirePonyfill_es2018(){return hasRequiredPonyfill_es2018||(hasRequiredPonyfill_es2018=1,function(c,l){(function(d,g){g(l)})(ponyfill_es2018,function(d){function g(){}u(g,"noop");function b(n){return typeof n=="object"&&n!==null||typeof n=="function"}u(b,"typeIsObject");const R=g;function w(n,o){try{Object.defineProperty(n,"name",{value:o,configurable:!0})}catch{}}u(w,"setFunctionName");const A=Promise,z=Promise.prototype.then,B=Promise.reject.bind(A);function I(n){return new A(n)}u(I,"newPromise");function k(n){return I(o=>o(n))}u(k,"promiseResolvedWith");function T(n){return B(n)}u(T,"promiseRejectedWith");function $(n,o,a){return z.call(n,o,a)}u($,"PerformPromiseThen");function v(n,o,a){$($(n,o,a),void 0,R)}u(v,"uponPromise");function K(n,o){v(n,o)}u(K,"uponFulfillment");function U(n,o){v(n,void 0,o)}u(U,"uponRejection");function N(n,o,a){return $(n,o,a)}u(N,"transformPromiseWith");function J(n){$(n,void 0,R)}u(J,"setPromiseIsHandledToTrue");let ge=u(n=>{if(typeof queueMicrotask=="function")ge=queueMicrotask;else{const o=k(void 0);ge=u(a=>$(o,a),"_queueMicrotask")}return ge(n)},"_queueMicrotask");function M(n,o,a){if(typeof n!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(n,o,a)}u(M,"reflectCall");function H(n,o,a){try{return k(M(n,o,a))}catch(p){return T(p)}}u(H,"promiseCall");const Y=16384,Dr=class Dr{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(o){const a=this._back;let p=a;a._elements.length===Y-1&&(p={_elements:[],_next:void 0}),a._elements.push(o),p!==a&&(this._back=p,a._next=p),++this._size}shift(){const o=this._front;let a=o;const p=this._cursor;let y=p+1;const _=o._elements,S=_[p];return y===Y&&(a=o._next,y=0),--this._size,this._cursor=y,o!==a&&(this._front=a),_[p]=void 0,S}forEach(o){let a=this._cursor,p=this._front,y=p._elements;for(;(a!==y.length||p._next!==void 0)&&!(a===y.length&&(p=p._next,y=p._elements,a=0,y.length===0));)o(y[a]),++a}peek(){const o=this._front,a=this._cursor;return o._elements[a]}};u(Dr,"SimpleQueue");let Q=Dr;const wt=Symbol("[[AbortSteps]]"),un=Symbol("[[ErrorSteps]]"),er=Symbol("[[CancelSteps]]"),tr=Symbol("[[PullSteps]]"),rr=Symbol("[[ReleaseSteps]]");function ln(n,o){n._ownerReadableStream=o,o._reader=n,o._state==="readable"?or(n):o._state==="closed"?Eo(n):fn(n,o._storedError)}u(ln,"ReadableStreamReaderGenericInitialize");function nr(n,o){const a=n._ownerReadableStream;return le(a,o)}u(nr,"ReadableStreamReaderGenericCancel");function _e(n){const o=n._ownerReadableStream;o._state==="readable"?ir(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Ao(n,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),o._readableStreamController[rr](),o._reader=void 0,n._ownerReadableStream=void 0}u(_e,"ReadableStreamReaderGenericRelease");function Rt(n){return new TypeError("Cannot "+n+" a stream using a released reader")}u(Rt,"readerLockException");function or(n){n._closedPromise=I((o,a)=>{n._closedPromise_resolve=o,n._closedPromise_reject=a})}u(or,"defaultReaderClosedPromiseInitialize");function fn(n,o){or(n),ir(n,o)}u(fn,"defaultReaderClosedPromiseInitializeAsRejected");function Eo(n){or(n),cn(n)}u(Eo,"defaultReaderClosedPromiseInitializeAsResolved");function ir(n,o){n._closedPromise_reject!==void 0&&(J(n._closedPromise),n._closedPromise_reject(o),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}u(ir,"defaultReaderClosedPromiseReject");function Ao(n,o){fn(n,o)}u(Ao,"defaultReaderClosedPromiseResetToRejected");function cn(n){n._closedPromise_resolve!==void 0&&(n._closedPromise_resolve(void 0),n._closedPromise_resolve=void 0,n._closedPromise_reject=void 0)}u(cn,"defaultReaderClosedPromiseResolve");const dn=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},Bo=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};function qo(n){return typeof n=="object"||typeof n=="function"}u(qo,"isDictionary");function ce(n,o){if(n!==void 0&&!qo(n))throw new TypeError(`${o} is not an object.`)}u(ce,"assertDictionary");function ee(n,o){if(typeof n!="function")throw new TypeError(`${o} is not a function.`)}u(ee,"assertFunction");function ko(n){return typeof n=="object"&&n!==null||typeof n=="function"}u(ko,"isObject");function hn(n,o){if(!ko(n))throw new TypeError(`${o} is not an object.`)}u(hn,"assertObject");function Se(n,o,a){if(n===void 0)throw new TypeError(`Parameter ${o} is required in '${a}'.`)}u(Se,"assertRequiredArgument");function sr(n,o,a){if(n===void 0)throw new TypeError(`${o} is required in '${a}'.`)}u(sr,"assertRequiredField");function ar(n){return Number(n)}u(ar,"convertUnrestrictedDouble");function pn(n){return n===0?0:n}u(pn,"censorNegativeZero");function Wo(n){return pn(Bo(n))}u(Wo,"inteLine truncated
|
||||
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e$1"),x=u((c,l,d)=>{if(l.length<d)throw new TypeError(`Failed to execute '${c}' on 'FormData': ${d} arguments required, but only ${l.length} present.`)},"x");const FormData=(st=class{constructor(...l){ye(this,oe,[]);if(l.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[t$1](){return"FormData"}[i](){return this.entries()}static[h](l){return l&&typeof l=="object"&&l[t$1]==="FormData"&&!m.some(d=>typeof l[d]!="function")}append(...l){x("append",arguments,2),D(this,oe).push(f(...l))}delete(l){x("delete",arguments,1),l+="",ne(this,oe,D(this,oe).filter(([d])=>d!==l))}get(l){x("get",arguments,1),l+="";for(var d=D(this,oe),g=d.length,b=0;b<g;b++)if(d[b][0]===l)return d[b][1];return null}getAll(l,d){return x("getAll",arguments,1),d=[],l+="",D(this,oe).forEach(g=>g[0]===l&&d.push(g[1])),d}has(l){return x("has",arguments,1),l+="",D(this,oe).some(d=>d[0]===l)}forEach(l,d){x("forEach",arguments,1);for(var[g,b]of this)l.call(d,b,g,this)}set(...l){x("set",arguments,2);var d=[],g=!0;l=f(...l),D(this,oe).forEach(b=>{b[0]===l[0]?g&&(g=!d.push(l)):d.push(b)}),g&&d.push(l),ne(this,oe,d)}*entries(){yield*D(this,oe)}*keys(){for(var[l]of this)yield l}*values(){for(var[,l]of this)yield l}},oe=new WeakMap,u(st,"FormData"),st);function formDataToBlob(c,l=Blob){var d=`${r()}${r()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),g=[],b=`--${d}\r
|
||||
Content-Disposition: form-data; name="`;return c.forEach((R,w)=>typeof R=="string"?g.push(b+e$1(w)+`"\r
|
||||
\r
|
||||
${R.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
|
||||
`)}\r
|
||||
`):g.push(b+e$1(w)+`"; filename="${e$1(R.name,1)}"\r
|
||||
Content-Type: ${R.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`,R,`\r
|
||||
`)),g.push(`--${d}--`),new l(g,{type:"multipart/form-data; boundary="+d})}u(formDataToBlob,"formDataToBlob");const rn=class rn extends Error{constructor(l,d){super(l),Error.captureStackTrace(this,this.constructor),this.type=d}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};u(rn,"FetchBaseError");let FetchBaseError=rn;const nn=class nn extends FetchBaseError{constructor(l,d,g){super(l,d),g&&(this.code=this.errno=g.code,this.erroredSysCall=g.syscall)}};u(nn,"FetchError");let FetchError=nn;const NAME=Symbol.toStringTag,isURLSearchParameters=u(c=>typeof c=="object"&&typeof c.append=="function"&&typeof c.delete=="function"&&typeof c.get=="function"&&typeof c.getAll=="function"&&typeof c.has=="function"&&typeof c.set=="function"&&typeof c.sort=="function"&&c[NAME]==="URLSearchParams","isURLSearchParameters"),isBlob=u(c=>c&&typeof c=="object"&&typeof c.arrayBuffer=="function"&&typeof c.type=="string"&&typeof c.stream=="function"&&typeof c.constructor=="function"&&/^(Blob|File)$/.test(c[NAME]),"isBlob"),isAbortSignal=u(c=>typeof c=="object"&&(c[NAME]==="AbortSignal"||c[NAME]==="EventTarget"),"isAbortSignal"),isDomainOrSubdomain=u((c,l)=>{const d=new URL(l).hostname,g=new URL(c).hostname;return d===g||d.endsWith(`.${g}`)},"isDomainOrSubdomain"),isSameProtocol=u((c,l)=>{const d=new URL(l).protocol,g=new URL(c).protocol;return d===g},"isSameProtocol"),pipeline=require$$0$1.promisify(Stream__default.pipeline),INTERNALS$2=Symbol("Body internals"),on=class on{constructor(l,{size:d=0}={}){let g=null;l===null?l=null:isURLSearchParameters(l)?l=require$$0.Buffer.from(l.toString()):isBlob(l)||require$$0.Buffer.isBuffer(l)||(require$$0$1.types.isAnyArrayBuffer(l)?l=require$$0.Buffer.from(l):ArrayBuffer.isView(l)?l=require$$0.Buffer.from(l.buffer,l.byteOffset,l.byteLength):l instanceof Stream__default||(l instanceof FormData?(l=formDataToBlob(l),g=l.type.split("=")[1]):l=require$$0.Buffer.from(String(l))));let b=l;require$$0.Buffer.isBuffer(l)?b=Stream__default.Readable.from(l):isBlob(l)&&(b=Stream__default.Readable.from(l.stream())),this[INTERNALS$2]={body:l,stream:b,boundary:g,disturbed:!1,error:null},this.size=d,l instanceof Stream__default&&l.on("error",R=>{const w=R instanceof FetchBaseError?R:new FetchError(`Invalid response body while trying to fetch ${this.url}: ${R.message}`,"system",R);this[INTERNALS$2].error=w})}get body(){return this[INTERNALS$2].stream}get bodyUsed(){return this[INTERNALS$2].disturbed}async arrayBuffer(){const{buffer:l,byteOffset:d,byteLength:g}=await consumeBody(this);return l.slice(d,d+g)}async formData(){const l=this.headers.get("content-type");if(l.startsWith("application/x-www-form-urlencoded")){const g=new FormData,b=new URLSearchParams(await this.text());for(const[R,w]of b)g.append(R,w);return g}const{toFormData:d}=await import("./chunks/multipart-parser.cjs");return d(this.body,l)}async blob(){const l=this.headers&&this.headers.get("content-type")||this[INTERNALS$2].body&&this[INTERNALS$2].body.type||"",d=await this.arrayBuffer();return new Blob([d],{type:l})}async json(){const l=await this.text();return JSON.parse(l)}async text(){const l=await consumeBody(this);return new TextDecoder().decode(l)}buffer(){return consumeBody(this)}};u(on,"Body");let Body=on;Body.prototype.buffer=require$$0$1.deprecate(Body.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer"),Object.defineProperties(Body.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:require$$0$1.deprecate(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function consumeBody(c){if(c[INTERNALS$2].disturbed)throw new TypeError(`body used already for: ${c.url}`);if(c[INTERNALS$2].disturbed=!0,c[INTERNALS$2].error)throw c[INTERNALS$2].error;const{body:l}=c;if(l===null||!(l instanceof Stream__default))return require$$0.Buffer.alloc(0);const d=[];let g=0;try{for await(const b of l){if(c.size>0&&g+b.length>c.size){const R=new FetchError(`content size at ${c.url} over limit: ${c.size}`,"max-size");throw l.destroy(R),R}g+=b.length,d.push(b)}}catch(b){throw b instanceof FetchBaseError?b:new FetchError(`Invalid response body while trying to fetch ${c.url}: ${b.message}`,"system",b)}if(l.readableEnded===!0||l._readableState.ended===!0)try{return d.every(b=>typeof b=="string")?require$$0.Buffer.from(d.join("")):require$$0.Buffer.concat(d,g)}catch(b){throw new FetchError(`Could not create Buffer from response body for ${c.url}: ${b.message}`,"system",b)}else throw new FetchError(`Premature close of server response while trying to fetch ${c.url}`)}u(consumeBody,"consumeBody");const clone=u((c,l)=>{let d,g,{body:b}=c[INTERNALS$2];if(c.bodyUsed)throw new Error("cannot clone body after it is used");return b instanceof Stream__default&&typeof b.
Line truncated
|
||||
\r
|
||||
`);let g=!1,b=!1,R;c.on("response",w=>{const{headers:A}=w;g=A["transfer-encoding"]==="chunked"&&!A["content-length"]}),c.on("socket",w=>{const A=u(()=>{if(g&&!b){const B=new Error("Premature close");B.code="ERR_STREAM_PREMATURE_CLOSE",l(B)}},"onSocketClose"),z=u(B=>{b=require$$0.Buffer.compare(B.slice(-5),d)===0,!b&&R&&(b=require$$0.Buffer.compare(R.slice(-3),d.slice(0,3))===0&&require$$0.Buffer.compare(B.slice(-2),d.slice(3))===0),R=B},"onData");w.prependListener("close",A),w.on("data",z),c.on("close",()=>{w.removeListener("close",A),w.removeListener("data",z)})})}u(fixResponseChunkedTransferBadEnding,"fixResponseChunkedTransferBadEnding");const privateData=new WeakMap,wrappers=new WeakMap;function pd(c){const l=privateData.get(c);return console.assert(l!=null,"'this' is expected an Event object, but got",c),l}u(pd,"pd");function setCancelFlag(c){if(c.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",c.passiveListener);return}c.event.cancelable&&(c.canceled=!0,typeof c.event.preventDefault=="function"&&c.event.preventDefault())}u(setCancelFlag,"setCancelFlag");function Event(c,l){privateData.set(this,{eventTarget:c,event:l,eventPhase:2,currentTarget:c,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:l.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const d=Object.keys(l);for(let g=0;g<d.length;++g){const b=d[g];b in this||Object.defineProperty(this,b,defineRedirectDescriptor(b))}}u(Event,"Event"),Event.prototype={get type(){return pd(this).event.type},get target(){return pd(this).eventTarget},get currentTarget(){return pd(this).currentTarget},composedPath(){const c=pd(this).currentTarget;return c==null?[]:[c]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return pd(this).eventPhase},stopPropagation(){const c=pd(this);c.stopped=!0,typeof c.event.stopPropagation=="function"&&c.event.stopPropagation()},stopImmediatePropagation(){const c=pd(this);c.stopped=!0,c.immediateStopped=!0,typeof c.event.stopImmediatePropagation=="function"&&c.event.stopImmediatePropagation()},get bubbles(){return!!pd(this).event.bubbles},get cancelable(){return!!pd(this).event.cancelable},preventDefault(){setCancelFlag(pd(this))},get defaultPrevented(){return pd(this).canceled},get composed(){return!!pd(this).event.composed},get timeStamp(){return pd(this).timeStamp},get srcElement(){return pd(this).eventTarget},get cancelBubble(){return pd(this).stopped},set cancelBubble(c){if(!c)return;const l=pd(this);l.stopped=!0,typeof l.event.cancelBubble=="boolean"&&(l.event.cancelBubble=!0)},get returnValue(){return!pd(this).canceled},set returnValue(c){c||setCancelFlag(pd(this))},initEvent(){}},Object.defineProperty(Event.prototype,"constructor",{value:Event,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(Event.prototype,window.Event.prototype),wrappers.set(window.Event.prototype,Event));function defineRedirectDescriptor(c){return{get(){return pd(this).event[c]},set(l){pd(this).event[c]=l},configurable:!0,enumerable:!0}}u(defineRedirectDescriptor,"defineRedirectDescriptor");function defineCallDescriptor(c){return{value(){const l=pd(this).event;return l[c].apply(l,arguments)},configurable:!0,enumerable:!0}}u(defineCallDescriptor,"defineCallDescriptor");function defineWrapper(c,l){const d=Object.keys(l);if(d.length===0)return c;function g(b,R){c.call(this,b,R)}u(g,"CustomEvent"),g.prototype=Object.create(c.prototype,{constructor:{value:g,configurable:!0,writable:!0}});for(let b=0;b<d.length;++b){const R=d[b];if(!(R in c.prototype)){const A=typeof Object.getOwnPropertyDescriptor(l,R).value=="function";Object.defineProperty(g.prototype,R,A?defineCallDescriptor(R):defineRedirectDescriptor(R))}}return g}u(defineWrapper,"defineWrapper");function getWrapper(c){if(c==null||c===Object.prototype)return Event;let l=wrappers.get(c);return l==null&&(l=defineWrapper(getWrapper(Object.getPrototypeOf(c)),c),wrappers.set(c,l)),l}u(getWrapper,"getWrapper");function wrapEvent(c,l){const d=getWrapper(Object.getPrototypeOf(l));return new d(c,l)}u(wrapEvent,"wrapEvent");function isStopped(c){return pd(c).immediateStopped}u(isStopped,"isStopped");function setEventPhase(c,l){pd(c).eventPhase=l}u(setEventPhase,"setEventPhase");function setCurrentTarget(c,l){pd(c).currentTarget=l}u(setCurrentTarget,"setCurrentTarget");function setPassiveListener(c,l){pd(c).passiveListener=l}u(setPassiveListener,"setPassiveListener");const listenersMap=new WeakMap,CAPTURE=1,BUBBLE=2,ATTRIBUTE=3;function isObject(c){return c!==null&&typeof c=="object"}u(isObject,"isObject");function getListeners(c){const l=listenersMap.get(c);if(l==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return l}u(getListeners,"getListeners");function defineEventAttr
Line truncated
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
var Os=Object.defineProperty;var fi=i=>{throw TypeError(i)};var n=(i,o)=>Os(i,"name",{value:o,configurable:!0});var ci=(i,o,a)=>o.has(i)||fi("Cannot "+a);var O=(i,o,a)=>(ci(i,o,"read from private field"),a?a.call(i):o.get(i)),be=(i,o,a)=>o.has(i)?fi("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,a),X=(i,o,a,f)=>(ci(i,o,"write to private field"),f?f.call(i,a):o.set(i,a),a);var ve,zt,bt,Cr,ze,It,Ft,mt,ee,yt,He,Ve,gt;import Bt from"node:http";import zs from"node:https";import st from"node:zlib";import me,{PassThrough as dr,pipeline as lt}from"node:stream";import{Buffer as M}from"node:buffer";import{types as hr,deprecate as pr,promisify as Is}from"node:util";import{c as di,g as Fs}from"./shared/node-fetch-native.DfbY2q-x.mjs";import{format as js}from"node:url";import{isIP as Ls}from"node:net";import{promises as $s,statSync as hi,createReadStream as Ds}from"node:fs";import{basename as Ms}from"node:path";function Us(i){if(!/^data:/i.test(i))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');i=i.replace(/\r?\n/g,"");const o=i.indexOf(",");if(o===-1||o<=4)throw new TypeError("malformed data: URI");const a=i.substring(5,o).split(";");let f="",l=!1;const p=a[0]||"text/plain";let h=p;for(let A=1;A<a.length;A++)a[A]==="base64"?l=!0:a[A]&&(h+=`;${a[A]}`,a[A].indexOf("charset=")===0&&(f=a[A].substring(8)));!a[0]&&!f.length&&(h+=";charset=US-ASCII",f="US-ASCII");const S=l?"base64":"ascii",v=unescape(i.substring(o+1)),w=Buffer.from(v,S);return w.type=p,w.typeFull=h,w.charset=f,w}n(Us,"dataUriToBuffer");var pi={},kt={exports:{}};/**
|
||||
* @license
|
||||
* web-streams-polyfill v3.3.3
|
||||
* Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
|
||||
* This code is released under the MIT license.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/var xs=kt.exports,bi;function Ns(){return bi||(bi=1,function(i,o){(function(a,f){f(o)})(xs,function(a){function f(){}n(f,"noop");function l(e){return typeof e=="object"&&e!==null||typeof e=="function"}n(l,"typeIsObject");const p=f;function h(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch{}}n(h,"setFunctionName");const S=Promise,v=Promise.prototype.then,w=Promise.reject.bind(S);function A(e){return new S(e)}n(A,"newPromise");function T(e){return A(t=>t(e))}n(T,"promiseResolvedWith");function b(e){return w(e)}n(b,"promiseRejectedWith");function q(e,t,r){return v.call(e,t,r)}n(q,"PerformPromiseThen");function g(e,t,r){q(q(e,t,r),void 0,p)}n(g,"uponPromise");function V(e,t){g(e,t)}n(V,"uponFulfillment");function I(e,t){g(e,void 0,t)}n(I,"uponRejection");function F(e,t,r){return q(e,t,r)}n(F,"transformPromiseWith");function Q(e){q(e,void 0,p)}n(Q,"setPromiseIsHandledToTrue");let ge=n(e=>{if(typeof queueMicrotask=="function")ge=queueMicrotask;else{const t=T(void 0);ge=n(r=>q(t,r),"_queueMicrotask")}return ge(e)},"_queueMicrotask");function z(e,t,r){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}n(z,"reflectCall");function j(e,t,r){try{return T(z(e,t,r))}catch(s){return b(s)}}n(j,"promiseCall");const U=16384,bn=class bn{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const r=this._back;let s=r;r._elements.length===U-1&&(s={_elements:[],_next:void 0}),r._elements.push(t),s!==r&&(this._back=s,r._next=s),++this._size}shift(){const t=this._front;let r=t;const s=this._cursor;let u=s+1;const c=t._elements,d=c[s];return u===U&&(r=t._next,u=0),--this._size,this._cursor=u,t!==r&&(this._front=r),c[s]=void 0,d}forEach(t){let r=this._cursor,s=this._front,u=s._elements;for(;(r!==u.length||s._next!==void 0)&&!(r===u.length&&(s=s._next,u=s._elements,r=0,u.length===0));)t(u[r]),++r}peek(){const t=this._front,r=this._cursor;return t._elements[r]}};n(bn,"SimpleQueue");let D=bn;const jt=Symbol("[[AbortSteps]]"),Qn=Symbol("[[ErrorSteps]]"),Ar=Symbol("[[CancelSteps]]"),Br=Symbol("[[PullSteps]]"),kr=Symbol("[[ReleaseSteps]]");function Yn(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?qr(e):t._state==="closed"?xi(e):Gn(e,t._storedError)}n(Yn,"ReadableStreamReaderGenericInitialize");function Wr(e,t){const r=e._ownerReadableStream;return ie(r,t)}n(Wr,"ReadableStreamReaderGenericCancel");function _e(e){const t=e._ownerReadableStream;t._state==="readable"?Or(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Ni(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[kr](),t._reader=void 0,e._ownerReadableStream=void 0}n(_e,"ReadableStreamReaderGenericRelease");function Lt(e){return new TypeError("Cannot "+e+" a stream using a released reader")}n(Lt,"readerLockException");function qr(e){e._closedPromise=A((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}n(qr,"defaultReaderClosedPromiseInitialize");function Gn(e,t){qr(e),Or(e,t)}n(Gn,"defaultReaderClosedPromiseInitializeAsRejected");function xi(e){qr(e),Zn(e)}n(xi,"defaultReaderClosedPromiseInitializeAsResolved");function Or(e,t){e._closedPromise_reject!==void 0&&(Q(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}n(Or,"defaultReaderClosedPromiseReject");function Ni(e,t){Gn(e,t)}n(Ni,"defaultReaderClosedPromiseResetToRejected");function Zn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}n(Zn,"defaultReaderClosedPromiseResolve");const Kn=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Hi=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Vi(e){return typeof e=="object"||typeof e=="function"}n(Vi,"isDictionary");function ue(e,t){if(e!==void 0&&!Vi(e))throw new TypeError(`${t} is not an object.`)}n(ue,"assertDictionary");function Z(e,t){if(typeof e!="function")throw new TypeError(`${t} is not a function.`)}n(Z,"assertFunction");function Qi(e){return typeof e=="object"&&e!==null||typeof e=="function"}n(Qi,"isObject");function Jn(e,t){if(!Qi(e))throw new TypeError(`${t} is not an object.`)}n(Jn,"assertObject");function Se(e,t,r){if(e===void 0)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}n(Se,"assertRequiredArgument");function zr(e,t,r){if(e===void 0)throw new TypeError(`${t} is required in '${r}'.`)}n(zr,"assertRequiredField");function Ir(e){return Number(e)}n(Ir,"convertUnrestrictedDouble");function Xn(e){return e===0?0:e}n(Xn,"censorNegativeZero");function Yi(e){return Xn(Hi(e))}n(Yi,"integerPart");function Fr(e,t){const s=Number.MAX_SAFE_INTEGER;let u=Number(e);if(u=Xn(u),!Kn(u))throw new TypeError(`${t} is not a finite Line truncated
|
||||
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e$1"),Ue=n((i,o,a)=>{if(o.length<a)throw new TypeError(`Failed to execute '${i}' on 'FormData': ${a} arguments required, but only ${o.length} present.`)},"x");const br=(yt=class{constructor(...o){be(this,ee,[]);if(o.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Wt](){return"FormData"}[Qs](){return this.entries()}static[Ys](o){return o&&typeof o=="object"&&o[Wt]==="FormData"&&!Gs.some(a=>typeof o[a]!="function")}append(...o){Ue("append",arguments,2),O(this,ee).push(Si(...o))}delete(o){Ue("delete",arguments,1),o+="",X(this,ee,O(this,ee).filter(([a])=>a!==o))}get(o){Ue("get",arguments,1),o+="";for(var a=O(this,ee),f=a.length,l=0;l<f;l++)if(a[l][0]===o)return a[l][1];return null}getAll(o,a){return Ue("getAll",arguments,1),a=[],o+="",O(this,ee).forEach(f=>f[0]===o&&a.push(f[1])),a}has(o){return Ue("has",arguments,1),o+="",O(this,ee).some(a=>a[0]===o)}forEach(o,a){Ue("forEach",arguments,1);for(var[f,l]of this)o.call(a,l,f,this)}set(...o){Ue("set",arguments,2);var a=[],f=!0;o=Si(...o),O(this,ee).forEach(l=>{l[0]===o[0]?f&&(f=!a.push(o)):a.push(l)}),f&&a.push(o),X(this,ee,a)}*entries(){yield*O(this,ee)}*keys(){for(var[o]of this)yield o}*values(){for(var[,o]of this)yield o}},ee=new WeakMap,n(yt,"FormData"),yt);function Zs(i,o=ut){var a=`${_i()}${_i()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),f=[],l=`--${a}\r
|
||||
Content-Disposition: form-data; name="`;return i.forEach((p,h)=>typeof p=="string"?f.push(l+On(h)+`"\r
|
||||
\r
|
||||
${p.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
|
||||
`)}\r
|
||||
`):f.push(l+On(h)+`"; filename="${On(p.name,1)}"\r
|
||||
Content-Type: ${p.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`,p,`\r
|
||||
`)),f.push(`--${a}--`),new o(f,{type:"multipart/form-data; boundary="+a})}n(Zs,"formDataToBlob");const Un=class Un extends Error{constructor(o,a){super(o),Error.captureStackTrace(this,this.constructor),this.type=a}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};n(Un,"FetchBaseError");let ft=Un;const xn=class xn extends ft{constructor(o,a,f){super(o,a),f&&(this.code=this.errno=f.code,this.erroredSysCall=f.syscall)}};n(xn,"FetchError");let G=xn;const mr=Symbol.toStringTag,wi=n(i=>typeof i=="object"&&typeof i.append=="function"&&typeof i.delete=="function"&&typeof i.get=="function"&&typeof i.getAll=="function"&&typeof i.has=="function"&&typeof i.set=="function"&&typeof i.sort=="function"&&i[mr]==="URLSearchParams","isURLSearchParameters"),yr=n(i=>i&&typeof i=="object"&&typeof i.arrayBuffer=="function"&&typeof i.type=="string"&&typeof i.stream=="function"&&typeof i.constructor=="function"&&/^(Blob|File)$/.test(i[mr]),"isBlob"),Ks=n(i=>typeof i=="object"&&(i[mr]==="AbortSignal"||i[mr]==="EventTarget"),"isAbortSignal"),Js=n((i,o)=>{const a=new URL(o).hostname,f=new URL(i).hostname;return a===f||a.endsWith(`.${f}`)},"isDomainOrSubdomain"),Xs=n((i,o)=>{const a=new URL(o).protocol,f=new URL(i).protocol;return a===f},"isSameProtocol"),el=Is(me.pipeline),H=Symbol("Body internals"),Nn=class Nn{constructor(o,{size:a=0}={}){let f=null;o===null?o=null:wi(o)?o=M.from(o.toString()):yr(o)||M.isBuffer(o)||(hr.isAnyArrayBuffer(o)?o=M.from(o):ArrayBuffer.isView(o)?o=M.from(o.buffer,o.byteOffset,o.byteLength):o instanceof me||(o instanceof br?(o=Zs(o),f=o.type.split("=")[1]):o=M.from(String(o))));let l=o;M.isBuffer(o)?l=me.Readable.from(o):yr(o)&&(l=me.Readable.from(o.stream())),this[H]={body:o,stream:l,boundary:f,disturbed:!1,error:null},this.size=a,o instanceof me&&o.on("error",p=>{const h=p instanceof ft?p:new G(`Invalid response body while trying to fetch ${this.url}: ${p.message}`,"system",p);this[H].error=h})}get body(){return this[H].stream}get bodyUsed(){return this[H].disturbed}async arrayBuffer(){const{buffer:o,byteOffset:a,byteLength:f}=await zn(this);return o.slice(a,a+f)}async formData(){const o=this.headers.get("content-type");if(o.startsWith("application/x-www-form-urlencoded")){const f=new br,l=new URLSearchParams(await this.text());for(const[p,h]of l)f.append(p,h);return f}const{toFormData:a}=await import("./chunks/multipart-parser.mjs");return a(this.body,o)}async blob(){const o=this.headers&&this.headers.get("content-type")||this[H].body&&this[H].body.type||"",a=await this.arrayBuffer();return new ut([a],{type:o})}async json(){const o=await this.text();return JSON.parse(o)}async text(){const o=await zn(this);return new TextDecoder().decode(o)}buffer(){return zn(this)}};n(Nn,"Body");let xe=Nn;xe.prototype.buffer=pr(xe.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer"),Object.defineProperties(xe.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:pr(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function zn(i){if(i[H].disturbed)throw new TypeError(`body used already for: ${i.url}`);if(i[H].disturbed=!0,i[H].error)throw i[H].error;const{body:o}=i;if(o===null)return M.alloc(0);if(!(o instanceof me))return M.alloc(0);const a=[];let f=0;try{for await(const l of o){if(i.size>0&&f+l.length>i.size){const p=new G(`content size at ${i.url} over limit: ${i.size}`,"max-size");throw o.destroy(p),p}f+=l.length,a.push(l)}}catch(l){throw l instanceof ft?l:new G(`Invalid response body while trying to fetch ${i.url}: ${l.message}`,"system",l)}if(o.readableEnded===!0||o._readableState.ended===!0)try{return a.every(l=>typeof l=="string")?M.from(a.join("")):M.concat(a,f)}catch(l){throw new G(`Could not create Buffer from response body for ${i.url}: ${l.message}`,"system",l)}else throw new G(`Premature close of server response while trying to fetch ${i.url}`)}n(zn,"consumeBody");const In=n((i,o)=>{let a,f,{body:l}=i[H];if(i.bodyUsed)throw new Error("cannot clone body after it is used");return l instanceof me&&typeof l.getBoundary!="function"&&(a=new dr({highWaterMark:o}),f=new dr({highWaterMark:o}),l.pipe(a),l.pipe(f),i[H].stream=a,l=f),l},"clone"),tl=pr(i=>i.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Ri=n((i,o)=>i===null?null:typeof i=="string"?"text/plain;charset=UTF-8":wi(i)?"application/x-www-form-urlencoded;charset=UTF-8":yr(i)?i.type||null:M.isBuffer(i)||hr.isAnyArrayBuffer(i)||ArrayBuffer.isView(i)?null:i instanceof br?`multipart/form-data; boundary=${o[H].boundary}`:i&&typeof i.getBoundary=="function"?`multipart/form-data;boundary=${tl(i)}`:i instanceof me?null:"text/plain;charset=UTF-8","extr
Line truncated
|
||||
\r
|
||||
`);let f=!1,l=!1,p;i.on("response",h=>{const{headers:S}=h;f=S["transfer-encoding"]==="chunked"&&!S["content-length"]}),i.on("socket",h=>{const S=n(()=>{if(f&&!l){const w=new Error("Premature close");w.code="ERR_STREAM_PREMATURE_CLOSE",o(w)}},"onSocketClose"),v=n(w=>{l=M.compare(w.slice(-5),a)===0,!l&&p&&(l=M.compare(p.slice(-3),a.slice(0,3))===0&&M.compare(w.slice(-2),a.slice(3))===0),p=w},"onData");h.prependListener("close",S),h.on("data",v),i.on("close",()=>{h.removeListener("close",S),h.removeListener("data",v)})})}n(Rl,"fixResponseChunkedTransferBadEnding");const Bi=new WeakMap,Dn=new WeakMap;function W(i){const o=Bi.get(i);return console.assert(o!=null,"'this' is expected an Event object, but got",i),o}n(W,"pd");function ki(i){if(i.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",i.passiveListener);return}i.event.cancelable&&(i.canceled=!0,typeof i.event.preventDefault=="function"&&i.event.preventDefault())}n(ki,"setCancelFlag");function ht(i,o){Bi.set(this,{eventTarget:i,event:o,eventPhase:2,currentTarget:i,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:o.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const a=Object.keys(o);for(let f=0;f<a.length;++f){const l=a[f];l in this||Object.defineProperty(this,l,Wi(l))}}n(ht,"Event"),ht.prototype={get type(){return W(this).event.type},get target(){return W(this).eventTarget},get currentTarget(){return W(this).currentTarget},composedPath(){const i=W(this).currentTarget;return i==null?[]:[i]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return W(this).eventPhase},stopPropagation(){const i=W(this);i.stopped=!0,typeof i.event.stopPropagation=="function"&&i.event.stopPropagation()},stopImmediatePropagation(){const i=W(this);i.stopped=!0,i.immediateStopped=!0,typeof i.event.stopImmediatePropagation=="function"&&i.event.stopImmediatePropagation()},get bubbles(){return!!W(this).event.bubbles},get cancelable(){return!!W(this).event.cancelable},preventDefault(){ki(W(this))},get defaultPrevented(){return W(this).canceled},get composed(){return!!W(this).event.composed},get timeStamp(){return W(this).timeStamp},get srcElement(){return W(this).eventTarget},get cancelBubble(){return W(this).stopped},set cancelBubble(i){if(!i)return;const o=W(this);o.stopped=!0,typeof o.event.cancelBubble=="boolean"&&(o.event.cancelBubble=!0)},get returnValue(){return!W(this).canceled},set returnValue(i){i||ki(W(this))},initEvent(){}},Object.defineProperty(ht.prototype,"constructor",{value:ht,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(ht.prototype,window.Event.prototype),Dn.set(window.Event.prototype,ht));function Wi(i){return{get(){return W(this).event[i]},set(o){W(this).event[i]=o},configurable:!0,enumerable:!0}}n(Wi,"defineRedirectDescriptor");function Tl(i){return{value(){const o=W(this).event;return o[i].apply(o,arguments)},configurable:!0,enumerable:!0}}n(Tl,"defineCallDescriptor");function Cl(i,o){const a=Object.keys(o);if(a.length===0)return i;function f(l,p){i.call(this,l,p)}n(f,"CustomEvent"),f.prototype=Object.create(i.prototype,{constructor:{value:f,configurable:!0,writable:!0}});for(let l=0;l<a.length;++l){const p=a[l];if(!(p in i.prototype)){const S=typeof Object.getOwnPropertyDescriptor(o,p).value=="function";Object.defineProperty(f.prototype,p,S?Tl(p):Wi(p))}}return f}n(Cl,"defineWrapper");function qi(i){if(i==null||i===Object.prototype)return ht;let o=Dn.get(i);return o==null&&(o=Cl(qi(Object.getPrototypeOf(i)),i),Dn.set(i,o)),o}n(qi,"getWrapper");function Pl(i,o){const a=qi(Object.getPrototypeOf(o));return new a(i,o)}n(Pl,"wrapEvent");function vl(i){return W(i).immediateStopped}n(vl,"isStopped");function El(i,o){W(i).eventPhase=o}n(El,"setEventPhase");function Al(i,o){W(i).currentTarget=o}n(Al,"setCurrentTarget");function Oi(i,o){W(i).passiveListener=o}n(Oi,"setPassiveListener");const zi=new WeakMap,Ii=1,Fi=2,wr=3;function Rr(i){return i!==null&&typeof i=="object"}n(Rr,"isObject");function Ot(i){const o=zi.get(i);if(o==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return o}n(Ot,"getListeners");function Bl(i){return{get(){let a=Ot(this).get(i);for(;a!=null;){if(a.listenerType===wr)return a.listener;a=a.next}return null},set(o){typeof o!="function"&&!Rr(o)&&(o=null);const a=Ot(this);let f=null,l=a.get(i);for(;l!=null;)l.listenerType===wr?f!==null?f.next=l.next:l.next!==null?a.set(i,l.next):a.delete(i):f=l,l=l.next;if(o!==null){const p={listener:o,listenerType:wr,passive:!1,once:!1,next:null};f===null?a.set(i,p):f.next=p}},configurable:!0,enumerable:!0}}n(Bl,"defineEventAttributeDescriptor");function ji(i,o){Object.defineProperty(i,`on${o}`,Bl(o))}n(ji,"defineEventAttribute");function Li(i){function o(){Pe.call(this)}n(o
Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";var n=Object.defineProperty;var i=(r,o)=>n(r,"name",{value:o,configurable:!0});const node=require("./node.cjs");require("node:http"),require("node:https"),require("node:zlib"),require("node:stream"),require("node:buffer"),require("node:util"),require("./shared/node-fetch-native.DhEqb06g.cjs"),require("node:url"),require("node:net"),require("node:fs"),require("node:path");var t=Object.defineProperty,a=i((r,o)=>t(r,"name",{value:o,configurable:!0}),"a");function e(r,o){if(!(r in globalThis))try{globalThis[r]=o}catch{}}i(e,"e"),a(e,"polyfill"),e("fetch",node.fetch),e("Blob",node.Blob),e("File",node.File),e("FormData",node.FormData),e("Headers",node.Headers),e("Request",node.Request),e("Response",node.Response),e("AbortController",node.AbortController);
|
||||
+1
@@ -0,0 +1 @@
|
||||
var i=Object.defineProperty;var e=(r,t)=>i(r,"name",{value:t,configurable:!0});import{fetch as l,Blob as m,File as p,FormData as a,Headers as n,Request as s,Response as b,AbortController as f}from"./node.mjs";import"node:http";import"node:https";import"node:zlib";import"node:stream";import"node:buffer";import"node:util";import"./shared/node-fetch-native.DfbY2q-x.mjs";import"node:url";import"node:net";import"node:fs";import"node:path";var c=Object.defineProperty,u=e((r,t)=>c(r,"name",{value:t,configurable:!0}),"a");function o(r,t){if(!(r in globalThis))try{globalThis[r]=t}catch{}}e(o,"e"),u(o,"polyfill"),o("fetch",l),o("Blob",m),o("File",p),o("FormData",a),o("Headers",n),o("Request",s),o("Response",b),o("AbortController",f);
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";var o=Object.defineProperty;var t=(c,a)=>o(c,"name",{value:a,configurable:!0});var r=Object.defineProperty,e=t((c,a)=>r(c,"name",{value:a,configurable:!0}),"e");function createProxy(){return{agent:void 0,dispatcher:void 0}}t(createProxy,"createProxy"),e(createProxy,"createProxy");function createFetch(){return globalThis.fetch}t(createFetch,"createFetch"),e(createFetch,"createFetch");const fetch=globalThis.fetch;exports.createFetch=createFetch,exports.createProxy=createProxy,exports.fetch=fetch;
|
||||
+1
@@ -0,0 +1 @@
|
||||
var n=Object.defineProperty;var e=(t,r)=>n(t,"name",{value:r,configurable:!0});var i=Object.defineProperty,c=e((t,r)=>i(t,"name",{value:r,configurable:!0}),"e");function a(){return{agent:void 0,dispatcher:void 0}}e(a,"createProxy"),c(a,"createProxy");function o(){return globalThis.fetch}e(o,"createFetch"),c(o,"createFetch");const h=globalThis.fetch;export{o as createFetch,a as createProxy,h as fetch};
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
"use strict";var Ye=Object.defineProperty;var Re=A=>{throw TypeError(A)};var ze=(A,k,c)=>k in A?Ye(A,k,{enumerable:!0,configurable:!0,writable:!0,value:c}):A[k]=c;var e=(A,k)=>Ye(A,"name",{value:k,configurable:!0});var $A=(A,k,c)=>ze(A,typeof k!="symbol"?k+"":k,c),ke=(A,k,c)=>k.has(A)||Re("Cannot "+c),Ge=(A,k)=>Object(k)!==k?Re('Cannot use the "in" operator on this value'):A.has(k),Z=(A,k,c)=>(ke(A,k,"read from private field"),c?c.call(A):k.get(A)),SA=(A,k,c)=>k.has(A)?Re("Cannot add the same private member more than once"):k instanceof WeakSet?k.add(A):k.set(A,c),mA=(A,k,c,B)=>(ke(A,k,"write to private field"),B?B.call(A,c):k.set(A,c),c),ee=(A,k,c)=>(ke(A,k,"access private method"),c);var fe,de;const http=require("node:http"),https=require("node:https"),require$$1$1=require("node:url"),require$$0$1=require("node:assert"),require$$0$2=require("node:net"),Stream=require("node:stream"),require$$0=require("node:buffer"),require$$0$3=require("node:util"),require$$7=require("node:querystring"),require$$8=require("node:events"),require$$0$4=require("node:diagnostics_channel"),_commonjsHelpers=require("./shared/node-fetch-native.DhEqb06g.cjs"),require$$5=require("node:tls"),zlib=require("node:zlib"),require$$5$1=require("node:perf_hooks"),require$$8$1=require("node:util/types"),require$$1=require("node:worker_threads"),require$$5$2=require("node:async_hooks"),require$$1$2=require("node:console"),require$$1$3=require("node:dns"),require$$5$3=require("string_decoder"),require$$0$6=require("net"),require$$0$5=require("http"),require$$1$4=require("https"),require$$1$7=require("tls"),require$$1$5=require("tty"),require$$1$6=require("util"),require$$0$7=require("os"),require$$3=require("events"),require$$5$4=require("url"),require$$2=require("assert"),nodeFetchNative=require("node-fetch-native");function _interopDefaultCompat(A){return A&&typeof A=="object"&&"default"in A?A.default:A}e(_interopDefaultCompat,"_interopDefaultCompat");function _interopNamespaceCompat(A){if(A&&typeof A=="object"&&"default"in A)return A;const k=Object.create(null);if(A)for(const c in A)k[c]=A[c];return k.default=A,k}e(_interopNamespaceCompat,"_interopNamespaceCompat");const http__default=_interopDefaultCompat(http),http__namespace=_interopNamespaceCompat(http),https__namespace=_interopNamespaceCompat(https),require$$1__default$1=_interopDefaultCompat(require$$1$1),require$$0__default$1=_interopDefaultCompat(require$$0$1),require$$0__default$2=_interopDefaultCompat(require$$0$2),Stream__default=_interopDefaultCompat(Stream),require$$0__default=_interopDefaultCompat(require$$0),require$$0__default$3=_interopDefaultCompat(require$$0$3),require$$7__default=_interopDefaultCompat(require$$7),require$$8__default=_interopDefaultCompat(require$$8),require$$0__default$4=_interopDefaultCompat(require$$0$4),require$$5__default=_interopDefaultCompat(require$$5),zlib__default=_interopDefaultCompat(zlib),require$$5__default$1=_interopDefaultCompat(require$$5$1),require$$8__default$1=_interopDefaultCompat(require$$8$1),require$$1__default=_interopDefaultCompat(require$$1),require$$5__default$2=_interopDefaultCompat(require$$5$2),require$$1__default$2=_interopDefaultCompat(require$$1$2),require$$1__default$3=_interopDefaultCompat(require$$1$3),require$$5__default$3=_interopDefaultCompat(require$$5$3),require$$0__default$6=_interopDefaultCompat(require$$0$6),require$$0__default$5=_interopDefaultCompat(require$$0$5),require$$1__default$4=_interopDefaultCompat(require$$1$4),require$$1__default$7=_interopDefaultCompat(require$$1$7),require$$1__default$5=_interopDefaultCompat(require$$1$5),require$$1__default$6=_interopDefaultCompat(require$$1$6),require$$0__default$7=_interopDefaultCompat(require$$0$7),require$$3__default=_interopDefaultCompat(require$$3),require$$5__default$4=_interopDefaultCompat(require$$5$4),require$$2__default=_interopDefaultCompat(require$$2);var undici={},symbols$4,hasRequiredSymbols$4;function requireSymbols$4(){return hasRequiredSymbols$4||(hasRequiredSymbols$4=1,symbols$4={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(Line truncated
|
||||
`)||v.includes("\r")||v.includes("\0"))===!1}e(w,"isValidHeaderValue");function S(v,X){const{headersList:j}=X,tA=(j.get("referrer-policy",!0)??"").split(",");let rA="";if(tA.length>0)for(let FA=tA.length;FA!==0;FA--){const TA=tA[FA-1].trim();if(B.has(TA)){rA=TA;break}}rA!==""&&(v.referrerPolicy=rA)}e(S,"setRequestReferrerPolicyOnRedirect");function x(){return"allowed"}e(x,"crossOriginResourcePolicyCheck");function z(){return"success"}e(z,"corsCheck");function $(){return"success"}e($,"TAOCheck");function K(v){let X=null;X=v.mode,v.headersList.set("sec-fetch-mode",X,!0)}e(K,"appendFetchMetadata");function nA(v){let X=v.origin;if(!(X==="client"||X===void 0)){if(v.responseTainting==="cors"||v.mode==="websocket")v.headersList.append("origin",X,!0);else if(v.method!=="GET"&&v.method!=="HEAD"){switch(v.referrerPolicy){case"no-referrer":X=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":v.origin&&yA(v.origin)&&!yA(Y(v))&&(X=null);break;case"same-origin":wA(v,Y(v))||(X=null);break}v.headersList.append("origin",X,!0)}}}e(nA,"appendRequestOriginHeader");function iA(v,X){return v}e(iA,"coarsenTime");function uA(v,X,j){return!v?.startTime||v.startTime<X?{domainLookupStartTime:X,domainLookupEndTime:X,connectionStartTime:X,connectionEndTime:X,secureConnectionStartTime:X,ALPNNegotiatedProtocol:v?.ALPNNegotiatedProtocol}:{domainLookupStartTime:iA(v.domainLookupStartTime),domainLookupEndTime:iA(v.domainLookupEndTime),connectionStartTime:iA(v.connectionStartTime),connectionEndTime:iA(v.connectionEndTime),secureConnectionStartTime:iA(v.secureConnectionStartTime),ALPNNegotiatedProtocol:v.ALPNNegotiatedProtocol}}e(uA,"clampAndCoarsenConnectionTimingInfo");function RA(v){return iA(U.now())}e(RA,"coarsenedSharedCurrentTime");function IA(v){return{startTime:v.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:v.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}e(IA,"createOpaqueTimingInfo");function CA(){return{referrerPolicy:"strict-origin-when-cross-origin"}}e(CA,"makePolicyContainer");function pA(v){return{referrerPolicy:v.referrerPolicy}}e(pA,"clonePolicyContainer");function fA(v){const X=v.referrerPolicy;I(X);let j=null;if(v.referrer==="client"){const VA=y();if(!VA||VA.origin==="null")return"no-referrer";j=new URL(VA)}else v.referrer instanceof URL&&(j=v.referrer);let tA=kA(j);const rA=kA(j,!0);tA.toString().length>4096&&(tA=rA);const FA=wA(v,tA),TA=bA(tA)&&!bA(v.url);switch(X){case"origin":return rA??kA(j,!0);case"unsafe-url":return tA;case"same-origin":return FA?rA:"no-referrer";case"origin-when-cross-origin":return FA?tA:rA;case"strict-origin-when-cross-origin":{const VA=Y(v);return wA(tA,VA)?tA:bA(tA)&&!bA(VA)?"no-referrer":rA}case"strict-origin":case"no-referrer-when-downgrade":default:return TA?"no-referrer":rA}}e(fA,"determineRequestsReferrer");function kA(v,X){return I(v instanceof URL),v=new URL(v),v.protocol==="file:"||v.protocol==="about:"||v.protocol==="blank:"?"no-referrer":(v.username="",v.password="",v.hash="",X&&(v.pathname="",v.search=""),v)}e(kA,"stripURLForReferrer");function bA(v){if(!(v instanceof URL))return!1;if(v.href==="about:blank"||v.href==="about:srcdoc"||v.protocol==="data:"||v.protocol==="file:")return!0;return X(v.origin);function X(j){if(j==null||j==="null")return!1;const tA=new URL(j);return!!(tA.protocol==="https:"||tA.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(tA.hostname)||tA.hostname==="localhost"||tA.hostname.includes("localhost.")||tA.hostname.endsWith(".localhost"))}}e(bA,"isURLPotentiallyTrustworthy");function gA(v,X){if(J===void 0)return!0;const j=oA(X);if(j==="no metadata"||j.length===0)return!0;const tA=aA(j),rA=EA(j,tA);for(const FA of rA){const TA=FA.algo,VA=FA.hash;let YA=J.createHash(TA).update(v).digest("base64");if(YA[YA.length-1]==="="&&(YA[YA.length-2]==="="?YA=YA.slice(0,-2):YA=YA.slice(0,-1)),sA(YA,VA))return!0}return!1}e(gA,"bytesMatch");const DA=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function oA(v){const X=[];let j=!0;for(const tA of v.split(" ")){j=!1;const rA=DA.exec(tA);if(rA===null||rA.groups===void 0||rA.groups.algo===void 0)continue;const FA=rA.groups.algo.toLowerCase();G.includes(FA)&&X.push(rA.groups)}return j===!0?"no metadata":X}e(oA,"parseMetadata");function aA(v){let X=v[0].algo;if(X[3]==="5")return X;for(let j=1;j<v.length;++j){const tA=v[j];if(tA.algo[3]==="5"){X="sha512";break}else{if(X[3]==="3")continue;tA.algo[3]==="3"&&(X="sha384")}}return X}e(aA,"getStrongestMetadata");function EA(v,X){if(v.length===1)return v;let j=0;for(let tA=0;tA<v.length;++tA)v[tA].algo===X&&(v[j++]=v[tA]);return v.length=j,v}e(EA,"filterMetadataListByAlgorithm");function sA(v,X){if(v.length!==X.length)return!1;for(let j=0;j<v.length;++j)if(v[j]!==X[j]){if(v[j]==="+"&&X[j]==="-"||v
Line truncated
|
||||
`);function l(q){for(let M=0;M<q.length;++M)if((q.charCodeAt(M)&-128)!==0)return!1;return!0}e(l,"isAsciiString");function I(q){const M=q.length;if(M<27||M>70)return!1;for(let Y=0;Y<M;++Y){const m=q.charCodeAt(Y);if(!(m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||m===39||m===45||m===95))return!1}return!0}e(I,"validateBoundary");function p(q,M){F(M!=="failure"&&M.essence==="multipart/form-data");const Y=M.parameters.get("boundary");if(Y===void 0)return"failure";const m=Buffer.from(`--${Y}`,"utf8"),f=[],n={position:0};for(;q[n.position]===13&&q[n.position+1]===10;)n.position+=2;let C=q.length;for(;q[C-1]===10&&q[C-2]===13;)C-=2;for(C!==q.length&&(q=q.subarray(0,C));;){if(q.subarray(n.position,n.position+m.length).equals(m))n.position+=m.length;else return"failure";if(n.position===q.length-2&&_(q,o,n)||n.position===q.length-4&&_(q,N,n))return f;if(q[n.position]!==13||q[n.position+1]!==10)return"failure";n.position+=2;const w=b(q,n);if(w==="failure")return"failure";let{name:S,filename:x,contentType:z,encoding:$}=w;n.position+=2;let K;{const iA=q.indexOf(m.subarray(2),n.position);if(iA===-1)return"failure";K=q.subarray(n.position,iA-4),n.position+=K.length,$==="base64"&&(K=Buffer.from(K.toString(),"base64"))}if(q[n.position]!==13||q[n.position+1]!==10)return"failure";n.position+=2;let nA;x!==null?(z??(z="text/plain"),l(z)||(z=""),nA=new D([K],x,{type:z})):nA=c(Buffer.from(K)),F(A(S)),F(typeof nA=="string"&&A(nA)||y(nA)),f.push(R(S,nA,x))}}e(p,"multipartFormDataParser");function b(q,M){let Y=null,m=null,f=null,n=null;for(;;){if(q[M.position]===13&&q[M.position+1]===10)return Y===null?"failure":{name:Y,filename:m,contentType:f,encoding:n};let C=J(w=>w!==10&&w!==13&&w!==58,q,M);if(C=V(C,!0,!0,w=>w===9||w===32),!B.test(C.toString())||q[M.position]!==58)return"failure";switch(M.position++,J(w=>w===32||w===9,q,M),k(C)){case"content-disposition":{if(Y=m=null,!_(q,U,M)||(M.position+=17,Y=G(q,M),Y===null))return"failure";if(_(q,r,M)){let w=M.position+r.length;if(q[w]===42&&(M.position+=1,w+=1),q[w]!==61||q[w+1]!==34||(M.position+=12,m=G(q,M),m===null))return"failure"}break}case"content-type":{let w=J(S=>S!==10&&S!==13,q,M);w=V(w,!1,!0,S=>S===9||S===32),f=t(w);break}case"content-transfer-encoding":{let w=J(S=>S!==10&&S!==13,q,M);w=V(w,!1,!0,S=>S===9||S===32),n=t(w);break}default:J(w=>w!==10&&w!==13,q,M)}if(q[M.position]!==13&&q[M.position+1]!==10)return"failure";M.position+=2}}e(b,"parseMultipartFormDataHeaders");function G(q,M){F(q[M.position-1]===34);let Y=J(m=>m!==10&&m!==13&&m!==34,q,M);return q[M.position]!==34?null:(M.position++,Y=new TextDecoder().decode(Y).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),Y)}e(G,"parseMultipartFormDataName");function J(q,M,Y){let m=Y.position;for(;m<M.length&&q(M[m]);)++m;return M.subarray(Y.position,Y.position=m)}e(J,"collectASequenceOfBytes");function V(q,M,Y,m){let f=0,n=q.length-1;if(M)for(;f<q.length&&m(q[f]);)f++;for(;n>0&&m(q[n]);)n--;return f===0&&n===q.length-1?q:q.subarray(f,n+1)}e(V,"removeChars");function _(q,M,Y){if(q.length<M.length)return!1;for(let m=0;m<M.length;m++)if(M[m]!==q[Y.position+m])return!1;return!0}return e(_,"bufferStartsWith"),formdataParser={multipartFormDataParser:p,validateBoundary:I},formdataParser}e(requireFormdataParser,"requireFormdataParser");var body,hasRequiredBody;function requireBody(){if(hasRequiredBody)return body;hasRequiredBody=1;const A=requireUtil$7(),{ReadableStreamFrom:k,isBlobLike:c,isReadableStreamLike:B,readableStreamClose:t,createDeferredPromise:y,fullyReadBody:R,extractMimeType:F,utf8DecodeBytes:Q}=requireUtil$6(),{FormData:D}=requireFormdata(),{kState:U}=requireSymbols$3(),{webidl:r}=requireWebidl(),{Blob:o}=require$$0__default,N=require$$0__default$1,{isErrored:l,isDisturbed:I}=Stream__default,{isArrayBuffer:p}=require$$8__default$1,{serializeAMimeType:b}=requireDataUrl(),{multipartFormDataParser:G}=requireFormdataParser();let J;try{const K=require("node:crypto");J=e(nA=>K.randomInt(0,nA),"random")}catch{J=e(K=>Math.floor(Math.random(K)),"random")}const V=new TextEncoder;function _(){}e(_,"noop");const q=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0;let M;q&&(M=new FinalizationRegistry(K=>{const nA=K.deref();nA&&!nA.locked&&!I(nA)&&!l(nA)&&nA.cancel("Response object has been garbage collected").catch(_)}));function Y(K,nA=!1){let iA=null;K instanceof ReadableStream?iA=K:c(K)?iA=K.stream():iA=new ReadableStream({async pull(fA){const kA=typeof RA=="string"?V.encode(RA):RA;kA.byteLength&&fA.enqueue(kA),queueMicrotask(()=>t(fA))},start(){},type:"bytes"}),N(B(iA));let uA=null,RA=null,IA=null,CA=null;if(typeof K=="string")RA=K,CA="text/plain;charset=UTF-8";else if(K instanceof URLSearchParams)RA=K.toString(),CA="application/x-www-form-urlencoded;charset=UTF-8";else if(p(K))RA=new Uint8Array(K.slice());else if(ArrayBuffer.isView(K))RA=new Uint8Array(K.buffer.slice(K.byteOffset,K.byteOffset+K.byteLength));else if(A.isFormDataLike(K)){const fA=`----formdata-undici-0${`${J(1e11)}`.padStart(11,"0")}`,kA=`--${fA}\r
|
||||
Content-Disposition: form-data`;/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */const bA=e(sA=>sA.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),gA=e(sA=>sA.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),DA=[],oA=new Uint8Array([13,10]);IA=0;let aA=!1;for(const[sA,NA]of K)if(typeof NA=="string"){const wA=V.encode(kA+`; name="${bA(gA(sA))}"\r
|
||||
\r
|
||||
${gA(NA)}\r
|
||||
`);DA.push(wA),IA+=wA.byteLength}else{const wA=V.encode(`${kA}; name="${bA(gA(sA))}"`+(NA.name?`; filename="${bA(NA.name)}"`:"")+`\r
|
||||
Content-Type: ${NA.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);DA.push(wA,NA,oA),typeof NA.size=="number"?IA+=wA.byteLength+NA.size+oA.byteLength:aA=!0}const EA=V.encode(`--${fA}--\r
|
||||
`);DA.push(EA),IA+=EA.byteLength,aA&&(IA=null),RA=K,uA=e(async function*(){for(const sA of DA)sA.stream?yield*sA.stream():yield sA},"action"),CA=`multipart/form-data; boundary=${fA}`}else if(c(K))RA=K,IA=K.size,K.type&&(CA=K.type);else if(typeof K[Symbol.asyncIterator]=="function"){if(nA)throw new TypeError("keepalive");if(A.isDisturbed(K)||K.locked)throw new TypeError("Response body object should not be disturbed or locked");iA=K instanceof ReadableStream?K:k(K)}if((typeof RA=="string"||A.isBuffer(RA))&&(IA=Buffer.byteLength(RA)),uA!=null){let fA;iA=new ReadableStream({async start(){fA=uA(K)[Symbol.asyncIterator]()},async pull(kA){const{value:bA,done:gA}=await fA.next();if(gA)queueMicrotask(()=>{kA.close(),kA.byobRequest?.respond(0)});else if(!l(iA)){const DA=new Uint8Array(bA);DA.byteLength&&kA.enqueue(DA)}return kA.desiredSize>0},async cancel(kA){await fA.return()},type:"bytes"})}return[{stream:iA,source:RA,length:IA},CA]}e(Y,"extractBody");function m(K,nA=!1){return K instanceof ReadableStream&&(N(!A.isDisturbed(K),"The body has already been consumed."),N(!K.locked,"The stream is locked.")),Y(K,nA)}e(m,"safelyExtractBody");function f(K,nA){const[iA,uA]=nA.stream.tee();return q&&M.register(K,new WeakRef(iA)),nA.stream=iA,{stream:uA,length:nA.length,source:nA.source}}e(f,"cloneBody");function n(K){if(K.aborted)throw new DOMException("The operation was aborted.","AbortError")}e(n,"throwIfAborted");function C(K){return{blob(){return S(this,iA=>{let uA=$(this);return uA===null?uA="":uA&&(uA=b(uA)),new o([iA],{type:uA})},K)},arrayBuffer(){return S(this,iA=>new Uint8Array(iA).buffer,K)},text(){return S(this,Q,K)},json(){return S(this,z,K)},formData(){return S(this,iA=>{const uA=$(this);if(uA!==null)switch(uA.essence){case"multipart/form-data":{const RA=G(iA,uA);if(RA==="failure")throw new TypeError("Failed to parse body as FormData.");const IA=new D;return IA[U]=RA,IA}case"application/x-www-form-urlencoded":{const RA=new URLSearchParams(iA.toString()),IA=new D;for(const[CA,pA]of RA)IA.append(CA,pA);return IA}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},K)},bytes(){return S(this,iA=>new Uint8Array(iA),K)}}}e(C,"bodyMixinMethods");function w(K){Object.assign(K.prototype,C(K))}e(w,"mixinBody");async function S(K,nA,iA){if(r.brandCheck(K,iA),x(K))throw new TypeError("Body is unusable: Body has already been read");n(K[U]);const uA=y(),RA=e(CA=>uA.reject(CA),"errorSteps"),IA=e(CA=>{try{uA.resolve(nA(CA))}catch(pA){RA(pA)}},"successSteps");return K[U].body==null?(IA(Buffer.allocUnsafe(0)),uA.promise):(await R(K[U].body,IA,RA),uA.promise)}e(S,"consumeBody");function x(K){const nA=K[U].body;return nA!=null&&(nA.stream.locked||A.isDisturbed(nA.stream))}e(x,"bodyUnusable");function z(K){return JSON.parse(Q(K))}e(z,"parseJSONFromBytes");function $(K){const nA=K[U].headersList,iA=F(nA);return iA==="failure"?null:iA}return e($,"bodyMimeType"),body={extractBody:Y,safelyExtractBody:m,cloneBody:f,mixinBody:w,streamRegistry:M,hasFinalizationRegistry:q,bodyUnusable:x},body}e(requireBody,"requireBody");var clientH1,hasRequiredClientH1;function requireClientH1(){if(hasRequiredClientH1)return clientH1;hasRequiredClientH1=1;const A=require$$0__default$1,k=requireUtil$7(),{channels:c}=requireDiagnostics(),B=requireTimers(),{RequestContentLengthMismatchError:t,ResponseContentLengthMismatchError:y,RequestAbortedError:R,HeadersTimeoutError:F,HeadersOverflowError:Q,SocketError:D,InformationalError:U,BodyTimeoutError:r,HTTPParserError:o,ResponseExceededMaxSizeError:N}=requireErrors(),{kUrl:l,kReset:I,kClient:p,kParser:b,kBlocking:G,kRunning:J,kPending:V,kSize:_,kWriting:q,kQueue:M,kNoRef:Y,kKeepAliveDefaultTimeout:m,kHostHeader:f,kPendingIdx:n,kRunningIdx:C,kError:w,kPipelining:S,kSocket:x,kKeepAliveTimeoutValue:z,kMaxHeadersSize:$,kKeepAliveMaxTimeout:K,kKeepAliveTimeoutThreshold:nA,kHeadersTimeout:iA,kBodyTimeout:uA,kStrictContentLength:RA,kMaxRequests:IA,kCounter:CA,kMaxResponseSize:pA,kOnError:fA,kResume:kA,kHTTPContext:bA}=requireSymbols$4(),gA=requireConstants$3(),DA=Buffer.alloc(0),oA=Buffer[Symbol.species],aA=k.addListener,EA=k.removeAllListeners;let sA;async function NA(){const GA=process.env.JEST_WORKER_ID?requireLlhttpWasm():void 0;let eA;try{eA=await WebAssembly.compile(requireLlhttp_simdWasm())}catch{eA=await WebAssembly.compile(GA||requireLlhttpWasm())}return await WebAssembly.instantiate(eA,{env:{wasm_on_url:e((lA,BA,hA)=>0,"wasm_on_url"),wasm_on_status:e((lA,BA,hA)=>{A(dA.ptr===lA);const MA=BA-OA+XA.byteOffset;return dA.onStatus(new oA(XA.buffer,MA,hA))||0},"wasm_on_status"),wasm_on_message_begin:e(lA=>(A(dA.ptr===lA),dA.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:e((lA,BA,hA)=>{A(dA.ptr===lA);const MA=BA-OA+XA.byteOffset;return dA.onHeaderField(new oA(XA.buffer,MA,hA))||0},"wasm_on_header_field"),wasm_on_header_value:e((lA,BA,hA)=>{A(dA.ptr===lA);const MA=BA-OA+XA.byteOffset;return dA.onHeaderValue(new oA(XA.buffer,MA,hA))||0},"w
Line truncated
|
||||
`;if(typeof hA=="string"?FA+=`host: ${hA}\r
|
||||
`:FA+=GA[f],MA?FA+=`connection: upgrade\r
|
||||
upgrade: ${MA}\r
|
||||
`:GA[S]&&!tA[I]?FA+=`connection: keep-alive\r
|
||||
`:FA+=`connection: close\r
|
||||
`,Array.isArray(AA))for(let TA=0;TA<AA.length;TA+=2){const VA=AA[TA+0],YA=AA[TA+1];if(Array.isArray(YA))for(let _A=0;_A<YA.length;_A++)FA+=`${VA}: ${YA[_A]}\r
|
||||
`;else FA+=`${VA}: ${YA}\r
|
||||
`}return c.sendHeaders.hasSubscribers&&c.sendHeaders.publish({request:eA,headers:FA,socket:tA}),!UA||j===0?JA(rA,null,GA,eA,tA,v,FA,X):k.isBuffer(UA)?JA(rA,UA,GA,eA,tA,v,FA,X):k.isBlobLike(UA)?typeof UA.stream=="function"?te(rA,UA.stream(),GA,eA,tA,v,FA,X):WA(rA,UA,GA,eA,tA,v,FA,X):k.isStream(UA)?LA(rA,UA,GA,eA,tA,v,FA,X):k.isIterable(UA)?te(rA,UA,GA,eA,tA,v,FA,X):A(!1),!0}e(yA,"writeH1");function LA(GA,eA,lA,BA,hA,MA,xA,zA){A(MA!==0||lA[J]===0,"stream body cannot be pipelined");let UA=!1;const AA=new ie({abort:GA,socket:hA,request:BA,contentLength:MA,client:lA,expectsPayload:zA,header:xA}),v=e(function(rA){if(!UA)try{!AA.write(rA)&&this.pause&&this.pause()}catch(FA){k.destroy(this,FA)}},"onData"),X=e(function(){UA||eA.resume&&eA.resume()},"onDrain"),j=e(function(){if(queueMicrotask(()=>{eA.removeListener("error",tA)}),!UA){const rA=new R;queueMicrotask(()=>tA(rA))}},"onClose"),tA=e(function(rA){if(!UA){if(UA=!0,A(hA.destroyed||hA[q]&&lA[J]<=1),hA.off("drain",X).off("error",tA),eA.removeListener("data",v).removeListener("end",tA).removeListener("close",j),!rA)try{AA.end()}catch(FA){rA=FA}AA.destroy(rA),rA&&(rA.code!=="UND_ERR_INFO"||rA.message!=="reset")?k.destroy(eA,rA):k.destroy(eA)}},"onFinished");eA.on("data",v).on("end",tA).on("error",tA).on("close",j),eA.resume&&eA.resume(),hA.on("drain",X).on("error",tA),eA.errorEmitted??eA.errored?setImmediate(()=>tA(eA.errored)):(eA.endEmitted??eA.readableEnded)&&setImmediate(()=>tA(null)),(eA.closeEmitted??eA.closed)&&setImmediate(j)}e(LA,"writeStream");function JA(GA,eA,lA,BA,hA,MA,xA,zA){try{eA?k.isBuffer(eA)&&(A(MA===eA.byteLength,"buffer body must have content length"),hA.cork(),hA.write(`${xA}content-length: ${MA}\r
|
||||
\r
|
||||
`,"latin1"),hA.write(eA),hA.uncork(),BA.onBodySent(eA),!zA&&BA.reset!==!1&&(hA[I]=!0)):MA===0?hA.write(`${xA}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(A(MA===null,"no body must not have content length"),hA.write(`${xA}\r
|
||||
`,"latin1")),BA.onRequestSent(),lA[kA]()}catch(UA){GA(UA)}}e(JA,"writeBuffer");async function WA(GA,eA,lA,BA,hA,MA,xA,zA){A(MA===eA.size,"blob body must have content length");try{if(MA!=null&&MA!==eA.size)throw new t;const UA=Buffer.from(await eA.arrayBuffer());hA.cork(),hA.write(`${xA}content-length: ${MA}\r
|
||||
\r
|
||||
`,"latin1"),hA.write(UA),hA.uncork(),BA.onBodySent(UA),BA.onRequestSent(),!zA&&BA.reset!==!1&&(hA[I]=!0),lA[kA]()}catch(UA){GA(UA)}}e(WA,"writeBlob");async function te(GA,eA,lA,BA,hA,MA,xA,zA){A(MA!==0||lA[J]===0,"iterator body cannot be pipelined");let UA=null;function AA(){if(UA){const j=UA;UA=null,j()}}e(AA,"onDrain");const v=e(()=>new Promise((j,tA)=>{A(UA===null),hA[w]?tA(hA[w]):UA=j}),"waitForDrain");hA.on("close",AA).on("drain",AA);const X=new ie({abort:GA,socket:hA,request:BA,contentLength:MA,client:lA,expectsPayload:zA,header:xA});try{for await(const j of eA){if(hA[w])throw hA[w];X.write(j)||await v()}X.end()}catch(j){X.destroy(j)}finally{hA.off("close",AA).off("drain",AA)}}e(te,"writeIterable");const Ie=class Ie{constructor({abort:eA,socket:lA,request:BA,contentLength:hA,client:MA,expectsPayload:xA,header:zA}){this.socket=lA,this.request=BA,this.contentLength=hA,this.client=MA,this.bytesWritten=0,this.expectsPayload=xA,this.header=zA,this.abort=eA,lA[q]=!0}write(eA){const{socket:lA,request:BA,contentLength:hA,client:MA,bytesWritten:xA,expectsPayload:zA,header:UA}=this;if(lA[w])throw lA[w];if(lA.destroyed)return!1;const AA=Buffer.byteLength(eA);if(!AA)return!0;if(hA!==null&&xA+AA>hA){if(MA[RA])throw new t;process.emitWarning(new t)}lA.cork(),xA===0&&(!zA&&BA.reset!==!1&&(lA[I]=!0),hA===null?lA.write(`${UA}transfer-encoding: chunked\r
|
||||
`,"latin1"):lA.write(`${UA}content-length: ${hA}\r
|
||||
\r
|
||||
`,"latin1")),hA===null&&lA.write(`\r
|
||||
${AA.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=AA;const v=lA.write(eA);return lA.uncork(),BA.onBodySent(eA),v||lA[b].timeout&&lA[b].timeoutType===HA&&lA[b].timeout.refresh&&lA[b].timeout.refresh(),v}end(){const{socket:eA,contentLength:lA,client:BA,bytesWritten:hA,expectsPayload:MA,header:xA,request:zA}=this;if(zA.onRequestSent(),eA[q]=!1,eA[w])throw eA[w];if(!eA.destroyed){if(hA===0?MA?eA.write(`${xA}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):eA.write(`${xA}\r
|
||||
`,"latin1"):lA===null&&eA.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),lA!==null&&hA!==lA){if(BA[RA])throw new t;process.emitWarning(new t)}eA[b].timeout&&eA[b].timeoutType===HA&&eA[b].timeout.refresh&&eA[b].timeout.refresh(),BA[kA]()}}destroy(eA){const{socket:lA,client:BA,abort:hA}=this;lA[q]=!1,eA&&(A(BA[J]<=1,"pipeline should only contain this request"),hA(eA))}};e(Ie,"AsyncWriter");let ie=Ie;return clientH1=QA,clientH1}e(requireClientH1,"requireClientH1");var clientH2,hasRequiredClientH2;function requireClientH2(){if(hasRequiredClientH2)return clientH2;hasRequiredClientH2=1;const A=require$$0__default$1,{pipeline:k}=Stream__default,c=requireUtil$7(),{RequestContentLengthMismatchError:B,RequestAbortedError:t,SocketError:y,InformationalError:R}=requireErrors(),{kUrl:F,kReset:Q,kClient:D,kRunning:U,kPending:r,kQueue:o,kPendingIdx:N,kRunningIdx:l,kError:I,kSocket:p,kStrictContentLength:b,kOnError:G,kMaxConcurrentStreams:J,kHTTP2Session:V,kResume:_,kSize:q,kHTTPContext:M}=requireSymbols$4(),Y=Symbol("open streams");let m,f=!1,n;try{n=require("node:http2")}catch{n={constants:{}}}const{constants:{HTTP2_HEADER_AUTHORITY:C,HTTP2_HEADER_METHOD:w,HTTP2_HEADER_PATH:S,HTTP2_HEADER_SCHEME:x,HTTP2_HEADER_CONTENT_LENGTH:z,HTTP2_HEADER_EXPECT:$,HTTP2_HEADER_STATUS:K}}=n;function nA(aA){const EA=[];for(const[sA,NA]of Object.entries(aA))if(Array.isArray(NA))for(const wA of NA)EA.push(Buffer.from(sA),Buffer.from(wA));else EA.push(Buffer.from(sA),Buffer.from(NA));return EA}e(nA,"parseH2Headers");async function iA(aA,EA){aA[p]=EA,f||(f=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));const sA=n.connect(aA[F],{createConnection:e(()=>EA,"createConnection"),peerMaxConcurrentStreams:aA[J]});sA[Y]=0,sA[D]=aA,sA[p]=EA,c.addListener(sA,"error",RA),c.addListener(sA,"frameError",IA),c.addListener(sA,"end",CA),c.addListener(sA,"goaway",pA),c.addListener(sA,"close",function(){const{[D]:wA}=this,{[p]:vA}=wA,dA=this[p][I]||this[I]||new y("closed",c.getSocketInfo(vA));if(wA[V]=null,wA.destroyed){A(wA[r]===0);const XA=wA[o].splice(wA[l]);for(let KA=0;KA<XA.length;KA++){const OA=XA[KA];c.errorRequest(wA,OA,dA)}}}),sA.unref(),aA[V]=sA,EA[V]=sA,c.addListener(EA,"error",function(wA){A(wA.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[I]=wA,this[D][G](wA)}),c.addListener(EA,"end",function(){c.destroy(this,new y("other side closed",c.getSocketInfo(this)))}),c.addListener(EA,"close",function(){const wA=this[I]||new y("closed",c.getSocketInfo(this));aA[p]=null,this[V]!=null&&this[V].destroy(wA),aA[N]=aA[l],A(aA[U]===0),aA.emit("disconnect",aA[F],[aA],wA),aA[_]()});let NA=!1;return EA.on("close",()=>{NA=!0}),{version:"h2",defaultPipelining:1/0,write(...wA){return kA(aA,...wA)},resume(){uA(aA)},destroy(wA,vA){NA?queueMicrotask(vA):EA.destroy(wA).on("close",vA)},get destroyed(){return EA.destroyed},busy(){return!1}}}e(iA,"connectH2");function uA(aA){const EA=aA[p];EA?.destroyed===!1&&(aA[q]===0&&aA[J]===0?(EA.unref(),aA[V].unref()):(EA.ref(),aA[V].ref()))}e(uA,"resumeH2");function RA(aA){A(aA.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[p][I]=aA,this[D][G](aA)}e(RA,"onHttp2SessionError");function IA(aA,EA,sA){if(sA===0){const NA=new R(`HTTP/2: "frameError" received - type ${aA}, code ${EA}`);this[p][I]=NA,this[D][G](NA)}}e(IA,"onHttp2FrameError");function CA(){const aA=new y("other side closed",c.getSocketInfo(this[p]));this.destroy(aA),c.destroy(this[p],aA)}e(CA,"onHttp2SessionEnd");function pA(aA){const EA=this[I]||new y(`HTTP/2: "GOAWAY" frame received with code ${aA}`,c.getSocketInfo(this)),sA=this[D];if(sA[p]=null,sA[M]=null,this[V]!=null&&(this[V].destroy(EA),this[V]=null),c.destroy(this[p],EA),sA[l]<sA[o].length){const NA=sA[o][sA[l]];sA[o][sA[l]++]=null,c.errorRequest(sA,NA,EA),sA[N]=sA[l]}A(sA[U]===0),sA.emit("disconnect",sA[F],[sA],EA),sA[_]()}e(pA,"onHTTP2GoAway");function fA(aA){return aA!=="GET"&&aA!=="HEAD"&&aA!=="OPTIONS"&&aA!=="TRACE"&&aA!=="CONNECT"}e(fA,"shouldSendContentLength");function kA(aA,EA){const sA=aA[V],{method:NA,path:wA,host:vA,upgrade:dA,expectContinue:XA,signal:KA,headers:OA}=EA;let{body:PA}=EA;if(dA)return c.errorRequest(aA,EA,new Error("Upgrade not supported for H2")),!1;const ZA={};for(let yA=0;yA<OA.length;yA+=2){const LA=OA[yA+0],JA=OA[yA+1];if(Array.isArray(JA))for(let WA=0;WA<JA.length;WA++)ZA[LA]?ZA[LA]+=`,${JA[WA]}`:ZA[LA]=JA[WA];else ZA[LA]=JA}let HA;const{hostname:se,port:ne}=aA[F];ZA[C]=vA||`${se}${ne?`:${ne}`:""}`,ZA[w]=NA;const jA=e(yA=>{EA.aborted||EA.completed||(yA=yA||new t,c.errorRequest(aA,EA,yA),HA!=null&&c.destroy(HA,yA),c.destroy(PA,yA),aA[o][aA[l]++]=null,aA[_]())},"abort");try{EA.onConnect(jA)}catch(yA){c.errorRequest(aA,EA,yA)}if(EA.aborted)return!1;if(NA==="CONNECT")return sA.ref(),HA=sA.request(ZA,{endStream:!1,signal:KA}),HA.id&&!HA.pending?(EA.onUpgrade(null,null,HA),++sA[Y],aA[o][aA[l]++]=null):HA.once("ready",()=>{EA.onUpgrade(null,null,HA),++sA[Y],aA[o][aA[l]++]=null}),HA.once("close",()=>{sA[Y]-=1,sA[Y]===0&&sA.unref()}),!0;ZA[S]=wA,ZA[x]="https";const Ae=NA==="PUT"||NA==="POST"||NA==="PA
Line truncated
|
||||
`,this[nA]=ie??3e5,this[K]=LA??3e5,this[iA]=zA??!0,this[RA]=AA,this[IA]=X,this[dA]=null,this[DA]=tA>-1?tA:-1,this[EA]=TA??100,this[aA]=null,this[V]=[],this[n]=0,this[f]=0,this[sA]=YA=>ne(this,YA),this[oA]=YA=>ZA(this,YA)}get pipelining(){return this[w]}set pipelining(W){this[w]=W,this[sA](!0)}get[G](){return this[V].length-this[f]}get[b](){return this[f]-this[n]}get[J](){return this[V].length-this[n]}get[_](){return!!this[aA]&&!this[q]&&!this[aA].destroyed}get[l](){return!!(this[aA]?.busy(null)||this[J]>=(KA(this)||1)||this[G]>0)}[I](W){HA(this),this.once("connect",W)}[kA](W,cA){const yA=W.origin||this[r].origin,LA=new y(yA,W,cA);return this[V].push(LA),this[p]||(B.bodyLength(LA.body)==null&&B.isIterable(LA.body)?(this[p]=1,queueMicrotask(()=>ne(this))):this[sA](!0)),this[p]&&this[M]!==2&&this[l]&&(this[M]=2),this[M]<2}async[pA](){return new Promise(W=>{this[J]?this[dA]=W:W(null)})}async[fA](W){return new Promise(cA=>{const yA=this[V].splice(this[f]);for(let JA=0;JA<yA.length;JA++){const WA=yA[JA];B.errorRequest(this,WA,W)}const LA=e(()=>{this[dA]&&(this[dA](),this[dA]=null),cA(null)},"callback");this[aA]?(this[aA].destroy(W,LA),this[aA]=null):queueMicrotask(LA),this[sA]()})}};e(Ae,"Client");let OA=Ae;const PA=requireRedirectInterceptor();function ZA(QA,W){if(QA[b]===0&&W.code!=="UND_ERR_INFO"&&W.code!=="UND_ERR_SOCKET"){A(QA[f]===QA[n]);const cA=QA[V].splice(QA[n]);for(let yA=0;yA<cA.length;yA++){const LA=cA[yA];B.errorRequest(QA,LA,W)}A(QA[J]===0)}}e(ZA,"onError");async function HA(QA){A(!QA[q]),A(!QA[aA]);let{host:W,hostname:cA,protocol:yA,port:LA}=QA[r];if(cA[0]==="["){const JA=cA.indexOf("]");A(JA!==-1);const WA=cA.substring(1,JA);A(k.isIP(WA)),cA=WA}QA[q]=!0,t.beforeConnect.hasSubscribers&&t.beforeConnect.publish({connectParams:{host:W,hostname:cA,protocol:yA,port:LA,version:QA[aA]?.version,servername:QA[o],localAddress:QA[gA]},connector:QA[uA]});try{const JA=await new Promise((WA,te)=>{QA[uA]({host:W,hostname:cA,protocol:yA,port:LA,servername:QA[o],localAddress:QA[gA]},(ie,oe)=>{ie?te(ie):WA(oe)})});if(QA.destroyed){B.destroy(JA.on("error",XA),new D);return}A(JA);try{QA[aA]=JA.alpnProtocol==="h2"?await wA(QA,JA):await NA(QA,JA)}catch(WA){throw JA.destroy().on("error",XA),WA}QA[q]=!1,JA[CA]=0,JA[IA]=QA[IA],JA[N]=QA,JA[C]=null,t.connected.hasSubscribers&&t.connected.publish({connectParams:{host:W,hostname:cA,protocol:yA,port:LA,version:QA[aA]?.version,servername:QA[o],localAddress:QA[gA]},connector:QA[uA],socket:JA}),QA.emit("connect",QA[r],[QA])}catch(JA){if(QA.destroyed)return;if(QA[q]=!1,t.connectError.hasSubscribers&&t.connectError.publish({connectParams:{host:W,hostname:cA,protocol:yA,port:LA,version:QA[aA]?.version,servername:QA[o],localAddress:QA[gA]},connector:QA[uA],error:JA}),JA.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(A(QA[b]===0);QA[G]>0&&QA[V][QA[f]].servername===QA[o];){const WA=QA[V][QA[f]++];B.errorRequest(QA,WA,JA)}else ZA(QA,JA);QA.emit("connectionError",QA[r],[QA],JA)}QA[sA]()}e(HA,"connect");function se(QA){QA[M]=0,QA.emit("drain",QA[r],[QA])}e(se,"emitDrain");function ne(QA,W){QA[p]!==2&&(QA[p]=2,jA(QA,W),QA[p]=0,QA[n]>256&&(QA[V].splice(0,QA[n]),QA[f]-=QA[n],QA[n]=0))}e(ne,"resume");function jA(QA,W){for(;;){if(QA.destroyed){A(QA[G]===0);return}if(QA[dA]&&!QA[J]){QA[dA](),QA[dA]=null;return}if(QA[aA]&&QA[aA].resume(),QA[l])QA[M]=2;else if(QA[M]===2){W?(QA[M]=1,queueMicrotask(()=>se(QA))):se(QA);continue}if(QA[G]===0||QA[b]>=(KA(QA)||1))return;const cA=QA[V][QA[f]];if(QA[r].protocol==="https:"&&QA[o]!==cA.servername){if(QA[b]>0)return;QA[o]=cA.servername,QA[aA]?.destroy(new Q("servername changed"),()=>{QA[aA]=null,ne(QA)})}if(QA[q])return;if(!QA[aA]){HA(QA);return}if(QA[aA].destroyed||QA[aA].busy(cA))return;!cA.aborted&&QA[aA].write(cA)?QA[f]++:QA[V].splice(QA[f],1)}}return e(jA,"_resume"),client=OA,client}e(requireClient,"requireClient");var fixedQueue,hasRequiredFixedQueue;function requireFixedQueue(){var t;if(hasRequiredFixedQueue)return fixedQueue;hasRequiredFixedQueue=1;const A=2048,k=A-1,B=class B{constructor(){this.bottom=0,this.top=0,this.list=new Array(A),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&k)===this.bottom}push(R){this.list[this.top]=R,this.top=this.top+1&k}shift(){const R=this.list[this.bottom];return R===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&k,R)}};e(B,"FixedCircularBuffer");let c=B;return fixedQueue=(t=class{constructor(){this.head=this.tail=new c}isEmpty(){return this.head.isEmpty()}push(R){this.head.isFull()&&(this.head=this.head.next=new c),this.head.push(R)}shift(){const R=this.tail,F=R.shift();return R.isEmpty()&&R.next!==null&&(this.tail=R.next),F}},e(t,"FixedQueue"),t),fixedQueue}e(requireFixedQueue,"requireFixedQueue");var poolStats,hasRequiredPoolStats;function requirePoolStats(){if(hasRequiredPoolStats)return poolStats;hasRequiredPoolStats=1;const{kFree:A,kConnected:k,kPending:c,kQueued:B,kRunning:t,kSize:y}=requireSymbols$4(),R=Symbol("pool"),Q=class Q{constructor(U){this[R]=U}get
Line truncated
|
||||
${m.count} ${m.noun} ${m.is} pending:
|
||||
|
||||
${M.format(Y)}
|
||||
`.trim())}};e(_,"MockAgent");let V=_;return mockAgent=V,mockAgent}e(requireMockAgent,"requireMockAgent");var global,hasRequiredGlobal;function requireGlobal(){if(hasRequiredGlobal)return global;hasRequiredGlobal=1;const A=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:k}=requireErrors(),c=requireAgent();t()===void 0&&B(new c);function B(y){if(!y||typeof y.dispatch!="function")throw new k("Argument agent must implement Agent");Object.defineProperty(globalThis,A,{value:y,writable:!0,enumerable:!1,configurable:!1})}e(B,"setGlobalDispatcher");function t(){return globalThis[A]}return e(t,"getGlobalDispatcher"),global={setGlobalDispatcher:B,getGlobalDispatcher:t},global}e(requireGlobal,"requireGlobal");var decoratorHandler,hasRequiredDecoratorHandler;function requireDecoratorHandler(){var A,k;return hasRequiredDecoratorHandler||(hasRequiredDecoratorHandler=1,decoratorHandler=(k=class{constructor(B){SA(this,A);if(typeof B!="object"||B===null)throw new TypeError("handler must be an object");mA(this,A,B)}onConnect(...B){return Z(this,A).onConnect?.(...B)}onError(...B){return Z(this,A).onError?.(...B)}onUpgrade(...B){return Z(this,A).onUpgrade?.(...B)}onResponseStarted(...B){return Z(this,A).onResponseStarted?.(...B)}onHeaders(...B){return Z(this,A).onHeaders?.(...B)}onData(...B){return Z(this,A).onData?.(...B)}onComplete(...B){return Z(this,A).onComplete?.(...B)}onBodySent(...B){return Z(this,A).onBodySent?.(...B)}},A=new WeakMap,e(k,"DecoratorHandler"),k)),decoratorHandler}e(requireDecoratorHandler,"requireDecoratorHandler");var redirect,hasRequiredRedirect;function requireRedirect(){if(hasRequiredRedirect)return redirect;hasRequiredRedirect=1;const A=requireRedirectHandler();return redirect=e(k=>{const c=k?.maxRedirections;return B=>e(function(y,R){const{maxRedirections:F=c,...Q}=y;if(!F)return B(y,R);const D=new A(B,F,y,R);return B(Q,D)},"redirectInterceptor")},"redirect"),redirect}e(requireRedirect,"requireRedirect");var retry,hasRequiredRetry;function requireRetry(){if(hasRequiredRetry)return retry;hasRequiredRetry=1;const A=requireRetryHandler();return retry=e(k=>c=>e(function(t,y){return c(t,new A({...t,retryOptions:{...k,...t.retryOptions}},{handler:y,dispatch:c}))},"retryInterceptor"),"retry"),retry}e(requireRetry,"requireRetry");var dump,hasRequiredDump;function requireDump(){var R,F,Q,D,U,r,o,N,xe;if(hasRequiredDump)return dump;hasRequiredDump=1;const A=requireUtil$7(),{InvalidArgumentError:k,RequestAbortedError:c}=requireErrors(),B=requireDecoratorHandler(),I=class I extends B{constructor({maxSize:G},J){super(J);SA(this,N);SA(this,R,1024*1024);SA(this,F,null);SA(this,Q,!1);SA(this,D,!1);SA(this,U,0);SA(this,r,null);SA(this,o,null);if(G!=null&&(!Number.isFinite(G)||G<1))throw new k("maxSize must be a number greater than 0");mA(this,R,G??Z(this,R)),mA(this,o,J)}onConnect(G){mA(this,F,G),Z(this,o).onConnect(ee(this,N,xe).bind(this))}onHeaders(G,J,V,_){const M=A.parseHeaders(J)["content-length"];if(M!=null&&M>Z(this,R))throw new c(`Response size (${M}) larger than maxSize (${Z(this,R)})`);return Z(this,D)?!0:Z(this,o).onHeaders(G,J,V,_)}onError(G){Z(this,Q)||(G=Z(this,r)??G,Z(this,o).onError(G))}onData(G){return mA(this,U,Z(this,U)+G.length),Z(this,U)>=Z(this,R)&&(mA(this,Q,!0),Z(this,D)?Z(this,o).onError(Z(this,r)):Z(this,o).onComplete([])),!0}onComplete(G){if(!Z(this,Q)){if(Z(this,D)){Z(this,o).onError(this.reason);return}Z(this,o).onComplete(G)}}};R=new WeakMap,F=new WeakMap,Q=new WeakMap,D=new WeakMap,U=new WeakMap,r=new WeakMap,o=new WeakMap,N=new WeakSet,xe=e(function(G){mA(this,D,!0),mA(this,r,G)},"#customAbort"),e(I,"DumpHandler");let t=I;function y({maxSize:p}={maxSize:1024*1024}){return b=>e(function(J,V){const{dumpMaxSize:_=p}=J,q=new t({maxSize:_},V);return b(J,q)},"Intercept")}return e(y,"createDumpInterceptor"),dump=y,dump}e(requireDump,"requireDump");var dns,hasRequiredDns;function requireDns(){var Q,D,U,r,We,qe,I,p,b,G,J;if(hasRequiredDns)return dns;hasRequiredDns=1;const{isIP:A}=require$$0__default$2,{lookup:k}=require$$1__default$3,c=requireDecoratorHandler(),{InvalidArgumentError:B,InformationalError:t}=requireErrors(),y=Math.pow(2,31)-1,l=class l{constructor(q){SA(this,r);SA(this,Q,0);SA(this,D,0);SA(this,U,new Map);$A(this,"dualStack",!0);$A(this,"affinity",null);$A(this,"lookup",null);$A(this,"pick",null);mA(this,Q,q.maxTTL),mA(this,D,q.maxItems),this.dualStack=q.dualStack,this.affinity=q.affinity,this.lookup=q.lookup??ee(this,r,We),this.pick=q.pick??ee(this,r,qe)}get full(){return Z(this,U).size===Z(this,D)}runLookup(q,M,Y){const m=Z(this,U).get(q.hostname);if(m==null&&this.full){Y(null,q.origin);return}const f={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...M.dns,maxTTL:Z(this,Q),maxItems:Z(this,D)};if(m==null)this.lookup(q,f,(n,C)=>{if(n||C==null||C.length===0){Y(n??new t("No DNS entries found"));return}this.setRecords(q,C);const w=Z(this,U).get(q.hostname),S=this.pick(q,w,f.affinity);let x;typeof S.port=="number"?x=`:${S.port}`:q
Line truncated
|
||||
${p}`;break;case"retry":k(p)&&(N[I]=p);break;case"id":c(p)&&(N[I]=p);break;case"event":p.length>0&&(N[I]=p);break}}processEvent(o){o.retry&&k(o.retry)&&(this.state.reconnectionTime=parseInt(o.retry,10)),o.id&&c(o.id)&&(this.state.lastEventId=o.id),o.data!==void 0&&this.push({type:o.event||"message",options:{data:o.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};e(D,"EventSourceStream");let Q=D;return eventsourceStream={EventSourceStream:Q},eventsourceStream}e(requireEventsourceStream,"requireEventsourceStream");var eventsource,hasRequiredEventsource;function requireEventsource(){var V,_,q,M,Y,m,f,n,C,Ue,Me;if(hasRequiredEventsource)return eventsource;hasRequiredEventsource=1;const{pipeline:A}=Stream__default,{fetching:k}=requireFetch(),{makeRequest:c}=requireRequest(),{webidl:B}=requireWebidl(),{EventSourceStream:t}=requireEventsourceStream(),{parseMIMEType:y}=requireDataUrl(),{createFastMessageEvent:R}=requireEvents(),{isNetworkError:F}=requireResponse(),{delay:Q}=requireUtil(),{kEnumerableProperty:D}=requireUtil$7(),{environmentSettingsObject:U}=requireUtil$6();let r=!1;const o=3e3,N=0,l=1,I=2,p="anonymous",b="use-credentials",x=class x extends EventTarget{constructor(K,nA={}){super();SA(this,C);SA(this,V,{open:null,error:null,message:null});SA(this,_,null);SA(this,q,!1);SA(this,M,N);SA(this,Y,null);SA(this,m,null);SA(this,f);SA(this,n);B.util.markAsUncloneable(this);const iA="EventSource constructor";B.argumentLengthCheck(arguments,1,iA),r||(r=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),K=B.converters.USVString(K,iA,"url"),nA=B.converters.EventSourceInitDict(nA,iA,"eventSourceInitDict"),mA(this,f,nA.dispatcher),mA(this,n,{lastEventId:"",reconnectionTime:o});const uA=U;let RA;try{RA=new URL(K,uA.settingsObject.baseUrl),Z(this,n).origin=RA.origin}catch(pA){throw new DOMException(pA,"SyntaxError")}mA(this,_,RA.href);let IA=p;nA.withCredentials&&(IA=b,mA(this,q,!0));const CA={redirect:"follow",keepalive:!0,mode:"cors",credentials:IA==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};CA.client=U.settingsObject,CA.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],CA.cache="no-store",CA.initiator="other",CA.urlList=[new URL(Z(this,_))],mA(this,Y,c(CA)),ee(this,C,Ue).call(this)}get readyState(){return Z(this,M)}get url(){return Z(this,_)}get withCredentials(){return Z(this,q)}close(){B.brandCheck(this,x),Z(this,M)!==I&&(mA(this,M,I),Z(this,m).abort(),mA(this,Y,null))}get onopen(){return Z(this,V).open}set onopen(K){Z(this,V).open&&this.removeEventListener("open",Z(this,V).open),typeof K=="function"?(Z(this,V).open=K,this.addEventListener("open",K)):Z(this,V).open=null}get onmessage(){return Z(this,V).message}set onmessage(K){Z(this,V).message&&this.removeEventListener("message",Z(this,V).message),typeof K=="function"?(Z(this,V).message=K,this.addEventListener("message",K)):Z(this,V).message=null}get onerror(){return Z(this,V).error}set onerror(K){Z(this,V).error&&this.removeEventListener("error",Z(this,V).error),typeof K=="function"?(Z(this,V).error=K,this.addEventListener("error",K)):Z(this,V).error=null}};V=new WeakMap,_=new WeakMap,q=new WeakMap,M=new WeakMap,Y=new WeakMap,m=new WeakMap,f=new WeakMap,n=new WeakMap,C=new WeakSet,Ue=e(function(){if(Z(this,M)===I)return;mA(this,M,N);const K={request:Z(this,Y),dispatcher:Z(this,f)},nA=e(iA=>{F(iA)&&(this.dispatchEvent(new Event("error")),this.close()),ee(this,C,Me).call(this)},"processEventSourceEndOfBody");K.processResponseEndOfBody=nA,K.processResponse=iA=>{if(F(iA))if(iA.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{ee(this,C,Me).call(this);return}const uA=iA.headersList.get("content-type",!0),RA=uA!==null?y(uA):"failure",IA=RA!=="failure"&&RA.essence==="text/event-stream";if(iA.status!==200||IA===!1){this.close(),this.dispatchEvent(new Event("error"));return}mA(this,M,l),this.dispatchEvent(new Event("open")),Z(this,n).origin=iA.urlList[iA.urlList.length-1].origin;const CA=new t({eventSourceSettings:Z(this,n),push:e(pA=>{this.dispatchEvent(R(pA.type,pA.options))},"push")});A(iA.body.stream,CA,pA=>{pA?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},mA(this,m,k(K))},"#connect"),Me=e(async function(){Z(this,M)!==I&&(mA(this,M,N),this.dispatchEvent(new Event("error")),await Q(Z(this,n).reconnectionTime),Z(this,M)===N&&(Z(this,n).lastEventId.length&&Z(this,Y).headersList.set("last-event-id",Z(this,n).lastEventId,!0),ee(this,C,Ue).call(this)))},"#reconnect"),e(x,"EventSource");let G=x;const J={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:N,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:l,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:I,writable:!1}};return Object.defineProperties(G,J),Object.defineProperties(G.prototype,J),Object.defineProperties(G.prototype,{close:D
Line truncated
|
||||
`).some(l=>l.indexOf("(https.js:")!==-1||l.indexOf("node:https:")!==-1)}incrementSockets(o){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[o]||(this.sockets[o]=[]);const N=new y.Socket({writable:!1});return this.sockets[o].push(N),this.totalSocketCount++,N}decrementSockets(o,N){if(!this.sockets[o]||N===null)return;const l=this.sockets[o],I=l.indexOf(N);I!==-1&&(l.splice(I,1),this.totalSocketCount--,l.length===0&&delete this.sockets[o])}getName(o){return this.isSecureEndpoint(o)?F.Agent.prototype.getName.call(this,o):super.getName(o)}createSocket(o,N,l){const I={...N,secureEndpoint:this.isSecureEndpoint(N)},p=this.getName(I),b=this.incrementSockets(p);Promise.resolve().then(()=>this.connect(o,I)).then(G=>{if(this.decrementSockets(p,b),G instanceof R.Agent)try{return G.addRequest(o,I)}catch(J){return l(J)}this[Q].currentSocket=G,super.createSocket(o,N,l)},G=>{this.decrementSockets(p,b),l(G)})}createConnection(){const o=this[Q].currentSocket;if(this[Q].currentSocket=void 0,!o)throw new Error("No socket was returned in the `connect()` function");return o}get defaultPort(){return this[Q].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(o){this[Q]&&(this[Q].defaultPort=o)}get protocol(){return this[Q].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(o){this[Q]&&(this[Q].protocol=o)}};e(U,"Agent");let D=U;A.Agent=D}(dist$2)),dist$2}e(requireDist$2,"requireDist$2");var distExports$2=requireDist$2(),dist$1={},src={exports:{}},browser={exports:{}},ms,hasRequiredMs;function requireMs(){if(hasRequiredMs)return ms;hasRequiredMs=1;var A=1e3,k=A*60,c=k*60,B=c*24,t=B*7,y=B*365.25;ms=e(function(U,r){r=r||{};var o=typeof U;if(o==="string"&&U.length>0)return R(U);if(o==="number"&&isFinite(U))return r.long?Q(U):F(U);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(U))},"ms");function R(U){if(U=String(U),!(U.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(U);if(r){var o=parseFloat(r[1]),N=(r[2]||"ms").toLowerCase();switch(N){case"years":case"year":case"yrs":case"yr":case"y":return o*y;case"weeks":case"week":case"w":return o*t;case"days":case"day":case"d":return o*B;case"hours":case"hour":case"hrs":case"hr":case"h":return o*c;case"minutes":case"minute":case"mins":case"min":case"m":return o*k;case"seconds":case"second":case"secs":case"sec":case"s":return o*A;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}e(R,"parse");function F(U){var r=Math.abs(U);return r>=B?Math.round(U/B)+"d":r>=c?Math.round(U/c)+"h":r>=k?Math.round(U/k)+"m":r>=A?Math.round(U/A)+"s":U+"ms"}e(F,"fmtShort");function Q(U){var r=Math.abs(U);return r>=B?D(U,r,B,"day"):r>=c?D(U,r,c,"hour"):r>=k?D(U,r,k,"minute"):r>=A?D(U,r,A,"second"):U+" ms"}e(Q,"fmtLong");function D(U,r,o,N){var l=r>=o*1.5;return Math.round(U/o)+" "+N+(l?"s":"")}return e(D,"plural"),ms}e(requireMs,"requireMs");var common,hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;function A(k){B.debug=B,B.default=B,B.coerce=D,B.disable=F,B.enable=y,B.enabled=Q,B.humanize=requireMs(),B.destroy=U,Object.keys(k).forEach(r=>{B[r]=k[r]}),B.names=[],B.skips=[],B.formatters={};function c(r){let o=0;for(let N=0;N<r.length;N++)o=(o<<5)-o+r.charCodeAt(N),o|=0;return B.colors[Math.abs(o)%B.colors.length]}e(c,"selectColor"),B.selectColor=c;function B(r){let o,N=null,l,I;function p(...b){if(!p.enabled)return;const G=p,J=Number(new Date),V=J-(o||J);G.diff=V,G.prev=o,G.curr=J,o=J,b[0]=B.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let _=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(M,Y)=>{if(M==="%%")return"%";_++;const m=B.formatters[Y];if(typeof m=="function"){const f=b[_];M=m.call(G,f),b.splice(_,1),_--}return M}),B.formatArgs.call(G,b),(G.log||B.log).apply(G,b)}return e(p,"debug"),p.namespace=r,p.useColors=B.useColors(),p.color=B.selectColor(r),p.extend=t,p.destroy=B.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:e(()=>N!==null?N:(l!==B.namespaces&&(l=B.namespaces,I=B.enabled(r)),I),"get"),set:e(b=>{N=b},"set")}),typeof B.init=="function"&&B.init(p),p}e(B,"createDebug");function t(r,o){const N=B(this.namespace+(typeof o>"u"?":":o)+r);return N.log=this.log,N}e(t,"extend");function y(r){B.save(r),B.namespaces=r,B.names=[],B.skips=[];const o=(typeof r=="string"?r:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const N of o)N[0]==="-"?B.skips.push(N.slice(1)):B.names.push(N)}e(y,"enable");function R(r,o){let N=0,l=0,I=-1,p=0;for(;N<r.length;)if(l<o.length&&(o[l]===r[N]||o[l]==="*"))o[l]==="*"?(I=l,p=N,l++):(N++,l++);else if(I!==-1)l=I+1,p++,N=p;else return!1;for(;l<o.length&&o[l]==="*";)l++;return l===o.length}e(R,"matchesTemplate");function F(){const r=[...B.names,...B.skips.map(o=>"-"+o)].join(",");return B.enable(""),r}e(F,"disable");function Q(r){for(const o of B.skips)if(R(r,
Line truncated
|
||||
`).join(`
|
||||
`+b),o.push(p+"m+"+A.exports.humanize(this.diff)+"\x1B[0m")}else o[0]=R()+N+" "+o[0]}e(y,"formatArgs");function R(){return k.inspectOpts.hideDate?"":new Date().toISOString()+" "}e(R,"getDate");function F(...o){return process.stderr.write(B.formatWithOptions(k.inspectOpts,...o)+`
|
||||
`)}e(F,"log");function Q(o){o?process.env.DEBUG=o:delete process.env.DEBUG}e(Q,"save");function D(){return process.env.DEBUG}e(D,"load");function U(o){o.inspectOpts={};const N=Object.keys(k.inspectOpts);for(let l=0;l<N.length;l++)o.inspectOpts[N[l]]=k.inspectOpts[N[l]]}e(U,"init"),A.exports=requireCommon()(k);const{formatters:r}=A.exports;r.o=function(o){return this.inspectOpts.colors=this.useColors,B.inspect(o,this.inspectOpts).split(`
|
||||
`).map(N=>N.trim()).join(" ")},r.O=function(o){return this.inspectOpts.colors=this.useColors,B.inspect(o,this.inspectOpts)}}(node,node.exports)),node.exports}e(requireNode,"requireNode");var hasRequiredSrc;function requireSrc(){return hasRequiredSrc||(hasRequiredSrc=1,typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?src.exports=requireBrowser():src.exports=requireNode()),src.exports}e(requireSrc,"requireSrc");var hasRequiredDist$1;function requireDist$1(){if(hasRequiredDist$1)return dist$1;hasRequiredDist$1=1;var A=dist$1&&dist$1.__createBinding||(Object.create?function(l,I,p,b){b===void 0&&(b=p);var G=Object.getOwnPropertyDescriptor(I,p);(!G||("get"in G?!I.__esModule:G.writable||G.configurable))&&(G={enumerable:!0,get:e(function(){return I[p]},"get")}),Object.defineProperty(l,b,G)}:function(l,I,p,b){b===void 0&&(b=p),l[b]=I[p]}),k=dist$1&&dist$1.__setModuleDefault||(Object.create?function(l,I){Object.defineProperty(l,"default",{enumerable:!0,value:I})}:function(l,I){l.default=I}),c=dist$1&&dist$1.__importStar||function(l){if(l&&l.__esModule)return l;var I={};if(l!=null)for(var p in l)p!=="default"&&Object.prototype.hasOwnProperty.call(l,p)&&A(I,l,p);return k(I,l),I},B=dist$1&&dist$1.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(dist$1,"__esModule",{value:!0}),dist$1.HttpProxyAgent=void 0;const t=c(require$$0__default$6),y=c(require$$1__default$7),R=B(requireSrc()),F=require$$3__default,Q=requireDist$2(),D=require$$5__default$4,U=(0,R.default)("http-proxy-agent"),N=class N extends Q.Agent{constructor(I,p){super(p),this.proxy=typeof I=="string"?new D.URL(I):I,this.proxyHeaders=p?.headers??{},U("Creating new HttpProxyAgent instance: %o",this.proxy.href);const b=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),G=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...p?o(p,"headers"):null,host:b,port:G}}addRequest(I,p){I._header=null,this.setRequestProps(I,p),super.addRequest(I,p)}setRequestProps(I,p){const{proxy:b}=this,G=p.secureEndpoint?"https:":"http:",J=I.getHeader("host")||"localhost",V=`${G}//${J}`,_=new D.URL(I.path,V);p.port!==80&&(_.port=String(p.port)),I.path=String(_);const q=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(b.username||b.password){const M=`${decodeURIComponent(b.username)}:${decodeURIComponent(b.password)}`;q["Proxy-Authorization"]=`Basic ${Buffer.from(M).toString("base64")}`}q["Proxy-Connection"]||(q["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const M of Object.keys(q)){const Y=q[M];Y&&I.setHeader(M,Y)}}async connect(I,p){I._header=null,I.path.includes("://")||this.setRequestProps(I,p);let b,G;U("Regenerating stored HTTP header string for request"),I._implicitHeader(),I.outputData&&I.outputData.length>0&&(U("Patching connection write() output buffer with updated header"),b=I.outputData[0].data,G=b.indexOf(`\r
|
||||
\r
|
||||
`)+4,I.outputData[0].data=I._header+b.substring(G),U("Output buffer: %o",I.outputData[0].data));let J;return this.proxy.protocol==="https:"?(U("Creating `tls.Socket`: %o",this.connectOpts),J=y.connect(this.connectOpts)):(U("Creating `net.Socket`: %o",this.connectOpts),J=t.connect(this.connectOpts)),await(0,F.once)(J,"connect"),J}};e(N,"HttpProxyAgent");let r=N;r.protocols=["http","https"],dist$1.HttpProxyAgent=r;function o(l,...I){const p={};let b;for(b in l)I.includes(b)||(p[b]=l[b]);return p}return e(o,"omit"),dist$1}e(requireDist$1,"requireDist$1");var distExports$1=requireDist$1(),dist={},parseProxyResponse={},hasRequiredParseProxyResponse;function requireParseProxyResponse(){if(hasRequiredParseProxyResponse)return parseProxyResponse;hasRequiredParseProxyResponse=1;var A=parseProxyResponse&&parseProxyResponse.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(parseProxyResponse,"__esModule",{value:!0}),parseProxyResponse.parseProxyResponse=void 0;const c=(0,A(requireSrc()).default)("https-proxy-agent:parse-proxy-response");function B(t){return new Promise((y,R)=>{let F=0;const Q=[];function D(){const l=t.read();l?N(l):t.once("readable",D)}e(D,"read");function U(){t.removeListener("end",r),t.removeListener("error",o),t.removeListener("readable",D)}e(U,"cleanup");function r(){U(),c("onend"),R(new Error("Proxy connection ended before receiving CONNECT response"))}e(r,"onend");function o(l){U(),c("onerror %o",l),R(l)}e(o,"onerror");function N(l){Q.push(l),F+=l.length;const I=Buffer.concat(Q,F),p=I.indexOf(`\r
|
||||
\r
|
||||
`);if(p===-1){c("have not received end of HTTP headers yet..."),D();return}const b=I.slice(0,p).toString("ascii").split(`\r
|
||||
`),G=b.shift();if(!G)return t.destroy(),R(new Error("No header received from proxy CONNECT response"));const J=G.split(" "),V=+J[1],_=J.slice(2).join(" "),q={};for(const M of b){if(!M)continue;const Y=M.indexOf(":");if(Y===-1)return t.destroy(),R(new Error(`Invalid header from proxy CONNECT response: "${M}"`));const m=M.slice(0,Y).toLowerCase(),f=M.slice(Y+1).trimStart(),n=q[m];typeof n=="string"?q[m]=[n,f]:Array.isArray(n)?n.push(f):q[m]=f}c("got proxy server response: %o %o",G,q),U(),y({connect:{statusCode:V,statusText:_,headers:q},buffered:I})}e(N,"ondata"),t.on("error",o),t.on("end",r),D()})}return e(B,"parseProxyResponse$1"),parseProxyResponse.parseProxyResponse=B,parseProxyResponse}e(requireParseProxyResponse,"requireParseProxyResponse");var hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1;var A=dist&&dist.__createBinding||(Object.create?function(b,G,J,V){V===void 0&&(V=J);var _=Object.getOwnPropertyDescriptor(G,J);(!_||("get"in _?!G.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:e(function(){return G[J]},"get")}),Object.defineProperty(b,V,_)}:function(b,G,J,V){V===void 0&&(V=J),b[V]=G[J]}),k=dist&&dist.__setModuleDefault||(Object.create?function(b,G){Object.defineProperty(b,"default",{enumerable:!0,value:G})}:function(b,G){b.default=G}),c=dist&&dist.__importStar||function(b){if(b&&b.__esModule)return b;var G={};if(b!=null)for(var J in b)J!=="default"&&Object.prototype.hasOwnProperty.call(b,J)&&A(G,b,J);return k(G,b),G},B=dist&&dist.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(dist,"__esModule",{value:!0}),dist.HttpsProxyAgent=void 0;const t=c(require$$0__default$6),y=c(require$$1__default$7),R=B(require$$2__default),F=B(requireSrc()),Q=requireDist$2(),D=require$$5__default$4,U=requireParseProxyResponse(),r=(0,F.default)("https-proxy-agent"),o=e(b=>b.servername===void 0&&b.host&&!t.isIP(b.host)?{...b,servername:b.host}:b,"setServernameFromNonIpHost"),p=class p extends Q.Agent{constructor(G,J){super(J),this.options={path:void 0},this.proxy=typeof G=="string"?new D.URL(G):G,this.proxyHeaders=J?.headers??{},r("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const V=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),_=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...J?I(J,"headers"):null,host:V,port:_}}async connect(G,J){const{proxy:V}=this;if(!J.host)throw new TypeError('No "host" provided');let _;V.protocol==="https:"?(r("Creating `tls.Socket`: %o",this.connectOpts),_=y.connect(o(this.connectOpts))):(r("Creating `net.Socket`: %o",this.connectOpts),_=t.connect(this.connectOpts));const q=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},M=t.isIPv6(J.host)?`[${J.host}]`:J.host;let Y=`CONNECT ${M}:${J.port} HTTP/1.1\r
|
||||
`;if(V.username||V.password){const w=`${decodeURIComponent(V.username)}:${decodeURIComponent(V.password)}`;q["Proxy-Authorization"]=`Basic ${Buffer.from(w).toString("base64")}`}q.Host=`${M}:${J.port}`,q["Proxy-Connection"]||(q["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const w of Object.keys(q))Y+=`${w}: ${q[w]}\r
|
||||
`;const m=(0,U.parseProxyResponse)(_);_.write(`${Y}\r
|
||||
`);const{connect:f,buffered:n}=await m;if(G.emit("proxyConnect",f),this.emit("proxyConnect",f,G),f.statusCode===200)return G.once("socket",l),J.secureEndpoint?(r("Upgrading socket connection to TLS"),y.connect({...I(o(J),"host","path","port"),socket:_})):_;_.destroy();const C=new t.Socket({writable:!1});return C.readable=!0,G.once("socket",w=>{r("Replaying proxy buffer for failed request"),(0,R.default)(w.listenerCount("data")>0),w.push(n),w.push(null)}),C}};e(p,"HttpsProxyAgent");let N=p;N.protocols=["http","https"],dist.HttpsProxyAgent=N;function l(b){b.resume()}e(l,"resume");function I(b,...G){const J={};let V;for(V in b)G.includes(V)||(J[V]=b[V]);return J}return e(I,"omit"),dist}e(requireDist,"requireDist");var distExports=requireDist(),d=Object.defineProperty,O=e((A,k,c)=>k in A?d(A,k,{enumerable:!0,configurable:!0,writable:!0,value:c}):A[k]=c,"O"),s=e((A,k)=>d(A,"name",{value:k,configurable:!0}),"s"),i=e((A,k,c)=>O(A,typeof k!="symbol"?k+"":k,c),"i");function H(...A){process.env.DEBUG&&console.debug("[node-fetch-native] [proxy]",...A)}e(H,"H"),s(H,"debug");function P(A,k){if(!k)return!1;for(const c of k)if(c===A||c[0]==="."&&A.endsWith(c.slice(1)))return!0;return!1}e(P,"P"),s(P,"bypassProxy");const g=(fe=class extends undiciExports.ProxyAgent{constructor(k){super(k),this._options=k,i(this,"_agent"),this._agent=new undiciExports.Agent}dispatch(k,c){const B=new require$$1$1.URL(k.origin).hostname;return P(B,this._options.noProxy)?(H(`Bypassing proxy for: ${B}`),this._agent.dispatch(k,c)):super.dispatch(k,c)}},e(fe,"g"),fe);s(g,"UndiciProxyAgent");let h=g;const T=["http","https"],E={http:[distExports$1.HttpProxyAgent,distExports.HttpsProxyAgent],https:[distExports$1.HttpProxyAgent,distExports.HttpsProxyAgent]};function L(A){return T.includes(A)}e(L,"L"),s(L,"isValidProtocol");const u=(de=class extends distExports$2.Agent{constructor(k){super({}),this._options=k,i(this,"cache",new Map),i(this,"httpAgent"),i(this,"httpsAgent"),this.httpAgent=new http__namespace.Agent({}),this.httpsAgent=new https__namespace.Agent({})}connect(k,c){const B=k.getHeader("upgrade")==="websocket",t=c.secureEndpoint?B?"wss:":"https:":B?"ws:":"http:",y=k.getHeader("host");if(P(y,this._options.noProxy))return c.secureEndpoint?this.httpsAgent:this.httpAgent;const R=`${t}+${this._options.uri}`;let F=this.cache.get(R);if(!F){const Q=new require$$1$1.URL(this._options.uri).protocol.replace(":","");if(!L(Q))throw new Error(`Unsupported protocol for proxy URL: ${this._options.uri}`);const D=E[Q][c.secureEndpoint||B?1:0];F=new D(this._options.uri,this._options),this.cache.set(R,F)}return F}destroy(){for(const k of this.cache.values())k.destroy();super.destroy()}},e(de,"u"),de);s(u,"NodeProxyAgent");let a=u;function createProxy(A={}){const k=A.url||process.env.https_proxy||process.env.http_proxy||process.env.HTTPS_PROXY||process.env.HTTP_PROXY;if(!k)return{agent:void 0,dispatcher:void 0};const c=A.noProxy||process.env.no_proxy||process.env.NO_PROXY,B=typeof c=="string"?c.split(","):c,t=new a({uri:k,noProxy:B}),y=new h({uri:k,noProxy:B});return{agent:t,dispatcher:y}}e(createProxy,"createProxy"),s(createProxy,"createProxy");function createFetch(A={}){const k=createProxy(A);return(c,B)=>nodeFetchNative.fetch(c,{...k,...B})}e(createFetch,"createFetch"),s(createFetch,"createFetch");const fetch=createFetch({});exports.createFetch=createFetch,exports.createProxy=createProxy,exports.fetch=fetch;
|
||||
+1
@@ -0,0 +1 @@
|
||||
var t=Object.defineProperty;var o=(e,l)=>t(e,"name",{value:l,configurable:!0});var n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}o(f,"getDefaultExportFromCjs");export{n as c,f as g};
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";var l=Object.defineProperty;var o=(e,t)=>l(e,"name",{value:t,configurable:!0});var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}o(getDefaultExportFromCjs,"getDefaultExportFromCjs"),exports.commonjsGlobal=commonjsGlobal,exports.getDefaultExportFromCjs=getDefaultExportFromCjs;
|
||||
Reference in new issue
Block a user