setup-cpp/dist/modern/assets/proxy-agent-B1EMpsi8.mjs

3 lines
270 KiB
JavaScript
Raw Normal View History

2024-10-26 08:27:56 +08:00
function A(A,Q){for(var E=0;Q.length>E;E++){const B=Q[E];if("string"!=typeof B&&!Array.isArray(B))for(const Q in B)if("default"!==Q&&!(Q in A)){const E=Object.getOwnPropertyDescriptor(B,Q);E&&Object.defineProperty(A,Q,E.get?E:{enumerable:!0,get:()=>B[Q]})}}return Object.freeze(Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}))}function Q(A){return A&&"object"==typeof A&&"function"==typeof A.pipe&&"function"==typeof A.on}function E(A){return kQ&&A instanceof kQ||A&&"object"==typeof A&&("function"==typeof A.stream||"function"==typeof A.arrayBuffer)&&/^(Blob|File)$/.test(A[Symbol.toStringTag])}function B(A){if("string"==typeof A){if(A=new URL(A),!/^https?:/.test(A.origin||A.protocol))throw new yQ("Invalid URL protocol: the URL must start with `http:` or `https:`.");return A}if(!A||"object"!=typeof A)throw new yQ("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(A.origin||A.protocol))throw new yQ("Invalid URL protocol: the URL must start with `http:` or `https:`.");if(!(A instanceof URL)){if(null!=A.port&&""!==A.port&&!Number.isFinite(parseInt(A.port)))throw new yQ("Invalid URL: port must be a valid integer or a string representation of an integer.");if(null!=A.path&&"string"!=typeof A.path)throw new yQ("Invalid URL path: the path must be a string or null/undefined.");if(null!=A.pathname&&"string"!=typeof A.pathname)throw new yQ("Invalid URL pathname: the pathname must be a string or null/undefined.");if(null!=A.hostname&&"string"!=typeof A.hostname)throw new yQ("Invalid URL hostname: the hostname must be a string or null/undefined.");if(null!=A.origin&&"string"!=typeof A.origin)throw new yQ("Invalid URL origin: the origin must be a string or null/undefined.");let Q=null!=A.origin?A.origin:`${A.protocol}//${A.hostname}:${null!=A.port?A.port:"https:"===A.protocol?443:80}`,E=null!=A.path?A.path:`${A.pathname||""}${A.search||""}`;Q.endsWith("/")&&(Q=Q.substring(0,Q.length-1)),E&&!E.startsWith("/")&&(E="/"+E),A=new URL(Q+E)}return A}function g(A){return!A||!(!A.destroyed&&!A[FQ])}function I(A){const Q=A&&A._readableState;return g(A)&&Q&&!Q.endEmitted}function C(A){return A instanceof Uint8Array||Buffer.isBuffer(A)}function e(){HQ=Date.now();let A=VQ.length,Q=0;for(;A>Q;){const E=VQ[Q];0===E.state?E.state=HQ+E.delay:E.state>0&&HQ>=E.state&&(E.state=-1,E.callback(E.opaque)),-1===E.state?(E.state=-2,Q!==A-1?VQ[Q]=VQ.pop():VQ.pop(),A-=1):Q+=1}VQ.length>0&&t()}function t(){mQ&&mQ.refresh?mQ.refresh():(clearTimeout(mQ),mQ=setTimeout(e,1e3),mQ.unref&&mQ.unref())}function i(){function A(A){if("string"==typeof A&&(A=Buffer.from(A)),!Buffer.isBuffer(A))throw new TypeError("The needle has to be a String or a Buffer.");const Q=A.length;if(0===Q)throw Error("The needle cannot be an empty String/Buffer.");if(Q>256)throw Error("The needle cannot have a length bigger than 256.");this.maxMatches=1/0,this.matches=0,this._occ=Array(256).fill(Q),this._lookbehind_size=0,this._needle=A,this._bufpos=0,this._lookbehind=Buffer.alloc(Q);for(var E=0;Q-1>E;++E)this._occ[A[E]]=Q-1-E}return xQ?WQ:(xQ=1,(0,CA.inherits)(A,eA.EventEmitter),A.prototype.reset=function(){this._lookbehind_size=0,this.matches=0,this._bufpos=0},A.prototype.push=function(A,Q){Buffer.isBuffer(A)||(A=Buffer.from(A,"binary"));const E=A.length;let B;for(this._bufpos=Q||0;B!==E&&this.maxMatches>this.matches;)B=this._sbmh_feed(A);return B},A.prototype._sbmh_feed=function(A){const Q=A.length,E=this._needle,B=E.length,g=E[B-1];let I,C=-this._lookbehind_size;if(0>C){for(;0>C&&Q-B>=C;){if(I=this._sbmh_lookup_char(A,C+B-1),I===g&&this._sbmh_memcmp(A,C,B-1))return this._lookbehind_size=0,++this.matches,this.emit("info",!0),this._bufpos=C+B;C+=this._occ[I]}if(0>C)for(;0>C&&!this._sbmh_memcmp(A,C,Q-C);)++C;if(0>C){const E=this._lookbehind_size+C;return E>0&&this.emit("info",!1,this._lookbehind,0,E),this._lookbehind.copy(this._lookbehind,0,E,this._lookbehind_size-E),this._lookbehind_size-=E,A.copy(this._lookbehind,this._lookbehind_size),this._lookbehind_size+=Q,this._bufpos=Q,Q}this.emit("info",!1,this._lookbehind,0,this._lookbehind_size),this._lookbehind_si
//# sourceMappingURL=proxy-agent-B1EMpsi8.mjs.map