UNPKG

chaite

Version:

core for chatgpt-plugin and karin-plugin-chatgpt

1,406 lines (1,367 loc) 205 kB
import { i as __require, r as __export, s as __toESM, t as __commonJS } from "../../rolldown-runtime-DVriDoez.mjs"; import { n as require_mime_types } from "../accepts/index.mjs-CtXuJELB.mjs"; import { t as require_asynckit } from "../asynckit/index.mjs-DShOwGhP.mjs"; import { i as require_ms } from "../@anthropic-ai/sdk/index.mjs-sKjldQtK.mjs"; import stream, { Readable } from "stream"; import { EventEmitter } from "events"; import util from "util"; import url from "url"; import http from "http"; import https from "https"; import crypto from "crypto"; import zlib from "zlib"; //#region node_modules/.pnpm/axios@1.8.3/node_modules/axios/lib/helpers/bind.js function bind(fn, thisArg) { return function wrap$1() { return fn.apply(thisArg, arguments); }; } //#endregion //#region node_modules/.pnpm/axios@1.8.3/node_modules/axios/lib/utils.js const { toString } = Object.prototype; const { getPrototypeOf } = Object; const kindOf = ((cache) => (thing) => { const str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(Object.create(null)); const kindOfTest = (type) => { type = type.toLowerCase(); return (thing) => kindOf(thing) === type; }; const typeOfTest = (type) => (thing) => typeof thing === type; /** * Determine if a value is an Array * * @param {Object} val The value to test * * @returns {boolean} True if value is an Array, otherwise false */ const { isArray } = Array; /** * Determine if a value is undefined * * @param {*} val The value to test * * @returns {boolean} True if the value is undefined, otherwise false */ const isUndefined = typeOfTest("undefined"); /** * Determine if a value is a Buffer * * @param {*} val The value to test * * @returns {boolean} True if value is a Buffer, otherwise false */ function isBuffer$1(val) { return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val); } /** * Determine if a value is an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ const isArrayBuffer = kindOfTest("ArrayBuffer"); /** * Determine if a value is a view on an ArrayBuffer * * @param {*} val The value to test * * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { let result; if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) result = ArrayBuffer.isView(val); else result = val && val.buffer && isArrayBuffer(val.buffer); return result; } /** * Determine if a value is a String * * @param {*} val The value to test * * @returns {boolean} True if value is a String, otherwise false */ const isString$1 = typeOfTest("string"); /** * Determine if a value is a Function * * @param {*} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ const isFunction$1 = typeOfTest("function"); /** * Determine if a value is a Number * * @param {*} val The value to test * * @returns {boolean} True if value is a Number, otherwise false */ const isNumber = typeOfTest("number"); /** * Determine if a value is an Object * * @param {*} thing The value to test * * @returns {boolean} True if value is an Object, otherwise false */ const isObject = (thing) => thing !== null && typeof thing === "object"; /** * Determine if a value is a Boolean * * @param {*} thing The value to test * @returns {boolean} True if value is a Boolean, otherwise false */ const isBoolean = (thing) => thing === true || thing === false; /** * Determine if a value is a plain Object * * @param {*} val The value to test * * @returns {boolean} True if value is a plain Object, otherwise false */ const isPlainObject = (val) => { if (kindOf(val) !== "object") return false; const prototype$2 = getPrototypeOf(val); return (prototype$2 === null || prototype$2 === Object.prototype || Object.getPrototypeOf(prototype$2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); }; /** * Determine if a value is a Date * * @param {*} val The value to test * * @returns {boolean} True if value is a Date, otherwise false */ const isDate = kindOfTest("Date"); /** * Determine if a value is a File * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ const isFile = kindOfTest("File"); /** * Determine if a value is a Blob * * @param {*} val The value to test * * @returns {boolean} True if value is a Blob, otherwise false */ const isBlob = kindOfTest("Blob"); /** * Determine if a value is a FileList * * @param {*} val The value to test * * @returns {boolean} True if value is a File, otherwise false */ const isFileList = kindOfTest("FileList"); /** * Determine if a value is a Stream * * @param {*} val The value to test * * @returns {boolean} True if value is a Stream, otherwise false */ const isStream = (val) => isObject(val) && isFunction$1(val.pipe); /** * Determine if a value is a FormData * * @param {*} thing The value to test * * @returns {boolean} True if value is an FormData, otherwise false */ const isFormData = (thing) => { let kind; return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]")); }; /** * Determine if a value is a URLSearchParams object * * @param {*} val The value to test * * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ const isURLSearchParams = kindOfTest("URLSearchParams"); const [isReadableStream, isRequest, isResponse, isHeaders] = [ "ReadableStream", "Request", "Response", "Headers" ].map(kindOfTest); /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * * @returns {String} The String freed of excess whitespace */ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item * * @param {Boolean} [allOwnKeys = false] * @returns {any} */ function forEach(obj, fn, { allOwnKeys = false } = {}) { if (obj === null || typeof obj === "undefined") return; let i; let l; if (typeof obj !== "object") obj = [obj]; if (isArray(obj)) for (i = 0, l = obj.length; i < l; i++) fn.call(null, obj[i], i, obj); else { const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); const len = keys.length; let key; for (i = 0; i < len; i++) { key = keys[i]; fn.call(null, obj[key], key, obj); } } } function findKey(obj, key) { key = key.toLowerCase(); const keys = Object.keys(obj); let i = keys.length; let _key; while (i-- > 0) { _key = keys[i]; if (key === _key.toLowerCase()) return _key; } return null; } const _global = (() => { if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; })(); const isContextDefined = (context) => !isUndefined(context) && context !== _global; /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * * @returns {Object} Result of all merge properties */ function merge() { const { caseless } = isContextDefined(this) && this || {}; const result = {}; const assignValue = (val, key) => { const targetKey = caseless && findKey(result, key) || key; if (isPlainObject(result[targetKey]) && isPlainObject(val)) result[targetKey] = merge(result[targetKey], val); else if (isPlainObject(val)) result[targetKey] = merge({}, val); else if (isArray(val)) result[targetKey] = val.slice(); else result[targetKey] = val; }; for (let i = 0, l = arguments.length; i < l; i++) arguments[i] && forEach(arguments[i], assignValue); return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * * @param {Boolean} [allOwnKeys] * @returns {Object} The resulting value of object a */ const extend = (a, b, thisArg, { allOwnKeys } = {}) => { forEach(b, (val, key) => { if (thisArg && isFunction$1(val)) a[key] = bind(val, thisArg); else a[key] = val; }, { allOwnKeys }); return a; }; /** * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) * * @param {string} content with BOM * * @returns {string} content value without BOM */ const stripBOM = (content) => { if (content.charCodeAt(0) === 65279) content = content.slice(1); return content; }; /** * Inherit the prototype methods from one constructor into another * @param {function} constructor * @param {function} superConstructor * @param {object} [props] * @param {object} [descriptors] * * @returns {void} */ const inherits = (constructor, superConstructor, props, descriptors$1) => { constructor.prototype = Object.create(superConstructor.prototype, descriptors$1); constructor.prototype.constructor = constructor; Object.defineProperty(constructor, "super", { value: superConstructor.prototype }); props && Object.assign(constructor.prototype, props); }; /** * Resolve object with deep prototype chain to a flat object * @param {Object} sourceObj source object * @param {Object} [destObj] * @param {Function|Boolean} [filter] * @param {Function} [propFilter] * * @returns {Object} */ const toFlatObject = (sourceObj, destObj, filter, propFilter) => { let props; let i; let prop; const merged = {}; destObj = destObj || {}; if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); i = props.length; while (i-- > 0) { prop = props[i]; if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { destObj[prop] = sourceObj[prop]; merged[prop] = true; } } sourceObj = filter !== false && getPrototypeOf(sourceObj); } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); return destObj; }; /** * Determines whether a string ends with the characters of a specified string * * @param {String} str * @param {String} searchString * @param {Number} [position= 0] * * @returns {boolean} */ const endsWith = (str, searchString, position) => { str = String(str); if (position === void 0 || position > str.length) position = str.length; position -= searchString.length; const lastIndex = str.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }; /** * Returns new array from array like object or null if failed * * @param {*} [thing] * * @returns {?Array} */ const toArray = (thing) => { if (!thing) return null; if (isArray(thing)) return thing; let i = thing.length; if (!isNumber(i)) return null; const arr = new Array(i); while (i-- > 0) arr[i] = thing[i]; return arr; }; /** * Checking if the Uint8Array exists and if it does, it returns a function that checks if the * thing passed in is an instance of Uint8Array * * @param {TypedArray} * * @returns {Array} */ const isTypedArray = ((TypedArray$1) => { return (thing) => { return TypedArray$1 && thing instanceof TypedArray$1; }; })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); /** * For each entry in the object, call the function with the key and value. * * @param {Object<any, any>} obj - The object to iterate over. * @param {Function} fn - The function to call for each entry. * * @returns {void} */ const forEachEntry = (obj, fn) => { const iterator = (obj && obj[Symbol.iterator]).call(obj); let result; while ((result = iterator.next()) && !result.done) { const pair = result.value; fn.call(obj, pair[0], pair[1]); } }; /** * It takes a regular expression and a string, and returns an array of all the matches * * @param {string} regExp - The regular expression to match against. * @param {string} str - The string to search. * * @returns {Array<boolean>} */ const matchAll = (regExp, str) => { let matches; const arr = []; while ((matches = regExp.exec(str)) !== null) arr.push(matches); return arr; }; const isHTMLForm = kindOfTest("HTMLFormElement"); const toCamelCase = (str) => { return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { return p1.toUpperCase() + p2; }); }; const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty$1 }) => (obj, prop) => hasOwnProperty$1.call(obj, prop))(Object.prototype); /** * Determine if a value is a RegExp object * * @param {*} val The value to test * * @returns {boolean} True if value is a RegExp object, otherwise false */ const isRegExp = kindOfTest("RegExp"); const reduceDescriptors = (obj, reducer) => { const descriptors$1 = Object.getOwnPropertyDescriptors(obj); const reducedDescriptors = {}; forEach(descriptors$1, (descriptor, name) => { let ret; if ((ret = reducer(descriptor, name, obj)) !== false) reducedDescriptors[name] = ret || descriptor; }); Object.defineProperties(obj, reducedDescriptors); }; /** * Makes all methods read-only * @param {Object} obj */ const freezeMethods = (obj) => { reduceDescriptors(obj, (descriptor, name) => { if (isFunction$1(obj) && [ "arguments", "caller", "callee" ].indexOf(name) !== -1) return false; const value = obj[name]; if (!isFunction$1(value)) return; descriptor.enumerable = false; if ("writable" in descriptor) { descriptor.writable = false; return; } if (!descriptor.set) descriptor.set = () => { throw Error("Can not rewrite read-only method '" + name + "'"); }; }); }; const toObjectSet = (arrayOrString, delimiter) => { const obj = {}; const define = (arr) => { arr.forEach((value) => { obj[value] = true; }); }; isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); return obj; }; const noop$1 = () => {}; const toFiniteNumber = (value, defaultValue) => { return value != null && Number.isFinite(value = +value) ? value : defaultValue; }; /** * If the thing is a FormData object, return true, otherwise return false. * * @param {unknown} thing - The thing to check. * * @returns {boolean} */ function isSpecCompliantForm(thing) { return !!(thing && isFunction$1(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]); } const toJSONObject = (obj) => { const stack = new Array(10); const visit = (source, i) => { if (isObject(source)) { if (stack.indexOf(source) >= 0) return; if (!("toJSON" in source)) { stack[i] = source; const target = isArray(source) ? [] : {}; forEach(source, (value, key) => { const reducedValue = visit(value, i + 1); !isUndefined(reducedValue) && (target[key] = reducedValue); }); stack[i] = void 0; return target; } } return source; }; return visit(obj, 0); }; const isAsyncFn = kindOfTest("AsyncFunction"); const isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch); const _setImmediate = ((setImmediateSupported, postMessageSupported) => { if (setImmediateSupported) return setImmediate; return postMessageSupported ? ((token, callbacks) => { _global.addEventListener("message", ({ source, data }) => { if (source === _global && data === token) callbacks.length && callbacks.shift()(); }, false); return (cb) => { callbacks.push(cb); _global.postMessage(token, "*"); }; })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); })(typeof setImmediate === "function", isFunction$1(_global.postMessage)); const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; var utils_default = { isArray, isArrayBuffer, isBuffer: isBuffer$1, isFormData, isArrayBufferView, isString: isString$1, isNumber, isBoolean, isObject, isPlainObject, isReadableStream, isRequest, isResponse, isHeaders, isUndefined, isDate, isFile, isBlob, isRegExp, isFunction: isFunction$1, isStream, isURLSearchParams, isTypedArray, isFileList, forEach, merge, extend, trim, stripBOM, inherits, toFlatObject, kindOf, kindOfTest, endsWith, toArray, forEachEntry, matchAll, isHTMLForm, hasOwnProperty, hasOwnProp: hasOwnProperty, reduceDescriptors, freezeMethods, toObjectSet, toCamelCase, noop: noop$1, toFiniteNumber, findKey, global: _global, isContextDefined, isSpecCompliantForm, toJSONObject, isAsyncFn, isThenable, setImmediate: _setImmediate, asap }; //#endregion //#region node_modules/.pnpm/axios@1.8.3/node_modules/axios/lib/core/AxiosError.js /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [config] The config. * @param {Object} [request] The request. * @param {Object} [response] The response. * * @returns {Error} The created error. */ function AxiosError(message, code, config, request, response) { Error.call(this); if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor); else this.stack = (/* @__PURE__ */ new Error()).stack; this.message = message; this.name = "AxiosError"; code && (this.code = code); config && (this.config = config); request && (this.request = request); if (response) { this.response = response; this.status = response.status ? response.status : null; } } utils_default.inherits(AxiosError, Error, { toJSON: function toJSON() { return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: utils_default.toJSONObject(this.config), code: this.code, status: this.status }; } }); const prototype$1 = AxiosError.prototype; const descriptors = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" ].forEach((code) => { descriptors[code] = { value: code }; }); Object.defineProperties(AxiosError, descriptors); Object.defineProperty(prototype$1, "isAxiosError", { value: true }); AxiosError.from = (error, code, config, request, response, customProps) => { const axiosError = Object.create(prototype$1); utils_default.toFlatObject(error, axiosError, function filter(obj) { return obj !== Error.prototype; }, (prop) => { return prop !== "isAxiosError"; }); AxiosError.call(axiosError, error.message, code, config, request, response); axiosError.cause = error; axiosError.name = error.name; customProps && Object.assign(axiosError, customProps); return axiosError; }; var AxiosError_default = AxiosError; //#endregion //#region node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js var require_delayed_stream = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js": ((exports, module) => { var Stream$2 = __require("stream").Stream; var util$4 = __require("util"); module.exports = DelayedStream$1; function DelayedStream$1() { this.source = null; this.dataSize = 0; this.maxDataSize = 1024 * 1024; this.pauseStream = true; this._maxDataSizeExceeded = false; this._released = false; this._bufferedEvents = []; } util$4.inherits(DelayedStream$1, Stream$2); DelayedStream$1.create = function(source, options) { var delayedStream = new this(); options = options || {}; for (var option in options) delayedStream[option] = options[option]; delayedStream.source = source; var realEmit = source.emit; source.emit = function() { delayedStream._handleEmit(arguments); return realEmit.apply(source, arguments); }; source.on("error", function() {}); if (delayedStream.pauseStream) source.pause(); return delayedStream; }; Object.defineProperty(DelayedStream$1.prototype, "readable", { configurable: true, enumerable: true, get: function() { return this.source.readable; } }); DelayedStream$1.prototype.setEncoding = function() { return this.source.setEncoding.apply(this.source, arguments); }; DelayedStream$1.prototype.resume = function() { if (!this._released) this.release(); this.source.resume(); }; DelayedStream$1.prototype.pause = function() { this.source.pause(); }; DelayedStream$1.prototype.release = function() { this._released = true; this._bufferedEvents.forEach(function(args) { this.emit.apply(this, args); }.bind(this)); this._bufferedEvents = []; }; DelayedStream$1.prototype.pipe = function() { var r = Stream$2.prototype.pipe.apply(this, arguments); this.resume(); return r; }; DelayedStream$1.prototype._handleEmit = function(args) { if (this._released) { this.emit.apply(this, args); return; } if (args[0] === "data") { this.dataSize += args[1].length; this._checkIfMaxDataSizeExceeded(); } this._bufferedEvents.push(args); }; DelayedStream$1.prototype._checkIfMaxDataSizeExceeded = function() { if (this._maxDataSizeExceeded) return; if (this.dataSize <= this.maxDataSize) return; this._maxDataSizeExceeded = true; var message = "DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded."; this.emit("error", new Error(message)); }; }) }); //#endregion //#region node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js var require_combined_stream = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js": ((exports, module) => { var util$3 = __require("util"); var Stream$1 = __require("stream").Stream; var DelayedStream = require_delayed_stream(); module.exports = CombinedStream$1; function CombinedStream$1() { this.writable = false; this.readable = true; this.dataSize = 0; this.maxDataSize = 2 * 1024 * 1024; this.pauseStreams = true; this._released = false; this._streams = []; this._currentStream = null; this._insideLoop = false; this._pendingNext = false; } util$3.inherits(CombinedStream$1, Stream$1); CombinedStream$1.create = function(options) { var combinedStream = new this(); options = options || {}; for (var option in options) combinedStream[option] = options[option]; return combinedStream; }; CombinedStream$1.isStreamLike = function(stream$1) { return typeof stream$1 !== "function" && typeof stream$1 !== "string" && typeof stream$1 !== "boolean" && typeof stream$1 !== "number" && !Buffer.isBuffer(stream$1); }; CombinedStream$1.prototype.append = function(stream$1) { if (CombinedStream$1.isStreamLike(stream$1)) { if (!(stream$1 instanceof DelayedStream)) { var newStream = DelayedStream.create(stream$1, { maxDataSize: Infinity, pauseStream: this.pauseStreams }); stream$1.on("data", this._checkDataSize.bind(this)); stream$1 = newStream; } this._handleErrors(stream$1); if (this.pauseStreams) stream$1.pause(); } this._streams.push(stream$1); return this; }; CombinedStream$1.prototype.pipe = function(dest, options) { Stream$1.prototype.pipe.call(this, dest, options); this.resume(); return dest; }; CombinedStream$1.prototype._getNext = function() { this._currentStream = null; if (this._insideLoop) { this._pendingNext = true; return; } this._insideLoop = true; try { do { this._pendingNext = false; this._realGetNext(); } while (this._pendingNext); } finally { this._insideLoop = false; } }; CombinedStream$1.prototype._realGetNext = function() { var stream$1 = this._streams.shift(); if (typeof stream$1 == "undefined") { this.end(); return; } if (typeof stream$1 !== "function") { this._pipeNext(stream$1); return; } stream$1(function(stream$2) { if (CombinedStream$1.isStreamLike(stream$2)) { stream$2.on("data", this._checkDataSize.bind(this)); this._handleErrors(stream$2); } this._pipeNext(stream$2); }.bind(this)); }; CombinedStream$1.prototype._pipeNext = function(stream$1) { this._currentStream = stream$1; if (CombinedStream$1.isStreamLike(stream$1)) { stream$1.on("end", this._getNext.bind(this)); stream$1.pipe(this, { end: false }); return; } var value = stream$1; this.write(value); this._getNext(); }; CombinedStream$1.prototype._handleErrors = function(stream$1) { var self$1 = this; stream$1.on("error", function(err) { self$1._emitError(err); }); }; CombinedStream$1.prototype.write = function(data) { this.emit("data", data); }; CombinedStream$1.prototype.pause = function() { if (!this.pauseStreams) return; if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") this._currentStream.pause(); this.emit("pause"); }; CombinedStream$1.prototype.resume = function() { if (!this._released) { this._released = true; this.writable = true; this._getNext(); } if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") this._currentStream.resume(); this.emit("resume"); }; CombinedStream$1.prototype.end = function() { this._reset(); this.emit("end"); }; CombinedStream$1.prototype.destroy = function() { this._reset(); this.emit("close"); }; CombinedStream$1.prototype._reset = function() { this.writable = false; this._streams = []; this._currentStream = null; }; CombinedStream$1.prototype._checkDataSize = function() { this._updateDataSize(); if (this.dataSize <= this.maxDataSize) return; var message = "DelayedStream#maxDataSize of " + this.maxDataSize + " bytes exceeded."; this._emitError(new Error(message)); }; CombinedStream$1.prototype._updateDataSize = function() { this.dataSize = 0; var self$1 = this; this._streams.forEach(function(stream$1) { if (!stream$1.dataSize) return; self$1.dataSize += stream$1.dataSize; }); if (this._currentStream && this._currentStream.dataSize) this.dataSize += this._currentStream.dataSize; }; CombinedStream$1.prototype._emitError = function(err) { this._reset(); this.emit("error", err); }; }) }); //#endregion //#region node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js var require_es_object_atoms = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js": ((exports, module) => { /** @type {import('.')} */ module.exports = Object; }) }); //#endregion //#region node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js var require_es_errors = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js": ((exports, module) => { /** @type {import('.')} */ module.exports = Error; }) }); //#endregion //#region node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js var require_eval = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js": ((exports, module) => { /** @type {import('./eval')} */ module.exports = EvalError; }) }); //#endregion //#region node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js": ((exports, module) => { /** @type {import('./range')} */ module.exports = RangeError; }) }); //#endregion //#region node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js var require_ref = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js": ((exports, module) => { /** @type {import('./ref')} */ module.exports = ReferenceError; }) }); //#endregion //#region node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js var require_syntax = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js": ((exports, module) => { /** @type {import('./syntax')} */ module.exports = SyntaxError; }) }); //#endregion //#region node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js var require_type = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js": ((exports, module) => { /** @type {import('./type')} */ module.exports = TypeError; }) }); //#endregion //#region node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js var require_uri = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js": ((exports, module) => { /** @type {import('./uri')} */ module.exports = URIError; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js var require_abs = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js": ((exports, module) => { /** @type {import('./abs')} */ module.exports = Math.abs; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js var require_floor = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js": ((exports, module) => { /** @type {import('./floor')} */ module.exports = Math.floor; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js var require_max = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js": ((exports, module) => { /** @type {import('./max')} */ module.exports = Math.max; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js var require_min = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js": ((exports, module) => { /** @type {import('./min')} */ module.exports = Math.min; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js var require_pow = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js": ((exports, module) => { /** @type {import('./pow')} */ module.exports = Math.pow; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js var require_round = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js": ((exports, module) => { /** @type {import('./round')} */ module.exports = Math.round; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js var require_isNaN = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js": ((exports, module) => { /** @type {import('./isNaN')} */ module.exports = Number.isNaN || function isNaN$1(a) { return a !== a; }; }) }); //#endregion //#region node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js var require_sign = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js": ((exports, module) => { var $isNaN = require_isNaN(); /** @type {import('./sign')} */ module.exports = function sign$1(number) { if ($isNaN(number) || number === 0) return number; return number < 0 ? -1 : 1; }; }) }); //#endregion //#region node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js var require_gOPD = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js": ((exports, module) => { /** @type {import('./gOPD')} */ module.exports = Object.getOwnPropertyDescriptor; }) }); //#endregion //#region node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js var require_gopd = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js": ((exports, module) => { /** @type {import('.')} */ var $gOPD$1 = require_gOPD(); if ($gOPD$1) try { $gOPD$1([], "length"); } catch (e) { $gOPD$1 = null; } module.exports = $gOPD$1; }) }); //#endregion //#region node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js var require_es_define_property = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js": ((exports, module) => { /** @type {import('.')} */ var $defineProperty$2 = Object.defineProperty || false; if ($defineProperty$2) try { $defineProperty$2({}, "a", { value: 1 }); } catch (e) { $defineProperty$2 = false; } module.exports = $defineProperty$2; }) }); //#endregion //#region node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js var require_shams$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js": ((exports, module) => { /** @type {import('./shams')} */ module.exports = function hasSymbols$2() { if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") return false; if (typeof Symbol.iterator === "symbol") return true; /** @type {{ [k in symbol]?: unknown }} */ var obj = {}; var sym = Symbol("test"); var symObj = Object(sym); if (typeof sym === "string") return false; if (Object.prototype.toString.call(sym) !== "[object Symbol]") return false; if (Object.prototype.toString.call(symObj) !== "[object Symbol]") return false; var symVal = 42; obj[sym] = symVal; for (var _ in obj) return false; if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) return false; if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) return false; var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) return false; if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) return false; if (typeof Object.getOwnPropertyDescriptor === "function") { var descriptor = Object.getOwnPropertyDescriptor(obj, sym); if (descriptor.value !== symVal || descriptor.enumerable !== true) return false; } return true; }; }) }); //#endregion //#region node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js var require_has_symbols = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js": ((exports, module) => { var origSymbol = typeof Symbol !== "undefined" && Symbol; var hasSymbolSham = require_shams$1(); /** @type {import('.')} */ module.exports = function hasNativeSymbols() { if (typeof origSymbol !== "function") return false; if (typeof Symbol !== "function") return false; if (typeof origSymbol("foo") !== "symbol") return false; if (typeof Symbol("bar") !== "symbol") return false; return hasSymbolSham(); }; }) }); //#endregion //#region node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js var require_Reflect_getPrototypeOf = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js": ((exports, module) => { /** @type {import('./Reflect.getPrototypeOf')} */ module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; }) }); //#endregion //#region node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js var require_Object_getPrototypeOf = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js": ((exports, module) => { var $Object$2 = require_es_object_atoms(); /** @type {import('./Object.getPrototypeOf')} */ module.exports = $Object$2.getPrototypeOf || null; }) }); //#endregion //#region node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js var require_implementation = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js": ((exports, module) => { var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; var toStr = Object.prototype.toString; var max$1 = Math.max; var funcType = "[object Function]"; var concatty = function concatty$1(a, b) { var arr = []; for (var i = 0; i < a.length; i += 1) arr[i] = a[i]; for (var j = 0; j < b.length; j += 1) arr[j + a.length] = b[j]; return arr; }; var slicy = function slicy$1(arrLike, offset) { var arr = []; for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) arr[j] = arrLike[i]; return arr; }; var joiny = function(arr, joiner) { var str = ""; for (var i = 0; i < arr.length; i += 1) { str += arr[i]; if (i + 1 < arr.length) str += joiner; } return str; }; module.exports = function bind$5(that) { var target = this; if (typeof target !== "function" || toStr.apply(target) !== funcType) throw new TypeError(ERROR_MESSAGE + target); var args = slicy(arguments, 1); var bound; var binder = function() { if (this instanceof bound) { var result = target.apply(this, concatty(args, arguments)); if (Object(result) === result) return result; return this; } return target.apply(that, concatty(args, arguments)); }; var boundLength = max$1(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) boundArgs[i] = "$" + i; bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); if (target.prototype) { var Empty = function Empty$1() {}; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; }) }); //#endregion //#region node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js var require_function_bind = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js": ((exports, module) => { var implementation = require_implementation(); module.exports = Function.prototype.bind || implementation; }) }); //#endregion //#region node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js var require_functionCall = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js": ((exports, module) => { /** @type {import('./functionCall')} */ module.exports = Function.prototype.call; }) }); //#endregion //#region node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js var require_functionApply = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js": ((exports, module) => { /** @type {import('./functionApply')} */ module.exports = Function.prototype.apply; }) }); //#endregion //#region node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js var require_reflectApply = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js": ((exports, module) => { /** @type {import('./reflectApply')} */ module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; }) }); //#endregion //#region node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js var require_actualApply = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js": ((exports, module) => { var bind$4 = require_function_bind(); var $apply$1 = require_functionApply(); var $call$2 = require_functionCall(); var $reflectApply = require_reflectApply(); /** @type {import('./actualApply')} */ module.exports = $reflectApply || bind$4.call($call$2, $apply$1); }) }); //#endregion //#region node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js var require_call_bind_apply_helpers = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js": ((exports, module) => { var bind$3 = require_function_bind(); var $TypeError$2 = require_type(); var $call$1 = require_functionCall(); var $actualApply = require_actualApply(); /** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ module.exports = function callBindBasic(args) { if (args.length < 1 || typeof args[0] !== "function") throw new $TypeError$2("a function is required"); return $actualApply(bind$3, $call$1, args); }; }) }); //#endregion //#region node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js var require_get = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js": ((exports, module) => { var callBind = require_call_bind_apply_helpers(); var gOPD = require_gopd(); var hasProtoAccessor; try { hasProtoAccessor = [].__proto__ === Array.prototype; } catch (e) { if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") throw e; } var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, "__proto__"); var $Object$1 = Object; var $getPrototypeOf = $Object$1.getPrototypeOf; /** @type {import('./get')} */ module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? function getDunder(value) { return $getPrototypeOf(value == null ? value : $Object$1(value)); } : false; }) }); //#endregion //#region node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js var require_get_proto = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js": ((exports, module) => { var reflectGetProto = require_Reflect_getPrototypeOf(); var originalGetProto = require_Object_getPrototypeOf(); var getDunderProto = require_get(); /** @type {import('.')} */ module.exports = reflectGetProto ? function getProto$1(O) { return reflectGetProto(O); } : originalGetProto ? function getProto$1(O) { if (!O || typeof O !== "object" && typeof O !== "function") throw new TypeError("getProto: not an object"); return originalGetProto(O); } : getDunderProto ? function getProto$1(O) { return getDunderProto(O); } : null; }) }); //#endregion //#region node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js var require_hasown = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js": ((exports, module) => { var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; var bind$2 = require_function_bind(); /** @type {import('.')} */ module.exports = bind$2.call(call, $hasOwn); }) }); //#endregion //#region node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js var require_get_intrinsic = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js": ((exports, module) => { var undefined$1; var $Object = require_es_object_atoms(); var $Error = require_es_errors(); var $EvalError = require_eval(); var $RangeError = require_range(); var $ReferenceError = require_ref(); var $SyntaxError = require_syntax(); var $TypeError$1 = require_type(); var $URIError = require_uri(); var abs = require_abs(); var floor = require_floor(); var max = require_max(); var min = require_min(); var pow = require_pow(); var round = require_round(); var sign = require_sign(); var $Function = Function; var getEvalledConstructor = function(expressionSyntax) { try { return $Function("\"use strict\"; return (" + expressionSyntax + ").constructor;")(); } catch (e) {} }; var $gOPD = require_gopd(); var $defineProperty$1 = require_es_define_property(); var throwTypeError = function() { throw new $TypeError$1(); }; var ThrowTypeError = $gOPD ? function() { try { arguments.callee; return throwTypeError; } catch (calleeThrows) { try { return $gOPD(arguments, "callee").get; } catch (gOPDthrows) { return throwTypeError; } } }() : throwTypeError; var hasSymbols$1 = require_has_symbols()(); var getProto = require_get_proto(); var $ObjectGPO = require_Object_getPrototypeOf(); var $ReflectGPO = require_Reflect_getPrototypeOf(); var $apply = require_functionApply(); var $call = require_functionCall(); var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array); var INTRINSICS = { __proto__: null, "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer, "%ArrayIteratorPrototype%": hasSymbols$1 && getProto ? getProto([][Symbol.iterator]()) : undefined$1, "%AsyncFromSyncIteratorPrototype%": undefined$1, "%AsyncFunction%": needsEval, "%AsyncGenerator%": needsEval, "%AsyncGeneratorFunction%": needsEval, "%AsyncIteratorPrototype%": needsEval, "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics, "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt, "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": $Error, "%eval%": eval, "%EvalError%": $EvalError, "%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array, "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry, "%Function%": $Function, "%GeneratorFunction%": needsEval, "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": hasSymbols$1 && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1, "%JSON%": typeof JSON === "object" ? JSON : undefined$1, "%Map%": typeof Map === "undefined" ? undefined$1 : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$1 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": $Object, "%Object.getOwnPropertyDescriptor%": $gOPD, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise, "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy, "%RangeError%": $RangeError, "%ReferenceError%": $ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? undefined$1 : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$1 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": hasSymbols$1 && getProto ? getProto(""[Symbol.iterator]()) : undefined$1, "%Symbol%": hasSymbols$1 ? Symbol : undefined$1, "%SyntaxError%": $SyntaxError, "%ThrowTypeError%": ThrowTypeError, "%TypedArray%": TypedArray, "%TypeError%": $TypeError$1, "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array, "%URIError%": $URIError, "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet, "%Function.prototype.call%": $call, "%Function.prototype.apply%": $apply, "%Object.defineProperty%": $defineProperty$1, "%Object.getPrototypeOf%": $ObjectGPO, "%Math.abs%": abs, "%Math.floor%": floor, "%Math.max%": max, "%Math.min%": min, "%Math.pow%": pow, "%Math.round%": round, "%Math.sign%": sign, "%Reflect.getPrototypeOf%": $ReflectGPO }; if (getProto) try { null.error; } catch (e) { INTRINSICS["%Error.prototype%"] = getProto(getProto(e)); } var doEval = function doEval$1(name) { var value; if (name === "%AsyncFunction%") value